/* ============================================================
   NONBLINKER  -  Safety Vision Design System
   ============================================================ */

:root {
  /* Brand */
  --primary: #082B45;
  --secondary: #0D1D2A;
  --accent: #FFB21A;
  --cyan: #35C7D9;
  --bg: #F5F8F7;
  --white: #FFFFFF;
  --text: #12202A;
  --muted: #667781;
  --success: #22A06B;
  --warning: #FFB21A;
  --danger: #E05252;

  /* Derived */
  --primary-soft: rgba(8, 43, 69, 0.06);
  --accent-soft: rgba(255, 178, 26, 0.14);
  --cyan-soft: rgba(53, 199, 217, 0.12);
  --success-soft: rgba(34, 160, 107, 0.12);
  --danger-soft: rgba(224, 82, 82, 0.12);
  --nav-h: 76px;
  --nav-h-scrolled: 64px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(8, 43, 69, 0.04);
  --shadow-md: 0 8px 28px rgba(8, 43, 69, 0.08);
  --shadow-lg: 0 20px 50px rgba(8, 43, 69, 0.12);
  --max: 1200px;
  --font-display: "Manrope", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "Inter", "IBM Plex Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(8, 43, 69, 0.22);
}
.btn-primary:hover {
  background: #0a3556;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(8, 43, 69, 0.28);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid rgba(8, 43, 69, 0.22);
}
.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.btn-accent {
  background: var(--accent);
  color: var(--secondary);
  box-shadow: 0 4px 14px rgba(255, 178, 26, 0.35);
}
.btn-accent:hover {
  background: #ffc14a;
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-arrow::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- Eyebrow / Section labels ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.section-head {
  max-width: 640px;
  margin-bottom: 3rem;
}
.section-head.centered {
  text-align: center;
  margin-inline: auto;
}
.section-head h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
}
.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
}

.section {
  padding: clamp(4.5rem, 8vw, 7rem) 0;
  position: relative;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: height 0.3s var(--ease), box-shadow 0.3s, background 0.3s, border-color 0.3s;
}

.nav.scrolled {
  height: var(--nav-h-scrolled);
  box-shadow: 0 4px 24px rgba(8, 43, 69, 0.07);
  border-bottom-color: rgba(8, 43, 69, 0.06);
  background: rgba(255, 255, 255, 0.94);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.logo-mark { width: 36px; height: 36px; }
.logo-word {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--primary);
}
.logo-word .strong { font-weight: 800; }
.logo-word .med { font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-links a {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-soft); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.nav-actions .btn { padding: 0.65rem 1.1rem; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(8, 43, 69, 0.12);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--primary);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--primary);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 7vw, 6rem);
  background:
    radial-gradient(ellipse 80% 60% at 85% 40%, rgba(53, 199, 217, 0.07), transparent),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(255, 178, 26, 0.05), transparent),
    linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(8, 43, 69, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 43, 69, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  position: relative;
}

.hero-copy .eyebrow { color: var(--primary); opacity: 0.7; }

.hero h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.6rem);
  margin-bottom: 1.35rem;
  max-width: 14ch;
}

.hero h1 .highlight {
  position: relative;
  display: inline;
}
.hero h1 .highlight::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.08em;
  width: 100%;
  height: 0.12em;
  background: var(--accent);
  opacity: 0.85;
  border-radius: 2px;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 42ch;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}

/* Hero visualization */
.hero-visual {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, #0a314f 0%, #0D1D2A 55%, #061820 100%);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(53, 199, 217, 0.12);
}

.cabin-scene {
  position: absolute;
  inset: 0;
}

/* Road perspective */
.road-plane {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 58%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(8, 30, 45, 0.4) 100%),
    linear-gradient(90deg, #1a3a4a 0%, #243d4a 40%, #1e3544 60%, #152a38 100%);
  clip-path: polygon(35% 0%, 65% 0%, 100% 100%, 0% 100%);
}

