/* Grounded landing page: static, dark only. Tokens copied from the app's dark theme. */
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #12161a; --surface: #181e23; --surface-2: #20272d;
  --ink: #e7ecef; --ink-2: #a3afb8; --ink-3: #8c98a2;
  --line: #2b343b; --line-strong: #3d4851;
  --accent: #c9814f; --accent-bright: #e39a63; --accent-ink: #1a1208;
  --cite: #e8a06a; --cite-bg: #33251b;
  --note: #9fb0be; --note-bg: #1c2329;
  --warn: #e0b04f; --warn-bg: #33291a;
  --ok: #6dbf8e;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --display: "Space Grotesk", "IBM Plex Sans", ui-sans-serif, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-feature-settings: "tnum" 1; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--display); margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--cite-bg); color: var(--ink); }
svg { display: block; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.brand svg { width: 24px; height: 24px; }
.nav { display: none; gap: 32px; font-size: .875rem; color: var(--ink-2); }
.nav a:hover, .signin:hover, .link:hover { color: var(--ink); }
@media (min-width: 768px) { .nav { display: flex; } }
.top-actions { display: flex; align-items: center; gap: 16px; }
.signin { font-size: .875rem; color: var(--ink-2); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  font: inherit; font-weight: 500; cursor: pointer; transition: background-color .15s;
  height: 40px; padding: 0 16px; border-radius: 6px; font-size: .95rem;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-sm { height: 32px; padding: 0 12px; font-size: .875rem; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 1rem; border-radius: 9px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border: 0; }
.btn-primary:hover { background: var(--accent-bright); }
.btn-outline { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-outline:hover { background: var(--surface-2); }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline-flex; } }

/* sections */
section { border-bottom: 1px solid var(--line); padding: 64px 0; }
@media (min-width: 1024px) { section { padding: 80px 0; } }
section:last-of-type { border-bottom: 0; }
[id] { scroll-margin-top: 16px; }
.hero { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .hero { grid-template-columns: 1.05fr .95fr; } }
.eyebrow { font-family: var(--mono); font-size: .75rem; color: var(--cite); margin-bottom: 20px; }
h1 { font-size: 2.4rem; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
@media (min-width: 640px) { h1 { font-size: 2.95rem; } }
.lede { margin-top: 20px; max-width: 46ch; font-size: 1.06rem; line-height: 1.625; color: var(--ink-2); }
.cta-row { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--ink-2); }
.link svg { width: 16px; height: 16px; }
.fine { margin-top: 16px; font-family: var(--mono); font-size: .78rem; color: var(--ink-3); }

.sec-head { margin-bottom: 44px; max-width: 58ch; }
.sec-head h2, .closing h2 { font-size: 1.8rem; font-weight: 600; letter-spacing: -.01em; }
.sec-head p { margin-top: 12px; line-height: 1.625; color: var(--ink-2); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--surface); padding: 24px; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
@media (min-width: 768px) { .steps li { border-bottom: 0; border-right: 1px solid var(--line); } .steps li:last-child { border-right: 0; } }
.steps .k { font-family: var(--mono); font-size: .75rem; color: var(--cite); }
.steps h3 { margin-top: 8px; font-size: 1.08rem; font-weight: 600; }
.steps p.t { margin-top: 8px; font-size: .875rem; line-height: 1.625; color: var(--ink-2); }
.aside { margin-top: 24px; max-width: 70ch; font-size: .875rem; line-height: 1.625; color: var(--ink-2); }
.aside b { color: var(--ink); }

.features { display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { background: var(--bg); padding: 28px; }
.feature svg { width: 26px; height: 26px; margin-bottom: 16px; fill: none; stroke-width: 1.3; }
.feature h3 { font-size: 1.04rem; font-weight: 600; }
.feature p { margin-top: 8px; max-width: 44ch; font-size: .875rem; line-height: 1.625; color: var(--ink-2); }

.closing h2 { max-width: 22ch; font-size: 2rem; line-height: 1.2; }
.closing .lede { max-width: 52ch; font-size: 1rem; }
.closing .cta-row { gap: 16px; }
.disclaimer {
  margin-top: 40px; max-width: 70ch; border: 1px solid rgb(224 176 79 / .45); background: var(--warn-bg);
  border-radius: 6px; padding: 12px 16px; font-size: .875rem; line-height: 1.625;
}
.disclaimer b { font-weight: 600; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--line); padding: 28px 0 48px; font-size: .8rem; color: var(--ink-3); }
.foot .brand { font-size: 1rem; color: var(--ink-2); gap: 8px; }
.foot .brand svg { width: 16px; height: 16px; }

/* schematic */
.schematic { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 18px; }
.schematic .c { position: absolute; width: 9px; height: 9px; border: 1px solid var(--ink-3); }
.schematic .c1 { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.schematic .c2 { right: -1px; top: -1px; border-left: 0; border-bottom: 0; }
.schematic .c3 { left: -1px; bottom: -1px; border-right: 0; border-top: 0; }
.schematic .c4 { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.schematic svg { width: 100%; height: auto; }
.schematic figcaption { margin-top: 10px; text-align: center; font-family: var(--mono); font-size: .7rem; color: var(--ink-3); }
.flow { stroke-dasharray: 6 5; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -22; } }
.s-ink { fill: var(--ink); } .s-ink3 { fill: var(--ink-3); } .s-cite { fill: var(--cite); }
.mono { font-family: var(--mono); }

/* product preview (shared by the landing page and the coming-soon animation) */
.preview { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.pv-bar { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 8px 14px; font-family: var(--mono); font-size: .7rem; color: var(--ink-3); }
.pv-bar i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); margin-right: 6px; }
.pv-bar i:last-of-type { margin-right: 0; }
.pv-grid { display: grid; }
@media (min-width: 768px) { .pv-grid { grid-template-columns: 1fr minmax(0, 22rem); } }
.pv-chat { padding: 24px; display: flex; flex-direction: column; gap: 16px; min-height: 22rem; }
@media (min-width: 768px) { .pv-chat { border-right: 1px solid var(--line); } }
.q { align-self: flex-end; max-width: 85%; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); padding: 8px 16px; font-size: .875rem; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: block; height: 8px; border-radius: 99px; background: var(--line); }
.bar-row { display: flex; align-items: center; gap: 8px; }
.cite-chip {
  white-space: nowrap; border: 1px solid var(--line); border-radius: 4px; background: var(--bg);
  padding: 0 6px; font-family: var(--mono); font-size: .72rem; color: var(--cite);
}
.warn-note { display: flex; align-items: flex-start; gap: 8px; border: 1px solid rgb(224 176 79 / .45); border-radius: 6px; background: var(--warn-bg); padding: 8px 12px; font-size: .72rem; color: var(--ink-2); }
.warn-note::before { content: ""; flex-shrink: 0; margin-top: 3px; width: 8px; height: 8px; transform: rotate(45deg); background: var(--warn); }
.pv-pane { display: none; background: rgb(18 22 26 / .4); padding: 20px; font-family: var(--serif); }
@media (min-width: 768px) { .pv-pane { display: block; } }
.pv-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.pv-head b { font-family: var(--mono); font-size: .875rem; font-weight: 600; }
.pv-head .bar { background: rgb(231 236 239 / .25); }
.part { display: grid; grid-template-columns: 2.2rem 1fr; gap: 4px; align-items: start; border-radius: 6px; padding: 6px 8px 6px 0; }
.part .m { text-align: right; padding-top: 1px; font-family: var(--sans); font-size: .75rem; font-weight: 600; color: var(--ink-3); }
.part .bars { gap: 6px; padding-top: 4px; }
.part .bar { background: rgb(61 72 81 / .6); }
.part.focus { background: var(--cite-bg); box-shadow: inset 4px 0 0 var(--accent); }
.part.focus .m { color: var(--cite); }
.part.focus .bar { background: rgb(201 129 79 / .45); }
.d1 { margin-left: 1.4rem; }
.b-note { margin-top: 8px; border: 1px solid var(--line); border-left: 3px solid var(--note); border-radius: 0 6px 6px 0; background: var(--note-bg); padding: 8px 12px; font-family: var(--sans); font-size: .75rem; color: var(--note); }
.b-note .bars { margin-top: 6px; }
.b-note .bar { background: rgb(159 176 190 / .3); }

