/* ============================================================
   Standing in Your Light — for Monique
   One continuous night: void → gravity → light → celebration
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --void:           #070408;
  --night:          #100A10;
  --surface:        #191019;
  --champagne:      #E8C987;
  --champagne-deep: #C4953A;
  --pink:           #F2A9C4;
  --pink-bright:    #FFD9E6;
  --rose:           #D4899C;
  --candle:         #FFF3DC;
  --ivory:          #F5EFE6;
  --ivory-dim:      rgba(245, 239, 230, 0.55);
  --ivory-faint:    rgba(245, 239, 230, 0.14);
  --champagne-dim:  rgba(232, 201, 135, 0.10);
  --border:         rgba(245, 239, 230, 0.08);
  --glow-gold:      0 0 18px rgba(232, 201, 135, 0.22);
  --glow-pink:      0 0 18px rgba(242, 169, 196, 0.26);

  --font-serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --font-ui:    'Inter', -apple-system, sans-serif;

  --text-hero:    clamp(4.5rem, 16vw, 11rem);
  --text-display: clamp(2rem, 5vw, 3.5rem);
  --text-quote:   clamp(1.375rem, 3.2vw, 2rem);
  --text-letter:  clamp(1.1875rem, 1.5vw + 0.9rem, 1.4375rem);
  --text-label:   0.6875rem;

  --leading-letter: 1.9;
  --measure-letter: min(58ch, 88vw);
  --section-pad: clamp(6rem, 14vh, 10rem);

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-reveal: 1.1s;
  --dur-sweep: 1.6s;

  --moon-size: clamp(120px, 20vw, 240px);
  --mx: calc(100vw - var(--moon-size) - 6vw);
  --my: 11vh;
  --ms: 1;
  --phase: 0;   /* 0 = new moon, 1 = full — driven by scroll */
}

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

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

body {
  background: var(--void);
  color: var(--ivory);
  font-family: var(--font-serif);
  font-size: var(--text-letter);
  line-height: var(--leading-letter);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(232, 201, 135, 0.25); color: var(--candle); }

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

section {
  padding: var(--section-pad) 1.5rem;
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}

.label {
  font-family: var(--font-ui);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--champagne);
}

/* ---------- Reveal engine ---------- */
.js [data-animate] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity var(--dur-reveal) var(--ease),
    transform var(--dur-reveal) var(--ease);
  transition-delay: var(--delay, 0s);
}
.js [data-animate].is-visible { opacity: 1; transform: none; }

/* ---------- Beat 0 · Arrival veil ---------- */
.veil {
  position: fixed; inset: 0; z-index: 100;
  background: var(--void);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2.25rem;
  transition: opacity 1.1s var(--ease), visibility 1.1s;
}
.veil.lifted { opacity: 0; visibility: hidden; pointer-events: none; }
/* If script.js never runs (no JS, failed load, early throw), the page heals
   itself: the veil clears and every hidden state forces itself legible.
   script.js adds .js-live immediately, which disarms all of this. */
html:not(.js-live) .veil { animation: veil-auto 0.8s ease 2.8s forwards; }
@keyframes veil-auto { to { opacity: 0; visibility: hidden; } }
html.js:not(.js-live) [data-animate] { animation: force-visible 0.9s ease 3.5s forwards; }
html.js:not(.js-live) .ignite { animation: force-ignite 0.9s ease 3.5s forwards; }
@keyframes force-visible { to { opacity: 1; transform: none; } }
@keyframes force-ignite { to { background-position: 0% 0; } }

