/* ==========================================================================
   V2 — Bohemian Wedding Invitation: "The Invitation as Art"
   Couple: د. عبد الرحمن & م. مريم
   FINAL POLISH: Envelope gate, improved readability, joyful palette
   ========================================================================== */

/* ─── 1. Design Tokens ──────────────────────────────────────────────────── */
:root {
    /* Warm parchment palette — with added GOLD for joy */
    --clr-canvas:   #FDF7EF;
    --clr-sand:     #F0E0C8;
    --clr-gold:     #C9943A;
    --clr-honey:    #D4A76A;
    --clr-accent:   #A0714F;
    --clr-caramel:  #C8956E;
    --clr-mocha:    #6B4226;
    --clr-espresso: #3D2216;

    /* Typography */
    --ff-display:   'El Messiri', serif;
    --ff-kufi:      'Reem Kufi', sans-serif;
    --ff-body:      'Tajawal', system-ui, sans-serif;

    /* Spacing scale */
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 16px;
    --sp-lg: 32px;
    --sp-xl: 56px;
    --sp-2xl: 80px;

    /* Ring countdown */
    --ring-circumference: 263.89;
}

/* ─── 2. Global Reset ───────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--ff-body);
    color: var(--clr-espresso);
    background: var(--clr-canvas);
    direction: rtl;
    text-align: center;
    line-height: 1.95;
    overflow: hidden;
    min-height: 100vh;
    position: relative;
}

body.is-open {
    overflow-y: auto;
    overflow-x: hidden;
}

/* ─── 3. Grain Texture Overlay ──────────────────────────────────────────── */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px;
    mix-blend-mode: multiply;
}

/* ═══════════════════════════════════════════════════════════════════════════
   3.5 GATE — 3D ENVELOPE WITH WAX SEAL
   ═══════════════════════════════════════════════════════════════════════════ */
.gate {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background:
        radial-gradient(ellipse 120% 80% at 50% -10%, rgba(201, 148, 58, 0.15) 0%, transparent 55%),
        linear-gradient(165deg, var(--clr-sand) 0%, #8B6340 50%, var(--clr-mocha) 100%);
    transition: opacity 1s ease-out, visibility 1s;
}

.gate.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.gate.is-done .envelope {
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

/* Envelope */
.envelope {
    position: relative;
    width: 320px;
    height: 220px;
    perspective: 1200px;
    transform-style: preserve-3d;
}

/* 1. Envelope Back Wall (solid interior pocket back) */
.envelope__back {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #E6D4B8 0%, #D4C0A1 60%, #C4B091 100%);
    border-radius: 12px;
    box-shadow:
        0 20px 45px rgba(45, 25, 10, 0.45),
        0 6px 18px rgba(45, 25, 10, 0.25);
}

/* 2. Letter card inside the envelope */
.envelope__letter {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background: linear-gradient(180deg, #FFFDF8 0%, #FAF4E8 100%);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    transition: transform 0.85s cubic-bezier(0.34, 1.35, 0.64, 1) 0.35s;
    box-shadow: 0 4px 15px rgba(61, 34, 22, 0.12);
    border: 1px solid rgba(201, 148, 58, 0.25);
    padding: 0.8rem 1rem;
}

.envelope__letter-crown {
    font-size: 0.9rem;
    color: var(--clr-gold);
    line-height: 1;
}

.envelope__letter-tag {
    font-family: var(--ff-body);
    font-size: 0.8rem;
    color: var(--clr-accent);
    letter-spacing: 0.15em;
    font-weight: 500;
}

.envelope__letter-names {
    font-family: var(--ff-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--clr-mocha);
    line-height: 1.4;
    text-align: center;
}

.envelope__letter-and {
    font-family: var(--ff-kufi);
    font-weight: 400;
    color: var(--clr-gold);
    font-size: 0.95rem;
}

/* 3. Envelope Front Body (V-Pocket Body - covers sides & bottom completely) */
.envelope__front {
    position: absolute;
    z-index: 3;
    inset: 0;
    background: linear-gradient(160deg, #FAF0DB 0%, #F5E4C3 60%, #E9D2A9 100%);
    border-radius: 12px;
    clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 0, 50% 42%);
    filter: drop-shadow(0 -2px 6px rgba(61, 34, 22, 0.08));
}

.envelope__front::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 40%);
    clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 0, 50% 42%);
    border-radius: 12px;
}

