:root {
  color-scheme: dark;
  --bg: #0a0f1a;
  --bg-alt: #0e1424;
  --panel: #131b2e;
  --panel-hover: #182240;
  --border: #1e2d4a;
  --border-bright: #2a3f66;
  --text: #e8edf6;
  --text-bright: #ffffff;
  --muted: #8899b8;
  --accent: #4ade80;
  --accent-dim: #22c55e;
  --accent-bg: rgba(74, 222, 128, 0.08);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.1);
  --orange: #fb923c;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
}

* { box-sizing: border-box; margin: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
}

/* ─── Header ─────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(10, 15, 26, 0.8);
  border-bottom: 1px solid var(--border);
  overflow: visible;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  position: relative;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Exo 2', var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 101;
}

/* ─── Desktop nav ────────────────────────────── */

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.15s;
}

.nav-link:hover { color: var(--text); }

/* ─── Hamburger ──────────────────────────────── */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Mobile menu ────────────────────────────── */

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  flex-direction: column;
  gap: 0.2rem;
  z-index: 99;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--text); }

.mobile-menu .button-primary {
  color: #0a1a10;
  font-weight: 700;
  border: none;
}

/* ─── Buttons ────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.3rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}

.button-sm { padding: 0.5rem 1rem; font-size: 0.82rem; }
.button-lg { padding: 0.85rem 1.6rem; font-size: 0.95rem; }

.button-primary {
  background: var(--accent);
  color: #0a1a10;
  border-color: transparent;
}
.button-primary:hover { background: var(--accent-dim); }
.button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.button-secondary {
  background: var(--panel);
  border-color: var(--border-bright);
}
.button-secondary:hover { background: var(--panel-hover); }

.button-ghost {
  border-color: var(--border-bright);
  color: var(--muted);
}
.button-ghost:hover { color: var(--text); border-color: var(--muted); }

/* ─── Hero ───────────────────────────────────── */

.hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--accent-bg);
  border: 1px solid rgba(74, 222, 128, 0.15);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 720px;
  margin: 0 auto 1.2rem;
  font-family: 'Exo 2', var(--font);
}

.lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ─── Attack strip ───────────────────────────── */

.attack-strip {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.attack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.attack-card {
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.attack-card.blocked {
  background: var(--red-bg);
  border-color: rgba(248, 113, 113, 0.15);
}

.attack-card.safe {
  background: var(--accent-bg);
  border-color: rgba(74, 222, 128, 0.15);
}

.attack-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.attack-card.blocked .attack-status { color: var(--red); }
.attack-card.safe .attack-status { color: var(--accent); }

.attack-card code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-bright);
  display: block;
  margin-bottom: 0.6rem;
}

.attack-tag {
  font-size: 0.75rem;
  color: var(--muted);
}

.attack-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1.2rem;
}

/* ─── Sections ───────────────────────────────── */

.section { padding: 4.5rem 0; }
.section-dark { background: var(--bg-alt); }

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

/* ─── Steps grid ─────────────────────────────── */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.step-card {
  padding: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.step-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ─── Code + split ───────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.contact-layout {
  max-width: 760px;
}

.contact-layout .form-stack {
  max-width: none;
  margin: 0;
}

.contact-layout .lede {
  margin: 0 0 2rem;
  text-align: left;
}

.api-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.badge {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
}

.code-block {
  background: #0d1520;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-comment { color: #5a6a85; }
.code-keyword { color: #c4b5fd; }
.code-fn { color: #67e8f9; }
.code-str { color: #4ade80; }
.code-num { color: #fb923c; }

.muted { color: var(--muted); }

/* ─── CTA ────────────────────────────────────── */

.cta-section {
  text-align: center;
  padding: 5rem 0;
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
}

.cta-inner h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
}

.cta-inner .muted {
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* ─── Footer ─────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}

.site-footer p {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ─── Form styles ────────────────────────────── */

.form-stack {
  display: grid;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.form-status {
  min-height: 1.5rem;
  margin: 0;
}

.form-status.is-error {
  color: #fca5a5;
}

.form-status.is-success {
  color: var(--accent);
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

input, textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  transition: border-color 0.15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

textarea { resize: vertical; min-height: 100px; }

.result-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  min-height: 200px;
}

.result-safe { border-color: rgba(74, 222, 128, 0.3); }
.result-blocked { border-color: rgba(248, 113, 113, 0.3); }

pre {
  margin: 0;
  padding: 1rem;
  border-radius: 12px;
  background: #0d1520;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-row input { width: auto; }

/* ─── Eyebrow ────────────────────────────────── */

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ─── Responsive ─────────────────────────────── */

@media (max-width: 700px) {
  .hero { padding: 3.5rem 0 2rem; }
  .section { padding: 3rem 0; }
  .nav { padding: 0.8rem 0; }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  .split { grid-template-columns: 1fr; }

  .attack-grid { grid-template-columns: 1fr; }

  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .button { width: 100%; max-width: 280px; }
}