.lane-lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.lane-line {
  position: absolute;
  width: 3px;
  height: 120%;
  background: linear-gradient(180deg, transparent, rgba(255, 178, 26, 0.55), transparent);
  top: -10%;
  transform-origin: top center;
  animation: laneFlow 3.5s linear infinite;
}
.lane-line.l { left: 42%; transform: rotate(8deg); }
.lane-line.r { left: 56%; transform: rotate(-8deg); animation-delay: -1.75s; }

@keyframes laneFlow {
  0% { opacity: 0.3; transform: translateY(-20%) rotate(var(--rot, 8deg)); }
  50% { opacity: 0.8; }
  100% { opacity: 0.3; transform: translateY(30%) rotate(var(--rot, 8deg)); }
}
.lane-line.l { --rot: 8deg; }
.lane-line.r { --rot: -8deg; }

/* Dashboard / windshield horizon */
.horizon {
  position: absolute;
  left: 0; right: 0;
  top: 38%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(53, 199, 217, 0.35), transparent);
}

/* Driver silhouette (non-identifying) */
.driver-zone {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  width: 42%;
  max-width: 180px;
}

.driver-silhouette {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 50% 50% 42% 42%;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(180, 200, 210, 0.25) 0%, transparent 55%),
    linear-gradient(180deg, rgba(100, 130, 150, 0.35) 0%, rgba(40, 60, 80, 0.5) 100%);
  border: 1.5px solid rgba(53, 199, 217, 0.45);
  position: relative;
  animation: shieldPulse 4s ease-in-out infinite;
}

@keyframes shieldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53, 199, 217, 0.25); }
  50% { box-shadow: 0 0 0 12px rgba(53, 199, 217, 0); }
}

.detection-frame {
  position: absolute;
  inset: -8%;
  border: 1.5px solid var(--cyan);
  border-radius: 8px;
  opacity: 0.7;
  pointer-events: none;
}
.detection-frame::before,
.detection-frame::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--cyan);
  border-style: solid;
}
.detection-frame::before {
  top: -1px; left: -1px;
  border-width: 2px 0 0 2px;
}
.detection-frame::after {
  bottom: -1px; right: -1px;
  border-width: 0 2px 2px 0;
}

.gaze-line {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 2px;
  height: 55%;
  background: linear-gradient(180deg, var(--cyan), rgba(255, 178, 26, 0.6));
  transform-origin: top center;
  transform: translateX(-50%) rotate(6deg);
  opacity: 0.75;
  animation: gazeShift 8s ease-in-out infinite;
}

@keyframes gazeShift {
  0%, 100% { transform: translateX(-50%) rotate(4deg); opacity: 0.8; }
  33% { transform: translateX(-50%) rotate(-8deg); opacity: 0.55; }
  66% { transform: translateX(-50%) rotate(2deg); opacity: 0.85; }
}

.attention-zone {
  position: absolute;
  left: 38%;
  top: 42%;
  width: 24%;
  height: 28%;
  border: 1.5px dashed rgba(255, 178, 26, 0.55);
  border-radius: 50% 50% 40% 40%;
  background: rgba(255, 178, 26, 0.06);
  animation: zoneBreathe 5s ease-in-out infinite;
}

@keyframes zoneBreathe {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.06); opacity: 1; }
}

.attention-path-label {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
  white-space: nowrap;
}

/* HUD metrics panel */
.hud-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: min(46%, 200px);
  background: rgba(13, 29, 42, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(53, 199, 217, 0.2);
  border-radius: 10px;
  padding: 0.85rem;
  font-family: var(--font-display);
}

