/* app.css — the Code Xenix design system.
   One stylesheet for every page: base, layout, components, navigation, motion.
   All values come from theme.css tokens. Loaded after Bootstrap, which it re-themes.

   Contents
   01 Base            06 Cards & media      11 Prose (CMS content)
   02 Bootstrap bridge 07 Data & lists       12 Forms & feedback
   03 Layout          08 Header & nav       13 Motion
   04 Type            09 Hero & page hero   14 Utilities
   05 Buttons & chips 10 CTA & footer       15 Page pieces
   16 Section patterns          17 Motion details
*/

/* ============ 01 Base ============ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 32px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  letter-spacing: var(--tracking-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: inherit; }
button { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border-main); opacity: 1; margin: var(--s-6) 0; }
::selection { background: var(--accent); color: var(--ink-fixed); }

:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--ink-fixed); color: #fff; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: #fff; }

/* ============ 02 Bootstrap bridge ============ */
:root, [data-theme="dark"] {
  --bs-body-bg: var(--bg-body);
  --bs-body-color: var(--text-primary);
  --bs-body-font-family: var(--font-sans);
  --bs-secondary-color: var(--text-muted);
  --bs-tertiary-bg: var(--bg-surface-alt);
  --bs-border-color: var(--border-main);
  --bs-border-radius: var(--r-md);
  --bs-link-color: var(--text-primary);
  --bs-link-color-rgb: var(--text-primary-rgb);
  --bs-link-hover-color: var(--text-primary);
  --bs-link-hover-color-rgb: var(--text-primary-rgb);
  --bs-heading-color: inherit;
  --bs-emphasis-color: var(--text-primary);
}
.text-muted { color: var(--text-muted) !important; }

/* ============ 03 Layout ============ */
/* The content column, for anything outside a band (header bar, flash messages) */
.shell {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--pad-panel-x));
  margin-inline: auto;
  padding-inline: var(--pad-panel-x);
}

/* <main class="page">: a stack of full-bleed bands */
.page { display: block; }

/* The panel is the unit of page structure: one full-width band per section.
   Its side padding centres the content in the --content-max column. */
.panel {
  position: relative;
  padding: var(--pad-panel-y) max(var(--pad-panel-x), calc((100% - var(--content-max)) / 2));
  background: var(--bg-surface);
  color: var(--text-primary);
  border-top: 1px solid var(--border-light);
}
.panel--plain { background: var(--bg-body); border-top: 0; }      /* grey band */
.panel--soft { background: var(--tint-soft); border-top: 0; }
.panel--ink { border-top: 0; }
.panel.panel--ink + .panel.panel--ink:not(.panel--tight) { border-top: 1px solid var(--border-main); }      /* two black bands in a row stay two bands */
.panel--tight { padding-block: clamp(28px, 3.4vw, 48px); }
.panel--narrow { padding-inline: max(var(--pad-panel-x), calc((100% - 1200px) / 2)); }      /* chapter sections use a 1200px column */
.panel--flush { padding: 0; overflow: hidden; }

/* Context panels re-point the semantic tokens, so every component inside adapts. */
.panel--ink, .panel--navy, .on-ink {
  --text-primary: var(--on-ink);
  --text-secondary: var(--on-ink-secondary);
  --text-muted: var(--on-ink-muted);
  --text-faded: var(--on-ink-faded);
  --text-tone: var(--on-ink-tone);
  --text-brand: var(--accent-soft);
  --text-primary-rgb: 255, 255, 255;
  --bg-surface: var(--ink-panel);
  --bg-surface-alt: rgba(255, 255, 255, 0.045);
  --bg-surface-hover: rgba(255, 255, 255, 0.09);
  --border-light: rgba(255, 255, 255, 0.07);
  --border-main: rgba(255, 255, 255, 0.1);
  --border-heavy: rgba(255, 255, 255, 0.24);
  --btn-bg: #ffffff;
  --btn-fg: #111110;
  --btn-bg-hover: #e9e9e6;
  --icon-tile-bg: rgba(255, 255, 255, 0.08);
  --icon-tile-fg: #ffffff;
  background: var(--ink-panel);
  color: var(--text-primary);
}
/* Deep-blue band: the ink context over the navy gradient, with a sparse field of points */
.panel--navy {
  --bg-surface: var(--navy-1);
  background:
    radial-gradient(circle, rgba(var(--accent-rgb), 0.5) 1px, transparent 1.4px) 0 0 / 120px 90px,
    radial-gradient(circle, rgba(255, 255, 255, 0.28) 1px, transparent 1.3px) 60px 45px / 170px 130px,
    linear-gradient(180deg, var(--navy-1) 0%, var(--navy-2) 45%, var(--navy-1) 100%);
  border-top: 0;
}

/* Section heading block */
.section-head {
  display: grid;
  gap: var(--s-4);
  max-width: 46rem;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head--split {
  max-width: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: var(--s-6);
}
.section-head--split > :first-child { display: grid; gap: var(--s-4); max-width: 46rem; }
@media (max-width: 767px) {
  .section-head--split { grid-template-columns: 1fr; align-items: start; row-gap: var(--s-5); }
  .section-head--split > :last-child:not(:first-child) { justify-self: start; }
}

.grid {
  --cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--s-4);
}
.grid--2 { --cols: 2; }
.grid--4 { --cols: 4; }
@media (max-width: 1023px) { .grid, .grid--4 { --cols: 2; } }
@media (max-width: 639px) { .grid, .grid--2, .grid--4 { --cols: 1; } }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.split--wide-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split--aside { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }     /* short label + wide content */
.split--center { align-items: center; }
@media (max-width: 899px) {
  .split, .split--even, .split--wide-left, .split--aside { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  .split__sticky { position: sticky; top: calc(var(--header-h) + 40px); }
}

.stack { display: grid; gap: var(--s-4); align-content: start; }
.stack--sm { gap: var(--s-2); }
.stack--lg { gap: var(--s-6); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }

/* ============ 04 Type ============ */
.h-display { font-size: var(--fs-display); letter-spacing: var(--tracking-display); line-height: 0.98; }
.h1 { font-size: var(--fs-h1); letter-spacing: var(--tracking-display); line-height: 1.02; }
.h2 { font-size: var(--fs-h2); letter-spacing: var(--tracking-display); line-height: 1.04; }
.h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.015em; }
.h4 { font-size: var(--fs-h4); line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-muted); max-width: 56ch; }
.muted { color: var(--text-muted); }
.tone-muted { color: var(--text-tone); }           /* second half of a two-tone heading */
.small { font-size: var(--fs-sm); }
.num { font-variant-numeric: tabular-nums; }

/* Kicker: the small label above a heading */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============ 05 Buttons & chips ============ */
.btn {
  --bs-btn-padding-x: 24px;
  --bs-btn-padding-y: 10px;
  --bs-btn-font-family: var(--font-sans);
  --bs-btn-font-size: 0.875rem;
  --bs-btn-font-weight: 450;
  --bs-btn-line-height: 1.4;
  --bs-btn-border-width: 1px;
  --bs-btn-border-radius: var(--r-pill);
  --bs-btn-color: var(--btn-fg);
  --bs-btn-bg: var(--btn-bg);
  --bs-btn-border-color: var(--btn-bg);
  --bs-btn-hover-color: var(--btn-fg);
  --bs-btn-hover-bg: var(--btn-bg-hover);
  --bs-btn-hover-border-color: var(--btn-bg-hover);
  --bs-btn-active-color: var(--btn-fg);
  --bs-btn-active-bg: var(--btn-bg-hover);
  --bs-btn-active-border-color: var(--btn-bg-hover);
  --bs-btn-disabled-color: var(--btn-fg);
  --bs-btn-disabled-bg: var(--btn-bg);
  --bs-btn-disabled-border-color: var(--btn-bg);
  --bs-btn-disabled-opacity: 0.5;
  --bs-btn-focus-box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--dur-1) ease, border-color var(--dur-1) ease, color var(--dur-1) ease, transform var(--dur-1) ease;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }
.btn > i { font-size: 1.05em; line-height: 1; transition: transform var(--dur-2) var(--ease-out); }
.btn:hover > .bi-arrow-right { transform: translateX(3px); }
.btn:hover > .bi-arrow-up-right { transform: translate(2px, -2px); }

.btn--outline, .btn-secondary, .btn-outline-primary, .btn-outline-secondary, .btn-light {
  --bs-btn-color: var(--text-primary);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--border-heavy);
  --bs-btn-hover-color: var(--text-primary);
  --bs-btn-hover-bg: var(--bg-surface-alt);
  --bs-btn-hover-border-color: var(--text-primary);
  --bs-btn-active-color: var(--text-primary);
  --bs-btn-active-bg: var(--bg-surface-hover);
  --bs-btn-active-border-color: var(--text-primary);
  --bs-btn-disabled-color: var(--text-muted);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: var(--border-main);
}
.btn--ghost {
  --bs-btn-color: var(--text-primary);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--text-primary);
  --bs-btn-hover-bg: var(--bg-surface-alt);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--text-primary);
  --bs-btn-active-bg: var(--bg-surface-hover);
  --bs-btn-active-border-color: transparent;
}
.btn--sm, .btn-sm { --bs-btn-padding-x: 14px; --bs-btn-padding-y: 6px; --bs-btn-font-size: 0.875rem; min-height: 36px; }
.btn--lg, .btn-lg { --bs-btn-padding-x: 28px; --bs-btn-padding-y: 13px; --bs-btn-font-size: 0.9375rem; min-height: 50px; }
.btn--icon { --bs-btn-padding-x: 0; width: 44px; padding: 0; }

/* Inline text link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500; font-size: 0.9375rem;
  text-decoration: none; color: var(--text-primary);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
}
.link-arrow i { transition: transform var(--dur-2) var(--ease-out); }
.link-arrow:hover i { transform: translateX(3px); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-surface-alt);
  color: var(--text-primary);
  font-size: var(--fs-xs); font-weight: 500; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  border: 0;
}
.chip--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-main); }
.chip--ink { background: var(--ink-fixed); color: #fff; }
button.chip, a.chip { cursor: pointer; transition: background-color var(--dur-1) ease, color var(--dur-1) ease, box-shadow var(--dur-1) ease; }
button.chip:hover, a.chip:hover { background: var(--bg-surface-hover); }
button.chip[aria-pressed="true"], .chip.is-active { background: var(--btn-bg); color: var(--btn-fg); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }

.icon-tile {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border-radius: var(--r-md);
  background: var(--icon-tile-bg, var(--tint-soft));
  color: var(--icon-tile-fg, var(--text-primary));
  font-size: 1.25rem; line-height: 1;
}
.icon-tile--sm { width: 32px; height: 32px; border-radius: var(--r-sm); font-size: 1rem; }
.icon-tile--lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.5rem; }
.icon-tile--solid { background: var(--btn-bg); color: var(--btn-fg); }

/* ============ 06 Cards & media ============ */
.card {
  --bs-card-bg: var(--bg-surface-alt);
  --bs-card-color: var(--text-primary);
  --bs-card-border-width: 0;
  --bs-card-border-radius: var(--r-lg);
  position: relative;
  display: flex; flex-direction: column;
  gap: var(--s-3);
  min-width: 0;
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--bg-surface-alt);
  box-shadow: inset 0 0 0 1px var(--border-light);
  color: var(--text-primary);
  text-decoration: none;
}
.card--surface { background: var(--bg-surface); }          /* cards sitting on the canvas */
.card--sky { background: var(--tint-sky); }
.card--lilac { background: var(--tint-lilac); }
.card--sand { background: var(--tint-sand); }
.card--soft { background: var(--tint-soft); }
/* A card carrying .on-ink keeps the dark fill that .card would otherwise override */
.card.on-ink { background: var(--ink-panel); }
.card--lg { padding: clamp(24px, 3vw, 40px); border-radius: var(--r-xl); gap: var(--s-4); }

