/* ============================================================
   Sama & Faiyaz — Wedding Invitation
   Global foundation + Figma envelope gate
   ============================================================ */

@font-face {
    font-family: "wasted-vindey";
    src: url("../assets/fonts/wasted-vindey.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "weddingday";
    src: url("../assets/fonts/weddingday.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-paper: #f9e6d4;
    --color-gold: #866739;
    --color-ink: #2a2a2a;
    --color-border: #ac9778;
    --font-body: "wasted-vindey", Georgia, "Times New Roman", serif;
    --font-display: "wasted-vindey", Georgia, serif;
    --font-cursive: "weddingday", "wasted-vindey", Georgia, serif;
    --font-hero: "Cormorant Garamond", "EB Garamond", Georgia, serif;
    --font-hero-alt: "EB Garamond", "Cormorant Garamond", Georgia, serif;
    --color-brown: #3f2a17;
    --content-max: 40rem;
    --ease-elegant: cubic-bezier(0.19, 1, 0.22, 1);
    --dur-site-reveal: 1600ms;
    --dur-med: 800ms;
    --z-site: 1;
    --z-audio: 1100;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

img,
picture,
video,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-ink);
    background-color: var(--color-paper);
    background-image: url("../assets/intro/bg-ivory-paper.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 520ms ease, color 520ms ease;
}

body.mood-night {
    background-color: #efdbc8;
}

body:not(.is-open) {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

/* ============================================================
   Figma envelope gate (exact coordinate system: 402 x 750)
   ============================================================ */
.envelope-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #f5f0e8;
}

.envelope-gate::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        url("../assets/intro/bg-ivory-paper.webp") center / cover no-repeat,
        linear-gradient(135deg, #f9f5ee 0%, #ede8de 100%);
    opacity: 1;
}

.envelope-gate::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 12;
    background:
        radial-gradient(circle at 50% 52%, rgba(255, 243, 207, 0.68) 0%, rgba(255, 236, 186, 0.28) 24%, rgba(255, 233, 177, 0.06) 48%, rgba(255, 230, 170, 0) 68%),
        radial-gradient(circle at 46% 50%, rgba(255, 227, 153, 0.62) 0 1.7%, transparent 3.4%),
        radial-gradient(circle at 53% 52%, rgba(255, 224, 145, 0.52) 0 1.4%, transparent 3%),
        radial-gradient(circle at 49% 54%, rgba(255, 239, 194, 0.48) 0 1.2%, transparent 2.8%);
}

@keyframes ceremonialBloom {
    0% {
        opacity: 0;
        transform: scale(0.92);
        filter: blur(0px);
    }
    24% {
        opacity: 0.95;
        transform: scale(1.04);
        filter: blur(0.4px);
    }
    100% {
        opacity: 0;
        transform: scale(1.12);
        filter: blur(1.1px);
    }
}

body.is-opening .envelope-gate::after {
    animation: ceremonialBloom 0.62s cubic-bezier(0.19, 1, 0.22, 1) 0.06s both;
}

.figma-envelope-wrap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    /* Cover the whole viewport on every device, always centred (symmetric crop). */
    width: max(100vw, calc(100dvh * 402 / 750));
    height: max(100dvh, calc(100vw * 750 / 402));
}

/* Desktop / PC: no envelope gate — reveal the site directly. */
@media (min-width: 1025px) {
    .envelope-gate {
        display: none;
    }
}

.figma-envelope-stage {
    position: absolute;
    inset: 0;
    overflow: visible;
}

.envelope-body-bg {
    position: absolute;
    inset: 0;
    border-radius: 2px;
    background: url("../assets/intro/bg-ivory-paper.webp") center / cover no-repeat, #f9f5ee;
}

.figma-flap,
.wax-seal img {
    position: absolute;
    display: block;
    max-width: none;
    object-fit: cover;
    pointer-events: none;
}

.figma-flap--right {
    left: 44.03%;
    top: 14.8%;
    width: 55.97%;
    height: 83.73%;
}

.figma-flap--left {
    left: 0;
    top: 13.2%;
    width: 48.01%;
    height: 87.2%;
}

.figma-flap--top {
    left: 0;
    top: -14.13%;
    width: 100%;
    height: 80.27%;
}

.figma-flap--bottom {
    left: 0;
    top: 51.6%;
    width: 100%;
    height: 82.13%;
}

.wax-seal {
    position: absolute;
    left: 31.84%;
    top: 48.27%;
    width: 38.56%;
    aspect-ratio: 1 / 1;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    z-index: 20;
}

