/* ChematIQs website · Deep Navy direction
   Layout: dark-first single look (Ink ground, navy bands) with light "evidence" bands for reading-heavy sections.
   Tokens follow DESIGN.md. Components use tokens only; .light swaps the token set inside a band. */

:root {
  /* brand core */
  --navy: #0A3D5C;
  --cobalt: #1670A3;
  --sky: #5FB4E0;
  --teal: #1E8A8A;
  --ink: #0F1B24;
  --off-white: #F5F8FA;

  /* surface tokens: dark (default) */
  --bg: #0F1B24;
  --card: #18262F;
  --band: #0A3D5C;
  --fg: #F5F8FA;
  --heading: #FFFFFF;
  --muted: rgba(245, 248, 250, 0.78);
  --rule: rgba(245, 248, 250, 0.25);
  --hair: rgba(245, 248, 250, 0.14);
  --panel: rgba(245, 248, 250, 0.06);
  --accent: #5FB4E0;           /* labels, numerals, links on dark */
  --hairline: linear-gradient(135deg, #5FB4E0 0%, rgba(245, 248, 250, 0.14) 60%);
  --btn: #1670A3;
  --btn-hover: #125E8A;
  --pip-empty: rgba(245, 248, 250, 0.4);

  /* hazard scale, dark fills (text on fill: ink) */
  --hz-1: #4ADE80; --hz-2: #FFC247; --hz-3: #FF5F52; --hz-4: #9D7CFF; --hz-none: #7A8B98;

  /* gradients */
  --gradient-signal: linear-gradient(135deg, #0A3D5C 0%, #5FB4E0 100%);
  --gradient-signal-bar: linear-gradient(90deg, #0A3D5C 0%, #5FB4E0 100%);
  --gradient-accent: linear-gradient(135deg, #1670A3 0%, #1E8A8A 100%);

  /* type */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* spacing & shape */
  --gutter: max(24px, env(safe-area-inset-left, 0px));
  --gutter-r: max(24px, env(safe-area-inset-right, 0px));
  --section: clamp(64px, 9vw, 112px);
  --radius: 8px;
  --radius-lg: 12px;
  --cut: 26px;

  color-scheme: dark;
}

/* light band: same structure, tokens swap */
.light {
  --bg: #F5F8FA;
  --card: #FFFFFF;
  --band: #E3F0F7;
  --fg: #0F1B24;
  --heading: #0A3D5C;
  --muted: #4A5B68;
  --rule: #D5E0E7;
  --hair: #D5E0E7;
  --panel: #E3F0F7;
  --accent: #1670A3;
  --hairline: linear-gradient(135deg, #1670A3 0%, #D5E0E7 60%);
  --pip-empty: #A9BAC6;
  --hz-1: #2FB866; --hz-2: #E8A317; --hz-3: #D42A1C; --hz-4: #3F3578;
  color-scheme: light;
  background: var(--bg);
  color: var(--fg);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--bg);
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--heading); text-wrap: balance; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 2px; }
sub { font-size: 0.72em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--btn); color: #fff; padding: 8px 14px; border-radius: var(--radius); }
.skip:focus { left: 16px; }

/* ---------- layout ---------- */
.wrap {
  max-width: 1240px; margin-inline: auto;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
}
.section { padding-block: var(--section); }
.section:not(.light):not(.band) + .section:not(.light):not(.band) { padding-top: 0; }
.band { background: var(--band); }
.rule-top { border-top: 1px solid var(--hair); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 56px); }
.row { display: flex; flex-wrap: wrap; gap: 24px clamp(32px, 5vw, 72px); }
.row > * { min-width: 0; }
.split { display: flex; flex-wrap: wrap; gap: 48px clamp(40px, 6vw, 88px); align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }
.split > .panel { flex: 1.25 1 480px; }
.pips { white-space: nowrap; }
table.data td.mono { white-space: nowrap; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 240px)), 1fr)); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 780px; }
.section-head.wide { max-width: 980px; }
.section-head-row { display: flex; flex-wrap: wrap; gap: 24px 64px; align-items: flex-end; justify-content: space-between; }
.section-head-row > .section-head { flex: 1 1 520px; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
}
.tagline { font-family: var(--font-mono); font-size: 0.9375rem; color: var(--accent); }
.display {
  font-weight: 800; font-size: clamp(2.6rem, 5.6vw, 4.75rem);
  line-height: 1.02; letter-spacing: -0.02em;
}
.h2 { font-weight: 700; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -0.015em; }
.h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.25; }
.lead { font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.6; max-width: 36em; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.small { font-size: 0.875rem; }
.caption { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.prose { display: flex; flex-direction: column; gap: 18px; max-width: 38em; font-size: 1.0625rem; }
.num {
  font-family: var(--font-display); font-weight: 700; color: var(--accent);
  font-size: clamp(2.5rem, 4.4vw, 3.5rem); line-height: 1; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color 180ms ease-out, color 180ms ease-out, border-color 180ms ease-out;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--btn); color: #FFFFFF; }
.btn-primary:hover { background: var(--btn-hover); }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--panel); }
.btn-highlight { background: var(--gradient-accent); color: #FFFFFF; min-height: 52px; padding: 0 26px; font-size: 1.0625rem; }
.btn-highlight:hover { filter: brightness(1.08); }
.btn-link { color: var(--accent); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.light .btn-secondary { background: #FFFFFF; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(15, 27, 36, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}
.nav { display: flex; align-items: center; gap: 16px 32px; min-height: 72px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 16px; flex: none; }
.brand img { height: 34px; width: auto; }
.brand-line {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
  border-left: 1px solid var(--rule); padding-left: 16px; white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 8px 28px; margin-left: auto; list-style: none; padding: 0; }
.nav-links a { color: var(--fg); font-weight: 500; font-size: 0.9375rem; padding-block: 10px; }
.nav-links a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-cta { flex: none; }
.nav-toggle {
  display: none; margin-left: auto; min-height: 44px; min-width: 44px; padding: 0 12px;
  background: transparent; color: var(--fg); border: 1px solid var(--rule); border-radius: var(--radius);
  font: 500 0.875rem var(--font-mono); cursor: pointer;
}
@media (max-width: 1080px) { .brand-line { display: none; } }
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-links, .nav-cta { display: none; width: 100%; }
  .nav[data-open="true"] .nav-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 0; }
  .nav[data-open="true"] .nav-links li { width: 100%; border-top: 1px solid var(--hair); }
  .nav[data-open="true"] .nav-links a { display: block; padding-block: 14px; }
  .nav[data-open="true"] .nav-cta { display: inline-flex; margin-bottom: 8px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; padding-block: clamp(64px, 9vw, 112px) clamp(56px, 8vw, 96px); }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero-hex {
  position: absolute; right: -140px; top: -60px; width: min(780px, 90vw); height: auto;
  pointer-events: none; opacity: 0.9;
}
@media (max-width: 860px) { .hero-hex { right: -45vw; top: auto; bottom: -20%; opacity: 0.45; } }

/* ---------- cut-corner card with gradient hairline ---------- */
.card {
  position: relative; isolation: isolate;
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  background: var(--hairline);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.card::before {
  content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--card);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.card.emph { background: linear-gradient(135deg, var(--navy) 0%, var(--cobalt) 100%); color: #FFFFFF; }
.card.emph::before { display: none; }
.card.emph h3, .card.emph .card-label { color: #FFFFFF; }
.card.dashed { background: transparent; border: 1px dashed var(--rule); clip-path: none; border-radius: var(--radius-lg); }
.card.dashed::before { display: none; }
.card-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.card p { font-size: 0.9375rem; line-height: 1.55; }
.card .foot { margin-top: auto; padding-top: 8px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }

/* ---------- tags / chips ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.3;
  padding: 4px 10px; border: 1px solid var(--rule); border-radius: 6px; color: var(--fg);
}
.tag-solid { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 500; }
.light .tag-solid { color: #FFFFFF; background: var(--cobalt); border-color: var(--cobalt); }
.tag-next { border-color: var(--accent); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- hazard pip meter ---------- */
.pips { display: inline-flex; align-items: center; gap: 3px; }
.pips svg { width: 13px; height: 15px; flex: none; }
.pips polygon { fill: none; stroke: var(--pip-empty); stroke-width: 1; }
.pips[data-level="1"] svg:nth-child(-n+1) polygon { fill: var(--hz-1); stroke: var(--hz-1); }
.pips[data-level="2"] svg:nth-child(-n+2) polygon { fill: var(--hz-2); stroke: var(--hz-2); }
.pips[data-level="3"] svg:nth-child(-n+3) polygon { fill: var(--hz-3); stroke: var(--hz-3); }
.pips[data-level="4"] svg:nth-child(-n+4) polygon { fill: var(--hz-4); stroke: var(--hz-4); }
.pips .lvl { margin-left: 8px; font-weight: 600; font-size: 0.9375rem; color: var(--heading); }

/* ---------- substance panel (hero visual) ---------- */
.panel {
  background: var(--card); border: 1px solid var(--hair); padding: 24px;
  display: flex; flex-direction: column; gap: 20px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.panel-title { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--heading); line-height: 1.2; }
.panel-meter { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--panel); border-radius: var(--radius); }
.panel-meter .caption { flex: 1 1 auto; }
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); font-size: 0.9375rem; }
.kv > div:last-child { border-bottom: 1px solid var(--hair); }
.kv .caption { white-space: nowrap; }

/* ---------- data table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--hair); border-radius: var(--radius-lg); background: var(--card); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
table.data th, table.data td { padding: 16px 20px; text-align: left; vertical-align: top; }
table.data thead th {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted); background: var(--panel);
}
table.data tbody tr { border-top: 1px solid var(--hair); }
table.data tbody th { font-weight: 600; color: var(--heading); }
table.data .us { background: var(--panel); color: var(--heading); font-weight: 500; }
table.data thead th.us { background: var(--navy); color: #FFFFFF; }
table.data .r { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- stat strip ---------- */
.stats { display: grid; gap: 32px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.stat { display: flex; flex-direction: column; gap: 10px; }
.stat p { font-size: 0.9375rem; line-height: 1.5; max-width: 22em; }

/* ---------- big-number list (cost of not knowing) ---------- */
.figures { display: flex; flex-direction: column; }
.figure-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; padding-block: 24px; border-top: 1px solid var(--rule); }
.figure-row:last-child { border-bottom: 1px solid var(--rule); }
.figure-row .num { flex: 0 0 min(100%, 280px); color: var(--heading); }
.figure-row p { flex: 1 1 240px; }

/* ---------- supply chain diagram ---------- */
.chain { display: grid; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; }
.chain li { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px 28px 24px 0; }
.chain li + li { padding-left: 28px; border-left: 1px solid var(--hair); }
.chain .stage { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--heading); }
.chain .seen { display: block; height: 6px; border-radius: 3px; background: var(--hair); overflow: hidden; }
.chain .seen span { display: block; height: 100%; background: var(--sky); border-radius: 3px; }
.chain li:nth-child(1) .seen span { width: 100%; }
.chain li:nth-child(2) .seen span { width: 55%; opacity: 0.85; }
.chain li:nth-child(3) .seen span { width: 30%; opacity: 0.7; }
.chain li:nth-child(4) .seen span { width: 12%; opacity: 0.55; }
.chain .need { color: var(--accent); }
@media (max-width: 860px) {
  .chain { grid-template-columns: 1fr; }
  .chain li, .chain li + li { padding: 20px 0; border-left: 0; border-top: 1px solid var(--hair); }
}

/* ---------- roadmap ---------- */
.roadmap { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 32px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.roadmap::before {
  content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 3px; border-radius: 2px;
  background: var(--gradient-signal-bar);
}
.roadmap li { position: relative; display: flex; flex-direction: column; gap: 12px; }
.roadmap .hex { width: 28px; height: 32px; }
.roadmap .hex polygon.outer { fill: var(--band); stroke: var(--rule); stroke-width: 1.2; }
.roadmap .hex polygon.inner { fill: none; }
.roadmap li.done .hex polygon.outer { fill: var(--sky); stroke: var(--sky); }
.roadmap li.next .hex polygon.outer { stroke: var(--sky); stroke-width: 1.4; }
.roadmap li.next .hex polygon.inner { fill: var(--sky); }
.roadmap h3 { font-size: 1.75rem; }
.roadmap .when { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.roadmap li.later .when { color: var(--muted); }
@media (max-width: 760px) { .roadmap::before { display: none; } }

/* ---------- timeline (investors developments) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 8px 32px; padding-block: 20px; border-top: 1px solid var(--rule); }
.timeline li:last-child { border-bottom: 1px solid var(--rule); }
.timeline .when { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--accent); padding-top: 3px; }
.timeline h3 { font-size: 1.125rem; margin-bottom: 4px; }
.timeline p { color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; } }

/* ---------- video ---------- */
.video {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9;
  background: var(--navy); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--hair);
}
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.video-trigger {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: clamp(20px, 4vw, 40px);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 10px;
  background: transparent; color: #FFFFFF; text-align: left; cursor: pointer; font: inherit;
}
.video-trigger img.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.video-trigger > *:not(.poster):not(.video-hex) { position: relative; z-index: 1; }
.video-hex { position: absolute; right: -6%; top: -18%; width: 62%; height: auto; z-index: 0; opacity: 0.9; }
.video-play {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cobalt); transition: transform 200ms ease-out, background-color 200ms ease-out;
  margin-bottom: auto;
}
.video-play svg { width: 26px; height: 26px; margin-left: 4px; }
.video-trigger:hover .video-play { transform: scale(1.06); background: #1A80BB; }
.video-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.2; }
.video-meta { font-family: var(--font-mono); font-size: 0.8125rem; color: rgba(245, 248, 250, 0.85); }
.video[data-has-poster] .video-trigger { justify-content: center; align-items: center; }
.video[data-has-poster] .video-play { margin: 0; box-shadow: 0 0 0 8px rgba(22, 112, 163, 0.25); }
.video[data-has-poster] .video-hex,
.video[data-has-poster] .video-title { display: none; }
.video[data-has-poster] .video-meta {
  position: absolute; left: 16px; bottom: 16px; z-index: 1;
  background: rgba(15, 27, 36, 0.88); color: #F5F8FA; padding: 6px 10px; border-radius: 6px;
}
.video.wide { aspect-ratio: 16 / 10; }
.video[data-state="pending"] .video-trigger { cursor: default; }
.video[data-state="pending"] .video-play { background: rgba(245, 248, 250, 0.14); }

/* ---------- quote ---------- */
.quote { display: flex; flex-direction: column; gap: 20px; }
.quote .mark { font-family: var(--font-display); font-weight: 800; font-size: 6rem; line-height: 0.6; color: var(--teal); height: 0.5em; }
.quote p { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.8vw, 2.25rem); line-height: 1.25; letter-spacing: -0.01em; color: var(--heading); text-wrap: balance; }
.quote footer { display: flex; flex-direction: column; gap: 2px; }
.quote footer strong { color: var(--heading); }

