/* ============================================================
   ANN SWEETY & MASCHIO — "THE GOLDEN HOUR"
   A modern editorial wedding invitation.
   Warm porcelain paper, espresso ink, champagne bronze.
   Fraunces (display serif) + Manrope (grotesque sans).
   ============================================================ */

:root {
    --paper: #f8ead0;
    --paper-2: #f1ddb4;
    --ink: #2a1a06;
    --ink-2: #1a1103;
    --ink-soft: #7d5a28;
    --bronze: #cf8a0e;
    --bronze-soft: #eab13c;
    --line: rgba(42, 26, 6, 0.18);
    --line-strong: rgba(42, 26, 6, 0.42);
    --line-dark: rgba(248, 234, 208, 0.2);

    --font-serif: "Fraunces", "Georgia", serif;
    --font-sans: "Manrope", "Helvetica Neue", Arial, sans-serif;

    --pad-x: clamp(1.25rem, 5vw, 5.5rem);
    --pad-y: clamp(5rem, 14vh, 10rem);
    --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html {
    scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

body.no-scroll {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

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

em {
    font-style: italic;
}

::selection {
    background: var(--bronze);
    color: var(--paper);
}

:focus-visible {
    outline: 2px solid var(--bronze);
    outline-offset: 3px;
}

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.preloader-curtain {
    position: absolute;
    inset: 0;
    background: var(--ink-2);
}

.curtain-b {
    background: var(--bronze);
    transform: scaleY(0);
}

.preloader-center {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--paper);
}

.preloader-monogram {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: 0.35em;
    margin-bottom: 1.2rem;
    opacity: 0.85;
}

.preloader-count {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(4rem, 14vw, 9rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   SILK CANVAS + CURSOR
   ============================================================ */
#silk-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#cursor-dot,
#cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 150;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0;
}

#cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--ink);
    margin: -3px 0 0 -3px;
}

#cursor-ring {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line-strong);
    margin: -19px 0 0 -19px;
    transition: transform 0.35s var(--ease-out), border-color 0.35s;
}

body.cursor-hover #cursor-ring {
    transform: scale(1.7);
    border-color: var(--bronze);
}

@media (pointer: coarse) {

    #cursor-dot,
    #cursor-ring {
        display: none;
    }
}

/* ============================================================
   FIXED NAV
   ============================================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1rem, 2.5vw, 1.6rem) var(--pad-x);
    mix-blend-mode: difference;
    color: #f5f0e6;
    transition: transform 0.6s var(--ease-out);
}

.site-nav.nav-hidden {
    transform: translateY(-110%);
}

.nav-monogram {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.18em;
}

.nav-links {
    display: flex;
    gap: clamp(1.2rem, 3vw, 2.6rem);
}

.nav-link {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    position: relative;
    padding: 0.3em 0;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.45s var(--ease-out);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: clamp(0.9rem, 2vw, 1.5rem);
}

.nav-rsvp-btn {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 0.65em 1.6em;
    transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.nav-rsvp-btn:hover {
    background: var(--paper);
    color: var(--ink-2);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    align-items: center;
}

.menu-bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.4s var(--ease-out);
}

body.menu-open .menu-toggle .menu-bar:first-child {
    transform: translateY(3.75px) rotate(45deg);
}

body.menu-open .menu-toggle .menu-bar:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
}

/* ---------- Fullscreen menu ---------- */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--ink-2);
    color: var(--paper);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--pad-x);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
}

.menu-link {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2.2rem, 7.5vw, 4.6rem);
    line-height: 1.18;
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    width: fit-content;
    transition: color 0.35s, transform 0.5s var(--ease-out);
}

.menu-link:hover {
    color: var(--bronze-soft);
    transform: translateX(0.35em);
}

.menu-index {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    opacity: 0.5;
}

.menu-footer {
    position: absolute;
    bottom: clamp(1.5rem, 4vh, 3rem);
    left: var(--pad-x);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.55;
}