.hud-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.hud-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hud-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.68rem;
}
.hud-row:last-child { border-bottom: none; }
.hud-row .label { color: rgba(255, 255, 255, 0.45); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.hud-row .value { color: #fff; font-weight: 700; font-size: 0.78rem; }
.hud-row .value.good { color: var(--success); }
.hud-row .value.warn { color: var(--accent); }
.hud-row .value.state-label {
  transition: color 0.4s;
}

/* Attention Shield overlay in hero */
.attention-shield {
  position: absolute;
  inset: 8% 12%;
  border: 1px solid rgba(53, 199, 217, 0.18);
  border-radius: 40% 40% 48% 48%;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(53, 199, 217, 0.05), transparent 70%);
  animation: shieldPulse 5s ease-in-out infinite;
}

.detection-state {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 0.45rem 0.75rem;
  background: rgba(13, 29, 42, 0.8);
  border: 1px solid rgba(53, 199, 217, 0.25);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-transform: uppercase;
  transition: color 0.4s, border-color 0.4s;
}
.detection-state.warn { color: var(--accent); border-color: rgba(255, 178, 26, 0.4); }
.detection-state.good { color: var(--success); border-color: rgba(34, 160, 107, 0.4); }

/* ============================================================
   TRUST STRIP
   ============================================================ */
.trust {
  padding: 3rem 0;
  background: var(--white);
  border-block: 1px solid rgba(8, 43, 69, 0.06);
}
.trust h2 {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1.75rem;
  letter-spacing: -0.01em;
}
.trust-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}
.trust-labels li {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary);
  opacity: 0.55;
  padding: 0.5rem 0;
}

/* ============================================================
   PROBLEM / COMPARISON
   ============================================================ */
.problem {
  background: var(--bg);
}
.problem-statement {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem;
}
.problem-statement h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  line-height: 1.25;
}
.problem-statement h2 .dim { color: var(--muted); font-weight: 550; }
.problem-statement h2 .accent-line {
  display: block;
  margin-top: 0.5rem;
  color: var(--primary);
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.compare-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid rgba(8, 43, 69, 0.08);
}
.compare-card.nonblinker {
  background: var(--primary);
  border-color: transparent;
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.compare-card h3 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  color: var(--muted);
}
.compare-card.nonblinker h3 { color: var(--cyan); }

.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.05rem;
}
.compare-card.nonblinker .flow-step { color: #fff; }
.flow-steps > .arrow-down {
  color: var(--muted);
  opacity: 0.5;
  font-size: 0.85rem;
  padding: 0.15rem 0 0.15rem 0.85rem;
}
.compare-card.nonblinker .flow-steps > .arrow-down { color: var(--accent); opacity: 0.8; }
.flow-step .num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}
.compare-card.nonblinker .flow-step .num {
  background: rgba(53, 199, 217, 0.15);
  color: var(--cyan);
}

/* ============================================================
   DRIVER MONITORING (dark)
   ============================================================ */
.monitoring {
  background: linear-gradient(165deg, var(--secondary) 0%, var(--primary) 100%);
  color: #fff;
}
.monitoring .section-head h2 { color: #fff; }
.monitoring .section-head p { color: rgba(255, 255, 255, 0.6); }
.monitoring .eyebrow { color: var(--cyan); }

.monitor-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.monitor-ui {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(53, 199, 217, 0.18);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.monitor-ui::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(53, 199, 217, 0.08), transparent 50%);
  pointer-events: none;
}

.monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-transform: uppercase;
}

.gauge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.gauge {
  text-align: center;
}
.gauge-ring {
  width: 88px;
  height: 88px;
  margin: 0 auto 0.75rem;
  position: relative;
}
.gauge-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-ring .track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 5; }
.gauge-ring .progress {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 251;
  stroke-dashoffset: 251;
  transition: stroke-dashoffset 1.4s var(--ease);
}
.gauge-ring .progress.amber { stroke: var(--accent); }
.gauge-ring .progress.green { stroke: var(--success); }
.gauge-val {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.15rem;
  transform: rotate(0);
}
.gauge-label {
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.status-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.5rem;
}
.status-item {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}
.status-item .k { color: rgba(255, 255, 255, 0.5); font-weight: 500; letter-spacing: 0.04em; font-size: 0.75rem; text-transform: uppercase; }
.status-item .v { font-weight: 700; font-family: var(--font-display); color: var(--success); }

