:root {
  --bg-0: #05070e;
  --bg-1: #0a0f1d;
  --bg-2: #111a2e;
  --bg-3: #1a2745;
  --border: #1e2b45;
  --border-strong: #2a3b5c;
  --text-0: #f8fafc;
  --text-1: #cbd5e1;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --amber: #f59e0b;
  --green: #10b981;
  --red: #ef4444;
  --purple: #a855f7;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-md: 0 4px 20px -4px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px -20px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 80px -20px var(--accent-glow);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  background: var(--bg-0);
  color: var(--text-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─────────── Ambient grid background ─────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,43,69,0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,43,69,0.25) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 40%, transparent 90%);
  z-index: 0;
  pointer-events: none;
}

main > section { position: relative; z-index: 1; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─────────── Header ─────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 7, 14, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(30,43,69,0.5);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-0);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 26px;
  height: 26px;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  color: var(--text-1);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
  position: relative;
}

nav a:not(.btn):hover {
  color: var(--text-0);
}

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 12px -2px rgba(59,130,246,0.3);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 6px 20px -4px rgba(59,130,246,0.5);
}

.btn-outline {
  background: rgba(255,255,255,0.03);
  color: var(--text-0);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--text-2);
  background: rgba(255,255,255,0.06);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 15px;
}

.btn svg { width: 16px; height: 16px; }

/* ─────────── Hero ─────────── */
.hero {
  padding: 80px 0 40px;
  text-align: center;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 40px;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.18) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 100px;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.hero-badge strong {
  color: var(--accent);
  font-weight: 600;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  margin: 0 0 24px;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 .accent {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p.lead {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-1);
  max-width: 660px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-install {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--text-1);
  cursor: pointer;
  transition: border-color 0.15s;
}
.hero-install:hover { border-color: var(--accent); }
.hero-install::before { content: '$'; color: var(--text-3); }
.hero-install .copy-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
}

/* Stats row */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 5vw, 56px);
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hero-stat-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* ─────────── Hero screenshot ─────────── */
.hero-screenshot {
  padding: 0 0 80px;
}

.screenshot-frame {
  position: relative;
  background: linear-gradient(135deg, rgba(59,130,246,0.4), rgba(168,85,247,0.25));
  padding: 1.5px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  max-width: 1080px;
  margin: 0 auto;
}

.screenshot-frame::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 60%);
  filter: blur(30px);
  z-index: -1;
  opacity: 0.5;
}

.screenshot-frame img {
  width: 100%;
  display: block;
  border-radius: 14.5px;
  border: 1px solid var(--border-strong);
}

/* ─────────── Sections ─────────── */
section {
  padding: 100px 0;
}

.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

section h2 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-intro {
  text-align: center;
  margin-bottom: 64px;
}

