/* Core Design System */
:root {
    --primary-color: #d4a373;
    /* Default: Classic Gold Theme */
    --primary: #ffffff;
    --secondary: #d4a373;
    --accent: #faedcd;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --bg-accent: #fefae0;
    --font-display: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* System Aliases for components */
    --font-serif: var(--font-display);
    --font-sans: var(--font-body);
    --font-fancy: var(--font-display);
    
    --white: #ffffff;
    --shadow: rgba(0,0,0,0.1);
    
    /* Monogram & Envelope Dynamic Variables */
    --monogram-l1-color: #d4a373;
    --monogram-l2-color: #a67c52;
    --envelope-bg-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

body.invite-gate-open {
    overflow: hidden !important;
}

#app {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    position: relative;
}

.section {
    padding: 60px 20px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .section-title {
        font-size: 1.8rem !important; /* Reduced from 2.2rem */
        line-height: 1.2;
        margin-bottom: 20px;
        word-wrap: break-word;
        padding: 0 10px;
    }
}

.section-sm {
    padding: 30px 20px;
    text-align: center;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--secondary);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.animate-up {
    animation: fadeInUp 1.2s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.5)), url('assets/hero.png') center/cover no-repeat;
    color: white;
    text-align: center;
    position: relative;
}

.subtitle {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 8px;
    margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.personal-invite-gate {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: grid;
    place-items: center;
    padding: 12px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% 0%, rgba(212, 163, 115, 0.14), transparent 34%),
        linear-gradient(180deg, #f8f6ef 0%, #f1eee5 100%);
}

.personal-invite-gate[hidden] {
    display: none;
}

.personal-invite-gate.is-opening {
    animation: inviteGateFade 0.7s 1.55s ease forwards;
}

.invite-card-shell {
    position: relative;
    width: min(430px, calc(100vw - 24px));
    height: min(760px, calc(100dvh - 24px));
    min-height: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 28px 24px 24px;
    color: #917d52;
    text-align: center;
    background:
        linear-gradient(rgba(255,255,255,0.72), rgba(255,255,255,0.82)),
        url('assets/botanical.png') center/cover no-repeat,
        #faf8f1;
    border: 1px solid rgba(145, 125, 82, 0.16);
    box-shadow: 0 26px 70px rgba(80, 67, 45, 0.16);
    overflow: hidden;
}

.invite-card-shell::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(145, 125, 82, 0.13);
    pointer-events: none;
}

.invite-card-shell::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(145,125,82,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(145,125,82,0.028) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.32;
    pointer-events: none;
}

.invite-floral {
    position: absolute;
    width: 250px;
    height: 170px;
    background: url('assets/botanical.png') center/contain no-repeat;
    opacity: 0.11;
    pointer-events: none;
}

.invite-floral-top {
    top: -52px;
    left: -70px;
    transform: rotate(-18deg);
}

.invite-floral-bottom {
    right: -78px;
    bottom: -42px;
    transform: rotate(162deg);
}

.invite-chibi-accent {
    position: absolute;
    right: 18px;
    bottom: 12px;
    z-index: 2;
    width: clamp(54px, 15vw, 78px);
    height: auto;
    display: block;
    object-fit: contain;
    pointer-events: none;
    opacity: 0.96;
    filter: drop-shadow(0 8px 16px rgba(80,67,45,0.16));
}

.invite-chibi-source {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.invite-kicker,
.invite-label,
.invite-copy,
.invite-date-text,
.invite-couple-name,
.invite-recipient-name,
.invite-envelope-button {
    position: relative;
    z-index: 1;
}

.invite-kicker {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.72rem;
    color: rgba(145, 125, 82, 0.7);
}

.invite-couple-name {
    display: grid;
    gap: 4px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.7rem, 12vw, 3.85rem);
    line-height: 1.02;
    letter-spacing: 0;
    text-transform: none;
}

.invite-couple-name em {
    font-size: 0.55em;
    font-style: normal;
}

.invite-label,
.invite-copy {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
}

.invite-label {
    margin-top: 2px;
    font-size: 0.9rem;
}

.invite-recipient-name {
    max-width: 100%;
    font-family: var(--font-display);
    font-size: clamp(2.15rem, 10vw, 3rem);
    line-height: 1.05;
    letter-spacing: 0;
    color: #8d774d;
    overflow-wrap: anywhere;
}

.invite-single-heart {
    display: inline-block;
    margin-left: 0.08em;
    font-family: var(--font-body);
    font-size: 0.72em;
    vertical-align: 0.04em;
    animation: inviteHeartBeat 1.25s ease-in-out infinite;
}

.invite-copy {
    max-width: 340px;
    font-size: 0.82rem;
    line-height: 1.65;
}

.invite-envelope-button {
    display: grid;
    gap: 10px;
    justify-items: center;
    margin: 4px 0 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    perspective: 900px;
}

.invite-envelope {
    position: relative;
    display: block;
    width: min(315px, 78vw);
    aspect-ratio: 1.85;
    background:
        linear-gradient(145deg, transparent 49.4%, rgba(124,104,65,0.2) 50%, transparent 51%) left/50% 100% no-repeat,
        linear-gradient(215deg, transparent 49.4%, rgba(124,104,65,0.2) 50%, transparent 51%) right/50% 100% no-repeat,
        #eee6d4;
    border: 1px solid rgba(124,104,65,0.22);
    box-shadow: 0 14px 28px rgba(80,67,45,0.16);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    transform-style: preserve-3d;
}

