:root {
  --bg: #09090b;
  --surface: #121214;
  --raised: #1a1a1d;
  --line: #26262b;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #71717a;
  --signal: #e8c468;
  --font: "Geist", "Helvetica Neue", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --measure: 62ch;
  --gutter: clamp(16px, 4vw, 40px);
  --wide: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.88em; color: var(--text); }
em { font-style: normal; color: var(--text); font-weight: 500; }

h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); max-width: 20ch; }
h3 { font-size: 1.15rem; letter-spacing: -0.015em; line-height: 1.3; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 10; }

.button {
  display: inline-block; font: 500 1rem/1 var(--font);
  background: var(--text); color: var(--bg);
  padding: 0.9em 1.5em; border-radius: 999px; text-decoration: none; border: 1px solid var(--text);
}
.button:hover { background: #d4d4d8; border-color: #d4d4d8; }
.button--small { font-size: 0.9rem; padding: 0.7em 1.15em; }
.button--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button--ghost:hover { background: var(--raised); border-color: var(--dim); }

/* ---------- header */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(var(--gutter), calc((100% - var(--wide)) / 2 + var(--gutter)));
  background: rgba(9, 9, 11, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 9px; font: 600 1.15rem/1 var(--font); letter-spacing: -0.02em; text-decoration: none; }
.wordmark svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.top nav { display: flex; gap: 26px; margin-left: auto; font-size: 0.93rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }
@media (max-width: 820px) { .top nav { display: none; } .top .button { margin-left: auto; } }

/* ---------- hero */
.hero { max-width: var(--wide); margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--gutter) clamp(48px, 7vw, 96px); text-align: center; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); max-width: 19ch; margin: 0 auto; text-wrap: balance; }
.hero__sub { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 56ch; margin: 24px auto 0; text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }

.console {
  text-align: left; margin: clamp(48px, 7vw, 80px) auto 0; max-width: 860px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
}
.console__label { display: block; font-size: 0.82rem; color: var(--dim); margin-bottom: 8px; }
.console__prompt { padding: 22px clamp(18px, 3vw, 28px); border-bottom: 1px solid var(--line); }
.console__question { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.45rem); letter-spacing: -0.02em; min-height: 1.6em; }
.console__question .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; background: var(--text); vertical-align: -0.12em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.answer { padding: 22px clamp(18px, 3vw, 28px); transition: opacity 0.3s ease; }
.answer.is-thinking { opacity: 0.3; }
.trace { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; color: var(--muted); }
.trace li { position: relative; padding-left: 16px; }
.trace li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.trace li:last-child::before { background: var(--signal); }

