/* ==========================================================================
   PONDULO — Clinical-Industrial Precision Design System
   Standalone Product Experience (zero WordPress dependencies)
   ========================================================================== */

:root {
  --bg: #08090c;
  --bg-elev: #101319;
  --bg-card: rgba(16, 19, 27, 0.78);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f5f7;
  --text-muted: #98a2b3;
  --red: #ef3b2d;
  --red-glow: rgba(239, 59, 45, 0.35);
  --cyan: #38bdf8;
  --yellow: #facc15;
  --green: #22c55e;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.14em 0.42em;
  border-radius: 5px;
  color: #e2e8f0;
}

/* ── TOPBAR ──────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: rgba(8, 9, 12, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 14px var(--red);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

.back-portfolio {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.42rem 0.85rem;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.back-portfolio:hover {
  border-color: var(--red);
  background: rgba(239, 59, 45, 0.12);
}

/* ── STICKY 3D SCROLLYTELLING STAGE ──────────────────────────────────────── */
.scrolly-stage {
  position: relative;
  width: 100%;
}

.viewport-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 68% 62% at 50% 48%, rgba(239, 59, 45, 0.09) 0%, rgba(16, 20, 30, 0.45) 45%, #08090c 100%);
  z-index: 1;
}

#pondulo-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

/* Loader */
.loader-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg);
  z-index: 50;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-ring {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--red);
  animation: spin 0.85s linear infinite;
}
.loader-text {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* HUD Top */
.stage-hud-top {
  position: absolute;
  top: 72px;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}
.hud-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.36rem 0.75rem;
  border-radius: 99px;
  background: rgba(12, 14, 20, 0.65);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  color: var(--text-muted);
}

/* Scroll Progress */
.scroll-progress-track {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 25;
}
.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--cyan));
}

/* ── SVG LEADER LINES + 3D PROJECTED HOTSPOT PINS ────────────────────────── */
.leaders-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 14;
}

.leader-line {
  stroke: rgba(255, 255, 255, 0.36);
  stroke-width: 1.25;
  fill: none;
}
.leader-line.accent-red { stroke: rgba(239, 59, 45, 0.72); }
.leader-line.accent-cyan { stroke: rgba(56, 189, 248, 0.72); }

.leader-dot {
  fill: var(--red);
  stroke: #ffffff;
  stroke-width: 1.5;
}
.leader-dot.accent-cyan { fill: var(--cyan); }

.hotspots-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}

.hotspot-pin {
  position: absolute;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.72rem 0.3rem 0.34rem;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(10, 12, 18, 0.88);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.28s ease, border-color 0.2s, background 0.2s;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.hotspot-pin.visible { opacity: 1; }
.hotspot-pin.hidden-pin { opacity: 0; pointer-events: none; }

.hotspot-pin.spotlight {
  border-color: rgba(239, 59, 45, 0.85);
  background: rgba(20, 12, 16, 0.92);
  box-shadow: 0 0 22px rgba(239, 59, 45, 0.28), 0 8px 24px rgba(0, 0, 0, 0.55);
}
.hotspot-pin[data-group="base"].spotlight {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.28), 0 8px 24px rgba(0, 0, 0, 0.55);
}

.hotspot-pin:hover,
.hotspot-pin.active {
  border-color: var(--red);
  background: rgba(239, 59, 45, 0.24);
  z-index: 20;
}

.hotspot-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.hotspot-pin[data-group="base"] .hotspot-num { background: var(--cyan); color: #06101a; }

/* ── COMPONENT DETAIL DRAWER ─────────────────────────────────────────────── */
.component-drawer {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%) translateX(24px);
  width: min(370px, calc(100vw - 2rem));
  padding: 1.4rem 1.45rem;
  border-radius: var(--radius);
  background: rgba(12, 15, 22, 0.92);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  z-index: 35;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.component-drawer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.drawer-close {
  position: absolute;
  top: 0.9rem; right: 0.95rem;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.drawer-close:hover { background: rgba(239, 59, 45, 0.25); border-color: var(--red); }

.drawer-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.drawer-title {
  font-family: var(--font-display);
  font-size: 1.28rem;
  margin: 0 0 0.2rem;
}
.drawer-subtitle {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--cyan);
  margin: 0 0 0.85rem;
}
.drawer-desc {
  font-size: 0.88rem;
  color: #d0d5dd;
  margin: 0 0 1rem;
  line-height: 1.55;
}
.drawer-specs {
  display: grid;
  gap: 0.45rem;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}
.drawer-spec-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.76rem;
}
.drawer-spec-row span { color: var(--text-muted); }
.drawer-spec-row strong { font-family: var(--font-mono); color: var(--text); text-align: right; }

