/* ---------- Tokens ---------- */
:root {
  --bg: #08070a;
  --bg-elev: #0f0d13;
  --bg-elev-2: #15121b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #efeaf6;
  --text-mut: #a39ab1;
  --text-dim: #6c6477;
  --accent: #3b82f6;
  --accent-soft: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.45);
  --ok: #34d399;
  --warn: #fbbf24;

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1120px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(59, 130, 246, 0.16), transparent 60%),
    linear-gradient(180deg, #08070a 0%, #08070a 100%);
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
a:hover { color: var(--accent-soft); border-bottom-color: var(--border); }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #e6dcff;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.78em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  color: var(--text-mut);
}

/* ---------- Ambient glow ---------- */
.glow {
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  backdrop-filter: blur(10px);
  background: rgba(8, 7, 10, 0.6);
  border-bottom: 1px solid transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
}
.brand:hover { border: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 8px;
  background: #000;
  object-fit: contain;
  box-shadow: 0 0 0 1px var(--border-strong), 0 6px 18px -8px rgba(59, 130, 246, 0.4);
}
.brand-name {
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 17px;
  background: linear-gradient(180deg, #ffffff 0%, #c9dcf7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 26px;
  justify-content: center;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-mut);
  border: none;
}
.nav-links a:hover { color: var(--text); border: none; }

.nav-cta { font-size: 14px; padding: 8px 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .2s ease;
}
.btn:hover { border-bottom-color: transparent; }
.btn-lg { padding: 13px 22px; font-size: 16px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover { background: var(--accent-soft); color: #fff; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255,255,255,0.04); color: var(--text); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 24px 40px;
  text-align: center;
}

.hero-inner { max-width: 820px; margin: 0 auto; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: var(--accent-soft);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 28px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 12px var(--accent-glow);
}

.h1 {
  font-size: clamp(40px, 6.6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 22px;
}
.grad {
  background: linear-gradient(180deg, #ffffff 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-mut);
  max-width: 680px;
  margin: 0 auto 32px;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.byline {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}
.byline a { color: var(--text-mut); border-bottom: 1px dotted var(--border); }
.byline a:hover { color: var(--accent-soft); }

/* ---------- Product window mock ---------- */
.product {
  max-width: 980px;
  margin: 64px auto 0;
  padding: 0 12px;
  position: relative;
}
.product::before {
  content: '';
  position: absolute;
  inset: -40px -40px 0 -40px;
  background: radial-gradient(ellipse at top, var(--accent-glow), transparent 60%);
  filter: blur(40px);
  z-index: -1;
  opacity: 0.6;
}

.product-window {
  background: linear-gradient(180deg, #15121b 0%, #0e0c12 100%);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  text-align: left;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-mut);
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.window-title { margin-left: 12px; font-weight: 600; color: var(--text); }
.window-meta { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }

.window-body { padding: 20px; display: flex; flex-direction: column; gap: 18px; }

.msg { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.msg-role {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding-top: 3px;
  min-width: 42px;
}
.msg-user .msg-role { color: var(--text-mut); }
.msg-ai .msg-role { color: var(--accent-soft); }
.msg-body { color: var(--text); }
.msg-body p { margin: 8px 0 0; line-height: 1.5; }

.tool-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 10px;
  margin: 2px 6px 2px 0;
  border-radius: 7px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
}
.tool-name { color: var(--accent-soft); font-weight: 600; }
.tool-arg { color: var(--text-mut); }
.tool-status { margin-left: 6px; font-size: 11px; }
.tool-status.ok { color: var(--ok); }
.tool-status.pending { color: var(--warn); }

.composer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.composer-mode {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-soft);
  font-weight: 600;
}
.composer-placeholder { flex: 1; color: var(--text-dim); font-size: 14px; }

/* ---------- Runtimes ---------- */
.runtimes {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 64px auto 24px;
  padding: 0 24px;
  text-align: center;
}
.runtimes-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin: 0 0 18px;
}
.runtimes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}
.runtimes-list li {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mut);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 24px 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-soft);
  margin-bottom: 12px;
}
.h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 16px;
}
.sub {
  color: var(--text-mut);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}

