/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* System font stack renders instantly while Inter loads */
@font-face {
  font-family: "Inter";
  font-display: swap;
}

:root {
  --bg: #06060f;
  --bg-2: #0a0a18;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-h: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-h: rgba(59, 130, 246, 0.5);
  --primary: #3b82f6;
  --primary-b: #60a5fa;
  --primary-d: #1d4ed8;
  --glow: rgba(59, 130, 246, 0.25);
  --glow-b: rgba(59, 130, 246, 0.5);
  --text: #f1f5f9;
  --text-m: #94a3b8;
  --text-d: #475569;
  --green: #34d399;
  --yellow: #fbbf24;
  --red: #f87171;
  --radius: 12px;
  --radius-lg: 20px;
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", monospace;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

::selection {
  background: rgba(59, 130, 246, 0.4);
  color: #fff;
}

/* ── Typography ───────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
a {
  color: inherit;
  text-decoration: none;
}
code {
  font-family: var(--mono);
}
kbd {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.78em;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: 760px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 20px var(--glow);
}
.btn-primary:hover {
  background: var(--primary-b);
  box-shadow: 0 0 35px var(--glow-b);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* ── Gradient Text ────────────────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section Shared ───────────────────────────────────────────────────────── */
.section {
  padding: 100px 0;
}
.section--dark {
  background: var(--bg-2);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-b);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-label::before,
.section-label::after {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--primary);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--text);
  margin-bottom: 16px;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-m);
  max-width: 888px;
  margin-bottom: 64px;
}

/* ── NAV ──────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 0;
  transition:
    background 0.3s,
    backdrop-filter 0.3s,
    border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 6, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}
/* Hex ripple logo */
.logo-hex {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}
.hex-svg {
  display: block;
  overflow: visible; /* allow rings to extend beyond SVG bounds */
}
/* Water ripple — pure CSS, smooth cubic-bezier */
.water-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #3b82f6;
  opacity: 0;
  animation: waterRipple 3.6s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}
.water-ring--1 { animation-delay: 0s; }
.water-ring--2 { animation-delay: 1.2s; }
.water-ring--3 { animation-delay: 2.4s; }
@keyframes waterRipple {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2);   opacity: 0; }
}
.logo-text {
  color: var(--text);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text-m);
  font-weight: 500;
  transition: all 0.2s;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.nav-github {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-github:hover { color: var(--text); }
.nav-github-avatar {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px;
  max-width: 26px;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246,0.35);
  object-fit: cover;
  flex-shrink: 0;
}
.nav-github-icon { opacity: 0.7; }
.nav-github:hover .nav-github-icon { opacity: 1; }

.nav-cta {
  margin-left: 8px;
  padding: 8px 18px;
  font-size: 0.88rem;
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  width: min(800px, 100vw);
  height: 500px;
  background: radial-gradient(
    ellipse at center,
    rgba(59, 130, 246, 0.16) 0%,
    transparent 70%
  );
  pointer-events: none;
  will-change: transform;
  contain: layout style paint;
}
.hero-glow--2 {
  top: 200px;
  width: min(500px, 100vw);
  height: 300px;
  background: radial-gradient(
    ellipse at center,
    rgba(192, 132, 252, 0.07) 0%,
    transparent 70%
  );
}

/* Single centered column */
.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--primary-b);
  margin-bottom: 28px;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1.07;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-m);
  max-width: 888px !important;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.hero-hints {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 50px;
  margin-bottom: 48px;
}
.hint-item {
  font-size: 0.82rem;
  color: var(--text-m);
  font-weight: 500;
}

