:root {
    /* Color Palette */
    --teal: #107c8b;
    --teal-dark: #235789;
    --teal-light: #0081A7;
    --cream: #EFEDE7;
    --white: #ffffff;
    --gold: #c9a962;
    --gold-light: #d4bc7d;
    --sage: #609e2d;
    --sage-light: #909464;
    --text-dark: #535337;

    /* Animation Variables - Elegant Easing Curves */
    --transition-smooth: 0.5s cubic-bezier(0.4, 0.0, 0.2, 1); /* Material Design deceleration */
    --transition-fast: 0.3s cubic-bezier(0.4, 0.0, 0.6, 1); /* Sharp ease-out */
    --transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Ease-out-quad */
    --transition-elegant: 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); /* Custom elegant curve */
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Subtle bounce */
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    height: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: 'Cormorant Garamond', serif;
    background-color: var(--cream);
    color: var(--text-dark);
    overflow-x: hidden;
    height: 100%;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sections */
section {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
}

/* ======================= */
/* HERO SECTION - ART NOUVEAU */
/* ======================= */
.hero {
    background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 40%, var(--teal-light) 100%);
    color: var(--white);
    position: relative;
    padding: 0;
}

/* Art Nouveau Frame Container */
.art-nouveau-frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Main ornate border SVG */
.hero-border {
    position: absolute;
    inset: 15px;
    border: 2px solid var(--gold);
    opacity: 0.8;
}

.hero-border::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid var(--gold-light);
    opacity: 0.5;
}

/* Corner Flourishes */
.corner-flourish {
    position: absolute;
    width: clamp(80px, 18vw, 180px);
    height: clamp(80px, 18vw, 180px);
    z-index: 2;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.corner-flourish.top-left { top: 10px; left: 10px; }
.corner-flourish.top-right { top: 10px; right: 10px; transform: scaleX(-1) translateZ(0); }
.corner-flourish.bottom-left { bottom: 10px; left: 10px; transform: scaleY(-1) translateZ(0); }
.corner-flourish.bottom-right { bottom: 10px; right: 10px; transform: scale(-1, -1) translateZ(0); }

/* Side Botanical Elements */
.side-botanical {
    position: absolute;
    width: clamp(40px, 8vw, 100px);
    height: clamp(150px, 35vh, 300px);
    z-index: 2;
}

.side-botanical.left { left: 15px; top: 50%; transform: translateY(-50%); }
.side-botanical.right { right: 15px; top: 50%; transform: translateY(-50%) scaleX(-1); }

/* Top and Bottom Decorative Arches */
.decorative-arch {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(200px, 50vw, 400px);
    height: clamp(40px, 8vh, 80px);
    z-index: 2;
}

.decorative-arch.top { top: 15px; }
.decorative-arch.bottom { bottom: 15px; transform: translateX(-50%) scaleY(-1); }

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: clamp(60px, 12vh, 120px) clamp(20px, 5vw, 60px);
}

/* Simple circle */
.hero-medallion {
    width: clamp(120px, 25vw, 200px);
    height: clamp(120px, 25vw, 200px);
    margin-bottom: clamp(15px, 3vh, 30px);
    opacity: 0;
    animation: fadeInScale 1.4s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s forwards;
    transition: transform var(--transition-elegant);
    will-change: transform;
    transform: translateZ(0); /* Force GPU layer */
}

.hero-medallion:hover {
    transform: scale(1.05) translateZ(0);
}

.hero-names {
    text-align: center;
}

.hero-names h1 {
    font-family: 'Italiana', serif;
    font-size: clamp(2.2rem, 8vw, 5rem);
    font-weight: 400;
    letter-spacing: clamp(0.08em, 0.12em, 0.15em);
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.7s forwards;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-names .ampersand {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--gold);
    display: block;
    margin: clamp(5px, 1.5vh, 15px) 0;
    opacity: 0;
    animation: fadeInUp 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) 1s forwards;
}

.hero-names h1:last-of-type {
    animation-delay: 1.3s;
}

.hero-intro {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    font-style: italic;
    letter-spacing: 0.08em;
    margin-bottom: clamp(20px, 4vh, 35px);
    color: var(--cream);
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.5s forwards;
}

.hero-date {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.8rem, 2.5vw, 1.2rem);
    font-weight: 700;
    letter-spacing: clamp(0.15em, 0.25em, 0.3em);
    margin-top: clamp(15px, 3vh, 35px);
    color: var(--gold-light);
    opacity: 0;
    animation: fadeInUp 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) 1.7s forwards;
}

