/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:          #0a0a0f;
  --surface:     #111118;
  --border:      #1e1e2e;
  --border-glow: rgba(99,102,241,0.25);
  --accent:      #6366f1;
  --accent-lt:   #818cf8;
  --violet:      #7c3aed;
  --text:        #f1f5f9;
  --muted:       #64748b;
  --allow:       #22c55e;
  --challenge:   #f59e0b;
  --block:       #ef4444;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset / base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }

/* ── Gradient text ────────────────────────────────────────────────────────── */
.grad {
  background: linear-gradient(135deg, var(--accent), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── ────────────────────────────── NAVBAR ──────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2rem;
  transition: padding .3s, background .3s, backdrop-filter .3s;
}
.navbar.scrolled {
  padding: .75rem 2rem;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.2rem; letter-spacing: -.3px;
}
.nav-logo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  color: var(--muted); font-size: .9rem; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--accent); color: #fff; border: none;
  padding: .55rem 1.2rem; border-radius: 9999px;
  font-size: .875rem; font-weight: 600;
  transition: background .2s, transform .1s;
}
.nav-cta:hover { background: var(--accent-lt); transform: translateY(-1px); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }

/* Mobile nav */
.mobile-nav {
  display: none; position: fixed; inset: 0; top: 64px; z-index: 99;
  background: rgba(10,10,15,.96); backdrop-filter: blur(16px);
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  padding: 2rem;
}
.mobile-nav a { font-size: 1.5rem; font-weight: 600; color: var(--text); }
.mobile-nav.open { display: flex; }

/* ── ────────────────────────────── SECTIONS ────────────────────────────── */
section { padding: 6rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700; line-height: 1.2; letter-spacing: -.03em;
  margin-bottom: 1rem;
}
.section-sub { color: var(--muted); max-width: 560px; line-height: 1.7; }

/* ── ────────────────────────────── HERO ────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 8rem 2rem 5rem;
  position: relative; overflow: hidden;
}
.hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  max-width: 1100px; margin: 0 auto; width: 100%;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 600; color: var(--accent-lt);
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  padding: .3rem .75rem; border-radius: 9999px; margin-bottom: 1.25rem;
}
.hero-eyebrow .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--allow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.85); }
}
.hero-h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero-sub {
  font-size: 1.05rem; color: var(--muted); max-width: 480px;
  line-height: 1.75; margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.btn-primary {
  background: var(--accent); color: #fff; border: none;
  padding: .75rem 1.75rem; border-radius: 9999px;
  font-size: .95rem; font-weight: 600;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 0 0 0 rgba(99,102,241,0);
}
.btn-primary:hover {
  background: var(--accent-lt); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99,102,241,.4);
}
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
  padding: .75rem 1.75rem; border-radius: 9999px;
  font-size: .95rem; font-weight: 600;
  transition: border-color .2s, background .2s, transform .1s;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(99,102,241,.08); transform: translateY(-2px); }

/* Stat bar */
.stat-bar { display: flex; gap: 2.5rem; }
.stat-bar .stat { }
.stat-bar .stat-num {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em;
  color: var(--text);
}
.stat-bar .stat-label { font-size: .8rem; color: var(--muted); margin-top: .1rem; }

