/* ============================================ */
/* EMS-AI.com — Shared Stylesheet               */
/* Multi-page architecture v1.0                  */
/* ============================================ */

/* ============================================ */
/* RESET & VARIABLES                            */
/* ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #07080a;
  --black-warm: #0c0d10;
  --surface: #111318;
  --surface-raised: #181a20;
  --surface-bright: #1e2028;
  --border: rgba(255,255,255,0.06);
  --border-bright: rgba(255,255,255,0.12);
  --text: #f0f1f3;
  --text-muted: #a0a3ae;
  --text-dim: #6e717d;
  --accent: #3b8bff;
  --accent-dim: rgba(59,139,255,0.12);
  --accent-glow: rgba(59,139,255,0.25);
  --blue: #3b8bff;
  --blue-dim: rgba(59,139,255,0.10);
  --amber: #f59e0b;
  --amber-dim: rgba(245,158,11,0.10);
  --red: #dc2626;
  --red-dim: rgba(220,38,38,0.08);
  --ems-red: #dc2626;
  --ems-red-dim: rgba(220,38,38,0.12);
  --ems-red-glow: rgba(220,38,38,0.25);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: clamp(15px, 1vw + 0.5rem, 18px);
}

/* Text size adjustment via data attribute */
html[data-text-size="small"] { font-size: clamp(13px, 0.85vw + 0.4rem, 15px); }
html[data-text-size="large"] { font-size: clamp(17px, 1.2vw + 0.6rem, 21px); }

/* Light mode */
html[data-theme="light"] {
  --black: #f5f6f8;
  --black-warm: #eef0f3;
  --surface: #ffffff;
  --surface-raised: #f0f2f5;
  --surface-bright: #e8eaef;
  --border: rgba(0,0,0,0.08);
  --border-bright: rgba(0,0,0,0.14);
  --text: #1a1c22;
  --text-muted: #555a66;
  --text-dim: #8a8e9a;
  --accent: #1d6fe0;
  --accent-dim: rgba(29,111,224,0.1);
  --accent-glow: rgba(29,111,224,0.2);
  --blue: #1d6fe0;
  --blue-dim: rgba(29,111,224,0.08);
  --red: #c41e1e;
  --red-dim: rgba(196,30,30,0.06);
  --ems-red: #c41e1e;
  --ems-red-dim: rgba(196,30,30,0.1);
  --ems-red-glow: rgba(196,30,30,0.2);
}

