/* Apollo Group — apollogroup.energy
   Industrial-modern, cool cryogenic palette */

html {
  scroll-behavior: smooth;
}

:root {
  /* palette — cryogenic navy (default) */
  --ink: #0A1628;
  --ink-2: #12213A;
  --ink-3: #1B2E4F;
  --steel: #3D5678;
  --steel-2: #7A8FAD;
  --ice: #B8D4E8;
  --ice-2: #E8F1F8;
  --paper: #F5F7FA;
  --paper-2: #FBFCFD;
  --white: #FFFFFF;
  --accent: #0A1628;       /* Apollo navy (unified) */
  --accent-2: #0A1628;     /* Apollo navy (unified) */
  --accent-deep: #12213A;  /* deeper navy */
  --accent-hot: #FF6A3D;   /* safety orange — used SPARSELY */
  --rule: rgba(10, 22, 40, 0.10);
  --rule-strong: rgba(10, 22, 40, 0.22);

  /* unified emphasis blue — used for highlight words in headings, em tags, etc. */
  --emph: #2D8FBF;

  /* dark-on-light defaults */
  --bg: var(--paper);
  --fg: var(--ink);

  /* type */
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Instrument Sans", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* spacing */
  --gutter: clamp(20px, 4vw, 64px);
  --section-y: clamp(80px, 10vw, 160px);

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- palette: steel ---- */
[data-palette="steel"] {
  --ink: #1A1D22;
  --ink-2: #23272E;
  --ink-3: #2E3440;
  --steel: #525861;
  --steel-2: #8B919A;
  --ice: #C8CCD3;
  --ice-2: #EEF0F3;
  --paper: #F4F5F7;
  --paper-2: #FAFBFC;
  --accent: #5B7A99;
  --accent-hot: #D55A2E;
  --rule: rgba(26, 29, 34, 0.10);
  --rule-strong: rgba(26, 29, 34, 0.22);
}

/* ---- palette: ink-on-ice ---- */
[data-palette="ice"] {
  --ink: #0B2136;
  --ink-2: #163654;
  --ink-3: #1F4C73;
  --steel: #4E7AA0;
  --steel-2: #89ADCC;
  --ice: #CCE2F1;
  --ice-2: #E4F0F8;
  --paper: #EEF5FA;
  --paper-2: #F7FBFD;
  --accent: #2D8FBF;
  --accent-hot: #E86A3D;
  --rule: rgba(11, 33, 54, 0.12);
  --rule-strong: rgba(11, 33, 54, 0.26);
}

/* ---- palette: midnight (dark) ---- */
[data-palette="midnight"] {
  --ink: #E7EEF6;
  --ink-2: #C3D2E2;
  --ink-3: #93A8BF;
  --steel: #6A8098;
  --steel-2: #506985;
  --ice: #3C5677;
  --ice-2: #1F2F4A;
  --paper: #070D17;
  --paper-2: #0B1322;
  --white: #0B1322;
  --accent: #7DD3FC;
  --accent-hot: #FF8A5C;
  --rule: rgba(231, 238, 246, 0.10);
  --rule-strong: rgba(231, 238, 246, 0.22);
  --bg: var(--paper);
  --fg: var(--ink);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { overflow-x: hidden; }

/* selection */
::selection { background: var(--ink); color: var(--paper); }

/* ---- type scale ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel);
}
.eyebrow .sep { display: inline-block; width: 20px; height: 1px; background: currentColor; vertical-align: middle; margin: 0 10px; opacity: 0.6; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 0.95;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--emph); }

.body-lg { font-size: 18px; line-height: 1.55; color: var(--ink-3); text-wrap: pretty; max-width: 62ch; }

strong { font-weight: 600; color: var(--ink); }
.contact strong, .metric-strip strong { color: var(--paper); font-weight: 600; }
.body { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.small { font-size: 13px; line-height: 1.5; color: var(--steel); }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.caps-mono { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.25em; text-transform: uppercase; }

/* ---- layout ---- */
.wrap { padding-inline: var(--gutter); max-width: 1680px; margin-inline: auto; width: 100%; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.rule-strong { border: 0; border-top: 1px solid var(--rule-strong); margin: 0; }

section { position: relative; }

/* ---- reusable: label row ---- */
.label-row {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--steel);
}
.label-row .num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; }
.label-row .line { flex: 1; height: 1px; background: var(--rule); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 500; letter-spacing: 0.01em;
  padding: 14px 22px;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  cursor: pointer; text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn .arr { width: 14px; height: 14px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* Emphasis-blue button — same hue as the "infrastructure" / "island" highlights */
.btn-emph { background: var(--emph); color: #FFFFFF; border-color: var(--emph); }
.btn-emph:hover { background: transparent; color: var(--emph); border-color: var(--emph); }

/* ---- logo ---- */
.logo-mark {
  width: 34px; height: 34px; display: block;
}
.logo-mark-lg { width: 72px; height: 72px; }

/* ---- photo block ---- */
.photo {
  position: relative; overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--rule);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .meta {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(10,22,40,0.85) 100%);
  color: var(--paper);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}

/* ---- field section (full-bleed photo) ---- */
.field {
  position: relative; overflow: hidden;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.field-img { width: 100%; height: clamp(360px, 56vw, 620px); object-fit: cover; display: block; filter: saturate(0.9); }
.field .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,22,40,0.8) 0%, rgba(10,22,40,0.35) 55%, transparent 100%);
  display: flex; align-items: flex-start;
  padding: 144px var(--gutter) 60px;
}
.field .overlay-inner { max-width: 620px; color: var(--paper); }
.field .overlay h3 {
  margin-top: -18px;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(36px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 18px;
}
.field .overlay h3 em { color: var(--emph); font-style: italic; }
.field .overlay h3 strong { color: var(--paper); font-weight: 600; }
.field .overlay .field-sub {
  margin-top: -18px;
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.45;
  color: var(--paper);
  max-width: 46ch;
  text-shadow: 0 1px 18px rgba(10,22,40,0.55);
}
.field .overlay .field-sub strong { color: var(--paper); font-weight: 600; }
.field .overlay p { font-size: 16px; line-height: 1.5; color: rgba(245,247,250,0.82); max-width: 50ch; }
.field .overlay .caps-mono { color: rgba(245,247,250,0.6); margin-bottom: 18px; display: block; }

/* ---- nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--paper) 72%, transparent);
  border-bottom: 1px solid var(--rule);
}
.nav.scrolled { background: color-mix(in oklab, var(--paper) 92%, transparent); }
.nav .brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink);
  text-decoration: none;
}
.nav .brand img.logo-mark { width: 34px; height: auto; display: block; object-fit: contain; }
[data-palette="midnight"] .nav .brand img.logo-mark { filter: brightness(1.05); }
.nav .links { display: flex; gap: 36px; }
.nav .links a { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; transition: color 0.2s var(--ease); }
.nav .links a:hover { color: var(--accent); }
.nav .actions { display: flex; align-items: center; gap: 20px; position: relative; }
.nav .status { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; color: var(--steel); text-transform: uppercase; }

/* dispatch dropdown */
.dispatch-wrap { position: relative; }
.status-btn {
  appearance: none; border: 1px solid var(--rule-strong); background: transparent;
  color: var(--ink); padding: 8px 12px; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.status-btn:hover { background: var(--paper-2); border-color: var(--ink); }
.status-btn .chev { transition: transform 0.2s var(--ease); color: var(--steel); }
.status-btn[aria-expanded="true"] .chev { transform: rotate(180deg); color: var(--ink); }

.dispatch-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  width: 320px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  box-shadow: 0 20px 60px rgba(10,22,40,0.12);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  pointer-events: none;
  z-index: 200;
}
.dispatch-menu:not([hidden]) { display: flex; }
.dispatch-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.dispatch-menu .dm-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
}
.dispatch-menu .dm-head .caps-mono { color: var(--ink); font-size: 10.5px; }
.dispatch-menu .dm-live {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #22C55E;
}
.dispatch-menu .dm-live .dot { width: 6px; height: 6px; border-radius: 50%; background: #22C55E; }
.dispatch-menu .dm-row {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s var(--ease), padding-left 0.2s var(--ease);
}
.dispatch-menu .dm-row:hover { background: var(--paper-2); padding-left: 22px; }
.dispatch-menu .dm-row .dm-k {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--steel);
}
.dispatch-menu .dm-row .dm-v {
  font-family: var(--font-sans); font-size: 15px; color: var(--ink); letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.dispatch-menu .dm-foot {
  padding: 12px 16px;
  font-family: var(--font-sans); font-size: 12px; color: var(--steel); letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
}
.nav .dot { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 0 rgba(34,197,94,0.6); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0%{ box-shadow: 0 0 0 0 rgba(34,197,94,0.6);} 70%{ box-shadow: 0 0 0 10px rgba(34,197,94,0);} 100%{ box-shadow: 0 0 0 0 rgba(34,197,94,0);} }

@media (max-width: 860px) {
  .nav .links { display: none; }
}

/* ---- hero ---- */
.hero { padding-top: 96px; padding-bottom: 32px; position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: end;
  padding-bottom: 40px;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }

.hero .meta { display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; }
.hero .meta .kicker { display: flex; gap: 18px; color: var(--steel); }
.hero h1 {
  font-size: clamp(44px, 6.8vw, 116px);
  margin-top: 20px;
}
.hero h1 .num { font-family: var(--font-mono); font-size: 0.55em; letter-spacing: -0.01em; vertical-align: super; color: var(--accent); margin-right: 8px; font-weight: 400; }

.hero .side { display: flex; flex-direction: column; gap: 28px; align-self: start; padding-top: 24px; transform: translateX(96px); }
.hero .hero-logo { display: block; width: 100%; max-width: 360px; line-height: 0; }
.hero .hero-logo img { width: 100%; height: auto; display: block; }
.hero .lead { font-family: var(--font-sans); font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* hero scale board */
.hero-board {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.hero-board .cell {
  padding: 28px 26px 24px;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 180px;
  position: relative;
}
.hero-board .cell:last-child { border-right: 0; }
.hero-board .tag { display: flex; justify-content: space-between; color: var(--steel); }
.hero-board .tag .id { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; }
/* Stat-board category labels (01 · Aerospace, 02 · Over-the-Road, etc.) — locked-in blue treatment.
   Color is forced on both the .id span and any inner <strong> so it can't be overridden by .tag's steel color. */
.hero-board .tag .id.hl-blue,
.hero-board .tag .id.hl-blue strong { color: var(--emph); }
.hero-board .tag .id strong { font-weight: 700; }
.hero-board .num {
  font-family: var(--font-display);
  font-size: clamp(48px, 6.5vw, 84px); line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-top: auto;
}
.hero-board .num .unit { font-family: var(--font-sans); font-size: 0.32em; font-weight: 500; margin-left: 6px; color: var(--steel); letter-spacing: 0.04em; }
.hero-board .lbl { font-family: var(--font-sans); font-size: 13px; color: var(--ink-3); }
@media (max-width: 960px) {
  .hero-board { grid-template-columns: repeat(2, 1fr); }
  .hero-board .cell:nth-child(2) { border-right: 0; }
  .hero-board .cell:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}

/* hero plate (right visual) */
.hero-plate {
  aspect-ratio: 4 / 5;
  background: var(--ink);
  color: var(--paper);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 22px;
}
.hero-plate::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(45,180,212,0.35) 0%, transparent 60%),
    linear-gradient(180deg, #1B2E4F 0%, #0A1628 100%);
}
.hero-plate .hp-top, .hero-plate .hp-bot { position: relative; z-index: 2; display: flex; justify-content: space-between; color: rgba(245,247,250,0.7); }
.hero-plate .hp-top span, .hero-plate .hp-bot span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; }
.hero-plate svg.tank-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }

/* ---- section header ---- */
.sec-head {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px;
  padding-block: var(--section-y) 40px;
  align-items: start;
}
.sec-head .tag { display: flex; flex-direction: column; gap: 10px; color: var(--steel); position: sticky; top: 84px; }
.sec-head h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(40px, 5.4vw, 80px); line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.sec-head h2 em { color: var(--emph); font-style: italic; }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; gap: 20px; } .sec-head .tag { position: static; } }

