/*
 * The site's own layout. Loaded after the living style guide's
 * tokens/base/components.
 *
 * BRANCH concept-b01 — the merge. ONE page again, built from concept-s01's
 * block set (hero, feature, cards, definitions, contact), with the nav as
 * anchors into it. The interactive globe's rules are gone: it is meant to
 * become a page of its own, loaded by choice.
 *
 * The palette below is now the LOGO's, not a sample from a photograph. That
 * is the point of this branch — the mark, the page and the app are supposed
 * to be one visual identity, and the only way that holds is if there is a
 * single list of greys and everything reads from it.
 *
 * NOTE ON --color-text-muted: this file does not use it, deliberately. At
 * 3.45:1 on the light canvas it is below WCAG AA's 4.5:1 for normal-size
 * text, and it was being used for captions, the footer and the hero's note,
 * none of which are large. Every one of those is --color-text-secondary now,
 * which this file darkens to #3a4250 (see the brand block). De-emphasis here
 * comes from size and position, never from washing the colour out.
 *
 * NOTE ON --color-gold, for the same reason: at 3.11:1 it is an ornament
 * token and nothing else. It draws the rules, the card indices' underline
 * and the bar beside a closing line. It never colours a word. The eyebrow
 * labels above headings USED to take it on main; here they are
 * --color-text-secondary, because the accessibility page claims AA for every
 * piece of text on the site and that claim has to stay true.
 *
 * RULE, inherited from the guide (src/styles/AGENTS.md): no raw colour here,
 * with the single documented exception of the brand palette block below.
 * Everything else is a var() into the guide's tokens, or a color-mix of them.
 *
 * (This comment was broken once: a stray comment-close sequence ended it
 * early, and the next three lines were then parsed as a CSS selector, which
 * swallowed the entire rule after it. No console error, no build failure —
 * the colours simply did not apply. The guide's own AGENTS.md warns about
 * exactly this, and never write that two-character sequence in prose here.)
 */

/* ---- Brand palette ---------------------------------------------------------
 * A DELIBERATE DEVIATION, and it should be read as one.
 *
 * The guide's rule is that colour lives only in its tokens.css, and ADR 0005
 * says a tenant palette belongs there as a [data-brand="…"] block. That is
 * where these values should end up. They are here because the guide is a
 * pinned git dependency and the mark and palette are still in flux — moving
 * them upstream means a change, a tag and a version bump, which is not worth
 * doing until the look is settled. When it is, lift this block verbatim into
 * the guide as [data-brand="chapter2"][data-theme="light"] and delete it.
 *
 * THESE VALUES ARE THE LOGO'S OWN, not sampled from a photograph and not
 * picked by eye. `src/images/logo-*.svg` paint the book and its bars in
 * exactly these greys, so the page and the mark cannot drift apart — and the
 * app is meant to be built from the same list. The brief was white, silver
 * and glass; silver is a neutral grey ramp, so that is what this is.
 *
 *   #e2e4ea  bar, light end          #a4a8b0  cover, tips
 *   #bec0c5  page band, tips         #8f9298  page band, spine
 *   #555961  cover, spine            #494e57  bar, dark end
 *   #5f636c  wordmark
 *
 * Measured against the white canvas:
 *
 *   accent   #3f444d   10.6:1   AA at any size, and white text on it likewise
 *   ornament #a4a8b0    2.5:1   DECORATIVE ONLY — never text, never a border
 *                               that has to be seen
 *
 * The accent is the wordmark grey taken down far enough to carry white text;
 * #5f636c itself is 6.0:1, which is fine for text but too light for a solid
 * button with white on it.
 * -------------------------------------------------------------------------- */