.card__head { display: flex; align-items: center; gap: var(--s-3); }
/* an icon tile directly in a card: the next element (the title) keeps its distance */
.card:not(.card--row) > .icon-tile + * { margin-top: var(--s-3); }
.card--lg:not(.card--row) > .icon-tile + * { margin-top: var(--s-4); }
.card--row { flex-direction: row; align-items: flex-start; }      /* icon beside the text */
.card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.card__title { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.card__text { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.55; }
.card__meta { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 500; }
.card__foot {
  margin-top: auto; padding-top: var(--s-2);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  font-size: var(--fs-sm); font-weight: 500;
}
.card__arrow {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex: none;
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: background-color var(--dur-2) ease, color var(--dur-2) ease, transform var(--dur-2) var(--ease-out);
}
.card--surface .card__arrow { background: var(--bg-surface-alt); }
a.card { transition: background-color var(--dur-2) ease, box-shadow var(--dur-2) ease, transform var(--dur-2) var(--ease-out); }
a.card:hover { color: var(--text-primary); background: var(--bg-surface-hover); }
a.card.card--surface:hover { background: var(--bg-surface-alt); }
a.card:hover .card__arrow { background: var(--btn-bg); color: var(--btn-fg); transform: rotate(-45deg); }

/* Tinted grid: cycles the three neutral card tints so a row of cards is not one flat block */
.grid--tinted > .card:nth-child(3n + 1) { background: var(--tint-soft); }
.grid--tinted > .card:nth-child(3n + 2) { background: var(--tint-sky); }
.grid--tinted > .card:nth-child(3n) { background: var(--tint-lilac); }
.grid--tinted > a.card:hover { filter: brightness(0.97); }
[data-theme="dark"] .grid--tinted > a.card:hover { filter: brightness(1.2); }

/* Image card with the title laid over the picture */
.media-card {
  position: relative; isolation: isolate;
  display: flex; align-items: flex-end;
  min-height: clamp(280px, 28vw, 380px);
  border-radius: var(--r-lg);
  overflow: hidden;
  /* shown when there is no image, or the image fails to load */
  background: radial-gradient(110% 70% at 85% 0%, color-mix(in srgb, var(--accent) 26%, var(--ink-panel)) 0%, var(--ink-panel) 62%);
  color: #fff;
  text-decoration: none;
}
.media-card:hover { color: #fff; }
.media-card__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-3) var(--ease-out);
}
.media-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(var(--scrim-rgb), 0.92) 0%, rgba(var(--scrim-rgb), 0.5) 42%, rgba(var(--scrim-rgb), 0.05) 75%);
}
.media-card:hover .media-card__img { transform: scale(1.045); }
.media-card__body { display: grid; gap: 6px; padding: var(--s-5); width: 100%; }
.media-card__title { color: #fff; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.media-card__text { color: rgba(255, 255, 255, 0.78); font-size: var(--fs-sm); line-height: 1.45; }
.media-card__arrow {
  position: absolute; top: var(--s-4); right: var(--s-4);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color var(--dur-2) ease, color var(--dur-2) ease, transform var(--dur-2) var(--ease-out);
}
.media-card:hover .media-card__arrow { background: var(--accent); color: var(--ink-fixed); transform: rotate(-45deg); }


/* Index-style link rows */
.row-list { display: grid; border-top: 1px solid var(--border-main); }
.row-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-2);
  border-bottom: 1px solid var(--border-main);
  text-decoration: none; color: var(--text-primary);
  transition: background-color var(--dur-2) ease, padding var(--dur-2) var(--ease-out);
}
.row-link__title { display: block; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.025em; }
.row-link__text { display: block; color: var(--text-muted); font-size: var(--fs-sm); margin-top: 2px; }
.row-link > .bi-arrow-right { transition: transform var(--dur-2) var(--ease-out); }
.row-link:hover { background: var(--bg-surface-alt); padding-inline: var(--s-4); border-radius: var(--r-md); }
.row-link:hover > .bi-arrow-right { transform: translateX(4px); }

/* ============ 07 Data & lists ============ */
.stat { display: grid; gap: 6px; align-content: start; }
.stat__num {
  font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4.5rem);
  font-weight: 500; line-height: 1; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.stat__label { font-size: var(--fs-sm); color: var(--text-secondary); font-weight: 500; }
.stat-stack { gap: 0; }
.stat-stack > .stat { padding-block: var(--s-5); }
.stat-stack > .stat:first-child { padding-top: 0; }
.stat-stack > .stat:last-child { padding-bottom: 0; }
.stat-stack > .stat + .stat { border-top: 1px solid var(--border-main); }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5) var(--s-6); }
.stat-row > .stat { padding-top: var(--s-4); border-top: 1px solid var(--border-heavy); }
@media (max-width: 767px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.steps {
  display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: var(--s-5) var(--s-4);
  list-style: none; padding: 0; counter-reset: step;
}
.step {
  counter-increment: step;
  display: grid; gap: var(--s-2); align-content: start;
  padding-top: var(--s-4);
  border-top: 1px solid var(--border-heavy);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-3);
}
.step__title { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.03em; }
.step__text { color: var(--text-secondary); font-size: 0.9375rem; }
@media (max-width: 1023px) { .steps { --cols: 2; } }
@media (max-width: 539px) { .steps { --cols: 1; } }

.list-check { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.list-check > li { position: relative; padding-left: 30px; color: var(--text-secondary); }
.list-check > li::before {
  content: ""; position: absolute; left: 0; top: 0.2em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--btn-bg);
}
.list-check > li::after {
  content: ""; position: absolute; left: 6px; top: calc(0.2em + 6px);
  width: 8px; height: 5px;
  border-left: 1.5px solid var(--btn-fg); border-bottom: 1.5px solid var(--btn-fg);
  transform: rotate(-45deg);
}

/* FAQ: native <details>, one visual language everywhere */
.faq { display: grid; border-top: 1px solid var(--border-main); }
.faq__item { border-bottom: 1px solid var(--border-main); }
.faq__q {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-5);
  padding: var(--s-5) 0;
  font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.4;
  cursor: pointer; list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--border-heavy);
  background:
    linear-gradient(currentColor, currentColor) center / 8px 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 8px no-repeat;
  transition: transform var(--dur-2) var(--ease-out), background-color var(--dur-2) ease;
}
.faq__item[open] > .faq__q::after {
  transform: rotate(45deg);
  background-color: var(--accent); box-shadow: none; color: var(--ink-fixed);
}
.faq__a { padding: 0 var(--s-7) var(--s-5) 0; color: var(--text-secondary); max-width: 68ch; }
.faq__a > * + * { margin-top: 0.8em; }
@supports (interpolate-size: allow-keywords) {
  .faq__item { interpolate-size: allow-keywords; }
  .faq__item::details-content {
    block-size: 0; overflow: clip;
    transition: block-size var(--dur-2) var(--ease-out), content-visibility var(--dur-2) allow-discrete;
  }
  .faq__item[open]::details-content { block-size: auto; }
}

/* Testimonials */
.quote { gap: var(--s-4); }
.quote__text { font-size: 1.0625rem; line-height: 1.5; letter-spacing: -0.015em; color: var(--text-primary); }
.quote__person { display: flex; align-items: center; gap: var(--s-3); margin-top: auto; padding-top: var(--s-3); }
.quote__name { display: block; font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.quote__role { display: block; font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.35; }
.quote__logo { height: 24px; width: auto; object-fit: contain; }
.avatar {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border-radius: 50%; overflow: hidden;
  background: var(--bg-surface-hover); color: var(--text-primary);
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0;
}
.avatar > img { width: 100%; height: 100%; object-fit: cover; }
.stars { display: inline-flex; gap: 2px; color: var(--star); font-size: 0.8125rem; }

/* Horizontal scroller with snap + prev/next buttons (data-carousel) */
.carousel {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: min(420px, 86%);
  gap: var(--s-4);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.carousel-nav { display: flex; gap: var(--s-2); }

/* Marquee: content is rendered twice in the track */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: var(--s-3);
  width: max-content;
  animation: marquee var(--marquee-dur, 48s) linear infinite;
}
.marquee--reverse .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--s-3) / 2)); } }

.logo-chip {
  display: grid; place-items: center;
  height: 64px; padding: 0 var(--s-6);
  border-radius: var(--r-pill);
  background: var(--bg-surface-alt);
  flex: none;
}
/* a client we hold no logo for is set as its name */
.logo-chip--text { font-size: var(--fs-body); font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; color: var(--text-secondary); opacity: 0.8; }
/* partner logos are single-colour PNGs: render them in the text colour */
.logo-chip > img { height: 26px; width: auto; max-width: 150px; object-fit: contain; filter: brightness(0); opacity: 0.72; }
[data-theme="dark"] .logo-chip > img, .panel--ink .logo-chip > img { filter: brightness(0) invert(1); }

.tech-pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 10px 18px 10px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 500; font-size: 0.9375rem;
  text-decoration: none; white-space: nowrap; flex: none;
  transition: background-color var(--dur-1) ease, color var(--dur-1) ease;
}
.tech-pill > i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tint-soft); font-size: 0.875rem; }
.tech-pill:hover { background: var(--btn-bg); color: var(--btn-fg); }
.tech-pill:hover > i { background: rgba(var(--text-primary-rgb), 0.12); color: inherit; }

/* Breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--text-muted); list-style: none; padding: 0; margin: 0; }
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); opacity: 0.5; }
.crumbs [aria-current] { color: var(--text-primary); font-weight: 500; }

/* Filter bar (data-filter) */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-6); }
.filter-bar .chip { min-height: 38px; padding-inline: 16px; font-size: var(--fs-sm); }
[data-filter-item][hidden] { display: none !important; }