.invite-letter-preview {
    position: absolute;
    left: 10%;
    right: 10%;
    top: 3%;
    height: 82%;
    z-index: 0;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(145,125,82,0.16);
    border-radius: 7px;
    background: #fffaf4;
    box-shadow: 0 12px 26px rgba(80,67,45,0.14);
    transform: translateY(42%) scale(0.92);
    opacity: 0;
}

.mini-site-topbar,
.mini-site-hero,
.mini-site-content,
.mini-site-photo-row,
.mini-site-actions {
    display: block;
}

.mini-site-topbar {
    height: 9%;
    padding: 5px 7px;
    background: linear-gradient(180deg, #fffdf8 0%, #f4eadc 100%);
    border-bottom: 1px solid rgba(145,125,82,0.12);
    text-align: left;
}

.mini-site-topbar span {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 3px;
    border-radius: 50%;
    background: rgba(145,125,82,0.34);
    vertical-align: top;
}

.mini-site-hero {
    position: relative;
    height: 47%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 9px 10px;
    color: #fff;
    background:
        linear-gradient(rgba(35,28,20,0.18), rgba(35,28,20,0.42)),
        var(--preview-hero, url('assets/hero.png')) center/cover no-repeat;
    text-shadow: 0 2px 8px rgba(0,0,0,0.38);
}

.mini-site-subtitle {
    display: block;
    font-family: var(--font-body);
    font-size: 0.43rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    opacity: 0.92;
}

.mini-site-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    max-width: 100%;
    font-family: var(--font-display);
    font-size: clamp(1rem, 5vw, 1.34rem);
    line-height: 1.02;
    white-space: nowrap;
}

.mini-site-names em {
    font-size: 0.78em;
    font-style: italic;
    opacity: 0.9;
}

.mini-site-date {
    display: block;
    font-size: 0.47rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.mini-site-content {
    height: 44%;
    padding: 8px 9px 9px;
    background:
        linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.96)),
        url('assets/botanical.png') center/cover no-repeat,
        #fffaf4;
}

.mini-site-photo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-bottom: 7px;
}

.mini-site-photo-row span {
    display: block;
    aspect-ratio: 1.45;
    border-radius: 5px;
    background:
        linear-gradient(135deg, rgba(212,163,115,0.26), rgba(255,255,255,0.78)),
        #f3e4d1;
    box-shadow: inset 0 0 0 1px rgba(145,125,82,0.12);
}

.mini-site-line {
    display: block;
    width: 58%;
    height: 4px;
    margin: 5px auto 0;
    border-radius: 999px;
    background: rgba(145,125,82,0.18);
}

.mini-site-line.wide {
    width: 78%;
}

.mini-site-actions {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
}

.mini-site-actions span {
    display: block;
    width: 28px;
    height: 9px;
    border-radius: 999px;
    background: rgba(212,163,115,0.32);
}

.invite-envelope::before,
.invite-envelope::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.invite-envelope::before {
    clip-path: polygon(0 0, 50% 58%, 100% 0);
    background: #f5eddc;
    border-bottom: 1px solid rgba(124,104,65,0.18);
    z-index: 2;
    transform-origin: top center;
}

.invite-envelope::after {
    clip-path: polygon(0 100%, 50% 42%, 100% 100%);
    background: rgba(255,255,255,0.16);
    z-index: 1;
}

.invite-envelope-button:hover .invite-envelope {
    transform: translateY(-4px);
    box-shadow: 0 26px 48px rgba(80,67,45,0.22);
}

.invite-envelope-monogram {
    position: absolute;
    top: 10%;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 9vw, 3rem);
    color: rgba(212, 163, 115, 0.42);
}

.invite-wax-seal {
    position: absolute;
    left: 50%;
    top: 55%;
    z-index: 3;
    width: clamp(50px, 13vw, 62px);
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 8px 12px rgba(80,67,45,0.2));
}

.invite-wax-seal img {
    width: 100%;
    display: block;
}

.invite-tap-hand {
    position: absolute;
    left: 54%;
    top: 56%;
    z-index: 4;
    font-size: clamp(2rem, 8vw, 2.9rem);
    color: #fff;
    text-shadow: 0 2px 10px rgba(80,67,45,0.3);
    animation: inviteTap 1.3s ease-in-out infinite;
}

.invite-envelope-button.is-opened {
    pointer-events: none;
}

.invite-envelope-button.is-opened .invite-envelope {
    animation: inviteEnvelopeLift 1.45s cubic-bezier(0.2, 0.78, 0.22, 1) forwards;
}

.invite-envelope-button.is-opened .invite-envelope::before {
    animation: inviteFlapOpen 1.05s cubic-bezier(0.2, 0.78, 0.22, 1) forwards;
}

.invite-envelope-button.is-opened .invite-letter-preview {
    animation: inviteLetterRise 1.28s 0.38s cubic-bezier(0.2, 0.78, 0.22, 1) forwards;
}

.invite-envelope-button.is-opened .invite-envelope-monogram {
    opacity: 0;
    transition: opacity 0.32s ease;
}