[data-theme="light"] {
  --color-accent: #3f444d;
  --color-accent-hover: #2a2e35;
  --color-accent-fg: #ffffff;
  --color-text-link: #4b515a;

  /* The ornament role the old gold used to fill. Rules, bars, hairlines,
     never a word. */
  --color-gold: #a4a8b0;
  --color-gold-soft: #bec0c5;

  /* ---- Body text, darkened -------------------------------------------
   * The guide's #4b5566 passed AA and still read washed out, which is the
   * gap AA is known for: 4.5:1 is a floor for legibility, not a target for
   * comfort. Nearly all prose on this page takes this token, and the worst
   * case is small text on a sunken card, where #4b5566 measured only
   * 6.36:1.
   *
   * Measured, not nudged by eye:
   *
   *            white    sunken   canvas
   *   #4b5566   7.53     6.36     6.90    was
   *   #3a4250  10.12     8.56     9.28    now, AAA on all three
   *
   * It stops short of the near-black #14171f that headings use, because
   * taking body copy all the way there flattens the page into one weight
   * and the headings stop leading. */
  --color-text-secondary: #3a4250;
}

/* The sticky header's height, in one place.
 *
 * Every anchored thing on the site has to clear it, and below 980px the bar
 * becomes two rows — so the number changes and three `scroll-margin-top`
 * rules would otherwise have to change with it. */
:root {
  --header-h: 76px;
}

/* ---- The environment dimension, retargeted -------------------------------
 * The guide's third dimension answers "which deployment am I looking at?" —
 * local/development/qa/uat/production, as a faint wash over hairlines, the
 * focus ring, scrollbars and the page background. A public marketing page has
 * no such answer to give: there is one of it, and it is always live. Leaving
 * data-env off is not the fix — base.css references --env-* unconditionally,
 * so every border would fall back to currentColor.
 *
 * So the pages declare data-env="production" (true, and keeps base.css
 * coherent) and point the accent at the brand's secondary gold instead of
 * production's red. Everything derived from it — --env-border,
 * --env-border-strong, --env-ambient-wash, the focus ring, ::selection —
 * follows from this one line, which is why it is the only change needed.
 * Same specificity as tokens.css's [data-env="production"], and later. */
[data-env] {
  /* Hairlines and the ambient wash take the ornament taupe. */
  --env-accent: var(--color-gold);
}

/* ...but the focus ring is not ornament. At 3.11:1 the taupe is below the
   3:1 WCAG asks of a focus indicator once antialiasing is accounted for, so
   it points at the accent instead. */
:focus-visible {
  outline-color: var(--color-accent) !important;
}

/* ---- Typography: sans throughout -----------------------------------------
   The design system scopes its serif (Cormorant) to body prose and its sans
   (Inter) to everything else — a deliberate split, see the guide's ADR 0002.
   This site does not follow it.

   The client's reference is thomsonreuters.com and the brief was "modern
   sans serif", which is a different character from a Garamond-lineage
   display serif. So `p` is overridden back to the sans stack here, in one
   place, rather than Cormorant appearing on half the page.

   This is a deviation from the guide and should be read as one: the tokens
   are still the guide's, only the role split is ours. If the serif is ever
   wanted back, deleting this block restores it.
   ------------------------------------------------------------------------ */
p,
.section-intro,
.hero-lead p,
.hero-note,
.prose p,
.card-body,
.definition-body,
.doc-section p,
.doc-contact {
  font-family: var(--font-sans) !important;
  font-weight: 400 !important;
  font-size: var(--text-md);
  line-height: 1.6;
}

/* ---- Page frame ---- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: calc(-1 * var(--space-10));
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-surface-raised);
  color: var(--color-text-primary);
  border-radius: var(--radius-sm);
}

.skip-link:focus-visible {
  top: var(--space-4);
}

/* Shared horizontal measure. Every page is three bands (header, main,
   footer) and they must line up down the left edge at every width. */