.monitor-copy h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.monitor-copy p { color: rgba(255, 255, 255, 0.65); margin-bottom: 1.5rem; }
.shield-mini {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  margin-top: 1rem;
}

/* ============================================================
   DETECTION ENGINE
   ============================================================ */
.engine {
  background: var(--white);
}

.pipeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.pipe-node {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  background: var(--primary);
  color: #fff;
  position: relative;
  min-width: 180px;
  text-align: center;
}
.pipe-node.input { background: var(--secondary); }
.pipe-node.output { background: var(--accent); color: var(--secondary); }

.pipe-connector {
  width: 2px;
  height: 28px;
  background: linear-gradient(180deg, var(--cyan), var(--accent));
  position: relative;
}
.pipe-connector::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 178, 26, 0.4);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 178, 26, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(255, 178, 26, 0); }
}

.branch-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.25rem 0;
  width: 100%;
  position: relative;
}
.branch-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
.branch-chip {
  padding: 0.55rem 0.95rem;
  border-radius: 6px;
  border: 1px solid rgba(53, 199, 217, 0.35);
  background: var(--cyan-soft);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.branch-chip:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
}

/* ============================================================
   DISTRACTION STATES
   ============================================================ */
.distraction {
  background: var(--bg);
}

.state-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.state-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid rgba(8, 43, 69, 0.08);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.state-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.state-visual {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0D1D2A, #082B45);
  display: grid;
  place-items: center;
}

.state-face {
  width: 56px;
  height: 72px;
  border-radius: 50% 50% 42% 42%;
  background: rgba(150, 170, 185, 0.3);
  border: 1.5px solid currentColor;
  position: relative;
}
.state-gaze {
  position: absolute;
  width: 2px;
  height: 50px;
  background: currentColor;
  top: 55%;
  left: 50%;
  transform-origin: top center;
  opacity: 0.7;
}

.state-card.focused { --state-c: var(--success); }
.state-card.warning { --state-c: var(--accent); }
.state-card.critical { --state-c: var(--danger); }
.state-card .state-face,
.state-card .state-gaze { color: var(--state-c); }
.state-card.focused .state-gaze { transform: translateX(-50%) rotate(2deg); }
.state-card.warning .state-gaze { transform: translateX(-50%) rotate(-28deg); }
.state-card.critical .state-gaze { transform: translateX(-50%) rotate(-48deg); height: 40px; }

.state-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  background: color-mix(in srgb, var(--state-c) 15%, transparent);
  color: var(--state-c);
}
.state-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.state-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ============================================================
   FATIGUE
   ============================================================ */
.fatigue {
  background: var(--white);
}

.fatigue-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

.cue-list {
  display: grid;
  gap: 0.75rem;
}
.cue-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid rgba(8, 43, 69, 0.06);
}
.cue-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--cyan-soft);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--primary);
}
.cue-item span {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--primary);
}