.invite-envelope-button.is-opened .invite-wax-seal {
    animation: inviteSealRelease 0.88s 0.12s ease forwards;
}

.invite-envelope-button.is-opened .invite-tap-hand,
.invite-envelope-button.is-opened .invite-open-text {
    animation: inviteFadeSoft 0.42s ease forwards;
}

.invite-open-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 22px;
    border: 1px solid rgba(145,125,82,0.34);
    border-radius: 999px;
    background: rgba(255,255,255,0.62);
    color: #7f6b43;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invite-date-text {
    font-family: var(--font-body);
    letter-spacing: 0.28em;
    font-weight: 600;
    font-size: 1.45rem;
}

@keyframes inviteTap {
    0%, 100% { transform: translate(0, 0) rotate(-8deg); opacity: 0.78; }
    50% { transform: translate(-8px, -8px) rotate(-12deg); opacity: 1; }
}

@keyframes inviteGateFade {
    to {
        opacity: 0;
        transform: scale(1.012);
    }
}

@keyframes inviteEnvelopeLift {
    0% { transform: translateY(0) scale(1); }
    52% { transform: translateY(-6px) scale(1.012); }
    100% { transform: translateY(-14px) scale(0.985); opacity: 0.88; }
}

@keyframes inviteFlapOpen {
    0% { transform: rotateX(0deg); filter: brightness(1); }
    100% { transform: rotateX(148deg); filter: brightness(1.04); }
}

@keyframes inviteLetterRise {
    0% {
        transform: translateY(42%) scale(0.92);
        opacity: 0;
    }
    35% { opacity: 1; }
    100% {
        transform: translateY(-16%) scale(0.98);
        opacity: 0.92;
    }
}

@keyframes inviteSealRelease {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    45% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.92; }
    100% { transform: translate(-50%, -58%) scale(0.72); opacity: 0; }
}

@keyframes inviteFadeSoft {
    to {
        opacity: 0;
        transform: translateY(6px);
    }
}

@keyframes inviteHeartBeat {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(1.16); }
}

@media (max-width: 560px) {
    .personal-invite-gate {
        padding: 8px;
    }

    .invite-card-shell {
        width: min(430px, calc(100vw - 16px));
        height: calc(100dvh - 16px);
        min-height: 600px;
        gap: 8px;
        padding: 24px 20px 20px;
    }

    .invite-label,
    .invite-copy {
        letter-spacing: 0.12em;
    }

    .invite-couple-name {
        font-size: clamp(2.45rem, 14vw, 3.2rem);
    }

    .invite-recipient-name {
        font-size: clamp(2rem, 12vw, 2.7rem);
    }

    .invite-envelope {
        width: min(300px, 78vw);
    }
}

.names-wrapper h1 {
    font-family: var(--font-display);
    font-size: 6rem;
    margin: 15px 0;
    text-shadow: 0 4px 25px rgba(0,0,0,0.3);
    letter-spacing: 4px;
}

.ampersand {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-style: italic;
}

.date-hero {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 2.2rem;
    margin-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.4);
    border-bottom: 1px solid rgba(255,255,255,0.4);
    display: inline-block;
    padding: 12px 50px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.scroll-down {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.scroll-down:hover {
    transform: translateX(-50%) translateY(2px);
}

.mouse {
    width: 20px;
    height: 32px;
    border: 1.5px solid white;
    border-radius: 10px;
    position: relative;
    opacity: 0.8;
}

.wheel {
    width: 3px;
    height: 6px;
    background: white;
    border-radius: 1.5px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s infinite;
}

.m-scroll-arrows {
    display: block;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid white;
    border-bottom: 1.5px solid white;
    transform: rotate(45deg);
    margin: -3px 0;
    animation: scroll-arrows 1.5s infinite;
    opacity: 0.8;
}

.m-scroll-arrows.un {
    animation-delay: 0.1s;
}

.m-scroll-arrows.doi {
    animation-delay: 0.2s;
}

.m-scroll-arrows.ba {
    animation-delay: 0.3s;
}

@keyframes scroll-wheel {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(15px); opacity: 0; }
}

@keyframes scroll-arrows {
    0% { opacity: 0; }
    50% { opacity: 0.5; }
    100% { opacity: 0; }
}

.map-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Couple Cards */
.couple-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

