/* lore public page — the same tokens and faces as the app (web/styles.css),
 * so the site and the product read as one thing. No framework, no build step.
 * Layout: a dark top bar, a full-bleed hero with the brain on the right that
 * fades into the copy, then plain sections on one 72rem column. */

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --sunk: #f6f6f5;
  --ink: #111111;
  --muted: #5c5c5c;
  --line: #e3e3e1;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-ink: #ffffff;
  --hot: #f97316;
  --bar: #111111;
  --bar-ink: #ffffff;
  --bar-muted: #b5b5b5;
  /* The brain's wiring. */
  --net-line: #bdbab4;
  --net-node: #111111;
  --net-lift: 1;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --wrap: min(72rem, 100% - 32px);
  --radius: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d0d;
    --panel: #161616;
    --sunk: #1d1d1d;
    --ink: #f3f3f3;
    --muted: #a8a8a8;
    --line: #2c2c2c;
    --accent: #fb8a3c;
    --accent-hover: #fdba8c;
    --accent-ink: #111111;
    --hot: #fb8a3c;
    --bar: #000000;
    --bar-muted: #9a9a9a;
    --net-line: #4a4640;
    --net-node: #ece9e4;
    --net-lift: 0;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d0d0d;
  --panel: #161616;
  --sunk: #1d1d1d;
  --ink: #f3f3f3;
  --muted: #a8a8a8;
  --line: #2c2c2c;
  --accent: #fb8a3c;
  --accent-hover: #fdba8c;
  --accent-ink: #111111;
  --hot: #fb8a3c;
  --bar: #000000;
  --bar-muted: #9a9a9a;
  --net-line: #4a4640;
  --net-node: #ece9e4;
  --net-lift: 0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, .mono { font-family: var(--font-mono); }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 16px; top: 8px; z-index: 10;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 12px; border-radius: var(--radius);
}

.wrap { width: var(--wrap); margin-inline: auto; }

/* ------------------------------------------------------------- top bar */

.topbar { background: var(--bar); color: var(--bar-ink); }
.topbar-in {
  display: flex; align-items: center; gap: 24px;
  padding-block: 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--bar-ink); text-decoration: none;
  font: 700 22px/1 var(--font-display); letter-spacing: -0.02em;
}
.brand:hover { color: var(--bar-ink); }
.brand-mark { width: 12px; height: 12px; border-radius: 2px; background: var(--hot); }
.topnav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.topnav a { color: var(--bar-muted); text-decoration: none; font-size: 15px; }
.topnav a:hover { color: var(--bar-ink); }
.topnav .signin {
  color: var(--bar-ink); border: 1px solid #3a3a3a; border-radius: var(--radius);
  padding: 7px 14px;
}
.topnav .signin:hover { border-color: var(--bar-muted); }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 640px;
  display: flex; align-items: center;
}
.hero-brain { position: absolute; inset: 0; z-index: 0; }
.hero-brain canvas { display: block; }
/* The brain dissolves into the copy column instead of stopping at an edge. */
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 88%, transparent) 36%,
    color-mix(in srgb, var(--bg) 25%, transparent) 58%,
    transparent 76%);
}
.hero-copy {
  position: relative; z-index: 2;
  padding-block: 72px 88px;
}
.hero-copy-in { max-width: 34rem; display: flex; flex-direction: column; gap: 22px; }

.eyebrow {
  margin: 0;
  font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5.4vw, 4.25rem); font-weight: 700; line-height: 1.02;
  letter-spacing: -0.035em;
}
h1 em { font-style: normal; color: var(--accent); }
.lede { margin: 0; max-width: 46ch; font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); }
.lede strong { color: var(--ink); font-weight: 500; }

.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding-inline: 20px; border-radius: var(--radius);
  font: 600 15px/1 var(--font-body); text-decoration: none;
  border: 1px solid var(--line); color: var(--ink);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.btn:hover { color: var(--ink); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }

/* An illustration of a handoff arriving, in the voice of the terminal. */
.trace {
  margin: 6px 0 0; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  font: 400 13px/1.7 var(--font-mono); color: var(--muted);
  overflow-wrap: anywhere;
}
.trace b { font-weight: 500; color: var(--accent); }
.trace span { color: var(--ink); }

/* ------------------------------------------------------------ sections */

.section { padding-block: 88px; border-top: 1px solid var(--line); }
.section.sunk { background: var(--sunk); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 44rem; margin-bottom: 44px; }
.section-head h2 { margin: 0; font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 700; line-height: 1.1; }
.section-head p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 17px; }

/* How it works: a real sequence, so it is numbered. */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); min-width: 0;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  font: 500 13px/1 var(--font-mono); color: var(--accent);
}
.steps h3 { margin: 0; font-size: 22px; font-weight: 600; }
.steps p { margin: 0; color: var(--muted); }
.steps code, .fact code {
  font-size: 13px; background: var(--sunk); padding: 1px 6px; border-radius: 4px; color: var(--ink);
}

/* Built for teams: three facts, unnumbered. */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.fact { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fact h3 { margin: 0; font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.fact h3 svg { flex: none; color: var(--accent); }
.fact p { margin: 0; color: var(--muted); }

.agents { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.agents li {
  font: 500 15px/1 var(--font-mono); padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
}
.agents-note { margin: 18px 0 0; color: var(--muted); }

/* Get started: sign-up call to action beside the three onboarding steps. */
.start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.start .section-head { margin-bottom: 24px; }
.start ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; counter-reset: s; }
.start ol li {
  counter-increment: s; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 14px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.start ol li::before {
  content: counter(s); grid-row: span 2;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font: 600 14px/1 var(--font-mono);
}
.start ol strong { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.start ol span { color: var(--muted); }

/* --------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--line); padding-block: 32px 40px; color: var(--muted); font-size: 14px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.footer .brand { color: var(--ink); font-size: 18px; }
.footer p { margin: 0; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }
.footer .end { margin-left: auto; }

/* --------------------------------------------------------------- narrow */

@media (max-width: 900px) {
  .topnav a:not(.signin) { display: none; }
  /* Stacked: the brain sits above the headline and fades down into it.
     brain.js places it at the same breakpoint. */
  .hero { min-height: 0; align-items: flex-start; }
  .hero-scrim {
    background: linear-gradient(180deg,
      transparent 0%, transparent 34%,
      color-mix(in srgb, var(--bg) 70%, transparent) 50%,
      var(--bg) 62%);
  }
  .hero-copy { padding-block: 340px 56px; }
  .section { padding-block: 64px; }
  .steps, .facts { grid-template-columns: minmax(0, 1fr); }
  .facts { gap: 28px; }
  .start { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer .end { margin-left: 0; }
}

/* ---------------------------------------------------------------- legal */

.legal { max-width: 46rem; padding-block: 56px 88px; }
.legal h1 { margin: 8px 0 4px; font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 700; line-height: 1.1; }
.legal-date { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.legal h2 { margin: 36px 0 10px; font-size: 22px; font-weight: 600; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 22px; display: grid; gap: 8px; }
.legal code { font-size: 14px; background: var(--sunk); padding: 1px 6px; border-radius: 4px; }
