/* ============================================================
   ALTDATA components — design rework "the page as instrument".
   Consumes tokens.css (loaded first in base.njk).
   Reference: /styleguide/ shows every component on both bands.

   System summary (docs/styleguide.md is the source of truth):
   - The brand's diagram language (ink line-work, ONE lime node,
     measured labels) is the page's structural system: sections
     start on a hairline AXIS carrying a lime node + kicker.
   - Asymmetric label|body grid (3:9) on section compositions;
     the home page hangs its sections off a vertical SPINE rule.
   - Cards are reserved for linked artifacts. Unboxed content
     uses rule-topped LEDGER items, keyline FLAGSHIP panels,
     ruled INDEX rows and SPEC sheets.
   - "Data voice": system monospace for factual metadata only.
   ============================================================ */

/* Nata Sans variable font (latin subset), self-hosted. OFL, Daniel Uzquiano.
   Adopted from the designer's Figma (Variant 02) 2026-07-11, replacing Sora.
   Headings + UI accents only; body text uses the system stack. */
@font-face {
  font-family: "Nata Sans";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  /* Relative (not root-relative) so the CSS works from a subfolder deploy too:
     the HTML rewriter (HtmlBasePlugin) never touches url() inside CSS. */
  src: url("../fonts/nata-sans-var.woff2") format("woff2");
}

/* ---- base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-white);
}

/* Display weights per the Figma: 800 for h1/h2, 700 for h3/h4. */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin-block: 0 0.5em;
}

h1 { font-size: var(--fs-900); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-800); font-weight: 800; letter-spacing: -0.018em; }
h3 { font-size: var(--fs-650); }
h4 { font-size: var(--fs-600); }

p { margin-block: 0 1em; }

a { color: inherit; }

img, svg { max-width: 100%; height: auto; }

.lead { font-size: var(--fs-500); }
.muted { color: var(--c-ink-muted); }
/* Kicker promoted to 16px/700 per the Figma — it now reads as a section
   label rather than a caption. */
.overline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-400);
  letter-spacing: var(--ls-kicker);
  text-transform: uppercase;
  color: var(--c-ink-muted);
}
/* The structural marker: a small square fill opening every kicker.
   Pink per the Figma (decorative fill — never text; see --c-marker).
   Inside an .axis composition the node moves onto the axis rule instead. */
.overline::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  background: var(--c-marker);
  margin-right: 0.55em;
  vertical-align: 0.08em;
}

/* The data voice: factual metadata only (metas, captions, spec
   values, breadcrumbs, legal). Never headings, body or nav. */
.data {
  font-family: var(--font-data);
  font-size: var(--fs-300);
}

.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--sp-7); }
.prose h3 { margin-top: var(--sp-6); }

.visually-hidden,
.hp { /* .hp = honeypot field wrapper (contact form, R1-5) */
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* ---- layout ---- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Section bands. Alternation is no longer mechanical: grey bands
   are "instrument panels" (diagrams, evidence, FAQs, forms); white
   sections are separated by the axis device, dark for statements. */
.band { padding-block: var(--band-pad); background: var(--c-white); }
.band--grey { background: var(--c-band); }
/* Photographic band (designer, round 2). One class plus a --bg hook rather
   than a class per image, so swapping a background is a URL edit in the
   template — the current photographs are PLACEHOLDERS.
   Narrow screens pull a smaller file through --bg-narrow.
   background-attachment: fixed is confined to desktop pointer devices: it
   forces a repaint every scroll frame, and iOS Safari does not honour it. */
.band--photo {
  background-color: var(--c-white);
  background-image: var(--bg-narrow, var(--bg));
  background-size: cover;
  background-position: bottom center;
  background-repeat: no-repeat;
}
@media (min-width: 48rem) {
  .band--photo { background-image: var(--bg); }
}
@media (min-width: 62rem) and (hover: hover) {
  .band--photo { background-attachment: fixed; }
}
/* Section divider (designer, round 2). Lime only where it actually reads:
   6.88:1 on ink, but 1.75:1 on white — effectively invisible — so light
   bands take the same hairline the axis rule already uses. */
.sec-line { border-bottom: 1px solid var(--line-soft); }
.band--dark.sec-line { border-bottom-color: var(--c-lime); }
.band--dark { background: var(--c-ink); color: var(--c-white); }
.band--dark a { color: var(--c-white); }
.band--dark a:hover { color: var(--c-lime); } /* lime text allowed on dark */
.band > .container > :first-child { margin-top: 0; }
.band > .container > :last-child { margin-bottom: 0; }

/* ---- the axis (section-head device) ----
   A full-width hairline rule with a lime node at its origin — the
   diagram vocabulary as structure. The kicker sits in a narrow
   label column, content in the wide column (asymmetric 3:9 grid).
   Markup: .band > .container > .axis-grid > (.axis-label + .axis-body) */
.axis-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4) var(--sp-7);
  padding-top: var(--sp-5);
}
.axis-grid::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--line-soft);
}
.axis-grid::after { /* the node, centred on the axis */
  content: "";
  position: absolute;
  top: -5px; left: 0;
  width: 10px; height: 10px;
  background: var(--c-marker);
  z-index: 1;
}
.axis-grid .overline::before { content: none; } /* node lives on the axis */
.axis-label > :first-child { margin-top: 0; }
.axis-label > :last-child { margin-bottom: 0; }
.axis-body > :first-child { margin-top: 0; }
.axis-body > :last-child { margin-bottom: 0; }
@media (min-width: 62rem) {
  .axis-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
}
.band--dark .axis-grid::before { background: var(--line-soft-dark); }