/* Centered section head — Capabilities */
.sec-head.sec-head-centered {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 24px;
}
.sec-head.sec-head-centered .tag-centered {
  position: static;
  align-items: center;
  text-align: center;
}
.sec-head.sec-head-centered .h2-centered {
  max-width: 22ch;
  margin: 0 auto;
}

/* top-aligned h2 — sits flush with the § tag's first line */
.sec-head .h2-top-align {
  margin-top: 0;
  padding-top: 4px;
}

/* Title head — title left edge band, headline right edge band; equal padding above & below.
   Apply to any section header that should mirror the Operations section's layout. */
#operations {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.sec-head.ops-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
  padding-block: 96px;
}
.sec-head.ops-head .tag {
  position: static;
  gap: 10px;
  justify-self: start;
  transform: translateX(32px);
}
.sec-head.ops-head .ops-headline {
  justify-self: end;
  width: min(100%, 42ch);
  transform: translateX(-192px);
}
.sec-head.ops-head .ops-headline .h2-top-align,
.sec-head.ops-head .ops-headline h2 {
  margin: 0;
}
@media (max-width: 860px) {
  .sec-head.ops-head { grid-template-columns: 1fr; gap: 32px; padding-block: 64px; }
  .sec-head.ops-head .tag { transform: none; }
  .sec-head.ops-head .ops-headline { justify-self: start; transform: none; width: 100%; }
}