.wax-seal img {
    inset: 0;
    width: 100%;
    height: 100%;
}

.tap-to-open {
    position: absolute;
    left: 0;
    top: 68%;
    width: 100%;
    z-index: 15;
    text-align: center;
    font-family: "wasted-vindey", Georgia, serif;
    font-size: clamp(0.72rem, 2.8vw, 0.95rem);
    letter-spacing: 0.28em;
    color: #866739;
    pointer-events: none;
}

body.is-opening .figma-flap--right {
    transform: translateX(69.65%);
    opacity: 0;
    transition: transform 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.8s, opacity 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.8s;
}

body.is-opening .figma-flap--left {
    transform: translateX(-62.5%);
    opacity: 0;
    transition: transform 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.8s, opacity 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.8s;
}

body.is-opening .figma-flap--top {
    transform: translateY(-42.67%);
    opacity: 0;
    transition: transform 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.8s, opacity 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.8s;
}

body.is-opening .figma-flap--bottom {
    transform: translateY(42.67%);
    opacity: 0;
    transition: transform 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.8s, opacity 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.8s;
}

body.is-opening .wax-seal {
    transform: scale(0);
    opacity: 0;
    transition:
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s,
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s;
}

body.is-opening .tap-to-open {
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.is-open .envelope-gate {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 1.35s cubic-bezier(0.19, 1, 0.22, 1),
        visibility 0s linear 1.35s;
}

/* ============================================================
   Main site — hidden until the envelope opens
   ============================================================ */
.site-main {
    position: relative;
    z-index: var(--z-site);
    isolation: isolate;
    opacity: 0;
    transition: opacity var(--dur-site-reveal) var(--ease-elegant);
}

body.mood-night .site-main {
    filter: saturate(1.08) contrast(1.03) brightness(0.95);
}

.starfield {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.4s cubic-bezier(0.19, 1, 0.22, 1);
}

body.is-open .starfield {
    opacity: 1;
}

body.mood-night .starfield {
    opacity: 1;
    filter: saturate(1.24) brightness(1.17);
}

.star {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    background: #ffffff;
    box-shadow:
        0 0 6px rgba(255, 255, 255, 1),
        0 0 12px rgba(255, 247, 224, 0.79),
        0 0 20px rgba(216, 176, 102, 0.36);
    animation: starTwinkle var(--d) ease-in-out var(--delay) infinite;
}

body.mood-night .star {
    box-shadow:
        0 0 8px rgba(255, 255, 255, 1),
        0 0 16px rgba(255, 245, 216, 0.88),
        0 0 28px rgba(227, 191, 124, 0.5);
}

.star::before,
.star::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.76);
    border-radius: 999px;
}

.star::before {
    width: calc(var(--s) * 4.2);
    height: 1px;
}

.star::after {
    width: 1px;
    height: calc(var(--s) * 4.2);
}

@keyframes starTwinkle {
    0%,
    100% {
        opacity: 0.12;
        transform: scale(0.55);
    }
    38% {
        opacity: var(--o);
        transform: scale(1.06);
    }
    58% {
        opacity: 0.31;
        transform: scale(0.78);
    }
}

main#site-main > section > * {
    position: relative;
}

main#site-main > section {
    position: relative;
    z-index: 30;
}

body.is-opening .site-main,
body.is-open .site-main {
    opacity: 1;
}

.section {
    max-width: var(--content-max);
    margin-inline: auto;
    padding: 4.2rem 1.5rem;
}

/* ============================================================
   Hero section
   ============================================================ */
.hero-section {
    /* Reset the generic .section padding — hero has its own rhythm */
    padding: 0;
    max-width: none;
    margin: 0;
    background: transparent;
    display: flex;
    justify-content: center;
}

.hero-frame {
    position: relative;
    width: min(100vw, 440px);
    height: 100dvh;
    overflow: hidden;
    background: transparent;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    /* Fade the video edges to transparent so the page's own ivory-paper
       texture shows through — top and bottom merge seamlessly. */
    -webkit-mask-image: linear-gradient(to bottom,
        transparent 0%, #000 8%, #000 80%, transparent 99%);
    mask-image: linear-gradient(to bottom,
        transparent 0%, #000 8%, #000 80%, transparent 99%);
}

/* Subtle warm scrim behind the text only; fully transparent at the edges
   so the masked video blends cleanly into the paper background. */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(249, 230, 212, 0.0) 42%,
            rgba(249, 230, 212, 0.22) 66%,
            rgba(249, 230, 212, 0.10) 80%,
            rgba(249, 230, 212, 0.0) 92%);
    pointer-events: none;
}