/* Centred section head (Figma Variant 02, homepage).
   The axis rule stays — it's the section's baseline — but the label rail
   collapses and the head centres over the full measure. The marker returns
   inline before the kicker instead of sitting on the rule's origin. */
.axis-grid--centred { grid-template-columns: minmax(0, 1fr); }
.axis-grid--centred::after { content: none; }
.axis-grid--centred .axis-label {
  padding-left: 0 !important;
  text-align: center;
}
.axis-grid--centred .axis-label .overline::before { content: ""; }
.axis-grid--centred .axis-head {
  text-align: center;
  max-width: 48rem;
  margin-inline: auto;
}
.axis-grid--centred .axis-head > :last-child { margin-bottom: 0; }
@media (min-width: 62rem) {
  .axis-grid--centred { grid-template-columns: minmax(0, 1fr); }
}

/* Pills — the Figma's label chips. Outline by default, solid for the
   brand tag. Distinct from .chip (which carries category colour). */
.pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-200);
  letter-spacing: var(--ls-kicker);
  text-transform: uppercase;
  line-height: 1;
  padding: 0.6em 1.1em;
  border: 1.5px solid var(--c-ink);
  border-radius: var(--r-pill);
  color: var(--c-ink);
  background: transparent;
}
.pill--solid { background: var(--c-ink); color: var(--c-white); }
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

/* Dark inset panel — the "data gap" block. The Figma insets it from the
   page edges with a 16px radius rather than running it full-bleed. */
.panel--dark {
  background: var(--c-ink);
  color: var(--c-white);
  border-radius: var(--r-lg);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}
.panel--dark h2 { color: var(--c-white); }
.panel--dark > :first-child { margin-top: 0; }
.panel--dark > :last-child { margin-bottom: 0; }
.panel--dark .overline { color: rgb(255 255 255 / 0.8); }
.panel--dark p { max-width: 46rem; margin-inline: auto; }
.panel--dark .chip-row { justify-content: center; }
/* chips go dark-on-dark with the accent dot carrying the colour */
.panel--dark .chip {
  background: rgb(255 255 255 / 0.08);
  border-color: var(--line-soft-dark);
  color: var(--c-white);
}

/* ---- the spine (home signature) ----
   The hero diagram's vertical logic continued down the page: a
   rule through each section's axis node. Section-scoped absolute
   lines join visually because bands butt together. Desktop only. */
@media (min-width: 62rem) {
  .spine-seg { position: relative; }
  .spine-seg::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    /* container is centred (max 72rem incl. 1.25rem inline pad):
       x = content left edge + half the node width */
    left: calc(max(1.25rem, 50% - 34.75rem) + 4.5px);
    width: 1px;
    background: var(--line-soft);
  }
  .spine-seg--first::before { top: var(--band-pad); }
  /* labels hang off the rail like diagram labels (clear of the rule) */
  .spine-seg .axis-label { padding-left: var(--sp-5); }
}

/* ---- skip link ---- */
.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--c-white);
  color: var(--c-ink);
  padding: 0.5rem 1rem;
  outline: 2px solid var(--c-ink);
}