/* Round icon button (social links, card actions) */
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 50%;
  background: var(--bg-surface-alt); color: var(--text-primary);
  text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-1) ease, color var(--dur-1) ease;
}
.icon-btn:hover { background: var(--btn-bg); color: var(--btn-fg); }

/* Person (team member) */
.person { display: grid; gap: var(--s-3); align-content: start; }
.person__photo {
  display: grid; place-items: center;
  aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--bg-surface-alt); color: var(--text-muted);
  font-size: 2.5rem; font-weight: 500; letter-spacing: -0.04em;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-3) var(--ease-out); }
.person:hover .person__photo img { transform: scale(1.04); }
.person__name { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.person__role { font-size: var(--fs-sm); color: var(--text-muted); }
.person__links { display: flex; gap: var(--s-1); }
.person__links .icon-btn { width: 36px; height: 36px; font-size: 0.875rem; }

/* Post card (blog list) */
.post-card { display: grid; gap: var(--s-4); align-content: start; color: var(--text-primary); text-decoration: none; }
.post-card__img { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-lg); background: var(--bg-surface-alt); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-3) var(--ease-out); }
.post-card:hover .post-card__img img { transform: scale(1.04); }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); font-size: var(--fs-xs); color: var(--text-muted); }
.post-card__title { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.post-card__text { color: var(--text-secondary); font-size: 0.9375rem; }

/* Table of contents (legal pages, long articles) */
.toc { display: grid; gap: 2px; list-style: none; padding: 0; margin: 0; font-size: var(--fs-sm); }
.toc a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-secondary); text-decoration: none; }
.toc a:hover, .toc a[aria-current] { background: var(--bg-surface-alt); color: var(--text-primary); }

/* Definition-style meta list */
.meta-list { display: grid; gap: 0; margin: 0; }
.meta-list > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--border-main); }
.meta-list dt { color: var(--text-muted); font-weight: 400; font-size: var(--fs-sm); }
.meta-list dd { margin: 0; font-weight: 500; text-align: right; font-size: var(--fs-sm); }

/* ============ 08 Header & nav ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgb(var(--bg-menu-rgb));
  /* the hairline under the bar is a shadow, not a border: the bar must be exactly --header-h tall,
     or the first band (pulled up by that much) leaves a strip of page background above it */
  box-shadow: 0 1px 0 transparent;
  transition: background-color var(--dur-2) ease, box-shadow var(--dur-2) ease, color var(--dur-2) ease;
  view-transition-name: site-header;
}
/* app.js adds .on-ink while a dark band sits under the bar: a solid black strip */
.site-header.on-ink { background: var(--ink-panel); }
/* At the very top of a page the bar is see-through, so the first band's artwork runs up behind it.
   It turns solid as soon as the page scrolls (.is-scrolled, app.js) or a menu opens. */
.site-header:not(.is-scrolled):not(:has(.nav__item.is-open, .mobile-nav:not([hidden]))) { background: transparent; }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--border-light); }
.site-header.on-ink .logo-light-mode { display: none; }
.site-header.on-ink .logo-dark-mode { display: block; }
/* the page slides under the bar; the first band adds the bar's height back */
.page { margin-top: calc(var(--header-h) * -1); }
.page > .panel:first-child:not(.page-hero) { padding-top: calc(var(--pad-panel-y) + var(--header-h)); }
.site-header__bar {
  position: relative;
  display: flex; align-items: center; gap: var(--s-4);
  height: var(--header-h);
}
.site-header__logo { display: flex; align-items: center; flex: none; }
.site-header__logo img { height: 24px; width: auto; }
.logo-dark-mode { display: none; }
[data-theme="dark"] .logo-dark-mode { display: block; }
[data-theme="dark"] .logo-light-mode { display: none; }

.nav { margin-left: var(--s-7); margin-right: auto; }
.nav__list { display: flex; align-items: center; gap: 36px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--header-h); padding: 0;
  font-size: 0.875rem; font-weight: 400;
  color: var(--text-secondary); text-decoration: none;
  background: transparent; border: 0; cursor: pointer;
  transition: color var(--dur-1) ease;
}
.nav__link > .bi-chevron-down { font-size: 0.6875rem; opacity: 0.6; transition: transform var(--dur-2) var(--ease-out); }
.nav__link:hover, .nav__item.is-open > .nav__link, .nav__link[aria-current="page"] { color: var(--text-primary); }
.nav__item.is-open > .nav__link > .bi-chevron-down { transform: rotate(180deg); }
.nav__item--drop { position: relative; }

/* Mega menu: spans the bar; opened by hover, focus or click (app.js) */
.mega, .menu {
  position: absolute; top: 100%; z-index: 2;
  border-radius: var(--r-xl);
  background: var(--bg-surface);
  box-shadow: inset 0 0 0 1px var(--border-light), var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity var(--dur-2) ease, transform var(--dur-2) ease, visibility 0s linear var(--dur-2);      /* leaving: short and quiet */
}
.mega { left: 0; right: 0; padding: var(--s-3); display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s-3); }
@media (max-width: 1359px) { .mega { grid-template-columns: 216px minmax(0, 1fr); } }      /* room for the longest service names on one line */
.menu { left: 0; min-width: 220px; padding: var(--s-2); border-radius: var(--r-lg); list-style: none; margin: 0; }
.mega::before, .menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav__item.is-open > .mega, .nav__item.is-open > .menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity var(--dur-menu) var(--ease-soft), transform var(--dur-menu) var(--ease-soft), visibility 0s;
}
/* the content follows the panel in, one block after the other */
.nav__item.is-open > .mega > *, .nav__item.is-open > .menu > * { animation: menu-in var(--dur-menu) var(--ease-soft) 60ms both; }
.nav__item.is-open > .mega > :nth-child(2) { animation-delay: 120ms; }
@keyframes menu-in { from { opacity: 0; transform: translateY(8px); } }
/* moving from one open menu to the next (app.js): the panels swap in place, only the content eases in */
.site-header.is-switching .mega, .site-header.is-switching .menu { transition: none; }
.mega__intro {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  min-height: 260px;
}
.mega__title { font-size: 1.625rem; font-weight: 500; line-height: 1.08; letter-spacing: var(--tracking-display); color: var(--text-primary); }
.mega__intro p { font-size: var(--fs-sm); color: var(--text-secondary); }
.mega__intro .btn { margin-top: auto; align-self: flex-start; }
.mega__body { display: grid; grid-template-columns: repeat(var(--groups, 1), minmax(0, auto)); gap: var(--s-5); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-2); align-content: start; }
.mega__group { min-width: 0; }
.mega__group-title { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); padding: 0 10px var(--s-2); letter-spacing: 0; }
.mega__links { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 2px; }
.mega__link, .menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  font-size: 0.875rem; font-weight: 500; line-height: 1.25;
  color: var(--text-primary); text-decoration: none;
  transition: background-color var(--dur-1) ease;
}
.menu a { padding: 10px 12px; }
.mega__link:hover, .menu a:hover { background: var(--bg-surface-alt); }
.mega__link .icon-tile { transition: background-color var(--dur-1) ease, color var(--dur-1) ease; }
.mega__link:hover .icon-tile { background: var(--btn-bg); color: var(--btn-fg); }

.site-header__tools { display: flex; align-items: center; gap: var(--s-2); flex: none; }
.theme-toggle-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--text-primary); cursor: pointer;
  transition: background-color var(--dur-1) ease, transform var(--dur-2) var(--ease-out);
}
.theme-toggle-btn:hover { background: var(--bg-surface-alt); }
.theme-toggle-btn:active { transform: rotate(30deg); }
.theme-toggle-btn .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle-btn .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle-btn .moon-icon { display: none; }

.site-header__burger {
  display: none; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--bg-surface-alt); color: var(--text-primary); cursor: pointer;
}
.site-header__burger span, .site-header__burger span::before, .site-header__burger span::after {
  display: block; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1) ease;
}
.site-header__burger span { position: relative; }
.site-header__burger span::before, .site-header__burger span::after { content: ""; position: absolute; left: 0; }
.site-header__burger span::before { top: -6px; }
.site-header__burger span::after { top: 6px; }
.site-header__burger[aria-expanded="true"] span { background: transparent; }
.site-header__burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.site-header__burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Mobile sheet */
.mobile-nav {
  position: absolute; left: var(--pad-panel-x); right: var(--pad-panel-x); top: calc(100% + 8px);
  max-height: calc(100dvh - var(--header-h) - 40px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: var(--s-3);
  border-radius: var(--r-xl);
  background: var(--bg-surface);
  box-shadow: inset 0 0 0 1px var(--border-light), var(--shadow-2);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav__group { border-bottom: 1px solid var(--border-light); }
.mobile-nav__group > summary, .mobile-nav__link {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 0 var(--s-3);
  font-size: 1.25rem; font-weight: 500; letter-spacing: -0.03em;
  color: var(--text-primary); text-decoration: none;
  cursor: pointer; list-style: none;
}
.mobile-nav__link { border-bottom: 1px solid var(--border-light); }
.mobile-nav__group > summary::-webkit-details-marker { display: none; }
.mobile-nav__group > summary > i { font-size: 0.875rem; transition: transform var(--dur-2) var(--ease-out); }
.mobile-nav__group[open] > summary > i { transform: rotate(180deg); }
.mobile-nav__sub { list-style: none; margin: 0; padding: 0 0 var(--s-3); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.mobile-nav__sub a { display: block; padding: 10px var(--s-3); border-radius: var(--r-sm); font-size: 0.9375rem; color: var(--text-secondary); text-decoration: none; }
.mobile-nav__sub a:hover { background: var(--bg-surface-alt); color: var(--text-primary); }
.mobile-nav__sub .mobile-nav__label { grid-column: 1 / -1; padding: var(--s-3) var(--s-3) var(--s-1); font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.mobile-nav__foot { display: flex; padding: var(--s-4) var(--s-2) var(--s-1); }
.mobile-nav__foot .btn { flex: 1; }

@media (max-width: 1099px) {
  .nav, .site-header__tools .btn { display: none; }
  .site-header__tools { margin-left: auto; }
  .site-header__burger { display: grid; }
}
@media (min-width: 1100px) { .mobile-nav { display: none !important; } }

/* ============ 09 Hero & page hero ============ */
/* Home hero: black, the brand mark in points inside a fan of rays on the left (canvas, app.js), text on the right.
   The art starts under the header bar, so the bar stays a clean black strip. */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 0; border-top: 0; }
.hero__art { position: absolute; inset: 0; z-index: -1; }      /* runs up behind the see-through bar */
.hero__art canvas { display: block; width: 100%; height: 100%; }
.js .hero__art { animation: art-in 1.8s ease 0.5s both; }      /* the headline lands first, the artwork follows */
@keyframes art-in { from { opacity: 0; } }
.hero__art::after {      /* fade the art into the band below */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(to bottom, rgba(var(--ink-rgb), 0) 0, rgba(var(--ink-rgb), 0.94) 96px, var(--ink-panel) 100%);
}
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: min(900px, 100dvh);
  padding: calc(var(--header-h) + 24px) max(var(--pad-panel-x), calc((100% - var(--content-max)) / 2)) clamp(48px, 6vw, 96px);
}
.hero__text { grid-column: 2; display: grid; align-content: center; justify-items: start; gap: var(--s-5); }
.hero__title { line-height: 1; }
.hero__rule { position: relative; margin-top: var(--s-6); width: calc(100% + max(var(--pad-panel-x), (100vw - var(--content-max)) / 2)); height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.14)); transform-origin: left; animation: rule-draw 1.4s var(--ease-out) 0.5s both; }
@keyframes rule-draw { from { transform: scaleX(0); } }
/* the marker rides a full-width track that app.js slides with a transform, so it never costs layout */
.hero__marker { position: absolute; left: 0; top: 0; width: 100%; height: 0; transform: translateX(30%); }
.hero__rule span { position: absolute; left: -3.5px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: #ffffff; box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.9); }
.hero__rule em { position: absolute; left: 0; bottom: 10px; transform: translateX(-50%); font-style: normal; font-size: var(--fs-xs); font-weight: 400; color: var(--text-secondary); white-space: nowrap; }
/* while points stream along the rule (app.js), the travelling marker gives way to the stream's own labels */
.hero__rule span, .hero__rule em { transition: opacity var(--dur-2) ease; }
.hero__rule.is-streaming span, .hero__rule.is-streaming em { opacity: 0; }
.hero__lead { max-width: 38rem; font-size: 1.08rem; line-height: 1.5; color: var(--text-faded); }
.hero__lead strong { color: var(--text-primary); font-weight: 400; }
@media (max-width: 899px) {
  .hero__art { position: relative; inset: auto; height: 300px; z-index: 0; margin-top: var(--header-h); }
  .hero__inner { grid-template-columns: 1fr; min-height: 0; padding-top: var(--s-5); }
  .hero__text { grid-column: 1; }
  .hero__rule { width: 100%; }
}

/* Dot grid: the texture behind visuals */
.dot-grid::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--text-primary-rgb), 0.16) 1px, transparent 1.3px) 0 0 / 16px 16px;
}