/* ── INTERACTIVE INSPECTOR DOCK ──────────────────────────────────────────── */
.inspector-dock {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%) translateY(18px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.25rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  background: rgba(12, 15, 22, 0.86);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  max-width: calc(100vw - 2rem);
}

.inspector-dock.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dock-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}
.dock-group label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.dock-group strong {
  font-family: var(--font-mono);
  color: var(--text);
  min-width: 34px;
}
.dock-group input[type="range"] {
  width: 96px;
  accent-color: var(--red);
  cursor: pointer;
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.dock-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.42rem 0.78rem;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.dock-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.35); }
.dock-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--cyan);
  color: #e0f2fe;
}
.dock-btn-primary.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 0 18px var(--red-glow);
}

/* ── SCROLL CHAPTER OVERLAYS ─────────────────────────────────────────────── */
.chapters-container {
  position: relative;
  z-index: 5;
  margin-top: -100vh;
  pointer-events: none;
}

.chapter {
  min-height: 112vh;
  display: flex;
  align-items: center;
  padding: 6rem 5vw;
}

.chapter-hero {
  min-height: 108vh;
  align-items: flex-end;
  padding-bottom: 5.5rem;
}
.chapter-left { justify-content: flex-start; }
.chapter-right { justify-content: flex-end; }
.chapter-top {
  min-height: 112vh;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6.8rem;
}
.chapter-center {
  min-height: 105vh;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6.5rem;
}

.chapter-card {
  pointer-events: auto;
  width: min(440px, 90vw);
  padding: 1.65rem 1.75rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.hero-card {
  width: min(560px, 92vw);
  background: rgba(10, 12, 18, 0.72);
}

.compact-card {
  width: min(580px, 92vw);
  text-align: center;
  padding: 1.2rem 1.6rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.chapter-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
}

.hero-lead {
  font-size: 1.02rem;
  color: #d0d5dd;
  margin: 0 0 1.4rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.15rem;
}
.metric-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}
.metric-lbl {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.scroll-mouse {
  width: 16px; height: 26px;
  border: 1.5px solid var(--text-muted);
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
}
.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  width: 3px; height: 5px;
  border-radius: 2px;
  background: var(--red);
  transform: translateX(-50%);
  animation: wheel 1.5s infinite;
}
@keyframes wheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 9px); }
}

.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.chapter-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}
.chapter-card p {
  font-size: 0.93rem;
  color: #cbd5e1;
  margin: 0 0 0.85rem;
}
.chapter-card p:last-child { margin-bottom: 0; }

.spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}
.spec-chips span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #e2e8f0;
}

.feature-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: #cbd5e1;
  display: grid;
  gap: 0.55rem;
}

.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}
.legend-grid > div {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.legend-grid strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text);
}
.legend-grid span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── EDITORIAL SECTIONS ──────────────────────────────────────────────────── */
.editorial {
  position: relative;
  z-index: 20;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.section { padding: 6.5rem 0; }
.section-alt { background: #0c0e14; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-head {
  max-width: 760px;
  margin-bottom: 3.2rem;
}
.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 0.6rem;
}
.section-head h2, .team-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 0.9rem;
}
.section-intro {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin: 0;
}

/* Live Demo & Gallery */
.demo-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.video-frame {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.video-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.rec-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
}
.video-frame video {
  display: block;
  width: 100%;
  max-height: 580px;
  background: #000;
  object-fit: cover;
}
.video-caption {
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.photo-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}
.photo-card {
  margin: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.photo-card.span-2 { grid-column: span 2; }
.photo-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.photo-card.span-2 img { height: 290px; }
.photo-card:hover img { transform: scale(1.03); }
.photo-card figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Architecture Diagram */
.arch-diagram {
  display: grid;
  grid-template-columns: 1fr auto 1.25fr auto 1fr;
  align-items: stretch;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}
.arch-node {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.node-hub {
  border-color: rgba(239, 59, 45, 0.45);
  box-shadow: 0 0 36px rgba(239, 59, 45, 0.08);
}
.node-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
}
.node-hub .node-tag { color: var(--red); }
.arch-node h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0;
}
.arch-node p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}
.node-meta {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #cbd5e1;
}
.node-sub-links {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.arch-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  min-width: 120px;
}
.link-label {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}
.link-label.link-analog {
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(250, 204, 21, 0.35);
}
.link-label strong { display: block; color: var(--text); margin-bottom: 0.15rem; }
.link-label span { color: var(--text-muted); font-size: 0.64rem; }
.link-arrow { font-size: 1.2rem; color: var(--text-muted); }