/* ---- focus ---- */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ---- header ---- */
.site-header {
  background: var(--c-white);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-5);
  padding-block: var(--sp-4);
}
.site-logo {
  display: inline-flex;
  align-items: center;
  color: var(--c-ink);
  padding-block: var(--sp-1);
}
.site-logo svg { height: 1.125rem; width: auto; display: block; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Nav per the Figma: uppercase 14px/700, letterspaced. The active state
   stays an ink underline — the design's pink active TEXT measures 4.33:1
   on white and fails AA, so pink is kept to decorative fills only. */
.site-nav a {
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-300);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  padding-block: var(--sp-1);
  border-bottom: 2px solid transparent;
  transition: border-color var(--dur-fast) var(--ease);
}
.site-nav a:hover { border-bottom-color: var(--c-grey-500); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--c-ink); }
/* Touch devices get ≥44px targets without changing the desktop look */
@media (pointer: coarse) {
  .site-nav a { display: inline-block; padding-block: 0.65rem; }
}

/* ---- buttons ----
   Primary: dark fill / white text; lime appears on hover/press with
   ink text ("restrained by default, lime as the interaction reward"). */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-ink);
  color: var(--c-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-300);
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  line-height: 1.2;
  padding: 0.85rem 1.6rem;
  border: 2px solid var(--c-ink);
  border-radius: var(--r-sm);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}
/* Hover/press fill moved lime → pink (designer, round 2) with a white
   label (client preference). --c-reward is brand pink shaded 5% precisely
   so white clears AA at 4.74:1; plain #EA1475 with white is 4.33:1 and
   fails. Guarded in scripts/contrast-check.js. */
.button:hover,
.button:active {
  background: var(--c-reward);
  border-color: var(--c-reward);
  color: var(--c-white);
}
.button:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }

.button--secondary {
  background: transparent;
  color: var(--c-ink);
}
.button--on-dark {
  background: var(--c-white);
  border-color: var(--c-white);
  color: var(--c-ink);
}
.button--on-dark:focus-visible { outline-color: var(--c-white); }

.button[disabled],
.button--disabled {
  background: var(--c-tint-neutral);
  border-color: var(--c-tint-neutral);
  color: var(--c-grey-500);
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- cards (linked artifacts ONLY — studies, articles, services) ----
   Unlinked explanatory content uses .ledger / .flagship instead. */
.card {
  background: var(--c-white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: var(--sp-6);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card__title { font-size: var(--fs-600); margin-block: var(--sp-2) var(--sp-2); }
.card__meta { font-family: var(--font-data); font-size: var(--fs-300); color: var(--c-ink-muted); }

a.card {
  display: block;
  color: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--dur-fast) var(--ease);
}
a.card:hover { box-shadow: var(--shadow-card-hover); }
a.card:hover .card__title { text-decoration: underline; }
/* Lime as the interaction reward (same rule as buttons): a keyline sweeps
   the card's top edge on hover. transform-only; collapses under
   prefers-reduced-motion via the global override. */
a.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--c-lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease);
}
a.card:hover::after,
a.card:focus-visible::after { transform: scaleX(1); }

.card-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

/* ---- flagship panels (the two engines) ----
   Bespoke, not generic cards: a 4px keyline states the hierarchy
   truthfully — lime on the LEAD flagship (the diagram's one
   highlight), ink on the proven foundation. Flat, bordered. */