/* ---------- team ---------- */
.person { display: flex; flex-direction: column; gap: 14px; }
.avatar {
  width: 100%; max-width: 240px; aspect-ratio: 1 / 1; border-radius: var(--radius-lg);
  background: var(--card); border: 1px solid var(--hair); display: grid; place-items: center; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar span { font-family: var(--font-display); font-weight: 700; font-size: 3rem; color: var(--accent); opacity: 0.8; }
.person .role { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.person .edu { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); }
.person p { font-size: 0.9375rem; line-height: 1.55; }

/* ---------- market bars ---------- */
.market { display: flex; flex-direction: column; gap: 28px; }
.market-row { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 8px 32px; align-items: start; }
.market-row .label h3 { font-size: 1.5rem; }
.market-row .label p { font-size: 0.875rem; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 7.5em; gap: 16px; align-items: center; }
.bar .track { height: 22px; background: var(--panel); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; min-width: 3px; border-radius: 4px; background: var(--cobalt); }
.bar.full .fill { background: var(--sky); }
.bar .val { font-family: var(--font-mono); font-size: 0.9375rem; font-variant-numeric: tabular-nums; color: var(--heading); }
.bar .val small { display: block; font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.04em; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 10px; border-radius: 2px; background: var(--cobalt); display: inline-block; }
.legend i.full { background: var(--sky); }
@media (max-width: 640px) { .market-row { grid-template-columns: 1fr; } }

/* ---------- tiers ---------- */
.tier { gap: 14px; }
.tier .tier-name { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--heading); }
.tier ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.9375rem; }
.tier li { display: flex; gap: 10px; }
.tier li svg { flex: none; width: 12px; height: 14px; margin-top: 5px; }
.tier li svg polygon { fill: var(--accent); }
.tier .spec { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); padding-block: 10px; border-block: 1px solid var(--hair); }
.tier .spec b { color: var(--heading); font-weight: 500; }