body.mood-night .hero-overlay {
    background:
        linear-gradient(to bottom,
            rgba(249, 230, 212, 0.04) 38%,
            rgba(245, 214, 182, 0.32) 66%,
            rgba(236, 198, 158, 0.15) 81%,
            rgba(249, 230, 212, 0.02) 94%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
    gap: 0.5rem;
}

/* Fade-up keyframe for hero children */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Children are invisible by default; body.is-open triggers the animation */
.hero-names,
.hero-divider {
    opacity: 0;
}

body.is-open .hero-names {
    animation: heroFadeUpShift 2s cubic-bezier(0.19, 1, 0.22, 1) both;
}

body.is-open .hero-divider {
    animation: heroFadeUpShift 2s cubic-bezier(0.19, 1, 0.22, 1) both;
}

body.is-open .hero-names      { animation-delay: 0.3s; }
body.is-open .hero-divider    { animation-delay: 0.75s; }

/* Typography */
.hero-names {
    font-family: var(--font-cursive);
    font-size: clamp(2.7rem, 11.5vw, 4.2rem);
    font-weight: 400;
    color: var(--color-brown);
    letter-spacing: 0.01em;
    line-height: 0.96;
    margin: clamp(1rem, 4vw, 1.8rem) 0 0;
}

.hero-divider {
    display: none;
}

/* Desktop: keep the vertical mobile-style frame, centered */
@media (min-width: 1025px) {
    .hero-section {
        min-height: 100dvh;
        align-items: center;
    }
    .hero-frame {
        width: min(400px, 42vh);
        height: 95dvh;
        border-radius: 8px;
        box-shadow: 0 20px 60px rgba(42, 42, 42, 0.22);
    }
}

/* ============================================================
   Invitation section
   ============================================================ */
.invitation-section {
    max-width: none;
    margin: 0;
    padding: clamp(3.2rem, 8.2vw, 4.5rem) 1rem clamp(4rem, 8.8vw, 5.4rem);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-heading {
    width: min(100%, 430px);
    margin: 0 auto clamp(1.2rem, 4vw, 1.7rem);
    text-align: center;
}

.section-heading h2 {
    font-family: var(--font-cursive);
    font-size: clamp(2.05rem, 9.8vw, 3.15rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #876836;
    line-height: 1.05;
}

.section-heading__divider {
    width: min(78%, 278px);
    margin: 0.55rem auto 0;
    height: auto;
    filter: sepia(1) saturate(2.1) hue-rotate(-8deg) brightness(0.82);
}

.invitation-card {
    position: relative;
    width: min(92vw, 430px);
    height: clamp(800px, 215vw, 960px);
    max-width: 430px;
    margin: 0 auto;
    overflow: visible;
}

.invitation-card__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.invitation-card__content {
    position: absolute;
    left: 13%;
    right: 13%;
    top: 25.2%;
    bottom: 8%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    overflow: hidden;
    color: #2f2f2f;
    gap: clamp(0.12rem, 0.6vw, 0.36rem);
}

.invitation-card__content > * {
    margin-block: 0;
}

.invitation-card__bismillah {
    width: min(46%, 150px);
    height: auto;
    margin: 0 auto clamp(0.28rem, 1vw, 0.52rem);
    display: block;
}

.invitation-card__divider {
    width: clamp(38px, 11.5vw, 52px);
    height: auto;
    margin-bottom: clamp(0.18rem, 0.7vw, 0.38rem);
    filter: sepia(1) saturate(1.8) hue-rotate(-8deg) brightness(0.9);
}

.invitation-parents {
    font-family: var(--font-display);
    font-size: clamp(0.72rem, 2.1vw, 0.9rem);
    line-height: 1.34;
    color: #6d5733;
    max-width: 96%;
}

.invitation-formal,
.invitation-family,
.invitation-closing {
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.52rem, 1.55vw, 0.68rem);
    line-height: 1.35;
    color: #454545;
    max-width: 98%;
    hyphens: auto;
}

.invitation-formal {
    margin-bottom: clamp(0.08rem, 0.4vw, 0.2rem);
}

.invitation-bride,
.invitation-groom {
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 3.2vw, 1.25rem);
    line-height: 1.12;
    color: #866739;
    letter-spacing: 0.015em;
    max-width: 96%;
}

.invitation-with {
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.62rem, 1.9vw, 0.78rem);
    color: #866739;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

.invitation-groom {
    margin-bottom: clamp(0.02rem, 0.22vw, 0.12rem);
}

.invitation-family {
    margin-bottom: clamp(0.08rem, 0.36vw, 0.2rem);
}

.invitation-family-intro {
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.52rem, 1.55vw, 0.68rem);
    line-height: 1.35;
    color: #454545;
}