.flagship-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
}
.flagship {
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  border: 1px solid var(--line-soft);
  border-top: 4px solid var(--c-ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
/* The Figma dropped the hierarchy distinction between the two engines;
   the lime lead keyline is kept — Digital Twin leads, and lime is the
   payoff/action accent throughout. */
.flagship--lead { border-top-color: var(--c-lime); }
.flagship .card__title { font-size: var(--fs-650); }
.flagship > :last-child { margin-top: auto; margin-bottom: 0; padding-top: var(--sp-4); }
.flagship .overline { margin-bottom: var(--sp-2); }
.flagship ul {
  list-style: none;
  margin: var(--sp-3) 0 0;
  padding: 0;
}
.flagship li {
  border-top: 1px solid var(--line-soft);
  padding-block: var(--sp-3);
}

/* ---- ledger (unboxed spec/value items) ----
   Rule-topped columns replace card-soup for explanatory content:
   a 2px ink rule per entry, no box, no shadow. Works on both bands. */
.ledger {
  display: grid;
  gap: var(--sp-6) var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.ledger__item { border-top: 2px solid var(--c-ink); padding-top: var(--sp-4); }
.ledger__item > :first-child { margin-top: 0; }
.ledger__item > :last-child { margin-bottom: 0; }
.ledger__item h3 { font-size: var(--fs-600); margin-bottom: var(--sp-2); }
.ledger__item > .chip { margin-block-end: var(--sp-3); }
.band--dark .ledger__item { border-top-color: var(--c-white); }
/* breathing room when a ledger sits between prose blocks in a section */
.axis-body > .ledger { margin-block: var(--sp-6); }
.axis-body > .ledger:last-child { margin-block-end: 0; }

/* Ledger wrapped in a grey panel (Figma: "Why research teams trust us"). */
.ledger-panel {
  background: var(--c-band);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.band--grey .ledger-panel { background: var(--c-white); }
[id] { scroll-margin-top: var(--sp-6); } /* anchor targets clear the viewport edge */

/* ---- index list (article/link registers) ----
   A ruled ledger of linked rows; the lime keyline sweeps the row's
   left edge on hover (vertical variant of the card reward). */
.index-list {
  list-style: none;
  margin: var(--sp-5) 0 0;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}
a.index-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-1) var(--sp-6);
  padding: var(--sp-5) var(--sp-2) var(--sp-5) var(--sp-5);
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
}
a.index-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--c-lime);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur-fast) var(--ease);
}
a.index-row:hover::before,
a.index-row:focus-visible::before { transform: scaleY(1); }
a.index-row:hover .index-row__title { text-decoration: underline; }
.index-row__title {
  font-size: var(--fs-600);
  margin: 0;
}
.index-row__body { margin: 0; max-width: var(--measure); }
.index-row__body p:last-child { margin-bottom: 0; }
.index-row__meta {
  font-family: var(--font-data);
  font-size: var(--fs-300);
  color: var(--c-ink-muted);
  margin: 0;
}
@media (min-width: 48rem) {
  a.index-row { grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); }
  .index-row__meta { grid-column: 2; grid-row: 1 / span 2; justify-self: end; text-align: right; }
  .index-row__title { grid-column: 1; }
  .index-row__body { grid-column: 1; }
}
.index-list__more { margin-block: var(--sp-5) 0; }

/* ---- tag chips ----
   Tint background + full-saturation dot + ink text: keeps colour
   identity without putting accent-coloured text on light bg. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--fs-200);
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 0.45em 0.9em;
  border-radius: var(--r-pill);
  background: var(--c-tint-neutral);
  border: 1px solid var(--line-soft);
  color: var(--c-ink);
  text-decoration: none;
}
.chip::before {
  content: "";
  flex: none;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--chip-dot, var(--c-grey-500));
}
.chip--lime   { background: var(--c-tint-lime);   --chip-dot: var(--c-lime); }
.chip--orange { background: var(--c-tint-orange); --chip-dot: var(--c-accent-orange); }
.chip--pink   { background: var(--c-tint-pink);   --chip-dot: var(--c-accent-pink); }
.chip--blue   { background: var(--c-tint-blue);   --chip-dot: var(--c-accent-blue); }
.chip--green  { background: var(--c-tint-green);  --chip-dot: var(--c-accent-green); }
.chip--red    { background: var(--c-tint-red);    --chip-dot: var(--c-accent-red); }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ---- stat blocks ---- */
.stat-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
.stat { border-top: 2px solid var(--c-ink); padding-top: var(--sp-3); }
.stat__value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.05;
  font-variant-numeric: tabular-nums; /* stat rows align when real figures land */
}
.stat__label {
  font-family: var(--font-data);
  font-size: var(--fs-300);
  color: var(--c-ink-muted);
  margin-top: var(--sp-1);
}
/* On dark bands the numerals go lime (large text on dark: 6.9:1) */
.band--dark .stat { border-top-color: var(--c-white); }
.band--dark .stat__value { color: var(--c-lime); }
.band--dark .stat__label { color: rgb(255 255 255 / 0.8); }

/* ---- breadcrumbs ---- */
.breadcrumbs {
  font-family: var(--font-data);
  font-size: var(--fs-300);
  color: var(--c-ink-muted);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 0;
  padding: 0;
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5em;
  color: var(--c-grey-500);
}
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--c-ink); font-weight: 500; }

