/* ============================================================
   THUMOS — brand site
   Palette + type pulled from the app theme and pitch decks.
   No build step: plain CSS with custom properties.
   ============================================================ */

:root {
  /* Surfaces (cocoa-brown dark ramp) */
  --surface-900: #211f1c;  /* page background */
  --surface-800: #2c2926;  /* raised panels */
  --surface-700: #3b3733;  /* cards / alt sections */
  --surface-600: #4a4541;

  /* Brand accent (muted amber) */
  --brand-300: #f5b278;
  --brand-400: #f0a76a;
  --brand-500: #e39a5a;
  --brand-600: #c07e46;

  /* Text */
  --text-primary: #f3eee8;
  --text-muted: #b8b2a9;
  --text-faint: #867a74;

  --border: #5b564f;
  --focus-ring: #ffb86b;

  /* Type */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-serif: "IBM Plex Serif", Georgia, serif;

  /* Rhythm */
  --container: 1120px;
  --measure: 720px;
  --section-y: clamp(4rem, 9vw, 8rem);
  --radius: 10px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-900);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, blockquote, dl, dd, figure, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: var(--brand-400); text-decoration: none; }
a:hover { color: var(--brand-300); }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--brand-600); color: var(--surface-900); }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface-900), 0 0 0 4px var(--focus-ring);
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}
.measure { max-width: var(--measure); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-800); }

/* ---------- Type primitives ---------- */
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: 1.5rem;
}
.section__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 1.5rem;
}
.body {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 1.25rem;
}
.body strong { color: var(--text-primary); font-weight: 600; }
.body em { color: var(--text-primary); font-style: italic; }
.lead-accent {
  color: var(--brand-400);
  font-weight: 600;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.4;
  margin-top: 2rem;
}

/* ---------- Wordmark ---------- */
.wordmark {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 1.25rem;
  color: var(--text-primary);
}
.wordmark--sm { font-size: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, transform 0.18s ease;
}
.btn--solid {
  background: var(--brand-500);
  color: var(--surface-900);
}
.btn--solid:hover { background: var(--brand-400); color: var(--surface-900); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}
.btn--ghost:hover { border-color: var(--brand-500); color: var(--brand-300); }
.btn--full { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface-900) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}
.nav__links > a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav__links > a:hover { color: var(--text-primary); }
.nav__links .btn { color: var(--text-primary); }
@media (max-width: 640px) {
  .nav__links a:not(.btn) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(5rem, 14vw, 11rem) clamp(4rem, 10vw, 8rem);
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* soft amber glow, top-left, evoking the deck's warmth */
  content: "";
  position: absolute;
  top: -30%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand-500) 16%, transparent) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero__title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}
.hero__lede {
  max-width: 38rem;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 2vw, 1.3125rem);
  line-height: 1.55;
  margin-bottom: 2.5rem;
}
.hero__lede strong { color: var(--text-primary); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Quote section ---------- */
.section--quote { background: var(--surface-800); }
.quote__mark {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 5rem;
  line-height: 0.4;
  color: var(--brand-500);
  margin-bottom: 1.5rem;
}
.quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.frames-layers { margin-top: 2.5rem; }
.frames-props { margin-top: 1.25rem; }

/* Cards (Frame layers) */
.card {
  background: var(--surface-700);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.card__title { font-size: 1.1875rem; font-weight: 600; margin-bottom: 0.5rem; }
.card__body { color: var(--text-muted); font-size: 0.9375rem; }

/* Props (no card chrome, left amber rule) */
.prop { padding: 1.25rem 0 1.25rem 1.25rem; border-left: 2px solid var(--brand-600); }
.prop__title { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.4rem; }
.prop__body { color: var(--text-muted); font-size: 0.9375rem; }

/* ---------- Lenses ---------- */
.fanout {
  margin: 2.5rem 0 0;
  background: var(--surface-800);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.fanout__source {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.0625rem, 2vw, 1.375rem);
  line-height: 1.4;
  color: var(--text-primary);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
.fanout__reads { display: grid; gap: 1rem; }
.read {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
}
.read__lens {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-500);
}
.read--accent .read__lens { color: var(--brand-300); }
.read__text { color: var(--text-muted); font-size: 0.9375rem; }
.fanout__note {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  color: var(--brand-400);
  font-weight: 600;
}
@media (max-width: 560px) {
  .read { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ---------- Lineage chain ---------- */
.lineage-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 2.5rem 0;
}
.lineage-node {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface-800);
  border: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
}
.lineage-node--accent {
  color: var(--surface-900);
  background: var(--brand-500);
  border-color: var(--brand-500);
  font-weight: 600;
}
.lineage-chain .lineage-node:not(:last-child)::after {
  content: "\2192"; /* → */
  color: var(--text-faint);
  margin-left: 0.5rem;
}

/* ---------- Flow carousel (pure CSS — hidden radios drive the state) ---------- */
.flow-carousel { position: relative; margin-top: 2.5rem; }

/* Radios are visually hidden but stay focusable for keyboard users */
.flow-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

/* Stage tabs (labels) double as the sequence (Interpret → … → Deliverable) */
.flow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.flow-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.flow-tab__num { color: var(--text-faint); font-size: 0.8125rem; font-weight: 700; }
.flow-tab:hover { color: var(--text-primary); border-color: var(--brand-600); }

/* Active tab — the label whose radio is checked */
#flow-r0:checked ~ .flow-tabs .flow-tab[for="flow-r0"],
#flow-r1:checked ~ .flow-tabs .flow-tab[for="flow-r1"],
#flow-r2:checked ~ .flow-tabs .flow-tab[for="flow-r2"],
#flow-r3:checked ~ .flow-tabs .flow-tab[for="flow-r3"] {
  color: var(--text-primary);
  background: var(--surface-700);
  border-color: var(--brand-500);
}
#flow-r0:checked ~ .flow-tabs .flow-tab[for="flow-r0"] .flow-tab__num,
#flow-r1:checked ~ .flow-tabs .flow-tab[for="flow-r1"] .flow-tab__num,
#flow-r2:checked ~ .flow-tabs .flow-tab[for="flow-r2"] .flow-tab__num,
#flow-r3:checked ~ .flow-tabs .flow-tab[for="flow-r3"] .flow-tab__num { color: var(--brand-500); }

/* Keyboard focus ring on the tab whose radio is focused */
#flow-r0:focus-visible ~ .flow-tabs .flow-tab[for="flow-r0"],
#flow-r1:focus-visible ~ .flow-tabs .flow-tab[for="flow-r1"],
#flow-r2:focus-visible ~ .flow-tabs .flow-tab[for="flow-r2"],
#flow-r3:focus-visible ~ .flow-tabs .flow-tab[for="flow-r3"] {
  box-shadow: 0 0 0 2px var(--surface-900), 0 0 0 4px var(--focus-ring);
}