/* 4. Envelope Top Lid (triangular flap) */
.envelope__lid {
    position: absolute;
    z-index: 4;
    top: 0; left: 0; right: 0;
    height: 58%;
    background: linear-gradient(165deg, #F3E2C4 0%, #E6CE9F 50%, #D8BD8A 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    transform: rotateX(0deg);
    transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1), z-index 0s;
    filter: drop-shadow(0 6px 12px rgba(45, 25, 10, 0.22));
    border-radius: 12px 12px 0 0;
    backface-visibility: visible;
}

.envelope__lid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(201, 148, 58, 0.15) 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* 5. Royal Gold Wax Seal */
.envelope__seal {
    position: absolute;
    z-index: 5;
    top: 58%; left: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    border-radius: 48% 52% 46% 54% / 53% 47% 53% 47%;
    border: none;
    padding: 0;
    background: radial-gradient(circle at 35% 30%, #F5D796 0%, #D4A76A 25%, #A0714F 60%, #5E3920 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #FFFDF8;
    box-shadow:
        0 10px 25px rgba(45, 25, 10, 0.55),
        inset 0 3px 6px rgba(255, 255, 255, 0.7),
        inset 0 -3px 8px rgba(60, 30, 10, 0.6);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, opacity 0.4s ease;
    animation: sealPulse 2.8s ease-in-out infinite alternate;
    -webkit-tap-highlight-color: transparent;
}

.seal-glow-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed rgba(212, 167, 106, 0.5);
    animation: spinSlow 12s linear infinite;
    pointer-events: none;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.seal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.seal-text-hint {
    font-family: var(--ff-body);
    font-size: 0.65rem;
    font-weight: 700;
    color: #FAF0DB;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(45, 25, 10, 0.6);
    margin-top: -2px;
}

.envelope__seal:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow:
        0 14px 32px rgba(45, 25, 10, 0.65),
        inset 0 4px 8px rgba(255, 255, 255, 0.8),
        inset 0 -3px 10px rgba(60, 30, 10, 0.7);
}

.envelope__seal:active {
    transform: translate(-50%, -50%) scale(0.96);
}

.envelope__seal:focus-visible {
    outline: 3px solid var(--clr-gold);
    outline-offset: 6px;
}

.envelope__seal-mark {
    filter: drop-shadow(0 1px 3px rgba(45, 25, 10, 0.5));
}

@keyframes sealPulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.05); }
}

/* OPENED State */
.envelope.is-opening .envelope__lid {
    transform: rotateX(180deg);
    z-index: 1;
    transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1), z-index 0s 0.25s;
}

.envelope.is-opening .envelope__seal {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.4);
}

.envelope.is-opening .envelope__letter {
    transform: translateZ(2px) translateY(-110px);
}

/* Gate hint text */
.gate__hint {
    font-family: var(--ff-body);
    font-size: 1rem;
    color: rgba(253, 245, 230, 0.85);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: hintPulse 2s ease-in-out infinite;
}

.gate__hint-icon {
    font-size: 1.1rem;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Dust particles */
.dust {
    pointer-events: none;
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.dust span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--clr-gold);
    opacity: 0;
}

.dust.is-active span {
    animation: sift 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sift {
    0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
    20% { opacity: 0.9; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

/* Invite reveal animation */
.invite.is-visible {
    display: block;
    animation: invite-in 0.9s ease-out forwards;
}

@keyframes invite-in {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── 4. Audio FAB ──────────────────────────────────────────────────────── */
.audio-fab {
    position: fixed;
    top: var(--sp-md);
    left: var(--sp-md);
    z-index: 100;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1.5px solid var(--clr-sand);
    background: rgba(253, 247, 239, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--clr-mocha);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(61, 34, 22, 0.08);
}

.audio-fab:hover {
    transform: scale(1.1);
    border-color: var(--clr-gold);
}

.audio-fab-icon {
    width: 20px;
    height: 20px;
}

.hidden { display: none !important; }

/* ─── 5. HERO SECTION — Full Viewport Cinematic Entrance ────────────────── */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--sp-xl) var(--sp-md);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 50% at 50% 40%, rgba(201, 148, 58, 0.08) 0%, transparent 70%),
        var(--clr-canvas);
}

/* Corner flourishes */
.corner-flourish {
    position: absolute;
    width: 100px;
    height: 100px;
}
.corner-flourish.top-right { top: 20px; right: 20px; }
.corner-flourish.bottom-left { bottom: 20px; left: 20px; }

/* Bismillah */
.hero-bismillah {
    font-family: var(--ff-kufi);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--clr-mocha);
    letter-spacing: 1px;
    margin-bottom: var(--sp-lg);
}