/* ---- spec sheet (at-a-glance / direct contact) ----
   A ruled readout, not a floating box: ink top bar, hairline rows,
   values in the data voice. */
.spec { border-top: 3px solid var(--c-ink); padding-top: var(--sp-4); }
/* Backing for a spec sheet sitting on a photographic band, so its ruled
   rows and mono values stay legible over the image (designer, round 2). */
.spec--panel {
  background-color: rgb(255 255 255 / 0.9);
  padding: var(--sp-4);
}
.spec__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-600);
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-4);
}
.spec dl { margin: 0; }
.spec dt {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--fs-200);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
}
.spec dd {
  margin: var(--sp-1) 0 0;
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-data);
  font-size: var(--fs-300);
}
.spec > p { font-size: var(--fs-300); color: var(--c-ink-muted); }
.spec > p:last-child { margin-bottom: 0; }

/* ---- numbered beats (case-study narrative — a true sequence) ---- */
.beats { counter-reset: beat; }
.beats h2 {
  counter-increment: beat;
  border-top: 1px solid var(--line-soft);
  padding-top: var(--sp-4);
  margin-top: var(--sp-7);
  font-size: var(--fs-650);
}
.beats h2:first-child { margin-top: 0; }
.beats h2::before {
  content: counter(beat, decimal-leading-zero);
  display: block;
  font-family: var(--font-data);
  font-weight: 400;
  font-size: var(--fs-300);
  letter-spacing: 0.05em;
  color: var(--c-ink-muted);
  margin-bottom: var(--sp-2);
}

/* ---- FAQ (ruled Q&A rows) ---- */
.faq h3 {
  border-top: 1px solid var(--line-soft);
  padding-top: var(--sp-4);
  margin-top: var(--sp-5);
  font-size: var(--fs-600);
}
.faq h3:first-child { margin-top: 0; }

/* ---- forms ---- */
.field { display: grid; gap: 0.4rem; margin-block-end: var(--sp-5); }
.field__label { font-weight: 600; font-size: var(--fs-300); }
.field__label .req { color: var(--c-error); }
.field__input,
input[type="text"].field__input,
input[type="email"].field__input,
select.field__input,
textarea.field__input {
  font: inherit;
  color: var(--c-ink);
  background: var(--c-white);
  border: 1.5px solid var(--c-grey-500);
  border-radius: var(--r-sm);
  padding: 0.6rem 0.9rem;
  min-height: 2.75rem;
  width: 100%;
}
textarea.field__input { min-height: 8rem; resize: vertical; }
.field__input:focus-visible {
  outline: 2px solid var(--c-ink);
  outline-offset: 1px;
  border-color: var(--c-ink);
}
.field__help { font-size: var(--fs-300); color: var(--c-ink-muted); }
.field__error {
  font-size: var(--fs-300);
  font-weight: 600;
  color: var(--c-error);
}
.field--error .field__input { border-color: var(--c-error); }
.field--error .field__input:focus-visible { outline-color: var(--c-error); }

.field--checkbox {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.6rem;
}
.field--checkbox input { margin-top: 0.3rem; width: 1rem; height: 1rem; }
.field--checkbox .field__label { font-weight: 400; font-size: var(--fs-400); }

/* Form status banners (contact form success/error states, R1-5) */
.form-note {
  border-radius: var(--r-sm);
  padding: var(--sp-4) var(--sp-5);
  margin-block-end: var(--sp-5);
  border: 1px solid var(--line-soft);
}
.form-note--success { background: var(--c-tint-green); border-color: var(--c-success); }
.form-note--error   { background: var(--c-tint-red);   border-color: var(--c-error); }

/* ---- CTA band ---- */
.cta-band { text-align: center; }
/* the closing CTA sits a step below section heads (Figma: 38px vs 48px) */
.cta-band h2 { margin-bottom: var(--sp-2); font-size: var(--fs-750); }
.cta-band .muted { max-width: 44rem; margin-inline: auto; }
.cta-band p:last-child { margin-bottom: 0; margin-top: var(--sp-5); }

