/* ============================================================================
   For Sani — starlit night
   You shouldn't need to touch this file. All the words live in content.js.
   ========================================================================== */

:root {
  /* night */
  --night-0: #05060f;
  --night-1: #0a0c1c;
  --night-2: #101230;
  --plum:    #1a1236;

  /* ink */
  --ink:      #f2eee6;
  --ink-soft: #c9c5d8;
  --muted:    #8d8aa6;

  /* light sources */
  --gold:      #e9c98d;
  --gold-dim:  rgba(233, 201, 141, .55);
  --gold-line: rgba(233, 201, 141, .18);
  --rose:      #e8879b;
  --blue:      #8fb6ff;

  --glass:  rgba(255, 255, 255, .04);
  --glass-2:rgba(255, 255, 255, .07);
  --hair:   rgba(255, 255, 255, .09);

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --hand:  "Caveat", "Segoe Script", cursive;
  --sans:  "Karla", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --gutter: clamp(20px, 6vw, 80px);
  --measure: 62ch;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* class selectors below set `display`, which would otherwise out-specify the
   browser's own rule for [hidden] and leave hidden things on screen */
[hidden] { display: none !important; }

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

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--night-0);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--night-0); }

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 3px;
}


/* ── the sky ─────────────────────────────────────────────────────────── */

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(90, 60, 140, .30), transparent 55%),
    radial-gradient(90%  70% at 12% 108%, rgba(200, 110, 140, .16), transparent 60%),
    radial-gradient(80%  60% at 92% 42%,  rgba(60, 90, 180, .14),  transparent 60%),
    radial-gradient(130% 100% at 50% 50%, transparent 40%, rgba(2, 3, 10, .82) 100%);
}

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


.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


/* ── the door ────────────────────────────────────────────────────────── */

/* while it's shut, the page underneath is taken out of the layout entirely —
   which is also what lets the gate stay translucent and keep the stars */
body.is-locked { overflow: hidden; }
body.is-locked main,
body.is-locked .dots,
body.is-locked .progress,
body.is-locked .chatfab,
body.is-locked .chat,
body.is-locked .music { display: none; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  text-align: center;
  background: radial-gradient(120% 90% at 50% 42%, rgba(12, 9, 30, .52), rgba(3, 4, 12, .87) 72%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  /* the words leave first, then the veil lifts */
  transition: opacity 1.05s .15s var(--ease), visibility 1.05s .15s;
}
.gate.is-open { opacity: 0; visibility: hidden; pointer-events: none; }

.gate__inner {
  max-width: 460px;
  animation: gateIn 1.3s var(--ease);
  transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease);
}
.gate.is-open .gate__inner { opacity: 0; transform: translateY(-14px) scale(.985); filter: blur(6px); }
@keyframes gateIn { from { opacity: 0; transform: translateY(18px); } }

/* the beat where the door recognises the words */
.gate.is-right #gateInput {
  border-color: var(--gold);
  background: rgba(233, 201, 141, .09);
  box-shadow: 0 0 34px -8px var(--gold-dim);
  color: var(--gold);
}
.gate.is-right .gate__title { filter: drop-shadow(0 0 44px rgba(233, 201, 141, .42)); }

/* the beat before that: on the web the phrase has to be stretched into a key
   before anything can be tried, and that takes her phone a moment */
.gate.is-trying .gate__btn { opacity: .55; pointer-events: none; }
.gate.is-trying #gateInput { animation: cutting 1.1s ease-in-out infinite; }
@keyframes cutting {
  50% { border-color: var(--gold-dim); box-shadow: 0 0 26px -10px var(--gold-dim); }
}

.gate__eyebrow {
  font-family: var(--hand);
  font-size: clamp(1.05rem, 2.4vw, 1.32rem);
  color: var(--rose);
  margin-bottom: 16px;
}

.gate__title {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.3rem, 8vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  background: linear-gradient(178deg, #fffaf0 10%, var(--gold) 58%, #b98f5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 34px rgba(233, 201, 141, .2));
  transition: filter .35s var(--ease);
}

.gate__sub {
  font-family: var(--serif);
  font-size: clamp(1rem, 2.2vw, 1.16rem);
  color: var(--ink-soft);
  margin: 15px auto 0;
  max-width: 30ch;
  line-height: 1.6;
}

.gate__form {
  margin-top: clamp(28px, 5vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: min(340px, 100%);
  margin-inline: auto;
}

#gateInput {
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  text-align: center;
  letter-spacing: .07em;
  transition: border-color .3s, background .3s, box-shadow .35s, color .3s;
}
#gateInput::placeholder { color: var(--muted); font-style: italic; letter-spacing: .02em; }
#gateInput:focus { outline: none; border-color: var(--gold); background: rgba(255, 255, 255, .07); }

.gate__btn {
  padding: 13px 22px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(100deg, var(--rose), var(--gold));
  color: #17131c;
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.gate__btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(233, 201, 141, .6); }

.gate__error {
  margin-top: 18px;
  min-height: 1.5em;
  font-family: var(--hand);
  font-size: 1.16rem;
  color: var(--rose);
}

.gate.is-wrong .gate__inner { animation: shake .5s var(--ease); }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}


/* ── the care check ──────────────────────────────────────────────────── */

/* Sits under the door (z-index 90) so that when she says the words the
   door can fade off it, and this is what's waiting underneath. */
.care {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: flex;
  padding:
    calc(clamp(22px, 7vw, 60px) + env(safe-area-inset-top))
    calc(clamp(18px, 6vw, 60px) + env(safe-area-inset-right))
    calc(clamp(26px, 7vw, 60px) + env(safe-area-inset-bottom))
    calc(clamp(18px, 6vw, 60px) + env(safe-area-inset-left));
  text-align: center;
  background: radial-gradient(120% 90% at 50% 38%, rgba(12, 9, 30, .62), rgba(3, 4, 12, .92) 72%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transition: opacity 1.05s .15s var(--ease), visibility 1.05s .15s;
}
.care.is-open { opacity: 0; visibility: hidden; pointer-events: none; }

/* margin:auto centres it while it fits and lets it scroll honestly when a
   long "why" makes it taller than her screen */
.care__inner {
  width: min(540px, 100%);
  margin: auto;
  animation: gateIn 1.3s var(--ease);
  transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease);
}
.care.is-open .care__inner { opacity: 0; transform: translateY(-14px) scale(.985); filter: blur(6px); }