.site-header-inner,
.hero,
.section,
.site-footer-inner {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  /* Translucent so the page scrolls up behind it rather than hitting a hard
     edge; the blur is what keeps the wordmark legible over a photograph. */
  background: color-mix(in srgb, var(--color-bg-canvas) 82%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: var(--border-width) solid var(--env-border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text-primary);
  min-width: 0;
}

.brand-name {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 650;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

/* The old rule hid the name below 420px and let the mark carry it alone.
   That was defensible when the mark was a chrome "2" — this one is an open
   book with bars over it, which is handsome and says nothing at all to
   someone who has never seen it before. So the name shrinks rather than
   disappearing, and only gives up at the width where it genuinely will not
   fit beside the Sign in button. */
@media (max-width: 560px) {
  .brand-name {
    font-size: var(--text-md);
  }

  .brand-logo {
    height: 28px;
  }
}

@media (max-width: 340px) {
  .brand-name {
    display: none;
  }
}

/* The mark, as a vector.
   Width follows from the aspect ratio; only the height is pinned. No border
   and no radius: the old raster mark carried its own pale ground and needed a
   hairline to stop it dissolving into a white header, but this one is
   transparent artwork and a box drawn around it would be a box around nothing.
   Slightly shorter than the old 44px because the emblem is 2:1 and wide — at
   44 it outweighed the name beside it. */
.brand-logo {
  height: 34px;
  width: auto;
  flex-shrink: 0;
}

/* Six links, not three anchors — see content.yaml. The gap is tighter than
   the old nav's for that reason, and the bar wraps to a second row below
   980px rather than hiding itself; on a site of eight pages, a header with
   no navigation in it is not a smaller header, it is a broken one. */
/* ---- NBR ----
   The easter egg, in the footer. The NBR inside the registered company name
   is a button; hover it, tab to it or tap it and a small panel offers one of
   the things the letters might stand for, changing as it sits there.

   It opens UPWARD. The company block is the last thing on the page, so a
   panel below the button would hang off the bottom and take the page with it.

   The panel is hidden with visibility and opacity and NEVER with display:
   none. A CSS animation does not run on a display:none element, so the
   rotation would restart on every open and every visitor would meet the same
   first entry; hidden this way the cycle has been running since page load and
   what you catch depends on when you looked.

   `--nbr-duration`, the keyframes and the per-item delays are generated into
   this file by scripts/build.ts, since all three depend on how many
   expansions content.yaml holds. */
.nbr {
  position: relative;
  display: inline-block;
}

/* Sized and coloured to sit inside the registered name without announcing
   itself. The dotted underline is the only hint that it does anything, and it
   is meant to be easy to miss. */
.nbr-key {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  cursor: help;
  text-decoration: underline dotted var(--color-gold);
  text-underline-offset: 3px;
}

.nbr-pop {
  position: absolute;
  bottom: calc(100% + var(--space-2));
  left: 0;
  z-index: 6;
  min-width: 17rem;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-surface);
  border: var(--border-width) solid var(--env-border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease;
}

.nbr:hover .nbr-pop,
.nbr:focus-within .nbr-pop {
  opacity: 1;
  visibility: visible;
}

/* On a narrow screen the panel is wider than the room to the right of the
   button, and `visibility: hidden` does NOT take it out of the scrollable
   area the way `display: none` would. Left alone it adds horizontal scroll
   that nothing visible accounts for. Pinned to the viewport instead, with the
   lines allowed to wrap. */
@media (max-width: 700px) {
  .nbr-pop {
    position: fixed;
    bottom: var(--space-4);
    left: var(--space-4);
    right: var(--space-4);
    min-width: 0;
  }

  .nbr-item {
    white-space: normal;
  }
}

.nbr-pop-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

/* Every expansion stacked into one grid cell, so the panel sizes itself to
   the longest and nothing jumps as they swap. */
.nbr-cycle {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nbr-item {
  grid-area: 1 / 1;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: 550;
  color: var(--color-text-primary);
  white-space: nowrap;
  opacity: 0;
  animation: nbr-cycle var(--nbr-duration, 38s) infinite;
}

/* A reader who asked for less motion gets the first expansion, standing
   still. `animation: none` alone would leave every item at opacity 0, since
   the keyframes were what supplied the 1. */
@media (prefers-reduced-motion: reduce) {
  .nbr-item {
    animation: none;
    opacity: 0;
  }

  .nbr-item:first-child {
    opacity: 1;
  }
}

.site-nav {
  display: flex;
  gap: var(--space-4);
  margin-left: var(--space-3);
}

.site-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 550;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--color-text-primary);
}

/* The page you are on. The underline matters more than the colour shift:
   with six near-identical links there has to be something to see, and
   aria-current in the markup is what carries the same fact to a screen
   reader. */
.site-nav a[aria-current="page"] {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.site-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Plain white, not the theme canvas: the photographs sit on a near-white
   ground and anything cooler shows a visible seam where art meets page. */
body {
  background: var(--color-bg-surface);
}

.site-login {
  text-decoration: none;
}

/* ---- Shared pieces ---- */

/* Grey, deliberately. In the hero this is an invitation rather than the
   point of the page, and a solid accent-coloured button that high up reads
   as a demand. The accent is kept for the one button that submits — and,
   here, for "Request Demo", which is the document's own primary call. */
.btn-quiet {
  background: var(--color-bg-sunken);
  border-color: var(--env-border-strong);
  color: var(--color-text-primary);
  text-decoration: none;
}

.btn-quiet:hover {
  background: var(--color-bg-surface);
  border-color: var(--color-accent);
}

.hero-actions {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero-actions .btn {
  text-decoration: none;
}

/* A size modifier only — the colour pairing stays whatever .btn-primary /
   .btn-secondary gives it. */
.btn-lg {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-md);
}

.section {
  padding-block: var(--space-8);
  /* The header is sticky, so an anchor jump would otherwise land with the
     heading hidden underneath it. */
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

.section + .section {
  border-top: var(--border-width) solid var(--env-border);
}

/* A hairline that fades out — the one piece of ornament on a page, and the
   gold's only structural job. */
.section-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  text-wrap: balance;
}

.section-title::after {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  margin-top: var(--space-3);
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-gold), transparent);
}

