:root {
  --accent: #2B44FF;
  --accent-light: #8C9BFF;
  --ink: #0E0F12;
  --ink-2: #474D57;
  --ink-3: #5F6670;
  --ink-4: #8A9099;
  --bg: #FFFFFF;
  --bg-soft: #F5F6F7;
  --bg-softer: #F9FAFA;
  --chip: #EEF0F2;
  --live: #46E68C;
  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Helvetica, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
pre { margin: 0; }
h1, h2, h3, p { margin: 0; }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.muted { font-size: 15px; color: var(--ink-3); }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 20px;
  border-radius: 6px;
  font-weight: 600;
  line-height: 1.55;
}
.btn-sm { padding: 11px 16px; font-size: 15px; }
.btn-accent { background: var(--accent); color: #FFFFFF; }
.btn-accent:hover { color: #FFFFFF; filter: brightness(1.08); }
.btn-soft { background: var(--chip); }
.btn-link { padding: 14px 8px; color: var(--ink-2); }
.btn-white { padding: 15px 22px; background: #FFFFFF; color: var(--ink); }
.btn-white:hover { color: var(--accent); }
.btn-dark { padding: 15px 22px; background: #22252B; color: #FFFFFF; font-weight: 500; }
.btn-dark:hover { color: #FFFFFF; background: #2D3139; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Nav */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: #E9EBEE; }
main section[id] { scroll-margin-top: 72px; }
.nav {
  padding-top: 16px; padding-bottom: 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.03em; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.nav-links a, .nav-signin { color: var(--ink-2); }
.nav-links a:hover, .nav-signin:hover { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-signin { padding: 12px 14px; font-size: 15px; font-weight: 500; }

/* Hero */
.hero {
  padding-top: 72px; padding-bottom: 40px;
  display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end;
}
.hero-copy { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(44px, 9vw, 72px); line-height: 0.98; letter-spacing: -0.05em; font-weight: 800; }
.lead { font-size: 20px; color: var(--ink-2); max-width: 580px; }

.latency {
  flex: 0 1 440px; min-width: 0;
  background: var(--ink); color: #FFFFFF;
  border-radius: 14px; padding: 26px 28px 22px;
  display: flex; flex-direction: column; gap: 18px;
}
.latency-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.06em; color: #A9AFB8;
}
.latency-live { display: flex; align-items: center; gap: 10px; }
.live-label { color: var(--live); font-weight: 600; }
.ws-live { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: wsPulse 1.6s ease-out infinite; flex: none; }
@keyframes wsPulse {
  0% { box-shadow: 0 0 0 0 rgba(70, 230, 140, 0.55); }
  100% { box-shadow: 0 0 0 9px rgba(70, 230, 140, 0); }
}
.latency-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 14px; color: #A9AFB8; }
.stat-num {
  font-size: clamp(52px, 14vw, 76px); line-height: 0.95; font-weight: 800; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.stat-avg { color: var(--accent-light); }
.stat-unit { font-size: 26px; letter-spacing: -0.01em; color: #FFFFFF; }
.latency-chart { display: flex; flex-direction: column; gap: 8px; }
.bars { height: 64px; display: flex; align-items: flex-end; gap: 3px; }
.bar { flex: 1; min-width: 2px; border-radius: 2px; background: var(--accent-light); }
.bar.slow { background: #FFFFFF; opacity: 0.9; }
.chart-legend { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #7D848E; }

/* Use cases */
.use-cases { padding-top: 24px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 18px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 24px; }
.h2-sm { font-size: 32px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.2; }
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.case {
  display: flex; flex-direction: column; gap: 10px;
  padding: 28px; border-radius: 12px; background: var(--bg-soft); color: var(--ink);
  transition: background-color 0.15s ease;
}
.case:hover { color: var(--ink); background: #EDEFF1; }
.case-icon { display: flex; height: 40px; align-items: center; margin-bottom: 6px; }
.case-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.case-tagline { font-size: 15px; color: var(--ink-2); }
.case-query { margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--accent); }

/* Demo */
.demo { background: var(--bg-soft); }
.demo-inner { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 28px; }
.demo-intro { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.demo h2, .agents h2, .pricing h2 {
  font-size: clamp(34px, 6vw, 44px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 800;
}
.sub { font-size: 18px; color: var(--ink-2); }
.datasets { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.ds-btn {
  flex: none; white-space: nowrap;
  min-height: 44px; padding: 0 16px; border-radius: 6px; border: 0; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 600;
  background: #FFFFFF; color: var(--ink);
}
.ds-btn:hover { background: #ECEEF0; }
.ds-btn[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }
.ds-count { font-family: var(--mono); font-size: 12px; opacity: 0.7; }

.demo-panel {
  background: #FFFFFF; border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(14, 15, 18, 0.06), 0 12px 32px rgba(14, 15, 18, 0.06);
}
.search-row { display: flex; align-items: center; gap: 12px; padding: 8px 24px 0; }
.search-icon { display: flex; }
#demo-q {
  flex: 1; min-width: 0; height: 72px; border: 0; outline: none; background: transparent;
  font-family: inherit; font-size: clamp(18px, 4.5vw, 24px); font-weight: 500; color: var(--ink);
}
#demo-q::-webkit-search-cancel-button { cursor: pointer; }
.elapsed { font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.samples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 24px 16px; font-size: 14px; color: var(--ink-3); }
.samples-list { display: contents; }
.chip {
  flex: none; white-space: nowrap;
  min-height: 36px; padding: 0 12px; border-radius: 6px; border: 0; background: var(--chip);
  cursor: pointer; font-family: inherit; font-size: 14px; color: var(--ink);
}
.chip:hover { background: #E3E6E9; }

.results { margin: 0; padding: 0; list-style: none; }
.result {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding: 16px 24px;
  background: #FFFFFF;
}
.result:nth-child(odd) { background: var(--bg-softer); }
.r-rank { font-family: var(--mono); font-size: 13px; color: var(--ink-4); width: 20px; }
.r-body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.r-title { font-weight: 600; font-size: 17px; }
.r-meta { font-size: 14px; color: var(--ink-3); }
.r-scores {
  flex: 0 1 260px; min-width: 200px;
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 36px; gap: 4px 10px; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}
.track { height: 6px; background: var(--chip); border-radius: 3px; }
.fill { height: 6px; border-radius: 3px; }
.fill-kw { background: var(--accent); }
.fill-vec { background: var(--ink); }
.no-results { padding: 28px 24px; color: var(--ink-3); }
.demo-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 16px 24px; background: var(--bg-softer); font-size: 13px; color: var(--ink-3);
}
.demo-foot strong { color: var(--ink); }

/* Agents */
.agents { padding-top: 96px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.agents-copy { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); padding-top: 4px; }
.step { padding: 16px 16px 0 0; display: flex; flex-direction: column; gap: 4px; }
.step-n { font-size: 13px; color: var(--accent); }
.step-t { font-weight: 600; }
.code-card { flex: 1 1 460px; min-width: 0; background: var(--ink); color: #E6E8EB; border-radius: 14px; overflow: hidden; }
.code-head { display: flex; justify-content: space-between; padding: 14px 20px 0; font-size: 12px; color: #9AA1AB; }
.code-scroll { overflow-x: auto; }
.code-card pre { padding: 18px 20px; font-size: 14px; line-height: 1.75; }
.c-key { color: #9DB0FF; }
.c-str { color: #F3D49B; }
.c-dim { color: #7E8590; }
.c-ok { color: #7EE2A8; }

/* Pricing */
.pricing-inner { padding-top: 96px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 48px; }
.pricing-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.btn-start { align-self: flex-start; }
.features { flex: 1 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 12px; }
.feature { padding: 26px; border-radius: 12px; background: var(--bg-soft); display: flex; flex-direction: column; gap: 6px; }
.feature h3 { font-size: 18px; font-weight: 700; }
.feature p { font-size: 15px; color: var(--ink-2); }

/* CTA */
.cta { background: var(--ink); color: #FFFFFF; }
.cta-inner { padding-top: 96px; padding-bottom: 96px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.cta h2 { font-size: clamp(38px, 7.5vw, 56px); line-height: 1; letter-spacing: -0.045em; font-weight: 800; max-width: 720px; }

/* Footer */
.footer-inner { padding-top: 36px; padding-bottom: 36px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; font-size: 14px; color: var(--ink-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--ink-3); }
.footer-links a:hover { color: var(--accent); }

/* Tablets: section links move to their own row under brand + actions. */
@media (max-width: 900px) {
  .nav { row-gap: 4px; }
  .nav-links { order: 3; width: 100%; gap: 22px; }
}

/* Small screens */
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .scroll-x {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px;
    scroll-padding-left: 16px;
  }
  .scroll-x::-webkit-scrollbar { display: none; }

  /* Header: brand + actions on one row, section links as a swipeable row below. Not sticky:
     two rows would eat too much of a phone screen. */
  .site-header { position: static; background: #FFFFFF; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav { padding-top: 12px; padding-bottom: 4px; gap: 4px 12px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand svg { width: 26px; height: 26px; }
  .nav-signin { padding: 12px 10px; }
  .nav-links { order: 3; width: calc(100% + 32px); gap: 22px; padding-top: 6px; padding-bottom: 6px; }
  .nav-links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: none; padding: 6px 0; }

  .hero { padding-top: 28px; gap: 32px; }
  .hero-copy { gap: 20px; }
  .hero-copy, .agents-copy, .code-card, .pricing-copy, .features { flex-basis: 100%; }
  .hero .btn-row .btn-accent, .hero .btn-row .btn-soft { flex: 1 1 auto; text-align: center; }
  .hero .btn-link { padding-top: 4px; padding-bottom: 4px; }
  .latency { flex-basis: 100%; padding: 20px 20px 18px; gap: 16px; }
  .lh-prod { display: none; }
  .stat-unit { font-size: 22px; }
  .lead { font-size: 18px; }

  /* Use cases: a swipeable row of cards instead of six tall stacked tiles. */
  .use-cases { padding-bottom: 56px; gap: 14px; }
  .h2-sm { font-size: 28px; }
  .cases { display: flex; gap: 10px; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .case { flex: 0 0 82%; padding: 22px; scroll-snap-align: start; }
  .case-icon { height: 32px; margin-bottom: 2px; }
  .case-icon svg { width: 30px; height: 30px; }

  .demo-inner { padding-top: 56px; padding-bottom: 56px; gap: 22px; }
  .sub { font-size: 17px; }
  .search-row, .samples, .result, .demo-foot { padding-left: 16px; padding-right: 16px; }
  .search-row { gap: 10px; padding-top: 4px; }
  #demo-q { height: 60px; }
  .samples { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 14px; }
  .samples::-webkit-scrollbar { display: none; }
  .samples > span:first-child { flex: none; }
  .no-results { padding-left: 16px; padding-right: 16px; }
  .result { gap: 10px 12px; align-items: flex-start; }
  .r-rank { width: auto; padding-top: 3px; }
  .r-body { flex: 1 1 0; }
  .r-title { font-size: 16px; }
  .r-scores { min-width: 0; flex-basis: 100%; }

  .agents, .pricing-inner, .cta-inner { padding-top: 64px; padding-bottom: 64px; }
  .agents { gap: 32px; }
  .agents-copy { gap: 16px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step { padding: 8px 10px 0 0; }
  .step-t { font-size: 15px; line-height: 1.3; }
  .code-card pre { font-size: 12px; padding: 16px; }
  .code-head { padding: 12px 16px 0; }
  .pricing-inner { gap: 32px; }
  .feature { padding: 20px 22px; }
  .cta-inner { gap: 28px; }
  .cta .btn-row { width: 100%; }
  .cta .btn { flex: 1 1 100%; text-align: center; }
  .footer-inner { padding-top: 28px; padding-bottom: 28px; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ws-live { animation: none; }
  .case { transition: none; }
}

/* SVG accent hooks (CSS vars don't resolve in presentation attributes) */
.acc-stroke { stroke: var(--accent); }
.acc-fill { fill: var(--accent); }