.care__eyebrow {
  font-family: var(--hand);
  font-size: clamp(1.05rem, 4.6vw, 1.32rem);
  color: var(--rose);
  margin-bottom: 10px;
}

.care__title {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.6rem, 6.4vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  background: linear-gradient(178deg, #fffaf0 10%, var(--gold) 58%, #b98f5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(233, 201, 141, .2));
}

.care__sub {
  font-family: var(--serif);
  font-size: clamp(1rem, 3.7vw, 1.12rem);
  color: var(--ink-soft);
  margin: 12px auto 0;
  max-width: 34ch;
  line-height: 1.6;
}

/* which of the two she's on */
.care__pips {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: clamp(20px, 5vw, 28px);
}
.care__pip {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  transition: background .4s, box-shadow .4s, transform .4s var(--ease);
}
.care__pip.is-now  { background: var(--gold); box-shadow: 0 0 12px var(--gold-dim); transform: scale(1.25); }
.care__pip.is-done { background: var(--gold-dim); }

/* the question itself — the biggest thing on the screen */
.care__ask,
.care__why {
  margin-top: clamp(22px, 5.5vw, 34px);
  animation: careTurn .55s var(--ease);
}
@keyframes careTurn { from { opacity: 0; transform: translateY(14px); } }

.care__q {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2rem, 8.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
  text-shadow: 0 0 46px rgba(233, 201, 141, .22);
}
.care__q:focus { outline: none; }

.care__note {
  font-family: var(--hand);
  font-size: clamp(1.1rem, 4.4vw, 1.34rem);
  color: var(--muted);
  margin: 12px auto 0;
  max-width: 30ch;
  line-height: 1.4;
}

/* thumb-sized, side by side once there's room for it */
.care__answers {
  display: grid;
  gap: 12px;
  margin-top: clamp(26px, 6vw, 36px);
}
@media (min-width: 520px) {
  .care__answers { grid-template-columns: 1fr 1fr; }
  .care__answers--one { grid-template-columns: 1fr; max-width: 340px; margin-inline: auto; }
}

.care__btn {
  min-height: 56px;
  padding: 15px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, border-color .3s, color .3s;
}
.care__btn--yes {
  border: 0;
  background: linear-gradient(100deg, var(--rose), var(--gold));
  color: #17131c;
}
.care__btn--no {
  border: 1px solid var(--gold-line);
  background: var(--glass);
  color: var(--ink-soft);
}
.care__btn:active { transform: scale(.98); }

/* only where there's a real pointer — on a phone a tapped button would
   otherwise keep its hover state, and a lift under the cursor jitters */
@media (hover: hover) and (pointer: fine) {
  .care__btn--yes:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(233, 201, 141, .6); }
  .care__btn--no:hover { border-color: var(--gold-dim); color: var(--gold); background: var(--glass-2); }
}

/* ── the "then go and do it" side ── */

/* while she's being told why, the preamble gets out of the way: on a phone
   the reason and its button should be the whole screen */
.care.is-why .care__eyebrow,
.care.is-why .care__title,
.care.is-why .care__sub,
.care.is-why .care__pips { display: none; }
.care.is-why .care__why { margin-top: 0; }

.care__whyTitle {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.65rem, 6.6vw, 2.5rem);
  line-height: 1.16;
  color: var(--gold);
  filter: drop-shadow(0 0 30px rgba(233, 201, 141, .22));
}
.care__whyTitle:focus { outline: none; }

.care__whyBody {
  margin: clamp(18px, 4.5vw, 24px) auto 0;
  max-width: 42ch;
  text-align: left;
}
.care__whyBody p {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 4vw, 1.22rem);
  line-height: 1.66;
  color: var(--ink-soft);
  margin-bottom: 1em;
}
.care__whyBody p:last-child { margin-bottom: 0; }

.care__after { margin-top: 20px; }
.care__after .linkbtn { font-size: .62rem; padding: 6px 4px; }

/* the line that lets her in — by then it's the only thing on the screen */
.care.is-done .care__eyebrow,
.care.is-done .care__title,
.care.is-done .care__sub,
.care.is-done .care__pips { display: none; }

.care__done {
  font-family: var(--hand);
  font-size: clamp(1.5rem, 6vw, 2rem);
  color: var(--gold);
  min-height: 1.2em;
  line-height: 1.35;
}
.care.is-done .care__done { animation: careTurn .6s var(--ease); }

/* landscape phones: the same thing, with the air taken out */
@media (max-height: 560px) {
  .care__q { font-size: clamp(1.6rem, 5.6vh, 2.1rem); }
  .care__ask, .care__why { margin-top: 16px; }
  .care__answers { margin-top: 18px; }
  .care__sub { margin-top: 8px; }
}


/* ── progress line ───────────────────────────────────────────────────── */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  background: rgba(255, 255, 255, .05);
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--rose), var(--gold) 60%, var(--blue));
  box-shadow: 0 0 12px var(--gold-dim);
}


/* ── section dots ────────────────────────────────────────────────────── */

.dots {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}
.dots a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--muted);
}
.dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  transition: all .35s var(--ease);
}
.dots span {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: lowercase;
  opacity: 0;
  transform: translateX(6px);
  transition: all .35s var(--ease);
  white-space: nowrap;
}
.dots a:hover span { opacity: .8; transform: none; }
.dots a.is-active i {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--gold-dim);
  transform: scale(1.25);
}
.dots a.is-active span { opacity: .65; transform: none; color: var(--gold); }

@media (max-width: 900px) { .dots { display: none; } }


/* ── music button ────────────────────────────────────────────────────── */