/* ── Terminal ─────────────────────────────────────────────────────────────── */
.terminal-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
}
.terminal {
  background: rgba(8, 8, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.15),
    0 32px 64px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(59, 130, 246, 0.07);
  text-align: left;
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red {
  background: #ff5f57;
}
.dot-yellow {
  background: #febc2e;
}
.dot-green {
  background: #28c840;
}
.terminal-title {
  margin-left: auto;
  margin-right: auto;
  font-size: 0.78rem;
  color: var(--text-d);
  font-family: var(--mono);
}
.terminal-body {
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.term-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.term-prompt {
  color: var(--primary-b);
  font-weight: 600;
  flex-shrink: 0;
  padding-top: 2px;
}
.term-prompt--local {
  color: var(--green);
}
.term-cmd {
  color: #e2e8f0;
  word-break: break-all;
}
.term-cursor {
  color: var(--primary-b);
  animation: blink 1s step-end infinite;
  display: inline-block;
  width: 0.5ch;
  overflow: hidden;
}
.term-cursor-blink {
  color: var(--green);
  animation: blink 1s step-end infinite;
  display: inline-block;
  width: 0.5ch;
  overflow: hidden;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.term-output {
  padding-left: 0;
  margin-top: 6px;
}
.term-out {
  padding: 1px 0;
  line-height: 1.55;
}
.term-out.dim {
  color: #475569;
}
.term-out.success {
  color: var(--green);
}
.term-out.highlight {
  color: #e2e8f0;
}
.term-out.spacer {
  height: 6px;
}
.term-secret {
  color: var(--primary-b);
}
.term-relay {
  color: var(--green);
}
.term-pass {
  color: var(--yellow);
}
.term-prompt-root {
  color: var(--primary-b);
}
.term-tilde {
  color: var(--text-m);
}

.term-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 12px 0;
}
.hidden {
  display: none !important;
}

.terminal-label {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-d);
}
.tl-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.tl-dot--target {
  background: var(--primary);
}
.tl-dot--op {
  background: var(--green);
}

/* ── Stats Strip ──────────────────────────────────────────────────────────── */
.stats-strip {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.04),
    transparent
  );
}
.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 56px;
  gap: 6px;
}
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
  min-height: 3.5rem;
}
.stat-num {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary-b);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-unit {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-b);
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-d);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Steps ────────────────────────────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition:
    border-color 0.3s,
    transform 0.3s,
    box-shadow 0.3s;
}
.step-card:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(59, 130, 246, 0.08);
}
.step-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  opacity: 0.7;
}
.step-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}
.step-title {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text);
}
.step-desc {
  font-size: 0.9rem;
  color: var(--text-m);
  line-height: 1.65;
  margin-bottom: 18px;
}
.step-code {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--primary-b);
  word-break: break-all;
}

.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--primary);
  font-size: 1.4rem;
  opacity: 0.4;
  padding-top: 80px;
}

.step-tg {
  margin-top: 12px;
}
.tg-bubble {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px 12px 12px 4px;
  padding: 12px 14px;
  font-size: 0.8rem;
}
.tg-bot-name {
  color: var(--primary-b);
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.75rem;
}
.tg-line {
  color: var(--text-m);
  padding: 1px 0;
}
.tg-dim {
  color: var(--text-d);
}
.tg-secret {
  color: var(--primary-b);
}
.tg-pass {
  color: var(--yellow);
}

/* ── Features Grid ────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition:
    border-color 0.3s,
    transform 0.3s,
    box-shadow 0.3s;
}
.feat-card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 25px rgba(59, 130, 246, 0.07);
}
.feat-card--wide {
  grid-column: span 1;
}
.feat-icon-wrap {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feat-icon {
  font-size: 1.4rem;
}
.feat-title {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--text);
}
.feat-desc {
  font-size: 0.88rem;
  color: var(--text-m);
  line-height: 1.65;
  margin-bottom: 14px;
}
.feat-badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.feat-badge {
  padding: 3px 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 50px;
  font-size: 0.72rem;
  color: var(--primary-b);
  font-weight: 500;
}

/* Second row: 2 wide cards */
.features-grid .feat-card:nth-child(4) {
  grid-column: span 1;
}
.features-grid .feat-card:nth-child(5) {
  grid-column: span 1;
}
.features-grid .feat-card:nth-child(6) {
  grid-column: span 1;
}

