/* ─────────────────────────────────────────────────────────
   FORGE AI — DAYLIGHT DESIGN SYSTEM
   Warm cream paper, near-black ink, modern restrained Geist sans
   with Newsreader serif italic for emphasis, deep rust accent.
   Mercury / Anrok / quiet-capital sophistication.
   Backwards-compatible class names so existing section JSX
   renders unchanged.
   ───────────────────────────────────────────────────────── */
:root {
  /* Warm cream paper ground + deep rust accent (Daylight) */
  --bg:           oklch(0.972 0.006 80);
  --bg-raised:   #ffffff;
  --bg-sunken:    oklch(0.955 0.008 80);
  --surface:     #ffffff;

  --fg:           oklch(0.22 0.012 60);
  --fg-dim:       oklch(0.42 0.012 60);
  --fg-faint:     oklch(0.58 0.010 60);

  --line:         oklch(0.88 0.008 70);
  --line-strong:  oklch(0.82 0.010 70);

  --ember:        oklch(0.55 0.14 45);
  --ember-dim:    oklch(0.62 0.12 45);
  --ember-glow:   oklch(0.55 0.14 45 / 0.20);
  --ember-soft:   oklch(0.55 0.14 45 / 0.10);
  --grid:         oklch(0.88 0.008 70 / 0.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist", -apple-system, system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02", "cv11";
}

/* ── Typography utility classes ──────────────────────── */
/* `.serif` and `.serif-i` are kept as italic accent classes.
   In the Daylight system, italic emphasis is Newsreader serif italic. */
.serif   { font-family: "Newsreader", serif; font-weight: 400; letter-spacing: -0.01em; }
.serif-i { font-family: "Newsreader", serif; font-weight: 400; font-style: italic; letter-spacing: -0.012em; }
.mono    { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 400; }

.eyebrow {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.eyebrow .dot { color: var(--ember); margin-right: 6px; }
.eyebrow-ember { color: var(--ember); }

h1, h2, h3, h4 { margin: 0; font-weight: 500; }

/* Display headline — Geist 500 + Newsreader italic em (both in fg) */
.h-display {
  font-family: "Geist", -apple-system, system-ui, sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(56px, 7.4vw, 116px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--fg);
}
.h-display em {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.h-1 {
  font-family: "Geist", sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.h-1 em {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.h-2 {
  font-family: "Geist", sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.h-2 em {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.015em;
}

.h-3 {
  font-family: "Geist", sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--fg);
}
.h-3 em {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--fg);
}

.lede {
  font-family: "Geist", sans-serif;
  font-size: clamp(17px, 1.25vw, 20px);
  line-height: 1.55;
  color: var(--fg-dim);
  font-weight: 400;
  max-width: 56ch;
}

.body-sm { font-size: 13.5px; line-height: 1.6;  color: var(--fg-dim); }
.body    { font-size: 15px;   line-height: 1.62; color: var(--fg-dim); }

/* ── Layout ───────────────────────────────────────────── */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 720px) {
  .wrap { padding: 0 24px; }
}

.section {
  padding: 144px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.section.alt { background: var(--bg-sunken); }
@media (max-width: 720px) {
  .section { padding: 96px 0; }
}

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 80px;
}

/* Daylight 2-column section head: title left, lede right */
.dl-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 80px;
}
@media (max-width: 1000px) {
  .dl-head { grid-template-columns: 1fr; gap: 32px; margin-bottom: 56px; }
}

/* Daylight 3-up grid of cards (used by Thesis pillars, Engine cols, How steps, Search lanes, etc.) */
.dl-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.dl-pillars-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 1000px) {
  .dl-pillars,
  .dl-pillars-2 { grid-template-columns: 1fr; }
}

/* Pill internal anchor for kicker (mono, accented number) */
.kicker-num {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ember);
}

/* ── Utilities ────────────────────────────────────────── */
.row { display: flex; align-items: baseline; }
.col { display: flex; flex-direction: column; }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; }
@media (max-width: 900px) {
  .grid-12 { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

.divider { height: 1px; background: var(--line); width: 100%; }

/* ── Data tables ──────────────────────────────────────── */
.data-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.data-row .label {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.data-row .value {
  font-family: "Geist", sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--fg);
  letter-spacing: -0.01em;
  font-feature-settings: "tnum", "lnum";
}
.data-row.emphatic .value {
  font-size: 22px;
}

/* ── Links & buttons (rounded-pill, 44px, Daylight) ───── */
a { color: inherit; text-decoration: none; }
.link {
  color: var(--fg);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color .2s, color .2s;
}
.link:hover { border-color: var(--ember); color: var(--ember); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 22px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: "Geist", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-transform: none;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, opacity .2s;
}
.btn:hover { border-color: var(--fg); color: var(--fg); background: transparent; }
.btn .arrow,
.btn span { font-family: "Geist Mono", monospace; font-size: 14px; }
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
  opacity: 0.85;
}

/* ── Pill (status indicator) ──────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ember-soft);
  color: var(--ember);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.pill .dot,
.pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--ember) 18%, transparent);
}

/* ── Card / bento (white card on cream) ──────────────── */
.card,
.bento {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.bento.glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(60% 80% at 80% 0%, var(--ember-glow), transparent 60%);
  opacity: 0.6;
}

/* ── Grid backdrop (kept available; subtle on cream) ── */
.grid-bg {
  background-image:
    linear-gradient(to right,  var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
}

/* ── Number / stats ──────────────────────────────────── */
.num {
  font-family: "Geist", sans-serif;
  font-weight: 400;
  letter-spacing: -0.04em;
  font-feature-settings: "tnum", "lnum";
  color: var(--fg);
}
.num em {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 0;
}
.stat-value {
  font-family: "Geist", sans-serif;
  font-weight: 500;
  font-size: clamp(48px, 5.5vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--fg);
  font-feature-settings: "tnum", "lnum";
}
.stat-value .unit { font-size: 0.45em; color: var(--fg-dim); margin-left: 0.1em; }
.stat-value.ember { color: var(--ember); }
.stat-label {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  max-width: 28ch;
  line-height: 1.5;
}
.stat-sublabel {
  font-size: 13px;
  color: var(--fg-dim);
  max-width: 34ch;
}

/* ── Reveal on scroll ────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s ease-out, transform 0.9s ease-out; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── Selection & misc ───────────────────────────────── */
::selection { background: var(--ember); color: var(--bg); }

.hr-thin { height: 1px; background: var(--line); border: 0; margin: 0; }

.conf-tag {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* ── Before / After (kept for engine cols) ──────────── */
.ba {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-family: "Geist", sans-serif;
  font-weight: 500;
  font-feature-settings: "tnum", "lnum";
  font-size: 28px;
  line-height: 1;
}
.ba .before {
  color: var(--fg-faint);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
  font-size: 0.65em;
}
.ba .arrow {
  color: var(--fg-faint);
  font-size: 0.5em;
  font-family: "Geist Mono", monospace;
}
.ba .after { color: var(--ember); }