html[data-theme="light"] body::before { opacity: 0.015; }
html[data-theme="light"] .nav { background: rgba(245,246,248,0.85); }
html[data-theme="light"] .btn-primary { color: #fff; }
html[data-theme="light"] .lightbox-overlay { background: rgba(255,255,255,0.92); }

/* Light mode hero readability */
html[data-theme="light"] .hero { background: var(--black); }
html[data-theme="light"] .hero::before { opacity: 0.8; background: rgba(245,246,248,0.85); }
html[data-theme="light"] .hero-kicker { color: var(--accent); }
html[data-theme="light"] .hero-title { color: var(--text); }
html[data-theme="light"] .hero-sub { color: var(--text-muted); }

/* Light mode video overlays */
html[data-theme="light"] .transport-hero::after { background: linear-gradient(to bottom, rgba(245,246,248,0.7), rgba(245,246,248,0.95)); }
html[data-theme="light"] .transport-hero .eyebrow,
html[data-theme="light"] .transport-hero .section-title { color: var(--text); }
html[data-theme="light"] .transport-hero .section-title em { color: var(--accent); }
html[data-theme="light"] .transport-hero p { color: var(--text-muted); }

/* Light mode cards and surfaces */
html[data-theme="light"] .stat-block { background: var(--surface-raised); }
html[data-theme="light"] .company-card { background: var(--surface-raised); }
html[data-theme="light"] .path-card--transport { background: linear-gradient(135deg, var(--surface) 0%, rgba(196,30,30,0.05) 100%); }
html[data-theme="light"] .path-card--medicine { background: linear-gradient(135deg, var(--surface) 0%, rgba(29,111,224,0.05) 100%); }

/* Light mode quote sections */
html[data-theme="light"] .quote-section { background: var(--surface-raised); }
html[data-theme="light"] .inline-quote { background: var(--surface-raised); border-color: var(--border); }
html[data-theme="light"] .inline-quote blockquote { color: var(--text); }

/* Light mode warning section */
html[data-theme="light"] .warning-section { background: var(--surface-raised); }
html[data-theme="light"] .warning-stat { background: var(--surface); }

/* Light mode scroll indicator */
html[data-theme="light"] .hero-scroll .line { background: linear-gradient(to bottom, var(--accent), transparent); }
html[data-theme="light"] .hero-scroll span { color: var(--text-dim); }

/* Light mode eyebrow--red */
html[data-theme="light"] .eyebrow--red { color: var(--ems-red); }

body {
  font-family: var(--sans);
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

img { max-width: 100%; display: block; }

/* ============================================ */
/* GRAIN OVERLAY                                */
/* ============================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* ============================================ */
/* LAYOUT                                       */
/* ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: 800px;
}

.container--mid {
  max-width: 960px;
}

section {
  position: relative;
}

/* ============================================ */
/* NAVIGATION                                   */
/* ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(7,8,10,0.7);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.05em;
}

.nav-brand .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { opacity: 0.7; box-shadow: 0 0 12px 4px var(--accent-glow); }
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); opacity: 1; }
.nav-links a.active { color: var(--accent); }

.nav-controls {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.nav-controls button {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}

.nav-controls button:hover {
  background: var(--surface-bright);
  color: var(--text);
  border-color: var(--accent);
}

/* ============================================ */
/* HERO                                         */
/* ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  z-index: 0;
}

.hero > div {
  position: relative;
  z-index: 2;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,139,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(59,139,255,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(245,158,11,0.03) 0%, transparent 50%);
  pointer-events: none;
}

.hero-kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #ffffff;
  max-width: 900px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.4s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #b0b3bd;
  max-width: 640px;
  margin: 0 auto 3rem;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.6s forwards;
}

.hero-scroll {
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.8s forwards;
}

.hero-scroll span {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-scroll .line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 0 auto;
  animation: scrollLine 2s var(--ease-in-out) infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================ */
/* PAGE HERO (for sub-pages)                    */
/* ============================================ */
.page-hero {
  padding: 10rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,139,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero .hero-kicker {
  animation-delay: 0.1s;
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
  max-width: 800px;
  margin: 0 auto 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.3s forwards;
}

.page-hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.page-hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #b0b3bd;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}

/* ============================================ */
/* SECTION SHARED                               */
/* ============================================ */
.s-pad { padding: 8rem 0; }
.s-pad-lg { padding: 10rem 0; }
.s-pad-sm { padding: 5rem 0; }

.s-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-bright), transparent);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.eyebrow--blue { color: var(--blue); }
.eyebrow--amber { color: var(--amber); }
.eyebrow--red { color: var(--red); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

.section-intro {
  color: #b0b3bd;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* ============================================ */
/* THE QUOTE — CENTERPIECE                      */
/* ============================================ */
.quote-section {
  padding: 10rem 2rem;
  position: relative;
  overflow: hidden;
}

.quote-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(59,139,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.quote-mark {
  font-family: var(--serif);
  font-size: 10rem;
  color: var(--accent);
  opacity: 0.15;
  line-height: 0.6;
  margin-bottom: -2rem;
  text-align: center;
}

.the-quote {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  text-align: center;
  color: #ffffff;
  max-width: 900px;
  margin: 0 auto 2.5rem;
}

.the-quote .highlight {
  color: var(--accent);
  font-style: normal;
  position: relative;
}

.the-quote .highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.3;
}

.quote-attr {
  text-align: center;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.quote-attr strong {
  color: var(--text);
  font-weight: 600;
}

/* Inline section quotes (keynote pull-quotes) */
.inline-quote {
  padding: 4rem 2rem;
  position: relative;
  text-align: center;
}

.inline-quote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.5vw, 2.25rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: #ffffff;
  max-width: 780px;
  margin: 0 auto 1rem;
}

.inline-quote blockquote .highlight {
  color: var(--accent);
  font-style: normal;
}

.inline-quote .quote-attr {
  font-size: 0.8rem;
}

/* ============================================ */
/* REALITY CHECK — The Gap                      */
/* ============================================ */
.reality-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.reality-card {
  padding: 2rem 2.25rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}

.reality-card--gap {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(220,38,38,0.03) 100%);
}
.reality-card--gap:hover { border-color: rgba(220,38,38,0.25); }

.reality-card--possible {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(59,139,255,0.03) 100%);
}
.reality-card--possible:hover { border-color: rgba(59,139,255,0.25); }

.reality-card h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.reality-card--gap h3 { color: var(--red); }
.reality-card--possible h3 { color: var(--accent); }

.reality-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.reality-card li {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  padding-left: 1.4rem;
  position: relative;
}

.reality-card--gap li::before {
  content: '\00d7';
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
  font-size: 1rem;
}

.reality-card--possible li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 500;
}