/* Pipeline-head variant — single full-width row, headline runs as one line across.
   Tag sits left at the edge; headline spans the rest of the row, centered text. */
.sec-head.ops-head.pipeline-head {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 48px;
}
.sec-head.ops-head.pipeline-head .ops-headline {
  justify-self: stretch;
  width: 100%;
  transform: none;
}
.sec-head.ops-head.pipeline-head .ops-headline .pipeline-title {
  white-space: nowrap;
  text-align: center;
  font-size: clamp(28px, 3.6vw, 56px);
  margin: 0;
}
@media (max-width: 1100px) {
  .sec-head.ops-head.pipeline-head .ops-headline .pipeline-title {
    white-space: normal;
  }
}
@media (max-width: 860px) {
  .sec-head.ops-head.pipeline-head { grid-template-columns: 1fr; }
}

/* ---- capabilities grid ---- */
.cap-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule-strong);
}
.cap {
  padding: 36px 28px 28px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 18px;
  min-height: 420px;
  position: relative;
  background: var(--paper);
  transition: background 0.3s var(--ease);
}
.cap:nth-child(3n) { border-right: 0; }
.cap:hover { background: var(--paper-2); }
.cap .idx { display: flex; justify-content: space-between; align-items: center; color: var(--steel); }
.cap .idx .n { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; color: var(--ink); }
.cap .idx .badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--rule-strong); color: var(--ink-3); }
.cap h3 { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.05; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.cap .desc { font-size: 14.5px; line-height: 1.55; color: var(--ink-3); }
.cap .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--steel); }
.cap .foot .meta { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; }
.cap .thumb {
  height: 180px; background: var(--ink-2);
  position: relative; overflow: hidden;
  border: 1px solid var(--rule);
}
.cap .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.85) contrast(1.02); transition: transform 0.6s var(--ease), filter 0.4s var(--ease); }
.cap:hover .thumb img { transform: scale(1.03); filter: saturate(1) contrast(1.05); }
.cap .thumb-tank-tir img { object-fit: cover; object-position: 100% 16%; }
.cap:hover .thumb-tank-tir img { transform: none; }
.cap .thumb-cryo-trailer img { object-fit: cover; object-position: 50% 68%; filter: brightness(1.18) contrast(0.98) saturate(0.95); }
.cap:hover .thumb-cryo-trailer img { transform: none; filter: brightness(1.22) contrast(1) saturate(1); }
.cap .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,22,40,0) 55%, rgba(10,22,40,0.35) 100%); pointer-events: none; }
.cap .thumb .stamp { position: absolute; top: 12px; left: 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.9); background: rgba(10,22,40,0.7); padding: 4px 8px; border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(4px); }
.cap-glyph { position: absolute; inset: 0; }