.couple-card {
    background: var(--primary);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.couple-card:hover {
    transform: translateY(-10px);
}

.image-placeholder {
    width: 200px;
    height: 200px;
    background: #eee;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    background-size: cover;
    background-position: center top;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
}

/* Gallery Styling */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.gallery-item {
    aspect-ratio: 1/1;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
}

/* Mobile Gallery Slider Styles */
.mobile-slider-container {
    display: none;
    margin-top: 30px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.slider-main {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    overflow: hidden;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-img-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.4s ease;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.6);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--secondary);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slider-nav.prev { left: 15px; }
.slider-nav.next { right: 15px; }

.slider-thumbs {
    position: relative;
    display: flex;
    gap: 12px;
    overflow-x: auto !important;
    padding: 10px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.slider-thumbs::-webkit-scrollbar { display: none; }

.thumb-item {
    flex: 0 0 75px;
    height: 75px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.thumb-item.active {
    border-color: var(--secondary);
    opacity: 1;
    transform: scale(1.05);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .gallery-grid { display: none !important; }
    .mobile-slider-container { display: block; }
}


/* Navigation Styles */
.desktop-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
    padding: 20px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.desktop-nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.desktop-nav.scrolled .nav-logo,
.desktop-nav.scrolled .nav-links a {
    color: var(--secondary) !important;
    text-shadow: none;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    transition: all 0.3s;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-links a:hover {
    color: var(--secondary);
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px); /* Higher blur for premium feel */
    width: 90%;
    max-width: 400px;
    height: 70px;
    z-index: 2000;
    border-radius: 35px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.12);
    justify-content: space-around;
    align-items: center;
    padding: 0 20px;
    border: 1px solid rgba(255,255,255,0.5);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    gap: 4px;
}

.mobile-nav-item i {
    width: 24px;
    height: 24px;
}

.mobile-nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

/* Timeline Styles */
/* Narrative Story Section (Luxury Redesign) */
.section-narrative {
    padding: 120px 0;
    overflow: hidden;
    background: #fff;
    position: relative;
}

.narrative-container {
    max-width: 1100px; /* Slimmer for better focus */
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 80px;
    align-items: center;
    padding: 0 40px;
}

.narrative-image-side {
    position: relative;
}

.narrative-photo-frame {
    position: relative;
    padding: 20px;
    background: white;
    box-shadow: 0 30px 80px rgba(0,0,0,0.06); /* Softer, larger shadow */
    transform: rotate(-1.5deg);
    transition: transform 0.8s ease-out;
}

.narrative-photo-frame:hover {
    transform: rotate(0deg) scale(1.02);
}

.narrative-img {
    width: 100%;
    aspect-ratio: 4/5.5; /* Slightly taller for editorial look */
    background-size: cover;
    background-position: center;
    filter: brightness(1.02) contrast(1.02);
}

.narrative-decoration {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(0,0,0,0.1); /* Very subtle line */
    z-index: -1;
    transform: rotate(15deg);
}

.narrative-text-side {
    position: relative;
}

.narrative-content-box {
    padding: 20px 0;
}

.narrative-subtitle {
    display: block;
    font-family: var(--font-display); /* Use Cinzel for luxury header */
    font-size: 0.85rem;
    letter-spacing: 6px;
    color: var(--secondary);
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 500;
}

.narrative-title {
    font-family: var(--font-display); /* Match the user's flowy title style */
    font-size: 4.5rem;
    color: var(--text-main);
    margin: 0 0 35px 0;
    line-height: 1.1;
    font-weight: 400;
}

.narrative-body {
    font-family: var(--font-body); /* Classic editorial font */
    font-size: 1.25rem;
    line-height: 2.2; /* More air between lines */
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 50px;
    text-align: justify;
}

.narrative-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.08); /* Slightly more visible separator */
}

.footer-icon {
    width: 18px;
    height: 18px;
    color: var(--secondary);
    opacity: 0.7;
}

.signature {
    font-family: 'Alex Brush', cursive;
    font-size: 2.2rem;
    color: var(--secondary);
}

@media (max-width: 992px) {
    .narrative-container {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .narrative-photo-frame {
        max-width: 450px;
        margin: 0 auto;
        transform: none;
    }
    
    .narrative-footer {
        justify-content: center;
    }
    
    .narrative-title {
        font-size: 3.2rem;
    }
    
    .narrative-body {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .narrative-title {
        font-size: 2.6rem;
    }
    
    .narrative-body {
        font-size: 1.15rem;
        line-height: 1.9;
    }
    
    .narrative-footer {
        flex-direction: column;
        gap: 8px;
        border-top: 1px solid rgba(0,0,0,0.05);
        padding-top: 30px;
    }
    
    .signature {
        font-size: 1.8rem;
        line-height: 1.3;
    }
}

/* Couple Image Wrapper */
.image-wrapper {
    position: relative;
    padding: 16px;
    border-radius: 50%;
    margin-bottom: 25px;
    display: inline-block;
    background: #fff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    z-index: 1;
}

/* --- Avatar Frame Styles --- */

/* 1. frame-none: Simple Soft Shadow */
.frame-none .image-placeholder {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 2. frame-glow-ring: Premium Breathing Glow & Offset Ring */
.frame-glow-ring .image-wrapper::before {
    content: '';
    position: absolute;
    top: -12px; left: -12px; right: -12px; bottom: -12px;
    border: 1px solid var(--secondary);
    border-radius: 50%;
    z-index: 0;
    opacity: 0.6;
    animation: breathingGlow 4s infinite ease-in-out;
}
/* Comprehensive Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
    pointer-events: none;
}

.reveal.revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1) !important;
    pointer-events: auto;
}

.reveal-up { transform: translateY(50px); }
.reveal-down { transform: translateY(-50px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal-scale { transform: scale(0.9); }

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }
.reveal-delay-7 { transition-delay: 0.7s; }
.reveal-stagger > * { opacity: 0; }

.reveal-static {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    transition: none !important;
}

@keyframes breathingGlow {
    0% { transform: scale(0.98); opacity: 0.4; }
    50% { transform: scale(1.04); opacity: 0.8; box-shadow: 0 0 25px var(--accent); }
    100% { transform: scale(0.98); opacity: 0.4; }
}

@keyframes rotateDecor {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-nav { display: flex; }
    
    .section-title { font-size: 2.2rem; }
    
    /* Hero names smaller on mobile to avoid overflow */
    .names-wrapper h1 { font-size: 3.5rem; }
    .subtitle { font-size: 0.9rem; letter-spacing: 3px; }
    .date-hero { font-size: 1.4rem; padding: 8px 20px; }
}

.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.cd-item {
    text-align: center;
    background: var(--primary);
    padding: 20px;
    min-width: 120px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.03);
    flex: 0 1 auto;
}

@media (max-width: 600px) {
    .countdown-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .cd-item {
        min-width: unset;
        width: 100%;
        padding: 15px;
    }
    
    .cd-item span {
        font-size: 2.2rem;
    }
}

/* --- New Couple Hero Redesign --- */
#couple-hero {
    background: #fffcf8; /* Soft paper color */
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.8) 0%, transparent 100%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    padding-top: 60px;
    padding-bottom: 20px;
}