.alertness-panel {
  background: var(--secondary);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  color: #fff;
}
.alertness-panel h3 {
  color: var(--cyan);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.trend-values {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.trend-val {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.5rem;
  color: #fff;
}
.trend-val.dim { opacity: 0.45; }
.trend-val.warn { color: var(--accent); }
.trend-arrow { color: rgba(255, 255, 255, 0.3); font-size: 0.9rem; }

.alertness-chart {
  height: 120px;
  margin-bottom: 1.25rem;
  position: relative;
}
.alertness-chart svg { width: 100%; height: 100%; }

.fatigue-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 178, 26, 0.12);
  border: 1px solid rgba(255, 178, 26, 0.35);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.fatigue-alert .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* ============================================================
   ROAD AWARENESS
   ============================================================ */
.road {
  background: var(--bg);
  overflow: hidden;
}

.road-scene {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(180deg, #7a9aaa 0%, #4a6a7a 35%, #2a4050 55%, #1a2a35 100%);
  box-shadow: var(--shadow-md);
}

.road-sky {
  position: absolute;
  inset: 0 0 45% 0;
  background: linear-gradient(180deg, #b8cdd8 0%, #8aadb8 100%);
}

.road-surface {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 55%;
  background: linear-gradient(180deg, #3a505c, #1e3038);
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
}

.road-lane {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 100%;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 178, 26, 0.7) 0 12px,
    transparent 12px 28px
  );
  transform-origin: top center;
  animation: laneScroll 2s linear infinite;
}
@keyframes laneScroll {
  to { background-position: 0 40px; }
}
.road-lane.left { left: 48%; transform: perspective(200px) rotateX(2deg) rotateZ(6deg); }
.road-lane.right { left: 51.5%; transform: perspective(200px) rotateX(2deg) rotateZ(-6deg); }

.road-overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.road-label {
  position: absolute;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan);
  background: rgba(13, 29, 42, 0.7);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(53, 199, 217, 0.3);
}
.road-label.gaze { top: 28%; left: 22%; }
.road-label.ahead { top: 38%; left: 48%; transform: translateX(-50%); color: var(--accent); border-color: rgba(255, 178, 26, 0.35); }
.road-label.traj { bottom: 18%; right: 18%; }

.gaze-path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.chain-labels {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
}
.chain-labels span { opacity: 0.35; }
.chain-labels strong { opacity: 1; color: var(--primary); }

/* ============================================================
   ALERTS
   ============================================================ */
.alerts {
  background: var(--white);
}

.alert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}

.alert-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid rgba(8, 43, 69, 0.07);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.alert-card:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 43, 69, 0.15);
}

.alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: var(--font-display);
}
.alert-card.attention .alert-icon { background: var(--accent-soft); color: #c48400; }
.alert-card.fatigue .alert-icon { background: var(--accent-soft); color: #c48400; }
.alert-card.phone .alert-icon { background: var(--cyan-soft); color: var(--primary); }
.alert-card.restored .alert-icon { background: var(--success-soft); color: var(--success); }

.alert-body h3 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.alert-body p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ============================================================
   FLEET
   ============================================================ */
.fleet {
  background: var(--bg);
}

.fleet-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.35rem;
  border: 1px solid rgba(8, 43, 69, 0.07);
  text-align: center;
}
.stat-card .num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 750;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-card .num[data-count] { font-variant-numeric: tabular-nums; }
.stat-card .lbl {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.fleet-map-wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
}

.fleet-map {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 30% 40%, rgba(53, 199, 217, 0.08), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(255, 178, 26, 0.06), transparent 35%),
    linear-gradient(160deg, #0D1D2A, #082B45);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(53, 199, 217, 0.15);
}

.map-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(53, 199, 217, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 199, 217, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

.vehicle-node {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 2;
}
.vehicle-node::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(53, 199, 217, 0.4);
  animation: nodePulse 3s ease-in-out infinite;
}
@keyframes nodePulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.4); opacity: 0; }
}
.vehicle-node:hover,
.vehicle-node.active {
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 0 0 4px rgba(53, 199, 217, 0.25);
  background: var(--accent);
  z-index: 3;
}
.vehicle-node.warn { background: var(--accent); }

