/* ============================================================
           DESIGN SYSTEM — Midnight Lantern Luxury
        ============================================================ */
:root {
    --cream: #17101C;
    --cream-2: #211725;
    --terracotta: #D98A3B;
    --terra-dark: #A95622;
    --terra-light: #F0AD62;
    --gold: #E0A846;
    --gold-light: #FFD27C;
    --gold-pale: #4A321C;
    --burgundy: #2B1424;
    --text-dark: #FFF2DE;
    --text-mid: #E6C49E;
    --text-light: #B99573;
    --border: rgba(255, 205, 128, 0.2);
    --white: #241927;
    --shadow-warm: 0 22px 70px -12px rgba(15, 8, 18, 0.58);
    --shadow-gold: 0 0 34px rgba(224, 168, 70, 0.22);
}

body.light-theme {
    --cream: #FFF6EF;
    --cream-2: #F8E8DD;
    --terracotta: #B85940;
    --terra-dark: #8B3E28;
    --terra-light: #D4806A;
    --gold: #C9963E;
    --gold-light: #E8C07A;
    --gold-pale: #F1DDB6;
    --burgundy: #5C2233;
    --text-dark: #2E1810;
    --text-mid: #6B4535;
    --text-light: #9E7060;
    --border: #E8D2C4;
    --white: #FFFDF8;
    --shadow-warm: 0 20px 60px -10px rgba(92, 34, 51, 0.12);
    --shadow-gold: 0 4px 24px rgba(201, 150, 62, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at 50% 0%, rgba(224, 168, 70, 0.12), transparent 36rem),
        linear-gradient(180deg, #1B1221 0%, var(--cream) 44%, #251528 100%);
    color: var(--text-dark);
    font-family: 'Invitation Serif', Georgia, serif;
    overflow-x: hidden;
}

body.light-theme {
    background: var(--cream);
}

/* ============================================================
           TYPOGRAPHY & UTILITIES
        ============================================================ */
.shimmer-gold {
    background: linear-gradient(105deg, var(--terra-dark) 20%, var(--gold) 40%, var(--gold-light) 50%, var(--gold) 60%, var(--terra-dark) 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

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

.mt-4 {
    margin-top: 1rem
}

.mt-8 {
    margin-top: 2rem
}

.mb-4 {
    margin-bottom: 1rem
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.fade-in {
    animation: fadeIn 0.8s ease both;
}

/* ============================================================
           FLOATING OVERLAYS
        ============================================================ */
#lanterns-canvas,
#petals-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.5s ease;
}

#lanterns-canvas {
    mix-blend-mode: screen;
}

#lanterns-canvas.active {
    opacity: 0.88;
}

body.light-theme #lanterns-canvas {
    opacity: 0;
}

#petals-canvas.active {
    opacity: 0;
}

body.light-theme #petals-canvas.active {
    opacity: 1;
}

/* ============================================================
           SCROLL REVEAL
        ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

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

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.35s;
}

/* ============================================================
           ENTRY VIDEO GATE
        ============================================================ */
#entry-gate {
    position: fixed;
    inset: 0;
    background: #231215 url('intro-poster.jpg') center/cover no-repeat;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.8s ease;
    user-select: none;
    -webkit-user-select: none;
}

#entry-gate video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #231215 url('intro-poster.jpg') center/cover no-repeat;
}

#play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 2;
    background: linear-gradient(180deg, rgba(23, 8, 14, 0.18), rgba(23, 8, 14, 0.05) 52%, rgba(23, 8, 14, 0.34));
    transition: opacity 0.48s ease, transform 0.48s ease;
    padding: max(5.5rem, calc(env(safe-area-inset-top) + 4rem)) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
}

.recipient-card {
    position: relative;
    width: min(88vw, 570px);
    margin: 0;
    padding: clamp(1.55rem, 4.8vw, 2.6rem) clamp(1.15rem, 5vw, 3rem);
    text-align: center;
    color: #5C2233;
    background:
        linear-gradient(135deg, rgba(255, 253, 248, 0.93), rgba(248, 232, 221, 0.88)),
        repeating-linear-gradient(0deg, rgba(139, 62, 40, 0.025) 0 1px, transparent 1px 4px);
    border: 1px solid rgba(232, 192, 122, 0.9);
    border-radius: 1.1rem;
    box-shadow:
        0 24px 64px rgba(32, 10, 18, 0.3),
        0 0 0 4px rgba(255, 250, 240, 0.22),
        inset 0 0 0 1px rgba(139, 62, 40, 0.12),
        inset 0 0 42px rgba(201, 150, 62, 0.11);
    overflow: hidden;
    animation: recipientCardIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.recipient-card::before,
.recipient-card::after {
    content: '\2726';
    position: absolute;
    top: 50%;
    color: rgba(169, 86, 34, 0.56);
    font-size: 0.74rem;
    transform: translateY(-50%);
}

.recipient-card::before {
    left: 1rem;
}

.recipient-card::after {
    right: 1rem;
}

.recipient-kicker {
    font: 600 clamp(0.66rem, 2.2vw, 0.78rem)/1.3 'Invitation Serif', Georgia, serif;
    letter-spacing: 0.31em;
    text-transform: uppercase;
    color: #8B3E28;
}

.recipient-flourish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.72rem;
    margin: 0.7rem auto 0.48rem;
    color: #C9963E;
    font-size: 0.72rem;
}