.veil-spark {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--candle);
  box-shadow: 0 0 18px 6px rgba(232, 201, 135, 0.55),
              0 0 42px 16px rgba(242, 169, 196, 0.18);
  animation: spark-bloom 2.4s var(--ease) infinite;
}
@keyframes spark-bloom {
  0%, 100% { transform: scale(1);   opacity: 0.75; }
  50%      { transform: scale(2.1); opacity: 1; }
}
.veil-name {
  font-family: var(--font-ui);
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

/* ---------- The sky ---------- */
#sky {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Static sky for no-JS / reduced motion */
.static-stars {
  display: none;
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(245,239,230,0.8), transparent 60%),
    radial-gradient(1px 1px     at 28% 64%, rgba(245,239,230,0.5), transparent 60%),
    radial-gradient(2px 2px     at 41% 12%, rgba(232,201,135,0.7), transparent 60%),
    radial-gradient(1px 1px     at 55% 45%, rgba(245,239,230,0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 63% 78%, rgba(242,169,196,0.5), transparent 60%),
    radial-gradient(1px 1px     at 72% 28%, rgba(245,239,230,0.55), transparent 60%),
    radial-gradient(2px 2px     at 84% 58%, rgba(232,201,135,0.6), transparent 60%),
    radial-gradient(1px 1px     at 91% 15%, rgba(245,239,230,0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 8%  85%, rgba(245,239,230,0.45), transparent 60%),
    radial-gradient(1px 1px     at 47% 92%, rgba(242,169,196,0.4), transparent 60%);
}
.no-js .static-stars, .reduced .static-stars { display: block; }
.no-js #sky, .reduced #sky { display: none; }

/* ---------- The moon ---------- */
.moon-layer {
  position: fixed; inset: 0; z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.moon {
  position: absolute; top: 0; left: 0;
  width: var(--moon-size); height: var(--moon-size);
  transform: translate(var(--mx), var(--my)) scale(var(--ms));
  transition: transform 1.8s var(--ease), opacity 1.2s var(--ease);
  pointer-events: none;
  opacity: 0.9;
}
.moon-halo {
  position: absolute; inset: -55%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(232, 201, 135, 0.28) 0%,
    rgba(242, 169, 196, 0.14) 38%,
    rgba(242, 169, 196, 0.05) 55%,
    transparent 72%);
  opacity: calc(0.25 + var(--phase) * 0.75);
  transition: opacity 0.6s linear;
}
.moon-disc {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, rgba(255, 243, 220, 0.95), rgba(240, 226, 198, 0.88) 42%, rgba(214, 197, 168, 0.85) 78%, rgba(196, 178, 150, 0.85) 100%),
    radial-gradient(circle at 66% 68%, rgba(212, 137, 156, 0.14), transparent 42%);
  box-shadow: inset -8px -10px 32px rgba(7, 4, 8, 0.22);
}
.moon-shade {
  position: absolute; inset: 0;
  border-radius: 50%;
  overflow: hidden;
}
.moon-shade::after {
  content: '';
  position: absolute; inset: -8%;
  border-radius: 50%;
  background: radial-gradient(circle,
    var(--void) 58%,
    rgba(7, 4, 8, 0.85) 66%,
    rgba(7, 4, 8, 0) 76%);
  transform: translateX(calc(var(--phase) * -118%));
}
.reduced .moon, .no-js .moon { --phase: 0.8; }

/* Scene positions — the moon travels with her */
body[data-scene="orbit"] {
  --mx: calc(50vw - var(--moon-size) / 2);
  --my: calc(46vh - var(--moon-size) / 2);
  --ms: 1.35;
}
body[data-scene="finale"] {
  --mx: calc(50vw - var(--moon-size) / 2);
  --my: 7vh;
  --ms: 1.1;
}
/* While her constellation is on stage, the moon steps aside */
body[data-scene="goddess"] {
  --mx: calc(-0.3 * var(--moon-size));
  --my: 3vh;
  --ms: 0.85;
}
body[data-scene="goddess"] .moon { opacity: 0.55; }
body[data-scene="orbit"] main > section:not(.orbit) { opacity: 0.35; }
main > section { transition: opacity 0.9s var(--ease); }

/* ---------- Beat 1 · Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  gap: 1.25rem;
}
.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--champagne);
}
.hero-name {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.01em;
  background-image: linear-gradient(105deg,
    var(--ivory) 0%, var(--candle) 30%, var(--pink) 50%, var(--candle) 70%, var(--ivory) 100%);
  background-size: 250% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: name-shimmer 12s linear infinite;
}
@keyframes name-shimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: 250% 0; }
}
.hero-sub {
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  color: var(--ivory-dim);
}
.scroll-cue {
  position: absolute;
  bottom: calc(2.5rem + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  width: 1px; height: 48px;
  overflow: hidden;
}
.scroll-cue span {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--champagne));
  transform-origin: top;
  animation: cue-drop 2.6s var(--ease) infinite;
}
@keyframes cue-drop {
  0%   { transform: scaleY(0);   opacity: 0; }
  35%  { transform: scaleY(1);   opacity: 1; }
  70%  { transform: scaleY(1);   opacity: 1; }
  100% { transform: scaleY(1);   opacity: 0; }
}

/* ---------- Beat 2 · The Letter ---------- */
.letter {
  position: relative;
  max-width: var(--measure-letter);
  margin: 0 auto;
  display: flex; flex-direction: column;
  gap: 2em;
}
.letter::before {
  content: '';
  position: absolute; inset: -12% -30%;
  background: radial-gradient(ellipse at center, rgba(7, 4, 8, 0.72) 30%, transparent 75%);
  z-index: -1;
}
.letter-spark {
  width: 34px; height: 34px;
  align-self: center;
  color: var(--champagne);
  margin-bottom: 1rem;
}
.spark-path {
  stroke-dasharray: 1;
  transition: stroke-dashoffset 1.6s ease 0.2s;
}
.js .spark-path { stroke-dashoffset: 1; }
.letter-spark.is-visible .spark-path { stroke-dashoffset: 0; }

.salutation {
  font-style: italic;
  font-size: 1.18em;
}
.signoff { font-style: italic; margin-top: 0.5em; }
.signature {
  font-weight: 500;
  font-size: 1.3em;
  letter-spacing: 0.06em;
  margin-top: -1.2em;
}
.letter-rule {
  width: 32px; height: 1px;
  background: var(--champagne-deep);
  transform-origin: left;
}
.js .letter-rule[data-animate] { transform: scaleX(0) translateY(0); }
.js .letter-rule[data-animate].is-visible { transform: scaleX(1); }

/* The ignition — a warm light front sweeps through each paragraph */
.js .ignite {
  background-image: linear-gradient(100deg,
    var(--ivory) 0%,
    var(--ivory) 30%,
    var(--candle) 46%,
    var(--ivory-faint) 56%,
    var(--ivory-faint) 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background-position var(--dur-sweep) var(--ease);
}
.js .ignite.lit { background-position: 0% 0; }

/* Gleam phrases settle into glow after the sweep passes */
.gleam {
  transition: color 0.9s var(--ease), text-shadow 0.9s var(--ease);
}
.js .ignite .gleam { color: transparent; }
.js .ignite.lit .gleam {
  color: var(--champagne);
  text-shadow: var(--glow-gold);
  transition-delay: 1.3s;
}
.js .ignite.lit .gleam--pink {
  color: var(--pink);
  text-shadow: var(--glow-pink);
}
/* No-JS: letter is simply, fully legible */
.no-js .ignite { color: var(--ivory); }
.no-js .gleam { color: var(--champagne); }
.no-js .gleam--pink { color: var(--pink); }

/* ---------- Beat 3 · Orbit interlude ---------- */
.orbit {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: clamp(4rem, 12vh, 8rem);
}
.orbit-quote {
  max-width: min(30ch, 88vw);
  text-align: center;
}
.orbit-quote p {
  font-style: italic;
  font-size: var(--text-quote);
  line-height: 1.5;
  color: var(--ivory-dim);
}

/* ---------- Beat 4 · The Moment ---------- */
.moment {
  max-width: min(52ch, 88vw);
  margin: 0 auto;
  display: flex; flex-direction: column;
  gap: 1.5rem;
}
.moment-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-display);
  line-height: 1.15;
}
.moment-body {
  position: relative;
  padding-left: clamp(1.25rem, 4vw, 2rem);
}
.moment-body::before {
  content: '';
  position: absolute; left: 4px; top: 0.4em; bottom: 0.4em;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--champagne-deep) 20%, var(--champagne-deep) 80%, transparent);
}
.moment-body p {
  font-style: italic;
  color: var(--ivory);
}