/* No measure cap. A section's lead paragraph has to reach the same right
   edge as the cards or panel beneath it — a narrower one reads as a mistake
   rather than as typography. Where a narrower measure IS wanted the
   container supplies it: the contact lead sits in a grid column, and the
   standing pages are inside a 72ch article. The one exception is spelled out
   under .notice below. */
.section-intro {
  color: var(--color-text-secondary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
}

/* The small label above a heading — "One of our four areas", "Our Mission".
   Secondary, not gold: see the note at the top of this file. */
.eyebrow {
  font-family: var(--font-sans) !important;
  font-size: var(--text-xs) !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

/* ---- Hero ----
   The intro page only. Three tiers in the order the source document puts
   them: the strapline is the plain category line a cold visitor needs within
   a second, the headline is the promise, the lead is the argument.

   `align-items: start` and not centre — the copy column runs to four
   paragraphs plus a note and two buttons, and a photograph floated to the
   middle of that leaves a hole above it. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-8);
  padding-block: var(--space-10) var(--space-8);
}

/* The argument, under both columns and across the whole measure. */
.hero-body {
  grid-column: 1 / -1;
  margin-top: var(--space-8);
}

.hero-figure {
  margin: 0;
}

/* No frame: the photograph is already light and bright, and a card edge
   around it would fight the window glare. */
.hero-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

/* Stands in for an eyebrow label — an ornament says less than a redundant
   word. */
.hero-rule {
  width: 72px;
  height: 2px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-gold), transparent);
}

/* The strapline, above the headline. Sans and sentence case: it is three
   noun phrases and setting it in caps at display tracking would turn a
   readable line into a 50-character band. */
.hero-standfirst {
  font-family: var(--font-sans) !important;
  font-size: var(--text-md) !important;
  font-weight: 600 !important;
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-3);
}

.hero-headline {
  /* Clamped between two steps of the type scale rather than to arbitrary
     rem values, so the display size stays inside the system. */
  font-size: clamp(var(--text-2xl), 5vw, var(--text-3xl));
  letter-spacing: -0.025em;
  margin-bottom: var(--space-5);
  text-wrap: balance;
}

/* Two text columns, so four paragraphs run to about the depth of the
   photograph above them instead of to a 900px wall. `break-inside` is what
   stops a paragraph being split across the gutter — without it the second
   column opens mid-sentence, which reads as a rendering fault. */
.hero-lead {
  columns: 2;
  column-gap: var(--space-8);
}

.hero-lead p {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  break-inside: avoid;
}

.hero-lead p + p {
  margin-top: var(--space-4);
}

/* The mission line. A marginal note, not a fifth paragraph: the rule and the
   slightly tighter measure are what keep it from joining the lead above. */
.hero-note {
  margin-top: var(--space-5);
  padding-left: var(--space-4);
  border-left: 2px solid var(--env-border-strong);
  max-width: 52ch;
  font-size: var(--text-md) !important;
  color: var(--color-text-secondary);
}