.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th { text-align: left; font-weight: 500; color: var(--dim); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--raised); }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr.hit td { color: var(--text); }
tr.hit td:first-child { box-shadow: inset 3px 0 0 var(--signal); }
.answer__text { margin: 0; max-width: var(--measure); color: #d4d4d8; }

.sql { margin-top: 16px; }
.sql summary { cursor: pointer; font-size: 0.88rem; color: var(--muted); width: max-content; }
.sql summary:hover { color: var(--text); }
.sql pre { margin: 10px 0 0; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; font-size: 0.82rem; line-height: 1.65; color: #d4d4d8; }

.ask { padding: 18px clamp(18px, 3vw, 28px) 20px; border-top: 1px solid var(--line); background: var(--bg); }
.ask > p { font-size: 0.82rem; color: var(--dim); margin: 0 0 12px; }
.ask__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ask__list button {
  font: 400 0.9rem/1.2 var(--font); color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.6em 1em; cursor: pointer;
}
.ask__list button:hover { color: var(--text); border-color: var(--dim); }
.ask__list button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.ask .ask__note { margin: 14px 0 0; }

/* ---------- sections */
main > section:not(.hero) { max-width: var(--wide); margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--gutter); border-top: 1px solid var(--line); }
.section-intro { max-width: var(--measure); color: var(--muted); font-size: 1.12rem; margin: 20px auto 0; text-wrap: pretty; }
/* Every section opens centered, like the hero; its content keeps the full width. */
main > section:not(.hero) > h2 { margin-left: auto; margin-right: auto; text-align: center; text-wrap: balance; }
main > section:not(.hero) > .section-intro { text-align: center; }
.faq__list { margin-left: auto; margin-right: auto; }
.cta h2 { text-align: center; }

/* product screens */
.product__tabs { display: flex; justify-content: center; gap: 6px; margin: 40px auto 0; padding: 4px; width: max-content; max-width: 100%; border: 1px solid var(--line); border-radius: 999px; }
.product__tabs button { font: 500 0.92rem/1 var(--font); color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: 0.75em 1.2em; cursor: pointer; }
.product__tabs button:hover { color: var(--text); }
.product__tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.frame { margin: 28px 0 0; border: 1px solid #3f3f46; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: 0 40px 120px -40px rgba(255, 255, 255, 0.08); }
.frame__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--raised); }
.frame__bar span { width: 10px; height: 10px; border-radius: 50%; background: #3f3f46; }
.frame__bar p { margin: 0 auto; padding-right: 51px; font: 400 0.8rem/1 var(--mono); color: var(--dim); }
.frame img { display: block; width: 100%; height: auto; }
.frame img[hidden] { display: none; }
.product__note { text-align: center; color: var(--dim); font-size: 0.85rem; margin: 16px 0 0; }

/* why: before / after */
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.pair { padding: 28px; border: 1px solid var(--line); border-radius: 16px; }
.pair--after { background: var(--surface); border-color: #3f3f46; }
.pair__before { margin: 0 0 14px; font-size: 0.85rem; color: var(--dim); }
.pair--after .pair__before { color: var(--signal); }
.pair h3 { font-size: 1.4rem; letter-spacing: -0.025em; }
.pair p:last-child { margin: 12px 0 0; color: var(--muted); }
.pair:not(.pair--after) h3 { color: var(--muted); }
@media (max-width: 760px) { .pairs { grid-template-columns: 1fr; } }

/* platform: the product list */
.products { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.products li { background: var(--bg); padding: 28px; display: flex; flex-direction: column; }
.products li:first-child { background: var(--surface); }
.products h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
.products p { margin: 10px 0 0; color: var(--muted); font-size: 0.97rem; }
.products .products__eg { margin-top: auto; padding-top: 18px; color: #d4d4d8; font-size: 0.92rem; }
@media (max-width: 900px) { .products { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .products { grid-template-columns: 1fr; } }

/* gains */
.gains__list { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; }
.gains__list p { margin: 8px 0 0; color: var(--muted); max-width: 46ch; }
.gains__list h3 { font-size: 1.3rem; }
@media (max-width: 760px) { .gains__list { grid-template-columns: 1fr; } }

/* uses */
.uses__list { margin: 40px 0 0; }
.uses__list > div { display: grid; grid-template-columns: minmax(180px, 1fr) 2.2fr; gap: 8px 32px; padding: 20px 0; border-top: 1px solid var(--line); }
.uses__list dt { font-weight: 500; }
.uses__list dd { margin: 0; color: var(--muted); }
@media (max-width: 700px) { .uses__list > div { grid-template-columns: 1fr; } }

/* how: a real five-step sequence */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding: 20px 20px 0 0; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font: 400 0.85rem/1 var(--mono); color: var(--dim); margin-bottom: 16px; }
.steps h3 { margin: 12px 0 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.who { display: inline-block; font-size: 0.78rem; padding: 0.25em 0.7em; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.who--model { border-color: var(--signal); color: var(--signal); }
@media (max-width: 980px) { .steps { grid-template-columns: 1fr; gap: 28px; } .steps li { padding-right: 0; } }

/* where */
.map { margin: 48px 0 0; display: grid; grid-template-columns: 0.7fr 1.3fr 2fr; gap: 14px; }
.map__lane { padding: 18px; border-radius: 16px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; position: relative; }
.map__lane--account { border-color: #52525b; background: var(--surface); display: grid; grid-template-columns: 1fr 1fr; align-content: start; }
.map__lane--account .map__label, .map__lane--account .map__key { grid-column: 1 / -1; }
.map__label { margin: 0 0 4px; font-weight: 500; }
.map__key { margin: 6px 0 0; font-size: 0.88rem; color: var(--signal); }
.node { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-weight: 500; font-size: 0.98rem; }
.node small { display: block; font-weight: 400; font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.node--strong { background: var(--text); color: var(--bg); border-color: var(--text); }
.node--strong small { color: #52525b; }
.map__lane + .map__lane::before { content: ""; position: absolute; left: -11px; top: 50%; width: 8px; height: 8px; border-top: 1.5px solid var(--dim); border-right: 1.5px solid var(--dim); transform: translateY(-50%) rotate(45deg); }
@media (max-width: 900px) { .map { grid-template-columns: 1fr; gap: 22px; } .map__lane + .map__lane::before { left: 50%; top: -16px; transform: translateX(-50%) rotate(135deg); } }

/* trust */
.claims { margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.claims > div { border-top: 1px solid var(--line); padding: 20px 0 32px; }
.claims dt { font-weight: 500; font-size: 1.1rem; margin-bottom: 8px; }
.claims dd { margin: 0; color: var(--muted); font-size: 0.97rem; }
@media (max-width: 900px) { .claims { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .claims { grid-template-columns: 1fr; } }

/* sources */
.source-list { list-style: none; padding: 0; margin: 32px 0 0; }
.source-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.source-list strong { font-weight: 500; font-size: clamp(1.2rem, 2.4vw, 1.6rem); letter-spacing: -0.02em; min-width: 11ch; }
.source-list span { color: var(--muted); }
.source-list .soon strong { color: var(--dim); }

/* faq */
.faq__list { margin-top: 32px; max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 32px 20px 0; font-weight: 500; font-size: 1.08rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 1.3rem; font-weight: 300; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 22px; color: var(--muted); max-width: var(--measure); }

/* start */
.timeline { list-style: none; counter-reset: t; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.timeline li { counter-increment: t; }
.timeline li::before { content: counter(t); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--dim); font-size: 0.9rem; margin-bottom: 16px; }
.timeline p { margin: 6px 0 0; color: var(--muted); font-size: 0.97rem; }
@media (max-width: 860px) { .timeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .timeline { grid-template-columns: 1fr; } }

.cta { margin-top: clamp(64px, 9vw, 112px); text-align: center; padding: clamp(40px, 7vw, 80px) 24px; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(120% 140% at 50% 0%, #1c1c20 0%, var(--bg) 70%); }
.cta h2 { margin: 0 auto; max-width: 18ch; text-wrap: balance; }
.cta p { color: var(--muted); margin: 16px auto 28px; max-width: 44ch; }

.foot { max-width: var(--wide); margin: 0 auto; padding: 32px var(--gutter) 48px; color: var(--dim); font-size: 0.9rem; border-top: 1px solid var(--line); text-align: center; }
.foot a { color: var(--muted); }

section[id] { scroll-margin-top: 64px; }