/* ---------- Beat 5 · Moon Goddess constellation ---------- */
.goddess { text-align: center; }
.goddess-lede {
  font-style: italic;
  font-size: var(--text-quote);
  line-height: 1.6;
  color: var(--ivory);
  max-width: min(34ch, 88vw);
  margin: 1.5rem auto 0;
}
.star-field {
  position: relative;
  height: 140vh;
  margin-top: 3rem;
}
.star-word {
  position: absolute;
  left: var(--x); top: var(--y);
  font-style: italic;
  font-size: calc(var(--s, 1) * clamp(1rem, 2vw, 1.35rem));
  color: var(--ivory);
  opacity: 0.18;
  white-space: nowrap;
  transition: opacity 2s var(--ease), color 2s var(--ease), text-shadow 2s var(--ease);
  will-change: transform;
}
.star-word.glow {
  opacity: 1;
  color: var(--champagne);
  text-shadow: var(--glow-gold);
}
.star-word--pink.glow {
  color: var(--pink);
  text-shadow: var(--glow-pink);
}
.star-word.seen { opacity: 0.45; }
.constellation {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
/* dasharray/dashoffset use 3 (not the usual pathLength 1): with
   vector-effect: non-scaling-stroke inside a preserveAspectRatio="none"
   viewBox, Chrome measures dashes in screen space, so a dash of exactly 1
   can end short of the path's end. The extra headroom guarantees the
   draw-in always completes at every viewport aspect. */
.constellation-path {
  stroke: rgba(232, 201, 135, 0.65);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 3;
}
.js .constellation-path { stroke-dashoffset: 3; }
.constellation-path--leg { stroke: rgba(242, 169, 196, 0.5); }
.constellation.drawn .constellation-path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2.2s var(--ease) 0.3s;
}
.constellation.drawn .constellation-path--leg { transition-delay: 1.2s; }