/* ============================================================
   MUSIC TOGGLE
   ============================================================ */
.music-toggle {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 95;
    width: 52px;
    height: 52px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: rgba(243, 237, 225, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: border-color 0.3s, transform 0.3s var(--ease-out);
}

.music-toggle:hover {
    border-color: var(--bronze);
    transform: scale(1.06);
}

.eq-bar {
    width: 2px;
    height: 6px;
    background: var(--ink);
    border-radius: 2px;
    transform-origin: bottom;
    transition: background 0.3s;
}

.music-toggle.playing .eq-bar {
    background: var(--bronze);
    animation: eq 0.9s ease-in-out infinite;
}

.music-toggle.playing .eq-bar:nth-child(2) {
    animation-delay: 0.18s;
}

.music-toggle.playing .eq-bar:nth-child(3) {
    animation-delay: 0.36s;
}

.music-toggle.playing .eq-bar:nth-child(4) {
    animation-delay: 0.54s;
}

@keyframes eq {

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

    50% {
        transform: scaleY(2.6);
    }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(6rem, 16vh, 9rem) var(--pad-x) clamp(5rem, 12vh, 7rem);
    /* transparent: the silk canvas shows through */
}

.hero-eyebrow {
    font-size: clamp(0.68rem, 1.4vw, 0.8rem);
    font-weight: 500;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: clamp(1.4rem, 4vh, 2.6rem);
}

.hero-title {
    font-family: var(--font-serif);
    font-weight: 330;
    font-variation-settings: "opsz" 144;
    font-size: clamp(3rem, 12.5vw, 11.5rem);
    line-height: 1.02;
    letter-spacing: -0.015em;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-line {
    display: block;
    white-space: nowrap;
}

/* split chars: mask each line so letters rise into view */
.hero-line .char-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
}

.hero-line .char {
    display: inline-block;
    will-change: transform;
}

.hero-amp-row {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 4vw, 2.5rem);
    margin: clamp(0.4rem, 1.5vh, 1.2rem) 0;
}

.hero-amp {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.6rem, 4.5vw, 3.6rem);
    color: var(--bronze);
    line-height: 1;
}

.hero-rule {
    display: block;
    width: clamp(3rem, 12vw, 11rem);
    height: 1px;
    background: var(--line-strong);
}

.hero-meta {
    margin-top: clamp(1.8rem, 5vh, 3.2rem);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9em;
    font-size: clamp(0.7rem, 1.5vw, 0.82rem);
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--bronze);
}

.hero-scroll-cue {
    position: absolute;
    bottom: clamp(1.2rem, 4vh, 2.4rem);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}

.cue-label {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.cue-line {
    width: 1px;
    height: 52px;
    background: var(--line-strong);
    position: relative;
    overflow: hidden;
}

.cue-line::after {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bronze);
    animation: cue-drop 2.2s var(--ease-out) infinite;
}

@keyframes cue-drop {
    0% {
        top: -100%;
    }

    55%,
    100% {
        top: 100%;
    }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
    background: var(--ink-2);
    color: var(--paper);
    overflow: hidden;
    padding: clamp(0.9rem, 2vw, 1.4rem) 0;
    border-top: 1px solid var(--ink-2);
}

.marquee-track {
    display: flex;
    width: max-content;
    white-space: nowrap;
    animation: marquee 36s linear infinite;
}

