/* ═══════════════════════════════════════════════════════════════
   CASDAM Case Study — style.css
   Chorus AI Systems
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ─────────────────────────────────────────── */
:root {
  --bg:          #0D1117;
  --bg-2:        #161B22;
  --bg-3:        #1C2128;
  --teal:        #1ABC9C;
  --teal-dk:     #17A589;
  --teal-glow:   rgba(26,188,156,0.12);
  --teal-subtle: rgba(26,188,156,0.06);
  --teal-border: rgba(26,188,156,0.28);
  --amber:       #F39C12;
  --red:         #E74C3C;
  --green:       #27AE60;
  --text:        #E8EDF2;
  --text-2:      #8B9DB0;
  --text-3:      #4A5568;
  --border:      rgba(255,255,255,0.08);
  --sans:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:        'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 2. Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--teal-dk); }
button { cursor: pointer; font-family: var(--sans); }

/* ── 3. Typography System ─────────────────────────────────────── */
/* Tabular numerals everywhere they matter */
.num, .big-num, .metric-val, .gov-val, .kpi-chip {
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums lining-nums;
}

h1, h2, h3 { font-family: var(--sans); color: var(--text); }
h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
}
h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.body-copy { max-width: 65ch; }
.body-copy p + p { margin-top: 1em; }

/* ── 4. Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}
.section {
  padding: 120px 0;
  position: relative;
}
.section-inner { position: relative; z-index: 1; }

/* ── 5. Fade-up entrance animation ───────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

/* ── 6. Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 28px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.2px;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--teal); }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-2);
  transition: all 0.25s;
  border-radius: 1px;
}
.nav-mobile {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 99;
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.nav-mobile a:last-child { border-bottom: none; }

/* ── 7. Hero ──────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 60px;
  background: var(--bg);
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 75% 80% at 72% 45%, rgba(26,188,156,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 62fr 38fr;
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 60px);
  padding: 80px 0;
}
.hero-content { max-width: 620px; }
.hero-overline {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 24px;
}
.hero-h1 { margin-bottom: 24px; }
.hero-sub {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 55ch;
  margin-bottom: 40px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal);
  color: #0D1117;
  border: 1.5px solid var(--teal);
}
.btn-primary:hover {
  background: var(--teal-dk);
  border-color: var(--teal-dk);
  color: #0D1117;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26,188,156,0.25);
}
.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal-border);
}
.btn-outline:hover {
  background: var(--teal-glow);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}
.hero-footnote {
  font-size: 13px;
  color: var(--text-3);
}
.hero-footnote a { color: var(--text-2); }
.hero-footnote a:hover { color: var(--teal); }

/* Hero pipeline SVG */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(26,188,156,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.pipeline-svg {
  width: 100%;
  max-width: 260px;
  height: auto;
  position: relative;
  z-index: 1;
}

/* Pipeline SVG animation keyframes */
@keyframes flow-down {
  from { stroke-dashoffset: 14; }
  to   { stroke-dashoffset: 0; }
}
@keyframes flow-up {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -10; }
}
@keyframes pulse-gate {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 1; filter: drop-shadow(0 0 4px rgba(243,156,18,0.6)); }
}
@keyframes pulse-orch {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(26,188,156,0.25)); }
  50%       { filter: drop-shadow(0 0 8px rgba(26,188,156,0.5)); }
}
.flow-line {
  stroke-dasharray: 6 5;
  animation: flow-down 0.9s linear infinite;
}
.flow-up-line {
  stroke-dasharray: 3 5;
  animation: flow-up 2.5s linear infinite;
  opacity: 0.4;
}
.gate-node { animation: pulse-gate 2.5s ease-in-out infinite; }
.orch-rect { animation: pulse-orch 3s ease-in-out infinite; }

/* ── 8. Shared section styles ─────────────────────────────────── */
.section-header { margin-bottom: 56px; }
.section-header .label { margin-bottom: 12px; }
.section-subhead {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.65;
  margin-top: 16px;
}