.vehicle-detail {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid rgba(8, 43, 69, 0.08);
}
.vehicle-detail h3 {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.25rem;
}
.vd-row {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(8, 43, 69, 0.06);
  font-size: 0.9rem;
}
.vd-row:last-child { border-bottom: none; }
.vd-row .k { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.vd-row .v { font-weight: 700; font-family: var(--font-display); color: var(--primary); }
.vd-row .v.good { color: var(--success); }

/* ============================================================
   COMMAND CENTER
   ============================================================ */
.command {
  background: var(--secondary);
  color: #fff;
}
.command .section-head h2 { color: #fff; }
.command .section-head p { color: rgba(255, 255, 255, 0.55); }
.command .eyebrow { color: var(--cyan); }

.dash {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.dash-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.25rem;
}
.dash-panel h4 {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1rem;
  font-weight: 700;
}
.dash-panel.span-4 { grid-column: span 4; }
.dash-panel.span-3 { grid-column: span 3; }
.dash-panel.span-5 { grid-column: span 5; }
.dash-panel.span-6 { grid-column: span 6; }
.dash-panel.span-8 { grid-column: span 8; }
.dash-panel.span-12 { grid-column: span 12; }

.score-big {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 750;
  color: var(--cyan);
  line-height: 1;
}
.score-big small {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

.mini-chart { height: 100px; width: 100%; }
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.donut { width: 100px; height: 100px; flex-shrink: 0; }
.donut-legend { display: grid; gap: 0.4rem; font-size: 0.78rem; color: rgba(255,255,255,0.6); }
.donut-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.donut-legend .c1::before { background: var(--cyan); }
.donut-legend .c2::before { background: var(--accent); }
.donut-legend .c3::before { background: var(--success); }

.alert-list-mini { display: grid; gap: 0.5rem; }
.alert-list-mini li {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  font-size: 0.8rem;
}
.alert-list-mini .tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.driver-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.driver-card {
  padding: 0.85rem;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}
.driver-card .id {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.driver-card .meta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
}
.driver-card .score { color: var(--success); font-weight: 700; }

.mini-map {
  height: 120px;
  background:
    linear-gradient(rgba(53,199,217,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53,199,217,0.05) 1px, transparent 1px),
    #0a1822;
  background-size: 24px 24px, 24px 24px, auto;
  border-radius: 8px;
  position: relative;
}
.mini-map .dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}

/* ============================================================
   WORKFLOW
   ============================================================ */
.workflow {
  background: var(--white);
}

.workflow-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  position: relative;
}
.workflow-track::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--accent), var(--cyan));
  opacity: 0.4;
  z-index: 0;
}

.wf-step {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 0.5rem;
}
.wf-num {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 0.85rem;
  box-shadow: 0 0 0 6px var(--white), 0 0 0 8px rgba(53, 199, 217, 0.3);
  transition: transform 0.3s var(--ease);
}
.wf-step:hover .wf-num { transform: scale(1.08); }
.wf-step h3 {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.wf-step p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  background: var(--bg);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid rgba(8, 43, 69, 0.07);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(53, 199, 217, 0.3);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-soft), var(--cyan-soft));
  display: grid;
  place-items: center;
  margin-bottom: 1.15rem;
  color: var(--primary);
}
.feature-card h3 {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.feature-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================================================
   INTEGRATION / EDGE / PRIVACY
   ============================================================ */
.integration {
  background: var(--white);
}

.layer-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 520px;
  margin: 0 auto 2.5rem;
}
.layer {
  width: 100%;
  padding: 1rem 1.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--primary);
  border-radius: 8px;
  position: relative;
}
.layer:nth-child(1) { background: #061e32; width: 70%; }
.layer:nth-child(3) { background: #0a3556; width: 80%; }
.layer:nth-child(5) { background: #0c4068; width: 90%; }
.layer:nth-child(7) { background: var(--primary); width: 100%; }
.layer:nth-child(9) { background: var(--accent); color: var(--secondary); width: 100%; }
.layer-link {
  width: 2px;
  height: 20px;
  background: var(--cyan);
  opacity: 0.5;
}

.icon-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2.5rem;
}
.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.icon-item .ic {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid rgba(8, 43, 69, 0.08);
  display: grid;
  place-items: center;
  color: var(--primary);
}

.edge {
  background: linear-gradient(165deg, var(--primary), var(--secondary));
  color: #fff;
}
.edge .section-head h2 { color: #fff; }
.edge .section-head p { color: rgba(255,255,255,0.6); }
.edge .eyebrow { color: var(--cyan); }

.edge-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 0.5rem;
  margin-top: 1rem;
}
.edge-node {
  padding: 1rem 1.35rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(53, 199, 217, 0.25);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  position: relative;
  overflow: hidden;
}
.edge-node::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(53, 199, 217, 0.15), transparent);
  animation: dataStream 2.5s ease-in-out infinite;
}
@keyframes dataStream {
  to { left: 120%; }
}
.edge-arrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

