@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --bg: #08080f;
  --surface: #0e0e1a;
  --surface-2: #141428;
  --surface-3: #1a1a35;
  --border: #1e1e38;
  --border-dim: #141428;

  --primary: #0e9fc5;
  --primary-light: #22d3ee;
  --primary-dim: rgba(34, 211, 238, 0.1);
  --primary-glow: rgba(34, 211, 238, 0.25);

  --text: #e2e8f0;
  --text-muted: #8892a4;
  --text-dim: #2e3550;

  --green: #4ade80;
  --yellow: #fbbf24;
  --red: #f87171;
  --cyan: #22d3ee;
  --orange: #fb923c;

  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --trans: 180ms var(--ease);

  --mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--primary-light);
  text-decoration: none;
}

a:hover {
  color: #fff;
}

/* ── Nav ─────────────────────────────────────── */

#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    background var(--trans),
    border-color var(--trans),
    backdrop-filter var(--trans);
}

#nav.scrolled {
  background: rgba(8, 8, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.nav-logo span {
  color: var(--primary-light);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--trans);
}

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

.nav-cta {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  transition:
    border-color var(--trans),
    background var(--trans);
}

.nav-cta:hover {
  border-color: var(--primary-light);
  background: var(--primary-dim);
  color: var(--text);
}

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

.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 100px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 50% at 50% -10%,
    rgba(34, 211, 238, 0.12),
    transparent 70%
  );
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-dim) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black, transparent);
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at 50% 0%,
    black,
    transparent
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--primary-light);
  background: var(--primary-dim);
  border: 1px solid rgba(34, 211, 238, 0.2);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-light);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

.hero h1 {
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 800;
  letter-spacing: -3px;
  background: linear-gradient(135deg, #f1f5f9 0%, #67e8f9 55%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-command {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 0.95rem;
  margin-bottom: 48px;
  position: relative;
}

.hero-command code {
  color: var(--primary-light);
}

/* ── Stats strip ─────────────────────────────── */

.stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 8px;
}

.stat {
  padding: 0 32px;
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #f1f5f9 30%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

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

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}

.btn {
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--trans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background: #0891b2;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary-light);
  background: var(--primary-dim);
  color: var(--text);
}

/* ── Copy buttons ────────────────────────────── */

.code-block {
  position: relative;
}

.code-block code,
.code-block pre {
  padding-right: 72px;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--sans);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--trans);
  opacity: 0;
}

.code-block:hover .copy-btn,
.hero-command .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--primary-light);
}

.copy-btn.copied {
  color: var(--green);
  border-color: var(--green);
}

/* ── Scroll reveal ───────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 500ms var(--ease),
    transform 500ms var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

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

section:not(.hero) {
  border-top: 1px solid var(--border);
  padding: 80px 24px;
  scroll-margin-top: 64px;
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary-light);
  margin-bottom: 10px;
}

section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 48px;
}

/* ── Feature cards ───────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card {
  background: var(--surface);
  padding: 28px;
  transition:
    background var(--trans),
    transform var(--trans),
    box-shadow var(--trans);
}

.feature-card:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--primary-glow);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-desc code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--primary-light);
}

/* ── Code blocks ─────────────────────────────── */

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.7;
}

code {
  font-family: var(--mono);
  font-size: 0.875rem;
}

.comment {
  color: var(--text-dim);
}

.cmd {
  color: var(--primary-light);
}

.output {
  color: var(--green);
}

.out-warn {
  color: var(--yellow);
}

.out-err {
  color: var(--red);
}

/* ── CLI reference ───────────────────────────── */

.cli-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cli-row {
  display: grid;
  grid-template-columns: minmax(220px, auto) 1fr;
  gap: 24px;
  align-items: start;
  background: var(--surface);
  padding: 16px 24px;
  transition: background var(--trans);
}

.cli-row:hover {
  background: var(--surface-2);
}

.cli-cmd {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--primary-light);
}

.cli-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Config table ────────────────────────────── */

.config-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.config-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.config-wrap tr:hover td {
  background: var(--surface-2);
}