/* ── 9. Thesis Statement ──────────────────────────────────────── */
.thesis-block {
  padding: 96px 0;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.thesis-quote {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
}
.thesis-quote::before,
.thesis-quote::after {
  font-size: 96px;
  line-height: 1;
  color: var(--teal);
  opacity: 0.35;
  font-family: Georgia, serif;
  position: absolute;
}
.thesis-quote::before { content: '\201C'; top: -24px; left: 0; }
.thesis-quote::after  { content: '\201D'; bottom: -48px; right: 0; }
.thesis-text {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text);
  font-style: italic;
}

/* ── 10. Expandable Cards ─────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s;
}
.card:hover { border-color: var(--teal-border); }
.card.open  { border-color: var(--teal-border); }
.card-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px 24px;
  background: none;
  border: none;
  text-align: left;
  gap: 16px;
}
.card-trigger-left { flex: 1; }
.card-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.card-preview {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}
.card-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-2);
  transition: transform 0.3s var(--ease), color 0.2s;
}
.card.open .card-chevron { transform: rotate(180deg); color: var(--teal); }
.card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.card.open .card-body { max-height: 600px; }
.card-body-inner {
  padding: 0 24px 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.card-body-inner p { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.card-body-inner p + p { margin-top: 10px; }
.tech-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 8px;
}

/* ── 11. Section 2 — Problem ──────────────────────────────────── */
#problem { background: var(--bg); }
.problem-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}
.problem-closing {
  text-align: center;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.01em;
  margin-top: 16px;
}

/* ── 12. Section 3 — Theoretical Foundation ──────────────────── */
#foundation { background: var(--bg-2); }
.theorist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.theorist-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.theorist-card:hover { border-color: var(--teal-border); transform: translateY(-2px); }
.theorist-card.open  { border-color: var(--teal-border); }
.tc-header {
  padding: 24px;
  cursor: pointer;
}
.tc-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.tc-work {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.tc-insight {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  font-style: italic;
}
.tc-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  background: none;
  border-left: none; border-right: none; border-bottom: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
}
.tc-trigger-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-3);
}
.tc-trigger .card-chevron { width: 16px; height: 16px; }
.theorist-card.open .tc-trigger .card-chevron { transform: rotate(180deg); color: var(--teal); }
.theorist-card.open .tc-trigger-lbl { color: var(--teal); }
.tc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.theorist-card.open .tc-body { max-height: 400px; }
.tc-body-inner {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

/* ── 13. Section 4 — Framework ────────────────────────────────── */
#framework { background: var(--bg); }
.framework-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.layer-stack { display: flex; flex-direction: column; gap: 6px; }
.layer-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  border-left: 3px solid transparent;
}
.layer-bar:hover { border-left-color: var(--teal-border); background: var(--bg-3); }
.layer-bar.active { border-left-color: var(--teal); background: var(--bg-3); }
.layer-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  min-width: 24px;
}
.layer-name { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; }
.layer-vsm { font-family: var(--mono); font-size: 10px; color: var(--text-3); min-width: 80px; text-align: right; }
.layer-panel {
  position: sticky;
  top: 80px;
  background: var(--bg-2);
  border: 1px solid var(--teal-border);
  border-radius: 8px;
  padding: 28px;
  min-height: 280px;
  display: none;
}
.layer-panel.active { display: block; }
.lp-number { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--teal); text-transform: uppercase; margin-bottom: 6px; }
.lp-name { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; letter-spacing: -0.01em; }
.lp-vsm { font-family: var(--mono); font-size: 11px; color: var(--text-2); margin-bottom: 20px; }
.lp-section { margin-bottom: 16px; }
.lp-section-label { font-family: var(--mono); font-size: 10px; color: var(--teal); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.lp-section p { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.lp-failure {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(231,76,60,0.08);
  border-left: 3px solid var(--red);
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}
.lp-failure strong { color: var(--red); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-family: var(--mono); display: block; margin-bottom: 4px; }

/* Principles summary grid */
.principles-summary {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.principles-summary-heading {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 24px;
}
.principle-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.p-chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: border-color 0.2s;
}
.p-chip:hover { border-color: var(--teal-border); }
.p-chip-num { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--teal); min-width: 20px; }
.p-chip-body {}
.p-chip-name { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.p-chip-line { font-size: 11px; color: var(--text-3); line-height: 1.4; }

/* ── 14. Section 5 — CASDAM Pattern ──────────────────────────── */
#pattern { background: var(--bg-2); }
/* MVS Interactive Diagram */
.mvs-interactive {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  margin-bottom: 56px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
  min-height: 400px;
}
.mvs-diagram-col {
  padding: 32px 28px 24px;
  border-right: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(26,188,156,0.03) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
}
#mvs-svg {
  width: 100%;
  height: auto;
  flex: 1;
}
.mvs-hint {
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* Info panel */
.mvs-info-col {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mvs-info-default,
.mvs-info-detail {
  transition: opacity 0.22s ease;
}
.mvs-info-detail { display: none; opacity: 0; }
.mvs-info-prompt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.mvs-info-intro {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 24px;
}
.mvs-tier-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mvs-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid;
}
.mvs-chip--teal { color: var(--teal); border-color: rgba(26,188,156,0.25); background: rgba(26,188,156,0.06); }
.mvs-chip--amber { color: var(--amber); border-color: rgba(243,156,18,0.25); background: rgba(243,156,18,0.06); }

/* Detail panel */
.mvs-detail-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.mvs-detail-abbr {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
}
.mvs-detail-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.mvs-detail-vsm {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
  margin-bottom: 20px;
  margin-top: 4px;
}
.mvs-detail-row {
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}
.mvs-detail-row--teal { border-left-color: rgba(26,188,156,0.5); }
.mvs-detail-row--red  { border-left-color: rgba(231,76,60,0.45); }
.mvs-detail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 5px;
}
.mvs-detail-label--red { color: #E74C3C; }
.mvs-detail-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 900px) {
  .mvs-interactive { grid-template-columns: 1fr; }
  .mvs-diagram-col { border-right: none; border-bottom: 1px solid var(--border); }
  .mvs-info-col { min-height: 280px; }
}

/* Contrast table */
.contrast-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 48px;
  font-size: 14px;
}
.contrast-table th {
  padding: 12px 20px;
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-2);
  border-bottom: 2px solid var(--border);
}
.contrast-table th:last-child { color: var(--teal); }
.contrast-table td {
  padding: 14px 20px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}