.invitation-family-line2 {
    display: inline;
}

.invitation-family--parents-font {
    font-family: var(--font-display);
    font-size: clamp(0.72rem, 2.1vw, 0.9rem);
    line-height: 1.34;
    color: #6d5733;
    max-width: 96%;
}

@media (max-width: 767px) {
    .invitation-formal,
    .invitation-family-intro,
    .invitation-closing {
        font-size: clamp(0.6rem, 2.15vw, 0.78rem);
        line-height: 1.46;
    }

    .event-location-main {
        font-size: clamp(1.46rem, 5.05vw, 2.06rem);
    }
}

.invitation-closing {
    margin-bottom: clamp(0.08rem, 0.32vw, 0.18rem);
}

.invitation-event-details {
    margin-top: clamp(0.2rem, 0.8vw, 0.4rem);
    display: grid;
    justify-items: center;
    gap: clamp(0.14rem, 0.48vw, 0.28rem);
    position: relative;
}

.event-details-divider {
    width: clamp(72px, 22vw, 106px);
    height: auto;
    margin: clamp(0.06rem, 0.28vw, 0.16rem) 0 clamp(0.16rem, 0.62vw, 0.32rem);
    opacity: 0.84;
    filter: sepia(1) saturate(1.2) brightness(0.86);
}

.event-date,
.event-time {
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.62rem, 1.8vw, 0.78rem);
    color: #6d5531;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.18;
}

.event-time {
    margin-bottom: clamp(0.12rem, 0.46vw, 0.24rem);
}

.event-location-main {
    font-family: "weddingday", "Beau Rivage", cursive;
    font-size: clamp(1.34rem, 4.45vw, 1.9rem);
    color: #866739;
    line-height: 0.95;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 0.5px rgba(134, 103, 57, 0.45);
    animation: senakunjaGlow 4.5s ease-in-out infinite;
    overflow: hidden;
    padding-inline: 0.06em;
}

.event-location-main::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 0%,
        transparent 35%,
        rgba(255, 239, 184, 0.65) 48%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 239, 184, 0.35) 54%,
        transparent 68%,
        transparent 100%
    );
    transform: translateX(-120%);
    animation: senakunjaShimmer 5.2s ease-in-out infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}

.event-location-sub {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(0.58rem, 1.8vw, 0.74rem);
    color: #454545;
    line-height: 1.2;
    font-style: normal;
    letter-spacing: 0.02em;
    margin-top: clamp(0.06rem, 0.24vw, 0.14rem);
}

@keyframes senakunjaGlow {
    0%,
    100% {
        filter: drop-shadow(0 0 0 rgba(197, 161, 86, 0));
    }
    50% {
        filter: drop-shadow(0 0 5px rgba(197, 161, 86, 0.32));
    }
}

@keyframes senakunjaShimmer {
    0%,
    68% {
        transform: translateX(-120%);
        opacity: 0;
    }
    76% {
        opacity: 1;
    }
    92%,
    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Reveal animation (scroll + graceful fallback) */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 2s cubic-bezier(0.19, 1, 0.22, 1),
        transform 2s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 768px) {
    .invitation-card {
        width: 430px;
        height: 960px;
        max-width: 430px;
    }
}

/* ============================================================
   Countdown section
   ============================================================ */
.countdown-section {
    max-width: none;
    margin: 0;
    padding: clamp(2.5rem, 6.8vw, 3.6rem) 1rem clamp(3.2rem, 7.8vw, 4.4rem);
    text-align: center;
    background: transparent;
}

.countdown-section .section-heading {
    margin-bottom: clamp(0.55rem, 2.4vw, 0.95rem);
}

.countdown-subtitle {
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.85rem, 3.3vw, 1rem);
    color: #7f6640;
    letter-spacing: 0.08em;
    margin: 0 auto clamp(1.15rem, 4.2vw, 1.8rem);
    width: min(100%, 430px);
}

.countdown-grid {
    width: min(100%, 430px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.7rem, 2.6vw, 1rem) clamp(0.85rem, 3vw, 1.2rem);
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(0.3rem, 1.5vw, 0.45rem) 0;
}