/* Stat strip: big numbers in cells divided by hairlines, directly under a hero */
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border-main); border-bottom: 1px solid var(--border-main); }
.stat-strip > * { position: relative; overflow: hidden; display: grid; gap: var(--s-2); align-content: center; padding: clamp(24px, 3vw, 40px) clamp(20px, 3.4vw, 48px); border-left: 1px solid var(--border-main); }
.stat-strip > :first-child { border-left: 0; }
.stat-strip .stat__num { font-size: clamp(2rem, 1.3rem + 2vw, 2.75rem); letter-spacing: -0.03em; }
.stat-strip > *::before {      /* the glint */
  content: ""; position: absolute; top: 0; left: 0; width: 34%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.9), transparent);
  animation: stat-run 5.2s var(--ease-out) infinite; animation-delay: calc(var(--i, 0) * 1.3s);
}
@keyframes stat-run { 0% { opacity: 0; transform: translateX(-100%); } 12%, 88% { opacity: 1; } 100% { opacity: 0; transform: translateX(340%); } }
.stat-strip .stat__label { font-size: var(--fs-xs); font-weight: 400; color: var(--text-muted); }
@media (max-width: 767px) {
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip > :nth-child(odd) { border-left: 0; }
  .stat-strip > :nth-child(n + 3) { border-top: 1px solid var(--border-main); }
}
/* Trusted row: one quiet line, the logo marquee, two actions */
.trusted { display: grid; justify-items: center; gap: var(--s-6); text-align: center; }
.trusted__line { font-size: var(--fs-sm); color: var(--text-muted); }
.trusted__line strong { color: var(--text-primary); font-weight: 500; }
.trusted .marquee { width: 100%; }
.trusted .logo-chip { background: none; padding-inline: var(--s-5); }
.trusted .logo-chip > img { opacity: 0.55; }

/* Inner-page hero: every page except home opens with this */
.page-hero { display: grid; gap: clamp(28px, 4vw, 56px); padding-top: calc(var(--header-h) + clamp(24px, 3vw, 36px)); padding-bottom: clamp(48px, 6vw, 88px); overflow: hidden; isolation: isolate; border-top: 0; }
/* a fan of fine rays converging on the right edge, as in the home hero */
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  /* the apex sits well off-canvas so the lines never crowd into a moire */
  background: repeating-conic-gradient(from 250deg at 135% 50%, rgba(var(--text-primary-rgb), 0.1) 0deg 0.07deg, transparent 0.07deg 0.9deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 22%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 22%, #000 100%);
}
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
.page-hero__grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.page-hero__body { display: grid; gap: var(--s-5); align-content: start; max-width: 54rem; }
.page-hero__aside { display: grid; gap: var(--s-3); align-content: end; }
@media (max-width: 899px) {
  .page-hero__grid { grid-template-columns: 1fr; align-items: start; }
  .page-hero::before { display: none; }      /* at phone width the rays crowd into a moire */
}

/* ============ 10 CTA & footer ============ */
.cta {
  display: grid; justify-items: center; gap: var(--s-5);
  text-align: center;
  padding-block: clamp(72px, 9vw, 136px);
  overflow: hidden; isolation: isolate;
}
.cta::before, .cta::after {      /* dot fields fading in from both sides */
  content: ""; position: absolute; top: 0; bottom: 0; z-index: -1; width: 34%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.5) 1px, transparent 1.4px) 0 0 / 12px 12px;
}
.cta::before { left: 0; -webkit-mask-image: radial-gradient(ellipse 80% 60% at 0% 50%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse 80% 60% at 0% 50%, #000 0%, transparent 70%); }
.cta::after { right: 0; -webkit-mask-image: radial-gradient(ellipse 80% 60% at 100% 50%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse 80% 60% at 100% 50%, #000 0%, transparent 70%); }
.cta__title { max-width: 16ch; font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.25rem); }
.cta__text { max-width: 52ch; color: var(--text-muted); font-size: var(--fs-lead); }

/* Footer: a black band edge to edge. Link columns share hairlines (the grid's background shows through
   its 1px gaps); below them a dotted globe rises from the bottom edge with the legal row laid over it. */
.site-footer { position: relative; overflow: hidden; isolation: isolate; }
.site-footer__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--border-main); border-bottom: 1px solid var(--border-main); }
.site-footer__grid > * { display: grid; align-content: start; gap: var(--s-6); padding: 28px var(--s-5) var(--s-7); background: var(--ink-panel); }
.site-footer__globe { position: relative; z-index: -1; height: clamp(240px, 34vw, 560px); margin-top: var(--s-6); }
.site-footer__globe canvas { display: block; width: 100%; height: 100%; }
.site-footer__title { font-size: var(--fs-xs); font-weight: 400; color: var(--text-faded); margin-bottom: var(--s-4); letter-spacing: 0; }
.site-footer__links { list-style: none; padding: 0; display: grid; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-secondary); }
.site-footer__links a { color: var(--text-secondary); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--dur-2) var(--ease-out), color var(--dur-1) ease; padding-bottom: 2px; }
.site-footer__links a:hover { color: var(--text-primary); background-size: 100% 1px; }
.site-footer__social { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.site-footer__social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg-surface-alt); box-shadow: inset 0 0 0 1px var(--border-main); color: var(--text-secondary); text-decoration: none; transition: background-color var(--dur-1) ease, color var(--dur-1) ease; }
.site-footer__social a:hover { background: var(--btn-bg); color: var(--btn-fg); }
.site-footer__bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); padding: var(--s-4) var(--s-5); font-size: var(--fs-xs); color: var(--text-muted); }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.site-footer__legal a, .site-footer__legal button { padding: 0; border: 0; background: none; font: inherit; color: var(--text-muted); text-decoration: none; cursor: pointer; }
.site-footer__legal a:hover, .site-footer__legal button:hover { color: var(--text-primary); text-decoration: underline; }
@media (max-width: 1099px) {
  .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__grid > :last-child { grid-column: span 2; }
}
@media (max-width: 639px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid > * { padding: var(--s-5) var(--pad-panel-x) var(--s-6); }
  .site-footer__bottom { position: static; padding-inline: var(--pad-panel-x); }
}
@media (max-width: 539px) {
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ============ 11 Prose (CMS content) ============ */
.prose { color: var(--text-secondary); font-size: 1.0625rem; line-height: 1.65; max-width: 72ch; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1em; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem); letter-spacing: var(--tracking-display); margin-top: 1.7em; }
.prose h3 { font-size: 1.375rem; margin-top: 1.6em; }
.prose h4, .prose h5, .prose h6 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 1.5em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.6em; }
.prose strong, .prose b { color: var(--text-primary); font-weight: 600; }
.prose a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--border-heavy); text-decoration-thickness: 1.5px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding: 0; list-style: none; display: grid; gap: 0.6em; }
.prose ul > li { position: relative; padding-left: 1.75em; }
.prose ul > li::before {
  content: ""; position: absolute; left: 0.25em; top: 0.62em;
  width: 0.5em; height: 0.5em; border-radius: 50%;
  background: var(--text-brand);
}
.prose ol { counter-reset: li; }
.prose ol > li { position: relative; padding-left: 2.4em; counter-increment: li; }
.prose ol > li::before {
  content: counter(li, decimal-leading-zero); position: absolute; left: 0; top: 0.28em;
  font-size: 0.75em; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.prose li > ul, .prose li > ol { margin-top: 0.6em; }
.prose img { border-radius: var(--r-lg); }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 0.6em; }
.prose blockquote { margin: 1.6em 0; padding: var(--s-5); border-radius: var(--r-lg); background: var(--bg-surface-alt); color: var(--text-primary); font-size: 1.125rem; }
.prose code { font-size: 0.9em; padding: 0.15em 0.4em; border-radius: 6px; background: var(--bg-surface-alt); color: var(--text-primary); }
.prose pre { padding: var(--s-5); border-radius: var(--r-lg); background: var(--ink-panel); color: var(--on-ink); overflow-x: auto; font-size: var(--fs-sm); }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border-main); text-align: left; vertical-align: top; overflow-wrap: break-word; }      /* not "anywhere": columns would shrink to one letter */
.prose th { color: var(--text-primary); font-weight: 600; }
.prose iframe, .prose video { max-width: 100%; border-radius: var(--r-lg); }

