:root {
  --surface-base: #040d1a;
  --surface-raised: #071629;
  --surface-overlay: rgba(7, 22, 41, 0.92);
  --surface-soft: rgba(10, 30, 56, 0.58);
  --cyan: #38bdf8;
  --magenta: #e879f9;
  --amber: #f59e0b;
  --teal: #00e5c0;
  --red: #f87171;
  --orange: #fb923c;
  --green: #34d399;
  --text-primary: #e8f4ff;
  --text-body: #cdd8e4;
  --text-muted: #94a7b8;
  --text-dim: #5f7486;
  --text-ghost: #354b61;
  --border-subtle: rgba(56, 189, 248, 0.08);
  --border-default: rgba(56, 189, 248, 0.14);
  --border-strong: rgba(56, 189, 248, 0.28);
  --gradient: linear-gradient(135deg, #38bdf8 0%, #e879f9 100%);
  --gradient-text: linear-gradient(90deg, #38bdf8 0%, #e879f9 100%);
  --shadow-cyan: 0 0 48px rgba(56, 189, 248, 0.12);
  --shadow-magenta: 0 0 52px rgba(232, 121, 249, 0.10);
  --font-head: 'Inter', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-lg: 8px;
  --radius-xl: 14px;
  --radius-2xl: 22px;
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text-body);
  background-color: #040d1a;
  background-image:
    radial-gradient(circle at 12% 16%, rgba(56, 189, 248, 0.18), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(232, 121, 249, 0.12), transparent 24%),
    radial-gradient(circle at 70% 72%, rgba(0, 229, 192, 0.08), transparent 18%),
    linear-gradient(180deg, #030b15 0%, #040d1a 38%, #061120 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.page-shell {
  position: relative;
  overflow: visible;
}

.page-shell::before,
.page-shell::after {
  content: '';
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  opacity: 0.26;
  z-index: 0;
}

.page-shell::before {
  top: -12rem;
  left: -10rem;
  background: rgba(56, 189, 248, 0.32);
}

.page-shell::after {
  right: -12rem;
  top: 26rem;
  background: rgba(232, 121, 249, 0.18);
}

.hero,
.story-shell,
.closing {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 28px 40px;
}

.hero-shell {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 36px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(42px, 5.8vw, 72px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--text-primary);
  max-width: 12ch;
}

.hero-headline .grad {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 58ch;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
}

.role-row,
.hero-actions,
.proof-grid,
.surface-legend,
.chapter-pills,
.action-row,
.output-row,
.closing-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.role-pill,
.hero-btn,
.pill,
.action-pill,
.output-pill,
.closing-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
}

.role-pill,
.pill {
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(10, 30, 56, 0.38);
  color: var(--text-muted);
}

.hero-actions {
  margin-top: 6px;
}

.hero-btn {
  padding: 12px 18px;
  border: 1px solid var(--border-default);
  background: rgba(10, 30, 56, 0.45);
  color: var(--text-body);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-btn:hover,
.closing-pill:hover {
  transform: translateY(-1px);
}

.hero-btn-primary {
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.32);
  box-shadow: var(--shadow-cyan);
}

.hero-stage {
  position: relative;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(9, 24, 44, 0.9) 0%, rgba(6, 16, 31, 0.96) 100%);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-cyan), var(--shadow-magenta);
  overflow: hidden;
}

.hero-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(232, 121, 249, 0.04));
  pointer-events: none;
}

.hero-stage-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 1;
}

.stage-chip {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.10);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.20);
}

.hero-stage-title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  max-width: 14ch;
}

.hero-stage-copy {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 34ch;
}

.proof-grid {
  margin-top: 12px;
}

.proof-card {
  flex: 1 1 180px;
  min-height: 136px;
  padding: 18px 16px;
  border-radius: var(--radius-xl);
  background: rgba(7, 22, 41, 0.72);
  border: 1px solid var(--border-subtle);
}

.proof-card .label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.proof-card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.proof-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.proof-card-gateway .label { color: var(--cyan); }
.proof-card-sdk .label { color: var(--teal); }
.proof-card-sensor .label { color: var(--magenta); }