/* ============================================ */
/* INFLECTION POINT                             */
/* ============================================ */
.inflection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.path-card {
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.path-card:hover {
  transform: translateY(-2px);
}

.path-card--transport {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(220,38,38,0.04) 100%);
}

.path-card--transport:hover { border-color: rgba(220,38,38,0.3); }

.path-card--medicine {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(59,139,255,0.04) 100%);
}

.path-card--medicine:hover { border-color: rgba(59,139,255,0.3); }

.path-card .path-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.path-card--transport .path-icon {
  background: rgba(220,38,38,0.1);
}

.path-card--medicine .path-icon {
  background: var(--accent-dim);
}

.path-card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.path-card--transport h3 { color: var(--red); }
.path-card--medicine h3 { color: var(--accent); }

.path-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.path-card .path-verdict {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.path-card--transport .path-verdict { color: var(--red); }
.path-card--medicine .path-verdict { color: var(--accent); }

/* ============================================ */
/* AI CO-PILOT SECTION                          */
/* ============================================ */
.copilot-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.copilot-narrative {
  max-width: 720px;
  margin-bottom: 3.5rem;
}

.copilot-narrative p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.copilot-narrative p strong {
  color: var(--text);
}

.copilot-narrative .narrative-highlight {
  color: var(--text);
  font-size: 1.15rem;
  font-family: var(--serif);
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  line-height: 1.6;
}

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

.pillar-card {
  padding: 2rem;
  border-radius: 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s;
}

.pillar-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--accent-dim);
}

.pillar-icon--blue { background: var(--blue-dim); }
.pillar-icon--amber { background: var(--amber-dim); }

.pillar-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.pillar-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================ */
/* HEALTHCARE INTEGRATION                       */
/* ============================================ */
.integration-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.integration-prose p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.integration-prose p strong {
  color: var(--text);
}

.integration-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-block {
  padding: 2rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.stat-block .stat-number {
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.stat-block .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================ */
/* DOCUMENTATION SECTION                        */
/* ============================================ */
.doc-section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.doc-prose p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.doc-prose p strong {
  color: var(--text);
}

.doc-callout {
  padding: 2.25rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}

.doc-callout::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(to bottom, var(--accent), var(--blue));
}

.doc-callout h4 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.doc-callout p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.doc-callout p:last-child { margin-bottom: 0; }

/* ============================================ */
/* TRANSPORT REVOLUTION                         */
/* ============================================ */
.transport-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.transport-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.transport-column h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.transport-column .phase-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.phase-tag--now {
  color: var(--accent);
  background: var(--accent-dim);
}

.phase-tag--near {
  color: var(--blue);
  background: var(--blue-dim);
}

.phase-tag--horizon {
  color: var(--amber);
  background: var(--amber-dim);
}

.transport-column p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.transport-column p:last-child { margin-bottom: 0; }

/* Autonomous ground section */
.autonomous-ground {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border);
}

.ag-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.ag-stat {
  padding: 1.75rem;
  border-radius: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  text-align: center;
}

.ag-stat .stat-number {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.ag-stat:nth-child(1) .stat-number { color: var(--red); }
.ag-stat:nth-child(2) .stat-number { color: var(--accent); }
.ag-stat:nth-child(3) .stat-number { color: var(--blue); }

.ag-stat .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Tech timeline */
.tech-timeline {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border);
  position: relative;
}

.tech-timeline::before {
  content: '';
  position: absolute;
  top: 4rem;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--blue), var(--amber));
  opacity: 0.3;
}

.tech-phase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 5rem;
  position: relative;
}

.tech-phase::before {
  content: '';
  position: absolute;
  left: calc(50% - 6px);
  top: 0.5rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid;
  background: var(--surface);
}