.recipient-flourish::before,
.recipient-flourish::after {
    content: '';
    width: clamp(2.5rem, 12vw, 5rem);
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor);
}

.recipient-flourish::after {
    transform: scaleX(-1);
}

.recipient-dear {
    font: italic 500 clamp(0.88rem, 2.5vw, 1.04rem)/1.3 'Invitation Serif', Georgia, serif;
    color: #8B6A58;
}

.recipient-name {
    display: block;
    max-width: 100%;
    margin: 0.16rem auto 0.4rem;
    font-family: 'Invitation Serif', 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(2.3rem, 8vw, 4.4rem);
    line-height: 1.05;
    color: #A95622;
    overflow-wrap: anywhere;
    text-wrap: balance;
    text-shadow:
        0 1px 0 #FFF9EC,
        0 2px 1px rgba(91, 34, 51, 0.2),
        0 -1px 0 rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 5px rgba(201, 150, 62, 0.17));
}

.recipient-name.is-long {
    font-size: clamp(1.85rem, 6.6vw, 3.65rem);
}

.recipient-name.is-very-long {
    font-size: clamp(1.5rem, 5.5vw, 2.9rem);
    line-height: 1.08;
}

.recipient-message {
    font: 500 clamp(0.84rem, 2.4vw, 1rem)/1.45 'Invitation Serif', Georgia, serif;
    color: #6B4535;
    letter-spacing: 0.035em;
}

.recipient-couple {
    display: block;
    margin-top: 0.12rem;
    font-style: italic;
    color: #8B3E28;
}

.open-invitation {
    position: absolute;
    left: 50%;
    bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1rem));
    min-height: 48px;
    margin: 0;
    padding: 0.82rem 1.45rem;
    border: 1px solid #E8C07A;
    border-radius: 999px;
    color: #FFF7E8;
    background: rgba(91, 34, 51, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(255, 247, 232, 0.12);
    font: 600 clamp(0.84rem, 3.2vw, 1rem)/1 'Invitation Serif', Georgia, serif;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    cursor: pointer;
    transform: translateX(-50%);
    white-space: nowrap;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.open-invitation:hover {
    transform: translateX(-50%) translateY(-2px);
    background: #6F253A;
}

.open-invitation:focus-visible {
    outline: 3px solid #FFF7E8;
    outline-offset: 4px;
}

#entry-gate.is-opening .recipient-card {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
}

@keyframes recipientCardIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 520px) {
    #play-overlay {
        padding: max(4.7rem, calc(env(safe-area-inset-top) + 3.5rem)) 0.9rem max(1rem, env(safe-area-inset-bottom));
    }

    .recipient-card {
        width: min(90vw, 370px);
        padding: 0.95rem 1rem 1rem;
        border-radius: 0.9rem;
    }

    .recipient-card::before,
    .recipient-card::after {
        display: none;
    }

    .recipient-kicker {
        font-size: 0.61rem;
        letter-spacing: 0.22em;
    }

    .recipient-flourish {
        margin: 0.42rem auto 0.28rem;
    }

    .recipient-dear {
        font-size: 0.8rem;
    }

    .recipient-name {
        margin: 0.08rem auto 0.2rem;
        font-size: clamp(1.8rem, 8.8vw, 2.75rem);
    }

    .recipient-name.is-long {
        font-size: clamp(1.55rem, 7.4vw, 2.3rem);
    }

    .recipient-name.is-very-long {
        font-size: clamp(1.32rem, 6.3vw, 1.95rem);
    }

    .recipient-message {
        font-size: 0.77rem;
        line-height: 1.28;
    }

    .open-invitation {
        bottom: max(1.2rem, calc(env(safe-area-inset-bottom) + 0.7rem));
        min-height: 44px;
        padding: 0.72rem 1.2rem;
        font-size: 0.75rem;
    }
}

