/* ═══════════════════════════════════════════════════════════
   BABUBA — multi-page additions (pages.css)
   nav active state, page-hero, terminal demo, stat grid,
   role table, CTA band — same design system as style.css
   ═══════════════════════════════════════════════════════════ */

/* ── Nav: active page ─────────────────────────────────────── */
.nav-links a.active { color: var(--volt); }
.nav-links a.active::after { width: 100%; background: var(--volt); }

/* ── Page hero (sub-pages) ────────────────────────────────── */
.page-hero {
  min-height: 62vh;
  display: flex;
  align-items: center;
  padding: 120px 0 64px;
  position: relative;
}
.page-hero-inner { max-width: var(--max); margin: 0 auto; padding: 0 24px; width: 100%; }
.page-hero .kicker { font-size: 13px; letter-spacing: 0.1em; color: var(--dim); margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(34px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 20px; }
.page-hero h1 .volt { color: var(--volt); }
.page-hero .hero-sub { max-width: 680px; color: var(--dim); font-size: 17px; line-height: 1.65; margin-bottom: 28px; }
.page-hero .hero-sub em { color: var(--ink); font-style: normal; }
.page-hero .hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.page-hero .hero-meta li {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--dim);
  border: 1px solid var(--line); padding: 7px 12px; background: var(--bg2);
}

/* ── Terminal demo (agent creation) ───────────────────────── */
.term {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  font-family: var(--mono); font-size: 13px; line-height: 1.7; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.term-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.term-head .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.term-head .dot.r { background: var(--signal); } .term-head .dot.y { background: var(--amber); } .term-head .dot.g { background: var(--ok); }
.term-title { color: var(--faint); font-size: 12px; letter-spacing: 0.08em; margin-left: 6px; }
.term-body { padding: 18px 20px; }
.term-body p { margin: 0 0 6px; }
.term-body .prompt { color: var(--volt); }
.term-body .cmd { color: var(--ink); }
.term-body .ok { color: var(--ok); }
.term-body .dim { color: var(--faint); }
.term-body .cursor { display: inline-block; width: 8px; height: 14px; background: var(--volt); vertical-align: -2px; animation: blink 1s steps(1) infinite; }

/* ── Product definition line (hero) ───────────────────────── */
.hero-def {
  max-width: 720px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 1.7;
  color: var(--dim);
  margin: -8px 0 24px;
}
.hero-def .volt { color: var(--volt); }

/* ── Terminal demo: staggered line reveal ─────────────────── */
.term-body p { opacity: 0; }
.term.reveal.in .term-body p,
.term:not(.reveal) .term-body p { animation: bootline 0.45s var(--ease) forwards; }
.term.reveal.in .term-body p:nth-child(1),  .term:not(.reveal) .term-body p:nth-child(1)  { animation-delay: 0.15s; }
.term.reveal.in .term-body p:nth-child(2),  .term:not(.reveal) .term-body p:nth-child(2)  { animation-delay: 0.40s; }
.term.reveal.in .term-body p:nth-child(3),  .term:not(.reveal) .term-body p:nth-child(3)  { animation-delay: 0.65s; }
.term.reveal.in .term-body p:nth-child(4),  .term:not(.reveal) .term-body p:nth-child(4)  { animation-delay: 0.90s; }
.term.reveal.in .term-body p:nth-child(5),  .term:not(.reveal) .term-body p:nth-child(5)  { animation-delay: 1.15s; }
.term.reveal.in .term-body p:nth-child(6),  .term:not(.reveal) .term-body p:nth-child(6)  { animation-delay: 1.40s; }
.term.reveal.in .term-body p:nth-child(7),  .term:not(.reveal) .term-body p:nth-child(7)  { animation-delay: 1.65s; }
.term.reveal.in .term-body p:nth-child(8),  .term:not(.reveal) .term-body p:nth-child(8)  { animation-delay: 1.90s; }
.term.reveal.in .term-body p:nth-child(9),  .term:not(.reveal) .term-body p:nth-child(9)  { animation-delay: 2.15s; }
.term.reveal.in .term-body p:nth-child(10), .term:not(.reveal) .term-body p:nth-child(10) { animation-delay: 2.40s; }
.term.reveal.in .term-body p:nth-child(11), .term:not(.reveal) .term-body p:nth-child(11) { animation-delay: 2.65s; }
.term.reveal.in .term-body p:nth-child(12), .term:not(.reveal) .term-body p:nth-child(12) { animation-delay: 2.90s; }

/* ── Accessibility: skip link ─────────────────────────────── */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--volt); color: #0A0A0B;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; padding: 11px 16px; text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .term-body p { opacity: 1; animation: none; }
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Stat grid ────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat {
  border: 1px solid var(--line); background: var(--panel); padding: 26px 24px; position: relative;
}
.stat .stat-id { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint); margin-bottom: 14px; }
.stat .stat-num { font-family: var(--mono); font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; color: var(--volt); line-height: 1; }
.stat .stat-num small { font-size: 15px; color: var(--dim); font-weight: 400; }
.stat .stat-label { color: var(--dim); font-size: 13px; margin-top: 10px; line-height: 1.5; }