/* A CMS <ul> rendered as a grid of cards (benefits, challenges, solutions) */
.prose--cards { max-width: none; font-size: 0.9375rem; line-height: 1.55; }
.prose--cards > ul { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--s-4); }
.prose--cards > ul > li { padding: var(--s-5); padding-top: calc(var(--s-5) + 36px); border-radius: var(--r-lg); background: var(--bg-surface-alt); }
.prose--cards > ul > li::before {
  left: var(--s-5); top: var(--s-5);
  width: 24px; height: 24px;
  background: var(--btn-bg);
}
.prose--cards > ul > li::after {
  content: ""; position: absolute; left: calc(var(--s-5) + 7px); top: calc(var(--s-5) + 8px);
  width: 10px; height: 6px;
  border-left: 1.5px solid var(--btn-fg); border-bottom: 1.5px solid var(--btn-fg);
  transform: rotate(-45deg);
}
.prose--cards > ul > li > strong:first-child { display: block; margin-bottom: 6px; font-size: 1.0625rem; letter-spacing: -0.02em; }

/* A CMS <ol> rendered as numbered step cards */
.prose--steps { max-width: none; font-size: 0.9375rem; line-height: 1.55; }
.prose--steps > h2, .prose--steps > h3 { font-size: var(--fs-h2); letter-spacing: var(--tracking-display); line-height: 1.04; max-width: 18ch; margin-bottom: clamp(24px, 3vw, 40px); }
.prose--steps > ol { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s-5) var(--s-4); }
.prose--steps > ol > li { padding: var(--s-4) 0 0; border-top: 1px solid var(--border-heavy); }
.prose--steps > ol > li::before { position: static; display: block; margin-bottom: var(--s-4); font-size: var(--fs-xs); }
.prose--steps > ol > li > strong:first-child { display: block; margin-bottom: 6px; font-size: 1.1875rem; font-weight: 500; letter-spacing: -0.03em; }

/* Multi-column prose for grouped lists (use cases) */
.prose--columns { max-width: none; columns: 2 320px; column-gap: clamp(24px, 4vw, 64px); }
.prose--columns > * { break-inside: avoid; }
.prose--columns > h3 { break-after: avoid; margin-top: 0; padding-top: 1.2em; }
.prose--columns > h2:first-child { display: none; }

/* ============ 12 Forms & feedback ============ */
.form-label, label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-primary); margin-bottom: 6px; }
.form-control, .form-select {
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--border-field);
  border-radius: var(--r-md);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color var(--dur-1) ease, box-shadow var(--dur-1) ease, background-color var(--dur-1) ease;
}
textarea.form-control { min-height: 140px; resize: vertical; }
.form-control::placeholder { color: var(--text-faded); opacity: 1; }
.form-control:hover, .form-select:hover { border-color: var(--text-muted); }
.form-control:focus, .form-select:focus {
  border-color: var(--text-primary);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(var(--text-primary-rgb), 0.12);
  outline: 0;
}
.form-control:disabled, .form-select:disabled { background-color: var(--bg-surface-alt); color: var(--text-muted); }
.form-control.is-invalid, .form-select.is-invalid, .was-validated .form-control:invalid { border-color: var(--danger); background-image: none; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.invalid-feedback, .errorlist, .form-error { color: var(--danger); font-size: var(--fs-sm); margin-top: 6px; }
.errorlist { list-style: none; padding: 0; }
.form-text, .helptext { color: var(--text-muted); font-size: var(--fs-xs); margin-top: 6px; }
.asteriskField { color: var(--danger); margin-left: 2px; }
.form-check-input { width: 1.15em; height: 1.15em; border-color: var(--border-field); background-color: var(--bg-surface); }
.form-check-input:checked { background-color: var(--btn-bg); border-color: var(--btn-bg); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(var(--text-primary-rgb), 0.12); border-color: var(--text-primary); }
[data-theme="dark"] .form-check-input:checked[type="checkbox"] { --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23111110' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); }
[data-theme="dark"] .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23d6d6d3' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
input[type="file"].form-control { padding: 10px 12px; }
input[type="file"]::file-selector-button { margin: -4px 12px -4px -4px; padding: 6px 14px; border: 0; border-radius: var(--r-pill); background: var(--bg-surface-alt); color: var(--text-primary); font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.form-grid > .is-full { grid-column: 1 / -1; }
@media (max-width: 639px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0; align-content: start; }

/* Messages, alerts, flash */
.alert {
  --bs-alert-bg: var(--bg-surface-alt);
  --bs-alert-color: var(--text-primary);
  --bs-alert-border-color: transparent;
  --bs-alert-border-radius: var(--r-md);
  --bs-alert-padding-x: var(--s-4);
  --bs-alert-padding-y: var(--s-3);
  display: flex; align-items: flex-start; gap: var(--s-3);
  font-size: 0.9375rem;
  margin: 0;
}
.alert-success { --bs-alert-bg: var(--tint-soft); }
.alert-danger, .alert-error { --bs-alert-bg: color-mix(in srgb, var(--danger) 12%, var(--bg-surface)); --bs-alert-color: var(--danger); }
.alert-warning { --bs-alert-bg: var(--tint-sand); }
.alert-info { --bs-alert-bg: var(--tint-sky); }
/* Messages: a dark strip that slides under the overlaid header, so the bar stays readable above it */
.flash { margin-top: calc(var(--header-h) * -1); padding: calc(var(--header-h) + var(--s-4)) 0 var(--s-4); }
.flash > .shell { display: grid; gap: var(--s-2); }
.flash + .page { margin-top: 0; }
.flash + .page > .panel:first-child:not(.page-hero) { padding-top: var(--pad-panel-y); }
.flash + .page > .page-hero { padding-top: clamp(24px, 3vw, 36px); }
.flash + .page .hero__inner { padding-top: var(--s-5); }
.flash .alert { --bs-alert-color: var(--text-primary); }      /* every message reads in the strip's own text colour */
.flash .alert { background: var(--bg-surface-alt); box-shadow: inset 0 0 0 1px var(--border-main); border-radius: var(--r-lg); }

/* Empty / error state */
.empty {
  display: grid; justify-items: center; gap: var(--s-3);
  padding: clamp(40px, 6vw, 80px) var(--s-5);
  border-radius: var(--r-lg);
  background: var(--bg-surface-alt);
  text-align: center;
}
.grid > .empty { grid-column: 1 / -1; }
.empty__title { font-size: 1.375rem; }
.empty__text { color: var(--text-muted); max-width: 44ch; }

/* Pagination */
.pagination {
  --bs-pagination-bg: transparent;
  --bs-pagination-color: var(--text-primary);
  --bs-pagination-border-width: 0;
  --bs-pagination-border-radius: var(--r-pill);
  --bs-pagination-hover-bg: var(--bg-surface-alt);
  --bs-pagination-hover-color: var(--text-primary);
  --bs-pagination-focus-bg: var(--bg-surface-alt);
  --bs-pagination-focus-color: var(--text-primary);
  --bs-pagination-focus-box-shadow: none;
  --bs-pagination-active-bg: var(--btn-bg);
  --bs-pagination-active-color: var(--btn-fg);
  --bs-pagination-disabled-bg: transparent;
  --bs-pagination-disabled-color: var(--text-faded);
  gap: var(--s-1); flex-wrap: wrap; justify-content: center; margin: 0;
}
.page-link { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: var(--r-pill) !important; font-weight: 500; font-size: 0.9375rem; }

/* Tables */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-main);
  --bs-table-striped-bg: var(--bg-surface-alt);
  --bs-table-hover-bg: var(--bg-surface-alt);
}
.table > thead th { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }

/* Bootstrap modal + accordion re-theme (used by legacy markup and crispy forms) */
.modal-content { background: var(--bg-surface); color: var(--text-primary); border: 0; border-radius: var(--r-xl); box-shadow: var(--shadow-2); }
.modal-header, .modal-footer { border-color: var(--border-main); }
.modal-backdrop { --bs-backdrop-bg: rgb(var(--scrim-rgb)); --bs-backdrop-opacity: 0.6; }
.btn-close { filter: none; }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

.badge { --bs-badge-font-weight: 500; --bs-badge-border-radius: var(--r-pill); --bs-badge-padding-x: 10px; --bs-badge-padding-y: 6px; background: var(--bg-surface-alt); color: var(--text-primary); }

/* Scroll to top */
.to-top {
  position: fixed; right: clamp(12px, 2vw, 28px); bottom: clamp(12px, 2vw, 28px); z-index: 90;
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-fg);
  box-shadow: var(--shadow-2); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--dur-2) ease, transform var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-2), background-color var(--dur-1) ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { background: var(--btn-bg-hover); }

/* ============ 13 Motion ============ */
/* Scroll reveal: only hides content when JS is running (html.js) */
.js [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="scale"] { transform: scale(0.97); }
.js [data-reveal="left"] { transform: translateX(-28px); }
.js [data-reveal="right"] { transform: translateX(28px); }
.js [data-reveal="zoom"] { transform: scale(1.08); }
.js [data-reveal="pop"] { transform: scale(0.9); transition-timing-function: ease, var(--ease-spring); }
.js [data-reveal="blur"] { transform: none; filter: blur(10px); transition: opacity var(--dur-3) ease, filter var(--dur-3) var(--ease-out); }
.js [data-reveal="blur"].is-in { filter: none; }
.js [data-reveal="wipe"] { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal="wipe"].is-in { clip-path: inset(0 0 0 0); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Cross-page fade (browsers with View Transitions; others navigate normally) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 160ms ease both; }
::view-transition-new(root) { animation: vt-in 320ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none; }
  @view-transition { navigation: none; }
}

/* ============ 14 Utilities ============ */
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.measure { max-width: 60ch; }

/* ============ 15 Page pieces ============
   Smaller components that first appeared on one group of pages. Same rules: tokens only. */

/* ---- Company: about, core values, team ---- */
/* Icon + title + description rows (hero aside lists) */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); }
.feature-list > li { display: flex; align-items: flex-start; gap: var(--s-3); }
.feature-list strong { display: block; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.feature-list span:not(.icon-tile) { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.45; }

/* Column-count variants that keep the shared mobile breakpoints */
@media (min-width: 1024px) { .steps--3 { --cols: 3; } }
@media (min-width: 768px) { .stat-row--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Tabs: a .chips row of role="tab" buttons switching role="tabpanel" blocks */
.tabs__list { margin-bottom: var(--s-6); }
.tabs__list .chip { min-height: 40px; padding-inline: 18px; font-size: var(--fs-sm); background: var(--bg-surface); }
.tabs__list .chip[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.tabs__panel:not([hidden]) { animation: tab-in var(--dur-3) var(--ease-out); }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px); } }

/* Person card details beyond the shared .person */
.person__bio { font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.5; }
.person__photo--initials { background: var(--tint-soft); color: var(--text-primary); }