.music {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(10, 12, 28, .6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: .72rem;
  letter-spacing: .07em;
  color: var(--ink-soft);
  transition: border-color .3s, color .3s;
}
.music:hover { border-color: var(--gold-line); color: var(--gold); }
.music__icon { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.music__icon i {
  width: 2px; height: 4px;
  background: currentColor;
  border-radius: 1px;
}
.music[aria-pressed="true"] { color: var(--gold); border-color: var(--gold-line); }
.music[aria-pressed="true"] .music__icon i { animation: eq .9s ease-in-out infinite; }
.music[aria-pressed="true"] .music__icon i:nth-child(2) { animation-delay: .15s; }
.music[aria-pressed="true"] .music__icon i:nth-child(3) { animation-delay: .3s; }
.music[aria-pressed="true"] .music__icon i:nth-child(4) { animation-delay: .45s; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 12px; } }

@media (max-width: 600px) { .music { left: 14px; bottom: 14px; padding: 8px 13px; } }


/* ── the pocket him (chat), top left ─────────────────────────────────── */

.chatfab {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 56;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 12px;
  border-radius: 13px;
  border: 1px solid var(--hair);
  background: rgba(10, 12, 28, .6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink-soft);
  transition: border-color .3s, color .3s, transform .3s var(--ease);
  /* arrives after the hero has assembled */
  animation: fade 1s var(--ease) 2.2s backwards;
}
.chatfab:hover, .chatfab:focus-visible { border-color: var(--gold-line); color: var(--gold); transform: translateY(-1px); }
.chatfab svg { color: var(--rose); flex: none; }
.chatfab__label {
  font-family: var(--hand);
  font-size: 1.08rem;
  line-height: 1;
  letter-spacing: .02em;
}
.chatfab__dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--night-0);
  box-shadow: 0 0 10px var(--blue);
  transition: background .6s, box-shadow .6s;
}
.chatfab__dot.is-awake { background: var(--gold); box-shadow: 0 0 10px var(--gold-dim); }

.chat {
  position: fixed;
  top: 64px;
  left: 14px;
  z-index: 70;
  width: min(360px, calc(100vw - 28px));
  height: min(480px, calc(100svh - 120px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(233, 201, 141, .06), transparent 60%),
    linear-gradient(168deg, #14162e, #0a0c1c);
  box-shadow: 0 50px 100px -40px #000, 0 0 60px -30px rgba(233, 201, 141, .3);
  transform-origin: top left;
  opacity: 0;
  transform: scale(.92) translateY(-8px);
  visibility: hidden;
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
}
.chat.is-open { opacity: 1; transform: none; visibility: visible; }

.chat__head {
  position: relative;
  padding: 13px 46px 11px 18px;
  border-bottom: 1px solid var(--hair);
}
.chat__name {
  font-family: var(--hand);
  font-size: 1.4rem;
  line-height: 1.1;
  color: var(--gold);
}
.chat__presence {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.chat__orb {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  transition: background .6s, box-shadow .6s;
}
.chat__orb.is-awake { background: var(--gold); box-shadow: 0 0 8px var(--gold-dim); }
.chat__close {
  position: absolute;
  top: 9px; right: 9px;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 0;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: color .3s, background .3s;
}
.chat__close:hover { color: var(--gold); background: var(--glass); }

.chat__log {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.chat__msg {
  max-width: 84%;
  padding: 9px 13px;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--hair);
  border-radius: 13px 13px 13px 4px;
  align-self: flex-start;
  overflow-wrap: break-word;
  animation: slipIn .5s var(--ease);
}
.chat__msg--her {
  align-self: flex-end;
  color: var(--ink);
  background: rgba(233, 201, 141, .12);
  border-color: var(--gold-line);
  border-radius: 13px 13px 4px 13px;
}
.chat__typing { display: flex; gap: 4px; align-items: center; min-height: 1em; }
.chat__typing i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: dotwave 1.1s ease-in-out infinite;
}
.chat__typing i:nth-child(2) { animation-delay: .15s; }
.chat__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dotwave {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

.chat__form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 8px;
  border-top: 1px solid var(--hair);
}
#chatInput {
  flex: 1;
  min-width: 0;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;   /* exactly 16 — stops iOS zooming the whole page */
  transition: border-color .3s, background .3s;
}
#chatInput::placeholder { color: var(--muted); }
#chatInput:focus { outline: none; border-color: var(--gold); background: rgba(255, 255, 255, .07); }
.chat__send {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--rose), var(--gold));
  color: #17131c;
  display: grid;
  place-items: center;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.chat__send:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(233, 201, 141, .7); }
.chat__real { text-align: center; padding: 0 12px 11px; }
.chat__real .linkbtn { font-size: .58rem; }

@media (max-width: 620px) {
  .chatfab { top: 12px; left: 12px; }
  .chat {
    top: 58px;
    left: 12px;
    width: calc(100vw - 24px);
    height: min(520px, calc(100svh - 82px));
  }
}


/* ── shared layout ───────────────────────────────────────────────────── */

.section {
  padding: clamp(90px, 15vh, 170px) var(--gutter);
  max-width: 1180px;
  margin: 0 auto;
}

.section__head { margin-bottom: clamp(46px, 7vw, 78px); }

.eyebrow {
  font-size: .68rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 20px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.12; }

h2 {
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  letter-spacing: -.01em;
}

.lede {
  margin-top: 22px;
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.08rem);
  font-weight: 300;
}


/* ── reveal on scroll ────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.reveal.is-in { opacity: 1; transform: none; }


/* ══ 1. HERO ═════════════════════════════════════════════════════════ */

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12vh var(--gutter) 14vh;
  position: relative;
}

.hero__inner { max-width: 760px; }

/* the opening assembles line by line — on unlock, and on every return */
.hero__inner > .reveal {
  transition-duration: 1.25s;
  transition-delay: calc(.18s + var(--hi, 0) * .15s);
}
.hero__inner > *:nth-child(1) { --hi: 0; }
.hero__inner > *:nth-child(2) { --hi: 1; }
.hero__inner > *:nth-child(3) { --hi: 2; }
.hero__inner > *:nth-child(4) { --hi: 3; }
.hero__inner > *:nth-child(5) { --hi: 4; }

/* the first moment, pinned above everything else */
.opener {
  width: 100%;
  max-width: 560px;
  margin: 0 auto clamp(30px, 5vw, 46px);
}

.opener__cap {
  font-family: var(--hand);
  font-size: clamp(1.05rem, 2.4vw, 1.32rem);
  color: var(--rose);
  letter-spacing: .02em;
  margin-bottom: 14px;
}

/* the screenshot's own background is near-black like the page, so it needs a
   hairline and a little glow to read as an object rather than floating text */
.opener__btn {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(233, 201, 141, .16);
  background: #0b0b0d;
  cursor: zoom-in;
  box-shadow: 0 18px 44px -24px #000, 0 0 40px -22px rgba(233, 201, 141, .45);
  transition: transform .5s var(--ease), border-color .5s, box-shadow .5s var(--ease);
}
.opener__btn:hover, .opener__btn:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold-line);
  box-shadow: 0 26px 54px -26px #000, 0 0 54px -18px rgba(233, 201, 141, .5);
}
.opener__btn img { display: block; width: 100%; height: auto; }