.flow-viewport {
  overflow: hidden;
  background: var(--surface-700);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: var(--radius);
}
.flow-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.4s ease;
}
.flow-slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.flow-slide__num {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--brand-500);
  margin-bottom: 0.75rem;
}
.flow-slide__title {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 600;
  margin-bottom: 1rem;
}
.flow-slide__body { color: var(--text-muted); font-size: 1.0625rem; max-width: 56ch; }

/* The checked radio slides the track to its panel */
#flow-r0:checked ~ .flow-viewport .flow-track { transform: translateX(0); }
#flow-r1:checked ~ .flow-viewport .flow-track { transform: translateX(-100%); }
#flow-r2:checked ~ .flow-viewport .flow-track { transform: translateX(-200%); }
#flow-r3:checked ~ .flow-viewport .flow-track { transform: translateX(-300%); }

.flow-dots { display: flex; justify-content: center; gap: 0.6rem; margin-top: 1.5rem; }
.flow-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.flow-dot:hover { background: var(--brand-600); }
#flow-r0:checked ~ .flow-dots .flow-dot[for="flow-r0"],
#flow-r1:checked ~ .flow-dots .flow-dot[for="flow-r1"],
#flow-r2:checked ~ .flow-dots .flow-dot[for="flow-r2"],
#flow-r3:checked ~ .flow-dots .flow-dot[for="flow-r3"] {
  background: var(--brand-500);
  transform: scale(1.25);
}

.step__flag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-500);
  border: 1px solid color-mix(in srgb, var(--brand-500) 50%, transparent);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}

/* ---------- Tiers ---------- */
.tier {
  display: flex;
  align-items: center;
  background: var(--surface-800);
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-left: 2px solid var(--brand-600);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  min-height: 4.5rem;
}
.section--alt .tier { background: var(--surface-700); }
.tier__title { font-size: 1.0625rem; font-weight: 600; margin: 0; color: var(--text-primary); }

/* ---------- Compounding intelligence (graph) ---------- */
.graph-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-top: 2.5rem;
}
.graph-copy .body:first-child { margin-top: 0; }
.graph-visual svg { width: 100%; height: auto; display: block; overflow: visible; }
.graph-edges line {
  stroke: var(--brand-500);
  stroke-opacity: 0.28;
  stroke-width: 1;
}
.gnode circle {
  fill: var(--surface-800);
  stroke: var(--brand-500);
  stroke-width: 1.5;
}
.gnode--accent circle { fill: var(--brand-500); stroke: var(--brand-500); }
.gnode text {
  fill: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-anchor: middle;
}
.gnode--accent text { fill: var(--text-primary); font-weight: 600; }
@media (max-width: 860px) {
  .graph-layout { grid-template-columns: 1fr; }
  .graph-visual { max-width: 26rem; }
}

/* ---------- CTA / Waitlist ---------- */
.section--cta {
  background:
    radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--brand-500) 12%, transparent) 0%, transparent 55%),
    var(--surface-900);
}
.cta-actions { margin-top: 2.5rem; }
.cta-note { margin-top: 1rem; font-size: 0.8125rem; color: var(--text-faint); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  padding-block: 2.5rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}
.footer__tag { color: var(--text-muted); font-style: italic; }
.footer__copy { color: var(--text-faint); font-size: 0.875rem; margin-left: auto; }

/* ---------- Scroll reveal (pure CSS, no JS) ----------
   Uses scroll-driven animations where supported. Crucially, the hidden
   start state lives INSIDE @supports, so browsers without scroll-driven
   animations simply render everything visible — never stuck at opacity 0. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      opacity: 0;
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
  .flow-track { transition: none; }
  .flow-dot { transition: none; }
}