.section-intro p {
  color: var(--text-1);
  font-size: 17px;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

section.alt {
  background: linear-gradient(180deg, transparent, var(--bg-1) 50%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ─────────── Feature grid ─────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.feature {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--x, -100%) var(--y, -100%), rgba(59,130,246,0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature:hover::before { opacity: 1; }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 1px solid;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.feature p {
  color: var(--text-2);
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.feature-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px;
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
}

/* ─────────── Gallery ─────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.gallery figure {
  margin: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.gallery figure:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.gallery img {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border);
  aspect-ratio: 16/10;
  object-fit: cover;
  object-position: top;
}

.gallery figcaption {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.5;
}

.gallery figcaption strong {
  display: block;
  color: var(--text-0);
  font-weight: 600;
  margin-bottom: 3px;
  font-size: 14px;
}

/* ─────────── Compare teaser table ─────────── */
.compare-teaser {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 820px;
  margin: 0 auto;
}

.compare-teaser .row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.compare-teaser .row:last-child { border-bottom: none; }

.compare-teaser .row.header {
  background: var(--bg-3);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
}

.compare-teaser .row > *:not(:first-child) {
  text-align: center;
}

.compare-teaser .feat-name {
  color: var(--text-0);
  font-weight: 500;
}

/* Check/X indicators */
.ind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
}
.ind.yes {
  background: rgba(16,185,129,0.12);
  color: var(--green);
}
.ind.no {
  background: rgba(100,116,139,0.1);
  color: var(--text-3);
}
.ind.partial {
  background: rgba(245,158,11,0.12);
  color: var(--amber);
}

/* ─────────── Architecture ─────────── */
.arch {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-1);
}

.arch .line { white-space: pre; }
.arch .crate { color: var(--accent); font-weight: 500; }
.arch .comment { color: var(--text-3); }
.arch .arrow { color: var(--text-3); }

/* ─────────── Code blocks ─────────── */
pre, code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  line-height: 1.6;
}

code {
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.88em;
  color: var(--cyan);
  border: 1px solid var(--border);
}

pre code {
  background: transparent;
  padding: 0;
  color: var(--text-0);
  border: none;
}

/* ─────────── CTA ─────────── */
.cta-box {
  background: radial-gradient(ellipse at top, rgba(59,130,246,0.15), rgba(168,85,247,0.05) 60%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 60px 32px;
  text-align: center;
  margin: 0;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(59,130,246,0.2), transparent 60%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: 36px;
  margin: 0 0 14px;
  position: relative;
}

.cta-box p {
  color: var(--text-1);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 28px;
  position: relative;
}

.cta-box .hero-ctas { margin-bottom: 0; position: relative; }

/* ─────────── Content pages ─────────── */
.content-page {
  padding: 60px 0 100px;
}

.content-page article {
  max-width: 780px;
  margin: 0 auto;
}

.content-page h1 {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 800;
  margin: 0 0 24px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.content-page > article > p:first-of-type {
  font-size: 18px;
  color: var(--text-1);
  line-height: 1.6;
}

.content-page h2 {
  font-size: 26px;
  margin: 56px 0 16px;
  letter-spacing: -0.02em;
}

.content-page h3 {
  font-size: 19px;
  margin: 36px 0 12px;
  font-weight: 600;
}

.content-page p, .content-page li {
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.75;
}

.content-page a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(59,130,246,0.3);
  transition: border-color 0.15s;
}

.content-page a:hover {
  border-color: var(--accent);
}

.content-page ul, .content-page ol { padding-left: 24px; }
.content-page li { margin-bottom: 6px; }

.content-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.content-page table th,
.content-page table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.content-page table th {
  background: var(--bg-2);
  font-weight: 600;
  color: var(--text-0);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
}

.content-page table tr:last-child td { border-bottom: none; }

.content-page blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 24px 0;
  color: var(--text-1);
  background: rgba(59,130,246,0.04);
  border-radius: 0 8px 8px 0;
}

/* ─────────── Comparison full table ─────────── */
.compare-wrapper {
  overflow-x: auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 32px 0;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

table.compare th,
table.compare td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.compare th {
  background: var(--bg-3);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-2);
}

table.compare tr:last-child td { border-bottom: none; }

table.compare tr.section-row td {
  background: var(--bg-3);
  font-weight: 600;
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

table.compare td:not(:first-child) { text-align: center; }
.yes { color: var(--green); font-weight: 500; }
.no { color: var(--text-3); }
.partial { color: var(--amber); font-weight: 500; }

/* ─────────── Callouts ─────────── */
.callout {
  padding: 16px 20px;
  border-radius: 10px;
  margin: 24px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.callout-icon { font-size: 20px; flex-shrink: 0; line-height: 1; }

.callout.beta {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--text-0);
}
.callout.beta strong { color: var(--amber); }

.callout.warning {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--text-0);
}
.callout.warning strong { color: var(--red); }

.callout.note {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--text-0);
}
.callout.note strong { color: var(--accent); }

.badge-beta {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(245,158,11,0.15);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
  margin-left: 8px;
}

/* ─────────── Footer ─────────── */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 14px;
}

.footer-brand img { width: 24px; height: 24px; }

.footer-tagline {
  color: var(--text-2);
  font-size: 14px;
  margin: 0;
  max-width: 320px;
  line-height: 1.6;
}

.site-footer h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin: 0 0 16px;
  font-weight: 600;
}

.site-footer a {
  display: block;
  color: var(--text-1);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.15s;
}

.site-footer a:hover { color: var(--text-0); }

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}

/* ─────────── Responsive ─────────── */
@media (max-width: 768px) {
  nav { gap: 16px; }
  nav a:not(.btn) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  section { padding: 70px 0; }
  .hero { padding: 50px 0 30px; }
  .compare-teaser .row { grid-template-columns: 1.5fr 1fr 1fr 1fr; padding: 12px 14px; font-size: 13px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
}