.hero-venue {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.9rem, 2.3vw, 1.05rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-top: clamp(10px, 2vh, 18px);
    color: var(--gold);
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.22, 0.61, 0.36, 1) 2s forwards;
}

/* Decorative line under names */
.hero-line {
    width: clamp(100px, 25vw, 200px);
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: clamp(15px, 2.5vh, 25px) auto;
    opacity: 0;
    animation: expandWidth 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 1.5s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: clamp(25px, 5vh, 50px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s cubic-bezier(0.22, 0.61, 0.36, 1) 2.3s forwards, bounce 2.5s infinite 3.2s;
    z-index: 10;
}

.scroll-indicator svg {
    width: clamp(20px, 4vw, 30px);
    height: clamp(20px, 4vw, 30px);
    stroke: var(--gold);
}

/* Hero Animations - Elegant Keyframes */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes expandWidth {
    0% {
        opacity: 0;
        width: 0;
        transform: scaleX(0);
    }
    100% {
        opacity: 1;
        width: clamp(100px, 25vw, 200px);
        transform: scaleX(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
        animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
    }
    40% {
        transform: translateX(-50%) translateY(-12px);
        animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }
    60% {
        transform: translateX(-50%) translateY(-6px);
    }
}

/* ======================= */
/* PAGE TRANSITION ANIMATIONS */
/* ======================= */
.fade-in-section {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1.2s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.55s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.65s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.75s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.85s; opacity: 1; transform: translateY(0); }

/* ======================= */
/* QUOTE SECTION */
/* ======================= */
.quote-section {
    background: var(--cream);
    position: relative;
    padding: clamp(40px, 8vh, 80px) clamp(20px, 5vw, 60px);
}

.quote-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' stroke='%231a5f5a' stroke-width='0.5' fill='none' opacity='0.08'/%3E%3Ccircle cx='50' cy='50' r='30' stroke='%231a5f5a' stroke-width='0.5' fill='none' opacity='0.05'/%3E%3C/svg%3E");
}

.deco-corner {
    position: absolute;
    width: clamp(50px, 10vw, 100px);
    height: clamp(50px, 10vw, 100px);
    opacity: 0.3;
}

.deco-corner.top-left { top: 20px; left: 20px; }
.deco-corner.top-right { top: 20px; right: 20px; transform: scaleX(-1); }
.deco-corner.bottom-left { bottom: 20px; left: 20px; transform: scaleY(-1); }
.deco-corner.bottom-right { bottom: 20px; right: 20px; transform: scale(-1, -1); }

.quote-content {
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.quote-mark {
    font-family: 'Cinzel', serif;
    font-size: clamp(4rem, 12vw, 8rem);
    color: var(--teal);
    opacity: 0.15;
    line-height: 0;
    position: absolute;
}

.quote-mark.opening {
    top: -10px;
    left: 0;
}

.quote-mark.closing {
    bottom: 0;
    right: 0;
}

.quote-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 3.5vw, 1.8rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.7;
    color: var(--teal-dark);
    margin-top: clamp(30px, 6vh, 50px);
}

.quote-author {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.8rem, 2vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-top: clamp(20px, 4vh, 35px);
}

.floral-divider {
    width: clamp(150px, 40vw, 200px);
    height: 40px;
    margin: clamp(20px, 4vh, 30px) auto 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 40' xmlns='http://www.w3.org/2000/svg'%3E%3C!-- Main flowing vine --%3E%3Cpath d='M0 20 Q50 5 100 20 Q150 35 200 20' stroke='%237a9e7e' stroke-width='1.5' fill='none'/%3E%3Cpath d='M10 20 Q52 10 100 20 Q148 30 190 20' stroke='%237a9e7e' stroke-width='0.8' fill='none' opacity='0.4'/%3E%3C!-- Left leaves --%3E%3Cpath d='M30 20 Q36 14 42 18 Q38 24 30 20' fill='%23a8c4ab' opacity='0.6'/%3E%3Cpath d='M28 22 Q32 28 38 26 Q34 21 28 22' fill='%23a8c4ab' opacity='0.5'/%3E%3Cpath d='M55 13 Q61 9 67 13 Q63 18 55 13' fill='%23a8c4ab' opacity='0.6'/%3E%3Cpath d='M53 15 Q57 20 63 18 Q59 14 53 15' fill='%23a8c4ab' opacity='0.5'/%3E%3C!-- Right leaves --%3E%3Cpath d='M145 27 Q151 23 157 27 Q153 32 145 27' fill='%23a8c4ab' opacity='0.6'/%3E%3Cpath d='M143 29 Q147 34 153 33 Q149 28 143 29' fill='%23a8c4ab' opacity='0.5'/%3E%3Cpath d='M170 22 Q176 18 182 22 Q178 27 170 22' fill='%23a8c4ab' opacity='0.6'/%3E%3Cpath d='M168 24 Q172 29 178 28 Q174 23 168 24' fill='%23a8c4ab' opacity='0.5'/%3E%3C!-- Center medallion flower --%3E%3Ccircle cx='100' cy='20' r='8' stroke='%23c9a962' stroke-width='1' fill='none' opacity='0.6'/%3E%3Ccircle cx='100' cy='20' r='5.5' fill='%23c9a962' opacity='0.7'/%3E%3Ccircle cx='100' cy='20' r='3' fill='%231a5f5a'/%3E%3C!-- Flower petals around center --%3E%3Cpath d='M100 12 Q103 16 100 19 Q97 16 100 12' fill='%237a9e7e' opacity='0.5'/%3E%3Cpath d='M100 28 Q103 24 100 21 Q97 24 100 28' fill='%237a9e7e' opacity='0.5'/%3E%3Cpath d='M92 20 Q96 23 99 20 Q96 17 92 20' fill='%237a9e7e' opacity='0.5'/%3E%3Cpath d='M108 20 Q104 23 101 20 Q104 17 108 20' fill='%237a9e7e' opacity='0.5'/%3E%3C!-- Small accent dots --%3E%3Ccircle cx='72' cy='15' r='1.5' fill='%23c9a962' opacity='0.5'/%3E%3Ccircle cx='128' cy='25' r='1.5' fill='%23c9a962' opacity='0.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* ======================= */
/* PARENTS SECTION */
/* ======================= */
.parents-section {
    background: linear-gradient(180deg, var(--white) 0%, var(--cream) 100%);
    position: relative;
    padding: clamp(40px, 8vh, 80px) clamp(20px, 5vw, 60px);
}

.parents-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' stroke='%231a5f5a' stroke-width='0.5' fill='none' opacity='0.08'/%3E%3Ccircle cx='50' cy='50' r='30' stroke='%231a5f5a' stroke-width='0.5' fill='none' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
}

.parents-deco-corner {
    position: absolute;
    width: clamp(50px, 10vw, 100px);
    height: clamp(50px, 10vw, 100px);
    opacity: 0.25;
}

.parents-deco-corner.top-left { top: 20px; left: 20px; }
.parents-deco-corner.top-right { top: 20px; right: 20px; transform: scaleX(-1); }
.parents-deco-corner.bottom-left { bottom: 20px; left: 20px; transform: scaleY(-1); }
.parents-deco-corner.bottom-right { bottom: 20px; right: 20px; transform: scale(-1, -1); }

.parents-content {
    text-align: center;
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.parents-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.7rem, 2vw, 1rem);
    letter-spacing: clamp(0.2em, 0.3em, 0.35em);
    text-transform: uppercase;
    line-height: 1.4;
    color: var(--teal);
    margin-bottom: clamp(35px, 7vh, 55px);
}