/* ---- trust bar (logo strip lands when files do) ---- */
.trust-bar { padding-block: var(--sp-5); border-block: 1px solid var(--line-soft); }
.trust-bar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4) var(--sp-7);
}
.trust-bar__row img, .trust-bar__row svg { height: 2rem; width: auto; }
.trust-bar__caption {
  text-align: center;
  font-family: var(--font-data);
  font-size: var(--fs-200);
  color: var(--c-ink-muted);
  margin-block: 0 var(--sp-4);
}
ul.trust-bar__row { list-style: none; margin: 0; padding: 0; }
/* Partner logos, normalised to one optical height. Greyscale so six brand
   palettes read as a single row of evidence instead of competing with the
   page; colour returns on hover. Nothing is conveyed by hover alone — the
   partner name is in each image's alt text — so touch loses nothing. */
.trust-bar__row img {
  display: block;
  height: 34px;
  width: auto;
  max-width: 10.5rem;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.68;
  transition:
    filter var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease);
}
.trust-bar__row li:hover img { filter: none; opacity: 1; }
/* The ICC publishes only a white-on-transparent mark, built for dark grounds.
   Inverting renders it as the black-on-transparent this light strip needs.
   It has no colour to reveal, so hover only lifts the opacity. */
.trust-bar__row img.is-inverted { filter: grayscale(1) invert(1); }
.trust-bar__row li:hover img.is-inverted { filter: invert(1); }
/* Logos delivered with an opaque background plate. Rounded so the block reads
   as deliberate until a transparent asset arrives. */
.trust-bar__row img.has-plate { border-radius: var(--r-sm); }
/* Seven marks have to share one line at container width. Capping the width
   also evens them out optically: unchecked, a long wordmark sits three times
   wider than a roundel that reads as the same size. */
@media (min-width: 48rem) {
  .trust-bar__row { gap: var(--sp-5); }
  .trust-bar__row img { height: 36px; max-width: 10rem; }
}
/* Below that, flex packs greedily and strands single logos on their own line
   (2,1,2,2 for seven marks). A two-column grid wraps them evenly instead. */
@media (max-width: 47.99rem) {
  ul.trust-bar__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    align-items: center;
  }
  .trust-bar__row img { max-width: 100%; }
}

/* ---- hero ----
   The instrument space: a faint ink dot-mesh (simulation grid) on
   the band — decorative texture, never information. */
.hero {
  padding-block: clamp(3.75rem, 9vw, 6.5rem);
  background-color: var(--c-band);
  background-image: radial-gradient(rgb(50 55 60 / 0.10) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
}
.hero h1 { max-width: 22ch; font-size: var(--fs-950); letter-spacing: -0.02em; }
.hero .lead { max-width: var(--measure); }

/* Centred hero (Figma Variant 02, homepage): white ground, the mesh, and
   two soft brand washes — lime and pink, the two accents, at low alpha.
   Interior-page heroes keep the left-aligned treatment above. */
.hero--centred {
  position: relative;
  overflow: hidden;
  background-color: var(--c-white);
  background-image:
    radial-gradient(rgb(50 55 60 / 0.09) 1.2px, transparent 1.2px),
    radial-gradient(38rem 26rem at 12% 8%, rgb(150 215 0 / 0.13), transparent 70%),
    radial-gradient(34rem 24rem at 88% 82%, rgb(234 20 117 / 0.10), transparent 70%);
  background-size: 26px 26px, auto, auto;
  text-align: center;
}
.hero--centred h1 {
  max-width: 46rem;
  margin-inline: auto;
  line-height: 1.0;
  text-wrap: balance; /* two even lines, as drawn */
}
.hero--centred .lead {
  max-width: 54rem;
  margin-inline: auto;
}
.hero--centred .pill-row { justify-content: center; }
.hero__inner > * { margin-bottom: var(--sp-5); }
.hero__inner > :last-child { margin-bottom: 0; }

/* The four data-gap attributes as tilted specimen cards (Figma hero).
   Rotation is decorative; it flattens out under reduced-motion-safe
   defaults on narrow screens where the cards stack. */
.attr-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
  margin-block: var(--sp-7) 0;
}
.attr-card {
  flex: 0 1 8rem;
  background: var(--c-white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-400);
  text-align: left;
}
/* The designer's line icons anchor each card (Figma vectors, inlined so they
   inherit colour). Pink per the client — decorative, and it clears the 3:1
   non-text bar at 4.33:1 on white, which lime at 1.75:1 could not. The label
   beside each icon carries the meaning, so the SVGs are aria-hidden. */