/* Decisions Grid */
.decisions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.decision-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.45rem;
}
.dec-icon { font-size: 1.3rem; display: block; margin-bottom: 0.6rem; }
.decision-card h4 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 0 0 0.5rem;
}
.decision-card p { font-size: 0.88rem; color: var(--text-muted); margin: 0; }

/* Scenarios Tabs */
.scenario-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.8rem;
}
.tab-btn {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.72rem 1.2rem;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 8px 24px var(--red-glow);
}

.scenario-panel {
  display: none;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.scenario-panel.active { display: grid; }
.scenario-copy h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0 0 0.7rem;
}
.scenario-copy p { color: var(--text-muted); margin: 0 0 1rem; font-size: 0.94rem; }
.scenario-copy ul { margin: 0; padding-left: 1.15rem; display: grid; gap: 0.55rem; font-size: 0.9rem; color: #d0d5dd; }

.mock-screen {
  background: #06090f;
  border: 3px solid #283042;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.mock-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #0f172a;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan);
  border-bottom: 1px solid #1e293b;
}
.mock-body { padding: 1.4rem; text-align: center; display: grid; gap: 1rem; }
.mock-sub { font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); }
.mock-total { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--yellow); }
.mock-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.mock-btns span {
  padding: 0.75rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.84rem;
  position: relative;
  overflow: hidden;
}
.mb-blue { background: #0284c7; color: #fff; }
.mb-green { background: #16a34a; color: #fff; }
.mb-focus { outline: 2px solid var(--yellow); }
.mb-dwell {
  position: absolute; left: 0; bottom: 0; height: 4px; width: 72%;
  background: var(--yellow);
}
.vitals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.vitals-grid > div {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 0.8rem;
}
.vitals-grid small { display: block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); }
.vitals-grid strong { font-family: var(--font-display); font-size: 1.3rem; color: #fff; }

/* Roadmap Grid */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.road-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.45rem;
  transition: border-color 0.25s, transform 0.25s;
}
.road-card:hover { border-color: rgba(239, 59, 45, 0.45); transform: translateY(-3px); }
.road-phase {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 0.55rem;
}
.road-card h4 { font-family: var(--font-display); font-size: 1.08rem; margin: 0 0 0.5rem; }
.road-card p { font-size: 0.86rem; color: var(--text-muted); margin: 0; }

/* Team Banner */
.team-banner {
  background: linear-gradient(155deg, rgba(20, 24, 34, 0.9), rgba(10, 12, 18, 0.95));
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 3rem 2.5rem;
  text-align: center;
}
.team-banner .section-intro { max-width: 720px; margin: 0 auto 2.2rem; }
.team-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.2rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem 2rem;
  border-radius: 14px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.partner-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  text-align: left;
}
.member-card {
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
.member-highlight {
  border-color: rgba(239, 59, 45, 0.55);
  background: rgba(239, 59, 45, 0.08);
}
.member-card strong { display: block; font-size: 0.96rem; margin-bottom: 0.15rem; }
.member-card span { font-size: 0.78rem; color: var(--text-muted); }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: #06070a;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; }
.footer-links { display: flex; gap: 1.5rem; font-family: var(--font-mono); font-size: 0.78rem; }
.footer-links a:hover { color: var(--text); }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .demo-grid { grid-template-columns: 1fr; }
  .arch-diagram { grid-template-columns: 1fr; }
  .arch-link { flex-direction: row; min-width: 0; }
  .link-arrow { transform: rotate(90deg); }
  .roadmap-grid { grid-template-columns: 1fr 1fr; }
  .scenario-panel { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .chapter { padding: 5rem 4vw; align-items: flex-end; }
  .chapter-card { padding: 1.25rem; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .decisions-grid, .roadmap-grid, .photo-mosaic { grid-template-columns: 1fr; }
  .photo-card.span-2 { grid-column: span 1; }
  .inspector-dock { border-radius: 18px; padding: 0.75rem 0.9rem; gap: 0.65rem; }
  .component-drawer { right: 1rem; left: 1rem; width: auto; top: auto; bottom: 5.5rem; transform: translateY(20px); }
  .component-drawer.open { transform: translateY(0); }
  .team-banner { padding: 2rem 1.2rem; }
}