.marquee-chunk {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.marquee-item {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(1rem, 2.4vw, 1.5rem);
    letter-spacing: 0.06em;
    padding: 0 1.6rem;
}

.marquee-item em {
    color: var(--bronze-soft);
}

.marquee-star {
    color: var(--bronze);
    font-size: 0.8em;
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

/* ============================================================
   SHARED SECTION SCAFFOLD
   ============================================================ */
.section {
    position: relative;
    padding: var(--pad-y) var(--pad-x);
    background: var(--paper);
}

.section-head {
    max-width: 1400px;
    margin: 0 auto clamp(2.5rem, 7vh, 5rem);
}

.section-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--bronze);
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-eyebrow::after {
    content: "";
    flex: 0 0 clamp(2.5rem, 6vw, 5rem);
    height: 1px;
    background: var(--line-strong);
}

.section-title,
.display-title,
.rsvp-title {
    font-family: var(--font-serif);
    font-weight: 340;
    font-variation-settings: "opsz" 144;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.section-title em,
.display-title em,
.rsvp-title em {
    color: var(--bronze);
    font-weight: 300;
}

/* Gold sheen sweep across italic accent words (progressive enhancement) */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {

    .section-title em,
    .display-title em,
    .rsvp-title em {
        background-image: linear-gradient(100deg,
                var(--bronze) 0%,
                var(--bronze) 40%,
                #fff2cf 47%,
                var(--bronze-soft) 53%,
                var(--bronze) 60%,
                var(--bronze) 100%);
        background-size: 250% 100%;
        background-position: 100% 0;
        background-repeat: no-repeat;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        /* background-clip: text only paints ink inside the padding box, and
           italic Fraunces glyphs overhang it — the "j" swash reaches left of
           the box's start edge, the "?" leans past its end, descenders drop
           below it — so those strokes vanished. Pad the box out past the
           overhangs; negative side margins cancel the layout shift (vertical
           padding doesn't affect inline layout, so it needs no compensation). */
        padding: 0.15em 0.25em 0.35em;
        margin: 0 -0.25em;
    }

    .section-title em.sheen-run,
    .display-title em.sheen-run,
    .rsvp-title em.sheen-run {
        animation: accent-sheen 1.5s var(--ease-out) both;
    }
}

/* Slides the 250%-wide gradient from one fully-covering end to the other;
   past 100%/below 0% the no-repeat background stops covering the text and
   the transparent-fill letters vanish. */
@keyframes accent-sheen {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: 0% 0;
    }
}

/* Side padding keeps the reveal mask from shearing italic overhangs — the
   "j" swash starts left of the text origin and the "?" leans past the line's
   end — while the negative side margins cancel the layout shift. */
.dt-line {
    display: block;
    overflow: hidden;
    padding: 0 0.25em 0.1em;
    margin: 0 -0.25em -0.1em;
}

/* The reveal mask (overflow: hidden) clips whatever dips below the line box.
   Every display heading closes on an italic Fraunces accent word — "join us?",
   "families", "our loved ones" — whose deep descenders and swashes fall well
   past the 0.1em buffer above and were being cut off. Give the closing line
   extra bottom room so they clear the mask. Padding and negative margin cancel,
   so spacing to the following element is unchanged, and no line follows this one
   inside the heading to overlap. */
.dt-line:last-child {
    padding-bottom: 0.34em;
    margin-bottom: -0.34em;
}

.dt-line>.dt-inner {
    display: block;
    will-change: transform;
}

/* ============================================================
   INVITATION
   ============================================================ */
.invitation-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: start;
}

.invitation-display {
    position: sticky;
    top: 22vh;
}

.display-title {
    font-size: clamp(3rem, 8.5vw, 7.5rem);
}

.invitation-copy .lead {
    font-family: var(--font-serif);
    font-weight: 350;
    font-size: clamp(1.3rem, 2.6vw, 1.85rem);
    line-height: 1.45;
    margin-bottom: clamp(2rem, 5vh, 3rem);
}

.parents {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: clamp(1.6rem, 4vh, 2.4rem) 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.75;
}

.parents strong {
    color: var(--ink);
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.2em;
    letter-spacing: 0.01em;
}

.parents-amp {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--bronze);
    font-size: 1.4rem;
    line-height: 1;
}

.verse {
    margin-top: clamp(2rem, 5vh, 3rem);
    padding-left: 1.5rem;
    border-left: 1px solid var(--bronze);
}

.verse p {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 340;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.55;
    color: var(--ink);
}