.attr-card svg {
  display: block;
  width: 28px;
  height: auto;
  margin-bottom: var(--sp-3);
  color: var(--c-marker);
}
/* Fallback marker for a card with no icon supplied. */
.attr-card:not(:has(svg))::before {
  content: "";
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  margin-bottom: var(--sp-4);
  background: var(--c-marker);
}
@media (min-width: 48rem) {
  .attr-card:nth-child(odd) { transform: rotate(-2.5deg); }
  .attr-card:nth-child(even) { transform: rotate(2deg); }
}

/* Home hero diagram: the two-flagship spine, now centred and full-measure
   under the copy (the Figma replaces it with a photo-illustration of the
   same idea; we keep the owned, accessible SVG). */
.hero-spine {
  margin: var(--sp-7) auto 0;
  width: 100%;
  max-width: 38rem;
}
.hero-spine svg { width: 100%; height: auto; display: block; }

/* Media cards (Figma: photographic case studies).
   Set --media to a self-hosted image to fill them; with no image they
   render as a clean dark gradient card rather than a broken frame. */
a.card--media {
  --media: none;
  position: relative;
  min-height: 17rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 0;
  color: var(--c-white);
  background-image:
    linear-gradient(to top, rgb(50 55 60 / 0.92) 12%, rgb(50 55 60 / 0.55) 55%, rgb(50 55 60 / 0.35)),
    var(--media),
    linear-gradient(135deg, #3d4349, var(--c-ink));
  background-size: cover;
  background-position: center;
}
a.card--media .card__title { font-size: var(--fs-700); margin-top: var(--sp-3); }
/* Ruled footer: a hairline closes the card and the link sits alone beneath it.
   Because card content is bottom-aligned and the meta is last, the rule lands
   at the same height on every card regardless of how long the body runs — so
   the links align across the row. */
a.card--media .card__meta {
  color: rgb(255 255 255 / 0.85);
  border-top: 1px solid var(--line-soft-dark);
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
}
a.card--media .chip {
  align-self: flex-start;
  /* Pin the chip to the top: the auto margin absorbs the card's free space,
     so the sector label aligns across a row while everything below it stays
     bottom-aligned with the ruled footer. Without this the chip rides up or
     down with the body length. */
  margin-bottom: auto;
  background: rgb(255 255 255 / 0.14);
  border-color: rgb(255 255 255 / 0.3);
  color: var(--c-white);
}

/* ---- product screenshots (.shot) ----
   Real UI from our own tools. Deliberately distinct from .diagram (inline
   SVG line-work): a shot is a framed artifact, so it carries a hairline
   border, a radius and the resting shadow. Art-direct with <picture> —
   a wide UI is unreadable at 390px, so narrow screens get a tighter crop.
   The caption is not decoration: it carries the information the image
   would otherwise hold alone. */
.shot { margin: 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  background: var(--c-white);
}
.shot__caption {
  font-family: var(--font-data);
  font-size: var(--fs-300);
  color: var(--c-ink-muted);
  margin-top: var(--sp-3);
}
.shot__caption > :last-child { margin-bottom: 0; }

/* Prose + a companion shot, side by side on wide screens. The shot is
   capped so a tall UI panel can't tower over a short paragraph. */
.with-shot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
}
.with-shot > .shot { max-width: 30rem; }
/* Even split, not 7:5 — this block is nested inside the axis body's 9-column
   track, so a 5-of-12 share left the UI text too small to read. */
@media (min-width: 62rem) {
  .with-shot { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--sp-7); }
}

/* ---- diagrams (inline SVG, brand line-work) ---- */
.diagram { margin-block: var(--sp-6); }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram__caption {
  font-family: var(--font-data);
  font-size: var(--fs-300);
  color: var(--c-ink-muted);
  margin-top: var(--sp-3);
}

/* ---- footer ----
   The baseline bar moved lime → 4px pink in the designer's round 2
   (2026-07-31), retiring the 8px lime signature. Pink on ink is 2.78:1 —
   legal, because a decorative band carries no contrast requirement, but
   far quieter than lime's 6.88:1. A lime hairline closes the page.
   The 4rem top margin is gone: it read as a gap above the footer. */