.kicker {
  font-family: var(--hand);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  color: var(--rose);
  letter-spacing: .02em;
  margin-bottom: clamp(14px, 2vw, 22px);
}

.hero__name {
  font-size: clamp(4.2rem, 20vw, 12.5rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -.03em;
  line-height: .92;
  background: linear-gradient(178deg, #fffaf0 8%, var(--gold) 52%, #b98f5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 46px rgba(233, 201, 141, .22));
}

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: clamp(26px, 4vw, 40px) auto clamp(24px, 3.5vw, 34px);
  max-width: 260px;
  color: var(--gold-dim);
}
.rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}

.hero__sub {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2.3vw, 1.5rem);
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 30ch;
  margin: 0 auto;
  line-height: 1.55;
}

.scrollcue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .6rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  animation: fadeUp 1.4s 1.6s both;
}
.scrollcue i {
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, var(--gold-dim), transparent);
  position: relative;
  overflow: hidden;
}
.scrollcue i::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px; height: 14px;
  background: var(--gold);
  animation: trickle 2.4s var(--ease) infinite;
}
@keyframes trickle { 0% { transform: translateY(-16px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(52px); opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }


/* ══ 2. DISTANCE ═════════════════════════════════════════════════════ */

.clocks {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(10px, 3vw, 40px);
  margin-bottom: clamp(60px, 9vw, 100px);
}

.clock {
  padding: clamp(26px, 3.4vw, 40px) clamp(20px, 3vw, 36px);
  border: 1px solid var(--hair);
  border-radius: 3px;
  background: linear-gradient(165deg, var(--glass), rgba(255, 255, 255, .012));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.clock::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}

.clock__label {
  font-size: .63rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}
.clock__city {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  margin-top: 10px;
  color: var(--ink);
}
.clock__time {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 8vw, 4.1rem);
  font-weight: 300;
  line-height: 1;
  margin: 14px 0 10px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.clock__ss {
  font-size: .34em;
  color: var(--gold-dim);
  margin-left: .3em;
  vertical-align: .9em;
  letter-spacing: .04em;
}
.clock__date {
  font-size: .74rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.clock__state {
  margin-top: 18px;
  font-family: var(--hand);
  font-size: 1.12rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.clock__orb {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: none;
  background: var(--blue);
  box-shadow: 0 0 12px currentColor;
  transition: background .6s;
}
.clock.is-day .clock__orb { background: var(--gold); }

.clocks__link {
  position: relative;
  color: var(--gold-line);
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 60px;
}
.clocks__link svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.clocks__gap {
  position: relative;
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  /* fades the dashed line out behind the text instead of boxing it off */
  background: radial-gradient(ellipse at center, rgba(5, 6, 15, .96) 42%, rgba(5, 6, 15, 0) 76%);
  padding: 16px 12px;
  text-align: center;
  max-width: 92px;
  line-height: 1.5;
}

@media (max-width: 780px) {
  .clocks { grid-template-columns: 1fr; }
  .clocks__link { min-height: 74px; }
  .clocks__link svg { width: 60px; left: 50%; transform: translateX(-50%); }
}


/* the arc */

.arc { margin-bottom: clamp(60px, 9vw, 100px); }
.arc__svg { width: 100%; height: auto; overflow: visible; }

.arc__line { opacity: .16; }
.arc__dash {
  opacity: .85;
  stroke-dasharray: 5 11;
  animation: dashflow 3.4s linear infinite;
  filter: drop-shadow(0 0 6px rgba(233, 201, 141, .4));
}
@keyframes dashflow { to { stroke-dashoffset: -32; } }

.arc__halo { fill: var(--rose); opacity: .13; }
.arc__heart { fill: var(--rose); filter: drop-shadow(0 0 8px rgba(232, 135, 155, .9)); }

.arc__pin circle { fill: var(--gold); }
.arc__pin .arc__ring {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  opacity: .45;
  transform-origin: center;
  animation: ping 3s ease-out infinite;
}
@keyframes ping {
  0%   { r: 6;  opacity: .6; }
  100% { r: 22; opacity: 0; }
}
.arc__pin text {
  fill: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-anchor: middle;
}

.arc__cap {
  text-align: center;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.arc__cap strong {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 300;
  color: var(--ink);
}
.arc__cap span { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }


/* ticking counters */

.counter { text-align: center; }

.counter__label {
  font-family: var(--hand);
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  color: var(--rose);
  margin-bottom: 26px;
}

.counter__row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(14px, 3.6vw, 44px);
}

.unit { min-width: 62px; }
.unit b {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 6.4vw, 3.3rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: color .3s;
}
.unit.is-tick b { color: var(--gold); }
.unit span {
  display: block;
  margin-top: 10px;
  font-size: .6rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
}

.counter__foot {
  margin-top: 30px;
  font-size: .82rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ══ 3. LETTER ═══════════════════════════════════════════════════════ */

.letter { max-width: 900px; }

.letter__body p {
  font-family: var(--serif);
  font-size: clamp(1.22rem, 2.5vw, 1.6rem);
  line-height: 1.72;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0 0 1.5em;
}
.letter__body p:last-child { margin-bottom: 0; }

/* paragraphs are lit by the reading light in app.js — it drives their
   opacity per frame, so give each its own layer. Until the light runs (and
   under reduced motion) they are simply visible. */
.letter__body .lp { will-change: opacity, transform; }

.letter__body .dropcap {
  float: left;
  font-size: 3.9em;
  line-height: .78;
  padding: .06em .12em 0 0;
  color: var(--gold);
  font-style: italic;
}
/* the cap settles like ink once its paragraph first catches the light */
.lp.is-lit .dropcap { animation: inksettle 1.6s .1s var(--ease) both; }
@keyframes inksettle {
  from { opacity: 0; filter: blur(9px); }
  55%  { opacity: 1; }
  to   { filter: blur(0); }
}

.letter__sign { margin-top: clamp(48px, 7vw, 76px); }
.letter__signoff {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}
.letter__signature {
  font-family: var(--hand);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  color: var(--gold);
  margin-top: 4px;
  line-height: 1.1;
}
/* the name writes itself, left to right */
.letter__sign.is-in .letter__signature { animation: signwipe 1.4s .25s var(--ease) both; }
@keyframes signwipe {
  from { clip-path: inset(-18% 96% -18% -6%); opacity: 0; }
  12%  { opacity: 1; }
  to   { clip-path: inset(-18% -8% -18% -6%); opacity: 1; }
}


/* ══ 4. GALLERY ══════════════════════════════════════════════════════ */

/* Columns rather than a grid: phone photos are tall, landscape ones are wide,
   and a fixed-ratio tile would centre-crop the tops off people's heads. Each
   tile keeps its own shape and the columns take care of the packing. */
.gallery {
  columns: clamp(210px, 25vw, 290px);
  column-gap: clamp(20px, 3vw, 38px);
}

.shot {
  position: relative;
  display: block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 clamp(20px, 3vw, 38px);
  padding: 12px 12px 0;
  background: linear-gradient(168deg, #14162e, #0c0e1e);
  border: 1px solid var(--hair);
  border-radius: 2px;
  text-align: left;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .95);
  transition: transform .55s var(--ease), box-shadow .55s var(--ease), border-color .55s;
  transform: rotate(var(--tilt, 0deg));
}
.shot:hover, .shot:focus-visible {
  transform: rotate(0deg) translateY(-8px) scale(1.02);
  border-color: var(--gold-line);
  box-shadow: 0 34px 60px -26px rgba(0, 0, 0, 1), 0 0 44px -18px rgba(233, 201, 141, .35);
  z-index: 3;
}

.shot__frame {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 40% 30%, rgba(233, 201, 141, .10), transparent 62%),
    linear-gradient(150deg, #1b1d38, #0e1022);
}
.shot__frame img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(.92) contrast(1.03);
  transition: filter .6s var(--ease), transform 1.1s var(--ease);
}
.shot:hover .shot__frame img { filter: none; transform: scale(1.04); }

.shot__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 6, 15, .5));
  opacity: .8;
  pointer-events: none;
}

/* static, not absolute — with no image there'd be nothing to give the frame height */
.shot__missing {
  aspect-ratio: 4 / 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
}
.shot__missing svg { opacity: .35; }
.shot__missing code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--gold-dim);
  word-break: break-all;
}