/* The six stars of Libra */
.star-dot {
  position: absolute;
  left: var(--x); top: var(--y);
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--candle);
  box-shadow: 0 0 10px 2px rgba(232, 201, 135, 0.55);
  transition: opacity 1.2s var(--ease) 0.5s;
}
.star-dot--major {
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  box-shadow: 0 0 8px 2px rgba(232, 201, 135, 0.6),
              0 0 16px 4px rgba(242, 169, 196, 0.45);
}
.star-dot--minor { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }
.js .star-field .star-dot { opacity: 0; }
.js .star-field .constellation.drawn ~ .star-dot { opacity: 0.95; }

/* Photo variant — enable with data-variant="photos" (see index.html notes) */
.goddess[data-variant="photos"] .star-field { display: none; }
.photo-field {
  position: relative;
  min-height: 120vh;
  margin-top: 3rem;
}
.photo-print {
  position: absolute;
  left: var(--x); top: var(--y);
  width: min(38vw, 300px);
  padding: 8px 8px 14px;
  background: rgba(25, 16, 25, 0.65);
  border: 1px solid var(--champagne-deep);
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 20px 60px rgba(212, 137, 156, 0.10), 0 8px 32px rgba(0, 0, 0, 0.45);
}
.photo-print img {
  display: block; width: 100%; height: auto;
  filter: sepia(0.35) hue-rotate(-16deg) contrast(0.95) brightness(0.9);
  transition: filter 1.2s var(--ease);
}
.photo-print.glow img { filter: none; }

/* ---------- Beat 6 · Countdown → Celebration ---------- */
.finale {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: clamp(2.5rem, 6vh, 4rem);
  padding-top: calc(var(--moon-size) * 0.6 + 14vh);
}
.countdown { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.countdown.leaving {
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}
.count-row {
  display: flex; align-items: stretch;
  gap: clamp(0.9rem, 3.5vw, 2rem);
}
.count-group {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.6rem;
  min-width: 3.2ch;
}
.count-val {
  font-family: var(--font-ui);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1;
  color: var(--ivory);
  background: var(--surface);
  padding: 0.55em 0.35em;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(212, 137, 156, 0.10), 0 8px 32px rgba(0, 0, 0, 0.45);
}
.count-val.tick { animation: tick 0.3s var(--ease); }
@keyframes tick {
  0% { opacity: 0; transform: translateY(6px); }
}
.count-unit {
  font-family: var(--font-ui);
  font-size: var(--text-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.count-sep {
  width: 1px;
  margin: 0.4em 0;
  background: linear-gradient(to bottom, transparent, rgba(232, 201, 135, 0.4), transparent);
}
/* No-JS: hide the empty digit boxes, show a plain line instead */
.nojs-count { display: none; font-style: italic; color: var(--ivory); }
.no-js .count-row { display: none; }
.no-js .nojs-count { display: block; }
.celebrate {
  display: flex; flex-direction: column; align-items: center;
  gap: 1.5rem;
}
.countdown[hidden], .celebrate[hidden] { display: none; }
.celebrate-kicker {
  font-style: italic;
  font-size: var(--text-quote);
  color: var(--ivory-dim);
}
.celebrate-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  line-height: 1.1;
}
.finale-echo {
  font-style: italic;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--ivory-dim);
  max-width: min(38ch, 88vw);
}

/* ---------- Beat 7 · Sign-off ---------- */
.signoff-footer {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 3rem 1.5rem calc(3rem + env(safe-area-inset-bottom));
}
.spark-secret {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--champagne);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}
.spark-secret svg { width: 13px; height: 13px; opacity: 0.7; transition: opacity 0.4s, transform 0.4s var(--ease); }
.spark-secret:hover svg, .spark-secret:focus-visible svg { opacity: 1; transform: scale(1.25); }
.spark-secret:focus-visible { outline: 1px solid rgba(232, 201, 135, 0.5); outline-offset: 4px; border-radius: 50%; }
.footer-line {
  font-family: var(--font-ui);
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  color: var(--ivory-dim);
}

