:root {
  --bg: #0b0f17;
  --bg-elev: #121826;
  --bg-card: #151c2c;
  --border: #243049;
  --text: #e6ecf5;
  --muted: #93a1b8;
  --accent: #5aa7ff;
  --accent-2: #7ce0c3;
  --danger: #ff9b7a;
  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  font-synthesis: none;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fc;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --border: #dde4ef;
    --text: #16202f;
    --muted: #5a6a82;
    --accent: #2b6fdf;
    --accent-2: #17957a;
    --shadow: 0 8px 24px rgba(20, 40, 80, 0.08);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem clamp(1rem, 4vw, 2rem);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); margin-right: 0.15rem; }
.topnav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  font-size: 0.92rem;
}
.topnav a { color: var(--muted); }
.topnav a:hover { color: var(--text); text-decoration: none; }
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.lang-toggle button {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.lang-toggle button.active {
  background: var(--accent);
  color: #fff;
}
@media (max-width: 720px) {
  .topnav { display: none; }
}

/* ---------- layout ---------- */
main { display: block; }
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2rem);
  border-top: 1px solid var(--border);
}
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.section-lede {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 2rem;
  font-size: 1.05rem;
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) clamp(1rem, 4vw, 2rem) clamp(2.5rem, 5vw, 4rem);
  text-align: left;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.2rem;
  max-width: 18ch;
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 72%, var(--accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 2rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.cta-row.center { justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: transparent; }
.demo-note {
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 58ch;
}

/* ---------- demo figure ---------- */
.demo-figure { margin: 0; }
.shot-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.shot-pair img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg-elev);
}
figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
figcaption .pending {
  color: var(--accent-2);
  font-size: 0.85rem;
}
@media (max-width: 640px) {
  .shot-pair { grid-template-columns: 1fr; }
}

/* ---------- architecture ---------- */
.arch-wrap { display: flex; flex-direction: column; align-items: center; }
.arch-svg {
  width: 100%;
  max-width: 760px;
  height: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  box-shadow: var(--shadow);
}
.arch-node rect {
  fill: var(--bg-card);
  stroke: var(--border);
  stroke-width: 1.5;
  transition: stroke 0.15s ease, fill 0.15s ease;
}
.arch-node.accent rect { stroke: var(--accent); }
.arch-node.tool rect { stroke: color-mix(in srgb, var(--accent-2) 60%, var(--border)); }
.arch-node.data rect { fill: color-mix(in srgb, var(--accent) 10%, var(--bg-card)); }
.arch-node text { text-anchor: middle; pointer-events: none; }
.n-title { fill: var(--text); font-size: 13px; font-weight: 600; }
.n-sub { fill: var(--muted); font-size: 10.5px; }
.arch-node { cursor: default; }
.arch-node:hover rect {
  stroke: var(--accent);
  fill: color-mix(in srgb, var(--accent) 12%, var(--bg-card));
}
.arch-edges line {
  stroke: var(--border);
  stroke-width: 1.5;
}
.arch-tip {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  min-height: 1.5em;
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.card p { margin: 0 0 0.9rem; color: var(--muted); font-size: 0.95rem; }
.proof { font-size: 0.85rem; font-weight: 600; }
.proof.muted { color: var(--muted); font-weight: 500; }

/* ---------- benchmarks ---------- */
.bench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}
.bench-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.bench-card h3 { margin: 0 0 1rem; font-size: 1.1rem; }
.bench-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.bench-card th,
.bench-card td {
  text-align: left;
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
.bench-card th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bench-card td:first-child { font-weight: 600; }
.tag {
  font-size: 0.65rem;
  background: color-mix(in srgb, var(--accent-2) 22%, transparent);
  color: var(--accent-2);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  vertical-align: middle;
}
.bench-take { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.9rem; }

/* ---------- closing ---------- */
.closing { text-align: center; }
.closing .section-lede { margin-left: auto; margin-right: auto; }

/* ---------- footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 2rem) 3.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer p { margin: 0 0 0.9rem; max-width: 78ch; }
.disclaimer strong { color: var(--text); }
.colophon a { margin: 0 0.15rem; }