/* ── Code Blocks ──────────────────────────────────────────────────────────── */
.code-block {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-block--sm pre {
  padding: 14px 16px;
  font-size: 0.78rem;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.code-lang {
  font-size: 0.72rem;
  color: var(--text-d);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-d);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 3px 9px;
  transition: all 0.2s;
  font-family: var(--font);
}
.copy-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}
.copy-btn.copied {
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.3);
}
.copy-icon {
  font-size: 0.9rem;
}

pre {
  padding: 18px 16px;
  overflow-x: auto;
  line-height: 1.7;
}
pre code {
  font-size: 0.83rem;
  color: #e2e8f0;
}

/* Syntax colors */
.c-comment {
  color: #475569;
}
.c-cmd {
  color: #60a5fa;
}
.c-str {
  color: #34d399;
}
.c-var {
  color: #fbbf24;
}

/* ── Install Section ──────────────────────────────────────────────────────── */
.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
.install-grid .install-block:last-child {
  grid-column: span 2;
}
.install-block {
}
.install-step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-b);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.install-note {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-d);
  line-height: 1.6;
}

/* Env table */
.env-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}
.env-title {
  padding: 20px 24px 0;
  font-size: 1rem;
  margin-bottom: 0;
  color: var(--text);
}
.env-table {
  padding: 10px 0;
}
.env-row {
  display: grid;
  grid-template-columns: 220px 80px 1fr;
  gap: 12px;
  padding: 11px 24px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  align-items: center;
}
.env-row:last-child {
  border-bottom: none;
}
.env-row--header {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-d);
  padding-top: 14px;
}
.env-var {
  font-family: var(--mono);
  color: var(--yellow);
  font-size: 0.8rem;
}
.env-default {
  font-family: var(--mono);
  color: var(--text-d);
  font-size: 0.8rem;
}
.env-desc {
  color: var(--text-m);
}

/* ── Docs Grid ────────────────────────────────────────────────────────────── */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition:
    border-color 0.3s,
    transform 0.3s;
}
.doc-card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
}
.doc-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.doc-card-title {
  font-size: 1rem;
  margin-bottom: 8px;
}
.doc-card-desc {
  font-size: 0.87rem;
  color: var(--text-m);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item.open {
  border-color: rgba(59, 130, 246, 0.3);
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  gap: 12px;
  font-family: var(--font);
}
.faq-arrow {
  flex-shrink: 0;
  color: var(--primary-b);
  font-size: 1.1rem;
  transition: transform 0.3s;
}
.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    padding 0.3s;
}
.faq-item.open .faq-a {
  max-height: 300px;
}
.faq-a p {
  padding: 0 20px 18px;
  color: var(--text-m);
  font-size: 0.9rem;
  line-height: 1.7;
}
.faq-a code {
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--primary-b);
}

/* ── CTA Banner ───────────────────────────────────────────────────────────── */
.cta-banner {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, 100vw);
  height: 300px;
  background: radial-gradient(
    ellipse,
    rgba(59, 130, 246, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}
.cta-sub {
  color: var(--text-m);
  font-size: 1.05rem;
  margin-bottom: 32px;
}
.cta-command {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 36px;
  max-width: 100%;
  word-break: break-all;
  text-align: left;
}
.cta-command code {
  font-size: 0.88rem;
  color: var(--primary-b);
}
.copy-btn--cta {
  flex-shrink: 0;
  padding: 6px 12px;
}
.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  margin-bottom: 48px;
}
.footer-tagline {
  color: var(--text-d);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-top: 14px;
  max-width: 300px;
}
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-d);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 0.88rem;
  color: var(--text-m);
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--text);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-d);
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Reveal Animation ─────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .step-arrow {
    transform: rotate(90deg);
    padding: 6px 0;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .install-grid {
    grid-template-columns: 1fr;
  }
  .install-grid .install-block:last-child {
    grid-column: span 1;
  }
  .stat-item {
    padding: 8px 32px;
  }
}