/* ---------- Hidden bloom ---------- */
.bloom {
  position: fixed; inset: 0; z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
  overflow: hidden;
}
.bloom.blooming { opacity: 1; }
.bloom-light {
  position: absolute;
  left: var(--bx, 50%); top: var(--by, 50%);
  width: 120px; height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  background: radial-gradient(circle,
    var(--pink-bright) 0%,
    var(--pink) 42%,
    rgba(242, 169, 196, 0.55) 58%,
    rgba(242, 169, 196, 0) 72%);
  transform: scale(0);
  transition: transform 1.2s var(--ease);
}
.bloom.blooming .bloom-light { transform: scale(30); }
.bloom-words {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-style: italic;
  font-size: clamp(2rem, 7vw, 3.5rem);
  color: #6B2140;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.bloom.blooming .bloom-words { opacity: 1; transition-delay: 0.7s; }

/* ============================================================
   25 Nights — advent additions
   ============================================================ */

/* ---------- Preview tag (test mode only) ---------- */
.preview-tag {
  position: fixed; right: 10px; bottom: 10px; z-index: 200;
  font-family: var(--font-ui); font-size: 0.625rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--champagne); background: rgba(25, 16, 25, 0.8);
  border: 1px solid rgba(232, 201, 135, 0.35);
  padding: 4px 8px; border-radius: 3px;
  pointer-events: none;
}

/* ---------- Prelude teaser ---------- */
.prelude[hidden], .tonight[hidden] { display: none; }
.prelude {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 1.5rem;
  padding-top: 0;
}
.prelude-line {
  font-family: var(--font-serif);
  font-size: var(--text-display);
  font-weight: 300;
  line-height: 1.2;
  max-width: min(22ch, 90vw);
}
.prelude-sub {
  font-style: italic;
  color: var(--ivory-dim);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
}

/* ---------- Tonight's door ---------- */
.tonight {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 1.75rem;
}
.tonight-head {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: var(--text-display);
  line-height: 1.15;
}
.door-btn {
  font-family: var(--font-ui);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--champagne);
  text-decoration: none;
  border: 1px solid rgba(232, 201, 135, 0.45);
  border-radius: 3px;
  padding: 1rem 2.25rem;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.door-btn:hover, .door-btn:focus-visible {
  background: var(--champagne-dim);
  box-shadow: 0 0 28px rgba(232, 201, 135, 0.2);
  transform: translateY(-2px);
}
.door-btn:active { transform: scale(0.98); }
.sky-link {
  font-style: italic;
  color: var(--ivory-dim);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 239, 230, 0.25);
  padding-bottom: 2px;
  transition: color 0.4s, border-color 0.4s;
}
.sky-link:hover, .sky-link:focus-visible { color: var(--pink); border-color: var(--pink); }

/* ---------- The birthday weave (hero, Sept 25) ---------- */
.weave { position: absolute; inset: 4% 3%; pointer-events: none; z-index: -1; }
.weave span {
  position: absolute; left: var(--x); top: var(--y);
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(0.8rem, 1.6vw, 1.05rem);
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(7, 4, 8, 0.9), 0 0 3px rgba(7, 4, 8, 0.9);
  color: var(--ivory-dim);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.4s var(--ease) var(--delay, 0s), transform 1.4s var(--ease) var(--delay, 0s);
}
.weave span:nth-child(3n) { color: rgba(232, 201, 135, 0.7); }
.weave span:nth-child(5n) { color: rgba(242, 169, 196, 0.65); }
.weave span.in { opacity: 0.75; transform: none; }

/* ---------- Day page chrome ---------- */
.day-page {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: min(66ch, 92vw);
  margin: 0 auto;
  display: flex; flex-direction: column;
  gap: clamp(2.5rem, 6vh, 4rem);
  padding-top: clamp(6rem, 14vh, 9rem);
  padding-bottom: 4rem;
}
.day-head { text-align: center; display: flex; flex-direction: column; gap: 1.1rem; }
.day-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: var(--text-display);
  line-height: 1.12;
}
.day-mount { flex: 1; }
.day-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  padding-top: 2rem;
}
.day-nav-link {
  font-style: italic;
  color: var(--ivory-dim);
  text-decoration: none;
  transition: color 0.4s;
}
.day-nav-link:hover, .day-nav-link:focus-visible { color: var(--champagne); }
.day-gate-line {
  text-align: center;
  font-style: italic;
  color: var(--ivory-dim);
  max-width: min(36ch, 88vw);
  margin: 0 auto;
}
.mini-count {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.mini-count span { color: var(--champagne); font-variant-numeric: tabular-nums; }
.noscript-note {
  text-align: center;
  padding: 30vh 1.5rem 4rem;
  font-style: italic;
  color: var(--ivory);
}
/* No-JS: don't strand visitors below an empty full-height shell */
.no-js .day-page, .no-js .sky-map-page { display: none; }
.noscript-nights {
  list-style: none;
  margin-top: 2rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  color: var(--ivory-dim);
  font-style: normal;
  font-size: 0.9375rem;
}

/* ---------- The daily hidden spark ---------- */
.day-spark {
  align-self: center;
  width: 44px; height: 44px;
  margin: 1.5rem auto 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--champagne);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}