.config-wrap th {
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.config-wrap td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.config-wrap tr:last-child td {
  border-bottom: none;
}

.config-key {
  font-family: var(--mono);
  color: var(--primary-light);
}

.config-default {
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ── Examples ────────────────────────────────── */

.examples-stack {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.example-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.example-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.term-window {
  background: #090909;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.65;
}

.term-bar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  display: flex;
  gap: 7px;
  align-items: center;
}

.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.term-dot.r {
  background: #ff5f56;
}

.term-dot.y {
  background: #ffbd2e;
}

.term-dot.g {
  background: #27c93f;
}

.term-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.term-body-pre {
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.65;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text);
  margin: 0;
  overflow-x: auto;
}

.term-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 1.3em;
}

.term-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
  opacity: 0.5;
}

.term-spacer {
  height: 0.6em;
}

.tc-green {
  color: #4ade80;
}

.tc-red {
  color: #f87171;
}

.tc-orange {
  color: #fb923c;
}

.tc-blue {
  color: #60a5fa;
}

.tc-yellow {
  color: #fde047;
}

.tc-gray {
  color: #6b7280;
}

.tc-cyan {
  color: #22d3ee;
}

.tc-white {
  color: #e2e8f0;
}

.tc-bold {
  font-weight: 700;
}

.tc-dim {
  opacity: 0.38;
}

.tc-italic {
  font-style: italic;
}

.tc-under {
  text-decoration: underline;
}

.tc-badge {
  display: inline-block;
  padding: 0 5px;
  font-weight: 600;
  font-size: 0.76rem;
  border-radius: 2px;
  line-height: 1.5;
  flex-shrink: 0;
}

.tc-badge.success {
  background: #4ade80;
  color: #000;
}

.tc-badge.error {
  background: #f87171;
  color: #fff;
}

.tc-badge.warning {
  background: #fb923c;
  color: #000;
}

.tc-badge.info {
  background: #60a5fa;
  color: #fff;
}

.tc-badge.primary {
  background: #fde047;
  color: #000;
}

.tc-badge.muted {
  background: #585858;
  color: #fff;
}

.tc-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 600;
  flex-shrink: 0;
}

.tc-pill-cap {
  opacity: 0.85;
}

.tc-pill-inner {
  display: inline-block;
  padding: 0 4px;
}

.tc-pill.success .tc-pill-cap {
  color: #4ade80;
}

.tc-pill.success .tc-pill-inner {
  background: #4ade80;
  color: #000;
}

.tc-pill.error .tc-pill-cap {
  color: #f87171;
}

.tc-pill.error .tc-pill-inner {
  background: #f87171;
  color: #fff;
}

.tc-pill.warning .tc-pill-cap {
  color: #fb923c;
}

.tc-pill.warning .tc-pill-inner {
  background: #fb923c;
  color: #000;
}

.tc-pill.info .tc-pill-cap {
  color: #60a5fa;
}

.tc-pill.info .tc-pill-inner {
  background: #60a5fa;
  color: #fff;
}

.tc-pill.primary .tc-pill-cap {
  color: #fde047;
}

.tc-pill.primary .tc-pill-inner {
  background: #fde047;
  color: #000;
}

.tc-pill.muted .tc-pill-cap {
  color: #585858;
}

.tc-pill.muted .tc-pill-inner {
  background: #585858;
  color: #fff;
}

.tc-progress-filled {
  color: #22d3ee;
}

.tc-progress-empty {
  color: #374151;
}

.tc-progress-pct {
  color: #6b7280;
  margin-left: 6px;
}

.tc-table {
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
}

.tc-table td {
  padding: 2px 10px;
  white-space: nowrap;
}

.tc-table td:first-child {
  padding-left: 0;
}

.tc-table .tc-table-border {
  color: #6b7280;
  padding: 0;
  user-select: none;
}

.tc-table thead td {
  font-weight: 700;
}

.tc-input-cursor {
  display: inline-block;
  width: 7px;
  height: 1.1em;
  background: var(--text);
  opacity: 0.8;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 1px;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .example-item {
    grid-template-columns: 1fr;
  }
}

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

footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-name {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--trans);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

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

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .cli-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .stats {
    gap: 8px;
  }

  .stat {
    padding: 0 20px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

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

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .stat-divider {
    display: none;
  }
}