@media (max-width: 768px) {
  /* Nav */
  .nav-links,
  .nav-cta {
    display: none;
  }
  .nav-burger {
    display: flex;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 57px;
    left: 0;
    right: 0;
    background: rgba(6, 6, 15, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 16px 20px 24px;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .nav-links.open li {
    width: 100%;
  }
  .nav-links.open a {
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 1rem;
  }

  /* Sections */
  .section {
    padding: 60px 0;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .section-sub {
    font-size: 0.93rem;
    margin-bottom: 40px;
  }
  .hero {
    padding: 80px 0 48px;
  }
  .hero-title {
    font-size: 2.2rem;
    margin-top: 28px;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .hero-actions .btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
  }

  /* Terminal */
  .terminal-body {
    padding: 14px 14px;
    font-size: 0.74rem;
  }
  .term-cmd {
    font-size: 0.72rem;
    word-break: break-all;
  }

  /* Stats */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .stat-item {
    padding: 16px 12px;
  }
  .stat-num {
    font-size: 2.2rem;
  }
  .stat-divider {
    display: none;
  }
  .stats-grid .stat-item:nth-child(1) {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .stats-grid .stat-item:nth-child(3) {
    border-right: 1px solid var(--border);
  }
  .stats-grid .stat-item:nth-child(5) {
    border-bottom: 1px solid var(--border);
  }

  /* Steps */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .step-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
    text-align: center;
  }
  .step-card {
    padding: 24px 20px;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .feat-card {
    padding: 22px 18px;
  }

  /* Install */
  .install-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .install-grid .install-block:last-child {
    grid-column: span 1;
  }
  pre {
    padding: 14px 12px;
    overflow-x: auto;
  }
  pre code {
    font-size: 0.76rem;
  }

  /* Env table */
  .env-table-wrap {
    overflow-x: auto;
  }
  .env-row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 12px 16px;
  }
  .env-row--header {
    display: none;
  }
  .env-default {
    display: none;
  }
  .env-var {
    font-size: 0.78rem;
  }
  .env-desc {
    color: var(--text-m);
    font-size: 0.82rem;
  }

  /* Docs */
  .docs-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .doc-card {
    padding: 22px 18px;
  }

  /* CTA */
  .cta-banner {
    padding: 64px 0;
  }
  .cta-command {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    text-align: left;
    padding: 14px 14px;
  }
  .cta-command code {
    font-size: 0.78rem;
    word-break: break-all;
  }
  .copy-btn--cta {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
  .cta-actions .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 16px;
  }
  .hero-title {
    font-size: 2rem;
  }
  .terminal-body {
    padding: 12px 10px;
    font-size: 0.68rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-num {
    font-size: 2rem;
  }
  .footer-links-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile overrides (patch on top) ────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    padding: 80px 0 52px;
  }
  .hero-title {
    font-size: 2.1rem;
    margin-top: 24px;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }

  /* Buttons: stacked, full width */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 300px;
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Hints: drop the pill shape, stack vertically, left-align */
  .hero-hints {
    flex-direction: column;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 14px;
    width: 100%;
    max-width: 300px;
    align-items: flex-start;
    margin-bottom: 36px;
  }
  .hint-item {
    font-size: 0.85rem;
    color: var(--text-m);
  }

  /* Stats: 3 equal columns on one row */
  .stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .stat-divider {
    display: none !important;
  }
  .stat-item {
    padding: 16px 6px !important;
  }
  .stat-num {
    font-size: 1.8rem !important;
  }
  .stat-label {
    font-size: 0.62rem !important;
    letter-spacing: 0.05em !important;
  }
  /* Reset old nth-child borders, add new ones for 3-col */
  .stats-grid .stat-item:nth-child(1) {
    border-right: 1px solid var(--border) !important;
    border-bottom: none !important;
  }
  .stats-grid .stat-item:nth-child(3) {
    border-right: 1px solid var(--border) !important;
  }
  .stats-grid .stat-item:nth-child(5) {
    border-bottom: none !important;
  }

  /* Terminal font */
  .terminal-body {
    font-size: 0.75rem !important;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 1.85rem !important;
  }
  .hero-actions,
  .hero-hints {
    max-width: 100% !important;
  }
  .stat-num {
    font-size: 1.5rem !important;
  }
  .stat-label {
    font-size: 0.58rem !important;
  }
  .terminal-body {
    font-size: 0.68rem !important;
  }
}