/* ── Role table ───────────────────────────────────────────── */
.role-table-wrap { border: 1px solid var(--line); background: var(--panel); overflow-x: auto; }
.role-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; }
.role-table th {
  text-align: left; color: var(--faint); font-weight: 500; letter-spacing: 0.1em; font-size: 10.5px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); white-space: nowrap;
}
.role-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--dim); }
.role-table tr:last-child td { border-bottom: none; }
.role-table td:first-child { color: var(--ink); font-weight: 500; }
.role-table .volt { color: var(--volt); }
.role-table .chip { display: inline-block; font-size: 11px; letter-spacing: 0.08em; padding: 3px 8px; border: 1px solid var(--line); color: var(--dim); }

/* ── Feature rows (alternating) ───────────────────────────── */
.feat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 48px 0; border-bottom: 1px solid var(--line); }
.feat-row:last-of-type { border-bottom: none; }
.feat-row .feat-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--volt); margin-bottom: 12px; }
.feat-row h3 { font-size: clamp(22px, 2.6vw, 32px); margin: 0 0 14px; line-height: 1.15; }
.feat-row p { color: var(--dim); line-height: 1.7; margin: 0 0 12px; }
.feat-row ul { margin: 0; padding: 0; list-style: none; }
.feat-row ul li { color: var(--dim); padding: 6px 0 6px 22px; position: relative; font-size: 14.5px; }
.feat-row ul li::before { content: "▸"; position: absolute; left: 0; color: var(--volt); }
@media (max-width: 860px) { .feat-row { grid-template-columns: 1fr; gap: 24px; } }

/* ── CTA band ─────────────────────────────────────────────── */
.cta-band { border: 1px solid var(--line); background: linear-gradient(135deg, var(--bg2), var(--panel)); padding: 56px 40px; text-align: center; margin-top: 56px; position: relative; overflow: hidden; }
.cta-band::before { content: "//"; position: absolute; top: -30px; right: 10px; font-family: var(--mono); font-size: 160px; color: var(--volt-dim); }
.cta-band h2 { font-size: clamp(26px, 3.6vw, 42px); margin: 0 0 14px; }
.cta-band p { color: var(--dim); max-width: 560px; margin: 0 auto 28px; line-height: 1.6; }
.cta-band .btn { margin: 0 6px 8px; }

/* ── Flow steps (horizontal) ──────────────────────────────── */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; }
.flow-step { border: 1px solid var(--line); background: var(--panel); padding: 26px 24px; position: relative; }
.flow-step .step-num { font-family: var(--mono); color: var(--volt); font-size: 12px; letter-spacing: 0.12em; margin-bottom: 12px; }
.flow-step h3, .flow-step h4 { margin: 0 0 8px; font-size: 15px; }
.flow-step p { margin: 0; color: var(--dim); font-size: 13.5px; line-height: 1.6; }
.flow-step .boot-log { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin: 10px 0 0; }

/* ── Section sub-page spacing ─────────────────────────────── */
.page-body { max-width: var(--max); margin: 0 auto; padding: 0 24px 80px; }
.page-body .section { padding: 56px 0 0; }
.page-body .eyebrow { font-size: 12px; letter-spacing: 0.14em; color: var(--volt); font-family: var(--mono); margin-bottom: 10px; }
.page-body h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; margin: 0 0 16px; }
.page-body h2 .volt { color: var(--volt); }
.page-body .section-sub { color: var(--dim); max-width: 640px; line-height: 1.65; margin-bottom: 32px; }