/* The sign-off the document's first page ends on. */
.hero-closing {
  margin-top: var(--space-5);
  font-family: var(--font-sans) !important;
  font-size: var(--text-lg) !important;
  font-weight: 650 !important;
  letter-spacing: -0.015em;
  color: var(--color-text-primary);
}

/* ---- Feature ----
   An eyebrow, a heading, a punchline, then prose beside a photograph.

   The heading runs full width and only the body is two columns. With four
   paragraphs of prose a single tall column leaves the picture stranded
   against white, and a heading squeezed into half the measure loses the
   punchline's line break. */
.feature-tagline {
  font-family: var(--font-sans) !important;
  font-size: clamp(var(--text-lg), 2.2vw, var(--text-xl)) !important;
  font-weight: 650 !important;
  letter-spacing: -0.015em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-6);
  max-width: 34ch;
  text-wrap: balance;
}

.feature-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-7);
  align-items: start;
}

/* Alternating sides down a page, so four pillar pages read as a set rather
   than as the same page four times. Source order is unchanged, so the prose
   still comes first for a screen reader and when the grid collapses. */
.feature-body.is-flipped .feature-figure {
  order: -1;
}

.feature-figure {
  margin: 0;
  position: sticky;
  top: calc(var(--header-h) + var(--space-5));
}

.feature-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  border: var(--border-width) solid var(--env-border);
}

/* Artwork that does not share the page's ground — see `inset` in the block
   type. The panel is what stops a dark render reading as a hole punched in
   a white page. */
.feature-figure.is-inset {
  background: var(--color-bg-sunken);
  border: var(--border-width) solid var(--env-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.feature-figure.is-inset img {
  border: none;
  border-radius: var(--radius-sm);
}

/* ---- Figures set into the prose ----
   Screenshots of the working product, floated with the text running round
   them. Small on purpose: at this size a screenshot is an illustration of the
   sentence beside it, which is what it is for. The caption names the FEATURE,
   never the capture.

   A float is placed from where it occurs in the flow, so the template emits
   these ahead of the paragraphs. */
.float-figure {
  margin: 0 0 var(--space-4);
  /* Sized against the full measure, not chosen in isolation: at 1120 a 380px
     figure leaves the text beside it setting to roughly 80 characters, which
     is about as long a line as this type will carry. Shrink the figure and
     the lines next to it get worse, not better. */
  width: 380px;
  max-width: 42%;
}

.float-figure.is-right {
  float: right;
  margin-left: var(--space-6);
}

.float-figure.is-left {
  float: left;
  margin-right: var(--space-6);
  clear: left;
}

.float-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  border: var(--border-width) solid var(--env-border-strong);
}

.float-figure figcaption {
  margin-top: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* Full measure, so the text reaches the same right-hand edge as the heading
   above it and the cards below. Two separate caps had to come off for that:
   this container's own, and `.prose p`'s 62ch, which applies to every
   paragraph regardless of what contains it and was the one actually holding
   the lines short.

   The figure beside the text is what keeps the measure honest instead. It is
   wide enough that a line running past it still sets to a readable length,
   which is why `.float-figure` is sized the way it is rather than as small as
   it could be. The clearfix stops a tall float hanging out of the bottom. */
.prose-flow {
  max-width: none;
}

/* Doubled class on purpose. `.prose p` sets a 62ch cap and sits LATER in
   this file; at equal specificity the later rule wins, so a plain
   `.prose-flow p` lost silently and the paragraphs stayed short while the
   container around them was full width. */
.prose.prose-flow p {
  max-width: none;
}

.prose-flow::after {
  content: "";
  display: block;
  clear: both;
}

/* ---- Prose ---- */
.prose p {
  color: var(--color-text-secondary);
  max-width: 62ch;
}

.prose p + p {
  margin-top: var(--space-4);
}

/* The paragraph that closes the industries list runs under a table-width
   <dl>, so the 62ch measure above leaves it as three short lines against a
   full-width rule. */
.definitions + .prose p {
  max-width: 78ch;
}

/* The line a block ends on — "Purpose-built technology. Practical solutions."
   Not a heading and not body: a pull quote, set off by the gold bar, which
   is the one place a block raises its voice. */
.closing-line {
  margin-top: var(--space-7);
  padding-left: var(--space-5);
  border-left: 3px solid var(--color-gold);
  font-family: var(--font-sans) !important;
  font-size: var(--text-lg) !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  max-width: 56ch;
  text-wrap: pretty;
}

/* ---- Claims ----
   The elaborations under a feature's prose, and the short facts that go with
   them, in ONE grid. Not the `cards` block: those are a grid of peers with
   images and links, and these carry neither.

   The column count is chosen in the template from the number of cards, not
   here: three across when the count divides by three, two otherwise. A fixed
   choice leaves an orphan the moment the count changes, and `auto-fit` picks
   three at this measure whatever the count, which strands Consulting's
   fourth card on a row of its own. */
.claims {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.claims-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.claims-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.claim {
  background: var(--color-bg-surface);
  border: var(--border-width) solid var(--env-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.claim-title {
  font-size: var(--text-md);
  margin-bottom: var(--space-2);
}

.claim-body {
  color: var(--color-text-secondary);
  font-size: var(--text-sm) !important;
  margin: 0;
}

/* ---- Cards ----
   `cards-N` is the column count the content file asked for. Four for the
   four areas and the four values, two for the approach's steps — which are
   long enough that four across would set them in a 20-character measure. */
.cards {
  display: grid;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-surface);
  border: var(--border-width) solid var(--env-border);
  border-radius: var(--radius-md);
  /* The figure bleeds to the edge, so the corners have to clip it. */
  overflow: hidden;
}

.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.card.is-link:hover {
  border-color: var(--color-accent);
}

.card.is-link:hover .card-more {
  transform: translateX(3px);
}

/* A fixed ratio, because the four source thumbnails are not all the same
   shape and four cards of different heights in one row reads as an error.
   `cover` crops rather than letterboxes — these are photographs, and a
   stripe of white above and below one of them would be worse than losing a
   few pixels of its edge. */
.card-figure {
  margin: 0;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-bg-sunken);
  border-bottom: var(--border-width) solid var(--env-border);
}

/* Absolutely positioned, not just `height: 100%`. A percentage height needs
   a definite containing height to resolve against, and `aspect-ratio` alone
   does not give one when the box has in-flow content — so the image kept its
   own intrinsic shape and the four cards came out at four different heights.
   Taking it out of flow is what makes the ratio actually bind. */
.card-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-4);
}

/* 01, 02, 03, 04. Tabular so the digits line up card to card, and sitting
   above a short gold rule rather than being coloured by it. */
.card-index {
  font-family: var(--font-sans) !important;
  font-size: var(--text-xs) !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-gold);
  align-self: flex-start;
  min-width: 2.5em;
}