.contrast-table td:last-child { color: var(--text); }
.contrast-table tr:last-child td { border-bottom: none; }
.contrast-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ROI callout */
.roi-callout {
  background: linear-gradient(135deg, rgba(26,188,156,0.08) 0%, rgba(26,188,156,0.03) 100%);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 32px 40px;
  text-align: center;
}
.roi-callout p { font-size: 17px; color: var(--text); line-height: 1.6; max-width: 60ch; margin: 0 auto; }
.roi-callout strong { color: var(--teal); font-feature-settings: "tnum" 1, "lnum" 1; }
.roi-footnote { font-size: 13px; color: var(--text-2); margin-top: 8px; }

/* ── 15. Section 6 — Case Study ───────────────────────────────── */
#case-study { background: var(--bg); }
.stage-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.stage-tab {
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all 0.2s;
  cursor: pointer;
}
.stage-tab:hover { color: var(--text); }
.stage-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.stage-panels { background: var(--bg-2); border: 1px solid var(--border); border-top: none; border-radius: 0 0 8px 8px; }
.stage-panel { display: none; padding: 32px; }
.stage-panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.sp-left {}
.sp-left h3 { color: var(--text); margin-bottom: 8px; }
.sp-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.sp-model-tag {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(26,188,156,0.1);
  color: var(--teal);
  border: 1px solid var(--teal-border);
  border-radius: 4px;
  padding: 3px 8px;
}
.sp-human { font-size: 14px; color: var(--text-2); line-height: 1.65; margin-bottom: 20px; }
.sp-right {}
.sp-section { margin-bottom: 16px; }
.sp-section-label { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.sp-section p { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.schema-callout {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--teal);
}
.schema-arrow { color: var(--text-3); margin: 0 6px; }

/* FactList chain */
.factlist-chain {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.chain-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; letter-spacing: -0.01em; }
.chain-sub { font-size: 14px; color: var(--text-2); margin-bottom: 32px; max-width: 60ch; line-height: 1.6; }
.chain-nodes {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.chain-node {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  text-align: center;
  min-width: 130px;
  transition: border-color 0.2s;
}
.chain-node:hover { border-color: var(--teal-border); }
.cn-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }
.cn-val { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.chain-arrow {
  color: var(--teal);
  font-size: 18px;
  margin: 0 6px;
  opacity: 0.6;
  align-self: center;
}

/* ── 16. Section 7 — Numbers ──────────────────────────────────── */
#numbers { background: var(--bg-2); }
.big-nums-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-bottom: 56px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.big-num-card {
  background: var(--bg);
  padding: 48px 40px;
  text-align: center;
}
.big-num {
  font-size: clamp(52px, 6vw, 80px);
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
  font-feature-settings: "tnum" 1, "lnum" 1;
  display: block;
}
.big-num-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.big-num-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  max-width: 28ch;
  margin: 0 auto;
}
.big-num-caveat {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.5;
  max-width: 28ch;
  margin: 6px auto 0;
  font-style: italic;
}
.num-expand-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: color 0.2s;
}
.num-expand-trigger:hover { color: var(--teal); }
.num-expand-trigger .card-chevron { width: 14px; height: 14px; }
.num-expand-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}
.num-expand-body.open { max-height: 300px; }
.num-expand-body-inner {
  padding-top: 16px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.65;
  text-align: left;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

/* Governance metrics */
.gov-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gov-metric {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.gov-metric:hover { border-color: var(--teal-border); transform: translateY(-2px); }
.gov-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.gov-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.gov-desc { font-size: 12px; color: var(--text-2); line-height: 1.55; }

/* ── 17. Section 8 — Output ───────────────────────────────────── */
#output { background: var(--bg); }
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.screenshot-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.screenshot-card:hover { border-color: var(--teal-border); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.screenshot-card img { width: 100%; display: block; }
.screenshot-caption {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}
.sc-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.sc-callouts { list-style: none; }
.sc-callouts li {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  padding: 3px 0;
  padding-left: 12px;
  position: relative;
}
.sc-callouts li::before { content: '→'; position: absolute; left: 0; color: var(--teal); font-size: 10px; top: 4px; }
.output-cta { text-align: center; }

/* ── 18. Section 9 — Principles ───────────────────────────────── */
#principles { background: var(--bg-2); }
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.principle-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s;
}
.principle-card:hover { border-color: var(--teal-border); }
.principle-card.open  { border-color: var(--teal-border); }
.pc-trigger {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 18px 18px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}
.pc-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  min-width: 22px;
  padding-top: 2px;
}
.pc-content {}
.pc-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.pc-statement { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.pc-chevron { width: 14px; height: 14px; color: var(--text-3); flex-shrink: 0; margin-left: auto; transition: transform 0.3s, color 0.2s; margin-top: 2px; }
.principle-card.open .pc-chevron { transform: rotate(180deg); color: var(--teal); }
.pc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.principle-card.open .pc-body { max-height: 400px; }
.pc-body-inner {
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.pc-body-inner p + p { margin-top: 10px; }

/* ── 19. Section 10 — Wild ────────────────────────────────────── */
#wild { background: var(--bg); }
.wild-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.dossier-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  transition: border-color 0.25s, transform 0.25s;
}
.dossier-card:hover { border-color: var(--teal-border); transform: translateY(-2px); }
.dc-overline { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.dc-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 16px; letter-spacing: -0.01em; }
.dc-body { font-size: 14px; color: var(--text-2); line-height: 1.65; margin-bottom: 24px; }
.dc-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.dc-stat {}
.dc-stat-val { font-size: 22px; font-weight: 700; color: var(--teal); letter-spacing: -0.02em; font-feature-settings: "tnum" 1; }
.dc-stat-lbl { font-size: 12px; color: var(--text-2); }
.dc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
}
.dc-link svg { width: 14px; height: 14px; }

.contact-block {}
.bio-block { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.bio-block h3 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 12px; letter-spacing: -0.02em; }
.bio-body { font-size: 15px; color: var(--text-2); line-height: 1.7; max-width: 58ch; }
.contact-block h3 { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 12px; letter-spacing: -0.02em; }
.contact-block .contact-body { font-size: 16px; color: var(--text-2); line-height: 1.65; margin-bottom: 32px; max-width: 50ch; }
.contact-links { display: flex; gap: 16px; flex-wrap: wrap; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.2s;
}
.contact-link:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-glow); }
.contact-link svg { width: 16px; height: 16px; }