.shot__cap {
  font-family: var(--hand);
  font-size: 1.22rem;
  color: var(--ink-soft);
  padding: 14px 4px 16px;
  line-height: 1.3;
}

.shot__no {
  position: absolute;
  top: 22px; right: 22px;
  font-size: .62rem;
  letter-spacing: .2em;
  color: var(--gold);
  opacity: 0;
  transition: opacity .4s;
  z-index: 2;
  text-shadow: 0 1px 8px #000;
}
.shot:hover .shot__no { opacity: .9; }


/* lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(4px, 2vw, 24px);
  padding: clamp(16px, 5vw, 56px);
}
/* the veil is its own layer so the photo can fly over a clean stage —
   it fades up around the flight and out again on close */
.lightbox::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 12, .93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.lightbox.is-on::before { opacity: 1; }
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }

.lightbox__fig {
  position: relative;
  z-index: 1;
  /* pin to the middle track — with the nav buttons hidden (single photo),
     auto-placement would drop the figure into the left column off-centre */
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-width: 0;
  max-height: 100%;
}
.lightbox__fig img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 40px 90px -30px #000;
}
.lightbox__fig img.is-swap { animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.965); } }

.lightbox__fig figcaption {
  font-family: var(--hand);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  color: var(--ink-soft);
  text-align: center;
  max-width: 46ch;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.lightbox.is-on .lightbox__fig figcaption {
  opacity: 1;
  animation: fade .45s var(--ease) .25s backwards;
}

.lightbox__close,
.lightbox__nav {
  position: relative;
  z-index: 1;
  color: var(--ink-soft);
  border: 1px solid var(--hair);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all .3s var(--ease);
  flex: none;
  opacity: 0;
}
.lightbox.is-on .lightbox__close,
.lightbox.is-on .lightbox__nav {
  opacity: 1;
  animation: fade .45s var(--ease) .25s backwards;
}
.lightbox__close:hover, .lightbox__nav:hover { color: var(--gold); border-color: var(--gold-line); background: var(--glass); }

.lightbox__nav { width: 52px; height: 52px; font-size: 1.9rem; line-height: 0; }
.lightbox__close {
  position: absolute;
  top: clamp(14px, 3vw, 30px);
  right: clamp(14px, 3vw, 30px);
  width: 42px; height: 42px;
  font-size: 1.5rem;
  line-height: 0;
  z-index: 2;
}

@media (max-width: 620px) {
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lightbox__nav { width: 46px; height: 46px; }
  .lightbox__nav--prev { grid-area: 2 / 1; justify-self: start; }
  .lightbox__nav--next { grid-area: 2 / 1; justify-self: end; }
  .lightbox__fig { grid-area: 1 / 1; }
}


/* ══ 5. OPEN WHEN ════════════════════════════════════════════════════ */

.envelopes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr));
  gap: clamp(18px, 2.6vw, 30px);
}