.countdown-number {
    font-family: var(--font-display);
    font-size: clamp(2.05rem, 10vw, 3rem);
    line-height: 1;
    color: #866739;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    margin-top: clamp(0.24rem, 1vw, 0.35rem);
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.7rem, 2.75vw, 0.84rem);
    color: #6e5a3a;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.countdown-complete {
    margin: clamp(1rem, 3.8vw, 1.6rem) auto 0;
    width: min(100%, 430px);
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.86rem, 3.2vw, 1rem);
    color: #866739;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (min-width: 430px) {
    .countdown-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: clamp(0.6rem, 1.9vw, 0.9rem);
    }

    .countdown-number {
        font-size: clamp(1.8rem, 6.4vw, 2.45rem);
    }
}

@media (min-width: 1025px) {
    .countdown-section {
        padding-top: 3.2rem;
    }

    .countdown-grid,
    .countdown-subtitle,
    .countdown-complete {
        width: min(100%, 480px);
    }
}

/* ============================================================
   Venue section
   ============================================================ */
.venue-section {
    max-width: none;
    margin: 0;
    padding: clamp(2.8rem, 7vw, 3.9rem) 1rem clamp(3.6rem, 8vw, 4.8rem);
    text-align: center;
    background: transparent;
    overflow-x: hidden;
}

.venue-section .section-heading {
    margin-bottom: clamp(0.35rem, 1.8vw, 0.7rem);
}

.venue-content {
    width: min(100%, 560px);
    margin: 0 auto;
    display: grid;
    gap: clamp(0.45rem, 2vw, 0.9rem);
}

.venue-visual {
    position: relative;
    width: min(112vw, 560px);
    margin-top: clamp(-0.7rem, -2.2vw, -0.25rem);
    margin-inline: calc(50% - min(56vw, 280px));
    position: relative;
    overflow: visible;
    isolation: isolate;
}

.venue-visual img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: saturate(0.98) contrast(0.98);
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 72%,
        rgba(0, 0, 0, 0.82) 82%,
        rgba(0, 0, 0, 0.35) 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 72%,
        rgba(0, 0, 0, 0.82) 82%,
        rgba(0, 0, 0, 0.35) 92%,
        transparent 100%
    );
}

.venue-visual::after {
    content: none;
    display: none;
}

.venue-copy {
    width: min(100%, 460px);
    margin: 0 auto;
    display: grid;
    gap: clamp(0.2rem, 1vw, 0.38rem);
    place-items: center;
    order: -1;
}

.venue-pin {
    margin: 0;
    line-height: 1;
}

.venue-pin__icon {
    width: clamp(1.55rem, 5.9vw, 2.25rem);
    height: auto;
    opacity: 0.9;
}

.venue-copy h3 {
    font-family: var(--font-cursive);
    font-size: clamp(2rem, 8.8vw, 3rem);
    font-weight: 400;
    color: #866739;
    letter-spacing: 0.015em;
    line-height: 1.02;
    margin-top: clamp(0.1rem, 0.5vw, 0.3rem);
}

.venue-location {
    font-family: var(--font-display);
    font-size: clamp(0.86rem, 3.2vw, 1.06rem);
    color: #6e5a3a;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.venue-note {
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.75rem, 2.95vw, 0.93rem);
    line-height: 1.52;
    color: #5f5037;
    max-width: 30ch;
}

.venue-link {
    font-family: var(--font-display);
    font-size: clamp(0.9rem, 3.4vw, 1.06rem);
    color: #866739;
    letter-spacing: 0.08em;
    text-decoration: none;
    border-bottom: 1px solid rgba(134, 103, 57, 0.42);
    padding-bottom: 0.08rem;
    transition: opacity 220ms ease;
}

.venue-link:hover,
.venue-link:focus-visible {
    opacity: 0.74;
    outline: none;
}

@media (min-width: 1025px) {
    .venue-content,
    .venue-copy {
        width: min(100%, 560px);
    }

    .venue-visual {
        width: min(100%, 620px);
        margin-inline: auto;
    }
}

/* ============================================================
   Dress code section
   ============================================================ */
.dress-code-section {
    max-width: none;
    margin: 0;
    padding: clamp(2.7rem, 6.8vw, 3.8rem) 1rem clamp(3.4rem, 7.8vw, 4.6rem);
    text-align: center;
    background: transparent;
    overflow-x: hidden;
}

.dress-code-section .section-heading {
    margin-bottom: clamp(0.7rem, 2.8vw, 1.15rem);
}

.dress-code-content {
    width: min(100%, 520px);
    margin: 0 auto;
    display: grid;
    gap: clamp(0.95rem, 3.8vw, 1.5rem);
    place-items: center;
}

.dress-code-visual {
    width: min(100%, 460px);
    margin: 0 auto;
}

