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

:root {
  --bg: #0f0f0f;
  --bg-alt: #161616;
  --text: #e3e3e3;
  --text-muted: #9a9a9a;
  --accent: #8ab4f8;
  --accent-hover: #aecbfa;
  --accent-dim: rgba(138, 180, 248, 0.1);
  --accent-dim2: rgba(138, 180, 248, 0.06);
  --card-bg: #1a1a1a;
  --card-border: #2a2a2a;
  --code-bg: #1a1a1a;
  --red-muted: #f87171;
  --green-muted: #6ee7b7;
  --max-width: 1040px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Hero */
.hero {
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 32px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-desc em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.hero-install {
  margin-bottom: 32px;
}

.hero-install code {
  display: inline-block;
  padding: 14px 28px;
  background: var(--code-bg);
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow-x: auto;
}

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

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
}

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

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

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px 40px;
  max-width: 640px;
  margin: 0 auto;
}

.stat-item {
  flex: 1;
  text-align: center;
}

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

.stat-item .stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-item .stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Sections */
.section {
  padding: 100px 24px;
}

.section-alt {
  background: var(--bg-alt);
}

.section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 56px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Problem Grid */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.problem-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 32px 28px;
}

.problem-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.problem-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--red-muted);
}

.problem-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Pipeline / Agents */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}

.agent-card {
  flex: 1;
  min-width: 180px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 28px 20px;
  position: relative;
}

.agent-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

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

.agent-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--accent);
  font-size: 1.4rem;
  opacity: 0.4;
  flex-shrink: 0;
}

/* Comparison Table */
.table-wrapper {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.compare-table thead th {
  font-weight: 700;
  font-size: 0.95rem;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--card-border);
}

.compare-table th:first-child,
.compare-table td:first-child {
  font-weight: 600;
  color: var(--text);
  width: 180px;
}

.col-old {
  color: var(--text-muted);
}

.col-new {
  color: var(--text);
}

.col-new.highlight {
  color: var(--green-muted);
  font-weight: 600;
}

.compare-table thead .col-new {
  color: var(--accent);
}

.compare-table tbody tr:hover {
  background: var(--accent-dim2);
}

/* Code Block */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 28px 32px;
  overflow-x: auto;
  max-width: 640px;
  margin: 0 auto;
}

.code-block-featured {
  border-color: var(--accent);
  background: var(--accent-dim);
  text-align: center;
}

.code-block-featured code {
  font-size: 1rem;
}

.code-block pre {
  margin: 0;
}

.code-block code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
}

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

/* Value Grid (Out of the Box) */
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.value-card {
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 32px 20px;
}

.value-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}

.value-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Cards Two */
.cards-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 32px 28px;
  position: relative;
}

.card-badge {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.card-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--accent);
}

/* Footer */
.footer {
  text-align: center;
  padding: 60px 24px;
  border-top: 1px solid var(--card-border);
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--accent);
}

.footer-license {
  font-size: 0.8rem;
  color: #555;
}

/* Responsive */
@media (max-width: 900px) {
  .pipeline {
    flex-direction: column;
    gap: 12px;
  }
  .pipeline-arrow {
    justify-content: center;
    padding: 4px 0;
    transform: rotate(90deg);
  }
  .agent-card {
    min-width: auto;
  }
}

@media (max-width: 768px) {
  .hero { padding: 80px 24px 60px; }
  .hero h1 { font-size: 2.4rem; }
  .problem-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-two { grid-template-columns: 1fr; }
  .section { padding: 72px 24px; }
  .stats-bar { padding: 20px 24px; }
  .stat-item .stat-num { font-size: 1.25rem; }
  .compare-table th:first-child,
  .compare-table td:first-child { width: auto; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.9rem; }
  .stats-bar {
    flex-wrap: wrap;
    gap: 16px;
  }
  .stat-divider { display: none; }
  .stat-item { flex: 0 0 40%; }
  .value-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .code-block { padding: 20px 16px; }
  .code-block code { font-size: 0.8rem; }
}

/* Product Walkthrough */
.walkthrough {
  margin-top: 40px;
}

.walkthrough-stage {
  position: relative;
}

.walkthrough-step-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.walkthrough-step-number {
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 700;
}

.walkthrough-step-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  opacity: 1;
  transition: opacity 0.3s ease;
}

.walkthrough-step-text.fade-out {
  opacity: 0;
}

.walkthrough-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: 0 0 40px rgba(138, 180, 248, 0.08), 0 0 80px rgba(138, 180, 248, 0.04);
  aspect-ratio: 16 / 9.5;
}

.walkthrough-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.wt-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.wt-slide.active {
  opacity: 1;
  transform: scale(1);
}

.wt-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Controls */
.walkthrough-controls {
  margin-top: 28px;
}

.walkthrough-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.wt-dot {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wt-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.wt-dot.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.wt-dot.active::before {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.wt-dot-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.wt-dot.active .wt-dot-label {
  color: var(--accent);
}

.wt-dot:hover {
  border-color: var(--accent);
}

.walkthrough-progress {
  height: 3px;
  background: var(--card-border);
  border-radius: 3px;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
}

.walkthrough-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.1s linear;
}

/* Responsive walkthrough */
@media (max-width: 768px) {
  .walkthrough-frame { aspect-ratio: 4 / 3; }
  .wt-dot { padding: 5px 10px; }
  .wt-dot-label { font-size: 0.7rem; }
  .walkthrough-step-text { font-size: 1rem; }
}

@media (max-width: 480px) {
  .walkthrough-dots { gap: 4px; }
  .wt-dot { padding: 4px 8px; }
  .wt-dot-label { display: none; }
  .wt-dot { width: 28px; height: 28px; border-radius: 50%; justify-content: center; padding: 0; }
}
