:root {
  --ink: #12040a;
  --maroon: #3d0a12;
  --crimson: #8f0f1c;
  --red: #c8172a;
  --gold: #e9c46a;
  --gold-light: #fff1c2;
  --gold-deep: #a8741f;
  --cream: #fcf5e8;
  --text: #f4e6d2;
  --muted: #cdb497;
  --letter-text: #4a0d14;
  --display: "Marcellus", "Times New Roman", serif;
  --ui: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gold-grad: linear-gradient(180deg, #fff3c4 0%, #edc96f 38%, #b07a22 62%, #f5dc94 100%);
}

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

/* The hidden attribute must win over display rules like .form { display: grid } */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(90% 55% at 15% 0%, rgba(200, 23, 42, .55), transparent 70%),
    radial-gradient(70% 45% at 95% 30%, rgba(143, 15, 28, .5), transparent 70%),
    radial-gradient(90% 50% at 10% 75%, rgba(143, 15, 28, .4), transparent 70%),
    var(--ink);
  background-attachment: fixed;
  overflow-x: hidden;
}

html.sealed, html.sealed body { overflow: hidden; height: 100%; }

#sparkles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

main { position: relative; z-index: 1; }

p { margin: 0; }
a { color: inherit; }

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

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

/* ---------- Logo pieces (cropped from one image) ---------- */
.statue, .wordmark {
  background-image: url("assets/logo.png");
  background-repeat: no-repeat;
  background-size: auto 100%;
}
.statue { aspect-ratio: 438 / 784; background-position: left center; }
.wordmark { aspect-ratio: 1480 / 784; background-position: right center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 .9rem/1.2 var(--ui);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}
.btn--gold {
  color: #3a1203;
  background: linear-gradient(180deg, #fff0bd, #e6bd5d 55%, #b9832a);
  box-shadow: 0 10px 30px rgba(233, 196, 106, .28), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(233, 196, 106, .4), inset 0 1px 0 rgba(255, 255, 255, .7); }
.btn--outline {
  color: var(--gold-light);
  border-color: rgba(233, 196, 106, .6);
  background: rgba(233, 196, 106, .06);
  font-size: .78rem;
}
.btn--outline:hover { background: rgba(233, 196, 106, .16); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Opening curtain ---------- */
.cover { display: none; }
.js .cover {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  transition: visibility 0s linear 1.9s;
}
.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 22%, transparent 70%, rgba(0, 0, 0, .55)),
    repeating-linear-gradient(90deg, #4d050d 0, #a3101d 34px, #6d0812 62px, #c2182b 96px, #4d050d 132px);
  transition: transform 1.7s cubic-bezier(.75, 0, .2, 1);
  will-change: transform;
}
.curtain--left { left: 0; box-shadow: inset -14px 0 30px rgba(0, 0, 0, .5); border-right: 3px solid var(--gold-deep); }
.curtain--right { right: 0; box-shadow: inset 14px 0 30px rgba(0, 0, 0, .5); border-left: 3px solid var(--gold-deep); }

.cover__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(86vw, 380px);
  padding: 30px 24px 34px;
  text-align: center;
  border: 1px solid rgba(233, 196, 106, .55);
  border-radius: 22px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(143, 15, 28, .92), rgba(18, 4, 10, .95));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  transition: opacity .5s ease, transform .5s ease;
}
.statue--cover { height: min(34vh, 250px); filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)); }
.cover__pageant { font: 400 1.05rem/1.2 var(--display); letter-spacing: .08em; color: var(--text); margin-top: -6px; }
.cover__title { font: 400 clamp(2rem, 9vw, 2.6rem)/1.1 var(--display); color: var(--gold-light); margin-bottom: 8px; }

