:root {
    --wine: #3a0b16;
    --wine-2: #6d1526;
    --gold: #c9a24b;
    --gold-light: #e9d29a;
    --ivory: #fbf6ee;
    --ink: #2a1c1d;
    --muted: #7b6a68;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --script: 'Great Vibes', cursive;
    --sans: 'Jost', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { background: var(--ivory); color: var(--ink); font: 300 16px/1.6 var(--sans); overflow-x: hidden; }
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; }
h2 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 2rem; }
h3 { font-size: 1.5rem; }

.eyebrow { font-size: .7rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); margin-bottom: .75rem; }

.btn { display: inline-block; border: 1px solid transparent; border-radius: 999px; padding: .95rem 2rem; font: 500 .72rem var(--sans); letter-spacing: .24em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform .2s, filter .2s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--gold)); color: var(--wine); }
.btn-wine { background: var(--wine); color: var(--gold-light); }
.btn-outline { border-color: var(--gold); color: var(--gold-light); }
.btn-outline-wine { border-color: var(--wine); color: var(--wine); background: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Cover */
.cover { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 50% 30%, var(--wine-2), var(--wine) 70%); transition: opacity .8s, visibility .8s; }
.cover.gone { opacity: 0; visibility: hidden; }
.cover-card { width: min(100%, 380px); text-align: center; color: var(--ivory); border: 1px solid var(--gold); outline: 1px solid rgba(201, 162, 75, .4); outline-offset: 8px; border-radius: 200px 200px 12px 12px; padding: 5.5rem 1.5rem 3rem; }
.monogram { font: 400 4.5rem/1.2 var(--serif); margin: 1rem 0 .5rem; }
.monogram span { font-family: var(--script); color: var(--gold); font-size: .8em; }
.cover-date { letter-spacing: .4em; font-size: .85rem; margin-bottom: 2.5rem; }

.motion-opt { display: block; margin: 1.25rem auto 0; background: none; border: 0; color: var(--gold-light); font: 400 .8rem var(--sans); text-decoration: underline; cursor: pointer; }

.music { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 90; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--gold); background: var(--wine); color: var(--gold-light); font-size: 1.25rem; cursor: pointer; }
.music[aria-pressed="true"] { animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(201, 162, 75, .22); } }

