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

:root {
  --bg: #080c14;
  --bg-card: #0d1220;
  --bg-card-hover: #111827;
  --surface: #111827;
  --border: rgba(0, 229, 255, 0.12);
  --border-subtle: rgba(0, 229, 255, 0.06);
  --accent: #00e5ff;
  --accent-dim: rgba(0, 229, 255, 0.15);
  --accent-glow: rgba(0, 229, 255, 0.08);
  --text: #c8d8e8;
  --text-bright: #e8f0f8;
  --text-dim: #6b7d8e;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;
  --radius: 6px;
  --max-w: 1100px;
}

html { font-size: 16px; scroll-behavior: smooth; }

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

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 32px;
  backdrop-filter: blur(12px);
  background: rgba(8, 12, 20, 0.8);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.nav-logo-accent { color: var(--accent); }

.nav-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

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

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

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

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
}

.route-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.12;
  animation: route-pulse 4s ease-in-out infinite;
}

.route-1 { top: 30%; left: 0; width: 45%; animation-delay: 0s; }
.route-2 { top: 55%; left: 55%; width: 40%; animation-delay: 1.2s; }
.route-3 { top: 72%; left: 10%; width: 35%; animation-delay: 2.4s; }

@keyframes route-pulse {
  0%, 100% { opacity: 0.04; }
  50% { opacity: 0.18; }
}

.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-eyebrow { margin-bottom: 28px; }

.eyebrow-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 229, 255, 0.2);
  padding: 5px 14px;
  border-radius: 4px;
  display: inline-block;
}

.hero-headline {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 700px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 48px;
  line-height: 1.7;
}

.br-lg { display: none; }
@media (min-width: 768px) { .br-lg { display: inline; } }

/* CODE BLOCK */
.hero-code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 620px;
  margin-bottom: 48px;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.04);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 229, 255, 0.04);
  border-bottom: 1px solid var(--border-subtle);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-left: 8px;
}

.code-body {
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}

.code-key { color: #00e5ff; }
.code-str { color: #a3e4d7; }
.code-val { color: #f9c74f; }
.code-comment { color: #4a5a6a; font-style: italic; }

/* STATS */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-val {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

/* ===== PROBLEM ===== */
.problem {
  padding: 100px 32px;
  border-top: 1px solid var(--border-subtle);
}

.problem-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.problem-label,
.hiw-label,
.feat-label,
.arch-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.problem-headline {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 60px;
  max-width: 600px;
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 640px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
}

.problem-card {
  background: var(--bg-card);
  padding: 36px 32px;
  transition: background 0.2s;
}

.problem-card:hover { background: var(--bg-card-hover); }

.problem-icon {
  margin-bottom: 20px;
  color: var(--accent);
}

.problem-card h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 12px;
}

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

/* ===== HOW IT WORKS ===== */
.hiw {
  padding: 100px 32px;
  border-top: 1px solid var(--border-subtle);
}

.hiw-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.hiw-headline {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hiw-desc {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 640px;
  margin-bottom: 64px;
  line-height: 1.7;
}

.hiw-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hiw-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 48px 0;
}

@media (min-width: 768px) {
  .hiw-step { grid-template-columns: 80px 1fr; gap: 40px; }
}

.step-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.4;
  line-height: 1;
  padding-top: 4px;
}

.step-content h3 {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 12px;
}

.step-content p {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 24px;
  line-height: 1.65;
}

.step-code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
}

.step-code pre {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre;
}

/* Flow visualization */
.step-visual {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.flow-node {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 4px;
  text-align: center;
  line-height: 1.4;
}

.flow-node span {
  font-weight: 400;
  opacity: 0.7;
  font-size: 0.65rem;
}

.flow-node.input { background: rgba(0,229,255,0.1); color: var(--accent); border: 1px solid rgba(0,229,255,0.2); }
.flow-node.triage { background: rgba(0,229,255,0.07); color: var(--text); border: 1px solid rgba(0,229,255,0.15); }
.flow-node.output { background: rgba(163,228,215,0.08); color: #a3e4d7; border: 1px solid rgba(163,228,215,0.15); }
.flow-node.condition { background: rgba(249,199,79,0.08); color: #f9c74f; border: 1px solid rgba(249,199,79,0.15); }
.flow-node.deep { background: rgba(255,100,100,0.07); color: #ff8080; border: 1px solid rgba(255,100,100,0.15); }
.flow-node.err { opacity: 0.6; }

.flow-arrow { color: var(--text-dim); font-size: 1.1rem; }
.flow-spacer { width: 1px; height: 20px; }

/* Metrics */
.step-metrics {
  display: flex;
  gap: 40px;
}

.metric-val {
  font-family: var(--mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.metric-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
  max-width: 200px;
}

.hiw-divider {
  height: 1px;
  background: var(--border-subtle);
}

/* ===== ARCHITECTURE ===== */
.architecture {
  padding: 100px 32px;
  border-top: 1px solid var(--border-subtle);
}

.arch-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
}

@media (min-width: 900px) {
  .arch-inner { grid-template-columns: 1fr 1fr; align-items: center; }
}

.arch-visual { display: flex; flex-direction: column; gap: 20px; }

.arch-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.arch-layer { width: 100%; }

.layer-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.layer-boxes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.layer-boxes.models .arch-box { flex: 1; min-width: 100px; }

.arch-box {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  text-align: center;
  flex: 1;
  min-width: 100px;
}

.arch-box.highlight {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.06);
}

.arch-box span {
  display: block;
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 400;
  margin-top: 2px;
}

.arch-box.slm { color: #a3e4d7; }
.arch-box.llm { color: #f9c74f; }
.arch-box.reasoning { color: #ff8080; }

.arch-arrow { padding: 8px 0 8px 20px; }

.arch-text h2 {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.arch-text p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 28px;
}

.arch-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.arch-list li {
  font-size: 0.9rem;
  color: var(--text);
  padding-left: 20px;
  position: relative;
}

.arch-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ===== FEATURES ===== */
.features {
  padding: 100px 32px;
  border-top: 1px solid var(--border-subtle);
}

.feat-inner { max-width: var(--max-w); margin: 0 auto; }

.feat-headline {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 60px;
}

.feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 640px) { .feat-grid { grid-template-columns: 1fr 1fr; } }

.feat-card {
  background: var(--bg-card);
  padding: 32px 28px;
  transition: background 0.2s;
}

.feat-card:hover { background: var(--bg-card-hover); }

.feat-icon {
  color: var(--accent);
  margin-bottom: 18px;
}

.feat-card h3 {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 10px;
}

.feat-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ===== MANIFESTO ===== */
.manifesto {
  padding: 80px 32px 100px;
  border-top: 1px solid var(--border-subtle);
}

.manifesto-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.manifesto-rule {
  width: 60px;
  height: 1px;
  background: var(--border);
}

.manifesto-quote {
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.7;
  font-style: normal;
  letter-spacing: -0.01em;
}

.manifesto-cta p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 540px;
}

/* ===== FOOTER ===== */
.footer {
  padding: 40px 32px;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-bright);
}

.footer-logo-accent { color: var(--accent); }

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

.footer-slug {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero { padding: 100px 20px 60px; }
  .problem, .hiw, .architecture, .features, .manifesto { padding: 80px 20px; }
  .step-metrics { gap: 24px; }
  .hero-stats { gap: 20px; }
  .stat-div { display: none; }
}