.verse cite {
    display: block;
    margin-top: 0.9rem;
    font-family: var(--font-sans);
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown {
    background: var(--paper-2);
    text-align: center;
}

.countdown .section-head {
    margin-bottom: clamp(3rem, 8vh, 5rem);
}

.countdown .section-eyebrow {
    justify-content: center;
}

.countdown .section-eyebrow::before {
    content: "";
    flex: 0 0 clamp(2.5rem, 6vw, 5rem);
    height: 1px;
    background: var(--line-strong);
}

.countdown-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: clamp(0.8rem, 3.5vw, 3rem);
    flex-wrap: wrap;
}

.count-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    min-width: 4.5ch;
}

.count-num {
    font-family: var(--font-serif);
    font-weight: 300;
    font-variation-settings: "opsz" 144;
    font-size: clamp(3.4rem, 10vw, 8rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.count-label {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.count-sep {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2rem, 6vw, 4.5rem);
    color: var(--bronze);
    transform: translateY(-0.4em);
}

.countdown-note {
    margin-top: clamp(2.5rem, 6vh, 4rem);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* ============================================================
   ITINERARY
   ============================================================ */
/* base paper again: the deeper countdown band above needs to read as its
   own section, not run straight into the itinerary */
.itinerary {
    background: var(--paper);
}

.event-list {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--line);
}

.event-row {
    display: grid;
    grid-template-columns: minmax(140px, 0.35fr) 1fr auto;
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: clamp(2.2rem, 6vh, 3.8rem) 0;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.event-time {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.event-clock {
    font-family: var(--font-serif);
    font-weight: 340;
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    line-height: 1;
}

.event-day {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.event-body h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    line-height: 1.15;
    margin-bottom: 0.7rem;
}

.event-venue {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.event-address {
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.event-actions {
    margin-top: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
}

.event-num {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
    align-self: center;
}

/* text buttons with underline sweep */
.text-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 0.3em 0;
    position: relative;
    color: var(--ink);
}

.text-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.4s var(--ease-out);
}

.text-btn:hover svg {
    transform: translate(2px, -2px);
}

.text-btn::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--bronze);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.45s var(--ease-out);
}

.text-btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.text-btn.danger {
    color: #9c3b2e;
}

.map-frame {
    max-width: 1400px;
    margin: clamp(2.5rem, 7vh, 4.5rem) auto 0;
    border: 1px solid var(--line);
    padding: clamp(0.5rem, 1.2vw, 0.9rem);
    background: var(--paper);
}

.map-frame iframe {
    display: block;
    filter: grayscale(1) sepia(0.18) contrast(0.95);
    width: 100%;
}

/* ============================================================
   RSVP — the dark centerpiece
   ============================================================ */
.rsvp {
    background: var(--ink-2);
    color: var(--paper);
}

.rsvp-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(3rem, 7vw, 7rem);
    align-items: start;
}

.rsvp-intro {
    position: sticky;
    top: 18vh;
}

.section-eyebrow.on-dark {
    color: var(--bronze-soft);
}

.section-eyebrow.on-dark::after {
    background: var(--line-dark);
}

.rsvp-title {
    font-size: clamp(3rem, 8.5vw, 7rem);
    color: var(--paper);
}

.rsvp-title em {
    color: var(--bronze-soft);
}

.rsvp-deadline {
    margin-top: clamp(1.6rem, 4vh, 2.4rem);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: rgba(243, 237, 225, 0.66);
}

.rsvp-deadline strong {
    color: var(--paper);
    font-weight: 600;
}

.rsvp-note {
    margin-top: 1.2rem;
    max-width: 38ch;
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(243, 237, 225, 0.6);
}

/* ---------- form ---------- */
.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: clamp(1.8rem, 4vh, 2.6rem);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    border: none;
}

.field label,
.field legend {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(243, 237, 225, 0.55);
    padding: 0;
}

