:root {
  --bg: #05070b;
  --surface: #0d131d;
  --surface-2: #111827;
  --text: #f5f7fb;
  --muted: #95a2b5;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --accent: #91b6ff;
  --accent-2: #d7e4ff;
  --accent-soft: rgba(145,182,255,0.12);
  --shadow: 0 30px 90px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(145,182,255,.11), transparent 28%),
    linear-gradient(180deg, #05070b 0%, #070b12 100%);
}

a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,p { margin: 0; }
main { width: min(1260px, calc(100% - 32px)); margin: 0 auto; }

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  backdrop-filter: blur(18px);
  background: rgba(5,7,11,.72);
  border-bottom: 1px solid var(--line);
}
.nav nav { display: flex; gap: 20px; color: var(--muted); font-size: 14px; }
.brand-wrap { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 28px; height: 28px; border-radius: 8px; }
.brand { font-weight: 700; letter-spacing: -0.02em; }

.section { padding: 60px 0; }
.eyebrow, .section-label { color: var(--muted); font-size: 14px; letter-spacing: .03em; }
.section-note { color: var(--muted); max-width: 420px; line-height: 1.5; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}
.panel-heading { padding: 0 4px; }

.hero-panel {
  display: grid;
  grid-template-columns: 1.5fr .9fr;
  gap: 22px;
  align-items: stretch;
  padding: 94px 0 46px;
}
.hero-copy, .hero-side { padding: 34px; }
.hero-copy {
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(16,22,34,.96), rgba(9,12,18,.94));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-side {
  display: grid;
  gap: 16px;
  align-content: stretch;
}
.glass-card,
.node,
.feedback-card,
.layer-card,
.ai-card,
.repo-card,
.test-card,
.video-placeholder {
  background: linear-gradient(180deg, rgba(18,24,36,.98), rgba(12,16,24,.95));
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}
.accent-card {
  background: linear-gradient(180deg, rgba(24,31,48,.98), rgba(13,18,27,.96));
}
.glow-card {
  box-shadow: 0 0 0 1px rgba(145,182,255,.08), 0 30px 90px rgba(0,0,0,.45), 0 0 80px rgba(145,182,255,.08);
}
.mini-stat { padding: 24px; }
.mini-stat span {
  display: block;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.mini-stat small { color: var(--muted); }

h1 {
  margin: 16px 0 18px;
  max-width: 860px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: .94;
  letter-spacing: -0.05em;
}
h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-top: 10px;
}
.lead {
  max-width: 820px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.5;
}