.cover.is-open { visibility: hidden; pointer-events: none; }
.cover.is-open .curtain--left { transform: translateX(-102%); }
.cover.is-open .curtain--right { transform: translateX(102%); }
.cover.is-open .cover__content { opacity: 0; transform: scale(.94); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 20px 84px;
  text-align: center;
  position: relative;
}
.host {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 8px 18px 8px 8px;
  text-align: left;
  border: 1px solid rgba(233, 196, 106, .45);
  border-radius: 999px;
  background: rgba(18, 4, 10, .5);
}
.host img { width: 48px; height: auto; flex: none; }
.host span { display: flex; flex-direction: column; }
.host b { font: 400 clamp(.98rem, 4.2vw, 1.15rem)/1.2 var(--display); letter-spacing: .03em; color: var(--gold-light); }
.host small { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.statue--hero {
  height: clamp(190px, 32vh, 340px);
  filter: drop-shadow(0 0 40px rgba(233, 196, 106, .28));
  animation: float 6s ease-in-out infinite;
}
.hero .wordmark { width: min(78vw, 380px); margin-top: -6px; }

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(70vw, 300px);
  color: var(--gold);
  margin: 6px auto;
}
.ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament span:last-child { transform: scaleX(-1); }
.ornament i { font-style: normal; font-size: .9rem; }

h1 {
  margin: 0;
  font: 400 clamp(2.5rem, 11vw, 4.6rem)/1.08 var(--display);
  letter-spacing: .01em;
  padding-bottom: .14em; /* keeps the gold fill from clipping the "g" descenders */
}
.hero__sub { max-width: 52ch; text-wrap: balance; color: var(--text); font-size: clamp(.92rem, 3.6vw, 1.05rem); }

.hero__when {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 0;
  margin: 14px 0 0;
  padding: 10px 6px;
  border-top: 1px solid rgba(233, 196, 106, .45);
  border-bottom: 1px solid rgba(233, 196, 106, .45);
  font: 400 clamp(.84rem, 3.5vw, 1.15rem)/1.3 var(--display);
  letter-spacing: .04em;
  white-space: nowrap;
  color: var(--gold-light);
}
.hero__when li { padding: 0 clamp(8px, 2.6vw, 14px); }
.hero__when li + li { border-left: 1px solid rgba(233, 196, 106, .45); }

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1px solid rgba(233, 196, 106, .7);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold);
  animation: cue 1.8s ease-in-out infinite;
}

/* Hero entrance, runs once the curtain opens */
.js .hero > * { opacity: 0; transform: translateY(18px); }
.js.opened .hero > * { opacity: 1; transform: none; transition: opacity .9s ease, transform .9s ease; }
.js.opened .hero > :nth-child(1) { transition-delay: .5s; }
.js.opened .hero > :nth-child(2) { transition-delay: .75s; }
.js.opened .hero > :nth-child(3) { transition-delay: .95s; }
.js.opened .hero > :nth-child(4) { transition-delay: 1.1s; }
.js.opened .hero > :nth-child(5) { transition-delay: 1.3s; }
.js.opened .hero > :nth-child(6) { transition-delay: 1.5s; }
.js.opened .hero > :nth-child(7) { transition-delay: 1.65s; }
.js.opened .hero > :nth-child(8) { transition-delay: 2s; }

/* ---------- Sections ---------- */
.section {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 56px 20px;
}
.section__head { text-align: center; margin-bottom: 28px; }
h2 {
  margin: 6px 0 0;
  font: 400 clamp(1.9rem, 8vw, 2.8rem)/1.15 var(--display);
}
.section__lead { max-width: 46ch; margin: 12px auto 0; color: var(--muted); font-size: .95rem; }