.privacy {
  background: var(--bg);
}
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.privacy-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(8, 43, 69, 0.07);
}
.privacy-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.privacy-card h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}
.privacy-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ============================================================
   USE CASES (tabs)
   ============================================================ */
.usecases {
  background: var(--white);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(8, 43, 69, 0.08);
  padding-bottom: 0.75rem;
}
.tab-btn {
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.tab-btn:hover { color: var(--primary); background: var(--primary-soft); }
.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.4s var(--ease); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.uc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.uc-item {
  padding: 1.35rem;
  background: var(--bg);
  border-radius: 12px;
  border-top: 3px solid var(--cyan);
}
.uc-item:nth-child(2) { border-top-color: var(--accent); }
.uc-item:nth-child(3) { border-top-color: var(--primary); }
.uc-item:nth-child(4) { border-top-color: var(--success); }
.uc-item h4 {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.uc-item p {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.55;
}

/* ============================================================
   ANALYTICS
   ============================================================ */
.analytics {
  background: var(--bg);
}

.analytics-dash {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.a-panel {
  background: var(--white);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid rgba(8, 43, 69, 0.07);
}
.a-panel h4 {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.a-panel.wide { grid-column: span 2; }
.chart-area { height: 140px; width: 100%; }

/* ============================================================
   SIGNATURE STATEMENT
   ============================================================ */
.signature {
  position: relative;
  padding: clamp(5rem, 12vw, 9rem) 0;
  overflow: hidden;
  background: var(--secondary);
  color: #fff;
  text-align: center;
}
.signature-road {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(13, 29, 42, 0.3) 40%, var(--secondary) 100%),
    linear-gradient(180deg, #3a5565 0%, #1a3040 45%, #0D1D2A 100%);
  opacity: 0.9;
}
.signature-road::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 20%;
  bottom: 0;
  width: 40%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(30, 50, 60, 0.8));
  clip-path: polygon(48% 0, 52% 0, 100% 100%, 0 100%);
}
.attn-line {
  position: absolute;
  left: 50%;
  top: 25%;
  bottom: 10%;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  transform: translateX(-50%);
  animation: lineExtend 3s var(--ease) infinite alternate;
}
@keyframes lineExtend {
  from { opacity: 0.5; height: 50%; }
  to { opacity: 1; }
}

.signature-content {
  position: relative;
  z-index: 2;
}
.signature h2 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  max-width: 16ch;
  margin: 0 auto 1.5rem;
  line-height: 1.2;
}
.signature .see-earlier {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ============================================================
   CASE STUDY
   ============================================================ */
.casestudy {
  background: var(--white);
}

.cs-label {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  background: var(--accent-soft);
  color: #a87000;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.cs-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.ba-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.ba-box {
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--bg);
}
.ba-box.after {
  background: var(--primary);
  color: #fff;
}
.ba-box h4 {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  color: var(--muted);
}
.ba-box.after h4 { color: var(--cyan); }
.ba-box p { font-size: 0.95rem; line-height: 1.5; }
.ba-box.after p { color: rgba(255,255,255,0.8); }

.placeholder-metrics {
  display: grid;
  gap: 1rem;
}
.pm {
  padding: 1.25rem;
  background: var(--bg);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}
.pm .val {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 750;
  color: var(--primary);
}
.pm .lbl {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.25rem;
}
.pm .note {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.4rem;
  font-style: italic;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  background: var(--bg);
}

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 0.6rem;
}
.faq-item {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid rgba(8, 43, 69, 0.07);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1rem;
  color: var(--primary);
}
.faq-q:hover { background: var(--primary-soft); }
.faq-q .chev {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
  color: var(--muted);
}
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 0 1.35rem 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* ============================================================
   FINAL CTA
   ============================================================ */