.parents-group {
    margin-bottom: clamp(35px, 6vh, 55px);
}

.parents-group:last-child {
    margin-bottom: 0;
}

.parent-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.05rem, 2.8vw, 1.2rem);
    font-style: italic;
    color: var(--sage);
    margin-bottom: clamp(12px, 2vh, 15px);
    letter-spacing: 0.1em;
}

.parent-names {
    font-family: 'Italiana', serif;
    font-size: clamp(1.5rem, 5vw, 2.3rem);
    color: var(--teal-dark);
    letter-spacing: 0.08em;
}

.art-nouveau-vine {
    width: 100%;
    max-width: clamp(200px, 50vw, 300px);
    height: clamp(50px, 10vh, 80px);
    margin: clamp(25px, 5vh, 40px) auto;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 80' xmlns='http://www.w3.org/2000/svg'%3E%3C!-- Main flowing vine --%3E%3Cpath d='M0 40 Q75 10 150 40 Q225 70 300 40' stroke='%237a9e7e' stroke-width='2' fill='none'/%3E%3Cpath d='M20 40 Q80 18 150 40 Q220 62 280 40' stroke='%237a9e7e' stroke-width='1' fill='none' opacity='0.4'/%3E%3C!-- Left leaves --%3E%3Cpath d='M50 40 Q58 28 66 36 Q60 46 50 40' fill='%23a8c4ab' opacity='0.6'/%3E%3Cpath d='M45 42 Q50 52 58 48 Q52 40 45 42' fill='%23a8c4ab' opacity='0.5'/%3E%3Cpath d='M85 28 Q93 20 101 26 Q95 34 85 28' fill='%23a8c4ab' opacity='0.6'/%3E%3Cpath d='M80 30 Q85 38 93 35 Q87 28 80 30' fill='%23a8c4ab' opacity='0.5'/%3E%3C!-- Right leaves --%3E%3Cpath d='M215 52 Q223 44 231 50 Q225 58 215 52' fill='%23a8c4ab' opacity='0.6'/%3E%3Cpath d='M210 50 Q215 60 223 57 Q217 50 210 50' fill='%23a8c4ab' opacity='0.5'/%3E%3Cpath d='M250 44 Q258 36 266 42 Q260 50 250 44' fill='%23a8c4ab' opacity='0.6'/%3E%3Cpath d='M245 46 Q250 54 258 52 Q252 45 245 46' fill='%23a8c4ab' opacity='0.5'/%3E%3C!-- Center medallion flower --%3E%3Ccircle cx='150' cy='40' r='12' stroke='%23c9a962' stroke-width='1.5' fill='none' opacity='0.6'/%3E%3Ccircle cx='150' cy='40' r='8' fill='%23c9a962' opacity='0.7'/%3E%3Ccircle cx='150' cy='40' r='4' fill='%231a5f5a'/%3E%3C!-- Flower petals around center --%3E%3Cpath d='M150 28 Q154 34 150 38 Q146 34 150 28' fill='%237a9e7e' opacity='0.5'/%3E%3Cpath d='M150 52 Q154 46 150 42 Q146 46 150 52' fill='%237a9e7e' opacity='0.5'/%3E%3Cpath d='M138 40 Q144 44 148 40 Q144 36 138 40' fill='%237a9e7e' opacity='0.5'/%3E%3Cpath d='M162 40 Q156 44 152 40 Q156 36 162 40' fill='%237a9e7e' opacity='0.5'/%3E%3C!-- Small accent dots --%3E%3Ccircle cx='110' cy='32' r='2' fill='%23c9a962' opacity='0.5'/%3E%3Ccircle cx='190' cy='48' r='2' fill='%23c9a962' opacity='0.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* ======================= */
/* RSVP SECTION */
/* ======================= */
.rsvp-section {
    background: linear-gradient(180deg, var(--cream) 0%, var(--white) 50%, var(--cream) 100%);
    position: relative;
    padding: clamp(30px, 6vh, 60px) clamp(15px, 4vw, 40px);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
}

.rsvp-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' stroke='%231a5f5a' stroke-width='0.5' fill='none' opacity='0.08'/%3E%3Ccircle cx='50' cy='50' r='30' stroke='%231a5f5a' stroke-width='0.5' fill='none' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.rsvp-deco-corner {
    position: absolute;
    width: clamp(50px, 10vw, 100px);
    height: clamp(50px, 10vw, 100px);
    opacity: 0.2;
    z-index: 1;
}