.architecture-board {
  padding: 28px;
  border-radius: 38px;
  background: linear-gradient(180deg, rgba(10,14,21,.9), rgba(7,10,15,.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.board-row { display: grid; align-items: center; gap: 14px; }
.top-row, .mid-row { grid-template-columns: minmax(0,1fr) 54px minmax(0,1fr) 54px minmax(0,1fr); }
.split-row { grid-template-columns: minmax(0,1fr) 100px minmax(0,1fr); }
.node { position: relative; padding: 24px; min-height: 190px; }
.tall-node { min-height: 250px; }
.wide-node, .merge-node { min-height: 0; }
.node h3, .layer-card h3, .ai-card h3, .test-card h3 { font-size: 24px; margin-bottom: 10px; letter-spacing: -0.03em; }
.node p, .feedback-card p, .layer-card p, .ai-card p, .repo-card p, .test-card p, .video-placeholder p { color: var(--muted); line-height: 1.58; }
.node small { display: block; margin-top: 12px; color: #7887a0; }
.node-tag {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 12px 0;
}
.feature-pills span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  color: var(--accent-2);
  font-size: 13px;
}
.vertical-stack { display: flex; flex-direction: column; align-items: center; }
.branch-col { display: flex; }
.center-connector {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.split-label { padding: 10px 0; }
.merge-zone { position: relative; padding: 52px 0 26px; }
.merge-node { max-width: 680px; margin: 0 auto; }
.flow-line.horizontal,
.flow-line.vertical,
.flow-line.diagonal {
  opacity: .95;
}
.flow-line.horizontal {
  height: 2px;
  background: linear-gradient(90deg, rgba(145,182,255,.04), rgba(145,182,255,.9), rgba(145,182,255,.04));
}
.flow-line.vertical {
  width: 2px;
  height: 34px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(145,182,255,.04), rgba(145,182,255,.9), rgba(145,182,255,.04));
}
.flow-line.vertical.short { height: 48px; }
.flow-line.diagonal {
  position: absolute;
  top: 10px;
  width: 30%;
  height: 2px;
  background: linear-gradient(90deg, rgba(145,182,255,.04), rgba(145,182,255,.9), rgba(145,182,255,.04));
}
.flow-line.diagonal.left { left: 16%; transform: rotate(20deg); transform-origin: left center; }
.flow-line.diagonal.right { right: 16%; transform: rotate(-20deg); transform-origin: right center; }

.feedback-grid, .layers-grid, .ai-grid, .test-grid {
  display: grid;
  gap: 18px;
}
.feedback-grid { margin-top: 24px; grid-template-columns: repeat(3, 1fr); }
.layers-grid { grid-template-columns: repeat(3, 1fr); }
.ai-grid { grid-template-columns: repeat(3, 1fr); }
.test-grid { grid-template-columns: repeat(3, 1fr); }
.feedback-card, .layer-card, .ai-card, .repo-card, .test-card { padding: 24px; }
.ai-card.big, .test-card.big { grid-column: span 2; }
.feedback-card h4 { font-size: 20px; margin-bottom: 8px; letter-spacing: -0.03em; }
.repo-card a { color: var(--accent); }

.video-placeholder {
  padding: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 260px;
  text-align: center;
}
.video-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 30px;
}

@media (max-width: 1120px) {
  .hero-panel,
  .top-row, .mid-row, .split-row,
  .feedback-grid, .layers-grid, .ai-grid, .test-grid,
  .section-heading {
    grid-template-columns: 1fr;
  }
  .section-heading { display: grid; }
  .flow-line.horizontal, .flow-line.diagonal { display: none; }
  .center-connector { min-height: 60px; }
  .merge-zone { padding-top: 20px; }
}

@media (max-width: 920px) {
  .nav { padding: 16px 18px; }
  .nav nav { gap: 12px; font-size: 13px; flex-wrap: wrap; }
  .hero-panel { padding-top: 70px; }
  .architecture-board { padding: 18px; }
  .layers-grid, .ai-grid, .test-grid, .feedback-grid { grid-template-columns: 1fr; }
  .ai-card.big, .test-card.big { grid-column: auto; }
  .node { min-height: 0; }
  .tall-node { min-height: 0; }
}

@media (max-width: 640px) {
  .nav { flex-direction: column; gap: 10px; align-items: flex-start; }
  .brand-logo { width: 24px; height: 24px; }
  main { width: min(1260px, calc(100% - 20px)); }
  .hero-copy, .hero-side, .node, .feedback-card, .layer-card, .ai-card, .repo-card, .test-card, .video-placeholder { padding: 20px; }
  .section { padding: 40px 0; }
  h1 { font-size: clamp(34px, 12vw, 52px); }
  h2 { font-size: clamp(26px, 8vw, 36px); }
  .lead { font-size: 17px; }
  .mini-stat span { font-size: 28px; }
  .feature-pills { justify-content: flex-start; }
  .feature-pills span { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .nav nav { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .hero-panel { gap: 14px; }
  .section-heading { gap: 12px; }
  .architecture-board { padding: 14px; border-radius: 28px; }
}

.video-shell {
  overflow: hidden;
  border-radius: 32px;
}

.demo-video {
  width: 100%;
  display: block;
  border-radius: 32px;
  background: #000;
}