.final-cta {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: linear-gradient(160deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.cta-shield {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(70vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(53, 199, 217, 0.15);
  border-radius: 42% 42% 48% 48%;
  background: radial-gradient(ellipse at 50% 40%, rgba(53, 199, 217, 0.08), transparent 65%);
  animation: shieldPulse 4s ease-in-out infinite;
  pointer-events: none;
}
.cta-shield::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 178, 26, 0.12);
  border-radius: 42% 42% 48% 48%;
}

.final-cta .logo { justify-content: center; margin-bottom: 2rem; }
.final-cta .logo-word { color: #fff; }

.final-cta h2 {
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin-bottom: 1rem;
  position: relative;
}
.final-cta p {
  color: rgba(255, 255, 255, 0.65);
  max-width: 42ch;
  margin: 0 auto 2rem;
  font-size: 1.08rem;
  position: relative;
}
.final-cta .cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
}
.tagline-final {
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.4);
  position: relative;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #061820;
  color: rgba(255, 255, 255, 0.65);
  padding: 4rem 0 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer .logo-word { color: #fff; margin-bottom: 0.75rem; }
.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 28ch;
  margin-top: 0.75rem;
}
.footer h4 {
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer ul { display: grid; gap: 0.5rem; }
.footer a {
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer a:hover { color: var(--cyan); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
}
.footer-tagline {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.72rem;
}

/* ============================================================
   MOBILE NAV
   ============================================================ */
.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  z-index: 999;
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 0.9rem 1rem;
  font-weight: 600;
  color: var(--primary);
  border-radius: 8px;
}
.mobile-menu a:hover { background: var(--primary-soft); }
.mobile-menu .btn { width: 100%; margin-top: 0.5rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1199px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-actions .btn-secondary { display: none; }

  .hero-grid,
  .monitor-layout,
  .fatigue-layout,
  .fleet-map-wrap,
  .cs-layout {
    grid-template-columns: 1fr;
  }

  .dash-panel.span-4,
  .dash-panel.span-3,
  .dash-panel.span-5,
  .dash-panel.span-6,
  .dash-panel.span-8 { grid-column: span 6; }

  .workflow-track { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .workflow-track::before { display: none; }

  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .container { width: min(100% - 1.5rem, var(--max)); }

  .nav-actions .btn { padding: 0.55rem 0.85rem; font-size: 0.8rem; }

  .hero h1 { max-width: none; }
  .hero-visual { aspect-ratio: 4 / 3; }
  .hud-panel { width: min(52%, 160px); padding: 0.6rem; }
  .hud-row { font-size: 0.58rem; }
  .hud-row .value { font-size: 0.65rem; }

  .compare,
  .state-cards,
  .feature-grid,
  .privacy-grid,
  .alert-grid,
  .fleet-stats,
  .analytics-dash,
  .uc-grid,
  .ba-compare {
    grid-template-columns: 1fr;
  }

  .gauge-grid { grid-template-columns: repeat(2, 1fr); }
  .driver-cards { grid-template-columns: 1fr; }

  .dash { grid-template-columns: 1fr; }
  .dash-panel.span-4,
  .dash-panel.span-3,
  .dash-panel.span-5,
  .dash-panel.span-6,
  .dash-panel.span-8,
  .dash-panel.span-12,
  .a-panel.wide { grid-column: span 1; }

  .workflow-track { grid-template-columns: 1fr; }
  .wf-step { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; text-align: left; align-items: start; }
  .wf-num { margin: 0; }

  .edge-flow { flex-direction: column; }
  .edge-arrow { transform: rotate(90deg); }

  .road-scene { aspect-ratio: 4 / 3; min-height: 260px; }
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tab-btn { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