.story-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: minmax(380px, 46%) minmax(0, 54%);
  gap: 28px;
}

.sticky-stage {
  position: relative;
}

.sticky-shell {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - 36px);
}

.dot-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 14px 28px;
}

.dot-nav-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--text-ghost);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dot-label {
  position: absolute;
  top: 16px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 7px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-ghost);
  white-space: nowrap;
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.dot-nav-dot.active .dot-label { opacity: 1; color: var(--cyan); }

.dot-nav-dot.active {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.dot-nav-dot:hover {
  transform: translateY(-1px);
}

.stage-panel {
  flex: 1;
  min-height: 0;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(10, 27, 49, 0.92) 0%, rgba(4, 14, 28, 0.98) 100%);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-cyan);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.surface-legend {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(4, 13, 26, 0.52);
  border: 1px solid var(--border-subtle);
}

.legend-item {
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  opacity: 0.38;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.legend-item.active {
  opacity: 1;
  transform: translateY(-1px);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.legend-name {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legend-note {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

.runtime-map {
  display: flex;
  gap: 6px;
  align-items: stretch;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(4, 13, 26, 0.52);
  border: 1px solid var(--border-subtle);
}

.map-step {
  flex: 1;
  position: relative;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(10, 30, 56, 0.38);
  text-align: center;
  min-width: 0;
  overflow: hidden;
  opacity: 0.35;
  transition: border-color 0.25s ease, background 0.25s ease, opacity 0.25s ease;
}

.map-step::before {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 0;
  height: 4px;
  border-radius: 0 0 4px 4px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.map-step.active {
  opacity: 1;
  border-color: var(--border-default);
  background: rgba(10, 30, 56, 0.68);
}

.map-step.state-gateway::before,
.map-step.state-sdk::before,
.map-step.state-sensor::before,
.map-step.state-gw-sdk::before,
.map-step.state-sdk-sensor::before,
.map-step.state-gw-sensor::before,
.map-step.state-all::before {
  opacity: 1;
}

.map-step.state-gateway::before { background: var(--cyan); }
.map-step.state-sdk::before { background: var(--teal); }
.map-step.state-sensor::before { background: var(--magenta); }
.map-step.state-gw-sdk::before { background: linear-gradient(180deg, var(--cyan) 50%, var(--teal) 50%); }
.map-step.state-sdk-sensor::before { background: linear-gradient(180deg, var(--teal) 50%, var(--magenta) 50%); }
.map-step.state-gw-sensor::before { background: linear-gradient(180deg, var(--cyan) 50%, var(--magenta) 50%); }
.map-step.state-all::before { background: linear-gradient(180deg, var(--cyan) 0%, var(--teal) 50%, var(--magenta) 100%); }

.map-label {
  margin-bottom: 2px;
}

.map-name {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.map-index {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  flex-shrink: 0;
}

.map-note {
  display: none;
}

.map-index {
  font-size: 7px;
}

.stage-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(4, 13, 26, 0.52);
  border: 1px solid var(--border-subtle);
}

.stage-trust {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-ghost);
}

.stage-verdict {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.stage-verdict.show { opacity: 1; }
.verdict-escalate { background: rgba(248, 113, 113, 0.14); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.26); }
.verdict-review { background: rgba(245, 158, 11, 0.14); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.24); }

.scene-cards-wrap {
  position: relative;
  flex: 1;
  min-height: 240px;
}

.scene-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(7, 22, 41, 0.86) 0%, rgba(4, 13, 26, 0.94) 100%);
  border: 1px solid var(--border-subtle);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  overflow-y: auto;
}

.scene-card.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scene-tag {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scene-tag-dim { background: rgba(95, 116, 134, 0.12); color: var(--text-dim); border: 1px solid rgba(95, 116, 134, 0.2); }
.scene-tag-gateway { background: rgba(56, 189, 248, 0.12); color: var(--cyan); border: 1px solid rgba(56, 189, 248, 0.24); }
.scene-tag-sdk { background: rgba(0, 229, 192, 0.12); color: var(--teal); border: 1px solid rgba(0, 229, 192, 0.24); }
.scene-tag-sensor { background: rgba(232, 121, 249, 0.12); color: var(--magenta); border: 1px solid rgba(232, 121, 249, 0.24); }
.scene-tag-gradient { background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(232, 121, 249, 0.12)); color: var(--text-body); border: 1px solid var(--border-default); }

.scene-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}