.dress-code-visual img {
    width: min(100%, 460px);
    height: auto;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

.dress-code-copy {
    width: min(100%, 430px);
    margin: 0 auto;
    display: grid;
    gap: clamp(0.75rem, 2.8vw, 1.15rem);
    justify-items: center;
}

.dress-code-note {
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.82rem, 3.05vw, 0.98rem);
    line-height: 1.72;
    color: #5f5037;
    max-width: 34ch;
}

.dress-code-copy h3 {
    font-family: var(--font-cursive);
    font-size: clamp(1.7rem, 6.7vw, 2.35rem);
    font-weight: 400;
    color: #866739;
    letter-spacing: 0.02em;
    line-height: 1.05;
}

.palette-row {
    width: min(100%, 420px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.2rem, 1.1vw, 0.45rem);
}

.palette-row--women {
    margin-top: clamp(-0.1rem, -0.3vw, 0rem);
    margin-bottom: clamp(0.2rem, 0.8vw, 0.4rem);
}

.palette-row--men {
    width: min(100%, 280px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: clamp(-0.08rem, -0.26vw, 0rem);
    margin-bottom: clamp(0.2rem, 0.8vw, 0.4rem);
}

.palette-item {
    display: grid;
    justify-items: center;
    gap: clamp(0.34rem, 1.5vw, 0.5rem);
}

.palette-swatch {
    width: clamp(2.15rem, 9vw, 2.75rem);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    background: var(--swatch, #000000);
    box-shadow:
        inset 0 0 0 1px rgba(42, 42, 42, 0.08),
        0 5px 14px rgba(42, 42, 42, 0.12);
}

.palette-swatch--ivory {
    border: 1px solid rgba(134, 103, 57, 0.58);
}

.palette-item span:last-child {
    font-family: var(--font-display);
    font-size: clamp(0.82rem, 3vw, 0.95rem);
    color: #6e5a3a;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dress-code-guidance {
    width: min(100%, 420px);
    margin-top: clamp(0.3rem, 1.5vw, 0.6rem);
    display: grid;
    gap: clamp(0.6rem, 2.1vw, 0.95rem);
}

.dress-code-guidance h4 {
    font-family: var(--font-cursive);
    font-size: clamp(1.45rem, 5.8vw, 1.95rem);
    font-weight: 400;
    color: #866739;
    letter-spacing: 0.02em;
    line-height: 1.02;
}

.dress-code-guidance p {
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.8rem, 2.95vw, 0.95rem);
    line-height: 1.72;
    color: #5f5037;
    max-width: 34ch;
    margin: 0 auto;
}

.dress-code-guidance p + h4 {
    margin-top: clamp(0.25rem, 1vw, 0.45rem);
}

@media (max-width: 359px) {
    .palette-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-items: center;
    }
}

@media (min-width: 1025px) {
    .dress-code-content,
    .dress-code-copy,
    .palette-row {
        width: min(100%, 520px);
    }
}

/* ============================================================
   RSVP section (static placeholder)
   ============================================================ */
.rsvp-section {
    max-width: none;
    margin: 0;
    padding: clamp(2.8rem, 7vw, 3.9rem) 1rem clamp(3.4rem, 8vw, 4.7rem);
    text-align: center;
    background: transparent;
    overflow-x: hidden;
}

.rsvp-section .section-heading {
    margin-bottom: clamp(0.65rem, 2.5vw, 1rem);
}

.rsvp-intro {
    width: min(100%, 420px);
    margin: 0 auto clamp(1rem, 3.7vw, 1.5rem);
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.84rem, 3.1vw, 0.99rem);
    line-height: 1.65;
    color: #5f5037;
}

.rsvp-form {
    width: min(100%, 430px);
    margin: 0 auto;
    display: grid;
    gap: clamp(0.78rem, 3vw, 1.08rem);
    text-align: left;
}

.rsvp-field {
    display: grid;
    gap: 0.34rem;
}

.rsvp-field > span,
.rsvp-choice legend {
    font-family: var(--font-display);
    font-size: clamp(0.84rem, 3vw, 0.96rem);
    color: #866739;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.rsvp-field input {
    width: 100%;
    min-height: 44px;
    border-radius: 0.7rem;
    border: 1px solid rgba(172, 151, 120, 0.95);
    background: rgba(249, 230, 212, 0.62);
    color: #3d3020;
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.9rem, 3.2vw, 1rem);
    padding: 0.62rem 0.82rem;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.rsvp-field input:focus-visible {
    border-color: #866739;
    box-shadow: 0 0 0 2px rgba(134, 103, 57, 0.16);
    background: rgba(249, 230, 212, 0.78);
}