.card-title {
  font-size: var(--text-md);
  margin-bottom: var(--space-2);
  text-wrap: balance;
}

.card-body {
  color: var(--color-text-secondary);
  font-size: var(--text-sm) !important;
  margin: 0;
  flex: 1;
}

.card-more {
  margin-top: var(--space-4);
  color: var(--color-accent);
  font-size: var(--text-lg);
  line-height: 1;
  transition: transform var(--duration-fast, 120ms) ease;
}

/* ---- Definitions ----
   The industries. A real <dl>, not a card grid: these are four definitions
   of four words, and a grid of equal boxes would claim they are four
   offerings. */
.definitions {
  margin: 0 0 var(--space-6);
  border-top: var(--border-width) solid var(--env-border);
}

.definition {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: var(--space-5);
  padding-block: var(--space-4);
  border-bottom: var(--border-width) solid var(--env-border);
}

.definition-term {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: 650;
  color: var(--color-text-primary);
}

.definition-body {
  margin: 0;
  color: var(--color-text-secondary);
}

/* ---- "Next" ----
   A page of this site is a chapter of one argument, so each one points at
   the one after it. Two lines, because a bare arrow link at the foot of a
   long page is easy to read as a footer decoration. */
.next-link {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: 2px solid var(--env-border-strong);
  text-decoration: none;
  color: var(--color-text-primary);
}