.field legend {
    margin-bottom: 0.7rem;
}

.optional {
    opacity: 0.6;
    text-transform: none;
    letter-spacing: 0.08em;
}

.field input[type="text"],
.field input[type="tel"],
.field textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line-dark);
    color: var(--paper);
    font-family: var(--font-serif);
    font-weight: 350;
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    padding: 0.45em 0;
    border-radius: 0;
    transition: border-color 0.4s;
}

.field textarea {
    resize: vertical;
    min-height: 2.8em;
    line-height: 1.5;
}

.field input::placeholder,
.field textarea::placeholder {
    color: rgba(243, 237, 225, 0.28);
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-bottom-color: var(--bronze-soft);
}

/* segmented attendance control */
.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    overflow: hidden;
}

.segment {
    position: relative;
    display: block;
    cursor: pointer;
}

.segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segment-face {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em 0.8em;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(243, 237, 225, 0.55);
    transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
    text-align: center;
}

.segment input:checked+.segment-face {
    background: var(--paper);
    color: var(--ink);
}

.segment input:focus-visible+.segment-face {
    outline: 2px solid var(--bronze-soft);
    outline-offset: -4px;
    border-radius: 999px;
}

/* collapsible attending details */
.rsvp-details {
    display: flex;
    flex-direction: column;
    gap: clamp(1.8rem, 4vh, 2.6rem);
    overflow: hidden;
    transition: max-height 0.6s var(--ease-out), opacity 0.5s, margin 0.5s;
    max-height: 260px;
}

.rsvp-details.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: calc(-1 * clamp(1.8rem, 4vh, 2.6rem));
    pointer-events: none;
}

/* guest stepper */
.stepper {
    display: inline-flex;
    align-items: center;
    gap: 1.4rem;
}

.step-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1;
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.step-btn:hover {
    border-color: var(--bronze-soft);
    color: var(--bronze-soft);
}

.step-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.step-value {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 340;
    min-width: 1.4ch;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* submit */
.rsvp-submit {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--paper);
    color: var(--ink);
    border-radius: 999px;
    padding: 1.1em 2.4em;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    transition: background 0.4s var(--ease-out), transform 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.rsvp-submit svg {
    width: 16px;
    height: 16px;
    transition: transform 0.4s var(--ease-out);
}

.rsvp-submit:hover {
    background: var(--bronze-soft);
    transform: translateY(-2px);
}

.rsvp-submit:hover svg {
    transform: translateX(4px);
}

.rsvp-form-hint {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: rgba(243, 237, 225, 0.4);
}

/* ============================================================
   GUESTBOOK
   ============================================================ */
.guestbook {
    background: var(--paper);
}

.wish-wall {
    max-width: 1400px;
    margin: 0 auto;
    columns: 3;
    column-gap: clamp(1.2rem, 2.5vw, 2rem);
}

.wish-card {
    break-inside: avoid;
    border: 1px solid var(--line);
    padding: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: clamp(1.2rem, 2.5vw, 2rem);
    background: var(--paper);
    transition: border-color 0.4s;
}

.wish-card:hover {
    border-color: var(--bronze);
}

.wish-quote {
    font-family: var(--font-serif);
    font-weight: 340;
    font-style: italic;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.55;
    margin-bottom: 1.4rem;
    overflow-wrap: anywhere;
}

.wish-author {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.wish-date {
    margin-top: 0.25rem;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
}

.wish-empty {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--ink-soft);
}

@media (max-width: 999px) {
    .wish-wall {
        columns: 2;
    }
}

@media (max-width: 639px) {
    .wish-wall {
        columns: 1;
    }
}

/* ============================================================
   FOOTER — transparent, silk shows through again
   ============================================================ */
.footer {
    position: relative;
    text-align: center;
    padding: clamp(6rem, 18vh, 11rem) var(--pad-x) clamp(1.6rem, 4vh, 2.6rem);
    /* mostly transparent to reveal the fixed silk canvas; the gradient
       dissolves the hard edge against the guestbook section above */
    background: linear-gradient(180deg, var(--paper) 0%, rgba(248, 234, 208, 0) 26%);
}

.footer-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 1.6rem;
}