.env {
  position: relative;
  aspect-ratio: 8 / 5.8;
  min-height: 200px;
  border-radius: 3px;
  border: 1px solid var(--hair);
  background: linear-gradient(160deg, #15172f, #0b0d1d);
  overflow: hidden;
  /* the label is anchored to the bottom so it can never grow into the seal */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 0 20px 38px;
  transition: transform .5s var(--ease), border-color .5s, box-shadow .5s;
  box-shadow: 0 16px 36px -24px rgba(0, 0, 0, .9);
}
.env:hover, .env:focus-visible {
  transform: translateY(-7px);
  border-color: var(--gold-line);
  box-shadow: 0 30px 54px -26px #000, 0 0 40px -16px rgba(233, 201, 141, .3);
}

/* the flap */
.env__flap {
  position: absolute;
  inset: 0 0 auto 0;
  height: 62%;
  background: linear-gradient(170deg, #1c1f3d, #14162c);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  transform-origin: top center;
  transition: transform .75s var(--ease);
  z-index: 2;
}
.env:hover .env__flap { transform: rotateX(28deg); }

/* wax seal */
.env__seal {
  position: absolute;
  top: 43%;
  left: 50%;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #f0a3b4, var(--rose) 42%, #93445a 100%);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: rgba(255, 255, 255, .82);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .6), inset 0 -2px 6px rgba(0, 0, 0, .3);
  z-index: 3;
  transition: transform .6s var(--ease), opacity .5s;
}
.env:hover .env__seal { transform: scale(1.08) rotate(-7deg); }

.env__when {
  position: relative;
  z-index: 4;
  font-family: var(--serif);
  font-size: clamp(1.24rem, 2.6vw, 1.5rem);
  font-weight: 300;
  line-height: 1.28;
  color: var(--ink);
  padding: 0 6px;
  text-shadow: 0 2px 14px rgba(5, 6, 15, .9);
}

.env__hint {
  position: absolute;
  bottom: 13px;
  left: 0; right: 0;
  z-index: 4;
  font-size: .6rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transition: opacity .4s;
}
.env:hover .env__hint, .env:focus-visible .env__hint { opacity: .85; }

/* already opened */
.env.is-opened { border-color: rgba(233, 201, 141, .22); }
.env.is-opened .env__flap { transform: rotateX(148deg); background: linear-gradient(170deg, #21243f, #171a30); }
.env.is-opened .env__seal { opacity: 0; transform: scale(.5); }
.env.is-opened::after {
  content: "read";
  position: absolute;
  top: 12px; right: 14px;
  z-index: 5;
  font-size: .56rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.envelopes__reset { text-align: center; margin-top: 40px; }
.linkbtn {
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color .3s, border-color .3s;
}
.linkbtn:hover { color: var(--gold); border-color: var(--gold-line); }


/* note modal */

.note {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  background: rgba(3, 4, 12, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fade .35s var(--ease);
  overflow-y: auto;
}
.note[hidden] { display: none; }

.note__sheet {
  position: relative;
  width: min(640px, 100%);
  padding: clamp(38px, 6vw, 66px) clamp(26px, 5vw, 60px);
  border: 1px solid var(--gold-line);
  border-radius: 3px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(233, 201, 141, .07), transparent 60%),
    linear-gradient(168deg, #14162e, #0a0c1c);
  box-shadow: 0 50px 100px -40px #000;
  animation: unfold .55s var(--ease);
  max-height: 100%;
}
@keyframes unfold { from { opacity: 0; transform: translateY(18px) scale(.97); } }

.note__close {
  position: absolute;
  top: 16px; right: 18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 0;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: color .3s, background .3s;
}
.note__close:hover { color: var(--gold); background: var(--glass); }

.note__eyebrow {
  font-size: .62rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 14px;
}
.note__title {
  font-size: clamp(1.7rem, 4.4vw, 2.5rem);
  font-style: italic;
  color: var(--ink);
  margin-bottom: 28px;
}
.note__body p {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.3vw, 1.32rem);
  line-height: 1.72;
  color: var(--ink-soft);
  margin-bottom: 1.15em;
}
.note__body p:last-child { margin-bottom: 0; }
.note__sign {
  margin-top: 32px;
  font-family: var(--hand);
  font-size: 1.7rem;
  color: var(--gold);
}


/* ══ 6. THE JAR ══════════════════════════════════════════════════════ */

.jar-section { max-width: 1020px; }

.jar {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 70px);
}

.jar__vessel {
  display: block;
  position: relative;
  text-align: center;
  transition: transform .5s var(--ease);
}
.jar__vessel:hover { transform: translateY(-5px); }
.jar__vessel:active { transform: translateY(1px) scale(.985); }
/* block, so the jar and its label never share a line when the column is wide */
.jar__vessel svg { display: block; width: 100%; max-width: 210px; height: auto; margin: 0 auto; overflow: visible; }

.jar__glass {
  fill: rgba(143, 182, 255, .07);
  stroke: rgba(233, 201, 141, .35);
  stroke-width: 1.4;
}
.jar__lid {
  fill: rgba(233, 201, 141, .17);
  stroke: rgba(233, 201, 141, .5);
  stroke-width: 1.4;
}
.jar__slips rect {
  fill: #f4ead6;
  opacity: .82;
  transform-box: fill-box;
  transform-origin: center;
  animation: bob 4.4s ease-in-out infinite;
}
.jar__slips rect:nth-child(2n) { animation-duration: 5.6s; animation-delay: -1.4s; opacity: .7; }
.jar__slips rect:nth-child(3n) { animation-duration: 6.4s; animation-delay: -2.8s; opacity: .9; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3.5px); } }

.jar__shine { fill: rgba(255, 255, 255, .13); }

.jar__vessel::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -4px;
  width: 68%; height: 26px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(233, 201, 141, .3), transparent 70%);
  filter: blur(9px);
  pointer-events: none;
}

.jar__cta {
  display: inline-block;
  margin-top: 22px;
  font-size: .66rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-line);
  padding-bottom: 5px;
}

.jar__slip { min-height: 190px; display: flex; flex-direction: column; justify-content: center; }

.jar__slipText {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.6vw, 2.15rem);
  line-height: 1.5;
  font-weight: 300;
  color: var(--ink);
  font-style: italic;
  position: relative;
  padding-left: clamp(20px, 3vw, 34px);
  border-left: 1px solid var(--gold-line);
  min-height: 1.5em;
}
.jar__slipText.is-new { animation: slipIn .7s var(--ease); }
@keyframes slipIn {
  0%   { opacity: 0; transform: translateY(20px) rotate(-1.6deg); filter: blur(4px); }
  100% { opacity: 1; transform: none; filter: none; }
}