.rsvp-deco-corner.top-left { top: 20px; left: 20px; }
.rsvp-deco-corner.top-right { top: 20px; right: 20px; transform: scaleX(-1); }
.rsvp-deco-corner.bottom-left { bottom: 20px; left: 20px; transform: scaleY(-1); }
.rsvp-deco-corner.bottom-right { bottom: 20px; right: 20px; transform: scale(-1, -1); }

.rsvp-content {
    max-width: 480px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.rsvp-venue-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.05rem, 2.8vw, 1.25rem);
    font-style: italic;
    color: var(--teal);
    text-decoration: none;
    margin-bottom: clamp(20px, 4vh, 30px);
    padding: clamp(8px, 1.5vh, 12px) clamp(15px, 3vw, 25px);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-smooth);
    position: relative;
}

.rsvp-venue-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transition: transform var(--transition-smooth);
    will-change: transform;
}

.rsvp-venue-link:hover {
    color: var(--teal-dark);
    transform: translateY(-3px);
    text-shadow: 0 2px 8px rgba(26, 95, 90, 0.15);
}

.rsvp-venue-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.venue-icon {
    display: inline-flex;
    align-items: center;
    width: clamp(18px, 4vw, 22px);
    height: clamp(18px, 4vw, 22px);
    color: var(--gold);
    transition: all var(--transition-smooth);
    will-change: transform;
}