.countdown-minimal {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
    font-variant-numeric: tabular-nums;
}

.cd-item-mini span {
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--secondary) !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}

.cd-sep {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--secondary);
    opacity: 0.3;
    align-self: center;
    margin-top: -10px;
}

/* Mobile Responsive Countdown */
@media (max-width: 768px) {
    .countdown-minimal {
        gap: 20px;
        margin-bottom: 100px !important; /* Pushes the envelope down further */
    }
    .cd-item-mini span {
        font-size: 3rem;
    }
    .cd-sep {
        font-size: 2.2rem;
        margin-top: -5px;
    }
    /* Lower the polaroids on mobile to prevent covering the countdown */
    .p-groom {
        bottom: 110px !important;
    }
    .p-bride {
        bottom: 130px !important;
    }
}

@media (max-width: 480px) {
    .countdown-minimal {
        gap: 12px;
        margin-bottom: 80px !important;
    }
    .cd-item-mini span {
        font-size: 2.2rem;
    }
    .cd-sep {
        font-size: 1.6rem;
    }
    .p-groom {
        bottom: 90px !important;
    }
    .p-bride {
        bottom: 110px !important;
    }
}

.polaroid-frame {
    background: #fff;
    padding: 12px 12px 40px; /* Thicker bottom border */
    box-shadow: 0 15px 45px rgba(0,0,0,0.12), 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.polaroid-img {
    width: 100%;
    background-color: #f8f8f8;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
}

.envelope-front {
    background: var(--envelope-bg-color, #fdf6e3);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    box-shadow: 0 -15px 40px rgba(0,0,0,0.06), inset 0 2px 0 rgba(255,255,255,0.6);
    border: 1px solid rgba(212,163,115,0.15);
    border-top: 1px solid rgba(212,163,115,0.25);
}

/* Animations for scroll reveal */
#couple-hero.active .p-groom {
    transform: rotate(-12deg) translateY(0) !important;
    opacity: 1 !important;
}

#couple-hero.active .p-bride {
    transform: rotate(6deg) translateY(0) !important;
    opacity: 1 !important;
}

#couple-hero.active .wax-seal {
    transform: translateX(-50%) scale(1.1) !important;
    z-index: 20 !important;
}

/* Polaroid Hover Enhancements */
.polaroid-wrapper {
    cursor: pointer;
    /* Wrap-level transition only for the initial reveal fall */
    transition: transform 2.2s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.2s ease, z-index 0s !important;
}

.polaroid-wrapper:hover {
    z-index: 15 !important;
}

.polaroid-frame {
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform;
}

.polaroid-wrapper .polaroid-frame {
    /* Ensure frame has a clean transform surface */
    transform: translateY(0) scale(1);
}

.polaroid-wrapper:hover .polaroid-frame {
    transform: translateY(-25px) scale(1.06);
    box-shadow: 0 25px 50px rgba(0,0,0,0.18), 0 10px 15px rgba(0,0,0,0.08);
}

#couple-hero.active .monogram-wrapper img {
    transform: scale(1);
    opacity: 0.9;
}

.wax-seal {
    z-index: 10 !important;
    mix-blend-mode: normal !important; /* Fix overlay/tint issue */
}

#couple-hero.active .wax-seal {
    transform: translateX(-50%) scale(1.1) !important;
    z-index: 20 !important;
}

/* Monogram Text Styles */
.monogram-text {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 140px;
    margin: 20px auto 35px;
    transition: 2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.monogram-wrapper.active .monogram-text,
.monogram-wrapper.revealed .monogram-text {
    opacity: 1;
}

.monogram-letters {
    font-size: 130px;
    display: inline-block;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.2));
    line-height: 1;
}

