:root {
  --bg: #0a0d14;
  --bg-elev: #0e131c;
  --surface: #131a26;
  --surface-2: #182131;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e7ecf5;
  --muted: #8a94a7;
  --muted-2: #5f6a7d;
  --brand: #7cf7d3;
  --brand-2: #8aa4ff;
  --danger: #ff8a8a;
  --success: #7cf7d3;
  --warn: #ffd28a;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 8px 24px rgba(0, 0, 0, 0.35);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  --container: 1120px;
  --step-1: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  --step-2: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
  --step-3: clamp(1.4rem, 1.2rem + 1vw, 1.75rem);
  --step-4: clamp(1.8rem, 1.4rem + 2vw, 2.5rem);
  --step-5: clamp(2.4rem, 1.8rem + 3vw, 3.6rem);
}

* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
  scroll-behavior: smooth;
}
html, body {
  margin: 0;
  padding: 0;
}
body {
  background: radial-gradient(1200px 800px at 15% -10%, rgba(138, 164, 255, 0.14), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(124, 247, 211, 0.09), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover { color: #b3fbe3; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 6px;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step-5); letter-spacing: -0.03em; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); }

p { margin: 0 0 1em; color: #cfd7e6; }
p.lead { color: #dae2f0; font-size: var(--step-2); max-width: 60ch; }

code, kbd, pre, samp { font-family: var(--font-mono); font-size: 0.92em; }
code { background: rgba(255,255,255,0.06); padding: 0.1em 0.35em; border-radius: 6px; color: #e7ecf5; }
pre {
  background: linear-gradient(180deg, #0c1220 0%, #0a0f1a 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow: auto;
  color: #cfd7e6;
  box-shadow: var(--shadow-soft);
}
pre code { background: transparent; padding: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 2vw, 1.5rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #08111a;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-weight: 600;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; z-index: 1000; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 13, 20, 0.72);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  color: #fff;
  letter-spacing: -0.01em;
}
.brand:hover { color: #fff; opacity: 0.9; }
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: conic-gradient(from 200deg, var(--brand), var(--brand-2), var(--brand));
  box-shadow: 0 4px 16px rgba(124, 247, 211, 0.25);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute; inset: 4px;
  border-radius: 4px;
  background: #0a0d14;
}
.brand-mark::before {
  content: "";
  position: absolute; inset: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-left: 1.5rem;
  flex: 1;
}
.nav-links a {
  color: var(--muted);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-links a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.06); }

.nav-cta { display: inline-flex; gap: 0.5rem; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #08111a;
  box-shadow: 0 6px 20px rgba(124, 247, 211, 0.18);
}
.btn-primary:hover { color: #041018; filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255,255,255,0.04); color: #fff; }
.btn-sm { padding: 0.45rem 0.75rem; font-size: 0.85rem; border-radius: 8px; }
.btn-lg { padding: 0.8rem 1.15rem; font-size: 1rem; border-radius: 12px; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 1.1rem;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(124, 247, 211, 0.18);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(124, 247, 211, 0.18); }
  50% { box-shadow: 0 0 0 5px rgba(124, 247, 211, 0.06); }
}
.hero h1 span.grad {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}
.hero-trust {
  margin-top: 2rem;
  color: var(--muted-2);
  font-size: 0.85rem;
}
.hero-trust ul {
  display: flex;
  gap: 1.5rem;
  padding: 0; margin: 0.6rem 0 0;
  list-style: none;
  flex-wrap: wrap;
}
.hero-trust li {
  font-family: var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Terminal window */
.terminal {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #0d1420 0%, #0a1018 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.02) inset;
  transform: translateZ(0);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.terminal-bar .dots {
  display: inline-flex; gap: 6px;
}
.terminal-bar .dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: #2a3345;
}
.terminal-bar .dots span:nth-child(1) { background: #ff6a6a; }
.terminal-bar .dots span:nth-child(2) { background: #ffd28a; }
.terminal-bar .dots span:nth-child(3) { background: #7cf7d3; }
.terminal-bar .title {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-left: 0.4rem;
}
.terminal-body {
  padding: 1rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: #cfd7e6;
  white-space: pre;
  overflow-x: auto;
}
.tok-c { color: var(--muted-2); }        /* comment */
.tok-k { color: #ffb4ff; }               /* keyword */
.tok-s { color: var(--brand); }          /* string */
.tok-p { color: var(--brand-2); }        /* property */
.tok-n { color: #ffd28a; }               /* number */
.tok-fn { color: #b6c8ff; }              /* function */
.tok-prompt { color: var(--brand); }
.caret {
  display: inline-block;
  width: 8px; height: 1.05em;
  vertical-align: -0.15em;
  background: var(--brand);
  margin-left: 2px;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section-header { max-width: 720px; margin-bottom: 2rem; }
.section-header .kicker {
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.divider {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 0;
}

/* Feature grid */
.grid {
  display: grid;
  gap: 1rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card .icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(124, 247, 211, 0.08);
  border: 1px solid rgba(124, 247, 211, 0.2);
  color: var(--brand);
  margin-bottom: 0.9rem;
}
.card .icon svg { width: 20px; height: 20px; }
.card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Split code + text */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,0.02);
}
.stat .num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.stat .lbl {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.price-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
}
.price-card.highlight {
  border-color: rgba(124, 247, 211, 0.35);
  box-shadow: 0 0 0 1px rgba(124, 247, 211, 0.15), 0 10px 40px rgba(124, 247, 211, 0.08);
}
.price-card .tag {
  position: absolute;
  top: -10px; right: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #08111a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.price-card h3 { margin-bottom: 0.2rem; }
.price-card .price {
  margin: 0.6rem 0 1rem;
  font-family: var(--font-mono);
  color: #fff;
}
.price-card .price .amt { font-size: 2rem; }
.price-card .price .per { color: var(--muted); font-size: 0.9rem; }
.price-card ul {
  list-style: none;
  padding: 0; margin: 0 0 1.4rem;
  display: grid;
  gap: 0.55rem;
}
.price-card li {
  display: flex; align-items: flex-start; gap: 0.5rem;
  color: #cfd7e6; font-size: 0.94rem;
}
.price-card li::before {
  content: "";
  width: 16px; height: 16px;
  border-radius: 4px;
  background: rgba(124, 247, 211, 0.12);
  border: 1px solid rgba(124, 247, 211, 0.3);
  margin-top: 3px;
  flex-shrink: 0;
  position: relative;
}
.price-card li::after {
  content: "";
  position: absolute;
  width: 6px; height: 3px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
  margin-left: 4px;
  margin-top: 6px;
}
.price-card .cta { margin-top: auto; }

/* CTA banner */
.cta-banner {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  background:
    radial-gradient(600px 200px at 90% 0%, rgba(138,164,255,0.16), transparent 60%),
    radial-gradient(600px 200px at 0% 100%, rgba(124,247,211,0.12), transparent 60%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cta-banner h2 { margin: 0; font-size: var(--step-3); }
.cta-banner p { margin: 0.3rem 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  color: var(--muted);
  background: rgba(0,0,0,0.15);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer-grid a { color: #cfd7e6; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem;
  color: var(--muted-2);
  flex-wrap: wrap; gap: 0.5rem;
}

/* ---------- Docs ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}
.docs-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  border-right: 1px solid var(--border);
  padding-right: 1rem;
}
.docs-sidebar nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.2rem; }
.docs-sidebar h4 {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 1rem 0 0.4rem;
}
.docs-sidebar a {
  display: block;
  color: var(--muted);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.92rem;
}
.docs-sidebar a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.docs-sidebar a.active { color: #fff; background: rgba(255,255,255,0.06); }
.docs-content h2 { margin-top: 2.4rem; }
.docs-content h2:first-child { margin-top: 0; }
.docs-content h3 { margin-top: 1.6rem; font-size: 1.15rem; }
.docs-content ul { color: #cfd7e6; }
.callout {
  border-left: 3px solid var(--brand);
  background: rgba(124, 247, 211, 0.06);
  padding: 0.9rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
  color: #cfd7e6;
}
.callout.warn { border-left-color: var(--warn); background: rgba(255, 210, 138, 0.05); }
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
th { color: #fff; font-weight: 600; }
td code { font-size: 0.85em; }

/* ---------- Forms ---------- */
.form {
  display: grid;
  gap: 1rem;
  max-width: 560px;
}
.field { display: grid; gap: 0.35rem; }
.field label { color: #cfd7e6; font-size: 0.9rem; font-weight: 500; }
.field .hint { color: var(--muted-2); font-size: 0.8rem; }
.field .required { color: var(--brand); }
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-2);
  background: rgba(255,255,255,0.05);
  outline: none;
}
/* Native <option> popups render on OS-default surfaces; force high-contrast colors. */
.field select option { background-color: #0f1420; color: #e6ecf5; }
.field select option:disabled { color: #8a94a7; }
.field textarea { min-height: 140px; resize: vertical; }
.field.checkbox { grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; }
.field.checkbox input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 3px; }
.field.checkbox label { font-size: 0.9rem; color: #cfd7e6; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .error {
  color: var(--danger);
  font-size: 0.82rem;
  min-height: 1em;
}

.form-status {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.03);
  color: #cfd7e6;
  font-size: 0.92rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.success { border-color: rgba(124, 247, 211, 0.4); background: rgba(124,247,211,0.06); color: #d7fbee; }
.form-status.error { border-color: rgba(255, 138, 138, 0.4); background: rgba(255,138,138,0.06); color: #ffd6d6; }

.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(8,17,26,0.25);
  border-top-color: #08111a;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn[disabled] { opacity: 0.75; cursor: progress; }

/* Two-col contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-info h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.contact-info h3:first-child { margin-top: 0; }
.contact-info ul { color: #cfd7e6; padding-left: 1.2rem; margin: 0.4rem 0 0.8rem; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .caret, .eyebrow .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .pricing { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .split, .contact-layout { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 0 0 1rem;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: rgba(10, 13, 20, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1rem 1rem;
    flex-direction: column;
    gap: 0.1rem;
    margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 0.8rem; border-radius: 8px; }
  .nav-cta .btn-ghost { display: none; }
  .grid-3, .grid-2, .pricing { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.3rem; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .terminal-body { font-size: 0.8rem; }
}