.day-spark svg { width: 10px; height: 10px; opacity: 0.45; transition: opacity 0.4s, transform 0.4s var(--ease); }
.day-spark:hover svg, .day-spark:focus-visible svg { opacity: 1; transform: scale(1.3); }
.day-spark:focus-visible { outline: 1px solid rgba(232, 201, 135, 0.5); outline-offset: 4px; border-radius: 50%; }

/* ---------- Type: words ---------- */
.day-words { display: flex; flex-direction: column; gap: 2em; max-width: var(--measure-letter); margin: 0 auto; }

/* ---------- Type: memory ---------- */
.day-memory { display: flex; flex-direction: column; gap: 1.75rem; max-width: min(46ch, 90vw); margin: 0 auto; }
.memory-date { text-align: center; }
.memory-thread { display: flex; flex-direction: column; gap: 1rem; }
.bubble {
  max-width: 34ch;
  padding: 0.9rem 1.2rem;
  border-radius: 16px;
  background: rgba(25, 16, 25, 0.6);
  font-size: 1.0625rem;
  line-height: 1.55;
}
.bubble--me {
  align-self: flex-start;
  border: 1px solid rgba(232, 201, 135, 0.3);
  border-bottom-left-radius: 4px;
  box-shadow: 0 0 22px rgba(232, 201, 135, 0.08);
}
.bubble--her {
  align-self: flex-end;
  border: 1px solid rgba(242, 169, 196, 0.35);
  border-bottom-right-radius: 4px;
  box-shadow: 0 0 22px rgba(242, 169, 196, 0.1);
}
.memory-note { font-style: italic; text-align: center; margin-top: 0.5rem; }
.memory-audio { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }
.memory-audio audio {
  width: min(320px, 80vw);
  height: 40px;
  filter: sepia(0.3) hue-rotate(-18deg) saturate(0.8) brightness(1.05);
  border-radius: 20px;
}

/* ---------- Type: photo ---------- */
.day-photo { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; }
.photo-develop {
  padding: 10px 10px 16px;
  background: rgba(25, 16, 25, 0.65);
  border: 1px solid var(--champagne-deep);
  box-shadow: 0 20px 60px rgba(212, 137, 156, 0.1), 0 8px 32px rgba(0, 0, 0, 0.45);
  max-width: min(76vw, 460px);
}
.photo-develop img {
  display: block; width: 100%; height: auto;
  filter: brightness(0.06) saturate(0);
  will-change: filter;
  transition: filter 3.5s var(--ease);
}
.photo-develop.developed img.tone-warm { filter: sepia(0.25) hue-rotate(-14deg) brightness(0.98); }
.photo-develop.developed img.tone-moon { filter: saturate(0.85) brightness(1); }
.photo-develop.missing { display: none; }
.photo-caption { font-style: italic; text-align: center; max-width: min(40ch, 88vw); }

/* ---------- Type: reasons ---------- */
.day-reasons { display: flex; flex-direction: column; gap: 1.5rem; }
.reasons-intro { text-align: center; max-width: min(44ch, 88vw); margin: 0 auto; }
.reasons-hint, .reasons-count { text-align: center; }
.reasons-count { color: var(--ivory-dim); }
.reasons-field {
  position: relative;
  height: clamp(180px, 28vh, 260px);
}
.reason-star {
  position: absolute; left: var(--x); top: var(--y);
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  background: none; border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.reason-star::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; margin: -3.5px;
  border-radius: 50%;
  background: var(--candle);
  box-shadow: 0 0 12px 3px rgba(232, 201, 135, 0.5);
  transition: opacity 0.6s, transform 0.6s var(--ease);
  animation: star-breathe 2.8s var(--ease) infinite;
}
@keyframes star-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}
.reason-star.opened::after { opacity: 0.25; animation: none; }
.reason-star:focus-visible { outline: 1px solid rgba(232, 201, 135, 0.5); outline-offset: 2px; border-radius: 50%; }
.reason-stack { display: flex; flex-direction: column; gap: 1rem; max-width: min(46ch, 90vw); margin: 0 auto; width: 100%; }
.reason-card {
  padding: 1.1rem 1.4rem;
  background: rgba(25, 16, 25, 0.6);
  border-left: 2px solid var(--champagne-deep);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reason-card.open { opacity: 1; transform: none; }
.reason-card p { font-style: italic; }

/* ---------- Type: poem ---------- */
.day-poem { display: flex; flex-direction: column; gap: 2.25rem; text-align: center; align-items: center; }
.poem-stanza { display: flex; flex-direction: column; gap: 0.35rem; }
.poem-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  line-height: 1.65;
}
.day-poem .letter-rule { align-self: center; transform-origin: center; }