.letter-top {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, var(--monogram-l1-color) 0%, #faedcd 50%, var(--monogram-l1-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.letter-bottom {
    position: relative;
    left: -0.25em; /* Interlocked relative to the first letter */
    top: 15px;
    z-index: 1;
    background: linear-gradient(135deg, var(--monogram-l2-color) 0%, var(--monogram-l1-color) 50%, var(--monogram-l2-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.95;
}

@media (max-width: 600px) {
    .cd-item-mini span {
        font-size: 2.8rem !important;
    }
    .cd-sep {
        font-size: 2rem !important;
        margin-top: -5px;
    }
    .envelope-scene {
        min-height: 380px !important;
    }
    .monogram-text {
        width: 100%;
        height: 80px;
        margin-bottom: 25px;
    }
    .monogram-letters {
        font-size: 70px;
    }
    .letter-bottom {
        left: -0.2em;
        top: 5px;
    }
}

/* --- Luxury Envelope Reveal Animations --- */
.envelope-scene .polaroid-wrapper {
    opacity: 0;
    transform: translateY(-500px) rotate(-15deg) scale(0.6);
    transition: all 2.2s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform, opacity;
}

.envelope-scene.revealed .p-groom {
    opacity: 1;
    transform: translateY(0) rotate(-12deg) scale(1);
    transition-delay: 0.6s;
    animation: polaroidFloatGroom 6s infinite ease-in-out 3s;
}

.envelope-scene.revealed .p-bride {
    opacity: 1;
    transform: translateY(0) rotate(8deg) scale(1);
    transition-delay: 1.1s;
    animation: polaroidFloatBride 6s infinite ease-in-out 3.4s;
}

.envelope-scene .wax-seal {
    transform: translateX(-50%) scale(0);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: 0.2s;
}

.envelope-scene.revealed .wax-seal {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

@keyframes polaroidFloatGroom {
    0%, 100% { transform: translateY(0) rotate(-12deg); }
    50% { transform: translateY(-12px) rotate(-10deg); }
}

@keyframes polaroidFloatBride {
    0%, 100% { transform: translateY(0) rotate(8deg); }
    50% { transform: translateY(-15px) rotate(10deg); }
}

@keyframes sealPulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
    100% { transform: translateX(-50%) scale(1); }
}

.cd-item span {
    font-family: var(--font-display);
    font-size: 3rem;
    display: block;
    color: var(--secondary);
}

/* RSVP Section Enhancement */
.rsvp-wrapper {
    display: flex;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: 1000px;
    margin: 0 auto;
}

.rsvp-content {
    flex: 1;
    padding: 40px;
}

.rsvp-image {
    flex: 1;
    background: #fdfaf0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rsvp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rsvp-wrapper:hover .rsvp-image img {
    transform: scale(1.05);
}

.form-container {
    width: 100%;
    padding: 0;
    box-shadow: none;
}

@media (max-width: 992px) {
    .rsvp-wrapper {
        flex-direction: column-reverse;
    }
    .rsvp-image {
        height: 300px;
    }
    .rsvp-content {
        padding: 40px 20px;
    }
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

input, select, textarea {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    font-family: var(--font-sans);
    background: #f9f9f9;
}

.btn-primary {
    padding: 15px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #bc8a5f;
    box-shadow: 0 5px 15px rgba(212, 163, 115, 0.3);
}

/* Event Cards Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
}

.event-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(212, 163, 115, 0.06);
    position: relative;
}

.event-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 60px rgba(212, 163, 115, 0.15);
    border-color: rgba(212, 163, 115, 0.2);
}

.event-card.featured {
    border: 1.5px solid var(--secondary);
    background: linear-gradient(to bottom, #fff, #fefae0);
}

.event-icon {
    width: 70px;
    height: 70px;
    background: #fefae0;
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 5px 15px rgba(212, 163, 115, 0.1);
    transition: 0.3s;
}

.event-card:hover .event-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--secondary);
    color: #fff;
}

.event-card h3 {
    font-family: var(--font-display);
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: var(--secondary);
    font-weight: normal;
}

.event-date {
    color: #777;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-top: 15px;
}

.event-date::before {
    content: "";
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(212, 163, 115, 0.3), transparent);
}

.event-location {
    font-size: 1rem;
    margin-bottom: 25px;
    color: var(--text-muted);
    line-height: 1.6;
}

.event-schedule {
    margin-bottom: 25px;
    text-align: left;
    display: inline-block;
}

.event-schedule p {
    font-size: 0.9rem;
    margin: 5px 0;
}

.event-schedule span {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 10px;
}

.btn-sm {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid var(--secondary);
    color: var(--secondary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm.primary {
    background: var(--primary-color);
    color: white;
}

/* Audio Button */
.audio-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Guestbook Styles */
.messages-list {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 20px;
}


.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.message-author {
    font-weight: 600;
    color: var(--secondary);
    font-family: var(--font-display);
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.message-body {
    font-style: italic;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .audio-btn {
        bottom: 110px; /* Move up to avoid mobile-nav */
        width: 50px;
        height: 50px;
    }
}

/* Gift section */
.gift-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.gift-card {
    background: var(--primary);
    padding: 30px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 350px;
    width: 100%;
    border: 1px solid var(--accent);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    /* overflow: visible; allow tag to protrude */
}

.gift-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.gift-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.gift-card:hover::before {
    opacity: 0.1;
}



.qr-img {
    width: 220px;
    height: 220px;
    border-radius: 15px;
    border: 5px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.bank-info {
    text-align: center;
}

.bank-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.copy-acc-btn {
    margin-top: 15px;
    background: #e9f5ee;
    color: #206124;
    border: 1px solid #c8e6c9;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.copy-acc-btn:hover {
    background: #206124;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 97, 36, 0.2);
}

.copy-acc-btn.copied {
    background: #206124;
    color: #fff;
    border-color: #206124;
}

.account-name {
    color: var(--secondary);
    font-weight: 600;
}

.bank-info p {
    margin: 5px 0;
}

footer {
    background: var(--text-dark);
    color: white;
    padding: 20px;
}

/* --- RSVP Floating Toast --- */
.rsvp-toast {
    position: fixed;
    bottom: 30px;
    left: 20px;
    background: #fff;
    padding: 15px 25px 15px 15px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 9999;
    max-width: 320px;
    border-left: 4px solid var(--accent);
    transform: translateX(-150%);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}
.rsvp-toast.show {
    transform: translateX(0);
    opacity: 1;
}
.rsvp-toast .toast-close {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}
.rsvp-toast .toast-close:hover {
    color: #333;
}
.rsvp-toast .toast-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.rsvp-toast .toast-title {
    font-family: var(--font-fancy);
    font-weight: 700;
    color: #333;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}
.rsvp-toast .toast-desc {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

/* Dark Theme Support */
[data-theme="dark"] .rsvp-toast {
    background: #1a1a1a;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-left: 4px solid var(--accent);
}
[data-theme="dark"] .rsvp-toast .toast-title {
    color: #f0f0f0;
}
[data-theme="dark"] .rsvp-toast .toast-desc {
    color: #aaa;
}
[data-theme="dark"] .rsvp-toast .toast-close:hover {
    color: #fff;
}

@media (max-width: 600px) {
    .rsvp-toast {
        left: 10px !important;
        right: 10px !important;
        bottom: 90px !important; 
        max-width: none !important;
        width: auto !important;
        transform: translateX(-110%); /* Use smaller shift */
        visibility: hidden;
        opacity: 0;
    }
    .rsvp-toast.show {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Submission Toast Notification (Refined Glassmorphism) */
#submission-toast {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 10001;
    padding: 0; /* Let content handle padding */
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    border: 1px solid rgba(212, 163, 115, 0.3);
    max-width: 450px;
    min-width: 320px;
    overflow: hidden;
}

#submission-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px 25px;
}

.toast-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

#submission-toast.success .toast-icon { color: var(--accent); }
#submission-toast.error .toast-icon { color: #e63946; }

.toast-message {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-main);
    font-weight: 500;
}

/* Calendar Button inside Toast */
.toast-calendar-btn {
    margin-top: 12px;
    background: #2d6a4f; /* Elegant success green */
    color: #ffffff !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
    font-weight: 600;
}

.toast-calendar-btn:hover {
    background: #1b4332;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(45, 106, 79, 0.4);
}

.toast-calendar-btn i {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    #submission-toast {
        width: 90%;
        top: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
        min-width: 0;
    }
}

/* Gift / Registry Grid */
.gift-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
}

.gift-card {
    background: var(--primary);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.03);
    text-align: center;
    position: relative;
    max-width: 350px;
    flex: 1 1 300px;
}

.gift-tag {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: var(--primary);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    white-space: nowrap;
    z-index: 10;
    line-height: 1.2;
}

.qr-img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 15px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.bank-info {
    margin-top: 15px;
}

.bank-name {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.account-name {
    color: var(--text-muted);
}

/* Global Loader */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-accent, #fefae0);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#global-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color, #d4a373);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

/* Countdown Heading Enhancement */
.countdown-heading {
    text-align: center;
    font-family: 'Alex Brush', cursive !important;
    font-size: 2.8rem;
    color: var(--secondary, #d4a373);
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(212, 163, 115, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.countdown-heading::before,
.countdown-heading::after {
    content: "";
    height: 1px;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--secondary), transparent);
    display: inline-block;
}

@media (max-width: 768px) {
    .countdown-heading {
        font-size: 2.2rem;
    }
    .countdown-heading::before,
    .countdown-heading::after {
        width: 20px;
    }
}

#global-loader p {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 1.2rem;
    color: var(--text-main, #333);
    animation: pulse 2s infinite ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Gallery Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
    object-fit: contain;
}

@keyframes zoomIn {
    from {transform:scale(0.8)} 
    to {transform:scale(1)}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 100000;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
    z-index: 100000;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-btn.left {
    left: 20px;
}

.lightbox-btn.right {
    right: 20px;
}

/* --- SortableJS Ghost Class --- */
.sortable-ghost {
    opacity: 0.4;
    background: var(--accent) !important;
    border: 2px dashed #fff !important;
}

.drag-handle:hover {
    color: var(--accent) !important;
}

/* --- Advanced Reveal Animations --- */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: blur(5px);
    will-change: transform, opacity;
}

.reveal-up { transform: translateY(50px); }
.reveal-down { transform: translateY(-50px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal-zoom { transform: scale(0.8); }

.reveal.active {
    opacity: 1;
    transform: translate(0) scale(1) !important;
    filter: blur(0);
}

/* Staggered Delay for grid items */
.gallery-item:nth-child(2n) .reveal { transition-delay: 0.1s; }
.gallery-item:nth-child(3n) .reveal { transition-delay: 0.2s; }
.event-card:nth-child(2) { transition-delay: 0.1s; }
.event-card:nth-child(3) { transition-delay: 0.2s; }
/* --- Background Utilities --- */
.accent-bg {
    background-color: var(--bg-accent, #fefae0);
}

/* --- Guestbook / Messages Section --- */
.messages-list {
    display: grid;
    grid-template-columns: 1fr; /* 1 column only */
    gap: 20px;
    margin: 30px auto 0;
    max-width: 600px; /* Constrain width for 1-column layout on desktop */
    max-height: 450px; /* Hiển thị được ~2 tin nhắn */
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.messages-list.expanded {
    max-height: 10000px;
}

/* Gradient fade to indicate hidden content */
.messages-container-wrapper {
    position: relative;
}

.messages-container-wrapper:not(.is-expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 160px;
    background: linear-gradient(to top, var(--bg-accent, #ffffff) 20%, rgb(255 255 255 / 80%) 50%, transparent 100%);
    pointer-events: none;
    z-index: 5;
}

.message-card {
    background: #fdfbf7; /* Ivory background for a premium paper feel */
    border: 1px solid rgba(212, 163, 115, 0.15);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

/* Subtle Inner Border (Double border effect) */
.message-card::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(212, 163, 115, 0.1);
    border-radius: 14px;
    pointer-events: none;
}

.message-card::before {
    content: '"';
    position: absolute;
    top: -5px;
    right: 25px;
    font-size: 6rem;
    font-family: 'Playfair Display', serif;
    color: var(--secondary);
    opacity: 0.08;
    pointer-events: none;
    line-height: 1;
}

.message-card:hover {
    transform: translateY(-8px) scale(1.01);
    background: #ffffff;
    border-color: var(--secondary);
    box-shadow: 0 15px 40px rgba(212, 163, 115, 0.12);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.message-name {
    font-family: var(--font-display); /* Elegant script/serif font */
    font-weight: 600;
    color: var(--secondary);
    font-size: 1.4rem; /* Larger for display font */
    letter-spacing: 0.5px;
}

.message-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.message-text {
    font-style: italic;
    line-height: 1.7;
    color: var(--text-main);
    font-size: 1.05rem;
    letter-spacing: 0.2px;
    position: relative;
    z-index: 2;
}

.show-more-wishes-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 40px auto 0;
    padding: 14px 45px;
    background: linear-gradient(135deg, var(--secondary), var(--text-main));
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.85rem;
    box-shadow: 0 10px 30px rgba(45, 106, 79, 0.3), 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    animation: pulse-btn 2.5s infinite ease-in-out;
}

.show-more-wishes-btn::after {
    content: '↓';
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.show-more-wishes-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: linear-gradient(135deg, var(--text-main), var(--secondary));
    box-shadow: 0 15px 40px rgba(45, 106, 79, 0.4);
    letter-spacing: 2px;
}

.show-more-wishes-btn:hover::after {
    transform: translateY(3px);
}

.show-more-wishes-btn:active {
    transform: translateY(-2px) scale(0.98);
}

@keyframes pulse-btn {
    0% { transform: scale(1); box-shadow: 0 10px 30px rgba(45, 106, 79, 0.3); }
    50% { transform: scale(1.03); box-shadow: 0 15px 40px rgba(45, 106, 79, 0.5); }
    100% { transform: scale(1); box-shadow: 0 10px 30px rgba(45, 106, 79, 0.3); }
}

@media (max-width: 600px) {
    .messages-list {
        grid-template-columns: 1fr;
        max-height: 500px; /* Hiển thị rõ ~2 tin nhắn trên mobile */
    }
    
    #guestbook {
        padding-bottom: 120px !important;
    }
    
    .main-footer {
        padding-bottom: 90px;
    }
}

/* --- Footer Section --- */
.main-footer {
    padding: 40px 0;
    background: var(--text-main);
    color: #fff;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copy {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 10px;
    font-weight: 500;
}

.footer-made-with {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-heart {
    width: 16px;
    height: 16px;
    color: #e74c3c;
    fill: #e74c3c;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.2); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
}

/* --- Performance Pass: smoother scroll on shared/mobile hosting --- */
#story,
#events,
#gallery,
#map,
#rsvp,
#gift,
#guestbook {
    content-visibility: auto;
    contain-intrinsic-size: 900px;
}

.reveal {
    filter: none !important;
    transition-property: opacity, transform !important;
    transition-duration: 0.45s !important;
    transition-timing-function: ease-out !important;
    will-change: auto !important;
}

.reveal.active,
.reveal.revealed {
    filter: none !important;
}

.desktop-nav.scrolled,
.mobile-nav,
#submission-toast {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.frame-glow-ring .image-wrapper::before,
.envelope-scene.revealed .p-groom,
.envelope-scene.revealed .p-bride,
.footer-heart,
.show-more-wishes-btn {
    animation: none !important;
}

.polaroid-wrapper {
    will-change: auto !important;
}

@media (max-width: 768px) {
    .desktop-nav,
    .mobile-nav,
    .rsvp-toast,
    #submission-toast {
        box-shadow: 0 4px 14px rgba(0,0,0,0.08) !important;
    }

    .event-card,
    .message-card,
    .gift-card,
    .qr-card,
    .gallery-item {
        box-shadow: 0 6px 18px rgba(0,0,0,0.06) !important;
    }
}