/* Botanical Wreath Container */
.wreath-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto var(--sp-lg);
}

.wreath-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Wreath branch stroke animation */
.wreath-branch {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawBranch 2.5s ease-out 0.6s forwards;
}

@keyframes drawBranch {
    to { stroke-dashoffset: 0; }
}

/* Leaves subtle pulse */
.wreath-leaf {
    animation: leafPulse 4s ease-in-out infinite;
}

.wreath-leaf:nth-child(odd) { animation-delay: 0s; }
.wreath-leaf:nth-child(even) { animation-delay: 2s; }

@keyframes leafPulse {
    0%, 100% { opacity: var(--leaf-base-opacity, 0.18); }
    50% { opacity: calc(var(--leaf-base-opacity, 0.18) + 0.07); }
}

/* Names inside wreath */
.wreath-names {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.groom-name, .bride-name {
    font-family: var(--ff-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--clr-mocha);
    line-height: 1.3;
}

.name-title {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--clr-gold);
}

.names-and {
    font-family: var(--ff-kufi);
    font-size: 1.1rem;
    color: var(--clr-gold);
    line-height: 1.2;
}

/* Quranic Verse — larger for readability */
.hero-verse {
    font-family: var(--ff-kufi);
    font-size: 1.1rem;
    line-height: 2.2;
    color: var(--clr-accent);
    max-width: 460px;
    margin: 0 auto var(--sp-xl);
}

/* Invitation text — larger for readability */
.hero-invitation {
    max-width: 440px;
    margin: 0 auto;
}

.invitation-prelude {
    font-family: var(--ff-body);
    font-size: 1.1rem;
    color: var(--clr-accent);
    margin-bottom: var(--sp-sm);
}

.hosts-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-md);
}

.host-name {
    font-family: var(--ff-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clr-espresso);
}

.host-sep {
    font-family: var(--ff-kufi);
    color: var(--clr-gold);
    font-size: 1.05rem;
}

.invitation-body {
    font-family: var(--ff-kufi);
    font-size: 1.05rem;
    color: var(--clr-mocha);
    line-height: 2;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: var(--sp-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-xs);
    animation: floatDown 2.5s ease-in-out infinite;
}

.scroll-hint-text {
    font-family: var(--ff-body);
    font-size: 0.85rem;
    color: var(--clr-accent);
    opacity: 0.6;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    color: var(--clr-accent);
    opacity: 0.5;
}

@keyframes floatDown {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* ─── 6. Botanical Divider ──────────────────────────────────────────────── */
.botanical-divider {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: var(--sp-sm) 0;
    line-height: 0;
}

.botanical-divider.flip { transform: scaleY(-1); }

.divider-svg {
    width: 100%;
    height: auto;
}

/* ─── 7. DATE SECTION — Typography as Art ────────────────────────────────── */
.date-section {
    padding: var(--sp-2xl) var(--sp-md) var(--sp-xl);
}

.date-art {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--sp-md);
    margin-bottom: var(--sp-md);
}

.date-big-number {
    font-family: var(--ff-display);
    font-size: 7rem;
    font-weight: 700;
    line-height: 1;
    color: var(--clr-mocha);
    text-shadow: 3px 3px 0 rgba(201, 148, 58, 0.18);
}

.date-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
}

.date-month {
    font-family: var(--ff-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--clr-mocha);
    line-height: 1.2;
}