/* People grids stay two-up on phones so the page does not become one long column of portraits */
@media (max-width: 639px) {
  .grid--people { --cols: 2; gap: var(--s-5) var(--s-3); }
  .grid--people .person__name { font-size: 1rem; }
}

/* ---- Catalog: services, case studies, FAQ ---- */
/* Full-bleed cover image inside a flush panel */
.cover { margin: 0; }
.cover > img { width: 100%; max-height: 620px; object-fit: cover; }

/* Rich text pasted into the CMS: drop inline font/colour overrides so it follows the theme */
.prose--clean [style] {
  font-size: inherit !important;
  font-family: inherit !important;
  color: inherit !important;
  background-color: transparent !important;
}

/* Filter bar that scrolls sideways on small screens instead of wrapping into many rows */
@media (max-width: 639px) {
  .filter-bar--scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(var(--pad-panel-x) * -1);
    padding-inline: var(--pad-panel-x);
  }
  .filter-bar--scroll::-webkit-scrollbar { display: none; }
  .filter-bar--scroll > .chip { flex: none; }
}

/* FAQ topics: chips stacked in the sticky column, one topic shown at a time */
.faq-topics { margin-bottom: 0; }
.faq-topic > .h3 { margin-bottom: var(--s-4); }
.faq-topic + .faq-topic { margin-top: var(--s-7); }

/* ---- Forms, careers, legal, 404 ---- */
/* Icon + text row ("why join" list; the contact page's direct lines put one in each cell of a .cell-grid) */
.info-list { display: grid; border-top: 1px solid var(--border-main); }
.info-item { display: flex; align-items: flex-start; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--border-main); }
.cell-grid > .info-item { padding: var(--s-5); border-bottom: 0; }
.info-item__title { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); letter-spacing: 0; line-height: 1.4; }
.info-item__value { font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.02em; color: var(--text-primary); }
.info-item__value a { text-decoration: none; }
.info-item__value a:hover { text-decoration: underline; }
.info-item__text { font-size: var(--fs-sm); color: var(--text-muted); }
.info-item--lg .info-item__value { font-size: 1.1875rem; }
.info-item--lg .info-item__text { color: var(--text-secondary); font-size: 0.9375rem; margin-top: 2px; }

/* Form card: crispy wraps each field in .mb-3; the grid gap already spaces them */
.form-card .mb-3 { margin-bottom: 0 !important; }
.form-card .invalid-feedback { display: block; }
.form-card .invalid-feedback strong { font-weight: 500; }
.form-card__note { font-size: var(--fs-xs); color: var(--text-muted); }

/* A light surface inside a dark band (the token values come from theme.css) */
.on-paper, .card.on-paper { --icon-tile-bg: initial; --icon-tile-fg: initial; background: var(--bg-surface); color: var(--text-primary); }

/* Locator: a dot map with a marker per office, over a row of local-time cells (contact page).
   The land is components/office_map.html; a marker sits at --x / --y, percentages of the map. */
.locator { container-type: inline-size; border-radius: var(--r-xl); background: var(--bg-surface-alt); box-shadow: inset 0 0 0 1px var(--border-main); overflow: hidden; }
.locator__map { position: relative; margin: var(--s-5) var(--s-4); }
.locator__land {
  display: block; width: 100%; height: auto; color: rgba(var(--text-primary-rgb), 0.2);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.locator__pin { position: absolute; left: var(--x); top: var(--y); display: flex; align-items: center; gap: var(--s-2); transform: translate(-13px, -50%); }
.locator__pin::before { content: ""; position: absolute; left: 13px; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.34), rgba(var(--accent-rgb), 0) 68%); pointer-events: none; }
.locator__dot { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; color: var(--accent); box-shadow: inset 0 0 0 1.5px currentColor; background: radial-gradient(circle, #ffffff 0 2px, currentColor 2.6px 4.6px, transparent 5.2px); }
.locator__tag { position: relative; padding: 3px 9px; border-radius: var(--r-pill); background: var(--ink-fixed); box-shadow: inset 0 0 0 1px var(--border-main); color: var(--on-ink); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
/* the cells wrap when the panel is narrow; each draws its own top and left hairline and the panel clips the outer ones */
.locator__cells { display: flex; flex-wrap: wrap; margin: 0; padding-top: 1px; overflow: hidden; }
.locator__cells > div { flex: 1 1 168px; display: grid; align-content: start; gap: 2px; padding: var(--s-4) var(--s-5) var(--s-5); box-shadow: -1px -1px 0 0 var(--border-main); }
.locator__cells dt { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); font-weight: 400; color: var(--text-muted); }
.locator__cells dt::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8); }
.locator__time { margin: 0; font-size: 1.625rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.locator__role { margin: 0; font-size: var(--fs-xs); color: var(--text-faded); }
@container (max-width: 539px) { .locator__tag { display: none; } }      /* a narrow panel has no room for labels; the cells below name the offices */

/* Five-step process on wide screens (.steps handles the smaller breakpoints) */
@media (min-width: 1024px) { .steps--5 { --cols: 5; } }

/* Job row: a .row-link with a description and an apply button */
.job-row { align-items: start; }
.job-row__meta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-2) 0; }
@media (max-width: 639px) {
  .job-row { grid-template-columns: minmax(0, 1fr); }
  .job-row > .icon-tile { display: none; }
  .job-row > .btn { justify-self: start; }
}

/* Legal pages: the contents list is a desktop aid only */
@media (max-width: 899px) { .legal-toc { display: none; } }
.legal-toc { max-height: calc(100dvh - var(--header-h) - 80px); overflow-y: auto; }

/* 404 */
/* Status pages (templates/404.html, 500.html): the code in points over the ink band, then what happened and where to go */
.error-page { min-height: min(100dvh, 880px); align-content: center; }
.error-page--bare { min-height: 100dvh; padding-top: var(--pad-panel-y); }      /* 500: no header above it */
.error-page__body { justify-items: center; text-align: center; }
.error-page__body > .stack { justify-items: center; }
.error-page__body .actions, .error-page__links { justify-content: center; }
.error-page__links { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); }
.error-page__art { display: none; width: min(100%, 22rem); height: clamp(120px, 26vw, 190px); color: var(--text-primary); cursor: crosshair; touch-action: pan-y; }
.js .error-page__art { display: block; }
.js .error-page__art + .error-code { display: none; }      /* the canvas replaces the numerals when scripts run */
.error-code { font-size: clamp(6rem, 3rem + 16vw, 14rem); font-weight: 500; line-height: 0.9; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; color: var(--text-primary); }

/* intl-tel-input inside the new inputs, both themes */
.iti {
  display: block; width: 100%;
  --iti-border-color: var(--border-field);
  --iti-dropdown-bg: var(--bg-surface);
  --iti-hover-color: var(--bg-surface-alt);
  --iti-dialcode-color: var(--text-muted);
  --iti-arrow-color: var(--text-secondary);
}
.iti__dropdown-content { border-radius: var(--r-md); box-shadow: var(--shadow-2); color: var(--text-primary); overflow: hidden; }
.iti__search-input { min-height: 44px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--border-main); background: var(--bg-surface); color: var(--text-primary); font: inherit; outline: 0; }
.iti__search-input::placeholder { color: var(--text-faded); }
.iti__country { padding-block: 10px; }
.iti__selected-country { border-radius: var(--r-md) 0 0 var(--r-md); }

/* ---- Blog ---- */
/* Cover image with an icon behind it, so a missing file still looks deliberate */
.post-card__img, .post-cover { position: relative; display: grid; place-items: center; color: var(--text-faded); font-size: 2rem; }
.post-card__img img, .post-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-cover { aspect-ratio: 21 / 9; max-height: 620px; width: 100%; }
@media (max-width: 639px) { .post-cover { aspect-ratio: 16 / 10; } }

.post-grid { row-gap: var(--s-7); }
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { text-decoration: underline; }
.post-card__meta > span, .post-meta > span { display: inline-flex; align-items: center; gap: 6px; }

/* Byline row under the article title */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); font-size: var(--fs-sm); color: var(--text-secondary); }
.post-meta .avatar { width: 32px; height: 32px; font-size: var(--fs-xs); background: var(--btn-bg); color: var(--btn-fg); }

.post-lead { font-size: var(--fs-lead); color: var(--text-primary); }
.post-lead > * + * { margin-top: 1em; }

/* Sidebar category list with counts */
.toc--counts a { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }

/* Comments */
.comment-list { display: grid; list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border-main); }
.comment { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-2) var(--s-3); padding: var(--s-5) 0; border-bottom: 1px solid var(--border-main); }
.comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); }
.comment__name { font-weight: 600; font-size: 0.9375rem; }
.comment__date { font-size: var(--fs-xs); color: var(--text-muted); }
.comment__text { color: var(--text-secondary); overflow-wrap: anywhere; }
.comment__replies { grid-column: 2; list-style: none; margin: var(--s-3) 0 0; padding: 0 0 0 var(--s-4); border-left: 2px solid var(--border-main); }
.comment__replies .comment { padding: var(--s-3) 0; border-bottom: 0; }

/* Placeholder: what a media frame shows when it has no image, or its image fails to load. The template or
   app.js puts .is-imageless on the frame: the ink surface with its point of light, a field of points and
   the brand mark, so an empty frame still reads as designed. */
.is-imageless { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(110% 70% at 85% 0%, color-mix(in srgb, var(--accent) 26%, var(--ink-panel)) 0%, var(--ink-panel) 62%); }
.is-imageless > img, .is-imageless > i { display: none; }
.is-imageless::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3e%3cmask id='c'%3e%3crect width='56' height='56' rx='13' fill='white'/%3e%3cpath d='M46 16.5H22a5.5 5.5 0 0 0-5.5 5.5v12a5.5 5.5 0 0 0 5.5 5.5h24' fill='none' stroke='black' stroke-width='7'/%3e%3c/mask%3e%3crect width='56' height='56' fill='white' fill-opacity='.46' mask='url(%23c)'/%3e%3c/svg%3e") center 40% / clamp(44px, 9%, 76px) no-repeat,
    radial-gradient(circle, rgba(255, 255, 255, 0.2) 1px, transparent 1.5px) center / 16px 16px;
  -webkit-mask-image: radial-gradient(80% 90% at 50% 40%, #000 15%, transparent 100%); mask-image: radial-gradient(80% 90% at 50% 40%, #000 15%, transparent 100%);
}
/* a full-width cover with nothing to show is dropped altogether */
.cover.is-imageless, .post-cover.is-imageless { display: none; }

/* ---- Service and industry page blocks (components/sections/) ---- */
.section-head .lead > * + * { margin-top: 0.75em; }
.section-outro { margin-top: var(--s-6); }
.feature > .link-arrow { align-self: flex-start; margin-top: auto; }
.grid-heading { margin: var(--s-6) 0 var(--s-4); }
.section-head + .grid-heading { margin-top: 0; }