/* Coming soon variant */
.cap.locked { background: repeating-linear-gradient(135deg, var(--paper) 0 10px, var(--paper-2) 10px 20px); }
.cap.locked .thumb { filter: blur(6px); opacity: 0.5; }
.cap.locked h3, .cap.locked .desc { filter: blur(4px); opacity: 0.5; user-select: none; }
.cap.locked .overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  pointer-events: none;
}
.cap.locked .overlay .pill {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
  padding: 8px 14px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
}
.cap.locked .overlay .hint { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--steel); }
.cap.locked:hover { background: var(--paper-2); }

@media (max-width: 960px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .cap:nth-child(3n) { border-right: 1px solid var(--rule); }
  .cap:nth-child(2n) { border-right: 0; }
}
@media (max-width: 640px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap { border-right: 0 !important; }
}

/* ---- pipeline diagram ---- */
.pipeline {
  position: relative;
  padding-block: 40px 60px;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.pipeline .pipe-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-block: 24px;
  border-bottom: 1px solid var(--rule);
}
.pipeline .pipe-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 28px; letter-spacing: -0.01em; }
.pipeline .pipe-head .fig { color: var(--steel); }
.pipeline .pipe-head-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pipeline .pipe-head-title .vp { font-family: var(--font-display); font-weight: 700; font-size: 44px; letter-spacing: -0.02em; color: var(--ink); }
.pipeline .pipe-head-title .vc { font-family: var(--font-sans); font-weight: 400; font-size: 14px; letter-spacing: 0.04em; color: var(--steel); text-transform: uppercase; }

/* "From wellhead to Burner Tip — Explained" — centered, ink, blue accent on Explained */
.pipeline-title { color: var(--ink); text-align: center; margin: 0 auto; }
.pipeline-title em { color: var(--emph) !important; font-style: italic; }
.pipeline-title .explained { color: var(--ink) !important; font-style: normal; white-space: nowrap; }
.pipe-steps {
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-top: 40px;
  position: relative;
}
.pipe-step { padding: 0 18px; position: relative; }
.pipe-step + .pipe-step { border-left: 1px dashed var(--rule-strong); }
.pipe-step .dot {
  width: 44px; height: 44px; border: 1px solid var(--emph); color: var(--emph);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; background: var(--paper);
  position: relative; margin-bottom: 20px;
}
.pipe-step .dot::after {
  content: ""; position: absolute; left: 100%; top: 50%; width: calc(100% - 8px); height: 1px;
  background: var(--rule-strong);
  transform: translateY(-0.5px);
}
.pipe-step:last-child .dot::after { display: none; }
.pipe-step h4 { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin-bottom: 6px; line-height: 1.1; }
.pipe-step .meta { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--steel); margin-bottom: 10px; }
.pipe-step p { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }

