:root {
  --bg: #0a0e16;
  --bg-2: #0d1320;
  --panel: #111827;
  --panel-2: #0d1422;
  --border: #1e293b;
  --text: #e6edf6;
  --muted: #94a3b8;
  --brand: #f97316;
  --brand-2: #fb923c;
  --accent: #38bdf8;
  --green: #34d399;
  --radius: 14px;
  --maxw: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #15233b 0%, transparent 60%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", 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, pre { font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 12px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 22, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 62px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -0.03em; }
.brand span { color: var(--brand); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 0.93rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav .btn-sm { margin-left: 8px; }

/* buttons */
.btn {
  display: inline-block; cursor: pointer; border: none;
  background: var(--brand); color: #1a0e02; font-weight: 700;
  padding: 11px 20px; border-radius: 10px; font-size: 0.95rem;
  transition: transform .08s ease, background .15s ease;
}
.btn:hover { background: var(--brand-2); text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--panel); }

/* hero */
.hero { padding: 92px 0 64px; text-align: center; }
.eyebrow { color: var(--brand-2); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em; margin: 0 0 18px; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); margin: 0 0 22px; font-weight: 800; text-wrap: balance; }
.grad { color: var(--brand-2); }
.lede { max-width: 680px; margin: 0 auto 30px; font-size: 1.12rem; color: #cbd5e1; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.validators { margin-top: 42px; color: var(--muted); font-size: 0.85rem; }
.validators span { display: inline-block; margin: 6px 4px 0; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel-2); color: #cbd5e1; }

/* sections */
.section { padding: 76px 0; }
.band { padding: 76px 0; background: linear-gradient(180deg, transparent, rgba(17,24,39,0.5)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding: 10px 0 10px 28px; border-bottom: 1px solid var(--border); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* feature cards */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.card.pro { border-color: #3b2a14; box-shadow: 0 0 0 1px rgba(249,115,22,.15), 0 20px 50px -30px rgba(249,115,22,.5); }
.card h3 { margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.card ul { margin: 0; padding-left: 18px; }
.card li { padding: 4px 0; color: #cbd5e1; }
.tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; background: #1f2937; color: var(--muted); font-weight: 700; }
.tag-pro { background: var(--brand); color: #1a0e02; }

/* languages */
.lang-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.lang { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; }
.lang span { display: block; font-weight: 700; font-size: 1.05rem; }
.lang small { color: var(--muted); }
.muted-lang { opacity: .5; }

/* code tabs */
.tabs { margin-top: 36px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel-2); }
.tab-bar { display: flex; flex-wrap: wrap; gap: 2px; background: #0b1120; border-bottom: 1px solid var(--border); padding: 6px 6px 0; }
.tab { background: transparent; border: none; color: var(--muted); padding: 10px 18px; cursor: pointer; font-size: 0.9rem; font-weight: 600; border-radius: 8px 8px 0 0; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--panel-2); }
.tab-pane { display: none; margin: 0; padding: 24px; overflow-x: auto; font-size: 0.86rem; line-height: 1.7; }
.tab-pane.active { display: block; }
.tab-pane code { color: #d6e2f0; white-space: pre; }

/* syntax highlighting tokens (self-hosted highlight.js) */
.tok-c { color: #5b6b85; font-style: italic; }
.tok-s { color: #9ece6a; }
.tok-n { color: #56b6c2; }
.tok-k { color: #fb923c; }
.tok-t { color: #e5c07b; }
.tok-f { color: #61afef; }

/* pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; align-items: start; }
.price-card { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 30px; }
.price-card.featured { border-color: #3b2a14; box-shadow: 0 0 0 1px rgba(249,115,22,.18), 0 30px 70px -40px rgba(249,115,22,.6); }
.popular { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #1a0e02; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.price-head h3 { margin: 0 0 4px; font-size: 1.3rem; }
.price-amount { margin: 6px 0 4px; font-weight: 800; letter-spacing: -0.02em; }
.price-amount > span:first-child { font-size: 2.2rem; }
.price-amount .per { color: var(--muted); font-size: 1rem; font-weight: 600; margin-left: 4px; }
.price-features { list-style: none; padding: 0; margin: 22px 0; flex: 1; }
.price-features li { padding: 9px 0; border-bottom: 1px solid var(--border); color: #cbd5e1; font-size: 0.92rem; }
.fineprint { color: var(--muted); font-size: 0.82rem; text-align: center; margin: 14px 0 0; }
.buy-error { color: #fca5a5; }

/* faq */
details { border: 1px solid var(--border); border-radius: 12px; padding: 4px 18px; margin: 12px 0; background: var(--panel-2); }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+ "; color: var(--brand); font-weight: 800; }
details[open] summary::before { content: "– "; }
details p { margin: 0 0 16px; color: var(--muted); }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer .muted { flex: 1; min-width: 220px; font-size: 0.9rem; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .grid-2, .feature-grid { grid-template-columns: 1fr; }
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
}

/* ---- accessibility (WCAG 2.2 AA) ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 4px; }
.lede, .muted, .card li, .check-list li, details p { text-wrap: pretty; }

.skip-link {
  position: absolute; left: 12px; top: -48px;
  background: var(--brand); color: #1a0e02; font-weight: 700;
  padding: 9px 16px; border-radius: 8px; z-index: 100;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---- motion: reveal sections on scroll ----
   Hidden state is gated behind .js so content stays visible without JS
   (and in headless renderers); JS adds .js, then toggles .in per section. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1); }
.js .reveal.in { opacity: 1; transform: none; }
/* stagger grid children so they cascade instead of fading as one block */
.js .lang-grid .reveal.in:nth-child(2) { transition-delay: .05s; }
.js .lang-grid .reveal.in:nth-child(3) { transition-delay: .10s; }
.js .lang-grid .reveal.in:nth-child(4) { transition-delay: .15s; }
.js .lang-grid .reveal.in:nth-child(5) { transition-delay: .08s; }
.js .lang-grid .reveal.in:nth-child(6) { transition-delay: .13s; }
.js .lang-grid .reveal.in:nth-child(7) { transition-delay: .18s; }
.js .lang-grid .reveal.in:nth-child(8) { transition-delay: .22s; }
.js .feature-grid .reveal.in:nth-child(2) { transition-delay: .09s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal.in { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