.scene-copy {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.flow-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 16px;
  background: rgba(10, 30, 56, 0.38);
  border: 1px solid var(--border-subtle);
}

.flow-node,
.insight-card,
.evidence-key,
.evidence-value {
  font-family: var(--font-mono);
}

.flow-node {
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: rgba(4, 13, 26, 0.44);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.flow-node-danger { color: var(--red); border-color: rgba(248, 113, 113, 0.28); background: rgba(248, 113, 113, 0.06); }
.flow-node-warn { color: var(--amber); border-color: rgba(245, 158, 11, 0.28); background: rgba(245, 158, 11, 0.06); }
.flow-node-dim { color: var(--text-ghost); }

.flow-arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-ghost);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.insight-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(10, 30, 56, 0.38);
  border: 1px solid var(--border-subtle);
}

.insight-name {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.insight-card h4 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.insight-card p {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

.insight-gateway .insight-name { color: var(--cyan); }
.insight-sdk .insight-name { color: var(--teal); }
.insight-sensor .insight-name { color: var(--magenta); }

.evidence-panel {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(4, 13, 26, 0.52);
  border: 1px solid var(--border-subtle);
}

.evidence-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.05);
}

.evidence-row:last-child { border-bottom: none; }

.evidence-key {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.evidence-value {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-body);
  text-align: right;
}

.ev-red { color: var(--red); }
.ev-amber { color: var(--amber); }
.ev-teal { color: var(--teal); }
.ev-cyan { color: var(--cyan); }
.ev-green { color: var(--green); }

.engine-stack,
.posture-grid {
  display: grid;
  gap: 8px;
}

.engine-step {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  background: rgba(10, 30, 56, 0.45);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-body);
}

.action-pill {
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
}

.pill-allow { background: rgba(52, 211, 153, 0.12); color: var(--green); border-color: rgba(52, 211, 153, 0.24); }
.pill-log { background: rgba(56, 189, 248, 0.12); color: var(--cyan); border-color: rgba(56, 189, 248, 0.24); }
.pill-review { background: rgba(245, 158, 11, 0.12); color: var(--amber); border-color: rgba(245, 158, 11, 0.24); }
.pill-block { background: rgba(251, 146, 60, 0.12); color: var(--orange); border-color: rgba(251, 146, 60, 0.24); }
.pill-escalate { background: rgba(248, 113, 113, 0.12); color: var(--red); border-color: rgba(248, 113, 113, 0.24); }

.posture-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.posture-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(10, 30, 56, 0.40);
  border: 1px solid var(--border-subtle);
}