.footer-names {
    font-family: var(--font-serif);
    font-weight: 320;
    font-variation-settings: "opsz" 144;
    font-size: clamp(2.6rem, 9vw, 8rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    column-gap: 0.35em;
}

.footer-names em {
    color: var(--bronze);
    font-size: 0.55em;
}

.footer-meta {
    margin-top: 1.6rem;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.footer-bottom {
    margin-top: clamp(4rem, 10vh, 7rem);
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    /* the fixed music toggle floats over the bottom-right corner; keep the
       "Guest list" trigger clear of it */
    padding-right: calc(clamp(1rem, 3vw, 2rem) + 64px);
}

.admin-trigger {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 2px;
    transition: color 0.3s, border-color 0.3s;
}

.admin-trigger:hover {
    color: var(--bronze);
    border-color: var(--bronze);
}

/* ============================================================
   MODALS (RSVP success + admin)
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 170;
    background: rgba(18, 15, 11, 0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s, visibility 0.45s;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--paper);
    color: var(--ink);
    max-width: 480px;
    width: 100%;
    padding: clamp(2.2rem, 6vw, 3.5rem);
    text-align: center;
    border: 1px solid var(--line);
    transform: translateY(24px);
    transition: transform 0.5s var(--ease-out);
}

.modal.open .modal-card {
    transform: translateY(0);
}

.modal-monogram {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: var(--bronze);
    margin-bottom: 1.2rem;
}

.modal-card h2 {
    font-family: var(--font-serif);
    font-weight: 340;
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 1rem;
}

.modal-card p {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.7;
}

.modal-btn {
    margin-top: 2rem;
    background: var(--ink);
    color: var(--paper);
    border-radius: 999px;
    padding: 1em 2.6em;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    transition: background 0.4s;
}

.modal-btn:hover {
    background: var(--bronze);
}

/* admin */
[hidden] {
    display: none !important;
}

.admin-card {
    position: relative;
    max-width: 1040px;
    text-align: left;
    max-height: 86vh;
    overflow-y: auto;
}

.admin-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: border-color 0.3s, transform 0.3s;
}

.admin-close:hover {
    border-color: var(--bronze);
    transform: rotate(90deg);
}

.admin-close svg {
    width: 15px;
    height: 15px;
}

.admin-card h2 {
    margin-bottom: 1.6rem;
}

/* lock screen (passcode gate) */
.admin-lock {
    max-width: 420px;
    margin: 0 auto;
    padding: 1.2rem 0 2.4rem;
    text-align: center;
}

.admin-lock-text {
    margin-bottom: 1.8rem;
    line-height: 1.7;
}

.admin-lock-row {
    display: flex;
    gap: 0.8rem;
    align-items: stretch;
}

.admin-passcode-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.9em 1.4em;
    font: inherit;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-align: center;
    color: var(--ink);
    transition: border-color 0.3s;
}

.admin-passcode-input:focus {
    outline: none;
    border-color: var(--bronze);
}

.admin-lock .modal-btn {
    margin-top: 0;
    padding: 1em 1.9em;
    flex-shrink: 0;
}

.admin-lock .modal-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.admin-lock-error {
    color: #9c3b2e;
    font-size: 0.82rem;
    margin-top: 1.1rem;
}

/* data-source note above the stats */
.admin-source {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 1.2rem;
}

.admin-source::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line);
    flex-shrink: 0;
}

.admin-source.live::before {
    background: #4c6a2c;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-bottom: 1.6rem;
}

.stat-tile {
    background: var(--paper);
    padding: 1.1rem 1.2rem;
}

.stat-num {
    font-family: var(--font-serif);
    font-weight: 340;
    font-size: 2rem;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 1.4rem;
}