.next-link-label {
  font-family: var(--font-sans);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.next-link-title {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.next-link:hover .next-link-title {
  color: var(--color-accent);
}

/* ---- Contact ---- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
}

.contact .section-intro {
  margin-bottom: var(--space-4);
}

.contact-email {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
}

.contact-form {
  background: var(--color-bg-surface);
  border: var(--border-width) solid var(--env-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

/* ---- The demo / enquiry switch ----
   Radios do the work. The checked one is read by CSS to decide which message
   box shows, which means no script is involved and — more usefully — both
   textareas stay in the page the whole time, so a draft in one is never lost
   by looking at the other.

   /demo and /contact differ only in which radio the build marks `checked`,
   which is how the document's two calls to action stay distinct without a
   line of JavaScript between them. */
.mode-switch {
  display: inline-flex;
  padding: 3px;
  margin-bottom: var(--space-5);
  border: var(--border-width) solid var(--env-border);
  border-radius: var(--radius-full);
  background: var(--color-bg-sunken);
}

.mode-radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.mode-label {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.mode-radio:checked + .mode-label {
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

/* The focus ring has to follow the visually-hidden radio to its label, or
   keyboard users get no indication of where they are. */
.mode-radio:focus-visible + .mode-label {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Only the selected mode's box is shown. `display: none` rather than
   visibility, so the hidden one takes no space — its value still posts. */
.field-mode {
  display: none;
}

.contact-form:has(#mode-demo:checked) .field-mode-demo,
.contact-form:has(#mode-contact:checked) .field-mode-contact {
  display: flex;
}

.contact-form-fields {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.contact-form .input {
  width: 100%;
}

.field-optional {
  font-weight: 400;
  color: var(--color-text-secondary);
}

.contact-submit {
  width: 100%;
  justify-content: center;
}

.contact-note {
  margin-top: var(--space-3);
  font-family: var(--font-sans) !important;
  font-size: var(--text-xs) !important;
  font-weight: 400 !important;
  color: var(--color-text-secondary);
}

/* Off-screen rather than display:none — a bot that skips hidden inputs is
   exactly the one this is meant to catch. aria-hidden and tabindex="-1" on
   the markup keep it away from people. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Notice pages (thanks / sorry / 404) ---- */
.notice {
  min-height: 46vh;
}

/* The exception. A notice page is one short sentence on an otherwise empty
   screen, with nothing beneath it to line up with, so it keeps a readable
   measure instead. */
.notice .section-intro {
  max-width: 56ch;
}

.notice-email {
  margin-bottom: var(--space-5);
  font-size: var(--text-md);
  color: var(--color-text-secondary);
}

.notice .btn {
  text-decoration: none;
}

/* ---- Standing pages (privacy, accessibility) ---- */
.doc {
  max-width: 72ch;
}

.doc-updated {
  font-family: var(--font-sans) !important;
  font-size: var(--text-xs) !important;
  font-weight: 400 !important;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.doc-section + .doc-section {
  margin-top: var(--space-6);
}

.doc-heading {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
  /* Anchored from the footer, so it must clear the sticky header too. */
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

.doc-section p + p {
  margin-top: var(--space-3);
}

.doc-section p,
.doc-contact {
  color: var(--color-text-secondary);
}

.doc-contact {
  margin-top: var(--space-7);
}

/* ---- Footer ---- */
.site-footer {
  margin-top: var(--space-8);
  border-top: var(--border-width) solid var(--env-border);
  background: var(--color-bg-sunken);
}

.site-footer-inner {
  padding-block: var(--space-7);
}

.footer-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}

.footer-label {
  font-family: var(--font-sans) !important;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2) !important;
}

/* Addresses and registration numbers are reference data, not prose — they
   read better on the sans stack than in the body serif base.css gives <p>. */
.footer-address,
.footer-detail {
  font-family: var(--font-sans) !important;
  font-style: normal;
  font-size: var(--text-sm) !important;
  font-weight: 400 !important;
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  margin: 0;
}

.footer-copyright {
  font-family: var(--font-sans) !important;
  font-size: var(--text-xs) !important;
  font-weight: 400 !important;
  color: var(--color-text-secondary);
  padding-top: var(--space-5);
  margin-top: var(--space-5);
  border-top: var(--border-width) solid var(--env-border);
  margin-bottom: 0;
}

/* Legal links, under the copyright line. */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-3);
}

.footer-links a {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ---- Narrow -------------------------------------------------------------
   Four breakpoints, each with one job:
     1120  the four-up card grid stops fitting its own thumbnails
      980  six nav links stop fitting beside the wordmark and the button
      900  two columns stop being two columns
      640  the page frame tightens
   ------------------------------------------------------------------------ */
@media (max-width: 1120px) {
  .cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  /* The bar becomes two rows rather than losing its navigation. The nav row
     scrolls sideways if six labels still do not fit — which is fine, because
     the footer carries the same six links in full. */
  :root {
    --header-h: 124px;
  }

  .site-header-inner {
    flex-wrap: wrap;
    row-gap: 0;
    min-height: 0;
    padding-top: var(--space-3);
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-block: var(--space-3);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero,
  .feature-body,
  .contact {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .hero {
    padding-block: var(--space-7) var(--space-6);
  }

  .hero-body {
    margin-top: 0;
  }

  .hero-lead {
    columns: 1;
  }

  /* Copy first on a phone — the photograph is atmosphere, the sentence is
     why the page exists. So the hero's picture drops below its words, and a
     feature's flip is cancelled rather than hoisting the image above the
     prose it illustrates. */
  .hero-figure {
    order: 2;
    margin-top: 0;
  }

  /* ...and the argument below the picture, not the other way round. Without
     this the single-column grid puts the full-width body before the figure,
     stranding the photograph between the hero and the cards. */
  .hero-body {
    order: 3;
  }

  .feature-figure {
    position: static;
  }

  .feature-body.is-flipped .feature-figure {
    order: 0;
  }

  .definition {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }

}

@media (max-width: 640px) {
  .site-header-inner,
  .hero,
  .section,
  .site-footer-inner {
    padding-inline: var(--space-4);
  }

  .brand-logo {
    height: 36px;
  }

  .cards-2,
  .cards-3,
  .cards-4,
  .claims-2,
  .claims-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  /* A single-column card with a 16:10 photograph on top is mostly
     photograph. Shorter, so the words are still the first thing on screen. */
  .card-figure {
    aspect-ratio: 21 / 9;
  }

  /* A 300px float inside a 600px column leaves a gutter of text a few words
     wide. Below this they stop floating and sit in the flow. Above it, even
     at tablet widths, the flowing layout still reads properly, which is why
     this is not in the 900px block with the grid collapses. */
  .float-figure {
    float: none;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    margin-bottom: var(--space-5);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---- Holding page (content.yaml `holding:`) ---- */
.holding {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.holding-logo {
  width: min(320px, 70vw);
  height: auto;
  margin-bottom: var(--space-6);
}

.holding-message {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.holding-email {
  font-size: var(--text-md);
}

/* Generated from content.yaml — see scripts/build.ts. */
.nbr-cycle { --nbr-duration: 38.40s; }
@keyframes nbr-cycle {
  0%, 0.375% { opacity: 0; }
  1.000%, 5.125% { opacity: 1; }
  5.875%, 100% { opacity: 0; }
}
.nbr-item:nth-child(1) { animation-delay: 0.00s; }
.nbr-item:nth-child(2) { animation-delay: 2.40s; }
.nbr-item:nth-child(3) { animation-delay: 4.80s; }
.nbr-item:nth-child(4) { animation-delay: 7.20s; }
.nbr-item:nth-child(5) { animation-delay: 9.60s; }
.nbr-item:nth-child(6) { animation-delay: 12.00s; }
.nbr-item:nth-child(7) { animation-delay: 14.40s; }
.nbr-item:nth-child(8) { animation-delay: 16.80s; }
.nbr-item:nth-child(9) { animation-delay: 19.20s; }
.nbr-item:nth-child(10) { animation-delay: 21.60s; }
.nbr-item:nth-child(11) { animation-delay: 24.00s; }
.nbr-item:nth-child(12) { animation-delay: 26.40s; }
.nbr-item:nth-child(13) { animation-delay: 28.80s; }
.nbr-item:nth-child(14) { animation-delay: 31.20s; }
.nbr-item:nth-child(15) { animation-delay: 33.60s; }
.nbr-item:nth-child(16) { animation-delay: 36.00s; }