.rsvp-field input::placeholder {
    color: #8f7857;
}

.rsvp-choice {
    border: 1px solid rgba(172, 151, 120, 0.76);
    border-radius: 0.78rem;
    background: rgba(249, 230, 212, 0.42);
    padding: 0.72rem 0.82rem 0.84rem;
}

.rsvp-choice legend {
    padding: 0 0.25rem;
}

.rsvp-choice label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.86rem, 3.1vw, 0.98rem);
    color: #4b3b27;
}

.rsvp-choice input[type="radio"] {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #866739;
    flex: 0 0 auto;
}

.rsvp-submit {
    min-height: 44px;
    border-radius: 0.74rem;
    border: 1px solid rgba(134, 103, 57, 0.78);
    background: linear-gradient(
        to bottom,
        rgba(249, 230, 212, 0.98) 0%,
        rgba(236, 221, 196, 0.94) 100%
    );
    color: #866739;
    font-family: var(--font-display);
    font-size: clamp(0.93rem, 3.3vw, 1.03rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 180ms ease, transform 180ms ease;
}

.rsvp-submit:hover,
.rsvp-submit:focus-visible {
    opacity: 0.9;
    transform: translateY(-1px);
    outline: none;
}

.rsvp-success {
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.84rem, 3vw, 0.97rem);
    line-height: 1.6;
    color: #6e5a3a;
    text-align: center;
    margin-top: 0.2rem;
    padding: 0.45rem 0.2rem 0;
}

.rsvp-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 1025px) {
    .rsvp-form,
    .rsvp-intro {
        width: min(100%, 430px);
    }
}

/* ============================================================
   Location / map section
   ============================================================ */
.location-section {
    max-width: none;
    margin: 0;
    padding: clamp(2.9rem, 7.2vw, 4rem) 1rem clamp(3.6rem, 8.2vw, 4.9rem);
    text-align: center;
    background: transparent;
    overflow-x: hidden;
}

.location-section .section-heading {
    margin-bottom: clamp(0.68rem, 2.6vw, 1rem);
}

.location-content {
    width: min(100%, 430px);
    margin: 0 auto;
    display: grid;
    gap: clamp(0.42rem, 1.9vw, 0.72rem);
    justify-items: center;
}

.location-kicker {
    font-family: var(--font-display);
    font-size: clamp(0.76rem, 2.8vw, 0.9rem);
    color: #7a643f;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.location-content h3 {
    font-family: var(--font-cursive);
    font-size: clamp(2rem, 8.2vw, 2.9rem);
    font-weight: 400;
    color: #866739;
    line-height: 1.03;
    letter-spacing: 0.015em;
}

.location-place {
    font-family: var(--font-display);
    font-size: clamp(0.86rem, 3.1vw, 1.02rem);
    color: #6e5a3a;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.map-frame-wrap {
    position: relative;
    width: min(100%, 390px);
    margin: 1.5rem auto 1.25rem;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.map-embed {
    position: absolute;
    inset: 4.5% 5%;
    width: 90%;
    height: 91%;
    border: 0;
    border-radius: 0.875rem;
    z-index: 1;
    background: rgba(249, 230, 212, 0.4);
}

.map-decor-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    z-index: 2;
}

.location-map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.56rem 1rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(134, 103, 57, 0.72);
    background: rgba(249, 230, 212, 0.74);
    color: #866739;
    font-family: var(--font-display);
    font-size: clamp(0.87rem, 3.1vw, 0.98rem);
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: opacity 180ms ease, transform 180ms ease;
}

.location-map-link:hover,
.location-map-link:focus-visible {
    opacity: 0.88;
    transform: translateY(-1px);
    outline: none;
}

@media (min-width: 1025px) {
    .location-content {
        width: min(100%, 430px);
    }
}

/* ============================================================
   Closing section
   ============================================================ */
.closing-section {
    max-width: none;
    margin: 0;
    padding: clamp(3rem, 7.6vw, 4.2rem) 1rem clamp(4.8rem, 11vw, 6.2rem);
    text-align: center;
    background: transparent;
    overflow-x: hidden;
}

.closing-content {
    width: min(100%, 430px);
    margin: 0 auto;
    display: grid;
    gap: clamp(0.52rem, 2.2vw, 0.9rem);
    justify-items: center;
}

.closing-ornament {
    width: clamp(180px, 56vw, 248px);
    height: auto;
    margin: 0 auto clamp(0.1rem, 0.8vw, 0.3rem);
    opacity: 0.96;
    transform-origin: top center;
}