/* ── 20. Site Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}
.site-footer p { font-size: 13px; color: var(--text-3); }
.site-footer a { color: var(--text-3); }
.site-footer a:hover { color: var(--teal); }

/* ── 21. Utility: fact-id chip ────────────────────────────────── */
.fact-id {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-2);
  color: var(--teal);
  border: 1px solid var(--teal-border);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* ── 22. Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .section { padding: 96px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; min-height: auto; padding: 80px 0 60px; }
  .hero-visual { display: none; }
  .theorist-grid { grid-template-columns: 1fr; gap: 12px; }
  .framework-layout { grid-template-columns: 1fr; }
  .layer-panel { position: static; }
  .big-nums-row { grid-template-columns: 1fr; }
  .screenshots-grid { grid-template-columns: 1fr 1fr; }
  .wild-layout { grid-template-columns: 1fr; gap: 40px; }
  .gov-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .nav-inner { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .stage-panel.active { grid-template-columns: 1fr; gap: 24px; }
  .stage-tab { padding: 10px 14px; font-size: 11px; }
  .principles-grid { grid-template-columns: 1fr 1fr; }
  .screenshots-grid { grid-template-columns: 1fr; }
  .framework-layout { grid-template-columns: 1fr; }
  .thesis-text { font-size: 22px; }
  .thesis-quote::before,
  .thesis-quote::after { font-size: 64px; }
  .big-num { font-size: 60px; }
  .chain-nodes { flex-direction: column; align-items: center; }
  .chain-arrow { transform: rotate(90deg); }
}