@media (min-width: 900px) {
    .recipient-card {
        width: min(44vw, 610px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .recipient-card {
        animation: none;
    }

    #play-overlay,
    .open-invitation,
    .recipient-card {
        transition-duration: 0.01ms;
    }
}

#play-overlay.hidden,
#entry-gate.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
           AUDIO TOGGLE
        ============================================================ */
#audio-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--terracotta);
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    box-shadow: 0 4px 20px rgba(184, 89, 64, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(184, 89, 64, 0.5);
}

#audio-btn svg {
    width: 22px;
    height: 22px;
}

#theme-btn {
    position: fixed;
    bottom: 5.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(26, 17, 24, 0.9);
    border: 2px solid rgba(255, 210, 124, 0.35);
    color: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

body.light-theme #theme-btn {
    background: var(--white);
    color: var(--terracotta);
    border-color: rgba(184, 89, 64, 0.22);
    box-shadow: 0 4px 20px rgba(184, 89, 64, 0.22);
}

#theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(224, 168, 70, 0.35);
}

body.light-theme #theme-btn:hover {
    box-shadow: 0 6px 24px rgba(184, 89, 64, 0.28);
}

#theme-btn svg {
    width: 22px;
    height: 22px;
}

/* ============================================================
           ORNAMENTAL DIVIDER & SECTION LABEL
        ============================================================ */
.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0 auto;
}

.ornament-line {
    height: 1px;
    width: 80px;
    background: linear-gradient(to right, transparent, var(--gold));
}

.ornament-line.rev {
    background: linear-gradient(to left, transparent, var(--gold));
}

.ornament svg {
    color: var(--gold);
    flex-shrink: 0;
}

.section-label {
    font-family: 'Invitation Serif', serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 0.75rem;
}

.section-heading {
    font-family: 'Invitation Serif', 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(3.5rem, 10vw, 5.5rem);
    line-height: 1.1;
}

/* ============================================================
           MAIN CONTENT & HERO
        ============================================================ */
#main-content {
    display: none;
}

#main-content.visible {
    display: block;
}

#hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 18%, rgba(217, 138, 59, 0.2), transparent 24rem),
        linear-gradient(180deg, #1A1120 0%, var(--cream-2) 100%);
    padding: 3rem 1rem;
}

body.light-theme #hero {
    background: var(--cream-2);
}

#hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0.12;
    z-index: 0;
    filter: brightness(0.62) saturate(0.9);
}

body.light-theme #hero-bg-video {
    opacity: 0.22;
    filter: none;
}

.hero-frame {
    position: absolute;
    inset: 1.25rem;
    pointer-events: none;
    z-index: 2;
}

.hero-frame::before,
.hero-frame::after,
.hero-frame span::before,
.hero-frame span::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-color: var(--gold);
    border-style: solid;
    opacity: 0.5;
}

.hero-frame::before {
    top: 0;
    left: 0;
    border-width: 1px 0 0 1px;
}

.hero-frame::after {
    top: 0;
    right: 0;
    border-width: 1px 1px 0 0;
}

.hero-frame span::before {
    bottom: 0;
    left: 0;
    border-width: 0 0 1px 1px;
}

.hero-frame span::after {
    bottom: 0;
    right: 0;
    border-width: 0 1px 1px 0;
}

.hero-card {
    position: relative;
    z-index: 3;
    max-width: 540px;
    width: 100%;
    isolation: isolate;
    background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(33, 23, 37, .40) 45%, rgba(33, 23, 37, .48));
    backdrop-filter: blur(30px) saturate(175%);
    -webkit-backdrop-filter: blur(30px) saturate(175%);
    border: 1px solid rgba(255, 237, 204, .52);
    border-radius: 2rem;
    padding: clamp(2.5rem, 6vw, 3.5rem) clamp(1.5rem, 5vw, 3rem);
    box-shadow: 0 28px 75px rgba(17, 8, 25, .34), inset 0 1px 1px rgba(255, 255, 255, .72), inset 0 -1px 1px rgba(255, 255, 255, .2), 0 0 0 1px rgba(255, 224, 170, .16);
    text-align: center;
    animation: heroCardIn 1.6s ease-out both;
    animation-delay: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body:not(.light-theme) .hero-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, rgba(255, 196, 100, 0.2), transparent 42%);
    pointer-events: none;
    z-index: -1;
    filter: blur(14px);
}

body.light-theme .hero-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, .57), rgba(255, 245, 237, .28) 48%, rgba(249, 218, 207, .35));
    border-color: rgba(255, 255, 255, .88);
    box-shadow: 0 28px 70px rgba(104, 61, 55, .17), inset 0 1px 1px rgba(255, 255, 255, .95), inset 0 -1px 1px rgba(255, 255, 255, .45);
}