.closing-accent-line {
    width: clamp(120px, 38vw, 178px);
    height: auto;
    opacity: 0.8;
    margin-top: clamp(-0.1rem, -0.6vw, 0rem);
}

.closing-kicker {
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.86rem, 3vw, 1rem);
    color: #6f5939;
    letter-spacing: 0.08em;
}

.closing-content h2 {
    font-family: var(--font-cursive);
    font-size: clamp(2.45rem, 10.8vw, 3.9rem);
    font-weight: 400;
    color: #866739;
    line-height: 0.98;
    letter-spacing: 0.01em;
    margin-top: clamp(0.1rem, 0.6vw, 0.3rem);
}

.closing-divider {
    width: clamp(44px, 14vw, 72px);
    height: auto;
    opacity: 0.86;
    margin: clamp(0.15rem, 0.9vw, 0.4rem) auto;
}

.closing-note {
    width: min(100%, 360px);
    font-family: "Ovo", Georgia, serif;
    font-size: clamp(0.84rem, 3.02vw, 0.98rem);
    line-height: 1.72;
    color: #5f5037;
}

@keyframes closingSwayOnce {
    0% {
        transform: translateX(0) rotate(0deg);
        animation-timing-function: ease-out;
    }
    22% {
        transform: translateX(8px) rotate(-4.6deg);
        animation-timing-function: ease-in-out;
    }
    44% {
        transform: translateX(1px) rotate(-0.7deg);
        animation-timing-function: ease-in-out;
    }
    66% {
        transform: translateX(6px) rotate(-3.1deg);
        animation-timing-function: ease-in-out;
    }
    84% {
        transform: translateX(2px) rotate(-1.15deg);
        animation-timing-function: ease-in-out;
    }
    100% {
        transform: translateX(0) rotate(0deg);
    }
}

.closing-ornament.reveal-on-scroll.is-visible {
    animation: closingSwayOnce 1.85s linear 1 both;
}

@media (min-width: 1025px) {
    .closing-content {
        width: min(100%, 430px);
    }
}

/* ============================================================
   Audio toggle (shown after open)
   ============================================================ */
.audio-toggle {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: var(--z-audio);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: rgba(249, 230, 212, 0.85);
    color: var(--color-gold);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    box-shadow: 0 4px 14px rgba(42, 42, 42, 0.18);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--dur-med) var(--ease-elegant),
                transform var(--dur-med) var(--ease-elegant);
}

body.is-open .audio-toggle {
    opacity: 1;
    transform: translateY(0);
}

.audio-toggle:hover,
.audio-toggle:focus-visible {
    outline: none;
    background: rgba(249, 230, 212, 1);
}

.audio-toggle__icon {
    font-size: 0.9rem;
    line-height: 1;
    letter-spacing: -0.1em;
}

/* ============================================================
   Mood toggle (shown after open)
   ============================================================ */
.mood-toggle {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 3.3rem);
    z-index: var(--z-audio);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: rgba(249, 230, 212, 0.85);
    color: var(--color-gold);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    box-shadow: 0 4px 14px rgba(42, 42, 42, 0.18);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--dur-med) var(--ease-elegant),
                transform var(--dur-med) var(--ease-elegant),
                background-color 260ms ease;
}

body.is-open .mood-toggle {
    opacity: 1;
    transform: translateY(0);
}

.mood-toggle:hover,
.mood-toggle:focus-visible {
    outline: none;
    background: rgba(249, 230, 212, 1);
}

body.mood-night .mood-toggle,
body.mood-night .audio-toggle {
    background: rgba(77, 56, 35, 0.5);
    border-color: rgba(196, 162, 112, 0.76);
    color: #efd8b1;
}

.mood-toggle__icon {
    font-size: 1rem;
    line-height: 1;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    body.is-opening .envelope-gate,
    body.is-open .envelope-gate {
        opacity: 0;
        visibility: hidden;
    }

    body.is-open .hero-names,
    body.is-open .hero-divider {
        opacity: 1;
        transform: none;
    }

    .reveal-on-scroll,
    .reveal-on-scroll.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .closing-ornament.reveal-on-scroll.is-visible {
        animation: none !important;
    }

    .star {
        opacity: 0.14 !important;
        animation: none !important;
    }

    .event-location-main,
    .event-location-main::after {
        animation: none !important;
    }

    .envelope-gate::after {
        animation: none !important;
        opacity: 0 !important;
    }

    .mood-toggle,
    .audio-toggle,
    .site-main,
    .starfield {
        transition: none !important;
    }
}