.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Letter ---------- */
.letter {
  position: relative;
  padding: clamp(28px, 7vw, 56px) clamp(22px, 6vw, 56px);
  color: var(--letter-text);
  font: 400 clamp(1rem, 3.9vw, 1.14rem)/1.75 var(--display);
  background:
    radial-gradient(120% 60% at 50% 0%, #fff, transparent 70%),
    var(--cream);
  border-radius: 6px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
}
.letter::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid var(--gold-deep);
  border-radius: 3px;
  opacity: .55;
  pointer-events: none;
}
.letter p + p { margin-top: 1.1em; }
.letter__greeting { font-size: 1.2em; color: var(--crimson); }
.letter strong { font-weight: 400; color: var(--crimson); }
.letter__sign { margin-top: 2.2em; }
.letter__sign p + p { margin-top: 0; }
.letter__name { font-size: 1.3em; color: var(--crimson); margin-top: .5em !important; }
.letter__role { font: 500 .8rem/1.5 var(--ui); letter-spacing: .04em; color: #7a4a3a; }

/* ---------- Details ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  padding: 20px 14px;
  text-align: center;
  border: 1px solid rgba(233, 196, 106, .38);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(143, 15, 28, .38), rgba(18, 4, 10, .55));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.card__label { font-size: .66rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.card__value { margin-top: 8px; font: 400 clamp(1.05rem, 4.4vw, 1.4rem)/1.25 var(--display); color: #fff; }
.card__note { margin-top: 4px; font-size: .78rem; color: var(--muted); }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 28px;
  padding: 20px 8px;
  text-align: center;
  border-top: 1px solid rgba(233, 196, 106, .4);
  border-bottom: 1px solid rgba(233, 196, 106, .4);
}
.countdown b {
  display: block;
  font: 400 clamp(1.9rem, 9vw, 3.2rem)/1 var(--display);
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}
.countdown span { font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.countdown.is-over { display: block; font: 400 1.3rem var(--display); color: var(--gold-light); }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.actions .btn { flex: 1 1 240px; max-width: 320px; }

/* ---------- RSVP ---------- */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 34px);
  border: 1px solid rgba(233, 196, 106, .4);
  border-radius: 18px;
  background: rgba(18, 4, 10, .62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.field { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}
.field small { text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .74rem; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="number"], .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  font: 400 16px/1.4 var(--ui);
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(233, 196, 106, .35);
  border-radius: 10px;
  transition: border-color .2s ease, background-color .2s ease;
}
.field textarea { resize: vertical; }
.field input::placeholder { color: rgba(205, 180, 151, .55); }
.field input:focus, .field textarea:focus { border-color: var(--gold); background: rgba(255, 255, 255, .1); }
.field.has-error input { border-color: #ff8a8a; }
.field__error { margin-top: 5px; font-size: .78rem; color: #ffb3b3; }

.choice { display: grid; grid-template-columns: 1fr; gap: 10px; }
.choice legend { margin-bottom: 0; }
.pill { position: relative; margin: 0 !important; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 14px;
  text-align: center;
  font: 500 .88rem/1.3 var(--ui);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  border: 1px solid rgba(233, 196, 106, .35);
  border-radius: 10px;
  transition: all .2s ease;
}
.pill input:checked + span { color: #3a1203; background: linear-gradient(180deg, #fff0bd, #e6bd5d); border-color: transparent; font-weight: 600; }
.pill input:focus-visible + span { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.stepper { display: grid; grid-template-columns: 50px 1fr 50px; gap: 8px; max-width: 220px; }
.stepper button {
  min-height: 50px;
  font: 500 1.4rem/1 var(--ui);
  color: var(--gold-light);
  background: rgba(233, 196, 106, .1);
  border: 1px solid rgba(233, 196, 106, .45);
  border-radius: 10px;
  cursor: pointer;
}
.stepper input { text-align: center; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form .btn--wide, .form__status { grid-column: 1 / -1; }
.form__status { min-height: 1.4em; text-align: center; font-size: .88rem; color: var(--muted); }
.form__status.is-error { color: #ffb3b3; }
.form__status a { color: var(--gold-light); }

.thanks {
  max-width: 620px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
  border: 1px solid rgba(233, 196, 106, .5);
  border-radius: 18px;
  background: rgba(18, 4, 10, .62);
  outline: none;
}
.thanks__mark { font-size: 2rem; color: var(--gold); animation: twinkle 2.4s ease-in-out infinite; }
.thanks h3 { margin: 6px 0 10px; font: 400 2.2rem/1.15 var(--display); }
.thanks p { color: var(--text); max-width: 40ch; margin: 0 auto; }

/* ---------- Footer ---------- */
.footer { padding: 30px 20px 54px; text-align: center; }
.footer__logo {
  display: block;
  width: 150px;
  height: auto;
  margin: 22px auto 0;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5));
}
.footer__brand { margin-top: 14px; font: 400 clamp(1.7rem, 7vw, 2.2rem)/1.2 var(--display); }
.footer__sub { margin-top: 6px; font: 400 1rem/1.5 var(--display); letter-spacing: .04em; color: var(--gold-light); }
.footer__credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  opacity: .8;
}
.footer__credit span { font-size: .56rem; letter-spacing: .2em; white-space: nowrap; text-transform: uppercase; color: var(--muted); }
.footer__credit img { width: 64px; height: auto; }
.footer__links {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: min(100%, 560px);
  margin: 20px auto 0;
  padding: 0;
}
.footer__links li {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border: 1px solid rgba(233, 196, 106, .25);
  border-radius: 12px;
  background: rgba(18, 4, 10, .45);
}
.footer__links span { font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.footer__links a, .footer__links b { font-weight: 500; font-size: .95rem; color: #fff; text-decoration: none; overflow-wrap: anywhere; padding: 4px 0; }
.footer__links a:hover { color: var(--gold-light); text-decoration: underline; }
.footer__fine { margin-top: 26px; font-size: .74rem; color: var(--muted); }

/* ---------- Floating music button ---------- */
.music {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 5;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  color: var(--gold-light);
  background: radial-gradient(circle at 30% 25%, rgba(143, 15, 28, .95), rgba(18, 4, 10, .95));
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55), 0 0 0 0 rgba(233, 196, 106, .5);
  cursor: pointer;
  transition: transform .2s ease, opacity .5s ease;
}
.music:hover { transform: scale(1.06); }
.music:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.js:not(.opened) .music { opacity: 0; pointer-events: none; }
.music.is-playing { animation: pulse 2.4s ease-out infinite; }
.music.is-playing .music__note { display: none; }
.music__bars { display: none; align-items: flex-end; gap: 3px; height: 20px; }
.music.is-playing .music__bars { display: flex; }
.music__bars i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: bottom; animation: bars 1s ease-in-out infinite; }
.music__bars i:nth-child(2) { animation-delay: -.35s; }
.music__bars i:nth-child(3) { animation-delay: -.7s; }
.music__bars i:nth-child(4) { animation-delay: -.15s; }

/* ---------- Motion ---------- */
@keyframes bars { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes pulse { 0% { box-shadow: 0 10px 28px rgba(0, 0, 0, .55), 0 0 0 0 rgba(233, 196, 106, .5); } 100% { box-shadow: 0 10px 28px rgba(0, 0, 0, .55), 0 0 0 16px rgba(233, 196, 106, 0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }
@keyframes twinkle { 0%, 100% { opacity: .5; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.15); } }

/* ---------- Larger screens ---------- */
@media (min-width: 560px) {
  .field--half { grid-column: span 1; }
  .choice { grid-template-columns: 1fr 1fr; }
  .choice legend { grid-column: 1 / -1; }
  .footer__links { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 820px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
  .section { padding: 80px 24px; }
  .hero .wordmark { width: 440px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .music__bars i:nth-child(odd) { transform: scaleY(.55); }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* =========================================================
   CINEMATIC LAYER
   Stage atmosphere, the opening sequence, and scroll-driven
   motion. Everything here is decoration: with reduced motion
   (or no JavaScript) the page shows its finished state.
   ========================================================= */

/* ---------- Atmosphere: vignette, film grain ---------- */
.fx { position: fixed; pointer-events: none; }
.fx-vignette {
  inset: 0;
  z-index: 3;
  background: radial-gradient(120% 85% at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}
.fx-grain {
  inset: -60%;
  z-index: 4;
  opacity: .075;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .9s steps(6) infinite;
}
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
  transform: scaleX(var(--scroll, 0));
  transform-origin: left;
  box-shadow: 0 0 10px rgba(233, 196, 106, .7);
  pointer-events: none;
}

/* ---------- Opening sequence ---------- */
.js .cover { transition: visibility 0s linear 3s; }
.curtain {
  transition: transform 2.4s cubic-bezier(.77, 0, .18, 1) .35s;
  transform-origin: top center;
}
.cover.is-open .curtain--left { transform: translateX(-103%) skewX(4deg); }
.cover.is-open .curtain--right { transform: translateX(103%) skewX(-4deg); }

/* Stage spotlights sweeping across the closed curtain */
.beam {
  position: absolute;
  top: -12%;
  width: 46vmax;
  height: 150vmax;
  background: linear-gradient(180deg, rgba(255, 236, 180, .34), rgba(255, 236, 180, .07) 45%, transparent 75%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  filter: blur(14px);
  transform-origin: 50% 0;
  pointer-events: none;
  transition: opacity .8s ease;
}
.beam--a { left: 4%; animation: sweep-a 9s ease-in-out infinite; }
.beam--b { right: 4%; animation: sweep-b 11s ease-in-out infinite; }
.cover.is-open .beam { opacity: 0; }

.cover__content { transition: opacity .6s ease, transform .9s cubic-bezier(.5, 0, .2, 1), filter .6s ease; }
.cover.is-open .cover__content { opacity: 0; transform: scale(1.12); filter: blur(10px); }
.statue--cover { animation: breathe 4.5s ease-in-out infinite; }

/* Burst of gold light as the curtain parts */
.cover__flash {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60vmax;
  height: 60vmax;
  margin: -30vmax 0 0 -30vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 205, .95), rgba(233, 196, 106, .5) 30%, transparent 68%);
  opacity: 0;
  transform: scale(.1);
  pointer-events: none;
}
.cover.is-open .cover__flash { animation: flash 2.2s ease-out .25s both; }

/* Light sweeping across the gold button */
.btn--gold { position: relative; overflow: hidden; }
.btn--gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: glint 3.6s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- Hero: light rays, shine, parallax ---------- */
.hero { overflow: hidden; --p: 0; }
.hero::before {
  content: "";
  position: absolute;
  top: 34%;
  left: 50%;
  width: 150vmax;
  height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 226, 150, .12) 0deg 5deg, transparent 5deg 17deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, rgba(0, 0, 0, .5) 22%, transparent 52%);
  mask-image: radial-gradient(circle, #000 0, rgba(0, 0, 0, .5) 22%, transparent 52%);
  animation: rays 120s linear infinite;
  pointer-events: none;
}
.js .hero::before { opacity: 0 !important; transform: none; }
.js.opened .hero::before { opacity: calc(1 - var(--p) * 1.2) !important; transition: opacity 2.6s ease 1.2s; }
.js.opened.scrolled .hero::before { transition: none; }

/* A highlight that glides across the statue and the 3D title, masked to their shape */
.statue--hero, .hero .wordmark { position: relative; }
.statue--hero::after, .hero .wordmark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .9) 50%, transparent 58%) no-repeat;
  background-size: 300% 100%;
  background-position: 150% 0;
  -webkit-mask: url("assets/logo.png") left center / auto 100% no-repeat;
  mask: url("assets/logo.png") left center / auto 100% no-repeat;
  animation: shine 6.5s ease-in-out 3.4s infinite;
  pointer-events: none;
}
.hero .wordmark::after {
  -webkit-mask-position: right center;
  mask-position: right center;
  animation-delay: 4.1s;
}

/* Parallax: --p runs 0 → 1 as the hero scrolls away */
.statue--hero { translate: 0 calc(var(--p) * 70px); scale: calc(1 + var(--p) * .08); }
.hero .wordmark { translate: 0 calc(var(--p) * 38px); }
.host { translate: 0 calc(var(--p) * -24px); }

/* Entrance: each piece drifts up out of soft focus after the curtain parts */
.js .hero > * { opacity: 0; transform: translateY(34px) scale(.97); filter: blur(12px); }
.js.opened .hero > * {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity 1.3s ease, transform 1.5s cubic-bezier(.2, .7, .2, 1), filter 1.3s ease;
}
.js .hero > .statue--hero { filter: blur(12px) brightness(2.2); }
.js.opened .hero > .statue--hero { filter: drop-shadow(0 0 44px rgba(233, 196, 106, .34)); transition-duration: 1.8s, 1.9s, 1.8s; }
.js.opened .hero > :nth-child(1) { transition-delay: 2.2s; }
.js.opened .hero > :nth-child(2) { transition-delay: 1.1s; }
.js.opened .hero > :nth-child(3) { transition-delay: 1.7s; }
.js.opened .hero > :nth-child(4) { transition-delay: 2.3s; }
.js.opened .hero > :nth-child(5) { transition-delay: 0s; }
.js.opened .hero > :nth-child(6) { transition-delay: 3.3s; }
.js.opened .hero > :nth-child(7) { transition-delay: 3.6s; }
.js.opened .hero > :nth-child(8) { transition-delay: 4.1s; }

/* Title letters land one by one (script.js splits the heading) */
.js .hero > h1 { opacity: 1; transform: none; filter: none; }
h1 .word { display: inline-block; white-space: nowrap; }
h1 .ch { display: inline-block; padding-bottom: .14em; margin-bottom: -.14em; }
.js h1 .ch { opacity: 0; transform: translateY(.55em) rotate(8deg) scale(1.25); filter: blur(8px); }
.js.opened h1 .ch {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity .9s ease, transform 1s cubic-bezier(.2, .8, .2, 1), filter .9s ease;
  transition-delay: calc(2.5s + var(--i) * 55ms);
}

/* ---------- Scroll reveals ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(46px) scale(.975);
  filter: blur(9px);
  transition: opacity 1.1s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1), filter 1.1s ease, clip-path 1.5s cubic-bezier(.6, 0, .2, 1);
}
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }

/* Section titles: the label tightens into place and a gold rule draws itself */
.js .section__head .eyebrow { letter-spacing: .7em; transition: letter-spacing 1.6s cubic-bezier(.2, .7, .2, 1) .1s; }
.js .section__head.is-in .eyebrow { letter-spacing: .32em; }
.section__head h2::after {
  content: "";
  display: block;
  width: 120px;
  height: 1px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: transform 1.4s cubic-bezier(.2, .7, .2, 1) .5s;
}
.js .section__head h2::after { transform: scaleX(0); }
.js .section__head.is-in h2::after { transform: scaleX(1); }

/* The letter unrolls from the top, then its paragraphs settle in */
.js .letter.reveal { clip-path: inset(0 0 100% 0); transform: none; filter: none; opacity: 1; }
.js .letter.reveal.is-in { clip-path: inset(0 0 0 0); }
.js .letter > * { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
.js .letter.is-in > * { opacity: 1; transform: none; }
.js .letter.is-in > :nth-child(1) { transition-delay: .5s; }
.js .letter.is-in > :nth-child(2) { transition-delay: .75s; }
.js .letter.is-in > :nth-child(3) { transition-delay: 1s; }
.js .letter.is-in > :nth-child(4) { transition-delay: 1.25s; }
.js .letter.is-in > :nth-child(5) { transition-delay: 1.5s; }
.js .letter.is-in > :nth-child(6) { transition-delay: 1.8s; }

/* Detail cards tip forward into view */
.js .card.reveal { transform: perspective(800px) rotateX(-38deg) translateY(36px); transform-origin: 50% 0; }
.js .card.reveal.is-in { transform: none; }
.card { transition: border-color .3s ease, box-shadow .3s ease; }
.card:hover { border-color: var(--gold); box-shadow: 0 0 34px rgba(233, 196, 106, .18); }

/* Countdown digits roll when they change */
.countdown b { overflow: hidden; padding-bottom: .04em; }
.countdown b.tick { animation: roll .55s cubic-bezier(.2, .8, .2, 1); }

.thanks:not([hidden]) { animation: arrive 1s cubic-bezier(.2, .8, .2, 1); }

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}
@keyframes sweep-a { 0%, 100% { transform: rotate(-24deg); } 50% { transform: rotate(-4deg); } }
@keyframes sweep-b { 0%, 100% { transform: rotate(22deg); } 50% { transform: rotate(2deg); } }
@keyframes breathe {
  0%, 100% { filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)) drop-shadow(0 0 0 rgba(233, 196, 106, 0)); }
  50% { filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)) drop-shadow(0 0 26px rgba(233, 196, 106, .55)); }
}
@keyframes flash {
  0% { opacity: 0; transform: scale(.1); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: scale(3.4); }
}
@keyframes glint { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes shine { 0%, 62% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
@keyframes roll { 0% { transform: translateY(-55%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes arrive { 0% { opacity: 0; transform: scale(.92); filter: blur(8px); } 100% { opacity: 1; transform: none; filter: none; } }

@media (prefers-reduced-motion: reduce) {
  .fx-grain, .beam, .cover__flash, .btn--gold::after, .statue--hero::after, .hero .wordmark::after { display: none; }
  .statue--hero, .hero .wordmark, .host { translate: none; scale: none; }
}

/* ---------- Hero framing: the whole title card fits one screen ---------- */
.hero { padding: 34px 20px 76px; gap: 8px; }
.host { margin-bottom: 4px; }
.statue--hero { height: clamp(150px, 23svh, 300px); }
.hero .wordmark { width: min(74vw, 30svh, 380px); }
.hero .ornament { margin: 2px auto; }
.hero::before { background: repeating-conic-gradient(from 0deg, rgba(255, 226, 150, .085) 0deg 5deg, transparent 5deg 17deg); }
.music { width: 46px; height: 46px; }

/* Wide screens: statue on the left like a film poster, title card on the right */
@media (min-width: 900px) and (min-height: 560px) {
  .hero {
    display: grid;
    grid-template-columns: auto minmax(0, 600px);
    grid-auto-rows: min-content;
    column-gap: clamp(40px, 6vw, 110px);
    row-gap: 12px;
    justify-content: center;
    align-content: center;
    justify-items: center;
    padding: 60px 40px 90px;
  }
  .hero > * { grid-column: 2; }
  .hero > .statue--hero { grid-column: 1; grid-row: 1 / span 7; align-self: center; height: min(66svh, 600px); }
  .hero .wordmark { width: min(400px, 44svh); }
  .hero::before { left: 30%; top: 50%; }
  h1 { font-size: clamp(3rem, 5.2vw, 4.6rem); }
  .music { width: 54px; height: 54px; }
  /* Sit in the text column, centred under the date line, instead of the bottom of the screen */
  .hero > .scroll-cue { position: relative; left: auto; bottom: auto; margin: 22px 0 0; }
  .hero { padding-bottom: 60px; }
}

/* The letter unrolls like a scroll (scale, not clip-path, so the scroll observer can still see it) */
.js .letter.reveal { clip-path: none; transform: scaleY(.03); transform-origin: 50% 0; opacity: 0; }
.js .letter.reveal.is-in { transform: none; opacity: 1; transition: transform 1.3s cubic-bezier(.6, 0, .2, 1), opacity .4s ease; }
.js .letter.is-in > :nth-child(1) { transition-delay: 1s; }
.js .letter.is-in > :nth-child(2) { transition-delay: 1.2s; }
.js .letter.is-in > :nth-child(3) { transition-delay: 1.4s; }
.js .letter.is-in > :nth-child(4) { transition-delay: 1.6s; }
.js .letter.is-in > :nth-child(5) { transition-delay: 1.8s; }
.js .letter.is-in > :nth-child(6) { transition-delay: 2.1s; }

/* Light rays sized to the hero so they fade out before its bottom edge */
.hero::before {
  --ray: 126svh;
  width: var(--ray);
  height: var(--ray);
  margin: calc(var(--ray) / -2) 0 0 calc(var(--ray) / -2);
  -webkit-mask-image: radial-gradient(circle closest-side, #000 0, rgba(0, 0, 0, .55) 35%, transparent 96%);
  mask-image: radial-gradient(circle closest-side, #000 0, rgba(0, 0, 0, .55) 35%, transparent 96%);
}
@media (min-width: 900px) and (min-height: 560px) {
  .hero::before { --ray: 98svh; }
}

/* Ray centre follows the statue (script.js sets --ray-x / --ray-y; these are the fallbacks) */
.hero::before { left: var(--ray-x, 50%); top: var(--ray-y, 34%); }
@media (min-width: 900px) and (min-height: 560px) {
  .hero::before { left: var(--ray-x, 30%); top: var(--ray-y, 50%); }
}