.hero-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--glass-x, 50%) var(--glass-y, 15%), rgba(255, 255, 255, .36), transparent 34%), linear-gradient(125deg, rgba(255, 255, 255, .16), transparent 42%);
    opacity: .75;
    transition: opacity .3s ease;
}

.hero-card> :not(.card-corner) {
    position: relative;
    z-index: 1;
}

.hero-card>.card-corner {
    z-index: 2;
}

@keyframes heroCardIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ganesh-icon {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 0.75rem;
    animation: floatIcon 4s ease-in-out infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.blessings-text {
    font-family: 'Invitation Serif', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-mid);
    line-height: 1.5;
    margin-bottom: 1.75rem;
    padding: 0 1rem;
}

.couple-block {
    width: 100%;
    margin-bottom: 0.5rem;
}

.couple-name {
    font-family: 'Invitation Serif', 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(3.5rem, 11vw, 5.2rem);
    line-height: 1.1;
    display: block;
    letter-spacing: 0.02em;
    padding: 0.2rem 0;
    font-weight: normal;
}

.family-line {
    font-family: 'Invitation Serif', serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
    margin-top: 0.5rem;
}

.ampersand-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    width: 100%;
}

.ampersand-line {
    height: 1px;
    width: 40px;
    background: var(--border);
}

.ampersand {
    font-family: 'Invitation Serif', 'Cormorant Garamond', Georgia, serif;
    font-size: 2.2rem;
    color: var(--gold);
    line-height: 1;
}

.card-corner {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: rgba(201, 150, 62, 0.35);
    border-style: solid;
}

.card-corner.tl {
    top: 16px;
    left: 16px;
    border-width: 1px 0 0 1px;
    border-radius: 4px 0 0 0;
}

.card-corner.tr {
    top: 16px;
    right: 16px;
    border-width: 1px 1px 0 0;
    border-radius: 0 4px 0 0;
}

.card-corner.bl {
    bottom: 16px;
    left: 16px;
    border-width: 0 0 1px 1px;
    border-radius: 0 0 0 4px;
}

.card-corner.br {
    bottom: 16px;
    right: 16px;
    border-width: 0 1px 1px 0;
    border-radius: 0 0 4px 0;
}

.scroll-cue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    opacity: 0.7;
    animation: scrollBounce 2s ease infinite;
}

.scroll-cue p {
    font-family: 'Invitation Serif', serif;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-mid);
}

.scroll-cue svg {
    color: var(--text-mid);
    width: 18px;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ============================================================
           3 HEARTS SCRATCH TO REVEAL SECTION
        ============================================================ */
#scratch-reveal-section {
    background: var(--cream);
    padding: 5rem 1.5rem;
    text-align: center;
}

.hearts-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 440px;
    margin: 2rem auto 0;
}

.heart-container {
    position: relative;
    width: 30vw;
    max-width: 120px;
    aspect-ratio: 1.1 / 1;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 185' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100 185 C100 185, 200 125, 200 70 C200 23, 157 -10, 121.5 15 C100 31, 100 31, 100 31 C100 31, 100 31, 78.5 15 C43 -10, 0 23, 0 70 C0 125, 100 185, 100 185 Z' fill='black'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 185' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100 185 C100 185, 200 125, 200 70 C200 23, 157 -10, 121.5 15 C100 31, 100 31, 100 31 C100 31, 100 31, 78.5 15 C43 -10, 0 23, 0 70 C0 125, 100 185, 100 185 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;

    background: var(--cream-2);
    cursor: crosshair;
    touch-action: none;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hearts-row.unlocked .heart-container {
    animation: gentle-heart-beat 3s infinite ease-in-out;
    background: var(--white);
    box-shadow: 0 0 20px rgba(184, 89, 64, 0.15);
}

.hearts-row.unlocked .heart-container:nth-child(2) {
    animation-delay: 0.3s;
}

.hearts-row.unlocked .heart-container:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes gentle-heart-beat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.hidden-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    z-index: 1;
}

.hidden-content .label {
    font-family: 'Invitation Serif', serif;
    font-weight: 600;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.hidden-content .value {
    font-family: 'Invitation Serif', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--gold-light);
    line-height: 1;
    text-shadow: 0 0 18px rgba(224, 168, 70, 0.28);
}

body.light-theme .hidden-content .value {
    color: var(--terracotta);
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    transition: opacity 1s ease;
}