/* ---------- list with hex bullets ---------- */
.hex-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.hex-list li { display: flex; gap: 12px; }
.hex-list svg { flex: none; width: 12px; height: 14px; margin-top: 6px; }
.hex-list polygon { fill: none; stroke: var(--accent); stroke-width: 1.5; }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta .wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cta .icon { height: 56px; width: auto; }
.cta .h2 { max-width: 20em; }
.cta .lead { max-width: 34em; }
.cta .actions { justify-content: center; padding-top: 8px; }
.contact-line { font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); user-select: all; }

/* ---------- next-page link ---------- */
.next-page { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding: clamp(28px, 4vw, 44px); background: var(--band); border-radius: var(--radius-lg); }
.next-page .h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); border-top: 1px solid var(--hair); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 40px 64px; padding-block: 64px 40px; }
.footer-brand { flex: 2 1 280px; display: flex; flex-direction: column; gap: 14px; }
.footer-brand img { height: 32px; width: auto; align-self: flex-start; }
.footer-col { flex: 1 1 160px; display: flex; flex-direction: column; gap: 10px; font-size: 0.9375rem; }
.footer-col a { color: var(--fg); }
.footer-col .caption { margin-bottom: 4px; }
.footer-base { border-top: 1px solid var(--hair); }
.footer-base .wrap { padding-block: 20px 28px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.signal-bar { height: 8px; background: var(--gradient-signal-bar); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- case study ---------- */
.facts { display: flex; flex-direction: column; }
.facts > div { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr); gap: 4px 16px; padding-block: 14px; border-top: 1px solid var(--hair); }
.facts > div:last-child { border-bottom: 1px solid var(--hair); }
.facts dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { font-size: 0.9375rem; color: var(--heading); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: step; }
.sources { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sources li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-block: 16px; border-top: 1px solid var(--hair); }
.sources li:last-child { border-bottom: 1px solid var(--hair); }
.sources a { font-weight: 500; }
@media (max-width: 480px) { .facts > div { grid-template-columns: 1fr; } }

section[id] { scroll-margin-top: 88px; }

/* ---------- v3: header tagline aligned to the wordmark's letters ---------- */
.brand-line { position: relative; top: 9px; line-height: 1; padding-block: 2px; }

/* ---------- v3: hero with video ---------- */
.hero-split { align-items: center; }
.hero-split > .hero-copy { flex: 1 1 440px; }
.hero-split > .video { flex: 1.15 1 480px; }
.hero-title { font-size: clamp(2.3rem, 4.1vw, 3.6rem); }

/* ---------- v3: vision band, subtle signal gradient + hexagon ---------- */
.vision {
  position: relative; overflow: hidden;
  background: linear-gradient(110deg, #0A3D5C 0%, #0A3D5C 42%, #5FB4E0 165%);
}
.vision .wrap { position: relative; }
.vision-text { font-weight: 600; max-width: 22em; color: #FFFFFF; }
.vision-hex { position: absolute; right: -90px; top: 50%; transform: translateY(-50%); width: min(520px, 70vw); height: auto; pointer-events: none; }
@media (max-width: 760px) { .vision-hex { opacity: 0.5; right: -40%; } }

/* ---------- v3: problem, paper trail ---------- */
.problem-top { align-items: flex-start; }
.trail { margin: 0; border: 1px solid var(--hair); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.trail-head, .trail li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 4px 20px; padding: 14px 20px; }
.trail-head { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: var(--panel); }
.trail ol { list-style: none; margin: 0; padding: 0; }
.trail li { border-top: 1px solid var(--hair); align-items: baseline; }
.trail .who { font-weight: 600; color: var(--heading); font-size: 0.9375rem; }
.trail .doc { font-family: var(--font-mono); font-size: 0.875rem; color: var(--fg); }
.trail .doc em { font-style: normal; color: var(--muted); margin-left: 6px; }
.trail li:nth-child(2) .doc { opacity: 0.85; }
.trail li:nth-child(3) .doc { opacity: 0.7; }
.trail li.you { background: var(--panel); }
.trail li.you .doc { color: var(--accent); }
.trail li.you .doc em { color: var(--accent); }
@media (max-width: 520px) { .trail-head, .trail li { grid-template-columns: 1fr; } .trail-head span + span { display: none; } }

.card.compact { padding: 22px 24px; gap: 8px; }
.card.compact .num { font-size: clamp(2rem, 3.4vw, 2.75rem); }
.card .src { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); margin-top: auto; padding-top: 6px; }

/* ---------- v3: what we do ---------- */
.questions { list-style: none; margin: 0; padding: 0; }
.questions li { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--accent); }
.questions li svg { width: 14px; height: 16px; }
.questions li polygon { fill: var(--accent); }
.questions .h3 { font-size: 1.125rem; }
.questions p { font-size: 0.9375rem; }
.shot { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.shot img { width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--rule); box-shadow: 0 1px 2px rgba(15, 27, 36, 0.06), 0 12px 32px rgba(15, 27, 36, 0.08); }

/* ---------- v3: team photos, muted until hover ---------- */
.avatar img { filter: grayscale(0.85) contrast(0.95) brightness(0.95); transition: filter 250ms ease-out; }
.person:hover .avatar img, .person:focus-within .avatar img { filter: none; }
@media (hover: none) { .avatar img { filter: none; } }

/* ---------- v3: learn more / contact band ---------- */
.next-page.grad {
  position: relative; overflow: hidden;
  background: linear-gradient(110deg, #0A3D5C 0%, #0A3D5C 45%, #5FB4E0 170%);
}
.next-page.grad > *:not(.next-hex) { position: relative; }
.next-page.grad .h2 { color: #FFFFFF; max-width: 18em; }
.next-hex { position: absolute; right: -60px; top: -40%; width: 340px; height: auto; pointer-events: none; }
.next-page.grad .contact-line { text-align: left; color: rgba(245, 248, 250, 0.85); }

/* ---------- v3: footer, links vs contact ---------- */
.footer-links { flex: 2 1 320px; display: flex; flex-wrap: wrap; gap: 32px 48px; }
.footer-links .footer-col { flex: 0 1 auto; }
.footer-contact {
  flex: 1.4 1 280px; font-style: normal; display: flex; flex-direction: column; gap: 14px;
  padding: 20px 24px; border: 1px solid var(--hair); border-radius: var(--radius-lg); background: var(--card);
}
.footer-contact div { display: flex; flex-direction: column; gap: 2px; }
.footer-contact .label { font-size: 0.8125rem; color: var(--muted); }
.footer-contact a { color: var(--accent); font-weight: 500; font-size: 1rem; }
.problem { padding-block: clamp(56px, 6vw, 80px); }
.problem > .wrap { gap: 32px; }
.problem .card.compact p { font-size: 0.875rem; }
.problem .h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.problem .lead { font-size: 1.0625rem; }
.problem-top > .section-head { flex: 1 1 380px; }
.problem-top > .trail { flex: 1.35 1 500px; }
.trail .doc { font-size: 0.8125rem; }
.trail-head, .trail li { grid-template-columns: minmax(0, 10em) minmax(0, 1fr); padding: 12px 18px; }

/* =========================================================
   v4 overrides
   ========================================================= */

/* shape shared by boxes, tables and videos: top-right corner cut, no rounded corners */
.video, .table-wrap, .trail, .shot img, .panel { border-radius: 0; }
.video {
  border: 0; aspect-ratio: 16 / 9;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.video.wide { aspect-ratio: 1440 / 852; }
.video[data-has-poster] .video-meta, .video .video-meta { display: none; }

/* autoplaying hero video with its own pause control */
.video-auto video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--navy); }
.video-toggle {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(15, 27, 36, 0.78); color: #FFFFFF; display: grid; place-items: center; cursor: pointer;
}
.video-toggle svg { width: 16px; height: 16px; }
.video-toggle .i-play { display: none; }
.video-auto[data-paused] .video-toggle .i-play { display: block; }
.video-auto[data-paused] .video-toggle .i-pause { display: none; }
.hero-split > .hero-copy { flex: 1 1 380px; }
.hero-split > .video { flex: 1.65 1 560px; }

/* tables: hairline frame with the cut corner, sentence-case headers */
.table-wrap {
  border: 0; padding: 1px; background: var(--hairline);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.table-wrap table.data { background: var(--card); }
table.data thead th { text-transform: none; letter-spacing: 0.02em; font-size: 0.8125rem; }
table.data thead th.us { font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; letter-spacing: 0; }

/* dashed variant of the cut-corner box (next-release features) */
.card.dashed {
  background: transparent; border: 1px dashed var(--rule); border-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.card.dashed::before { display: block; content: ""; position: absolute; inset: auto; z-index: 0;
  top: -1px; left: calc(100% - var(--cut)); width: calc(var(--cut) * 1.4142 + 1px); height: 0;
  border-top: 1px dashed var(--rule); background: none; clip-path: none; transform-origin: 0 0; transform: rotate(45deg); }

/* problem: supply-chain table with a downstream arrow */
.trail { background: var(--hairline); padding: 1px; border: 0;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.trail > * { background: var(--card); }
.trail-head { display: block; padding: 10px 18px 10px 236px; }
.trail ol { position: relative; padding-left: 46px; }
.trail ol::before { content: ""; position: absolute; left: 22px; top: 20px; bottom: 26px; width: 2px; background: linear-gradient(180deg, #0A3D5C 0%, #5FB4E0 100%); }
.trail ol::after { content: ""; position: absolute; left: 16px; bottom: 16px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 11px solid var(--sky); }
.trail li { grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr); padding: 10px 18px 10px 0; position: relative; }
.trail li::before { content: ""; position: absolute; left: -28px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--card); border: 2px solid var(--sky); }
.trail .qs { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.trail .qs span { color: var(--accent); }
@media (max-width: 520px) { .trail-head { padding-left: 46px; } .trail li { grid-template-columns: 1fr; } }

/* figure rows: text centred on the big numbers */
.figure-row { align-items: center; }

/* team: photo centred over the text */
.person { align-items: center; text-align: center; }
.person .avatar { max-width: 220px; }
.person p { max-width: 24em; }

/* vision and contact bands: larger, partly cut-off hexagons */
.vision-hex { width: min(980px, 120vw); right: -260px; }
.next-hex { width: 760px; right: -220px; top: 50%; transform: translateY(-50%); }
.next-page.grad { flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: clamp(32px, 5vw, 56px); }

/* quotes: one size, real quotation marks in the text */
.quote p, .quote.small p { font-size: clamp(1.375rem, 2.4vw, 1.875rem); }

/* footer: three columns of links and contact, no box */
.footer-links { flex: 3 1 480px; }
.footer-contact { flex: 0 1 auto; padding: 0; border: 0; background: none; gap: 10px; }
.footer-contact a { font-size: 0.9375rem; }
.footer-base .wrap { justify-content: space-between; }

/* sections whose title, text and table share one width */
.even { max-width: 980px; }
.even .lead { max-width: none; }
.hex-list.tech li { align-items: flex-start; }
.hex-list.tech svg { margin-top: 5px; }
.hex-list.tech .h3 { font-size: 1.0625rem; line-height: 1.3; }
.price { font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); }
.price b { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; color: var(--heading); margin-right: 4px; }
.tier .tier-name + .price { margin-top: -4px; }
.start { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; padding: clamp(24px, 4vw, 40px); background: var(--panel); }
table.data.tight th, table.data.tight td { padding: 12px 18px; }
.compact-section { padding-block: clamp(56px, 6vw, 80px); }
.case-hero { align-items: stretch; }
.case-hero > .glance { flex: 1 1 380px; justify-content: center; }
.case-hero > .hero-copy { flex: 1.3 1 460px; justify-content: center; }
.compact-section { padding-block: clamp(48px, 5vw, 64px); }
.compact-section .even.stack-lg { gap: 28px; }
.trail li.you .doc { color: var(--heading); }
.trail li.you .qs span { color: var(--accent); }

/* =========================================================
   v5 overrides
   ========================================================= */
/* titles and intro paragraphs use the full content width */
.section-head, .section-head.wide { max-width: none; }
.section-head .lead { max-width: none; }

/* hero video: full-screen control next to pause */
.video-full {
  position: absolute; right: 66px; bottom: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(15, 27, 36, 0.78); display: grid; place-items: center; cursor: pointer;
}
.video-full svg { width: 16px; height: 16px; }

/* vision band: one outlined hexagon in the top-right corner, as in the slide template */
.vision-hex { width: 400px; height: auto; right: -126px; top: -140px; transform: none; }
@media (max-width: 760px) { .vision-hex { width: 260px; right: -90px; top: -90px; opacity: 1; } }
.vision .mission { color: rgba(245, 248, 250, 0.85); max-width: 46em; }

/* problem table: entries set in from the highlight, tiny hexagons on the arrow */
.trail li { padding-left: 16px; }
.trail-head { padding-left: 252px; }
.trail li::before {
  left: -29px; top: 15px; width: 12px; height: 13px; border: 0; border-radius: 0; background: var(--sky);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
@media (max-width: 520px) { .trail-head { padding-left: 62px; } }

/* screenshot caption row with the link on the right */
.shot-foot { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }

/* "next release" tag sits in the lower right of its box */
.card .tag-end { align-self: flex-end; margin-top: auto; }

/* hexagon bullets aligned with the first line of their title */
.hex-list.tech svg { margin-top: 3px; }

/* numbers that are words */
.num.num-text { font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.1; }

/* footer: brand, then pages, links and contact spread evenly */
.site-footer > .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer .footer-links { display: contents; }
@media (max-width: 760px) {
  .site-footer > .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .footer-brand { grid-column: 1 / -1; }
}

/* =========================================================
   v6: flip cards, deployment strip, timeline photo
   ========================================================= */
.flip { perspective: 1600px; cursor: pointer; }
.flip-inner { display: grid; height: 100%; transform-style: preserve-3d; transition: transform 550ms cubic-bezier(.2,.7,.2,1); }
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip .face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .face.back { transform: rotateY(180deg); }
.flip .face.back::before { background: var(--panel-strong, #13303F); }
.light .flip .face.back::before { background: #E3F0F7; }
.flip-btn {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 0.8125rem var(--font-mono); letter-spacing: 0.02em; color: var(--accent);
}
.flip-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.flip:hover .front { filter: brightness(1.06); }
.gates { margin: 0; padding-left: 1.25em; display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; color: var(--fg); }
.gates li::marker { font-family: var(--font-mono); color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .flip-inner { transition: none; } }

.card.deploy { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; }
.card.deploy .card-label { flex: 0 0 100%; }
.card.deploy .h3 { flex: 0 1 18em; }
.card.deploy p { flex: 1 1 420px; }

.timeline-photo { margin: 14px 0 0; display: flex; flex-direction: column; gap: 6px; }
.timeline-photo img { width: 100%; height: auto; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }

.back-link { padding-block: 40px; border-top: 1px solid var(--hair); }
