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

:root {
  --bg-deep: #050a14;
  --bg-primary: #070d1a;
  --bg-card: #0c1525;
  --bg-card-hover: #101c33;
  --bg-surface: #111d35;
  --border: #162040;
  --border-light: #1e3060;

  --accent: #00e5a0;
  --accent-bright: #33ffc0;
  --accent-dim: rgba(0, 229, 160, 0.15);
  --accent-glow: rgba(0, 229, 160, 0.08);

  --opus: #a78bfa;
  --opus-dim: rgba(167, 139, 250, 0.15);
  --sonnet: #38bdf8;
  --sonnet-dim: rgba(56, 189, 248, 0.15);

  --text: #e4eaf4;
  --text-secondary: #8494b2;
  --text-muted: #4a5e80;

  --font-display: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--bg-deep);
}

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

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 10, 20, 0.7);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg-deep) !important;
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--accent-dim);
  color: var(--bg-deep) !important;
}

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

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-glow {
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 8px;
  border-radius: 100px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-dim); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 16px;
  position: relative;
  z-index: 1;
  margin-bottom: 80px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s var(--ease-out);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 229, 160, 0.25);
  color: var(--bg-deep);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--text);
}

/* ─── HERO PIPELINE MINI ─── */
.hero-pipeline {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-stage {
  display: flex;
  align-items: center;
  gap: 0;
}

.hero-stage-node {
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(10px);
}
.hero-stage-node.visible {
  opacity: 1;
  transform: translateY(0);
}
.hero-stage-node:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.hero-stage-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0 6px;
  opacity: 0;
  transition: opacity 0.3s;
}
.hero-stage-arrow.visible { opacity: 1; }

/* ─── STATS ─── */
.stats {
  display: flex;
  justify-content: center;
  gap: 80px;
  padding: 60px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}

.stat {
  text-align: center;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── SECTIONS ─── */
section {
  padding: 120px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.15;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  font-weight: 300;
}

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

/* ─── PIPELINE SECTION ─── */
.pipeline-section {
  padding: 120px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.pipeline-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 0;
  margin-top: 64px;
}

.pipeline-item {
  display: flex;
  align-items: center;
}

.p-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: default;
}

.p-node-ring {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid var(--border-light);
  background: var(--bg-card);
  transition: all 0.35s var(--ease-out);
  position: relative;
}

.p-node:hover .p-node-ring {
  border-color: var(--node-color, var(--accent));
  background: var(--node-bg, var(--accent-dim));
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--node-shadow, var(--accent-dim));
}

.p-node-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.p-node-model {
  position: absolute;
  top: -8px;
  right: -8px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.model-opus {
  background: var(--opus-dim);
  color: var(--opus);
  border: 1px solid rgba(167, 139, 250, 0.3);
}
.model-sonnet {
  background: var(--sonnet-dim);
  color: var(--sonnet);
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.model-none {
  background: rgba(74, 94, 128, 0.2);
  color: var(--text-muted);
  border: 1px solid rgba(74, 94, 128, 0.3);
}

.p-connector {
  width: 40px;
  height: 2px;
  background: var(--border-light);
  position: relative;
  margin: 0 4px;
  margin-bottom: 28px;
}
.p-connector::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: flow-pulse 2.5s linear infinite;
  opacity: 0;
}

@keyframes flow-pulse {
  0% { left: 0; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}

.p-node:nth-child(1) .p-connector::after { animation-delay: 0s; }
.pipeline-item:nth-child(2) .p-connector::after { animation-delay: 0.3s; }
.pipeline-item:nth-child(3) .p-connector::after { animation-delay: 0.6s; }
.pipeline-item:nth-child(4) .p-connector::after { animation-delay: 0.9s; }
.pipeline-item:nth-child(5) .p-connector::after { animation-delay: 1.2s; }
.pipeline-item:nth-child(6) .p-connector::after { animation-delay: 1.5s; }
.pipeline-item:nth-child(7) .p-connector::after { animation-delay: 1.8s; }
.pipeline-item:nth-child(8) .p-connector::after { animation-delay: 2.1s; }

.p-node-optional {
  position: absolute;
  bottom: -20px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ─── AGENTS ─── */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.agent-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--agent-accent, var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}
.agent-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.agent-card:hover::before { opacity: 1; }

.agent-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.agent-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.agent-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
}

.agent-model {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
  display: inline-block;
}

.agent-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.agent-tags {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.agent-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ─── FEATURES ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: all 0.35s var(--ease-out);
}
.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

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

.feature-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

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

/* ─── HOW IT WORKS ─── */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.terminal {
  background: #0c0c14;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

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

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

.terminal-comment {
  color: var(--text-muted);
}
.terminal-cmd {
  color: var(--text);
}
.terminal-cmd::before {
  content: '$ ';
  color: var(--accent);
}
.terminal-flag {
  color: var(--sonnet);
}
.terminal-string {
  color: #fbbf24;
}

/* ─── QUICKSTART ─── */
.quickstart-section {
  text-align: center;
}

.quickstart-steps {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-top: 48px;
  flex-wrap: wrap;
}

.qs-step {
  text-align: center;
  max-width: 240px;
}

.qs-number {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 160, 0.2);
  margin: 0 auto 16px;
}

.qs-title {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 8px;
}

.qs-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.qs-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--accent);
  display: inline-block;
  margin-top: 8px;
}

/* ─── CTA BANNER ─── */
.cta-banner {
  text-align: center;
  padding: 100px 24px;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.cta-banner-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 80px 40px;
  position: relative;
  overflow: hidden;
}

.cta-banner-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}

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

.cta-banner .btn { position: relative; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

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

.footer-left {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-left strong {
  color: var(--text-secondary);
  font-family: var(--font-display);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--accent); }

.footer-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* ─── ANIMATIONS ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  nav { padding: 0 20px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(5, 10, 20, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .nav-mobile-toggle { display: block; }

  .stats { gap: 32px; flex-wrap: wrap; }
  .stat-number { font-size: 2rem; }

  section { padding: 80px 20px; }

  .pipeline-flow { gap: 8px; }
  .p-connector { width: 20px; }
  .p-node-ring { width: 56px; height: 56px; font-size: 1.2rem; border-radius: 12px; }

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

  .quickstart-steps { flex-direction: column; align-items: center; }

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

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

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .hero-glow { animation: none; }
  .p-connector::after { animation: none; }
  .hero-stage-node { opacity: 1; transform: none; }
}
