/* ===== CSS Variables ===== */
:root {
  --bg: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --bg-hover: #1c1c28;
  --text: #e4e4ef;
  --text-secondary: #8888a0;
  --text-muted: #555570;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dark: #4f46e5;
  --gradient-1: #6366f1;
  --gradient-2: #8b5cf6;
  --gradient-3: #06b6d4;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --border: #1e1e2e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--accent-light);
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

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

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

.nav-github {
  background: var(--bg-card);
  padding: 6px 16px !important;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  max-width: 900px;
  margin: 0 auto 24px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.install-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 1rem;
}

.install-box.large {
  padding: 16px 28px;
  font-size: 1.1rem;
}

.install-box code {
  background: none;
  padding: 0;
  color: var(--green);
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.copy-btn:hover {
  opacity: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* ===== Terminal ===== */
.hero-terminal {
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow), 0 0 80px rgba(99, 102, 241, 0.1);
  text-align: left;
}

.terminal-header {
  background: #1a1a2e;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green { background: var(--green); }

.terminal-title {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.terminal-body {
  background: #0d0d1a;
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.9rem;
  min-height: 200px;
}

.terminal-line {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

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

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

.cursor {
  animation: blink 1s infinite;
  color: var(--accent-light);
}

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

.terminal-output {
  color: var(--text-secondary);
  white-space: pre-wrap;
}

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

.terminal-output .info {
  color: var(--accent-light);
}

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

/* ===== Stats ===== */
.stats {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-light);
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Features ===== */
.features {
  padding: 120px 0;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
}

.feature-card.highlight {
  grid-column: span 3;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
  border-color: rgba(99, 102, 241, 0.3);
  text-align: center;
  padding: 48px;
}

.feature-card.highlight code {
  font-size: 1.1rem;
  padding: 8px 20px;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.feature-card code {
  font-size: 0.8rem;
}

/* ===== Agents ===== */
.agents {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.agents-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  min-width: 140px;
  transition: all 0.3s;
}

.agent-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.agent-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.agent-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.agent-card p {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.agent-arrow {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: bold;
}

.agent-orchestrator {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.orch-label {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.agent-orchestrator p {
  color: var(--text-secondary);
}

/* ===== Commands ===== */
.commands-section {
  padding: 120px 0;
}

.commands-table {
  overflow-x: auto;
}

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

.commands-table th {
  text-align: left;
  padding: 14px 20px;
  background: var(--bg-card);
  border-bottom: 2px solid var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.commands-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.commands-table tr:hover td {
  background: var(--bg-card);
}

.commands-table td:first-child code {
  color: var(--green);
  font-weight: 600;
}

.commands-table td:last-child code {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===== Models ===== */
.models {
  padding: 120px 0;
  background: var(--bg-secondary);
}

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

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: all 0.3s;
}

.model-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.model-card.smart {
  border-color: rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
}

.model-logo {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.model-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.model-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* ===== Deploy ===== */
.deploy-section {
  padding: 120px 0;
}

.deploy-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.deploy-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  min-width: 180px;
}

.step-num {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin: 0 auto 16px;
}

.deploy-step h4 {
  margin-bottom: 8px;
}

.deploy-step p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.deploy-arrow {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: bold;
}

.deploy-platforms {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.platform {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

/* ===== CTA ===== */
.cta {
  padding: 120px 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
  text-align: center;
  border-top: 1px solid var(--border);
}

.cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.cta .install-box {
  margin: 0 auto 32px;
  display: inline-flex;
}

.cta-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Footer ===== */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-secondary);
}

.footer-links h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }

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

  .nav-toggle {
    display: block;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

  .feature-card.highlight {
    grid-column: span 1;
  }

  .agents-flow {
    flex-direction: column;
  }

  .agent-arrow {
    transform: rotate(90deg);
  }

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

  .deploy-flow {
    flex-direction: column;
  }

  .deploy-arrow {
    transform: rotate(90deg);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-card, .agent-card, .model-card, .deploy-step {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.15s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.25s; }
.feature-card:nth-child(5) { animation-delay: 0.3s; }
.feature-card:nth-child(6) { animation-delay: 0.35s; }
.feature-card:nth-child(7) { animation-delay: 0.4s; }
.feature-card:nth-child(8) { animation-delay: 0.45s; }
.feature-card:nth-child(9) { animation-delay: 0.5s; }
.feature-card:nth-child(10) { animation-delay: 0.55s; }
.feature-card:nth-child(11) { animation-delay: 0.6s; }
.feature-card:nth-child(12) { animation-delay: 0.65s; }
.feature-card:nth-child(13) { animation-delay: 0.7s; }
