:root {
  --ink-light: #fbf8f2;
  --ink-dark: #1f1a14;
  --ink: var(--ink-light);
  --ink-soft: color-mix(in oklab, var(--ink) 72%, transparent);
  --rule: color-mix(in oklab, var(--ink) 28%, transparent);
  --shadow: 0 1px 24px rgb(0 0 0 / 0.28);
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}
body[data-tone='dark'] {
  --ink: var(--ink-dark);
  --shadow: 0 1px 30px rgb(255 248 236 / 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #0a1a26; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: #0a1a26;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: color 0.9s var(--ease);
}
a { color: inherit; text-decoration: none; }

/* ── Stage ─────────────────────────────────────────────── */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.grade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 0.22) 0%, transparent 18%, transparent 70%, rgb(0 0 0 / 0.28) 100%);
  mix-blend-mode: multiply;
}
.grain {
  position: absolute; inset: -8%; pointer-events: none; opacity: 0.09; mix-blend-mode: overlay; will-change: transform;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.track { position: relative; z-index: -1; pointer-events: none; }

/* ── Intro veil ────────────────────────────────────────── */
.veil {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; gap: 18px; text-align: center;
  background: #f4efe6; color: var(--ink-dark);
  transition: clip-path 1.4s var(--ease) 0.1s;
  clip-path: inset(0 0 0 0);
}
.veil__mark { font-family: var(--serif); font-size: clamp(3.4rem, 11vw, 9rem); line-height: 1; letter-spacing: -0.01em; }
.veil__mark span { display: inline-block; opacity: 0; transform: translateY(40%); animation: rise 1.1s var(--ease) forwards; }
.veil__mark span:nth-child(1) { animation-delay: 0.10s; } .veil__mark span:nth-child(2) { animation-delay: 0.16s; }
.veil__mark span:nth-child(3) { animation-delay: 0.22s; } .veil__mark span:nth-child(4) { animation-delay: 0.28s; }
.veil__mark span:nth-child(5) { animation-delay: 0.34s; } .veil__mark span:nth-child(6) { animation-delay: 0.40s; }
.veil__mark span:nth-child(7) { animation-delay: 0.46s; }
.veil__sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0; animation: fade 1s ease 0.8s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 0.6; } }
.is-ready .veil { clip-path: inset(0 0 100% 0); }

/* ── Chrome ────────────────────────────────────────────── */
.nav {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
  text-shadow: var(--shadow);
}
.nav__brand { font-family: var(--serif); font-size: 28px; letter-spacing: 0.01em; }
.nav__links { display: flex; gap: 34px; font-size: 13px; letter-spacing: 0.04em; }
.nav__links a { opacity: 0.85; transition: opacity 0.3s; }
.nav__links a:hover { opacity: 1; }
.nav__cta {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 11px 20px; border: 1px solid var(--rule); border-radius: 999px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--ink) 8%, transparent);
  transition: background 0.4s, border-color 0.9s;
  text-shadow: none;
}
.nav__cta:hover { background: color-mix(in oklab, var(--ink) 18%, transparent); }