.posture-name {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.posture-desc {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

.chapters {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 18vh;
}

.chapter {
  min-height: 92vh;
  display: flex;
  align-items: center;
}

.chapter-card {
  width: min(680px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(9, 23, 43, 0.84) 0%, rgba(7, 18, 34, 0.94) 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
  position: relative;
  overflow: hidden;
}

.chapter-card::before {
  content: '';
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--gradient);
  opacity: 0.72;
}

.chapter-card > * + * {
  margin-top: 16px;
}

/* Fix 1: Light chapter card variant */
.chapter-card-light {
  background: linear-gradient(180deg, #f0f4f8 0%, #e8edf2 100%);
  border-color: rgba(15, 26, 42, 0.10);
}

.chapter-card-light::before {
  opacity: 0.38;
}

.chapter-card-light .chapter-headline {
  color: #0f1a2a;
}

.chapter-card-light .chapter-copy {
  color: #3a4a5c;
}

.chapter-card-light .chapter-num {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.22);
}

.chapter-card-light .pill {
  background: rgba(15, 26, 42, 0.06);
  border-color: rgba(15, 26, 42, 0.12);
  color: #3a4a5c;
}

.chapter-card-light .takeaway {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.18);
  color: #0f1a2a;
}

.chapter-card-light .compare-card {
  background: rgba(15, 26, 42, 0.04);
  border-color: rgba(15, 26, 42, 0.10);
}

.chapter-card-light .compare-card h3 {
  color: #0f1a2a;
}

.chapter-card-light .compare-card p {
  color: #3a4a5c;
}

.chapter-card-light .posture-card {
  background: rgba(15, 26, 42, 0.04);
  border-color: rgba(15, 26, 42, 0.10);
}

.chapter-card-light .posture-desc {
  color: #3a4a5c;
}

.chapter-card-light .output-pill {
  background: rgba(15, 26, 42, 0.06);
  border-color: rgba(15, 26, 42, 0.12);
  color: #3a4a5c;
}

.chapter-card-light .action-pill {
  border-color: rgba(15, 26, 42, 0.12);
}

.chapter-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.chapter-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.chapter-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-red { color: var(--red); }
.eyebrow-cyan { color: var(--cyan); }
.eyebrow-teal { color: var(--teal); }
.eyebrow-magenta { color: var(--magenta); }
.eyebrow-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chapter-card-light .eyebrow-cyan { color: #0369a1; }
.chapter-card-light .eyebrow-teal { color: #0f766e; }
.chapter-card-light .eyebrow-magenta { color: #a21caf; }
.chapter-card-light .eyebrow-gradient {
  background: linear-gradient(90deg, #0369a1 0%, #a21caf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.chapter-card-light .chapter-num { color: #0369a1; }
.chapter-card-light .maturity-badge { background: rgba(162, 28, 175, 0.12); color: #a21caf; border-color: rgba(162, 28, 175, 0.24); }
.chapter-card-light .compare-label { color: inherit; }
.chapter-card-light .compare-gateway .compare-label { color: #0369a1; }
.chapter-card-light .compare-sdk .compare-label { color: #0f766e; }
.chapter-card-light .compare-sensor .compare-label { color: #a21caf; }

.chapter-headline {
  font-family: var(--font-head);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  max-width: 20ch;
}

.chapter-copy {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-body);
  max-width: 56ch;
}

.takeaway {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.compare-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: rgba(10, 30, 56, 0.38);
}

.compare-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.compare-card h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.compare-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.compare-gateway .compare-label { color: var(--cyan); }
.compare-sdk .compare-label { color: var(--teal); }
.compare-sensor .compare-label { color: var(--magenta); }

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

.maturity-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(232, 121, 249, 0.12);
  color: var(--magenta);
  border: 1px solid rgba(232, 121, 249, 0.24);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.closing {
  padding: 84px 24px 100px;
}

.closing-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(7, 22, 41, 0.82) 0%, rgba(4, 13, 26, 0.94) 100%);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-cyan);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.closing-headline {
  font-family: var(--font-head);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  max-width: 14ch;
}

.closing-copy {
  max-width: 58ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}

.closing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.closing-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(10, 30, 56, 0.40);
  border: 1px solid var(--border-subtle);
}

.closing-card h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.closing-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.closing-pill {
  padding: 12px 18px;
  border: 1px solid var(--border-default);
  background: rgba(10, 30, 56, 0.45);
  color: var(--text-body);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.closing-pill-primary {
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.30);
  background: rgba(56, 189, 248, 0.10);
  box-shadow: var(--shadow-cyan);
}

.closing-trust {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px dashed rgba(56, 189, 248, 0.18);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-ghost);
}

@media (max-width: 1120px) {
  .hero-shell,
  .story-shell {
    grid-template-columns: 1fr;
  }

  .hero-headline,
  .stage-title,
  .chapter-headline,
  .closing-headline {
    max-width: none;
  }

  .sticky-shell {
    position: static;
    height: auto;
  }

  .scene-cards-wrap {
    min-height: 280px;
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 36px;
  }

  .hero-stage,
  .stage-panel,
  .chapter-card,
  .closing-shell {
    padding: 20px;
  }

  .compare-grid,
  .closing-grid,
  .posture-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .chapters {
    gap: 10vh;
  }

  .chapter {
    min-height: auto;
  }

  .chapter-copy,
  .hero-sub,
  .closing-copy {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Closing inline contact form ── */
.closing-form-wrap {
  margin-top: 24px; padding: 24px;
  border-radius: 16px;
  background: rgba(10, 30, 56, 0.6);
  border: 2px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 8px 32px rgba(56, 189, 248, 0.08);
}
.closing-form-heading { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.closing-form-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.closing-form { display: flex; flex-direction: column; gap: 12px; }
.closing-form-row { display: flex; gap: 10px; align-items: stretch; }
.closing-input {
  font-family: var(--font-body); font-size: 14px;
  padding: 12px 16px; border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px; background: rgba(4, 13, 26, 0.6);
  color: var(--text-primary); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; min-width: 0; flex: 1;
}
.closing-input-wide { flex: 2; }
.closing-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12); }
.closing-input::placeholder { color: var(--text-dim); }
.closing-submit {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 12px 28px; border: none;
  border-radius: 10px; background: var(--cyan);
  color: #040d1a; cursor: pointer; white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.closing-submit:hover { background: #67d3ff; transform: translateY(-1px); }
.closing-form-status { font-size: 13px; padding: 10px 14px; border-radius: 8px; margin-top: 4px; }
.closing-form-status.success { background: rgba(52,211,153,0.1); color: #34d399; border: 1px solid rgba(52,211,153,0.2); }
.closing-form-status.error { background: rgba(248,113,113,0.1); color: #f87171; border: 1px solid rgba(248,113,113,0.2); }
@media (max-width: 760px) {
  .closing-form-row { flex-direction: column; }
  .closing-input-wide { flex: 1; }
}

/* ── Mid-page CTA (inserted between chapters) ── */
.midpage-cta {
  margin: 28px 0;
  padding: 22px 26px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(6, 182, 212, 0.06) 100%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.08);
}
.midpage-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.midpage-cta-copy { flex: 1; min-width: 260px; }
.midpage-cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}
.midpage-cta-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.midpage-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #e879f9 100%);
  color: #040d1a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.midpage-cta-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
  box-shadow: 0 0 30px rgba(232, 121, 249, 0.26);
}
.midpage-cta-light {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.06) 0%, rgba(14, 116, 144, 0.04) 100%);
  border-color: rgba(14, 116, 144, 0.18);
}
.midpage-cta-light .midpage-cta-eyebrow { color: #0e7490; }
.midpage-cta-light .midpage-cta-title { color: #0a1e38; }
@media (max-width: 680px) {
  .midpage-cta-inner { flex-direction: column; align-items: flex-start; }
  .midpage-cta-btn { width: 100%; justify-content: center; }
}

/* ── Regulatory & exposure urgency strip (below hero) ── */
.urgency-strip {
  margin: 18px 0 28px;
  padding: 20px 26px;
  border-radius: 14px;
  background: rgba(10, 30, 56, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.18);
}
.urgency-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.urgency-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 2px solid rgba(56, 189, 248, 0.4);
  padding-left: 14px;
}
.urgency-stat {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.urgency-label {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}
.urgency-caveat {
  font-style: italic;
  color: var(--text-dim);
  font-size: 11px;
  display: block;
  margin-top: 2px;
}
.urgency-src {
  font-size: 11px;
  color: var(--cyan);
  text-decoration: none;
  margin-top: auto;
  padding-top: 6px;
  letter-spacing: 0.02em;
}
.urgency-src:hover { text-decoration: underline; }
@media (max-width: 920px) {
  .urgency-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .urgency-inner { grid-template-columns: 1fr; }
  .urgency-strip { padding: 16px 18px; }
}