/* ============ 16 Section patterns ============
   Larger layouts used by the home page and reusable elsewhere. */

/* Section heading with the lead in a right-hand column */
.section-head--aside { max-width: none; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(24px, 5vw, 80px); align-items: end; }
.section-head--aside > :first-child { display: grid; gap: var(--s-4); }
.section-head--aside > :last-child { display: grid; gap: var(--s-4); justify-items: start; }
@media (max-width: 899px) { .section-head--aside { grid-template-columns: 1fr; row-gap: var(--s-5); } }

/* Cell grid: cells sharing hairline borders, like a table of cards */
.cell-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 1px; background: var(--border-main); box-shadow: 0 0 0 1px var(--border-main); }
.cell-grid > * { border-radius: 0; box-shadow: none; background: var(--bg-surface); }
.cell-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }      /* an odd last cell spans the row */
@media (min-width: 1100px) { .cell-grid--4 { --cols: 4; } }
@media (max-width: 767px) { .cell-grid { --cols: 1; } }

/* Feature cell: label, title, text, then a visual with the action bottom-right */
.feature { position: relative; display: flex; flex-direction: column; gap: var(--s-3); padding: clamp(20px, 2.6vw, 36px); color: var(--text-primary); text-decoration: none; transition: background-color var(--dur-2) ease; }
.feature__title { max-width: 22ch; font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; }
.feature__text { max-width: 44ch; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.55; }
.feature__visual { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; height: 208px; margin-top: var(--s-5); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--border-light); }
.feature__visual .icon-tile { width: 72px; height: 72px; border-radius: var(--r-xl); font-size: 2rem; transition: transform var(--dur-3) var(--ease-out); }
.feature__index { position: absolute; top: var(--s-3); left: var(--s-4); font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-faded); }
.feature__cta { position: absolute; right: var(--s-3); bottom: var(--s-3); }
a.feature:hover { color: var(--text-primary); background: var(--bg-surface-alt); }
a.feature:hover .feature__visual .icon-tile { transform: scale(1.08); }
a.feature:hover .feature__cta > i { transform: translateX(3px); }

/* Chapter: a word drawn in particles (canvas, app.js) beside a short statement */
.chapter { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 80px); align-items: center; margin-bottom: clamp(32px, 5vw, 72px); }
.chapter canvas { display: block; width: 100%; height: 174px; color: var(--text-primary); cursor: crosshair; touch-action: pan-y; }
.chapter__text { max-width: 26rem; font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); line-height: 1.35; letter-spacing: -0.01em; color: var(--text-secondary); }
@media (max-width: 767px) { .chapter { grid-template-columns: 1fr; gap: var(--s-4); } .chapter canvas { height: 110px; } }

/* Numbered accordion list (native details) */
.acc-list { display: grid; border-top: 1px solid var(--border-main); counter-reset: acc; }
.acc-list__item { border-bottom: 1px solid var(--border-main); counter-increment: acc; }
.acc-list__item > summary { display: flex; align-items: baseline; gap: var(--s-5); padding: var(--s-4) 0; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); font-weight: 500; letter-spacing: -0.02em; color: var(--text-faded); cursor: pointer; list-style: none; transition: color var(--dur-2) ease; }
.acc-list__item > summary::-webkit-details-marker { display: none; }
.acc-list__item > summary::before { content: counter(acc, decimal-leading-zero); font-size: 0.6875rem; font-weight: 400; letter-spacing: 0; color: var(--text-faded); font-variant-numeric: tabular-nums; }
.acc-list__item > summary:hover, .acc-list__item[open] > summary { color: var(--text-primary); }
.acc-list__body { display: grid; gap: var(--s-3); justify-items: start; padding: 0 0 var(--s-5) calc(var(--s-5) + 1.2em); color: var(--text-muted); font-size: var(--fs-sm); max-width: 34rem; }
@supports (interpolate-size: allow-keywords) {
  .acc-list__item { interpolate-size: allow-keywords; }
  .acc-list__item::details-content { block-size: 0; overflow: clip; transition: block-size var(--dur-2) var(--ease-out), content-visibility var(--dur-2) allow-discrete; }
  .acc-list__item[open]::details-content { block-size: auto; }
}
/* A framed canvas (globe) used beside a list */
.orb { position: relative; overflow: hidden; min-height: 360px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--border-main); background: rgba(var(--ink-rgb), 0.35); }
.orb canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Stripes: horizontal rules thinning out, bridging a dark band into a light one */
.stripes { height: 168px; background: var(--bg-body);
  background-image: repeating-linear-gradient(to bottom, var(--ink-panel) 0 9px, transparent 9px 14px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.9) 30%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.9) 30%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
}
.stripes-wrap { background: var(--bg-body); }

/* Dock: the floating call to action that follows the reader down the page */
.dock {
  position: fixed; left: 50%; bottom: clamp(12px, 2vw, 24px); z-index: 80;
  display: flex; align-items: center; gap: 2px; padding: 5px;
  border-radius: var(--r-pill);
  background: rgba(var(--ink-rgb), 0.96); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), var(--shadow-2);
  transform: translate(-50%, 140%); opacity: 0; visibility: hidden;
  transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2) ease, visibility 0s linear var(--dur-3);
}
.dock.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }
.dock .btn--ghost { --bs-btn-hover-bg: rgba(255, 255, 255, 0.1); }

/* Pipeline: a file travels a beam of light through the stages (canvas, app.js).
   The stage list underneath is the real content; app.js lights the stage the file has reached. */
.pipeline canvas { display: block; width: 100%; height: clamp(200px, 22vw, 300px); }
.pipeline__stages { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border-main); }
.pipeline__stage { display: grid; gap: var(--s-2); align-content: start; justify-items: center; padding: var(--s-5) var(--s-4) 0; text-align: center; border-left: 1px solid var(--border-main); transition: opacity var(--dur-3) ease; }
.pipeline__stage:first-child { border-left: 0; }
.pipeline.is-live .pipeline__stage { opacity: 0.45; }
.pipeline.is-live .pipeline__stage.is-active { opacity: 1; }
.pipeline__num { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-faded); }
.pipeline__name { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.015em; }
.pipeline__text { max-width: 26ch; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.55; }
@media (max-width: 767px) {
  .pipeline__stages { --cols: 2; row-gap: var(--s-5); }
  .pipeline__stage:nth-child(odd) { border-left: 0; }
}

/* Roadmap screen: phases as bars on a grid, each joined to its note by a leader line.
   Bars, lines and notes draw in sequence when the screen scrolls into view (.is-in from data-reveal). */
.roadmap { border-radius: var(--r-lg); background: var(--bg-surface-alt); box-shadow: inset 0 0 0 1px var(--border-main); overflow: hidden; }
.roadmap__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 14px var(--s-5); border-bottom: 1px solid var(--border-main); font-size: 0.9375rem; font-weight: 500; }
.roadmap__bar small { margin-left: var(--s-2); color: var(--text-muted); font-size: var(--fs-xs); font-weight: 400; }
.roadmap__legend { display: flex; gap: var(--s-4); font-size: var(--fs-xs); font-weight: 400; color: var(--text-muted); }
.roadmap__legend span { display: inline-flex; align-items: center; gap: 6px; }
.roadmap__legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border-heavy); }
.roadmap__legend i.is-mark { background: var(--btn-bg); box-shadow: none; }
.roadmap__grid {
  position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); row-gap: 10px; padding-bottom: var(--s-5);
  background: repeating-linear-gradient(to right, transparent 0 calc(100% / var(--n) - 1px), var(--border-light) calc(100% / var(--n) - 1px) calc(100% / var(--n)));
}
.roadmap__col { grid-row: 1; padding: 10px var(--s-4); margin-bottom: var(--s-2); border-bottom: 1px solid var(--border-main); font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-faded); }
.roadmap__lane { display: contents; }
.roadmap__item {
  grid-row: calc(var(--row) + 1); grid-column: var(--at) / span var(--span, 2);
  position: relative; z-index: 2; display: flex; align-items: center; gap: var(--s-2);
  min-height: 40px; margin-inline: 6px; padding: 0 14px;
  border-radius: var(--r-md); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border-main);
  font-size: var(--fs-sm); font-weight: 500; line-height: 1.2;
}
.roadmap__item::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--text-primary); }
.roadmap__item--mark { background: var(--btn-bg); color: var(--btn-fg); box-shadow: none; }
.roadmap__item--mark::before { background: var(--accent); }
.roadmap__note {
  grid-row: calc(var(--row) + 1); grid-column: calc(var(--at) + var(--span, 2)) / -1;
  position: relative; z-index: 2; align-self: center; margin: 0; padding: 0 var(--s-4) 0 52px;
  color: var(--text-muted); font-size: var(--fs-xs); line-height: 1.45;
}
.roadmap__note::before { content: ""; position: absolute; left: 0; top: 50%; width: 40px; height: 1px; background: var(--text-primary); transform-origin: left; }
.roadmap__note::after { content: ""; position: absolute; left: 38px; top: calc(50% - 3px); width: 7px; height: 7px; border-radius: 50%; background: var(--text-primary); }
.roadmap__note--left { grid-column: 1 / var(--at); padding: 0 52px 0 var(--s-4); text-align: right; }
.roadmap__note--left::before { left: auto; right: 0; transform-origin: right; }
.roadmap__note--left::after { left: auto; right: 38px; }
.roadmap__marker { grid-column: var(--at); grid-row: 1 / span var(--rows); justify-self: start; position: relative; z-index: 1; width: 1px; background: var(--border-heavy); pointer-events: none; }
.roadmap__marker::before { content: attr(data-label); position: absolute; top: 7px; left: 50%; transform: translateX(-50%); padding: 2px 9px; border-radius: var(--r-pill); background: var(--text-primary); color: var(--bg-surface); font-size: 0.6875rem; font-weight: 500; white-space: nowrap; }
.js .roadmap .roadmap__item { opacity: 0; transform: translateX(-10px); transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); transition-delay: calc(var(--row) * 240ms); }
.js .roadmap .roadmap__note { opacity: 0; transition: opacity var(--dur-3) ease; transition-delay: calc(var(--row) * 240ms + 360ms); }
.js .roadmap .roadmap__note::before { transform: scaleX(0); transition: transform var(--dur-3) var(--ease-out); transition-delay: calc(var(--row) * 240ms + 180ms); }
.js .roadmap.is-in .roadmap__item { opacity: 1; transform: none; }
.js .roadmap.is-in .roadmap__note { opacity: 1; }
.js .roadmap.is-in .roadmap__note::before { transform: none; }
@media (max-width: 899px) {
  .roadmap__grid { display: block; padding: var(--s-4); background: none; }
  .roadmap__col, .roadmap__marker, .roadmap__legend { display: none; }
  .roadmap__lane { display: block; }
  .roadmap__lane + .roadmap__lane { margin-top: var(--s-4); }
  .roadmap__item { margin: 0; }
  .roadmap__note, .roadmap__note--left { margin-top: var(--s-2); padding: 0 0 0 var(--s-4); text-align: left; border-left: 1px solid var(--border-heavy); }
  .roadmap__note::before, .roadmap__note::after { display: none; }
}