.jar__count {
  margin-top: 22px;
  padding-left: clamp(20px, 3vw, 34px);
  font-size: .64rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 720px) {
  .jar { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .jar__vessel svg { max-width: 160px; }
  .jar__slip { min-height: 0; }
  .jar__slipText { border-left: 0; padding-left: 0; }
  .jar__count { padding-left: 0; }
}


/* ══ 7. ENDING ═══════════════════════════════════════════════════════ */

.ending {
  text-align: center;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 780px;
}

.heart { color: var(--rose); margin-bottom: 30px; }
.heart svg {
  width: 34px; height: 34px;
  fill: currentColor;
  filter: drop-shadow(0 0 18px rgba(232, 135, 155, .65));
  animation: beat 2.6s ease-in-out infinite;
}
@keyframes beat {
  0%, 100%   { transform: scale(1); }
  8%         { transform: scale(1.17); }
  16%        { transform: scale(1); }
  24%        { transform: scale(1.11); }
  34%        { transform: scale(1); }
}

.ending__line {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 26px auto 0;
  line-height: 1.7;
}

.counter--reunion { margin: clamp(52px, 8vw, 82px) 0; }

.ending__closer {
  font-family: var(--hand);
  font-size: clamp(1.6rem, 4.4vw, 2.3rem);
  color: var(--gold);
  margin-top: clamp(40px, 6vw, 62px);
  line-height: 1.4;
}

.foot {
  margin-top: clamp(70px, 12vh, 130px);
  font-size: .64rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(141, 138, 166, .5);
}


/* ── petal cursor trail (desktop only) ───────────────────────────────── */

.petal {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  width: 7px; height: 7px;
  border-radius: 50% 0 50% 50%;
  background: var(--rose);
  opacity: .55;
  animation: petalfall 1.5s var(--ease) forwards;
}
@keyframes petalfall {
  0%   { opacity: .6; transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { opacity: 0;  transform: translate(var(--dx), 62px) rotate(220deg) scale(.25); }
}


/* ── reduced motion ──────────────────────────────────────────────────── */

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


/* Romantic keepsake edition. Content and encrypted assets stay untouched. */
:root {
  --night-0: #200b18;
  --night-1: #321321;
  --night-2: #491b30;
  --plum: #57223d;
  --ink: #fff1ed;
  --ink-soft: #ecd1d8;
  --muted: #c7a4b3;
  --gold: #f4b7c8;
  --gold-dim: #dba0b4;
  --gold-line: rgba(244,183,200,.3);
  --rose: #f08da8;
  --blue: #dbb4ec;
  --hair: rgba(248,192,212,.19);
  --glass: rgba(255,220,232,.07);
}
body { font-weight: 400; }
.vignette {
  background: radial-gradient(ellipse at 15% 10%, #7c29414d, transparent 55%),
    radial-gradient(ellipse at 95% 55%, #78334c40, transparent 60%),
    linear-gradient(180deg, transparent, #200b1870);
}
#sky { opacity: .65; }
.gate, .care { background: radial-gradient(ellipse at 50% 25%, #63283d9c, #200b18ed 80%); overflow-y: auto; }
.gate__inner, .care__inner {
  width: min(100%, 580px); max-width: 580px;
  padding: clamp(26px, 5vw, 56px);
  border: 1px solid var(--gold-line); border-radius: 24px;
  background: linear-gradient(145deg, #4c2031ec, #29111fee);
  box-shadow: 0 28px 90px #10050d66, inset 0 0 0 8px #ffffff03;
  margin: auto;
}
.gate__title, .care__title, .hero__name {
  background: none; color: var(--ink); -webkit-text-fill-color: currentColor;
  filter: none; line-height: 1.08;
}
.gate__sub, .care__sub { color: var(--ink-soft); }
#gateInput, #chatInput { font-size: 1rem; }
#gateInput { border-radius: 12px; background: #200b1866; border-color: var(--gold-line); }
.gate__btn, .care__btn--yes { background: #f4b7c8; color: #381023; border-radius: 12px; font-weight: 600; }
.gate__btn, .care__btn, .linkbtn { min-height: 44px; }
.care__btn--no { border-radius: 12px; }
.gate__eyebrow, .care__eyebrow, .eyebrow, .note__eyebrow { font-size: .875rem; letter-spacing: .16em; }
.hero { padding-top: 100px; padding-bottom: 120px; }
.hero__inner { width: 100%; max-width: 1120px; }
.hero__name { font-size: clamp(4.5rem, 15vw, 11rem); overflow-wrap: anywhere; }
.opener { max-width: 470px; padding: 16px; background: #f9dfdf; color: #62233c; border-radius: 3px; transform: rotate(-3deg); box-shadow: 0 30px 65px #0d030d70; }
.opener__cap { color: #7c2b47; font-size: 1.4rem; }
.opener__btn { border-radius: 2px; border: 0; }
.hero__sub { max-width: 38ch; font-size: clamp(1.25rem, 2.3vw, 1.65rem); }
@media (min-width: 960px) {
  .hero__inner:has(.opener:not([hidden])) { display: grid; grid-template-columns: 1fr 1.12fr; column-gap: 70px; align-items: center; text-align: left; }
  .hero__inner:has(.opener:not([hidden])) .opener { grid-column: 1; grid-row: 1 / 5; margin: 0; }
  .hero__inner:has(.opener:not([hidden])) > :not(.opener) { grid-column: 2; }
  .hero__inner:has(.opener:not([hidden])) .rule { margin-left: 0; width: 180px; }
  .hero__inner:has(.opener:not([hidden])) .hero__sub { margin-left: 0; }
}
.section { scroll-margin-top: 40px; padding-top: clamp(72px, 10vw, 130px); padding-bottom: clamp(72px, 10vw, 130px); }
h2 { font-size: clamp(2.5rem, 5.4vw, 4.5rem); }
.section__head { margin-bottom: 42px; }
.clock { border-radius: 20px; border-color: var(--gold-line); background: linear-gradient(145deg, #562338, #311421); box-shadow: 0 18px 50px #12051040; }
.clock::before { background: none; }
.clock__label, .clock__date, .clock__state, .counter__label, .unit span, .counter__foot, .jar__count { font-size: .875rem; letter-spacing: .08em; }
.counter__row { flex-wrap: wrap; }
.letter {
  --ink: #4a1c30; --ink-soft: #633249; --gold: #9b345b;
  --gold-dim: #923750; --gold-line: #b7647c55;
  max-width: 900px; width: calc(100% - 40px); margin-block: 35px;
  border: 1px solid #f7d5dd; border-radius: 6px;
  padding: clamp(32px, 7vw, 84px);
  background: linear-gradient(125deg, #fff0e9, #f5dce0);
  box-shadow: 12px 12px 0 -2px #672940, 0 35px 90px #0e040c50;
}
.letter__body p { font-weight: 400; }
.letter__body .lp { opacity: 1 !important; }
.gallery { column-gap: 30px; }
.shot { background: #f9e2e2; border: 0; padding: 12px 12px 0; border-radius: 3px; margin-bottom: 32px; }
.shot__cap { color: #63263f; font-size: 1.4rem; min-height: 56px; }
.shot__no { font-size: .875rem; }
.shot__frame::after { opacity: .15; }
.env { border-radius: 12px; background: linear-gradient(145deg, #65263f, #3c172a); min-height: 240px; }
.env__flap { background: linear-gradient(150deg, #84374f, #582138); }
.env.is-opened .env__flap { background: #6b2d47; }
.env__when { font-size: 1.6rem; text-shadow: none; }
.env__hint { opacity: 1; font-size: .875rem; letter-spacing: .1em; }
.env.is-opened::after { font-size: .75rem; }
.env:active, .jar__vessel:active { transform: scale(.96); }
.jar { padding: clamp(22px, 4vw, 48px); border: 1px solid var(--gold-line); border-radius: 24px; background: linear-gradient(120deg, #542036a8, #301322d9); }
.jar__cta, .linkbtn { font-size: .875rem; letter-spacing: .1em; }
.jar__slip { min-width: 0; }
.jar__slipText { overflow-wrap: anywhere; }
.note__sheet { background: linear-gradient(125deg, #fff0e9, #f5dce0); --ink: #4a1c30; --ink-soft: #633249; --gold: #9b345b; --gold-dim: #923750; --muted: #783b53; border-radius: 12px; overflow-y: auto; }
.note__close, .chat__close, .lightbox__close { width: 44px; height: 44px; }
.chat { border-radius: 20px; background: linear-gradient(145deg, #502237, #29121f); }
.chat__msg { font-size: 1rem; }
.chat__msg--her { background: #78324d; }
.chatfab, .music { background: #3b192bed; border-color: var(--gold-line); min-height: 44px; }
.chatfab__label, .music__label, .chat__real .linkbtn { font-size: .875rem; }
.foot { font-size: .875rem; color: var(--muted); }
/* Always-visible chapter labels also work on touch screens. */
.dots {
  top: auto; right: auto; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); flex-direction: row; align-items: center; gap: 4px;
  width: max-content; max-width: calc(100% - 32px); overflow-x: auto;
  padding: 6px; border: 1px solid var(--gold-line); border-radius: 999px;
  background: #321322f2; box-shadow: 0 8px 32px #10040c66;
  scrollbar-width: none;
}
.dots:empty { display: none; }
.dots a { min-height: 44px; padding: 8px 15px; border-radius: 999px; flex: none; color: var(--ink-soft); }
.dots span, .dots a.is-active span { opacity: 1; transform: none; font-size: .875rem; letter-spacing: 0; color: inherit; }
.dots i { display: none; }
.dots a.is-active { background: #f4b7c8; color: #381023; }
.dots a:hover { background: #673149; color: #fff1ed; }
.dots a:focus-visible { outline-offset: -3px; }
.music { bottom: 94px; }
.ending { padding-bottom: 160px; }
@media (max-width: 900px) { .dots { display: flex; } }
@media (max-width: 600px) {
  .hero { padding-inline: 26px; }
  .hero__name { font-size: clamp(4rem, 20vw, 7rem); }
  .opener { max-width: 340px; margin-bottom: 40px; }
  .letter { width: calc(100% - 32px); box-shadow: 6px 6px 0 -1px #672940; }
  .dots { max-width: calc(100% - 20px); border-radius: 22px; }
  .dots a { padding-inline: 12px; }
  .music { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .clock { padding: 24px 12px; }
  .chat { max-height: calc(100dvh - 170px); }
  .gate, .care { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .opener, .shot, .shot:hover { transform: none; }
  .dots { scroll-behavior: auto; }
}

/* A bouquet on arrival, with native modal keyboard behavior. */
.bouquet-open, .bouquet__continue {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 24px; border: 1px solid var(--gold-line);
  border-radius: 999px; font-size: 1rem; background: #f4b7c8; color: #381023;
}
.bouquet-open { margin: 28px auto 0; justify-self: start; }
.bouquet-open:hover, .bouquet__continue:hover { background: #ffe0e8; }
.bouquet {
  margin: auto; padding: 0; width: min(580px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  color: var(--ink); border: 1px solid var(--gold-line); border-radius: 24px;
  background: #200b18; box-shadow: 0 30px 100px #0009;
}
.bouquet::backdrop { background: #13050dcc; backdrop-filter: blur(10px); }
.bouquet[open] { animation: bouquetReveal .8s var(--ease) both; }
.bouquet__card { position: relative; padding: 30px 18px 24px; text-align: center; }
.bouquet h2 { font-size: clamp(2rem, 6vw, 3rem); padding-inline: 38px; }
.bouquet__image { display: block; width: 100%; height: auto; max-height: 60dvh; object-fit: contain; margin: 10px auto; }
.bouquet__close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; font-size: 1.7rem; background: #391323; color: #fff1ed; }
.bouquet__close:hover { background: #673149; }
@keyframes bouquetReveal { from { opacity: 0; transform: translateY(32px) scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bouquet[open] { animation: none; } }

/* A deliberately bold, affectionate interruption after the roses. */
.promise-ad {
  margin: auto; padding: 0; width: min(460px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  border: 3px solid #ff8bae; border-radius: 22px;
  color: #4a1430; background: #fff0f3; box-shadow: 0 24px 100px #0009;
}
.promise-ad::backdrop { background: #190610d9; backdrop-filter: blur(9px); }
.promise-ad[open] { animation: promisePop .65s var(--ease) both; }
.promise-ad__banner { background: #b8174b; color: #fff0f3; text-align: center; padding: 8px; font-size: 1.4rem; letter-spacing: .4em; }
.promise-ad__body { padding: clamp(22px, 5vw, 36px); text-align: center; }
.promise-ad h2 { color: #89153f; font-size: clamp(2.4rem, 9vw, 3.5rem); font-weight: 600; }
.promise-ad__list { list-style: none; text-align: left; margin: 22px 0; padding: 0; }
.promise-ad__list li { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid #b8174b26; font-size: 1.125rem; }
.promise-ad__list li::before { content: "♥"; color: #b8174b; flex: none; }
.promise-ad__love { font-family: var(--hand); color: #a91e4c; font-size: 2.3rem; margin: 16px 0; }
.promise-ad__button { min-height: 52px; width: 100%; padding: 12px 18px; border-radius: 999px; background: #b8174b; color: white; font-size: 1rem; font-weight: 600; box-shadow: 0 6px 0 #7e1237; }
.promise-ad__button:hover { background: #97113d; }
.promise-ad__button:active { transform: translateY(3px); box-shadow: 0 3px 0 #7e1237; }
.promise-ad :focus-visible { outline: 3px solid #64132d; outline-offset: 4px; }
.promise-ad__hint { font-size: .875rem; color: #89153f; margin-top: 16px; min-height: 1.5em; }
@keyframes promisePop { 0% { opacity: 0; transform: scale(.7) rotate(-5deg); } 65% { opacity: 1; transform: scale(1.025) rotate(1deg); } 100% { transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .promise-ad[open] { animation: none; } }