/* Hero (static layout; the scroll-driven version is further down) */
.hero { background: radial-gradient(circle at 50% 0, var(--wine-2), var(--wine) 65%); color: var(--ivory); text-align: center; }
.hero .stage { display: grid; gap: 2.5rem; align-items: center; justify-items: center; padding: 2rem 1.25rem 4rem; }
.arch { width: min(100%, 440px); aspect-ratio: 4 / 5; border-radius: 999px 999px 14px 14px; overflow: hidden; border: 1px solid var(--gold); padding: 8px; }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 48% top; border-radius: 999px 999px 8px 8px; }
.intro, .dots { display: none; }
.hero-text { max-width: 34rem; }
.hero h1 { display: flex; flex-direction: column; gap: .15rem; }
.name { font-size: clamp(2rem, 8.5vw, 3.6rem); }
.amp { font: 400 3rem/1.1 var(--script); color: var(--gold); }
.lead { font: italic 400 1.2rem var(--serif); margin-top: .75rem; opacity: .9; }
.date { font: 500 1.7rem var(--serif); color: var(--gold-light); margin-top: 1.5rem; }
.place { font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; opacity: .75; }
.count-section .countdown { max-width: 30rem; margin: 0 auto 2.5rem; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.countdown div { border: 1px solid rgba(201, 162, 75, .5); border-radius: 10px; padding: 1rem .25rem; }
.countdown b { display: block; font: 600 2.2rem var(--serif); font-variant-numeric: tabular-nums; }
.countdown small { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }

@media (min-width: 900px) {
    .hero .stage { grid-template-columns: 1fr 1fr; min-height: 100vh; padding: 3rem 4vw; column-gap: 4vw; }
    .arch { justify-self: end; width: min(100%, 500px); }
    .hero-text { justify-self: start; }
}

/* Sections */
.section { padding: 5rem 1.25rem; text-align: center; }
.section-wine { background: var(--wine); color: var(--ivory); }
.section-tint { background: #f2e9da; }

.timeline { list-style: none; max-width: 28rem; margin: 0 auto; }
.timeline li { position: relative; padding: 0 0 2.5rem; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 50%; bottom: .5rem; height: 1.5rem; width: 1px; background: var(--gold); }
.timeline time { display: block; font: 400 2.4rem var(--serif); color: var(--wine-2); }
.timeline p { color: var(--muted); }

.map { max-width: 56rem; height: 22rem; margin: 0 auto 2rem; border: 1px solid var(--gold); padding: 8px; border-radius: 18px; }
.map iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); max-width: 56rem; margin: 0 auto 2rem; }
.cards article { background: #fff; border: 1px solid #ecdfc6; border-radius: 120px 120px 14px 14px; padding: 2.75rem 1.5rem 2rem; }
.swatches { display: flex; justify-content: center; gap: .5rem; margin-top: .75rem; }
.swatches i { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1px solid #d8ccb5; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2rem; font-size: .68rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--wine-2); }

.prose { max-width: 36rem; margin: 0 auto 2rem; font: 400 1.25rem/1.6 var(--serif); }
.gifts { list-style: none; max-width: 26rem; margin: 0 auto; display: grid; gap: .75rem; }
.gifts li { display: grid; grid-template-columns: 4rem 1fr auto; align-items: center; gap: .5rem; background: #fff; border-radius: 999px; padding: .6rem .6rem .6rem 1.25rem; text-align: left; }
.gifts span { color: var(--wine-2); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.gifts strong { font-weight: 500; letter-spacing: .05em; white-space: nowrap; }
.gifts button { border: 1px solid var(--gold); background: none; border-radius: 999px; padding: .4rem .9rem; font: 500 .65rem var(--sans); letter-spacing: .15em; text-transform: uppercase; cursor: pointer; }
.gift-name { margin-top: 1.25rem; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

/* RSVP */
.panel { max-width: 30rem; margin: 0 auto; background: #fff; border: 1px solid #ecdfc6; border-radius: 22px; padding: 2rem 1.25rem; box-shadow: 0 30px 60px -35px rgba(58, 11, 22, .45); }
.price { border: 1px solid var(--gold); background: #fcf7ea; border-radius: 14px; padding: 1rem; margin-bottom: 1.5rem; }
.price span { display: block; font-size: .65rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.price strong { font: 600 2rem var(--serif); }
form { display: grid; gap: 1rem; text-align: left; }
label { font-size: .68rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
label em { font-style: normal; text-transform: none; letter-spacing: 0; }
input { display: block; width: 100%; margin-top: .4rem; padding: .9rem 1rem; border: 1px solid #e6dccb; border-radius: 12px; background: var(--ivory); font: 400 16px var(--sans); color: var(--ink); }
input:focus { border-color: var(--gold); }
.status { margin: 1rem 0; font-size: .92rem; color: var(--wine-2); }
.status:empty { margin: 0; }
.status.ok { color: #1f6b3f; }
.ticket { margin-top: 1.5rem; padding: 1.5rem 1rem; border: 2px dashed var(--gold); border-radius: 18px; }
.ticket img { margin: 0 auto 1rem; width: 220px; height: 220px; }
.ticket-name { font: 600 1.5rem var(--serif); }
.ticket-ref { font-size: .8rem; color: var(--muted); margin-bottom: 1rem; overflow-wrap: anywhere; }
.fine { font-size: .8rem; color: var(--muted); margin-top: .75rem; }
.help { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #eee3cf; font-size: .88rem; color: var(--muted); }
.help a { display: inline-block; margin: .5rem .6rem 0; color: var(--wine-2); font-weight: 500; }

footer { background: var(--wine); color: var(--ivory); text-align: center; padding: 4rem 1.25rem 6rem; font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; }
.signature { font: 400 2.8rem var(--script); color: var(--gold-light); letter-spacing: 0; text-transform: none; }
.credit { margin-top: 2rem; opacity: .65; }
.credit a { color: var(--gold); }

/* Scroll-stopping scenes: each holds the screen while --p runs from 0 to 1. Phone sizes first. */
.motion .scene .stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

.motion .hero { height: 300vh; height: 300svh; background: var(--wine); }
.motion .hero .stage {
    --s: clamp(0, (var(--p, 0) - .04) * 2.8, 1);
    --end-w: min(76vw, 40svh); --end-h: 47svh; --end-x: 50%; --end-top: 2svh;
    display: block; padding: 0; background: radial-gradient(circle at 50% 20%, var(--wine-2), var(--wine) 70%);
}
.motion .arch {
    position: absolute; aspect-ratio: auto; margin: 0; transform: translateX(-50%);
    top: calc(var(--end-top) * var(--s));
    left: calc(50% + (var(--end-x) - 50%) * var(--s));
    width: calc(100% + (var(--end-w) - 100%) * var(--s));
    height: calc(100svh + (var(--end-h) - 100svh) * var(--s));
    padding: calc(7px * var(--s)); border-width: calc(1px * var(--s));
    border-radius: calc(999px * var(--s)) calc(999px * var(--s)) calc(14px * var(--s)) calc(14px * var(--s));
}
.motion .arch img { border-radius: inherit; transform: scale(calc(1.12 - .12 * var(--s))); transform-origin: 50% 20%; }
.motion .intro {
    display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
    position: absolute; inset: 0; padding: 0 1rem calc(1.5rem + env(safe-area-inset-bottom));
    background: linear-gradient(transparent 45%, rgba(30, 4, 10, .92));
    opacity: calc(1 - var(--p, 0) * 7); transform: translateY(calc(var(--p, 0) * -240px)); pointer-events: none;
}
.intro-names { font: 400 clamp(3rem, 15vw, 7rem)/1.15 var(--script); color: var(--gold-light); }
.cue { margin-top: 1.5rem; font-size: .62rem; letter-spacing: .4em; text-transform: uppercase; }
.cue::after { content: ""; display: block; width: 1px; height: 2.5rem; margin: .5rem auto 0; background: var(--gold); animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.motion .hero-text { position: absolute; left: 0; right: 0; bottom: 0; top: 49svh; margin: 0 auto; padding: 0 1rem; display: flex; flex-direction: column; justify-content: center; }
.motion .hero .eyebrow.line { margin-bottom: .5rem; }
.motion .amp { font-size: 2.4rem; }
.motion .lead { margin-top: .25rem; font-size: 1.05rem; }
.motion .date { margin-top: .75rem; }
.motion .line { --t: clamp(0, (var(--p, 0) - var(--from)) * 9, 1); display: block; opacity: var(--t); transform: translateY(calc((1 - var(--t)) * 36px)); }
.motion .line.from-left { transform: translateX(calc((1 - var(--t)) * -70vw)); }
.motion .line.from-right { transform: translateX(calc((1 - var(--t)) * 70vw)); }
.motion .line.pop { transform: scale(calc(2.2 - 1.2 * var(--t))); }

.motion .day { height: calc(var(--steps) * 100vh); height: calc(var(--steps) * 100svh); }
.motion .day .stage { display: flex; flex-direction: column; justify-content: center; padding-top: 2rem; padding-bottom: 2rem; transition: background-color .5s, color .5s; }
.motion .day[data-step="1"] .stage { background: #f2e9da; }
.motion .day[data-step="2"] .stage { background: var(--wine); color: var(--ivory); }
.motion .day[data-step="2"] .stage :is(time, p) { color: var(--gold-light); }
.motion .day .timeline { display: grid; width: 100%; }
.motion .day .timeline li { grid-area: 1 / 1; padding: 0; opacity: 0; transform: translateY(60px) scale(.7); filter: blur(8px); transition: opacity .45s, transform .6s cubic-bezier(.2, 1.4, .4, 1), filter .45s; }
.motion .day .timeline li::after { display: none; }
.motion .day .timeline li.past { transform: translateY(-60px) scale(1.25); }
.motion .day .timeline li.active { opacity: 1; transform: none; filter: none; }
.motion .day .timeline time { font-size: clamp(5rem, 30vw, 10rem); line-height: 1.05; }
.motion .day .timeline h3 { font-size: 2rem; }
.motion .dots { display: flex; justify-content: center; gap: .6rem; margin-top: 3rem; }
.dots i { width: 2rem; height: 3px; border-radius: 3px; background: var(--gold); opacity: .25; transition: opacity .3s; }
.dots i.active { opacity: 1; }

@media (min-width: 900px) {
    .motion .hero .stage { --end-w: min(38vw, 68svh); --end-h: 88svh; --end-x: 28%; --end-top: 6svh; }
    .motion .hero-text { top: 0; left: 50%; right: 3vw; max-width: none; }
    .motion .name { font-size: clamp(2.4rem, 4.2vw, 4rem); }
}

/* Staggered entrances */
.js .reveal :is(.cards article, .gifts li, .map) { opacity: 0; transform: translateY(50px) scale(.94); transition: opacity .7s, transform .8s cubic-bezier(.2, 1.3, .4, 1); }
.js .reveal.shown :is(.cards article, .gifts li, .map) { opacity: 1; transform: none; }
.js .reveal.shown :is(.cards article, .gifts li):nth-child(2) { transition-delay: .15s; }
.js .reveal.shown :is(.cards article, .gifts li):nth-child(3) { transition-delay: .3s; }

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s; }
.js .reveal.shown { opacity: 1; transform: none; }

html.still { scroll-behavior: auto; }
html.still *, html.still *::before, html.still *::after { animation: none !important; transition: none !important; }