.surprise-message {
    font-family: 'Invitation Serif', 'Cormorant Garamond', Georgia, serif;
    font-size: 3rem;
    color: var(--terracotta);
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(15px);
    transition: all 1.2s ease;
}

.surprise-message.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Countdown Timer (Revealed after scratch) --- */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(15px);
    transition: all 1.2s ease;
    pointer-events: none;
    flex-wrap: wrap;
}

body.light-theme .cd-item {
    background: var(--white);
}

.countdown-container.revealed {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cd-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(36, 25, 39, 0.92);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.8rem 1rem;
    min-width: 70px;
    box-shadow: var(--shadow-warm);
}

.cd-item span {
    font-family: 'Invitation Serif', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--terracotta);
    line-height: 1;
}

.cd-item small {
    font-family: 'Invitation Serif', serif;
    font-weight: 600;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--text-light);
    text-transform: uppercase;
    margin-top: 0.3rem;
}

/* ============================================================
           PHOTO / VIDEO SECTION
        ============================================================ */
#memories-section {
    padding: 5rem 1.5rem;
    background: var(--cream-2);
}

.memories-frame {
    max-width: 420px;
    margin: 3rem auto 0;
    position: relative;
}

.memories-frame::before {
    content: '';
    position: absolute;
    inset: -12px;
    border: 1px solid rgba(201, 150, 62, 0.35);
    border-radius: 2rem;
    transform: rotate(2deg);
}

.memories-frame::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1px solid rgba(201, 150, 62, 0.2);
    border-radius: 1.8rem;
    transform: rotate(-1deg);
}

.memories-inner {
    position: relative;
    z-index: 1;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-warm);
    background: var(--cream);
    aspect-ratio: 1080/1600;
}

.memories-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.memory-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
    visibility: hidden;
}

.memory-slide.is-active {
    opacity: 1;
    z-index: 2;
    visibility: visible;
}

.memory-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.memory-slide:first-child:last-child {
    opacity: 1;
    animation: none;
}

.memory-empty {
    height: 100%;
    display: grid;
    place-items: center;
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
    font-family: 'Invitation Serif', serif;
    font-size: 1.25rem;
    font-style: italic;
    background: rgba(255, 255, 255, 0.45);
}

/* ============================================================
           EVENTS & WARDROBE — V2
        ============================================================ */
@font-face {
    font-family: 'Invitation Serif';
    src: url('assets/fonts/invitation-serif.woff2') format('woff2');
    font-display: swap;
}

#events-section {
    padding: 5rem 1.5rem 4rem;
    background-color: #f6eddf;
}

body:not(.light-theme) #events-section {
    background-color: #211a20;
}

.event-list,
.wardrobe-list {
    display: grid;
    gap: clamp(2.25rem, 6vw, 4.5rem);
    justify-items: center;
}

.invitation-event-card {
    --event-ink: #6d3437;
    --event-gold: #a57a38;
    container-type: inline-size;
    position: relative;
    width: min(100%, 490px);
    aspect-ratio: 920 / 1240;
    overflow: hidden;
    background: #f3eadf;
    box-shadow: 0 28px 55px rgba(12, 6, 16, .36), 0 3px 12px rgba(12, 6, 16, .2);
    isolation: isolate;
}

.invitation-event-card>img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: block;
    pointer-events: none;
}

.event-card-copy {
    position: absolute;
    z-index: 1;
    inset: 18% 18% 23%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--event-ink);
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
}

.event-date {
    margin: 0;
    font: clamp(.85rem, 3.7cqw, 1.35rem)/1.25 Georgia, serif;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.event-card-copy h3 {
    margin: 4.5cqw 0 3.2cqw;
    font: 400 clamp(2.3rem, 10cqw, 4.5rem)/.9 'Invitation Serif', Georgia, serif;
    letter-spacing: -.025em;
}

.event-ornament {
    display: flex;
    width: min(35cqw, 180px);
    align-items: center;
    gap: 10px;
    margin: .4cqw 0 4.5cqw;
    color: var(--event-gold);
    font-size: clamp(.45rem, 1.8cqw, .75rem);
}

.event-ornament::before,
.event-ornament::after {
    width: 100%;
    height: 1px;
    content: '';
    background: currentColor;
    opacity: .75;
}

.event-time {
    margin: 1cqw 0 0;
    font: 400 clamp(1.55rem, 6.3cqw, 2.7rem)/1 'Invitation Serif', Georgia, serif;
}

.event-time-label {
    margin: 2.8cqw 0 0;
    font: 700 clamp(.62rem, 2.5cqw, .9rem)/1.2 Georgia, serif;
    letter-spacing: .19em;
    text-transform: uppercase;
}

.invitation-event-card--mehendi {
    --event-ink: #24452f;
    --event-gold: #9d7738;
}

.invitation-event-card--haldi {
    --event-ink: #745223;
    --event-gold: #aa7724;
}

.invitation-event-card--sangeet {
    --event-ink: #783e3f;
    --event-gold: #a37b42;
}

.invitation-event-card--wedding {
    --event-ink: #74242b;
    --event-gold: #a77c3d;
}

.invitation-event-card--reception {
    --event-ink: #783e3f;
    --event-gold: #a37b42;
}

#wardrobe-section {
    padding: 5rem 1.5rem 6rem;
    background-color: #edd4c8;
}

