:root {
  --surface: #fff7ed;
  --surface-deep: #f2ddcd;
  --ink: #38251f;
  --accent: #b8663d;
  --rsvp: #1d2d4e;
  --hero-overlay: rgba(14,18,35,.28);
  --gold: #c79a54;
  --night: #101a35;
  --blush: #e8b8ae;
  --base-size: 16px;
  --name-size: 62px;
  --display: "Forum", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--serif); font-size: var(--base-size); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img, video { display: block; width: 100%; }
[hidden] { display: none !important; }

.desktop-stage { display: none; }
.invitation-shell { position: relative; width: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; background: var(--surface); box-shadow: 0 0 80px rgba(0,0,0,.38); }
.progress { position: fixed; z-index: 80; top: 0; left: 0; width: 100%; max-width: 480px; height: 3px; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg,var(--accent),#f5d283); }

.hero { position: relative; min-height: 100svh; overflow: hidden; background: var(--night); color: #fff8e8; isolation: isolate; }
.hero-poster-picture, .hero-poster, .hero-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-poster-picture { z-index: -4; pointer-events: none; }
.hero-poster-picture img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-poster { z-index: -4; }
.hero-film { z-index: -3; opacity: 1; transition: opacity .7s ease; }
.hero.is-ready .hero-film { opacity: 0; pointer-events: none; }
.hero-shade { position: absolute; z-index: -2; inset: 0; background: linear-gradient(180deg,rgba(3,8,24,.68) 0%,rgba(3,8,24,.12) 32%,transparent 58%,rgba(8,10,20,.38) 100%),var(--hero-overlay); opacity: .84; transition: opacity 1s ease; }
.hero.is-ready .hero-shade { opacity: .72; }

.intro-trigger { position: absolute; z-index: 4; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; width: 100%; padding: 24px; border: 0; background: linear-gradient(180deg,rgba(5,10,31,.05),rgba(5,10,31,.36)); color: #fff7e8; cursor: pointer; text-align: center; transition: opacity .45s ease,visibility .45s ease; }
.intro-trigger.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.moon-mark { width: 76px; aspect-ratio: 1; margin-bottom: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 32%,#fff 0 6%,#f7eed5 38%,#b8c7e8 100%); box-shadow: 0 0 28px rgba(239,243,255,.68); }
.intro-kicker { font-family: var(--sans); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; }
.intro-trigger strong { font-family: var(--display); font-size: clamp(30px,9vw,42px); font-weight: 400; letter-spacing: .02em; }
.skip-intro { position: absolute; z-index: 5; right: 18px; bottom: 22px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 8px 14px; background: rgba(11,16,39,.42); color: #fff; font: 500 10px/1 var(--sans); letter-spacing: .13em; text-transform: uppercase; backdrop-filter: blur(8px); }

.hero-copy { position: absolute; z-index: 2; top: max(60px,calc(env(safe-area-inset-top) + 42px)); inset-inline: 18px; text-align: center; opacity: 0; transform: translateY(-18px); transition: opacity .9s ease .15s,transform .9s cubic-bezier(.2,.8,.2,1) .15s; text-shadow: 0 2px 20px rgba(0,0,0,.75); }
.hero.is-ready .hero-copy { opacity: 1; transform: none; }
.hero-kicker, .eyebrow { margin: 0 0 10px; font: 500 10px/1.3 var(--sans); letter-spacing: .24em; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: var(--display); font-size: clamp(40px,calc(var(--name-size) * .76),60px); font-weight: 400; line-height: .82; }
.hero h1 span { display: block; max-width: 100%; overflow-wrap: anywhere; }
.hero h1 em { display: block; margin: 3px 0 2px; color: #f0c77a; font: italic 24px/1 var(--serif); }
.hero-families { max-width: 360px; margin: 8px auto 0; }
.hero-family { margin: 3px 0; color: rgba(255,248,232,.9); font-size: 11px; line-height: 1.25; }
.hero-family span:first-child { margin-right: 3px; color: #f0c77a; font-style: italic; }
.hero-date { margin: 10px 0 4px; font: 500 13px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.hero-venue { margin: 0; font-size: 16px; }
.hero-scroll { position: absolute; z-index: 3; bottom: 12px; left: 50%; display: grid; justify-items: center; gap: 3px; color: #fff; text-decoration: none; opacity: 0; transform: translateX(-50%); transition: opacity .6s ease 1s; }
.hero.is-ready .hero-scroll { opacity: .8; }
.hero-scroll span { width: 1px; height: 16px; background: currentColor; }
.hero-scroll small { font: 500 8px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }

.section { position: relative; padding: 76px 24px; overflow: hidden; }
.section-heading { max-width: 360px; margin: 0 auto 34px; text-align: center; }
.section-heading h2, .rsvp h2 { margin: 0; font: 400 clamp(40px,12vw,58px)/.95 var(--display); }
.section-heading .eyebrow, .welcome .eyebrow { color: var(--accent); }
.welcome { text-align: center; background: radial-gradient(circle at 50% 18%,rgba(232,184,174,.27),transparent 34%),var(--surface); }
.script-title { margin: 0; font: italic 500 clamp(48px,15vw,70px)/1 var(--serif); color: var(--accent); }
.sun-rule { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 20px auto; color: var(--gold); }
.sun-rule i { width: 78px; height: 1px; background: currentColor; }
.sun-rule b { font-size: 24px; font-weight: 400; }
.welcome-copy { max-width: 330px; margin: 0 auto 22px; font-size: 20px; line-height: 1.45; }

.date-sun { position: relative; width: 196px; aspect-ratio: 1; margin: 34px auto 0; border: 1px solid rgba(199,154,84,.55); border-radius: 50%; padding: 0; overflow: hidden; background: var(--night); color: #fff8e8; box-shadow: 0 18px 42px rgba(65,34,24,.2); cursor: pointer; }
.date-moon, .date-copy { position: absolute; inset: 0; display: grid; place-content: center; border-radius: inherit; transition: opacity .8s ease,transform 1s cubic-bezier(.2,.8,.2,1); }
.date-moon { background: radial-gradient(circle at 50% 42%,#fff5d5 0 20%,#dbe2f1 21% 29%,transparent 30%),linear-gradient(#121e41,#263764); }
.date-moon small { margin-top: 72px; font: 500 9px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.date-copy { opacity: 0; transform: scale(.75); background: radial-gradient(circle,#fff8c8 0 24%,#f6bd58 25% 42%,#e79539 43% 58%,#f4c267 59% 100%); color: #4a2415; }
.date-copy b { font: 400 56px/.8 var(--display); }
.date-copy span { font: 500 12px/1.2 var(--sans); letter-spacing: .15em; text-transform: uppercase; }
.date-copy small { margin-top: 5px; font: 500 11px/1 var(--sans); }
.date-sun.is-revealed .date-moon { opacity: 0; transform: scale(1.4); }
.date-sun.is-revealed .date-copy { opacity: 1; transform: scale(1); }

.events { background: var(--surface); color: var(--ink); }
.events .eyebrow { color: var(--accent); }
.events-list { position: relative; display: grid; gap: 54px; }
.event-card { position: relative; width: min(100%,380px); margin-inline: auto; text-align: center; }
.event-media { position: relative; width: 100%; aspect-ratio: 1; margin-bottom: 16px; }
.event-media img { position: absolute; z-index: 1; inset: 14%; width: 72%; height: 72%; border-radius: 50%; object-fit: cover; clip-path: circle(50% at 50% 50%); }
.event-content { position: relative; z-index: 2; max-width: 330px; margin-inline: auto; padding-inline: 10px; text-align: center; }
.event-content h3 { margin: 0; color: var(--ink); font: 400 38px/1 var(--display); }
.event-when { margin: 9px 0 3px; color: var(--accent); font: 500 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.event-venue { margin: 0; font-size: 17px; }
.event-description { margin: 9px auto 0; max-width: 300px; color: rgba(56,37,31,.76); font-size: 15px; line-height: 1.35; }
.evt-map { display: inline-block; margin-top: 12px; border-bottom: 1px solid currentColor; color: var(--accent); font: 500 9px/1.4 var(--sans); letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }

.event-media::before,
.gallery-media::before,
.thing-frame::before,
.countdown-frame::before { content: ""; position: absolute; z-index: 4; inset: -1%; border-radius: 50%; background: center/100% 100% no-repeat url("../img/flame-ring.png"); filter: drop-shadow(0 4px 18px rgba(184,102,61,.35)); opacity: 1; pointer-events: none; }
.event-card.is-visible .event-media::before,
.gallery-grid.is-visible .gallery-media::before,
.thing.is-visible .thing-frame::before,
.countdown-grid.is-visible .countdown-frame::before { opacity: 1; }

.story { background: linear-gradient(180deg,var(--surface-deep),var(--surface)); text-align: center; }
.story-frame { position: relative; width: min(100%,360px); aspect-ratio: 3/4; margin: 0 auto 28px; overflow: hidden; border: 8px solid #f9ebdc; border-radius: 180px 180px 20px 20px; box-shadow: 0 20px 46px rgba(77,44,34,.2); }
.story-frame::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(199,154,84,.66); border-radius: 160px 160px 12px 12px; pointer-events: none; }
.story-frame img { height: 100%; object-fit: cover; }
.story-copy { max-width: 340px; margin: 0 auto; font-size: 21px; line-height: 1.45; }
.hashtag { margin: 18px 0 0; color: var(--accent); font: 500 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }

.gallery { background: var(--surface); }
.gallery-grid { position: relative; width: min(100%,380px); margin-inline: auto; }
.gallery-media { position: relative; width: 100%; aspect-ratio: 1; }
.gallery-viewport { position: absolute; z-index: 1; inset: 14%; overflow: hidden; border-radius: 50%; background: transparent; }
.gallery-track { display: flex; height: 100%; transition: transform .75s cubic-bezier(.2,.8,.2,1); }
.gallery-slide { position: relative; flex: 0 0 100%; height: 100%; margin: 0; }
.gallery-slide img { height: 100%; object-fit: cover; }
.gallery-control { position: absolute; z-index: 6; top: 50%; display: grid; place-items: center; width: 38px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.56); border-radius: 50%; background: rgba(12,19,41,.55); color: #fff6e4; font: 400 25px/1 var(--serif); transform: translateY(-50%); backdrop-filter: blur(8px); cursor: pointer; }
.gallery-control.prev { left: 15%; }
.gallery-control.next { right: 15%; }
.gallery-dots { position: absolute; z-index: 6; bottom: 15%; left: 50%; display: flex; gap: 7px; transform: translateX(-50%); }
.gallery-dot { width: 7px; aspect-ratio: 1; border: 0; border-radius: 50%; padding: 0; background: rgba(255,255,255,.48); cursor: pointer; }
.gallery-dot.is-active { background: #f1c779; box-shadow: 0 0 10px rgba(241,199,121,.85); }

.venue { background: var(--surface-deep); text-align: center; }
.venue-card { position: relative; display: grid; align-content: center; width: min(100%,360px); aspect-ratio: 1; margin-inline: auto; padding: 38px 28px; border: 1px solid rgba(184,102,61,.45); border-radius: 0; background: rgba(255,250,242,.72); box-shadow: inset 0 0 0 9px rgba(255,250,242,.9),inset 0 0 0 10px rgba(184,102,61,.22),0 18px 40px rgba(74,44,34,.12); }
.venue-sun { display: block; margin-bottom: 12px; color: var(--gold); font-size: 42px; }
.venue-card h3 { margin: 0; font: 400 36px/1 var(--display); }
.venue-card p { margin: 7px 0; font-size: 18px; }
.venue-card .venue-date { color: var(--accent); font: 500 11px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.venue-card a { display: inline-block; margin-top: 14px; border-bottom: 1px solid currentColor; color: var(--accent); font: 500 10px/1.4 var(--sans); letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }

.things { background: var(--surface); }
.things-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px 12px; margin: 0; padding: 0; list-style: none; }
.thing { position: relative; min-width: 0; width: 100%; text-align: center; }
.thing-frame { position: relative; width: 100%; aspect-ratio: 1; }
.thing-frame::after { content: ""; position: absolute; z-index: 0; inset: 14%; border-radius: 50%; background: transparent; pointer-events: none; }
.thing-icon { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; place-items: center; width: 48px; aspect-ratio: 1; color: var(--accent); transform: translate(-50%,-50%); }
.thing-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.thing-content { margin-top: 8px; padding-inline: 2px; }
.thing h3 { margin: 0 0 5px; color: var(--ink); font: 400 23px/1 var(--display); }
.thing p { margin: 0 auto; color: rgba(56,37,31,.76); font-size: 12px; line-height: 1.35; }

.calendar { padding-top: 58px; padding-bottom: 58px; background: #f4e5d7; }
.calendar-actions { display: grid; gap: 10px; }
.calendar-actions a { padding: 14px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font: 500 11px/1 var(--sans); letter-spacing: .1em; text-align: center; text-decoration: none; text-transform: uppercase; }

.rsvp { background: radial-gradient(circle at 50% 12%,rgba(228,181,99,.24),transparent 28%),var(--rsvp); color: #fff6df; text-align: center; }
.rsvp .eyebrow { color: #e9bd73; }
.rsvp-inner > p:not(.eyebrow) { max-width: 330px; margin: 16px auto 28px; font-size: 18px; line-height: 1.4; }
.rsvp-panel { min-height: 150px; }
.rsvp-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp-choice { padding: 18px 10px; border: 1px solid rgba(235,202,143,.55); border-radius: 12px; background: rgba(255,255,255,.06); color: #fff5df; cursor: pointer; }
.rsvp-choice strong, .rsvp-choice span { display: block; }
.rsvp-choice strong { font: 400 22px/1 var(--display); }
.rsvp-choice span { margin-top: 6px; color: rgba(255,246,223,.7); font: 400 9px/1.2 var(--sans); letter-spacing: .06em; }
.rsvp-form { display: grid; gap: 10px; }
.rsvp-form input { width: 100%; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; padding: 13px 14px; background: rgba(255,255,255,.08); color: #fff; outline: 0; }
.rsvp-form input::placeholder { color: rgba(255,255,255,.58); }
.rsvp-form button, .rsvp-back { border: 0; border-radius: 999px; padding: 13px; background: #e9bd73; color: #2b1b1a; font: 600 10px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.rsvp-back { margin-top: 10px; background: transparent; color: #e9bd73; }

.countdown { background: linear-gradient(180deg,#fff4e5,#f1d1b8); text-align: center; }
.countdown-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 12px; width: min(100%,350px); margin-inline: auto; }
.countdown-grid > span { display: flex; min-width: 0; flex-direction: column; align-items: center; }
.countdown-frame { position: relative; display: grid; place-content: center; width: 100%; aspect-ratio: 1; }
.countdown-frame::after { content: ""; position: absolute; z-index: 0; inset: 14%; border-radius: 50%; background: transparent; }
.countdown-grid b { position: relative; z-index: 2; display: block; color: var(--ink); font: 400 37px/1 var(--display); }
.countdown-grid small { display: block; margin-top: 5px; color: var(--accent); font: 600 9px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }

footer { padding: 48px 24px; background: #111a32; color: #fff5de; text-align: center; }
footer span { color: #e9bd73; font: 500 9px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
footer p { margin: 12px 0 0; font: 400 32px/1 var(--display); }
footer b { font-weight: 400; }
footer small { display: block; margin-top: 22px; color: rgba(255,245,222,.58); font: 400 10px/1.4 var(--sans); letter-spacing: .06em; }
footer small a { color: #e9bd73; font-weight: 600; text-decoration: none; }

.music-toggle, .nav-toggle { position: fixed; z-index: 70; bottom: 16px; width: 42px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(16,26,53,.8); color: #fff; backdrop-filter: blur(10px); }
.music-toggle { left: 16px; font-size: 18px; }
.music-toggle[aria-pressed="true"] { background: var(--accent); }
.nav-toggle { right: 16px; display: grid; place-content: center; gap: 5px; }
.nav-toggle i { display: block; width: 17px; height: 1px; background: currentColor; }
.nav-panel { position: fixed; z-index: 69; right: 16px; bottom: 66px; display: grid; gap: 4px; width: 150px; padding: 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(16,26,53,.94); opacity: 0; transform: translateY(10px); visibility: hidden; transition: .25s ease; backdrop-filter: blur(14px); }
.nav-panel.is-open { opacity: 1; transform: none; visibility: visible; }
.nav-panel a { padding: 9px 10px; border-radius: 8px; color: #fff6e3; font: 500 10px/1 var(--sans); letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.nav-panel a:hover { background: rgba(255,255,255,.08); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease,transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 760px) {
  body { background: #0d142a; }
  .desktop-stage { position: fixed; inset: 0; display: grid; place-content: center; padding-right: min(50vw,520px); color: #f8e9cf; text-align: center; background: radial-gradient(circle at 30% 42%,rgba(196,145,75,.18),transparent 28%),#0d142a; }
  .desktop-stage span { font: 400 64px/1 var(--display); }
  .desktop-stage small { margin-top: 12px; color: #d9b574; font: 500 10px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
  .invitation-shell { margin-right: calc((100vw - min(100vw,480px))/4); }
  .progress { left: auto; right: calc((100vw - min(100vw,480px))/4); }
  .music-toggle { left: auto; right: calc((100vw - min(100vw,480px))/4 + 422px); }
  .nav-toggle { right: calc((100vw - min(100vw,480px))/4 + 16px); }
  .nav-panel { right: calc((100vw - min(100vw,480px))/4 + 16px); }
}

@media (max-width: 370px) {
  .section { padding-inline: 18px; }
  .hero h1 { font-size: clamp(42px,14vw,56px); }
  .countdown-grid b { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
  .hero-film { display: none; }
  .reveal { opacity: 1; transform: none; }
}
