/* ===== CSS Variables ===== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-card: #15151f;
  
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.3);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

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

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-sm), 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 40px rgba(99, 102, 241, 0.4);
}

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

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

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

.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}

.logo-icon {
  font-size: 24px;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

.nav-cta {
  padding: 10px 20px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  color: white !important;
}

.nav-cta:hover {
  opacity: 0.9;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

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

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

/* Terminal Demo */
.hero-terminal {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  text-align: left;
}

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

.terminal-dots {
  display: flex;
  gap: 8px;
}

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

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.terminal-title {
  font-size: 13px;
  color: var(--text-muted);
}

.terminal-body {
  padding: 20px;
  overflow-x: auto;
}

.terminal-body pre {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
}

.terminal-body code {
  color: var(--text-secondary);
}

.terminal-body .prompt { color: var(--success); }
.terminal-body .comment { color: var(--text-muted); }
.terminal-body .agent { color: var(--text-primary); font-weight: 500; }
.terminal-body .vote { 
  padding: 2px 8px; 
  border-radius: 4px; 
  font-weight: 600;
  font-size: 12px;
}
.terminal-body .vote.approve { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.terminal-body .vote.revise { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.terminal-body .vote.reject { background: rgba(239, 68, 68, 0.2); color: var(--error); }
.terminal-body .confidence { color: var(--text-muted); font-size: 12px; }
.terminal-body .result { color: var(--text-muted); }
.terminal-body .approve { color: var(--success); font-weight: 700; }

/* ===== Features Section ===== */
.features {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
}

.section-subtitle {
  max-width: 500px;
  margin: 16px auto 0;
  color: var(--text-secondary);
  font-size: 17px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: white;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

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

/* ===== Agents Section ===== */
.agents {
  padding: 120px 0;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.agent-card {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

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

.agent-avatar {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-size: 28px;
  flex-shrink: 0;
}

.agent-info h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.agent-role {
  display: block;
  font-size: 13px;
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 10px;
}

.agent-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.agent-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
}

.agent-badge.generalist {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.agent-badge.specialist {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.agent-badge.challenger {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* ===== How It Works Section ===== */
.how-it-works {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.process-timeline {
  max-width: 600px;
  margin: 0 auto;
}

.process-step {
  display: flex;
  gap: 24px;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content {
  padding-bottom: 40px;
}

.step-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.process-connector {
  position: absolute;
  left: 23px;
  top: 56px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary) 0%, transparent 100%);
}

.process-step:last-child .step-content {
  padding-bottom: 0;
}

.process-step:last-child .process-connector {
  display: none;
}

/* ===== CTA Section ===== */
.cta-section {
  padding: 120px 0;
}

.cta-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 60px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent-gradient);
}

.cta-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-content p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-code {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
  overflow: hidden;
}

.cta-code pre {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
}

.cta-code code {
  color: var(--text-secondary);
}

.cta-code .comment {
  color: var(--text-muted);
}

/* ===== Footer ===== */
.footer {
  padding: 80px 0 32px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
}

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

.footer-column h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-column a {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
  transition: var(--transition);
}

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

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
}

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

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

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

  .hero-cta {
    flex-direction: column;
  }

  .cta-card {
    grid-template-columns: 1fr;
    padding: 32px;
  }

  .footer-content {
    flex-direction: column;
    gap: 40px;
  }

  .footer-links {
    gap: 40px;
  }

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