.rsvp-venue-link:hover .venue-icon {
    color: var(--gold-light);
    transform: scale(1.1);
}

.rsvp-title {
    font-family: 'Italiana', serif;
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    color: var(--teal-dark);
    letter-spacing: clamp(0.12em, 0.15em, 0.18em);
    line-height: 1.2;
    margin-bottom: clamp(12px, 2.5vh, 20px);
    transition: all var(--transition-smooth);
    cursor: default;
}

.rsvp-title:hover {
    color: var(--gold);
    text-shadow: 0 0 20px rgba(201, 169, 98, 0.4),
                 0 0 30px rgba(201, 169, 98, 0.3),
                 0 0 40px rgba(201, 169, 98, 0.2);
}

.rsvp-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.15rem, 3vw, 1.35rem);
    font-style: italic;
    color: var(--teal);
    line-height: 1.6;
    margin-bottom: clamp(25px, 5vh, 40px);
}

.rsvp-form {
    background: transparent;
    padding: clamp(20px, 4vh, 35px) clamp(18px, 4vw, 35px);
    border: 2px solid var(--gold);
    position: relative;
}

.rsvp-form::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid var(--gold);
    pointer-events: none;
    opacity: 0.3;
}

.form-group {
    margin-bottom: clamp(18px, 3.5vh, 25px);
    text-align: left;
}

.form-group label {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.7rem, 1.8vw, 0.8rem);
    letter-spacing: 0.12em;
    color: var(--teal-dark);
    display: block;
    margin-bottom: clamp(8px, 1.5vh, 10px);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: clamp(10px, 2vh, 12px) clamp(12px, 2vw, 15px);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--text-dark);
    transition: all var(--transition-fast);
    border-radius: 0;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

/* Invalid state styling - only for text inputs and textareas */
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: rgba(200, 80, 80, 0.5);
}

.form-group input:invalid:focus:not(:placeholder-shown),
.form-group textarea:invalid:focus:not(:placeholder-shown) {
    border-color: rgba(200, 80, 80, 0.7);
    box-shadow: 0 0 0 3px rgba(200, 80, 80, 0.1);
}

/* Select elements stay cream until user interacts and makes valid selection */
.form-group select {
    border-color: var(--sage-light);
}

.form-group select:focus {
    border-color: var(--teal);
}

/* Valid state styling */
.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown),
.form-group select:valid {
    border-color: var(--gold);
}

/* Focus visible for keyboard navigation */
.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.submit-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

.form-group textarea {
    min-height: 70px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(12px, 3vw, 18px);
}

.radio-group {
    display: flex;
    gap: clamp(15px, 4vw, 30px);
    margin-top: 5px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 20px;
    border: 1px solid var(--sage-light);
    border-radius: 8px;
    transition: all var(--transition-fast);
    background-color: transparent;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.radio-option:hover {
    border-color: var(--teal);
    background-color: rgba(26, 95, 90, 0.05);
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 4px 12px rgba(26, 95, 90, 0.1);
}

/* Selected state - background color change */
.radio-option:has(input:checked) {
    background-color: var(--teal);
    border-color: var(--teal);
}

.radio-option:has(input:checked) span {
    color: var(--white);
    font-weight: 500;
}

.radio-option input {
    display: none;
}

.radio-option span {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-dark);
}

/* Conditional fields - hidden by default */
.conditional-fields {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.4s ease;
    margin-top: 0;
}

.conditional-fields.show {
    max-height: 400px;
    opacity: 1;
    margin-top: clamp(15px, 3vh, 22px);
}

.submit-btn {
    width: 100%;
    padding: clamp(14px, 3vh, 18px) clamp(25px, 5vw, 40px);
    font-family: 'Cinzel', serif;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: var(--teal);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    margin-top: clamp(10px, 2vh, 15px);
    will-change: transform;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    background: var(--teal-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 95, 90, 0.35);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn:disabled:hover {
    background: var(--teal);
    box-shadow: none;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: clamp(30px, 6vh, 50px) clamp(20px, 4vw, 40px);
    animation: fadeInScale 0.5s ease-out;
}

.success-message.show {
    display: block;
}

.success-message h3 {
    font-family: 'Italiana', serif;
    font-size: clamp(1.6rem, 5vw, 2rem);
    color: var(--teal);
    margin-bottom: clamp(15px, 3vh, 20px);
    letter-spacing: 0.08em;
}

.success-message p {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--sage);
    line-height: 1.6;
}