/* ---------- Type: milestone ---------- */
.day-milestone { display: flex; flex-direction: column; gap: 1.75rem; text-align: center; align-items: center; }
.milestone-star { position: relative; width: 60px; height: 60px; }
.milestone-rule { width: 120px; align-self: center; transform-origin: center; }
.milestone-story { max-width: min(48ch, 90vw); }
.milestone-close { font-style: italic; color: var(--ivory-dim); }

/* ---------- Type: sky (interactive) ---------- */
.day-sky { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
.trace-field, .catch-field {
  position: relative;
  width: min(88vw, 560px);
  -webkit-tap-highlight-color: transparent;
}
.trace-field { aspect-ratio: 4 / 3; }
.trace-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trace-lines line {
  stroke: rgba(232, 201, 135, 0.65);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.trace-lines line.drawn { opacity: 1; }
.trace-star {
  position: absolute; left: var(--x); top: var(--y);
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  background: none; border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.trace-star::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; margin: -4px;
  border-radius: 50%;
  background: var(--candle);
  box-shadow: 0 0 12px 3px rgba(232, 201, 135, 0.5);
  animation: star-breathe 2.6s var(--ease) infinite;
}
.trace-star.lit::after {
  animation: none;
  box-shadow: 0 0 18px 6px rgba(242, 169, 196, 0.55);
  background: var(--pink-bright);
}
.trace-star:focus-visible { outline: 1px solid rgba(232, 201, 135, 0.5); border-radius: 50%; }
.sky-phrase {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-quote);
}
.catch-field { height: clamp(240px, 42vh, 380px); overflow: hidden; }
.catch-spark {
  position: absolute; left: var(--x); top: -50px;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  animation: spark-fall var(--dur, 7s) linear forwards;
  -webkit-tap-highlight-color: transparent;
}
.catch-spark:focus-visible, .lantern:focus-visible {
  outline: 1px solid rgba(232, 201, 135, 0.5);
  outline-offset: 2px;
}
.catch-spark:focus-visible { animation-play-state: paused; border-radius: 50%; }
.catch-spark::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; margin: -4px;
  border-radius: 50%;
  background: var(--candle);
  box-shadow: 0 0 14px 4px rgba(232, 201, 135, 0.55);
}
@keyframes spark-fall {
  to { transform: translateY(calc(42vh + 120px)); }
}
.catch-row { min-height: 2.2em; display: flex; flex-wrap: wrap; gap: 0.45em; justify-content: center; max-width: min(40ch, 88vw); }
.caught-word {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  color: var(--ivory);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.caught-word.in { opacity: 1; transform: none; }
.catch-row.complete .caught-word { color: var(--champagne); text-shadow: var(--glow-gold); }
.lantern-stage { position: relative; height: clamp(260px, 44vh, 400px); width: min(88vw, 560px); }
.lantern {
  position: absolute; left: 50%; bottom: 12%;
  width: 74px; height: 92px;
  transform: translateX(-50%);
  border: none; cursor: pointer;
  border-radius: 40% 40% 46% 46%;
  background: radial-gradient(circle at 50% 62%, rgba(255, 217, 230, 0.85), rgba(242, 169, 196, 0.45) 46%, rgba(232, 201, 135, 0.18) 72%, transparent 100%);
  opacity: 0.55;
  transition: opacity 0.6s var(--ease), box-shadow 0.6s var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.lantern.filling {
  opacity: 1;
  box-shadow: 0 0 44px 12px rgba(242, 169, 196, 0.4);
  animation: lantern-breathe 1.2s var(--ease) infinite;
}
@keyframes lantern-breathe {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.07); }
}
.lantern-stage.released .lantern {
  animation: lantern-rise 6.5s var(--ease) forwards;
  opacity: 1;
  box-shadow: 0 0 44px 12px rgba(242, 169, 196, 0.4);
}
@keyframes lantern-rise {
  to { transform: translateX(-50%) translateY(calc(-44vh - 140px)) scale(0.55); opacity: 0; }
}
.lantern-wish {
  position: absolute; left: 50%; top: 42%;
  transform: translate(-50%, 0);
  width: min(34ch, 84vw);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-quote);
  line-height: 1.55;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.lantern-wish.risen { opacity: 1; }