/* Hero code card */
.hero-code-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(99,102,241,.08);
}
.code-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--border);
}
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 11px; height: 11px; border-radius: 50%; }
.code-dots .d1 { background: #ef4444; }
.code-dots .d2 { background: #f59e0b; }
.code-dots .d3 { background: #22c55e; }
.code-card-live {
  display: flex; align-items: center; gap: 6px;
  font-size: .7rem; font-weight: 600; color: var(--allow);
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--allow); animation: pulse 2s infinite; }
.hero-code-card pre {
  padding: 1.25rem;
  font-size: .8rem; line-height: 1.7;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  overflow-x: auto; color: #94a3b8;
}

/* ── Token syntax ─────────────────────────────────────────────────────────── */
.tok-key  { color: #818cf8; }
.tok-str  { color: #86efac; }
.tok-num  { color: #fcd34d; }
.tok-bool { color: #c084fc; }
.tok-null { color: var(--muted); }
.tok-dec-allow     { color: var(--allow); font-weight: 700; }
.tok-dec-challenge { color: var(--challenge); font-weight: 700; }
.tok-dec-block     { color: var(--block); font-weight: 700; }
.tok-lvl-critical  { color: var(--block); }
.tok-lvl-high      { color: var(--challenge); }
.tok-lvl-low       { color: var(--allow); }

/* ── ─────────────────────────── HOW IT WORKS ───────────────────────────── */
#how-it-works { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 3rem; position: relative; }
.steps::before {
  content: ''; position: absolute; top: 2.25rem; left: calc(16.66% + 1rem); right: calc(16.66% + 1rem);
  height: 1px; background: linear-gradient(90deg, var(--accent) 0%, var(--violet) 100%);
  opacity: .35;
}
.step { padding: 0 2rem; text-align: center; position: relative; }
.step-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.3);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; font-size: 1.25rem;
  transition: background .2s, box-shadow .2s;
}
.step:hover .step-icon { background: rgba(99,102,241,.2); box-shadow: 0 0 16px rgba(99,102,241,.3); }
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.step p { font-size: .875rem; color: var(--muted); line-height: 1.65; }
.step-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: .75rem; }
.chip {
  font-size: .7rem; font-weight: 600; letter-spacing: .04em;
  padding: .2rem .55rem; border-radius: 9999px;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  color: var(--accent-lt);
}

/* ── ──────────────────────────── DETECTIONS ────────────────────────────── */
.detection-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem; margin-top: 3rem;
}
.det-card {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem;
  transition: border-color .25s, box-shadow .25s, transform .2s;
}
.det-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 24px rgba(99,102,241,.1);
  transform: translateY(-2px);
}
.det-card.featured { grid-column: span 2; }
.det-badge {
  display: inline-block; font-size: .65rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .2rem .65rem; border-radius: 9999px; margin-bottom: 1rem;
  background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.3);
  color: var(--accent-lt);
}
.det-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.det-card p { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.65; }
.inj-families { display: flex; flex-wrap: wrap; gap: .35rem; }
.inj-fam {
  font-size: .7rem; padding: .2rem .55rem; border-radius: 6px;
  background: rgba(124,58,237,.12); border: 1px solid rgba(124,58,237,.2);
  color: #c4b5fd;
}
.score-callout {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(99,102,241,.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: .875rem; color: var(--muted); line-height: 1.7;
}
.score-callout strong { color: var(--text); }

/* ── ──────────────────────────── CODE EXAMPLE ──────────────────────────── */
#code-example { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.code-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.code-tab {
  padding: .6rem 1.25rem; font-size: .85rem; font-weight: 600;
  color: var(--muted); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}