@media (max-width: 480px) {
  .principles-grid { grid-template-columns: 1fr; }
  .gov-metrics { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* ── Trust chips (hero) ───────────────────────────────────────── */
.hero-trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--teal-subtle);
  border: 1px solid var(--teal-border);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  letter-spacing: 0.3px;
}
.trust-chip::before {
  content: '✓';
  font-weight: 700;
  font-size: 10px;
}

/* ── Governance proof log ─────────────────────────────────────── */
.proof-log-wrap {
  margin: 48px 0 0;
}
.proof-log-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}
.proof-log {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  overflow: hidden;
}
.proof-log-header {
  padding: 10px 20px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.5px;
}
.proof-log-line {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}
.proof-log-line:last-child { border-bottom: none; }
.log-time { color: var(--text-3); }
.log-event { color: var(--text); }
.log-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.log-badge--pass  { background: rgba(39,174,96,0.12);  color: #27AE60; border: 1px solid rgba(39,174,96,0.3); }
.log-badge--halt  { background: rgba(231,76,60,0.12);  color: #E74C3C; border: 1px solid rgba(231,76,60,0.3); }
.log-badge--info  { background: var(--teal-subtle);    color: var(--teal); border: 1px solid var(--teal-border); }
.log-badge--warn  { background: rgba(243,156,18,0.12); color: var(--amber); border: 1px solid rgba(243,156,18,0.3); }

@media (max-width: 600px) {
  .proof-log-line { grid-template-columns: 1fr auto; }
  .log-time { display: none; }
}

/* ── Principles overflow toggle ───────────────────────────────── */
.principle-hidden { display: none; }
.principle-hidden.revealed { display: block; }
.principles-toggle-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.show-principles-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 24px;
  color: var(--text-2);
  font-size: 13px;
  font-family: var(--sans);
  transition: border-color 0.2s, color 0.2s;
}
.show-principles-btn:hover {
  border-color: var(--teal-border);
  color: var(--teal);
}
.show-principles-btn svg {
  width: 14px; height: 14px;
  transition: transform 0.2s;
}
.show-principles-btn.open svg { transform: rotate(180deg); }
