/* ============================================================
   Reel — itsreel.tv
   One hand-authored sheet. Tokens are Reel's own visual system:
   the site is the theater's street face and wears the app's
   interior — warm charcoal ground, one gold accent spent like
   money, luminance-ladder hierarchy, hairline containers.
   ============================================================ */

/* ---------- fonts (self-hosted woff2 subsets; OFL texts ride
   beside these files in assets/fonts/) ---------- */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-800.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Tinos';
  src: url('../fonts/tinos-italic-400.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
/* Metric-compatible fallback so the swap reflow is ~0 CLS.
   Values computed from the real font tables (Montserrat vs the
   Arial-metric family): size-adjust 110.25%, ascent 87.8%,
   descent 22.77%. */
@font-face {
  font-family: 'Montserrat-fallback';
  src: local('Arial'), local('Liberation Sans'), local('Helvetica Neue');
  size-adjust: 110.25%;
  ascent-override: 87.8%;
  descent-override: 22.77%;
  line-gap-override: 0%;
}

/* ---------- tokens ---------- */
:root {
  --ground: #14181a;        /* the app's warm dark charcoal — never pure black */
  --ground-deep: #0a0c0d;   /* TV-bezel near-black */
  --panel: #1b2023;         /* opaque containers; no blur, no glass */
  --hairline: #ffffff14;
  --ink-hi: #f2f4f5;
  --ink: #c3cacd;
  --ink-dim: #8a9296;       /* 5.6:1 on ground — AA normal text, computed */
  --gold: #e1a36f;          /* PINNED at J1 — sampled off the app's own gold
                               (source constant 0xE1A36F, glass sample #E0A36D) */
  --gold-dim: #e1a36f66;
  --font: 'Montserrat', 'Montserrat-fallback', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --serif: 'Tinos', Georgia, 'Times New Roman', serif;
  --well: 1200px;
  --pad: clamp(20px, 5vw, 48px);
  --space-section: clamp(96px, 14vh, 180px);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur: 0.25s;
}

/* ---------- reset-lite ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(16px, 1.05vw + 12px, 18px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-hi); }
a:hover { color: var(--gold); }

/* ---------- a11y utilities ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--pad); top: -60px;
  z-index: 100; padding: 10px 18px;
  background: var(--panel); color: var(--ink-hi);
  border: 1px solid var(--hairline); border-radius: 8px;
  text-decoration: none; transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }
:focus-visible {
  outline: 2px solid var(--ink-hi);   /* the app's own focus language: a white ring */
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- the thread of light (static by default; JS animates) ---------- */
.spine {
  position: fixed; left: 0; top: 0; bottom: 0; width: 3px;
  pointer-events: none; z-index: 50;
  background: #e1a36f14;               /* the quiet, unspent filament ahead */
}
.spine-ink {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background: var(--gold-dim);          /* spent ink behind the reader */
  transform: scaleY(0);
  transform-origin: top;
  will-change: transform;
}
.spine-ember {
  position: absolute; left: -3px; top: 0; width: 9px; height: 9px;
  border-radius: 50%; background: var(--gold); opacity: 0;
  box-shadow: 0 0 10px 2px #e1a36f66;   /* the ember glows, quietly */
  will-change: transform;
}
.spine-tick {
  position: absolute; left: 0; width: 9px; height: 2px;
  background: #e1a36f22;
  transition: background var(--dur) var(--ease);
}
.spine-tick.lit { background: var(--gold-dim); }
/* mobile: the spine collapses to a 2px top progress filament */
.spine-top {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  pointer-events: none; z-index: 60;
}
.spine-top-ink {
  display: block; width: 100%; height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}
@media (max-width: 767px) {
  .spine { display: none; }
  .spine-top { display: block; }
}
/* no-JS: a quiet static filament, nothing hidden */
html:not(.js) .spine-ink { transform: scaleY(1); background: #e1a36f22; }
html:not(.js) .spine-top { display: none; }

/* ---------- the one reveal pattern (classes are JS-added; no-JS never hides) ---------- */
.reveal { opacity: 0; transform: translateY(12px); will-change: transform, opacity; }

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--pad);
  background: #14181ae6;
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: saturate(1); /* no blur by taste; this is a no-op keeper */
}
.masthead-mark img { height: 32px; width: auto; }
.masthead-mark { display: inline-flex; }

/* ---------- chips ---------- */
.chip {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-dim);
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chip-status { color: var(--gold); }

/* ---------- layout ---------- */
main { display: block; }
section {
  max-width: var(--well);
  margin: 0 auto;
  padding: var(--space-section) var(--pad) 0;
}
section:last-of-type { padding-bottom: var(--space-section); }

/* ---------- type ---------- */
.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
h1, h2, h3 { color: var(--ink-hi); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-weight: 800; font-size: clamp(2.1rem, 5.2vw, 4rem); letter-spacing: -0.02em; }
h2 { font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-weight: 700; font-size: 1.1rem; }
.marquee-title { text-transform: uppercase; }
p { margin: 0 0 1em; }
em { font-style: normal; color: var(--ink-hi); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(64px, 10vh, 120px); text-align: left; }
.hero .lede {
  max-width: 620px;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: var(--ink);
}
.hero .chip-status { margin-top: 8px; }

/* ---------- convictions ---------- */
.conviction-pair {
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
  margin-bottom: 40px;
}
.conviction-pair article {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 26px 28px;
}
.values-strip {
  list-style: none; display: flex; flex-wrap: wrap; gap: 12px;
  margin: 0; padding: 0;
}

/* ---------- split sections (copy + shots) ---------- */
.split { display: grid; gap: 36px; grid-template-columns: 1fr; align-items: start; }
.copy-wide { max-width: 720px; }

/* ---------- screenshots (TV-framed; image-honesty: never stretched) ---------- */
.shot {
  position: relative;
  margin: 0;
  border: 10px solid var(--ground-deep);
  border-radius: 8px;
  box-shadow: 0 18px 48px #00000059;
  background: var(--ground-deep);
  overflow: hidden;
}
.shot img { width: 100%; height: auto; }
.shot:empty { display: none; }
/* the beta-polish overlay — Brian's ruling: every screenshot says so */
.shot-tag {
  position: absolute;
  right: 8px; bottom: 8px;
  padding: 3px 10px;
  background: #0a0c0dd9;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
.shot-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 480px) {
  .shot-pair { grid-template-columns: 1fr 1fr; }
}
/* narrow figures: the chip stays one quiet line */
.shot-tall .shot-tag { font-size: 9px; padding: 2px 8px; letter-spacing: 0.05em; white-space: nowrap; }
.shot-stack { display: grid; gap: 24px; }
.aside {
  max-width: 720px;
  margin-top: 28px;
  color: var(--ink-dim);
  font-size: 0.95em;
}
/* a section's closing line: spans the split's full width, centered,
   one quiet step up from body copy */
.callout {
  max-width: 860px;
  margin: 48px auto 0;
  text-align: center;
  color: var(--ink-hi);
  font-size: 1.12em;
  font-weight: 600;
}

/* ---------- the pulse (CSS-only; the app's loading motif) ---------- */
.pulse {
  position: relative;
  width: 240px; height: 3px;
  margin: 56px auto 0;
  background: #ffffff10;
  overflow: hidden;
}
.pulse-seg {
  position: absolute; top: 0; left: -40%;
  width: 40%; height: 100%;
  background: var(--gold);
}
@media (prefers-reduced-motion: no-preference) {
  .pulse-seg { animation: pulse-flow 1.1s linear infinite; }
}
@keyframes pulse-flow {
  from { left: -40%; }
  to   { left: 100%; }
}

/* ---------- numbers band ---------- */
.numbers-band {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.numbers-band .tile {
  padding: 28px 18px;
  text-align: center;
  border-right: 1px solid var(--hairline);
}
.numbers-band .tile:nth-child(2n) { border-right: 0; }
.numbers-band dt {
  color: var(--ink-hi);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.01em;
}
.numbers-band dd {
  margin: 6px 0 0;
  color: var(--ink-dim);
  font-size: 0.85rem;
}

/* ---------- credits ---------- */
.maker { max-width: 640px; font-size: 1.05rem; color: var(--ink); }
.pull-quote {
  margin: 40px 0; padding: 0 0 0 24px;
  border-left: 3px solid var(--gold-dim);
}
.pull-quote p {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--ink-hi);
}
.pull-quote footer { color: var(--ink-dim); font-size: 0.9rem; }
.status-line { color: var(--ink-dim); }

/* ---------- sub-pages (privacy · terms · support) ---------- */
.page { max-width: 780px; }
.page h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.page h2 { font-size: 1.15rem; margin-top: 2.4em; }
.page ul { margin: 0 0 1em; padding-left: 1.25em; }
.page li { margin-bottom: 0.5em; }
.page li::marker { color: var(--gold-dim); }
.page-updated { color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 2.5em; }
.page-summary {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--gold-dim);
  border-radius: 12px;
  padding: 22px 26px;
  margin: 0 0 1.5em;
}
.page-summary p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 48px var(--pad) 64px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.9rem;
}
.site-footer img { margin: 0 auto 16px; }
.site-name { color: var(--ink); font-weight: 600; }
.copyright { margin-top: 8px; }
.footer-links { margin: 0 0 8px; }
.footer-links a {
  color: var(--ink-dim);
  text-decoration: none;
  margin: 0 10px;
}
.footer-links a:hover { color: var(--gold); text-decoration: underline; }

/* ============================================================
   breakpoints — mobile-first
   ============================================================ */
@media (min-width: 480px) {
  .conviction-pair { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .split { grid-template-columns: 1fr 1fr; gap: 48px; }
  .split .copy { align-self: center; }
  .numbers-band { grid-template-columns: repeat(3, 1fr); }
  .numbers-band .tile:nth-child(2n) { border-right: 1px solid var(--hairline); }
  .numbers-band .tile:nth-child(3n) { border-right: 0; }
}
@media (min-width: 1080px) {
  .numbers-band { grid-template-columns: repeat(6, 1fr); }
  .numbers-band .tile:nth-child(3n) { border-right: 1px solid var(--hairline); }
  .numbers-band .tile:last-child { border-right: 0; }
  /* alternate copy/shot sides on desktop */
  section:nth-of-type(2n) .split .copy { order: 2; }
}
/* 1440+: the well caps at 1200px by construction; nothing to add yet */

/* ---------- reduced motion: kill everything ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .spine-ink { transform: scaleY(1) !important; background: #e1a36f22 !important; }
  .spine-ember { opacity: 0 !important; }
  .spine-top { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