.tech-phase:nth-child(2)::before { border-color: var(--accent); }
.tech-phase:nth-child(3)::before { border-color: var(--blue); }
.tech-phase:nth-child(4)::before { border-color: var(--blue); }
.tech-phase:nth-child(5)::before { border-color: var(--amber); }

.tech-phase:nth-child(even) .phase-content { grid-column: 2; text-align: left; }
.tech-phase:nth-child(even) .phase-visual { grid-column: 1; grid-row: 1; }

.phase-content h3 {
  font-family: var(--serif);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.phase-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.phase-content p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Company cards */
.company-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 4rem;
}

.company-card {
  padding: 1.75rem;
  border-radius: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s;
}

.company-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
}

.company-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.company-card .company-focus {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.company-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================ */
/* WARNING SECTION                              */
/* ============================================ */
.warning-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.warning-inner {
  text-align: center;
  margin-bottom: 2rem;
}

.warning-prose {
  text-align: center;
}

.warning-prose p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.warning-prose p strong {
  color: var(--text);
}

.warning-stat {
  padding: 2.5rem;
  border-radius: 16px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  text-align: center;
}

.warning-stat .stat-number {
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--ems-red);
  margin-bottom: 0.75rem;
}

.warning-stat .stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================ */
/* REDESIGN / WHAT IF                           */
/* ============================================ */
.redesign-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.redesign-card {
  padding: 2.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(59,139,255,0.03) 100%);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s;
}

.redesign-card:hover {
  border-color: rgba(59,139,255,0.25);
  transform: translateY(-2px);
}

.redesign-number {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.redesign-card h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.redesign-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.redesign-card--governance {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(59,139,255,0.04) 100%);
  border-color: rgba(59,139,255,0.12);
}

.redesign-card--governance:hover {
  border-color: rgba(59,139,255,0.25);
}

.redesign-card--governance .redesign-number {
  color: var(--blue);
}

/* ============================================ */
/* BOOK SECTION                                 */
/* ============================================ */
.book-section {
  border-top: 1px solid var(--border);
}

.book-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.book-info h3 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.book-subtitle {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.book-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.book-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.badge {
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(59,139,255,0.15);
}

.book-toc {
  padding: 2.5rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.book-toc h4 {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.toc-section {
  margin-bottom: 1.5rem;
}

.toc-section:last-child { margin-bottom: 0; }

.toc-section-title {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.toc-section ul {
  list-style: none;
}

.toc-section li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
  line-height: 1.5;
}

/* ============================================ */
/* CALL TO ACTION                               */
/* ============================================ */
.cta-section {
  padding: 10rem 2rem;
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 100%, rgba(59,139,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.cta-title em {
  font-style: italic;
  color: var(--accent);
}

.cta-sub {
  font-size: 1.1rem;
  color: #b0b3bd;
  max-width: 580px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease-out);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--black);
}

.btn-primary:hover {
  background: #4d9aff;
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}

.btn-outline:hover {
  background: var(--surface);
  border-color: var(--text-dim);
  opacity: 1;
}

/* ============================================ */
/* AUTHOR                                       */
/* ============================================ */
.author-bar {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.author-inner {
  display: flex;
  gap: 2.5rem;
  align-items: start;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  flex-shrink: 0;
  object-fit: cover;
}

.author-info h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.author-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.author-credentials {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.author-credentials span {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ============================================ */
/* FOOTER                                       */
/* ============================================ */
footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  font-size: 0.75rem;
  color: var(--text-dim);
}

footer a {
  color: var(--text-muted);
}

/* ============================================ */
/* YOUTUBE EMBEDS                               */
/* ============================================ */
.yt-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 1rem;
}

.yt-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
  text-align: center;
}

/* Collapsible Resources Section */
.resources-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.resources-section details {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.resources-section summary {
  padding: 1.25rem 1.75rem;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}

.resources-section summary:hover {
  background: var(--surface-raised);
}

.resources-section summary::after {
  content: '+';
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent);
  transition: transform 0.3s;
}

.resources-section details[open] summary::after {
  content: '\2212';
}

.resources-section summary::-webkit-details-marker {
  display: none;
}

.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding: 1.25rem 1.75rem 1.75rem;
}

.resource-item {
  padding: 1.25rem;
  border-radius: 10px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.resource-item:hover {
  border-color: var(--border-bright);
}

.resource-item h5 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.resource-item h5 a {
  color: var(--text);
  border-bottom: 1px solid var(--border-bright);
}

.resource-item h5 a:hover {
  color: var(--accent);
}

.resource-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Inline details arrow rotation */
details[open] > summary span:first-child {
  display: inline-block;
  transform: rotate(90deg);
}

details > summary::-webkit-details-marker {
  display: none;
}

/* Lightbox for expandable images */
.lightbox-trigger {
  cursor: zoom-in;
  transition: transform 0.2s;
}

.lightbox-trigger:hover {
  transform: scale(1.02);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
  cursor: zoom-out;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: scale(0.9);
  transition: transform 0.3s var(--ease-out);
}

.lightbox-overlay.active img {
  transform: scale(1);
}

/* Transport Section Hero */
.transport-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-bottom: 4rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.transport-hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.transport-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(7,8,10,0.5) 0%, rgba(7,8,10,0.7) 50%, rgba(7,8,10,0.85) 100%);
  z-index: 1;
}

.transport-hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 2rem;
  max-width: 800px;
}