/* ---------- Archive: Her Sky ---------- */
.sky-map-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  gap: clamp(2rem, 5vh, 3rem);
  padding-top: clamp(6rem, 14vh, 9rem);
  padding-bottom: 3rem;
  max-width: min(640px, 94vw);
  margin: 0 auto;
}
.sky-map {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
}
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-segment {
  stroke: rgba(232, 201, 135, 0.5);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: opacity 1.8s var(--ease) 0.4s;
}
.map-segment.drawn { opacity: 1; }
.map-star {
  position: absolute; left: var(--x); top: var(--y);
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.map-star .star-dot { transition: opacity 1.2s var(--ease) 0.5s, box-shadow 0.6s; }
.map-star.locked .star-dot { opacity: 0.22; box-shadow: none; background: var(--ivory-dim); }
.map-star.open:hover .star-dot, .map-star.open:focus-visible .star-dot {
  box-shadow: 0 0 16px 5px rgba(242, 169, 196, 0.5);
}
.map-star.unseen .star-dot { animation: star-breathe 2.4s var(--ease) infinite; }
.map-star:focus-visible { outline: 1px solid rgba(232, 201, 135, 0.5); outline-offset: 2px; border-radius: 50%; }
.map-caption {
  position: absolute; left: 50%; top: calc(100% - 2px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--ivory-dim);
  background: rgba(7, 4, 8, 0.85);
  padding: 3px 8px;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.map-star:hover .map-caption, .map-star:focus-visible .map-caption { opacity: 1; }
.map-moon {
  position: absolute; left: var(--x); top: var(--y);
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.map-moon-disc {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(245, 239, 230, 0.12);
  box-shadow: inset -3px -3px 8px rgba(7, 4, 8, 0.6);
  transition: background 1.5s var(--ease), box-shadow 1.5s var(--ease);
}
.map-moon.open .map-moon-disc {
  background: var(--candle);
  box-shadow: 0 0 20px 6px rgba(232, 201, 135, 0.5), 0 0 34px 10px rgba(242, 169, 196, 0.3);
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  :root {
    --moon-size: clamp(96px, 30vw, 140px);
    --mx: calc(100vw - var(--moon-size) - 7vw);
    --my: 9vh;
  }
  section {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }
  .letter { gap: 2em; }
  .count-row { gap: 0.7rem; }
  .count-val { font-size: 1.75rem; }
  /* Re-seat the word labels so nothing collides at 375px
     (Libra's star dots and lines keep their percentage positions) */
  .star-field { height: 120vh; }
  .star-word:nth-of-type(1) { --x: 6%;  --y: 5%; }    /* peerless */
  .star-word:nth-of-type(2) { --x: 54%; --y: 15.5%; } /* luminous */
  .star-word:nth-of-type(3) { --x: 52%; --y: 25%; }   /* resplendent */
  .star-word:nth-of-type(4) { --x: 16%; --y: 33%; }   /* regal */
  .star-word:nth-of-type(5) { --x: 8%;  --y: 56.5%; } /* ethereal */
  .star-word:nth-of-type(6) { --x: 70%; --y: 52%; }   /* magnetic */
  .star-word:nth-of-type(7) { --x: 65%; --y: 74%; }   /* warm */
  .star-word:nth-of-type(8) { --x: 55%; --y: 6%; }    /* incandescent */
  .star-word:nth-of-type(9) { --x: 10%; --y: 81%; }   /* beguiling */
  .photo-print { width: min(58vw, 220px); }
}

/* ---------- Reduced motion — everything legible, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-animate] { opacity: 1; transform: none; }
  .js .letter-rule[data-animate] { transform: none; }
  .js .ignite { background: none; color: var(--ivory); }
  .js .ignite .gleam { color: var(--champagne); }
  .js .ignite .gleam--pink { color: var(--pink); }
  .hero-name {
    animation: none;
    background: none;
    color: var(--ivory);
  }
  .veil { display: none; }
  .scroll-cue { display: none; }
  .spark-path, .constellation-path { stroke-dashoffset: 0; }
  .star-word { opacity: 0.45; }
  .js .star-field .star-dot { opacity: 0.95; }
  .moon { transition: none; }
  body[data-scene="orbit"] main > section:not(.orbit) { opacity: 1; }
}