/* coming soon page */
.soon { text-align: center; padding: 64px 0 40px; border: 0; }
.soon h1 { font-size: 2.2rem; }
.soon .lede { margin: 16px auto 0; }
.soon .cta-row { justify-content: center; }
.demo-note { margin: 0 0 16px; text-align: center; font-family: var(--mono); font-size: .78rem; color: var(--ink-3); }
.soon-wrap { padding-bottom: 72px; }
.anim .pv-chat { min-height: 24rem; }
.anim .pv-pane { display: block; min-height: 12rem; border-top: 1px solid var(--line); transition: opacity .3s; }
@media (min-width: 768px) { .anim .pv-pane { border-top: 0; } }
.anim .pv-pane.idle { opacity: .35; }
.typing { display: inline-block; }
.caret::after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hidden { display: none !important; }
.fade-in { animation: fade .4s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.bar.grow { width: 0; animation: grow .7s ease forwards; }
@keyframes grow { to { width: var(--w); } }
.cite-chip.live { cursor: pointer; }
.cite-chip.pulse { animation: pulse 1s ease-in-out infinite; border-color: var(--accent); }
@keyframes pulse { 50% { background: var(--cite-bg); } }
.cite-chip.pressed { background: var(--cite-bg); border-color: var(--accent); }
.pane-focus { animation: focus-in .6s ease both; }
@keyframes focus-in { from { background: transparent; box-shadow: none; } }
.replay { margin-top: 20px; text-align: center; font-size: .8rem; color: var(--ink-3); }
.replay button { background: none; border: 0; color: var(--cite); font: inherit; cursor: pointer; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow, .caret::after, .cite-chip.pulse { animation: none; }
}