.site-footer {
  background: var(--c-ink);
  color: var(--c-white);
  border-top: 4px solid var(--c-accent-pink);
  border-bottom: 1px solid var(--c-lime);
  margin-top: 0;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--sp-6);
  padding-block: var(--sp-7);
}
.site-footer a { color: var(--c-white); }
.site-footer a:hover { color: var(--c-lime); }
.site-footer__logo { display: inline-block; color: var(--c-white); margin: 0 0 var(--sp-3); }
.site-footer__logo svg { height: 1rem; width: auto; display: block; }
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-2);
}
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer__contact p { margin-block: 0 var(--sp-2); }
.site-footer__legal {
  font-family: var(--font-data);
  font-size: var(--fs-200);
  color: rgb(255 255 255 / 0.8);
}

/* ---- content-page components ---- */

/* Eyebrows are <p class="overline"> on pages */
p.overline { margin-bottom: var(--sp-2); }

/* Muted/overline text needs the light treatment on dark bands
   (ink-muted fails contrast on ink) — mirrors .stat__label. */
.band--dark .overline,
.band--dark .muted { color: rgb(255 255 255 / 0.8); }

/* Two-button CTA rows (cta-band, heroes) */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
}

/* Chips breathe: a row before a heading, a single chip above a card title */
.chip-row { margin-block-end: var(--sp-5); }
.card > .chip { margin-block-end: var(--sp-3); }

/* Forms read best under ~40rem even when the column is wider */
.contact-form { max-width: 40rem; }

/* Case-study / contact page: body + ruled spec aside */
.case-study__grid { display: grid; gap: var(--sp-7); align-items: start; }
@media (min-width: 48rem) {
  .case-study__grid { grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr); }
}

/* Article pages: the measure is centred; the header carries the meta */
.article__body,
.article__faq { margin-inline: auto; }
.article-header .chip-row { margin-top: var(--sp-4); margin-bottom: 0; }
/* the article header is the article's hero — same instrument mesh */
.article-header {
  background-image: radial-gradient(rgb(50 55 60 / 0.10) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
}

/* ---- motion: hover transitions above + fade-in only, all gated ---- */
@media (prefers-reduced-motion: no-preference) {
  /* One orchestrated moment per page: hero children rise in sequence
     (90ms steps); the home spine diagram lands last. Fade-only — still
     the sanctioned motion vocabulary. Amplified 2026-08-01 (550ms/22px,
     was 300ms/8px) on the client's decision — see --dur-entrance. */
  .fade-in,
  .article-header > .container,
  .hero .container > :not(.hero__copy),
  .hero__copy > * {
    animation: fade-in var(--dur-entrance) var(--ease) both;
  }
  .hero .container > :nth-child(2):not(.hero-spine),
  .hero__copy > :nth-child(2) { animation-delay: 90ms; }
  .hero .container > :nth-child(3),
  .hero__copy > :nth-child(3) { animation-delay: 180ms; }
  .hero .container > :nth-child(4),
  .hero__copy > :nth-child(4) { animation-delay: 270ms; }
  .hero-spine { animation-delay: 230ms; }
  @keyframes fade-in {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
  }
}
/* ---- cookie consent bar ----
   Rendered only when a real GA4 id exists (partials/cookie-consent.njk).
   An ink slab opening with the same 4px pink bar as the footer — pink marks
   interaction, and this is the one thing on the page asking for a decision.
   Bottom-anchored rather than modal: it never traps focus or covers content
   the visitor is reading. */
.cookie-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  background: var(--c-ink);
  color: var(--c-white);
  border-top: 4px solid var(--c-accent-pink);
  box-shadow: 0 -2px 16px rgb(50 55 60 / 0.18);
}
.cookie-bar[hidden] { display: none; }

.cookie-bar__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--sp-5) var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-5);
}
.cookie-bar__text {
  flex: 1 1 22rem;
  margin: 0;
  font-size: var(--fs-300);
  line-height: 1.6;
}
/* White, not lime: lime on ink passes, but this is body copy in a box that
   already carries an accent, and one accent per element is the rule. */
.cookie-bar__text a {
  color: var(--c-white);
  text-underline-offset: 0.2em;
}
.cookie-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
/* Decline carries the same visual weight as Accept — a ghost button on ink,
   not a de-emphasised link. Refusing should cost exactly one click. */
.button--ghost-dark {
  background: transparent;
  border-color: var(--line-soft-dark);
  color: var(--c-white);
}
.button--ghost-dark:hover,
.button--ghost-dark:active {
  background: var(--c-reward);
  border-color: var(--c-reward);
  color: var(--c-white);
}
.button--ghost-dark:focus-visible { outline-color: var(--c-white); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
