:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-card: #141414;
  --border-primary: #222222;
  --border-hover: #00d4aa;
  --text-primary: #e0e0e0;
  --text-secondary: #999999;
  --text-muted: #666666;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --accent-glow: rgba(0, 212, 170, 0.3);
  --code-bg: #0d0d0d;
  --danger: #ff6b6b;
  --success: #00d4aa;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Consolas', monospace;
  --max-width: 1200px;
  --nav-height: 64px;
  --radius: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

code, pre {
  font-family: var(--font-mono);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── NAV ───────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-primary);
  z-index: 1000;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-github {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s;
}

.nav-github:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
  opacity: 1;
}

.nav-github svg {
  width: 18px;
  height: 18px;
}

.nav-links .nav-github {
  display: none;
}

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

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── HERO ──────────────────────────────────────────── */

.hero {
  padding: calc(var(--nav-height) + 80px) 0 80px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin: 0 auto 20px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}

.btn-primary:hover {
  opacity: 1;
  box-shadow: 0 0 24px var(--accent-glow);
}

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

.btn-secondary:hover {
  border-color: var(--text-muted);
  opacity: 1;
}

.hero-terminal {
  max-width: 680px;
  margin: 0 auto 48px;
  background: var(--code-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-primary);
}

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.8;
  overflow-x: auto;
}

.terminal-body .prompt {
  color: var(--accent);
}

.terminal-body .cmd {
  color: var(--text-primary);
}

.terminal-body .output {
  color: var(--text-muted);
}

.terminal-body .success {
  color: var(--accent);
}

.terminal-body .file {
  color: #e8a838;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ─── SECTIONS ──────────────────────────────────────── */

section {
  padding: 96px 0;
}

section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

.section-header {
  margin-bottom: 56px;
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-subtitle {
  margin: 0 auto;
}

/* ─── PROBLEM ───────────────────────────────────────── */

.problem-text {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.8;
}

.problem-text strong {
  color: var(--text-primary);
}

/* ─── FEATURES GRID ─────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 32px rgba(0, 212, 170, 0.06);
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 1.125rem;
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── HOW IT WORKS ──────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(33.33% - 16px);
  right: calc(33.33% - 16px);
  height: 2px;
  background: var(--border-primary);
}

.step {
  text-align: center;
}

.step-number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}

.step h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.step p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-code {
  margin-top: 16px;
  background: var(--code-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: left;
  overflow-x: auto;
}

.step-code .kw {
  color: var(--accent);
}

/* ─── AGENT TABLE ───────────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
}

.agent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.agent-table th,
.agent-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-primary);
  white-space: nowrap;
}

.agent-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.agent-table tr:last-child td {
  border-bottom: none;
}

.agent-table td:first-child {
  font-weight: 600;
  color: var(--accent);
}

.agent-table code {
  background: var(--bg-tertiary);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8125rem;
  color: var(--text-primary);
}

/* ─── INSTALL ───────────────────────────────────────── */

.install-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.install-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.install-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.install-card .install-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.code-block {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  padding: 14px 16px;
  padding-right: 48px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-primary);
  overflow-x: auto;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

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

.copy-btn svg {
  width: 14px;
  height: 14px;
}

/* ─── CLI REFERENCE ─────────────────────────────────── */

.cli-list {
  display: grid;
  gap: 4px;
  max-width: 840px;
}

.cli-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.cli-row:hover {
  background: var(--bg-tertiary);
}

.cli-cmd {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

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

/* ─── FOOTER ────────────────────────────────────────── */

.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-primary);
  background: var(--bg-primary);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-left a {
  color: var(--text-secondary);
}

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

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

/* ─── FADE-IN ───────────────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ────────────────────────────────────── */

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-primary);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-github-desktop {
    display: none;
  }

  .nav-links .nav-github {
    display: flex;
  }

  .hero {
    padding: calc(var(--nav-height) + 48px) 0 48px;
  }

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

  .hero-stats {
    gap: 32px;
  }

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

  section {
    padding: 64px 0;
  }

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

  .agent-table th,
  .agent-table td {
    padding: 10px 14px;
    font-size: 0.8125rem;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}