body:not(.light-theme) #wardrobe-section {
    background-color: #251b25;
}

.wardrobe-card {
    --wardrobe-ink: #5c2831;
    container-type: inline-size;
    position: relative;
    width: min(100%, 490px);
    aspect-ratio: 1122 / 1402;
    overflow: hidden;
    background: #f5ede2;
    box-shadow: 0 28px 55px rgba(12, 6, 16, .36), 0 3px 12px rgba(12, 6, 16, .2);
    isolation: isolate;
}

.wardrobe-card>img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wardrobe-card-copy {
    position: absolute;
    z-index: 1;
    top: 27%;
    left: 8%;
    right: 8%;
    bottom: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: var(--wardrobe-ink);
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}

.wardrobe-card-copy p,
.wardrobe-card-copy h3 {
    margin: 0;
}

.wardrobe-day {
    font: 700 clamp(.62rem, 2.4cqw, .92rem)/1.2 'Invitation Serif', Georgia, serif;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.wardrobe-card-copy h3 {
    margin-top: 1.4cqw;
    font: 400 clamp(1.6rem, 7cqw, 3rem)/.95 'Invitation Serif', Georgia, serif;
}

.wardrobe-theme {
    margin-top: 1.1cqw !important;
    font: italic clamp(.72rem, 2.4cqw, 1rem)/1.25 Georgia, serif;
    letter-spacing: .05em;
    opacity: .9;
}

.wardrobe-divider {
    display: flex;
    width: min(28cqw, 130px);
    align-items: center;
    gap: 8px;
    margin: 1.3cqw 0;
    font-size: clamp(.4rem, 1.4cqw, .65rem);
    opacity: .72;
}

.wardrobe-divider::before,
.wardrobe-divider::after {
    width: 100%;
    height: 1px;
    content: '';
    background: currentColor;
}

.wardrobe-time-text {
    margin-top: .8cqw !important;
    font: 700 clamp(.76rem, 2.6cqw, 1.05rem)/1.2 'Invitation Serif', Georgia, serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.wardrobe-venue-text {
    margin-top: .7cqw !important;
    font: italic clamp(.68rem, 2.2cqw, .88rem)/1.2 Georgia, serif;
    opacity: .88;
}

.wardrobe-card .event-map-link {
    margin-top: 2cqw;
    display: inline-flex;
    align-items: center;
    gap: .35em;
    padding: .4em 1.15em;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: inherit;
    font: 700 clamp(.54rem, 2.1cqw, .75rem)/1.2 Georgia, serif;
    letter-spacing: .1em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
    transition: all .2s ease;
}

.wardrobe-card .event-map-link:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.wardrobe-card .event-map-link svg {
    width: 1em;
    height: 1em;
}

.wardrobe-note {
    max-width: 38ch;
    font: clamp(.75rem, 2.65cqw, 1rem)/1.42 Georgia, serif;
    text-wrap: pretty;
}

.wardrobe-code {
    margin-top: 2cqw !important;
    font: clamp(.68rem, 2.3cqw, .9rem)/1.3 Georgia, serif;
}

.wardrobe-code>span:first-child {
    display: block;
    margin-bottom: .6cqw;
    font: 700 .8em/1.2 'Invitation Serif', Georgia, serif;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.wardrobe-card--mehendi {
    --wardrobe-ink: #244a31;
}

.wardrobe-card--haldi {
    --wardrobe-ink: #765019;
}

.wardrobe-card--sangeet {
    --wardrobe-ink: #172348;
}

.wardrobe-card--wedding,
.wardrobe-card--reception {
    --wardrobe-ink: #7d1e37;
}

@media (max-width: 520px) {
    .wardrobe-card-copy {
        top: 27.5%;
        left: 6%;
        right: 6%;
        bottom: auto;
    }

    .wardrobe-card-copy h3 {
        font-size: clamp(1.4rem, 6.6cqw, 2.4rem);
        margin-top: 1cqw;
    }

    .wardrobe-theme {
        margin-top: .8cqw !important;
    }

    .wardrobe-divider {
        margin: 1cqw 0;
    }

    .wardrobe-time-text {
        margin-top: .7cqw !important;
    }

    .wardrobe-note {
        font-size: clamp(.64rem, 2.55cqw, .86rem);
    }
}

@media (max-width: 520px) {

    #events-section,
    #wardrobe-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .event-list,
    .wardrobe-list {
        gap: 2.25rem;
    }

    .event-card-copy {
        inset: 17% 16% 22%;
    }
}

/* ============================================================
           RSVP SECTION
        ============================================================ */
#rsvp-section {
    padding: 5rem 1.5rem;
    background: var(--cream-2);
}

.rsvp-form {
    max-width: 520px;
    margin: 0 auto;
}

.form-card {
    background: rgba(36, 25, 39, 0.92);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 18px 48px rgba(15, 8, 18, 0.28);
    transition: opacity 0.3s ease;
}

body.light-theme .form-card {
    background: var(--white);
    box-shadow: 0 4px 24px rgba(92, 34, 51, 0.05);
}

.form-card-title {
    font-family: 'Invitation Serif', serif;
    font-style: italic;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--terracotta);
    margin-bottom: 0.35rem;
}

.form-card-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.field-label {
    font-family: 'Invitation Serif', serif;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.4rem;
}

.field-input {
    width: 100%;
    background: rgba(23, 16, 28, 0.72);
    border: 0;
    border-bottom: 1.5px solid var(--border);
    padding: 0.6rem 0.25rem;
    font-family: 'Invitation Serif', serif;
    font-size: 1.05rem;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s ease;
}

body.light-theme .field-input {
    background: var(--cream);
}

.field-input:focus {
    border-color: var(--terracotta);
}

.field-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--terracotta) 50%), linear-gradient(135deg, var(--terracotta) 50%, transparent 50%);
    background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.25rem;
    cursor: pointer;
}

