/* ============================================================
   ax — landing page styles
   Dark-first, system-fonted, fully responsive, zero deps.
   ============================================================ */

:root {
  --bg: #07070b;
  --bg-2: #0d0d14;
  --bg-3: #11111c;
  --panel: #14141f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f5;
  --text-dim: #aab0bf;
  --muted: #6f7689;
  --accent: #a78bfa;        /* violet */
  --accent-2: #38bdf8;      /* cyan */
  --accent-3: #f472b6;      /* pink */
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --code-bg: #0a0a13;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 24px 80px rgba(91, 33, 182, 0.18);
  --container: 1180px;
  --gap: clamp(16px, 2vw, 24px);
  --font-sans:
    ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono:
    ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfd;
    --bg-2: #f3f4f8;
    --bg-3: #eceef5;
    --panel: #ffffff;
    --line: rgba(0, 0, 0, 0.08);
    --line-strong: rgba(0, 0, 0, 0.16);
    --text: #0c0d12;
    --text-dim: #44485a;
    --muted: #6b7184;
    --code-bg: #0a0a13;
    --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.03) inset, 0 8px 32px rgba(15, 23, 42, 0.06);
    --shadow-2: 0 24px 80px rgba(91, 33, 182, 0.10);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }
code, pre, kbd, samp { font-family: var(--font-mono); font-size: 0.93em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: #0a0a13; padding: 8px 12px; border-radius: 6px;
}
.skip-link:focus { left: 12px; top: 12px; z-index: 9999; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; letter-spacing: -0.01em;
}
.brand-logo {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fb923c, #f97316);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.35);
  color: #1a0e05; font-family: var(--font-mono); font-size: 13px; font-weight: 800;
}
nav.primary { display: flex; align-items: center; gap: 22px; }
nav.primary a { color: var(--text-dim); font-size: 14px; }
nav.primary a:hover { color: var(--text); }
@media (max-width: 820px) {
  nav.primary a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  font-weight: 600; font-size: 14px;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: #0a0a13;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}
.btn-ghost {
  color: var(--text); background: transparent;
}
.btn-ghost:hover { background: rgba(255,255,255,0.04); border-color: var(--line-strong); color: var(--text); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-bg {
  position: absolute; inset: -10% -5% auto -5%; height: 600px; z-index: -1;
  background:
    radial-gradient(60% 60% at 20% 30%, rgba(167, 139, 250, 0.30), transparent 70%),
    radial-gradient(45% 60% at 85% 20%, rgba(56, 189, 248, 0.22), transparent 70%),
    radial-gradient(60% 80% at 50% 90%, rgba(244, 114, 182, 0.16), transparent 70%);
  filter: blur(50px); opacity: 0.9;
  pointer-events: none;
}
.hero-grid {
  display: grid; gap: clamp(28px, 4vw, 56px);
  grid-template-columns: 1.1fr 1fr; align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--panel);
  color: var(--text-dim); font-size: 12px; letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.04; letter-spacing: -0.02em; margin: 18px 0 16px;
  font-weight: 800;
}
.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede {
  color: var(--text-dim); font-size: clamp(16px, 1.6vw, 19px); max-width: 56ch; margin: 0 0 28px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  max-width: 560px;
}
.hero-stats li {
  min-width: 0; overflow-wrap: anywhere;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px; border-radius: var(--radius-sm);
  display: flex; flex-direction: column;
}
.hero-stats strong { font-size: 22px; line-height: 1.05; }
.hero-stats span { color: var(--text-dim); font-size: 12px; }
@media (max-width: 540px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Terminal mockup ---------- */
.terminal {
  margin: 0;
  background: linear-gradient(180deg, #0c0c14 0%, #0a0a12 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1), var(--shadow-2);
  overflow: hidden;
}
.terminal-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title {
  margin-left: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
}
.terminal-body {
  margin: 0; padding: 18px 18px 22px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word; color: #d6d8e3;
  min-height: 360px;
}
.t-prompt { color: var(--accent-2); }
.t-cmd { color: #e8eaf2; }
.t-info { color: var(--accent); }
.t-tool { color: var(--accent-3); }
.t-key { color: var(--warn); }
.t-val { color: var(--accent-2); }
.t-str { color: #a3e635; }
.t-ok  { color: var(--ok); }
.t-dim { color: var(--muted); }
.cursor {
  display: inline-block; width: 8px; height: 14px; vertical-align: middle;
  background: var(--accent-2); animation: blink 1s steps(1) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Provider strip ---------- */
.strip { padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.strip-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.16em; margin: 0 0 12px; }
.logos { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px 28px; }
.logos li {
  font-family: var(--font-mono); color: var(--text-dim); font-size: 14px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
}

/* ---------- Section base ---------- */
.section { padding: clamp(64px, 8vw, 110px) 0; }
.section-dark { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-feature {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(56,189,248,0.12), transparent 70%),
    radial-gradient(80% 60% at 0% 100%, rgba(167,139,250,0.12), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.section-title {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 12px; font-weight: 800;
}
.section-sub { color: var(--text-dim); max-width: 70ch; margin: 0 0 36px; font-size: clamp(15px, 1.4vw, 17px); }

/* ---------- Why ax / vs grid ---------- */
.vs-grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.vs-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-3) 100%);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.vs-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-1);
}
.vs-card h3 { font-size: 17px; margin: 0 0 10px; letter-spacing: -0.01em; }
/* Use absolute-positioned markers instead of flex children so long words and
   inline <code> don't overflow the card on narrow widths. */
.vs-card p {
  position: relative;
  margin: 8px 0;
  padding-left: 22px;
  font-size: 14px;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.vs-bad { color: var(--text-dim); }
.vs-good { color: var(--text); }
.vs-bad::before, .vs-good::before {
  position: absolute; left: 0; top: 0;
  font-weight: 700; line-height: 1.5;
}
.vs-bad::before { content: "✕"; color: var(--bad); }
.vs-good::before { content: "✓"; color: var(--ok); }
.vs-card code {
  display: inline; max-width: 100%;
  background: var(--code-bg); color: #e8eaf2;
  padding: 1px 6px; border-radius: 4px;
  word-break: break-word; overflow-wrap: anywhere;
}

/* ---------- Architecture ---------- */
.arch-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.arch-col {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: var(--panel);
}
.arch-col h4 {
  margin: 0 0 6px; font-family: var(--font-mono); font-size: 13px;
  color: var(--accent-2); letter-spacing: 0.04em; text-transform: lowercase;
}
.arch-col p { margin: 0; font-size: 14px; color: var(--text-dim); }

/* ---------- Providers ---------- */
.provider-grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.prov {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
}
.prov h3 { margin: 0 0 6px; font-size: 17px; }
.prov p { color: var(--text-dim); margin: 0 0 12px; font-size: 14px; }
.prov code {
  display: inline-block; padding: 4px 8px; border-radius: 6px;
  background: var(--code-bg); color: #cbd5f5; font-size: 12px;
}
.prov.featured {
  border-color: transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
  border: 1px solid transparent;
}

/* ---------- TurboQuant ---------- */
.tq-grid {
  display: grid; gap: clamp(24px, 4vw, 56px);
  grid-template-columns: 1.2fr 1fr; align-items: start;
}
@media (max-width: 980px) { .tq-grid { grid-template-columns: 1fr; } }
.tq-list { padding-left: 18px; color: var(--text-dim); }
.tq-list li { margin: 8px 0; }
.tq-list strong { color: var(--text); }
.tq-table {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.tq-table h3 { margin: 0 0 12px; font-size: 14px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.tq-table dl { margin: 0; }
.tq-table dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.tq-table dl > div:last-child { border-bottom: 0; }
.tq-table dt { color: var(--text); font-size: 14px; font-family: var(--font-mono); }
.tq-table dd { margin: 0; color: var(--text-dim); font-size: 14px; }

/* ---------- Tools ---------- */
.tool-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.tool {
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius-sm); padding: 16px;
}
.tool h4 { margin: 0 0 6px; font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.tool p { margin: 0; font-size: 14px; color: var(--text-dim); }

/* ---------- Quick start steps ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps > li {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.steps h4 { margin: 0 0 10px; font-size: 16px; }
.step-note { color: var(--muted); margin: 8px 0 0; font-size: 13px; }
.code-block { position: relative; }
.code-block pre {
  margin: 0; background: var(--code-bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 76px 14px 16px;
  overflow-x: auto; color: #d6d8e3;
}
.code-block .copy {
  position: absolute; top: 8px; right: 8px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,0.04);
  color: var(--text-dim); padding: 4px 10px; border-radius: 6px;
  font-size: 12px; cursor: pointer;
  transition: color 120ms, border-color 120ms, background 120ms;
}
.code-block .copy:hover { color: var(--text); border-color: var(--accent-2); }
.code-block .copy.copied { color: var(--ok); border-color: var(--ok); }

/* ---------- Tool lanes (search vs intelligence vs editing) ---------- */
.tool-lane { margin-top: 32px; }
.tool-lane:first-child { margin-top: 0; }
.tool-lane > h3 {
  margin: 0 0 14px; font-size: 14px;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700;
}
.tool-lane > h3 .lane-tag {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  background: rgba(167,139,250,0.16); color: var(--accent); font-size: 11px;
  letter-spacing: 0.04em;
}
.tool .badge {
  display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-dim); font-size: 11px;
  letter-spacing: 0.02em;
}
.tool .badge.fast { color: var(--ok); border-color: rgba(52,211,153,0.4); }
.tool .badge.new { color: var(--accent); border-color: rgba(167,139,250,0.5); }
.tool .badge.deep { color: var(--accent-3); border-color: rgba(244,114,182,0.5); }

/* ---------- Numbers strip (big-number proof bar) ---------- */
.numbers {
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background:
    radial-gradient(70% 100% at 50% 0%, rgba(56,189,248,0.10), transparent 60%),
    var(--bg-2);
}
.numbers .container > h2 { margin: 0 0 24px; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -0.01em; }
.numbers-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.num {
  position: relative; min-width: 0;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-3) 100%);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 6px;
  overflow-wrap: anywhere;
}
.num strong {
  font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.02em; line-height: 1.05;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.num span { color: var(--text); font-size: 14px; font-weight: 600; }
.num small { color: var(--text-dim); font-size: 12px; }

/* ---------- Quality stats ---------- */
.qual-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.qual {
  min-width: 0; overflow-wrap: anywhere;
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius-sm);
  padding: 18px; display: flex; flex-direction: column; gap: 4px;
}
.qual strong { font-size: 26px; letter-spacing: -0.01em; }
.qual span { color: var(--text-dim); font-size: 13px; }
.qual code { background: var(--code-bg); padding: 0 4px; border-radius: 3px; }

/* ---------- CTA ---------- */
.cta {
  padding: clamp(64px, 8vw, 110px) 0;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(167,139,250,0.16), transparent 70%),
    var(--bg);
  border-top: 1px solid var(--line);
}
.cta-inner { text-align: center; }
.cta h2 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 10px; letter-spacing: -0.02em; }
.cta p { color: var(--text-dim); margin: 0 0 22px; }
.cta-inner .cta-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 48px 0 32px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 { margin: 0 0 10px; font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.footer-grid nav { display: flex; flex-direction: column; gap: 6px; }
.footer-grid nav a { color: var(--text); font-size: 14px; }
.footer-grid nav a:hover { color: var(--accent-2); }
.muted { color: var(--text-dim); margin: 4px 0; font-size: 13px; }
.footer-bottom { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }
.footer-bottom .muted { font-size: 12px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