/* clear-guest-list confirmation (requires re-entering the passcode) */
.admin-clear-confirm {
    max-width: 560px;
    margin-bottom: 1.4rem;
    padding: 1.1rem 1.3rem 1.2rem;
    border: 1px solid rgba(156, 59, 46, 0.4);
    background: rgba(156, 59, 46, 0.05);
}

.admin-clear-text {
    font-size: 0.85rem;
    line-height: 1.65;
    color: #9c3b2e;
    margin-bottom: 1rem;
}

.admin-clear-confirm .admin-lock-row {
    align-items: center;
}

.admin-clear-delete-btn {
    margin-top: 0;
    padding: 1em 1.9em;
    flex-shrink: 0;
    background: #9c3b2e;
}

.admin-clear-delete-btn:hover {
    background: #7d2f24;
}

.admin-clear-delete-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.admin-clear-confirm .admin-lock-error {
    margin-top: 0.9rem;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    min-width: 760px;
}

.admin-table th {
    text-align: left;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper-2);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    overflow-wrap: anywhere;
}

.admin-table td.wish-cell {
    max-width: 240px;
    min-width: 160px;
}

.pill {
    display: inline-block;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.35em 0.9em;
    border-radius: 999px;
    white-space: nowrap;
}

.pill.yes {
    background: rgba(96, 128, 63, 0.14);
    color: #4c6a2c;
}

.pill.no {
    background: rgba(156, 59, 46, 0.12);
    color: #9c3b2e;
}

.empty-row td {
    text-align: center;
    font-style: italic;
    color: var(--ink-soft);
    padding: 2rem 1rem;
}

/* ============================================================
   CONFETTI
   ============================================================ */
.confetti-piece {
    position: fixed;
    z-index: 180;
    pointer-events: none;
    will-change: transform;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 899px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .invitation-grid,
    .rsvp-grid {
        grid-template-columns: 1fr;
    }

    .invitation-display,
    .rsvp-intro {
        position: static;
    }

    .event-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .event-num {
        position: absolute;
        top: clamp(2.2rem, 6vh, 3.8rem);
        right: 0;
        align-self: flex-start;
    }
}

@media (max-width: 639px) {
    .rsvp-details {
        max-height: 520px;
    }

    .segment-face {
        font-size: 0.66rem;
        letter-spacing: 0.1em;
        padding: 1.1em 0.5em;
    }

    .countdown-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1rem;
        justify-items: center;
    }

    .count-sep {
        display: none;
    }

    .rsvp-submit {
        align-self: stretch;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.8rem;
        /* stacked + centered: clear the music toggle below, not beside */
        padding-right: 0;
        padding-bottom: calc(clamp(1rem, 3vw, 2rem) + 52px);
    }

    .admin-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .admin-clear-confirm .admin-lock-row {
        flex-wrap: wrap;
    }

    .admin-clear-confirm .admin-passcode-input {
        flex-basis: 100%;
    }
}

/* Short landscape viewports (phones held sideways): the full-size display
   type and tall paddings overflow a ~360px-high screen, so scale the hero
   down and drop the scroll cue. */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding-top: clamp(4.5rem, 14vh, 6rem);
        padding-bottom: 3rem;
    }

    .hero-title {
        font-size: clamp(2.4rem, 9vh, 5rem);
    }

    .hero-eyebrow {
        margin-bottom: 1rem;
    }

    .hero-meta {
        margin-top: 1.2rem;
    }

    .hero-scroll-cue {
        display: none;
    }

    .menu-link {
        font-size: clamp(1.4rem, 9vh, 2.4rem);
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

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

    .marquee-track {
        animation: none;
        transform: none;
    }

    .cue-line::after {
        animation: none;
        top: 0;
    }

    /* accent words rest as static gold; no sheen sweep */
    .section-title em,
    .display-title em,
    .rsvp-title em {
        animation: none !important;
        background-position: 0 0;
    }
}