.pipe-step .glyph { width: 100%; height: 120px; margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: center; color: var(--ink); }
.pipe-step .glyph svg { width: 100%; height: 100%; max-width: 200px; }
.pipe-step .glyph .stroke { stroke: currentColor; fill: none; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.pipe-step .glyph .stroke-thin { stroke: currentColor; fill: none; stroke-width: 0.9; stroke-linecap: round; stroke-linejoin: round; }
.pipe-step .glyph .stroke-dash { stroke: var(--steel-2); fill: none; stroke-width: 0.9; stroke-dasharray: 2 2.5; stroke-linecap: round; }
.pipe-step .glyph .fill-ink { fill: currentColor; }
.pipe-step .glyph .accent { stroke: var(--ink); fill: var(--ice-2); stroke-width: 1; }
.pipe-step .glyph .hill { fill: color-mix(in srgb, var(--ink) 12%, var(--paper)); }
.pipe-step .glyph .baseline { stroke: var(--rule-strong); stroke-width: 0.9; stroke-dasharray: 1.5 2; }
@media (max-width: 860px) {
  .pipe-steps { grid-template-columns: 1fr; gap: 20px; }
  .pipe-step + .pipe-step { border-left: 0; border-top: 1px dashed var(--rule-strong); padding-top: 20px; }
  .pipe-step .dot::after { display: none; }
}

/* ---- stats / metrics strip ---- */
.metric-strip {
  display: block;
  background: var(--ink);
  color: var(--paper);
}
.metric-strip .m-band {
  padding: 56px 48px 0;
  display: flex; align-items: baseline; gap: 28px;
  border-bottom: 1px solid rgba(245,247,250,0.1);
  padding-bottom: 32px;
}
.metric-strip .m-band .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(245,247,250,0.85); white-space: nowrap; }
.metric-strip .m-band .note { font-size: 13.5px; color: rgba(245,247,250,0.7); margin: 0; max-width: 60ch; line-height: 1.5; }
.metric-strip .m-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.metric-strip .m {
  padding: 80px 48px;
  border-right: 1px solid rgba(245,247,250,0.1);
  position: relative;
}
.metric-strip .m-row .m:last-child { border-right: 0; }
.metric-strip .m .lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(245,247,250,0.55); margin-bottom: 24px; display: block; }
.metric-strip .m .num {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(56px, 7vw, 112px); letter-spacing: -0.03em; line-height: 0.95;
}
.metric-strip .m .unit { font-family: var(--font-sans); font-size: 0.3em; color: var(--ice); margin-left: 10px; letter-spacing: 0.02em; }
.metric-strip .m .note { margin-top: 14px; font-size: 13.5px; color: rgba(245,247,250,0.65); max-width: 28ch; line-height: 1.5; }
.metric-strip .m.m-head { display: none; }
@media (max-width: 860px) { .metric-strip .m-row { grid-template-columns: 1fr; } .metric-strip .m { border-right: 0; border-bottom: 1px solid rgba(245,247,250,0.1); padding: 48px 28px; } .metric-strip .m-band { flex-direction: column; gap: 12px; padding: 36px 28px 24px; } }

/* ---- footprint / states ---- */
.footprint-wrap { padding-block: 20px; }
.footprint-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid var(--rule);
  align-items: end;
}
.footprint-head .legend { display: flex; gap: 28px; color: var(--steel); }
.footprint-head .legend .item { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.footprint-head .legend .sw { width: 18px; height: 10px; }
.footprint-head .legend .sw.op { background: var(--ink); }
.footprint-head .legend .sw.exp { background: transparent; border: 1px solid var(--ink); }

.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 1px;
  background: var(--rule);
  margin-top: 32px;
}
.state {
  background: var(--paper);
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 2px;
  min-height: 92px;
  position: relative;
  transition: background 0.2s var(--ease);
}
.state .abbr { font-family: var(--font-display); font-size: 28px; line-height: 1; letter-spacing: -0.01em; color: var(--ink); }
.state .full { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--steel); margin-top: auto; }
.state.op { background: var(--ink); color: var(--paper); }
.state.op .abbr { color: var(--paper); }
.state.op .full { color: rgba(245,247,250,0.6); }
.state.exp::before {
  content: ""; position: absolute; top: 10px; right: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink);
}
.state:hover { background: var(--ice-2); }
.state.op:hover { background: var(--ink-3); }

/* ---- operations / leadership split ---- */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule-strong);
}
.split .panel { padding: 56px 48px; border-right: 1px solid var(--rule); }
.split .panel:last-child { border-right: 0; }
.split.split-stub .panel { padding: 28px 48px; }
.split h3 { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 20px; text-wrap: balance; }
.split p { max-width: 52ch; color: var(--ink-3); font-size: 15.5px; line-height: 1.6; }
.split .tag { margin-bottom: 20px; }
.split.split-stub .tag { margin-bottom: 0; }

/* under-construction banner */
.construction {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  overflow: hidden;
  padding: 16px 0;
  margin-bottom: 8px;
}
.construction-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  animation: cxmq 38s linear infinite;
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.construction-track .cx-glyph {
  display: inline-flex;
  align-items: center;
  color: var(--ink-3);
  opacity: 0.7;
  animation: cxbob 2.4s ease-in-out infinite;
}
.construction-track .cx-glyph:nth-child(3n+1) { animation-delay: 0s; }
.construction-track .cx-glyph:nth-child(3n+2) { animation-delay: 0.4s; }
.construction-track .cx-glyph:nth-child(3n)   { animation-delay: 0.8s; }
.construction-track .cx-text { white-space: nowrap; }
@keyframes cxmq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes cxbob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}
[data-theme="dark"] .construction { background: var(--paper-2); border-color: var(--rule); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split .panel { border-right: 0; border-bottom: 1px solid var(--rule); padding: 40px 28px; }
}