.clock {
  position: fixed; z-index: 20; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: grid; justify-items: end; gap: 10px; text-shadow: var(--shadow);
}
.clock__label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.clock__time { font-family: var(--mono); font-size: 22px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.clock__rail { width: 1px; height: 120px; background: var(--rule); position: relative; overflow: hidden; margin: 6px 0; }
.clock__fill { position: absolute; inset: 0; background: var(--ink); transform-origin: top; transform: scaleY(0); }
.clock__chapters { list-style: none; display: grid; gap: 7px; justify-items: end; }
.clock__chapters button {
  all: unset; cursor: pointer; font-size: 11px; letter-spacing: 0.08em; color: var(--ink-soft);
  transition: color 0.4s, transform 0.5s var(--ease); display: inline-block;
}
.clock__chapters li.is-on button { color: var(--ink); transform: translateX(-6px); }
.clock__chapters li.is-on button::after { content: ''; display: inline-block; width: 14px; height: 1px; background: currentColor; margin-left: 8px; vertical-align: middle; }

.cue {
  position: fixed; z-index: 20; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  text-shadow: var(--shadow);
}
.cue i { width: 1px; height: 44px; background: linear-gradient(var(--ink), transparent); animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ── Beats ─────────────────────────────────────────────── */
.beats { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.beat {
  --in: 0; --out: 0;
  position: absolute; max-width: min(640px, 86vw);
  visibility: hidden;
  text-shadow: var(--shadow);
  opacity: calc(1 - var(--out));
  transform: translateY(calc(var(--out) * -48px));
}
.beat.is-live { pointer-events: auto; }
.beat > * {
  opacity: clamp(0, calc(var(--in) * 2.2 - var(--i, 0) * 0.32), 1);
  transform: translateY(calc((1 - clamp(0, calc(var(--in) * 1.6 - var(--i, 0) * 0.22), 1)) * 34px));
}
.beat > :nth-child(1) { --i: 0; } .beat > :nth-child(2) { --i: 1; }
.beat > :nth-child(3) { --i: 2; } .beat > :nth-child(4) { --i: 3; }

.beat--hero      { left: var(--gutter); bottom: 15vh; max-width: min(900px, 90vw); }
.beat--left      { left: var(--gutter); top: 26vh; }
.beat--left-low  { left: var(--gutter); bottom: 12vh; }
.beat--right     { right: calc(var(--gutter) + 170px); top: 22vh; text-align: right; }
.beat--right-low { right: calc(var(--gutter) + 170px); bottom: 12vh; text-align: right; }
.beat--center    { left: 50%; top: 18vh; translate: -50% 0; text-align: center; max-width: min(820px, 90vw); }
.beat--final     { left: 50%; top: 50%; translate: -50% -50%; text-align: center; display: grid; justify-items: center; gap: 0; max-width: 92vw; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 22px; color: var(--ink-soft);
}
.eyebrow .t { color: var(--ink); margin-right: 14px; }
.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.5rem, 5.6vw, 5.6rem); line-height: 0.98; letter-spacing: -0.015em;
  text-wrap: balance;
}
.beat--hero .display { font-size: clamp(3rem, 8.2vw, 8.4rem); line-height: 0.92; }
.display em { font-style: italic; }
.display--xl { font-size: clamp(3.4rem, 10vw, 10rem); line-height: 0.9; }
.lede { margin-top: 26px; max-width: 34ch; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.beat--right .lede, .beat--right-low .lede { margin-left: auto; }

.specs { margin-top: 30px; display: flex; gap: 34px; justify-content: flex-end; }
.specs div { display: grid; gap: 6px; border-top: 1px solid var(--rule); padding-top: 12px; min-width: 96px; text-align: left; }
.specs dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.specs dd { font-size: 14px; }

.menu { list-style: none; margin-top: 32px; display: grid; gap: 14px; justify-items: start; }
.menu li { display: grid; gap: 2px; justify-items: start; }
.menu span { font-family: var(--serif); font-size: 22px; }
.menu i { font-size: 12px; letter-spacing: 0.06em; color: var(--ink-soft); font-style: normal; }

.button {
  margin-top: 40px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 18px 34px; border-radius: 999px; background: var(--ink); color: #12100d; text-shadow: none;
  transition: transform 0.5s var(--ease), box-shadow 0.5s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgb(255 220 170 / 0.25); }
.fine { margin-top: 26px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }

.noscript { position: fixed; inset: auto 0 40px; text-align: center; z-index: 30; }

/* ── Small screens ─────────────────────────────────────── */
@media (max-width: 760px) {
  .nav { padding: 16px; }
  .nav__links { display: none; }
  .nav__brand { font-size: 24px; }
  .clock { top: auto; bottom: 22px; right: 16px; transform: none; gap: 4px; }
  .clock__rail, .clock__chapters, .clock__label { display: none; }
  .clock__time { font-size: 15px; }
  .cue { left: 16px; transform: none; justify-items: start; }
  .beat, .beat--right, .beat--right-low, .beat--left, .beat--left-low, .beat--hero {
    left: 16px; right: 16px; max-width: none; text-align: left;
  }
  .beat--left, .beat--right, .beat--center { top: 16vh; }
  .beat--left-low, .beat--right-low, .beat--hero { bottom: 12vh; top: auto; }
  .beat--center { left: 16px; translate: none; }
  .beat--final { left: 16px; right: 16px; translate: 0 -50%; }
  .specs { justify-content: flex-start; gap: 18px; }
  .specs div { min-width: 0; }
  .menu, .menu li { justify-items: start; }
  .beat--right .lede, .beat--right-low .lede { margin-left: 0; }
  .lede { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .cue i { animation: none; }
  .beat { filter: none; }
}

/* Soft scrim behind each beat so copy holds up over bright footage */
.beat::before {
  content: ''; position: absolute; inset: -18% -16% -22% -16%; z-index: -1; pointer-events: none;
  /* Pre-softened stops instead of filter: blur(18px), which re-rasterised
     a blurred layer under every visible beat on every scroll frame. */
  background: radial-gradient(closest-side, rgb(8 14 20 / 0.40), rgb(8 14 20 / 0.30) 35%, rgb(8 14 20 / 0.16) 62%, rgb(8 14 20 / 0.06) 82%, transparent);
  opacity: calc(var(--in) * (1 - var(--out)));
  transition: background 0.9s var(--ease);
}
body[data-tone='dark'] .beat::before {
  background: radial-gradient(closest-side, rgb(250 246 238 / 0.60), rgb(250 246 238 / 0.44) 35%, rgb(250 246 238 / 0.23) 62%, rgb(250 246 238 / 0.08) 82%, transparent);
}
.beat--menu { top: 13vh; }
@media (max-width: 760px) { .beat--menu { top: 12vh; } }
@media (max-width: 760px) {
  /* Keep copy off her face in portrait crops */
  [data-beat='arrival'], [data-beat='dinner'] { top: auto; bottom: 11vh; }
  .menu { display: none; }
}