.transport-hero-content .eyebrow {
  margin-bottom: 1rem;
}

.transport-hero-content .section-title {
  margin-bottom: 1.25rem;
}

.transport-hero-content p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* HLS Video element */
.hls-video {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ============================================ */
/* HAMBURGER MENU BUTTON                        */
/* ============================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 201;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Light mode hamburger overlay */
html[data-theme="light"] .nav-links.open {
  background: rgba(245,246,248,0.97);
}

/* ============================================ */
/* SCROLL ANIMATIONS                            */
/* ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */
@media (max-width: 900px) {
  .inflection-grid,
  .integration-content,
  .doc-section-inner,
  .transport-dual,
  .book-layout,
  .copilot-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .reality-grid,
  .ethics-principles {
    grid-template-columns: 1fr;
  }

  .company-grid {
    grid-template-columns: 1fr 1fr;
  }

  .redesign-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pillar-grid {
    grid-template-columns: 1fr;
  }

  .ag-stats {
    grid-template-columns: 1fr;
  }

  .tech-timeline::before { display: none; }

  .tech-phase {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .tech-phase::before { display: none; }
  .tech-phase:nth-child(even) .phase-content { grid-column: auto; text-align: left; }
  .tech-phase:nth-child(even) .phase-visual { grid-column: auto; grid-row: auto; }

  .author-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .author-credentials { justify-content: center; }

  .nav-links { 
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7,8,10,0.97);
    backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 200;
    padding: 2rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
    letter-spacing: 0.06em;
  }

  .hamburger {
    display: flex;
    order: 10;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 8px;
    margin-left: 0.5rem;
  }

  .nav {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .nav-brand {
    flex-shrink: 0;
    margin-right: auto;
  }

  .nav-controls {
    margin-right: 0;
    flex-shrink: 0;
  }

  .nav-controls button {
    padding: 0.4rem 0.5rem;
    font-size: 0.65rem;
    min-width: 28px;
    min-height: 28px;
  }

  /* Close button inside open menu */
  .nav-close {
    display: none;
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.75rem;
    cursor: pointer;
    z-index: 201;
    padding: 0.5rem;
    line-height: 1;
  }

  .nav-links.open .nav-close {
    display: block;
  }

  .quote-mark { font-size: 6rem; }
}

@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }

  .company-grid { grid-template-columns: 1fr; }

  .redesign-grid { grid-template-columns: 1fr; }

  /* Stack inline side-by-side grids on small screens */
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .s-pad { padding: 5rem 0; }

  .hero { padding: 7rem 1.25rem 4rem; min-height: 90vh; }

  .page-hero { padding: 8rem 1.25rem 4rem; }

  .quote-section { padding: 6rem 1.25rem; }

  .cta-section { padding: 6rem 1.25rem; }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .stat-block .stat-number { font-size: 2rem; }

  /* Podcast grid and book grid stack on mobile */
  [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 380px) {
  .nav {
    padding: 0.6rem 0.75rem;
  }

  .nav-brand {
    font-size: 0.75rem;
  }

  .nav-controls button {
    padding: 0.3rem 0.4rem;
    font-size: 0.6rem;
    min-width: 24px;
    min-height: 24px;
  }

  .hamburger {
    width: 36px;
    height: 36px;
    margin-left: 0.25rem;
  }
}