/* quote */
.quote {
  padding: 80px 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  display: flex;
  align-items: center;
  min-height: 420px;
}
.quote .wrap { width: 100%; }
.quote blockquote {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(32px, 4.5vw, 64px);
  line-height: 1.1; letter-spacing: -0.02em;
  max-width: 22ch;
  text-wrap: balance;
}
.quote blockquote em { color: var(--emph); font-style: italic; }
.quote .cite {
  margin-top: 32px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  color: var(--steel);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
}
.quote .cite .cite-left { display: flex; gap: 12px; align-items: center; }
.quote .cite .cite-right { display: flex; gap: 12px; align-items: center; }

/* ---- contact ---- */
.contact {
  background: var(--ink); color: var(--paper);
  padding: 100px 0;
  position: relative; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(50% 60% at 90% 30%, rgba(111,182,219,0.2) 0%, transparent 70%),
    radial-gradient(60% 80% at 10% 90%, rgba(111,182,219,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.contact .wrap { position: relative; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: start; }
.contact h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(48px, 6.5vw, 96px); letter-spacing: -0.02em; line-height: 0.98; text-wrap: balance; margin-bottom: 32px; }
.contact h2 em { color: var(--emph); font-style: italic; }
.contact .lead { max-width: 50ch; color: rgba(245,247,250,0.75); font-size: 18px; line-height: 1.55; margin-bottom: 40px; }
.contact-info { display: grid; gap: 2px; background: rgba(245,247,250,0.1); }
.contact-info .row { background: var(--ink); padding: 22px 24px; display: flex; justify-content: space-between; gap: 20px; align-items: baseline; }
.contact-info .row .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(245,247,250,0.55); }
.contact-info .row .v { font-family: var(--font-sans); font-size: 15px; color: var(--paper); text-decoration: none; }
.contact-info .row .v:hover { color: var(--ice); }
.contact .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.contact .btn:hover { background: transparent; color: var(--paper); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ---- footer ---- */
footer {
  padding: 40px var(--gutter);
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  color: var(--steel);
}
.foot-row { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }

/* ---- marquee ---- */
.marquee {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  overflow: hidden;
  padding: 22px 0;
  background: var(--paper-2);
}
.marquee-track {
  display: flex; gap: 56px;
  animation: mq 44s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.marquee-track span {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 56px;
}
.marquee-track span::after {
  content: "§"; color: var(--steel); font-family: var(--font-display); font-size: 20px; letter-spacing: 0; text-transform: none;
}
@keyframes mq { from { transform: translateX(0);} to { transform: translateX(-50%);} }

/* entry animations */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- modal ---- */
.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal .modal-backdrop {
  position: absolute; inset: 0; background: rgba(10,22,40,0.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.25s var(--ease);
}
.modal.open .modal-backdrop { opacity: 1; }
.modal-card {
  position: relative; z-index: 2;
  background: var(--paper); color: var(--ink);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow: auto;
  padding: 40px 40px 32px;
  border: 1px solid var(--rule-strong);
  box-shadow: 0 40px 100px rgba(10,22,40,0.3);
  opacity: 0; transform: translateY(12px) scale(0.98);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.modal.open .modal-card { opacity: 1; transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  appearance: none; background: transparent; border: 0; cursor: pointer;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); border-radius: 0;
}
.modal-close:hover { color: var(--ink); background: var(--paper-2); }
.modal-head { margin-bottom: 24px; }
.modal-head .caps-mono { display: block; margin-bottom: 10px; }
.modal-head h3 { font-size: clamp(32px, 4vw, 44px); line-height: 1; letter-spacing: -0.02em; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.field-row { display: flex; flex-direction: column; gap: 6px; }
.f-lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.f-req { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--steel); }
.f-input {
  appearance: none; width: 100%;
  border: 1px solid var(--rule-strong); background: var(--white); color: var(--ink);
  font-family: var(--font-sans); font-size: 15px;
  padding: 12px 14px; outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.f-input::placeholder { color: var(--steel-2); }
.f-input:focus { border-color: var(--ink); background: var(--paper-2); }
.f-text { resize: vertical; min-height: 72px; font-family: var(--font-sans); }
.f-err {
  display: none;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  color: #C94A3A; margin-top: 2px;
}
.field-row.invalid .f-input { border-color: #C94A3A; background: rgba(201,74,58,0.04); }
.field-row.invalid .f-err { display: block; }

.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-3); border-color: var(--ink-3); color: var(--paper); }
.btn-ghost-light { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost-light:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.modal-hint { color: var(--steel); margin-top: 2px; }
.form-success { margin-top: 16px; padding: 18px; background: var(--paper-2); border: 1px solid var(--rule); }
.form-success .caps-mono { display: block; color: #1E8E5C; margin-bottom: 6px; }
.form-success p { font-size: 14px; color: var(--ink-2); line-height: 1.5; }

@media (max-width: 560px) {
  .modal-card { padding: 28px 22px 22px; }
  .modal-actions { flex-direction: column; align-items: stretch; }
  .modal-actions .btn { justify-content: center; }
}

[data-accent="hot"] { --accent: var(--accent-hot); }

/* Blue highlight — used sparingly in headings */
.hl-blue { color: var(--emph); font-style: inherit; }

/* ============================================================
   DARK THEME — toggle on <body data-theme="dark">
   ============================================================ */

/* tokens — same shape as the midnight palette, slightly tuned */
[data-theme="dark"] {
  --ink: #E7EEF6;
  --ink-2: #C3D2E2;
  --ink-3: #93A8BF;
  --steel: #6A8098;
  --steel-2: #506985;
  --ice: #3C5677;
  --ice-2: #1F2F4A;
  --paper: #070D17;
  --paper-2: #0B1322;
  --white: #0B1322;
  --rule: rgba(231, 238, 246, 0.10);
  --rule-strong: rgba(231, 238, 246, 0.22);
  --bg: var(--paper);
  --fg: var(--ink);
  /* "always-dark" inverted blocks (hero plate, contact, metric strip, field overlay) — keep them deep */
  --invert-bg: #050912;
  --invert-bg-2: #0A1322;
  --invert-fg: #E7EEF6;
}

/* selection */
[data-theme="dark"] ::selection { background: var(--ink); color: var(--paper); }

/* nav glass */
[data-theme="dark"] .nav { background: color-mix(in oklab, #070D17 72%, transparent); }
[data-theme="dark"] .nav.scrolled { background: color-mix(in oklab, #070D17 92%, transparent); }
[data-theme="dark"] .nav .brand,
[data-theme="dark"] .status-btn { color: var(--ink); }
[data-theme="dark"] .nav .links a { color: var(--ink-2); }
[data-theme="dark"] .nav .links a:hover { color: var(--ink); }

/* dispatch menu pop-over */
[data-theme="dark"] .dispatch-menu { background: var(--paper-2); border-color: var(--rule-strong); box-shadow: 0 20px 60px rgba(0,0,0,0.55); }
[data-theme="dark"] .dispatch-menu .dm-row:hover { background: rgba(231,238,246,0.05); }

/* primary button stays as a solid block; flip to light-on-dark feel */
[data-theme="dark"] .btn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
[data-theme="dark"] .btn:hover { background: transparent; color: var(--ink); }
[data-theme="dark"] .btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
[data-theme="dark"] .btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* strong (bold) — was forced to ink in light, needs to flip */
[data-theme="dark"] strong { color: var(--ink); }

/* ----- LOGO HALO -----
   In light mode the logo already sits on a near-white page so its white background
   blends naturally. In dark mode we wrap the <img> with a radial-gradient halo so
   the white-paper rectangle of the logo dissolves softly into the dark page. */

/* nav logo: PNG has true alpha so it works on dark backgrounds without modification.
   Slight brightness bump only, to lift the dark wordmark on the dark nav. */
[data-theme="dark"] .nav .brand img.logo-mark {
  filter: brightness(1.15) contrast(1.05);
}

/* hero logo on dark theme: same — alpha PNG, no blend tricks needed. Soft halo behind for legibility. */
[data-theme="dark"] .hero .hero-logo {
  position: relative;
}
[data-theme="dark"] .hero .hero-logo::before {
  content: "";
  position: absolute;
  inset: -12% -10% -10% -8%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(245,247,250,0.35) 0%,
    rgba(245,247,250,0.20) 40%,
    rgba(245,247,250,0.08) 64%,
    rgba(245,247,250,0.02) 84%,
    rgba(245,247,250,0) 100%);
  pointer-events: none;
  filter: blur(10px);
}
[data-theme="dark"] .hero .hero-logo img {
  filter: brightness(1.1) contrast(1.05);
  position: relative;
  z-index: 1;
}

/* ----- HERO ----- */
[data-theme="dark"] .hero .lead { color: var(--ink-2); }
[data-theme="dark"] .hero-plate {
  background: var(--invert-bg);
  color: var(--invert-fg);
}
[data-theme="dark"] .hero-plate::before {
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(45,180,212,0.30) 0%, transparent 60%),
    linear-gradient(180deg, #0E1A30 0%, #050912 100%);
}

/* photo / field overlay tones still read as dark imagery */
[data-theme="dark"] .photo { background: var(--paper-2); border-color: var(--rule); }
[data-theme="dark"] .photo .caption {
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.85) 100%);
  color: #E7EEF6;
}
[data-theme="dark"] .field .overlay {
  background: linear-gradient(100deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.42) 55%, transparent 100%);
}
[data-theme="dark"] .field .overlay-inner { color: #F5F7FA; }

/* ----- CAPABILITIES ----- */
[data-theme="dark"] .cap { background: var(--paper); }
[data-theme="dark"] .cap:hover { background: var(--paper-2); }
[data-theme="dark"] .cap .thumb { background: #060B16; border-color: var(--rule); }
[data-theme="dark"] .cap .thumb::after { background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.45) 100%); }
[data-theme="dark"] .cap.locked { background: repeating-linear-gradient(135deg, var(--paper) 0 10px, var(--paper-2) 10px 20px); }
[data-theme="dark"] .cap.locked .overlay .pill { background: var(--paper-2); border-color: var(--ink); color: var(--ink); }

/* ----- PIPELINE STEPS ----- */
[data-theme="dark"] .pipe-step .dot { background: var(--paper); border-color: var(--emph); color: var(--emph); }
[data-theme="dark"] .pipe-step + .pipe-step { border-left-color: var(--rule-strong); }

/* ----- METRIC STRIP ----- */
[data-theme="dark"] .metric-strip {
  background: var(--invert-bg);
  color: var(--invert-fg);
  border-block: 1px solid var(--rule-strong);
}
[data-theme="dark"] .metric-strip strong { color: var(--invert-fg); }

/* ----- FOOTPRINT / STATE GRID ----- */
[data-theme="dark"] .state { background: var(--paper-2); }
[data-theme="dark"] .state .abbr { color: var(--ink); }
[data-theme="dark"] .state.op { background: var(--ink); color: var(--paper); }
[data-theme="dark"] .state.op .abbr { color: var(--paper); }
[data-theme="dark"] .state.op .full { color: rgba(7,13,23,0.6); }
[data-theme="dark"] .state.exp::before { background: var(--ink); }
[data-theme="dark"] .state:hover { background: var(--ice-2); }
[data-theme="dark"] .state.op:hover { background: var(--ink-2); }
[data-theme="dark"] .footprint-head .legend .sw.op { background: var(--ink); }
[data-theme="dark"] .footprint-head .legend .sw.exp { border-color: var(--ink); }
[data-theme="dark"] .state-grid { background: var(--rule-strong); }

/* ----- QUOTE ----- */
[data-theme="dark"] .quote { background: var(--paper); }
[data-theme="dark"] .quote blockquote { color: var(--ink); }

/* ----- CONTACT (the "Let's put generation on your calendar" block) ----- */
[data-theme="dark"] .contact {
  background: var(--invert-bg);
  color: var(--invert-fg);
}
[data-theme="dark"] .contact::before {
  background:
    radial-gradient(50% 60% at 90% 30%, rgba(125,211,252,0.18) 0%, transparent 70%),
    radial-gradient(60% 80% at 10% 90%, rgba(125,211,252,0.07) 0%, transparent 70%);
}
[data-theme="dark"] .contact-info { background: rgba(231,238,246,0.10); }
[data-theme="dark"] .contact-info .row { background: var(--invert-bg); }
[data-theme="dark"] .contact-info .row .k { color: rgba(231,238,246,0.55); }
[data-theme="dark"] .contact-info .row .v { color: var(--invert-fg); }
[data-theme="dark"] .contact-info .row .v:hover { color: var(--ice); }
[data-theme="dark"] .contact .btn { background: var(--invert-fg); color: var(--invert-bg); border-color: var(--invert-fg); }
[data-theme="dark"] .contact .btn:hover { background: transparent; color: var(--invert-fg); }
[data-theme="dark"] .contact strong { color: var(--invert-fg); }
[data-theme="dark"] .metric-strip strong { color: var(--invert-fg); }

/* ----- FOOTER + MARQUEE ----- */
[data-theme="dark"] footer { background: var(--paper-2); border-color: var(--rule); color: var(--steel); }
[data-theme="dark"] .marquee { background: var(--paper-2); border-color: var(--rule-strong); }
[data-theme="dark"] .marquee-track span { color: var(--ink-2); }
[data-theme="dark"] .marquee-track span::after { color: var(--steel); }

/* ----- MODAL ----- */
[data-theme="dark"] .modal .modal-backdrop { background: rgba(0,0,0,0.7); }
[data-theme="dark"] .modal-card { background: var(--paper); color: var(--ink); border-color: var(--rule-strong); box-shadow: 0 40px 100px rgba(0,0,0,0.6); }
[data-theme="dark"] .f-input { background: var(--paper-2); color: var(--ink); border-color: var(--rule-strong); }
[data-theme="dark"] .f-input:focus { background: var(--paper); border-color: var(--ink); }
[data-theme="dark"] .f-input::placeholder { color: var(--steel-2); }
[data-theme="dark"] .modal-close { color: var(--ink-3); }
[data-theme="dark"] .modal-close:hover { color: var(--ink); background: var(--paper-2); }
[data-theme="dark"] .field-row.invalid .f-input { border-color: #F87171; background: rgba(248,113,113,0.05); }
[data-theme="dark"] .f-err { color: #F87171; }

/* ----- THEME TOGGLE BUTTON ----- */
.theme-toggle {
  appearance: none; cursor: pointer;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  border-radius: 0;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.theme-toggle:hover { background: var(--paper-2); border-color: var(--ink); }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle:hover { background: rgba(231,238,246,0.06); border-color: var(--ink); }

/* smooth color transition across the page when toggling */
html, body,
.nav, .cap, .state, .pipe-step .dot, .marquee, footer,
.contact, .metric-strip, .hero-plate, .quote, .modal-card, .f-input {
  transition: background-color 0.32s var(--ease), color 0.32s var(--ease), border-color 0.32s var(--ease);
}