.field-group {
    margin-bottom: 1.25rem;
}

.checkbox-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border: 1.5px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Invitation Serif', serif;
    font-size: 1.1rem;
    color: var(--text-mid);
    text-align: left;
}

.checkbox-pill input[type="checkbox"] {
    display: none;
}

.checkbox-pill:has(input:checked) {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: white;
}

.checkbox-pill:has(input:checked) small {
    color: rgba(255, 255, 255, 0.85);
}

.checkbox-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.circle-select {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.circle-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.circle-opt input {
    display: none;
}

.circle-face {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(23, 16, 28, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Invitation Serif', 'Cormorant Garamond', Georgia, serif;
    font-size: 1.8rem;
    color: var(--terracotta);
    transition: all 0.25s ease;
}

body.light-theme .circle-face {
    background: var(--cream);
}

.circle-opt:has(input:checked) .circle-face {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: white;
    box-shadow: 0 4px 16px rgba(184, 89, 64, 0.35);
}

.circle-opt-label {
    font-family: 'Invitation Serif', serif;
    font-weight: 600;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-light);
}

.text-area {
    width: 100%;
    background: rgba(23, 16, 28, 0.72);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    font-family: 'Invitation Serif', serif;
    font-size: 1rem;
    color: var(--text-dark);
    outline: none;
    resize: none;
    transition: border-color 0.2s ease;
    line-height: 1.5;
}

body.light-theme .text-area {
    background: var(--cream);
}

.text-area:focus {
    border-color: var(--terracotta);
}

.submit-btn {
    width: 100%;
    background: var(--terracotta);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 1.1rem;
    font-family: 'Invitation Serif', serif;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(184, 89, 64, 0.35);
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.submit-btn:hover::after {
    transform: translateX(100%);
}

.submit-btn:hover {
    background: var(--terra-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(184, 89, 64, 0.45);
}

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

/* ============================================================
           FOOTER & MODAL
        ============================================================ */
#footer-section {
    background: var(--burgundy);
    padding: clamp(3.5rem, 8vw, 5rem) 1.5rem clamp(4rem, 9vw, 5.5rem);
    color: white;
    text-align: center;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.footer-divider-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin: 1.5rem auto 1.3rem;
    opacity: 0.75;
}

.footer-ornament-line {
    height: 1px;
    width: 55px;
    background: linear-gradient(90deg, transparent, #DEB887, transparent);
}

.footer-heart {
    color: #DEB887;
    font-size: 1rem;
}

.footer-story {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: clamp(0.95rem, 2.8vw, 1.15rem);
    color: #F8E3BA;
    line-height: 1.6;
    margin: 0 auto 1.4rem;
    max-width: 34ch;
}

.footer-details {
    font-family: 'Invitation Serif', Georgia, serif;
    font-size: clamp(.68rem, 2.2vw, .82rem);
    letter-spacing: .18em;
    color: #DEB887;
    margin: 0 auto 0.8rem;
    text-transform: uppercase;
}

.footer-hashtag {
    font-family: Georgia, serif;
    font-size: clamp(.8rem, 2.4vw, .92rem);
    letter-spacing: .08em;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 auto;
}

#rsvp-modal {
    position: fixed;
    inset: 0;
    background: rgba(30, 10, 5, 0.65);
    backdrop-filter: blur(10px);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

#rsvp-modal.open {
    display: flex;
}

.modal-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    max-width: 360px;
    width: 100%;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.light-theme .modal-card {
    border-color: transparent;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(184, 89, 64, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.modal-icon-ring svg {
    width: 32px;
    color: var(--terracotta);
}

.modal-title {
    font-family: 'Invitation Serif', 'Cormorant Garamond', Georgia, serif;
    font-size: 3rem;
    color: var(--terracotta);
    margin-bottom: 0.5rem;
}

.modal-msg {
    font-style: italic;
    font-family: 'Invitation Serif', serif;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.modal-close-btn {
    background: var(--terracotta);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 0.85rem 2.5rem;
    font-family: 'Invitation Serif', serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.modal-close-btn:hover {
    background: var(--terra-dark);
}

.footer-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    opacity: 0.86;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.footer-brand-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.footer-brand-logo {
    display: block;
    width: min(260px, 72vw);
    height: auto;
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.28));
}

/* V2 glass controls and animated modern countdown */
button {
    font-family: 'Invitation Serif', Georgia, serif;
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
}

#theme-btn,
#audio-btn,
.open-invitation,
.submit-btn,
.modal-close-btn {
    border: 1px solid rgba(255, 234, 203, .55);
    background: linear-gradient(145deg, rgba(255, 248, 235, .25), rgba(110, 49, 54, .36));
    color: #fff8ef;
    box-shadow: 0 10px 28px rgba(25, 10, 24, .24), inset 0 1px 0 rgba(255, 255, 255, .42);
}

body.light-theme #theme-btn,
body.light-theme #audio-btn,
body.light-theme .open-invitation,
body.light-theme .submit-btn,
body.light-theme .modal-close-btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(255, 235, 215, .42));
    border-color: rgba(255, 255, 255, .85);
    color: #693829;
    box-shadow: 0 10px 26px rgba(92, 34, 51, .13), inset 0 1px 0 rgba(255, 255, 255, .92);
}

#theme-btn:hover,
#audio-btn:hover,
.open-invitation:hover,
.submit-btn:hover,
.modal-close-btn:hover,
body.light-theme #theme-btn:hover,
body.light-theme #audio-btn:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, .48), rgba(198, 137, 116, .42));
    box-shadow: 0 12px 30px rgba(92, 34, 51, .22), inset 0 1px 0 rgba(255, 255, 255, .65);
}

button:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

.countdown-container {
    width: min(100%, 430px);
    margin: 1.5rem auto 0;
    padding: .7rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .55rem;
    border: 1px solid rgba(255, 234, 203, .45);
    border-radius: 1.6rem;
    background: rgba(255, 250, 242, .09);
    box-shadow: 0 18px 45px rgba(25, 10, 24, .22);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.cd-item,
body.light-theme .cd-item {
    min-width: 0;
    padding: 1.1rem .35rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(255, 255, 255, .27);
    background: rgba(255, 255, 255, .1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 5px 16px rgba(25, 10, 24, .08);
}

body.light-theme .countdown-container {
    background: rgba(255, 255, 255, .46);
    border-color: rgba(255, 255, 255, .75);
}

body.light-theme .cd-item {
    background: rgba(255, 255, 255, .52);
    border-color: rgba(255, 255, 255, .8);
}

.cd-item span {
    font: 400 clamp(1.5rem, 5vw, 2.1rem)/1 'Invitation Serif', Georgia, serif;
    font-variant-numeric: tabular-nums;
}

.cd-item span.tick {
    animation: countdownTick .28s ease-out both;
}

.cd-item small {
    margin-top: .55rem;
    font-size: .55rem;
    letter-spacing: .1em;
}

.countdown-complete {
    grid-column: 1 / -1;
    color: var(--terracotta);
    font-size: 1.1rem;
}

@keyframes countdownTick {
    from {
        opacity: .25;
        transform: translateY(10px);
        filter: blur(3px);
    }

    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@media (max-width: 440px) {
    .countdown-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .cd-item span.tick {
        animation: none;
    }
}