/*
  What every direction shares. The brand's own tokens (app/globals.css), committed to one
  dark look on purpose: warm near-black, ivory type, one gold accent.
  Each direction sets --display and --text to its own pair of faces.
*/
:root {
  --ink: #0b0a09;
  --surface: #15120f;
  --surface-2: #1e1a16;
  --ivory: #f4efe6;
  --muted: #a1988a;
  --dim: #6f685e;
  --gold: #c9a96e;
  --gold-soft: rgba(201, 169, 110, 0.18);
  --hairline: rgba(244, 239, 230, 0.12);
  --scrim: rgba(11, 10, 9, 0.72);

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale: elders read this too. Body never below 18px. */
  --t-hero: clamp(2.9rem, 8.2vw, 7.4rem);
  --t-head: clamp(2.3rem, 5.6vw, 4.9rem);
  --t-lede: clamp(1.25rem, 1.9vw, 1.6rem);
  --t-body: clamp(1.125rem, 1.35vw, 1.3rem);
  --t-small: 0.95rem;
  --t-caps: 0.78rem;

  --ease: cubic-bezier(0.45, 0, 0.2, 1);
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--text);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: var(--ink); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

/* The stage: one canvas behind everything, as tall as the largest viewport. */
.stage {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  display: block;
  z-index: 0;
  pointer-events: none;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  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>");
}

/* The story: each beat is a tall section; its copy sticks while the scene moves. */
.story { position: relative; z-index: 2; }
.beat { position: relative; min-height: 170vh; }
.beat.short { min-height: 130vh; }
.copy {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.1rem;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  padding-block: 18vh 14vh;
  max-width: 46rem;
  will-change: opacity, transform;
}
.copy.center { margin-inline: auto; text-align: center; align-items: center; justify-content: center; }
.copy.right { margin-left: auto; }
.copy.top { justify-content: flex-start; padding-top: 16vh; }

.eyebrow {
  font-family: var(--text);
  font-size: var(--t-caps);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
h1, h2 {
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-head); }
h1 em, h2 em { font-style: italic; color: var(--gold); }
.lede { font-size: var(--t-lede); line-height: 1.5; color: var(--ivory); margin: 0; max-width: 34ch; text-wrap: pretty; }
.body { color: var(--muted); margin: 0; max-width: 38ch; text-wrap: pretty; }
.quote {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  line-height: 1.3;
  margin: 0;
  max-width: 28ch;
  text-wrap: balance;
}
.meta { font-size: var(--t-small); color: var(--muted); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }

/* Legibility over moving scenes: a soft pool of dark behind the words, never a box. */
.scrim::before {
  content: "";
  position: absolute;
  inset: -12vh -8vw;
  z-index: -1;
  background: radial-gradient(closest-side, var(--scrim), transparent);
  pointer-events: none;
}

/* The one call to action. Large, calm, no precision needed. */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 60px;
  padding: 0 2rem;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--ink);
  font: 500 1.1rem/1 var(--text);
  text-decoration: none;
  transition: background 0.5s var(--ease), transform 0.5s var(--ease);
}
.cta:hover { background: #fff; transform: translateY(-1px); }
.cta-note { font-size: var(--t-small); color: var(--muted); margin: 0; }

/* The brand's top bar: just the mark and the name. */
.site-top {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: calc(env(safe-area-inset-top, 0px) + 18px);
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  pointer-events: none;
}
.site-top .brand { display: inline-flex; gap: 0.6rem; align-items: center; color: var(--ivory); font: 400 1.35rem/1 var(--display); letter-spacing: 0.04em; pointer-events: auto; text-decoration: none; }
.site-top .brand svg { color: var(--gold); }

/* Footer, after the story. Opaque, so the scene can rest. */
.end {
  position: relative;
  z-index: 3;
  background: var(--ink);
  border-top: 1px solid var(--hairline);
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  padding-block: 3.5rem calc(3.5rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: var(--t-small);
}
.end .brand { display: inline-flex; gap: 0.6rem; align-items: center; color: var(--ivory); font: 400 1.3rem/1 var(--display); }
.end .brand svg { color: var(--gold); }

/* The review chip: not part of the design. Back to all five, and the name switch. */
.review-chip {
  position: fixed;
  z-index: 50;
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(21, 18, 15, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  font: 500 13px/1 var(--text);
}
.review-chip a, .review-chip button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.review-chip a:hover, .review-chip button:hover { color: var(--ivory); }
.review-chip button[aria-pressed="true"] { background: var(--surface-2); color: var(--ivory); }
.review-chip .sep { width: 1px; height: 18px; background: var(--hairline); margin: 0 4px; }

/* The one loader. */
.kit-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold);
  transition: opacity 0.9s var(--ease);
}
.kit-loader svg { width: min(46vw, 260px); height: auto; }
.kit-loader.is-done { opacity: 0; pointer-events: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 700px) {
  .copy { padding-block: 14vh 12vh; }
  .beat { min-height: 150vh; }
}
@media (prefers-reduced-motion: reduce) {
  .cta, .kit-loader { transition: none; }
}

/* A question for tonight. */
.tonight { display: flex; flex-direction: column; gap: 0.9rem; align-items: inherit; }
.tonight [data-question] {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  line-height: 1.25;
  margin: 0;
  max-width: 26ch;
  min-height: 2.6em;
  text-wrap: balance;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.tonight [data-question]:not(.is-in) { opacity: 0; transform: translateY(6px); }
.quiet {
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ivory);
  font: 500 1rem/1 var(--text);
  cursor: pointer;
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.quiet:hover { border-color: var(--gold); background: var(--gold-soft); }
.soon {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--gold-soft);
  color: var(--gold);
  font: 500 0.95rem/1 var(--text);
  letter-spacing: 0.02em;
}