/* Error Message */
.error-message {
    display: none;
    text-align: center;
    padding: clamp(12px, 2.5vh, 18px) clamp(15px, 3vw, 20px);
    margin-top: clamp(15px, 3vh, 20px);
    background-color: rgba(200, 80, 80, 0.08);
    border-left: 4px solid rgba(200, 80, 80, 0.6);
    border-radius: 4px;
    color: #b84040;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    line-height: 1.5;
    animation: slideIn 0.3s ease-out;
}

.error-message.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Guest Rows Container - Scrollable */
#guestRows {
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: clamp(18px, 3.5vh, 25px);
    padding-right: 5px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
#guestRows::-webkit-scrollbar {
    display: none;
}

/* Guest Row Styling */
.guest-row {
    padding: clamp(18px, 3.5vh, 25px);
    margin-bottom: clamp(18px, 3.5vh, 25px);
    border: 1px solid var(--sage-light);
    border-radius: 8px;
    background-color: transparent;
}

.guest-name {
    font-family: 'Cinzel', serif;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--teal);
    margin-bottom: clamp(15px, 2.5vh, 18px);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.guest-options {
    display: grid;
    gap: clamp(15px, 3vh, 18px);
}

/* Custom Dropdown Styling */
.form-group select {
    width: 100%;
    padding: clamp(10px, 2vh, 12px) clamp(12px, 2vw, 15px);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    border: 1px solid var(--sage-light);
    background: transparent;
    color: var(--text-dark);
    transition: all var(--transition-fast);
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a5f5a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.form-group select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

.form-group select:invalid {
    color: #999;
}

.form-group select option {
    color: var(--text-dark);
}

.form-group select option:first-child {
    color: #999;
}

/* Dietary field - hidden by default */
.dietary-group {
    display: none;
}

.dietary-group.show {
    display: block;
}

/* ======================= */
/* FOOTER */
/* ======================= */
.footer {
    background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 40%, var(--teal-light) 100%);
    color: var(--cream);
    text-align: center;
    padding: clamp(40px, 8vh, 60px) clamp(20px, 5vw, 40px);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.85rem, 2vw, 1rem);
    scroll-snap-align: start;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(15px, 3vh, 25px);
}

.footer-names {
    font-family: 'Italiana', serif;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin-bottom: clamp(5px, 1vh, 10px);
}

.footer-date {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.9rem, 2.2vw, 1.1rem);
    font-weight: 700;
    letter-spacing: clamp(0.15em, 0.2em, 0.25em);
    color: var(--gold-light);
    margin-bottom: clamp(20px, 4vh, 30px);
}

.footer-divider {
    width: clamp(150px, 40vw, 250px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.6;
    margin: clamp(10px, 2vh, 15px) 0;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vh, 12px);
    align-items: center;
}

.footer-address,
.footer-email {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    color: var(--cream);
    opacity: 0.9;
    line-height: 1.8;
}

.footer-email a {
    color: var(--gold-light);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.footer-email a:hover {
    color: var(--gold);
    border-bottom: 1px solid var(--gold);
    transform: translateY(-1px);
    text-shadow: 0 1px 4px rgba(201, 169, 98, 0.2);
}

/* ======================= */
/* RESPONSIVE ADJUSTMENTS */
/* ======================= */
@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row .form-group:first-child {
        margin-bottom: clamp(15px, 3vh, 22px);
    }

    .radio-group {
        gap: 12px;
    }
}

@media (max-height: 600px) {
    section {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero-medallion {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }

    .hero-names h1 {
        font-size: 2rem;
    }

    .hero-names .ampersand {
        font-size: 1.3rem;
        margin: 3px 0;
    }

    .hero-date {
        margin-top: 10px;
        font-size: 0.75rem;
    }

    .hero-line {
        margin: 10px auto;
    }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 20px;
    }

    .hero-medallion {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
    }

    .hero-names {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .hero-names h1 {
        font-size: 1.8rem;
    }

    .hero-names .ampersand {
        display: inline;
        margin: 0 10px;
        font-size: 1.5rem;
    }

    .hero-date {
        width: 100%;
        margin-top: 5px;
    }

    .hero-line {
        display: none;
    }

    .scroll-indicator {
        bottom: 10px;
    }
}