.date-year {
    font-family: var(--ff-body);
    font-size: 1.15rem;
    color: var(--clr-accent);
}

.date-day-name {
    font-family: var(--ff-kufi);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--clr-accent);
    margin-bottom: var(--sp-lg);
}

/* Time badge */
.date-time-badge {
    display: inline-flex;
    align-items: baseline;
    gap: var(--sp-sm);
    padding: var(--sp-md) var(--sp-lg);
    border: 1.5px solid var(--clr-sand);
    border-radius: 100px;
    background: rgba(240, 224, 200, 0.3);
    margin-bottom: var(--sp-lg);
}

.time-prefix {
    font-family: var(--ff-body);
    font-size: 1rem;
    color: var(--clr-accent);
}

.time-big {
    font-family: var(--ff-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--clr-mocha);
}

.time-suffix {
    font-family: var(--ff-body);
    font-size: 1rem;
    color: var(--clr-accent);
}

/* Calendar button */
.cal-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: 12px 28px;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, var(--clr-gold) 0%, var(--clr-mocha) 100%);
    color: #FDF5E6;
    font-family: var(--ff-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(201, 148, 58, 0.25);
    transition: all 0.3s ease;
}

.cal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(201, 148, 58, 0.35);
}

.cal-icon {
    width: 18px;
    height: 18px;
}

/* ─── 8. COUNTDOWN — Circular Ring Dials ─────────────────────────────────── */
.countdown-section {
    padding: var(--sp-xl) var(--sp-md) var(--sp-2xl);
}

.section-title {
    font-family: var(--ff-display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--clr-mocha);
    margin-bottom: var(--sp-sm);
}

.section-subtitle {
    font-family: var(--ff-body);
    font-size: 1.05rem;
    color: var(--clr-accent);
    margin-bottom: var(--sp-xl);
}

.rings-row {
    display: flex;
    justify-content: center;
    gap: var(--sp-md);
    flex-wrap: wrap;
}

.ring-unit {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--clr-sand);
    stroke-width: 4;
}

.ring-progress {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: var(--ring-circumference);
    stroke-dashoffset: var(--ring-circumference);
    transition: stroke-dashoffset 0.8s ease;
}

.ring-days   { stroke: var(--clr-mocha); }
.ring-hours  { stroke: var(--clr-gold); }
.ring-mins   { stroke: var(--clr-caramel); }
.ring-secs   { stroke: var(--clr-honey); }

.ring-number {
    font-family: var(--ff-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--clr-mocha);
    line-height: 1;
    z-index: 1;
}

.ring-label {
    font-family: var(--ff-body);
    font-size: 0.75rem;
    color: var(--clr-accent);
    margin-top: 2px;
    z-index: 1;
}

/* ─── 9. VENUE — Editorial Asymmetric + Compass ─────────────────────────── */
.venue-section {
    padding: var(--sp-xl) var(--sp-md) var(--sp-2xl);
    position: relative;
}

.venue-compass {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--sp-lg);
    animation: compassSpin 20s linear infinite;
}

@keyframes compassSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.compass-svg {
    width: 100%;
    height: 100%;
}

.venue-name-block {
    margin-bottom: var(--sp-lg);
}

.venue-name {
    font-family: var(--ff-display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--clr-espresso);
    margin-bottom: var(--sp-xs);
}

.venue-subtitle {
    font-family: var(--ff-body);
    font-size: 0.95rem;
    color: var(--clr-accent);
    font-weight: 300;
    letter-spacing: 1px;
}

.venue-address-block {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-md) var(--sp-lg);
    border: 1px solid var(--clr-sand);
    border-radius: 16px;
    background: rgba(240, 224, 200, 0.2);
    font-family: var(--ff-body);
    font-size: 1.05rem;
    color: var(--clr-mocha);
    margin-bottom: var(--sp-lg);
}

.pin-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.pin-icon svg {
    width: 100%;
    height: 100%;
}

.venue-awaiting {
    font-family: var(--ff-kufi);
    font-size: 1.1rem;
    color: var(--clr-accent);
    max-width: 420px;
    margin: 0 auto;
    line-height: 2;
}