/* ---------- Grid / Cards ---------- */
.grid {
  display: grid;
  gap: 16px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card-tall { padding: 28px; }
.card h3 { margin: 6px 0 10px; font-size: 19px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text-mut); font-size: 15px; line-height: 1.55; }
.card-icon {
  font-size: 22px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  margin-bottom: 14px;
}

.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-soft);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.card-tag.tag-soft {
  color: var(--text-mut);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}

.steps {
  margin: 16px 0 22px;
  padding-left: 20px;
  color: var(--text-mut);
  font-size: 15px;
  line-height: 1.7;
}
.steps li { margin-bottom: 4px; }
.steps strong { color: var(--text); font-weight: 600; }

.muted { color: var(--text-dim); }
.small { font-size: 13px; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 18px;
  width: fit-content;
  margin-inline: auto;
}
.tab {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mut);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, color .15s ease;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  background: rgba(59, 130, 246, 0.14);
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.3);
}

.tab-panels { position: relative; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.tab-panel p { color: var(--text-mut); font-size: 16px; margin: 0 0 18px; }
.tab-panel pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: #e6dcff;
  margin: 0 0 16px;
}
.tab-panel pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.tab-panel pre .c { color: var(--text-dim); font-style: italic; }
.tab-panel pre .s { color: var(--accent-soft); }

/* ---------- Docs ---------- */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.doc {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color .15s ease;
}
.doc[open] { border-color: var(--border-strong); }
.doc summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after {
  content: '+';
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
  transition: transform .15s ease, color .15s ease;
}
.doc[open] summary::after { content: '–'; color: var(--accent-soft); }
.doc p { margin: 14px 0 0; color: var(--text-mut); font-size: 15px; line-height: 1.6; }

.docs-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* ---------- Finale ---------- */
.finale {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 140px 24px 120px;
  max-width: var(--maxw);
  margin: 96px auto 0;
}
.finale::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.16), transparent 60%);
  z-index: -1;
}
.finale .h2 { margin-bottom: 10px; }
.finale .sub { margin-bottom: 32px; }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--border);
  padding: 36px 24px;
  margin-top: 24px;
}
.foot-row {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.brand-sm .brand-mark { width: 22px; height: 22px; border-radius: 6px; }
.brand-sm .brand-name { font-size: 14px; }
.foot-by { margin: 0; font-size: 13px; color: var(--text-mut); text-align: center; }
.foot-by a { color: var(--text); border-bottom: 1px dotted var(--border-strong); }
.foot-links { display: flex; gap: 18px; }
.foot-links a { font-size: 13px; color: var(--text-mut); border: none; }
.foot-links a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav { grid-template-columns: auto 1fr auto; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
  .product { margin-top: 48px; }
  .foot-row { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 560px) {
  .nav-cta { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .tabs { width: 100%; }
  .tab { flex: 1 1 auto; }
  .window-meta { display: none; }
  .section { padding-top: 72px; }
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.doc-table th,
.doc-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.doc-table thead th {
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mut);
  font-weight: 600;
}
.doc-table tbody tr:last-child td { border-bottom: none; }
.doc-table tbody tr:hover { background: rgba(59, 130, 246, 0.04); }
.doc-table code { font-size: 0.85em; }

.section-note { text-align: center; max-width: 720px; margin: 20px auto 0; }

/* ---------- Reference inline pre ---------- */
.h3-inline {
  margin: 48px 0 8px;
  font-size: 20px;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.section > pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: #e6dcff;
  margin: 14px 0 8px;
}
.section > pre code { background: none; border: none; padding: 0; color: inherit; }
.section > pre .c { color: var(--text-dim); font-style: italic; }
.section > pre .s { color: var(--accent-soft); }

/* ---------- Bulleted lists in cards ---------- */
.bullets {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-mut);
  font-size: 14.5px;
  line-height: 1.65;
}
.bullets li { margin-bottom: 6px; }
.bullets strong { color: var(--text); }

/* ---------- Changelog ---------- */
.changelog {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}
.release {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.release header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.release h3 {
  margin: 0;
  font-size: 18px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-soft);
}
.release-tag {
  font-size: 12px;
  color: var(--text-mut);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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