.code-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.code-tab:hover:not(.active) { color: var(--text); }
.code-panels { margin-top: 0; }
.code-panel { display: none; }
.code-panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.code-block-wrap {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.code-block-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: .6rem 1rem;
  background: rgba(255,255,255,.03); border-bottom: 1px solid var(--border);
}
.code-block-wrap pre {
  padding: 1.25rem; margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: .78rem; line-height: 1.8; color: #94a3b8;
  overflow-x: auto;
}
.tok-cmd { color: #86efac; }
.tok-flag { color: #c084fc; }
.tok-url  { color: var(--accent-lt); }
.tok-kw   { color: #818cf8; }
.tok-fn   { color: #67e8f9; }
.tok-var  { color: #f1f5f9; }
.tok-comment { color: var(--muted); }

/* ── ────────────────────────────── PRICING ─────────────────────────────── */
.billing-toggle {
  display: flex; align-items: center; justify-content: center;
  gap: .75rem; margin: 1.5rem 0 3rem;
}
.billing-toggle span { font-size: .875rem; color: var(--muted); }
.billing-toggle span.active-bill { color: var(--text); font-weight: 600; }
.toggle-track {
  width: 44px; height: 24px; border-radius: 9999px;
  background: var(--border); position: relative; cursor: pointer; border: none;
  transition: background .2s;
}
.toggle-track.on { background: var(--accent); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.toggle-track.on .toggle-thumb { transform: translateX(20px); }
.save-badge {
  font-size: .7rem; font-weight: 700; letter-spacing: .05em;
  background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.3);
  color: var(--accent-lt); padding: .15rem .5rem; border-radius: 9999px;
}
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; align-items: start;
}
.price-card {
  background: rgba(255,255,255,.025); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem;
  position: relative; transition: transform .2s;
}
.price-card:hover { transform: translateY(-3px); }
.price-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(99,102,241,.18), inset 0 0 0 1px rgba(99,102,241,.15);
  transform: scale(1.02);
}
.price-card.popular:hover { transform: scale(1.02) translateY(-3px); }
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; padding: .3rem .9rem; border-radius: 9999px;
  white-space: nowrap;
}
.price-name { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-lt); margin-bottom: .5rem; }
.price-amount { display: flex; align-items: baseline; gap: .2rem; margin: .75rem 0 .25rem; }
.price-dollar { font-size: 1.5rem; font-weight: 700; color: var(--muted); }
.price-num { font-size: 3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.price-period { font-size: .875rem; color: var(--muted); }
.price-sub { font-size: .82rem; color: var(--muted); margin-bottom: 1.5rem; min-height: 2.4rem; }
.price-btn {
  width: 100%; padding: .7rem; border-radius: 9999px;
  font-size: .875rem; font-weight: 700; border: none;
  transition: all .2s; margin-bottom: 1.75rem;
}
.price-btn.filled { background: var(--accent); color: #fff; }
.price-btn.filled:hover { background: var(--accent-lt); box-shadow: 0 8px 24px rgba(99,102,241,.4); }
.price-btn.outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.price-btn.outline:hover { border-color: var(--accent); background: rgba(99,102,241,.08); }
.price-note { font-size: .72rem; color: var(--muted); text-align: center; margin-bottom: 1.5rem; }
.price-divider { border: none; border-top: 1px solid var(--border); margin-bottom: 1.25rem; }
.price-features { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.price-features li {
  display: flex; align-items: flex-start; gap: .5rem;
  font-size: .82rem; color: var(--muted); line-height: 1.5;
}
.price-features li .check { color: var(--allow); flex-shrink: 0; margin-top: 2px; }
.price-features li .dash  { color: var(--border); flex-shrink: 0; margin-top: 2px; }
.price-features li strong { color: var(--text); }

/* Feature comparison table */
.compare-wrap { margin-top: 3rem; overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.compare-table th {
  padding: .75rem 1rem; text-align: center; font-weight: 700;
  color: var(--text); border-bottom: 1px solid var(--border);
}
.compare-table th:first-child { text-align: left; color: var(--muted); }
.compare-table td {
  padding: .7rem 1rem; text-align: center; color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.compare-table td:first-child { text-align: left; }
.compare-table tr:hover td { background: rgba(255,255,255,.02); }
.t-yes { color: var(--allow); }
.t-no  { color: var(--border); }
.t-partial { color: var(--challenge); }

/* ── ────────────────────────────── TRUST BAND ──────────────────────────── */
.trust-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 2rem;
}
.trust-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 4rem; align-items: center;
}
.trust-copy h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.trust-copy p  { font-size: .875rem; color: var(--muted); max-width: 480px; line-height: 1.7; }
.trust-stats   { display: flex; gap: 3rem; }
.trust-stat .ts-num { font-size: 2rem; font-weight: 800; }
.trust-stat .ts-label { font-size: .75rem; color: var(--muted); }

/* ── ─────────────────────────────── FOOTER ─────────────────────────────── */
footer {
  padding: 4rem 2rem 2rem;
  border-top: 1px solid var(--border);
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-brand p { font-size: .875rem; color: var(--muted); margin-top: .5rem; max-width: 240px; line-height: 1.65; }
.footer-col h4 { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-col ul li a { font-size: .875rem; color: var(--muted); transition: color .2s; }
.footer-col ul li a:hover { color: var(--text); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  font-size: .78rem; color: var(--muted);
}
.footer-bottom a { color: var(--muted); transition: color .2s; }
.footer-bottom a:hover { color: var(--text); }
.footer-tech { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.footer-tech .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--border); flex-shrink: 0; }

/* ── ─────────────────────────── SCROLL REVEAL ──────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── ──────────────────────────── RESPONSIVE ────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-code-card { max-width: 520px; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .step { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: none; }
  .det-card.featured { grid-column: span 1; }
  .code-panel.active { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .price-card.popular { transform: none; }
  .trust-inner { grid-template-columns: 1fr; gap: 2rem; }
  .trust-stats { gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 600px) {
  section { padding: 4rem 1rem; }
  .hero-h1 { font-size: 2.2rem; }
  .stat-bar { gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}

/* ── ────────────────────────────── SCROLLBAR ───────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