/* ─── 10. CHILDREN NOTE — Literary Aside ─────────────────────────────────── */
.note-section {
    padding: var(--sp-lg) var(--sp-md) var(--sp-xl);
}

.note-aside {
    max-width: 440px;
    margin: 0 auto;
    padding: var(--sp-lg);
    border-top: 1px solid var(--clr-sand);
    border-bottom: 1px solid var(--clr-sand);
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}

.note-ornament {
    font-size: 0.85rem;
    color: var(--clr-gold);
    flex-shrink: 0;
}

.note-text {
    font-family: var(--ff-kufi);
    font-size: 1rem;
    color: var(--clr-mocha);
    line-height: 2.1;
    text-align: center;
}

/* ─── 11. CLOSING / FOOTER ──────────────────────────────────────────────── */
.closing {
    padding: var(--sp-xl) var(--sp-md) var(--sp-2xl);
}

.closing-botanical {
    width: 140px;
    height: auto;
    margin: 0 auto var(--sp-lg);
    opacity: 0.7;
}

.closing-names {
    font-family: var(--ff-display);
    font-size: 1.2rem;
    color: var(--clr-mocha);
    margin-bottom: var(--sp-sm);
}

.closing-names strong {
    color: var(--clr-espresso);
    font-weight: 700;
}

.closing-blessing {
    font-family: var(--ff-kufi);
    font-size: 1.1rem;
    color: var(--clr-accent);
    max-width: 400px;
    margin: 0 auto var(--sp-md);
    line-height: 2.2;
}

.closing-year {
    font-family: var(--ff-body);
    font-size: 0.9rem;
    color: var(--clr-accent);
    opacity: 0.6;
}

/* ─── 12. Scroll Reveal Animations ──────────────────────────────────────── */

/* Cinematic entrance — hero elements */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: revealIn 0.9s ease forwards;
}

.reveal[data-delay="0"]    { animation-delay: 0.2s; }
.reveal[data-delay="400"]  { animation-delay: 0.6s; }
.reveal[data-delay="800"]  { animation-delay: 1.2s; }
.reveal[data-delay="1100"] { animation-delay: 1.6s; }
.reveal[data-delay="1600"] { animation-delay: 2.2s; }

@keyframes revealIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered reveals */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── 13. Reduced Motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .wreath-branch,
    .wreath-leaf,
    .reveal,
    .reveal-up,
    .envelope__seal,
    .scroll-hint,
    .gate__hint,
    .venue-compass {
        animation: none !important;
        transition: none !important;
    }

    .reveal, .reveal-up {
        opacity: 1;
        transform: none;
    }
}

/* ─── 14. Responsive Design ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .hero {
        padding: var(--sp-lg) var(--sp-md);
    }

    .wreath-container {
        width: 240px;
        height: 240px;
    }

    .groom-name, .bride-name {
        font-size: 1.7rem;
    }

    .name-title {
        font-size: 1.15rem;
    }

    .hero-verse {
        font-size: 1rem;
    }

    .date-big-number {
        font-size: 5rem;
    }

    .date-month {
        font-size: 1.6rem;
    }

    .ring-unit {
        width: 75px;
        height: 75px;
    }

    .ring-number {
        font-size: 1.2rem;
    }

    .ring-label {
        font-size: 0.65rem;
    }

    .corner-flourish {
        width: 70px;
        height: 70px;
    }

    .venue-address-block {
        flex-direction: column;
        text-align: center;
    }

    .note-aside {
        flex-direction: column;
        gap: var(--sp-sm);
    }

    .envelope {
        width: 280px;
        height: 200px;
    }

    .envelope__seal {
        width: 78px;
        height: 78px;
    }
}

@media (min-width: 768px) {
    .date-big-number {
        font-size: 9rem;
    }

    .date-month {
        font-size: 2.5rem;
    }

    .ring-unit {
        width: 110px;
        height: 110px;
    }

    .ring-number {
        font-size: 1.6rem;
    }

    .wreath-container {
        width: 320px;
        height: 320px;
    }

    .groom-name, .bride-name {
        font-size: 2.4rem;
    }

    .corner-flourish {
        width: 130px;
        height: 130px;
    }

    .envelope {
        width: 340px;
        height: 240px;
    }
}
