/* ==================================================================
   THEME — direction 49. Deep navy hero over white, IBM Plex, oxblood
   figures, Carbon grid discipline, square corners.

   Loaded LAST on every page. Everything here is either a token value
   or one of the three things tokens cannot express: gradients that must
   become flat, glows that make no sense on white, and the dark hero band.

   To revert the whole restyle, remove the theme.css link from the pages.
   ================================================================== */
/* Fonts are linked from each page head with preconnect, not @import.
   An @import here would serialise the download behind theme.css. */

:root {
  /* ---------- Palette ---------- */
  --bg: #FFFFFF;
  --surface: #F4F4F4;
  --hero: #051C2C;
  --hero-text: #F2F5F8;
  --hero-muted: #A9BECD;
  --violet: #051C2C;          /* the accent role: navy */
  --uv: #2D4A64;
  --cyan: #2D6CA8;            /* label and mark colour on light ground */
  --hero-mark: #6EA8D8;       /* the same role on the dark hero band */
  --text: #161616;
  --muted: #525252;

  /* ---------- Triplets. --fill flips from white to ink on a light ground ---------- */
  --bg-rgb: 255, 255, 255;
  --surface-rgb: 244, 244, 244;
  --text-rgb: 22, 22, 22;
  --fill-rgb: 22, 22, 22;
  --violet-rgb: 5, 28, 44;
  --uv-rgb: 45, 74, 100;
  --cyan-rgb: 45, 108, 168;
  --shadow-rgb: 0, 0, 0;
  --warn-rgb: 138, 83, 16;
  --warn-edge-rgb: 194, 104, 63;

  /* ---------- Semantic ---------- */
  --line: #E0E0E0;
  --accent: var(--violet);
  --accent-deep: #0A2A3F;
  --on-accent: #FFFFFF;
  --cost: #7E2B33;            /* oxblood */
  --good: #0F7B5F;
  --warn: #8A5310;
  --warn-soft: #A3543A;
  --warn-edge: #C2683F;

  /* ---------- Type ---------- */
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-head: "IBM Plex Sans", system-ui, sans-serif;
}

/* ---------- 1. Gradients flatten. A gradient is the signature we are removing. ---------- */
.grad, .logo span, h1 .grad, h2 .grad {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  color: var(--accent) !important;
  -webkit-text-fill-color: currentColor !important;
}
.btn-primary, .nav-cta, .consent-yes {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.btn-primary:hover, .nav-cta:hover, .consent-yes:hover {
  background: var(--accent-deep) !important;
  transform: none !important;
  box-shadow: none !important;
}
.btn-ghost, .consent-no { border-radius: 0 !important; }

/* ---------- 2. Glows are a dark-ground device ---------- */
.glass:hover, .team-card:hover, .result-card, .scope-card, .stage,
.pdms-summary, .proof-figure, .mkt-stat, .cmp, .inv-form { box-shadow: none !important; }
.glass:hover, .team-card:hover { transform: none !important; border-color: var(--accent) !important; }

/* ---------- 3. The hero keeps a dark band. This is why #49 needs no new photography. ---------- */
.inv-hero, .pdms-hero {
  background: var(--hero) !important;
  border-bottom: 0;
  color: var(--hero-text);
}
.inv-hero h1, .pdms-hero h1 { color: var(--hero-text); }
.inv-hero .positioning, .pdms-hero .positioning, .inv-hero .hero-tag { color: var(--hero-muted); }
.inv-hero .hero-tag { color: var(--hero-text); }
.inv-hero .round-status { border-top-color: rgba(242,245,248,.22); color: var(--hero-muted); }
.inv-hero .round-status b, .pdms-hero .back-link { color: var(--hero-text); }
.inv-hero .kicker, .pdms-hero .kicker { color: var(--hero-mark); }
.inv-hero .btn-primary { background: var(--on-accent) !important; color: var(--hero) !important; }

/* ---------- 4. Nav sits on white ---------- */
nav { background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--accent); }
.logo .logo-word { color: var(--accent); }
.logo-mark path { fill: var(--accent) !important; }

/* ---------- 5. Carbon discipline: square corners, grey table headers, rules ---------- */
.glass, .result-card, .scope-card, .stage, .team-card, .pdms-summary, .method,
.toc, .cost-table, .cmp, .mkt-stat, .fam, .fstep, .inv-form input, .inv-form textarea {
  border-radius: 0 !important;
}
.cost-table thead th, .cmp thead th { background: var(--surface); color: var(--accent); border-bottom: 2px solid var(--accent); }
h2 { color: var(--accent); }
.kicker { color: var(--cyan); }
section:not(.inv-hero):not(.pdms-hero) .kicker { color: var(--uv); }
.team-section { background: var(--surface); }
.claim { color: var(--text); }

/* ---------- 6. Cost figures: oxblood, everywhere they appear ---------- */
.cost-brief b, .pdms-wait b, .cost-table .price, .fig { color: var(--cost) !important; }

/* ---------- 7. Contents block ---------- */
.readnote, .quiet-note { border-left-color: var(--accent); }
.toc-grid .n { color: var(--cyan); }

/* On the dark hero the accent is invisible, so emphasis spans take the light mark. */
.inv-hero .grad, .pdms-hero .grad, .inv-hero h1 .grad, .pdms-hero h1 .grad {
  color: var(--hero-mark) !important;
}
/* Anything inside the dark band that would otherwise take the light-ground mark. */
.inv-hero .rs-item b, .inv-hero .round-status .dot { color: var(--hero-mark); }
.inv-hero .logo-word, .pdms-hero .logo-word { color: var(--hero-text); }

/* ---------- 8. Hero stage. Built for near-black; the reflection and the
     horizon line both read as artifacts on navy, so they go. The photo keeps
     mix-blend-mode: lighten, which is what knocks its black background out
     against the band. ---------- */
.stage-floor, .stage-horizon { display: none !important; }
.stage-glow {
  background: radial-gradient(ellipse 58% 50% at 50% 52%,
    rgba(110, 168, 216, 0.22), rgba(110, 168, 216, 0.06) 55%, transparent 74%) !important;
  filter: blur(46px) !important;
}
.hero-photo .stage-img { filter: contrast(1.05) saturate(1.04) brightness(1.02) !important; }