/* Vortex: a funnel of light filling the right of a page hero, with its levels listed beside it (canvas, app.js).
   .vortex is not positioned above phone width, so the canvas is laid out against the hero band. */
.page-hero:has(.vortex) { grid-template-rows: auto 1fr; min-height: clamp(620px, 56vw, 840px); }
.page-hero:has(.vortex)::before { display: none; }
.vortex { align-self: end; }
@media (min-width: 900px) {      /* an even split, so the text column stays clear of the funnel */
  .page-hero__grid:has(> .vortex) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
.vortex canvas { position: absolute; z-index: -1; top: 0; right: 0; left: 30%; width: 70%; height: 100%; }
.vortex__levels { display: grid; gap: clamp(22px, 2.8vw, 36px); width: min(264px, 100%); margin: 0 0 clamp(28px, 5vw, 76px) auto; }
.vortex__levels > div { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s-4); align-items: baseline; color: var(--text-muted); transition: color var(--dur-2) ease; }
.vortex__levels > div::before { content: ""; position: absolute; right: calc(100% + var(--s-4)); top: 0.7em; width: 22px; height: 1px; background: var(--border-heavy); transition: width var(--dur-2) ease, background-color var(--dur-2) ease; }
.vortex__levels > .is-active { color: var(--text-primary); }
.vortex__levels > .is-active::before { width: 36px; background: var(--accent); }
.vortex__levels dt { font-size: var(--fs-body); font-weight: 400; }
.vortex__levels dt a { text-decoration: none; }
.vortex__levels dt a:hover { text-decoration: underline; }
.vortex__levels dd { margin: 0; font-size: var(--fs-body); }
.vortex__levels .vortex__note { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--text-faded); transition: color var(--dur-2) ease; }
.vortex__levels > .is-active .vortex__note { color: var(--text-brand); }
@media (max-width: 1099px) { .vortex__levels { width: min(232px, 100%); } }
@media (max-width: 899px) {      /* the funnel becomes a block of its own and the list drops below it */
  .page-hero:has(.vortex) { min-height: 0; }
  .vortex { position: relative; }
  .vortex canvas { position: relative; z-index: auto; top: auto; left: auto; display: block; width: 100%; height: 400px; }
  .vortex__levels { width: 100%; margin: var(--s-5) 0 0; gap: var(--s-4); }
  .vortex__levels > div::before { display: none; }
}

/* Bento: a 12-column grid of tiles of different widths */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-3); }
.bento__tile {
  position: relative; overflow: hidden;
  display: grid; gap: var(--s-5); align-content: space-between;
  grid-column: span 12; min-height: 280px;
  padding: clamp(20px, 2.4vw, 32px);
  border-radius: var(--r-lg);
  background: var(--bg-surface-alt); color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-main);
}
.bento__tile--5 { grid-column: span 5; }
.bento__tile--7 { grid-column: span 7; }
.bento__tile--split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: stretch; align-content: stretch; }
.bento__copy { display: grid; gap: var(--s-3); align-content: start; }
.bento__title { font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); font-weight: 500; letter-spacing: var(--tracking-heading); line-height: 1.1; }
.bento__text { color: var(--text-secondary); font-size: 0.9375rem; max-width: 46ch; }
.bento__visual { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: 180px; padding: var(--s-5); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--border-light); }
@media (max-width: 899px) {
  .bento__tile--5, .bento__tile--7 { grid-column: span 12; }
  .bento__tile--split { grid-template-columns: 1fr; }
}
/* small visuals used inside bento tiles */
.stack-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); max-width: 420px; margin: 0; padding: 0; list-style: none; }
.stack-chips .chip { font-family: var(--font-mono); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border-main); }
.checks { display: grid; gap: var(--s-2); width: min(100%, 300px); padding: 0; margin: 0; list-style: none; }
.checks li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 10px 14px; border-radius: var(--r-sm); background: var(--bg-surface-alt); font-size: var(--fs-sm); font-weight: 500; }
.checks i { color: var(--text-brand); }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: var(--s-2); width: min(100%, 320px); height: 140px; }
.bars span { border-radius: 6px 6px 2px 2px; background: var(--border-main); transform-origin: bottom; }
.bars span:nth-last-child(-n + 2) { background: var(--btn-bg); }
.js .bars span { transform: scaleY(0); transition: transform var(--dur-3) var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms + 150ms); }
.js .is-in .bars span, .js .bars.is-in span { transform: none; }

/* Case feature: one study presented large, text beside the picture */
.case-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.case-feature__media { aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: radial-gradient(110% 70% at 85% 0%, color-mix(in srgb, var(--accent) 26%, var(--ink-panel)) 0%, var(--ink-panel) 62%); }
.case-feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-3) var(--ease-out); }
.case-feature:hover .case-feature__media img { transform: scale(1.03); }
@media (max-width: 899px) { .case-feature { grid-template-columns: 1fr; } .case-feature__media { order: -1; } }

/* ============ 17 Motion details ============
   Small moving parts measured from the reference: shimmer, pulse, scan, word-by-word focus,
   the auto-advancing list, and the illustrations inside feature cells. */

/* Loader: the brand mark on the ink band while the first page of a visit loads. base.html puts .is-loading on
   <html> before first paint; app.js adds .is-loaded when the page is ready, and the cover fades away. */
.loader { display: none; }
.is-loading .loader { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: var(--s-5); background: var(--ink-panel); transition: opacity var(--dur-menu) ease, visibility 0s linear var(--dur-menu); }
.is-loading.is-loaded .loader { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__mark { position: relative; width: 56px; height: 56px; border-radius: 13px; background: var(--text-primary); animation: loader-pulse 1.6s ease-in-out infinite; }
.loader__mark::after { content: ""; position: absolute; inset: 13px 10px 13px 13px; border: 7px solid var(--ink-panel); border-right: 0; border-radius: 9px 0 0 9px; }      /* the C, cut out of the tile */
.loader__bar { width: 120px; height: 2px; overflow: hidden; border-radius: var(--r-pill, 2px); background: var(--border-heavy); }
.loader__bar::after { content: ""; display: block; width: 40%; height: 100%; background: var(--accent); animation: loader-slide 1.1s var(--ease-soft) infinite; }
@keyframes loader-pulse { 50% { opacity: 0.55; } }
@keyframes loader-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Page progress: a line across the top from the moment a link is followed until the next page arrives (app.js) */
.page-progress { position: fixed; top: 0; left: 0; z-index: 1001; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; opacity: 0; pointer-events: none; }
.page-progress.is-active { opacity: 1; transform: scaleX(0.85); transition: transform 8s cubic-bezier(0.1, 0.7, 0.1, 1), opacity var(--dur-1) ease; }

/* Shimmer: a soft band of light crossing the primary call to action */
.btn--shine { position: relative; overflow: hidden; isolation: isolate; }
.btn--shine::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(var(--accent-rgb), 0.45) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* Ping: a ring pulsing out of a live point */
.ping { position: relative; }
.ping::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 1px currentColor; animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { opacity: 0.85; transform: scale(0.6); } to { opacity: 0; transform: scale(2.8); } }

/* Scan: a band of light passing down a framed visual */
.scan::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 30%, rgba(var(--accent-rgb), 0.07) 49%, rgba(var(--accent-rgb), 0.2) 50%, transparent 51%) 0 -40% / 100% 60% no-repeat;
  animation: scan 5.5s linear infinite;
}
@keyframes scan { to { background-position: 0 260%; } }

/* Words that come into focus one by one as the block scrolls up (app.js sets .is-on) */
[data-words] .w { transition: opacity 0.5s ease, filter 0.6s var(--ease-out); }
.js [data-words] .w:not(.is-on) { opacity: 0.22; filter: blur(5px); }

/* Auto-advancing accordion: the open row carries a progress line; the panel beside it follows */
.acc-list__item { position: relative; }
.acc-list__item[open]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.acc-list.is-auto .acc-list__item[open]::after { animation: acc-progress var(--acc-dur, 6s) linear forwards; }
@keyframes acc-progress { to { transform: scaleX(1); } }
.acc-list__item[open] > summary::before { color: var(--text-brand); }
.orb__head { position: absolute; left: var(--s-5); right: var(--s-5); top: var(--s-5); z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); }
.orb__index { display: block; margin-bottom: var(--s-2); font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-faded); }
.orb__title { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.015em; }
.orb__title.is-swap { animation: orb-swap var(--dur-3) var(--ease-out); }
@keyframes orb-swap { from { opacity: 0; transform: translateY(10px); } }

/* Vignettes: small line illustrations inside feature cells. One per kind of work.
   Strokes draw in and marks pop when the cell is revealed. */
.vignette { width: min(100%, 320px); height: auto; overflow: visible; color: var(--text-primary); }
.vignette .v-line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.vignette .v-soft { fill: none; stroke: var(--border-heavy); stroke-width: 1; }
.vignette .v-fill { fill: currentColor; }
.vignette .v-mute { fill: var(--border-heavy); }
.vignette .v-accent { fill: var(--accent); }
.vignette .v-accent-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.vignette text { fill: var(--text-muted); font-family: var(--font-mono); font-size: 9px; }
.js .vignette .v-draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease-out); transition-delay: calc(var(--i, 0) * 120ms + 200ms); }
.js .is-in .vignette .v-draw { stroke-dashoffset: 0; }
.js .vignette .v-pop { opacity: 0; transform: scale(0.4); transform-box: fill-box; transform-origin: center; transition: opacity 0.4s ease, transform 0.75s var(--ease-spring); transition-delay: calc(var(--i, 0) * 110ms + 350ms); }
.js .is-in .vignette .v-pop { opacity: 1; transform: none; }
.js .vignette .v-rise { transform: scaleY(0); transform-box: fill-box; transform-origin: bottom; transition: transform 0.9s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms + 250ms); }
.js .is-in .vignette .v-rise { transform: none; }
.vignette .v-sweep { transform-box: fill-box; transform-origin: 0 100%; animation: v-spin 6s linear infinite; }
@keyframes v-spin { to { transform: rotate(360deg); } }
.vignette .v-blink { animation: v-blink 1.2s ease-in-out infinite; }
@keyframes v-blink { 50% { opacity: 0.25; } }

/* Dock: the brand mark at the left edge of the pill */
.dock__mark { display: grid; place-items: center; width: 34px; height: 34px; margin-right: 2px; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.dock__mark img { width: 20px; height: 20px; object-fit: cover; object-position: left; }
