/* ==========================================================================
   Combination Technologies - the final site (Version 1 "refined", extended for round 3)
   site.css: the one shared stylesheet. Documented in DESIGN-SYSTEM.md; the markup is in notes/COMPONENTS.md.
   Frame-owned (F1): page builders never edit it; they ask (notes/requests/).

   0. Fonts        4. Layout (wrap, grid, sections)
   1. Tokens       5. Components (Version 1's, changed, and the shared new ones N1 to N24)
   2. Reset, base  6. Utilities
   3. Type         7. Motion   8. Forced colours   9. Print

   Breakpoints (em, so they follow the reader's text size):
     phone    below 48em     (768 px)
     tablet   48em to 68.74em
     desktop  68.75em and up (1100 px): the 12-column grid, rails, accordions, sizes
     header   its own switch at 64em (1024 px), plus 24em and 22.5em for the phone bar (vision §2.3, A3 X1)
   ========================================================================== */

@layer reset, base, layout, components, story, line, page, utilities;

/* ---------- 0. Fonts (self-hosted; nothing is loaded from another site) ---------- */
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Maven Pro";
  src: url("/assets/fonts/maven-pro-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
/* A stand-in with Manrope's proportions, so text does not jump when the real font arrives. */
@font-face {
  font-family: "Manrope Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 104%; ascent-override: 102%; descent-override: 29%; line-gap-override: 0%;
}

/* ---------- 1. Tokens ---------- */
:root {
  /* type families */
  --font-sans: "Manrope", "Manrope Fallback", system-ui, "Segoe UI", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --font-logo: "Maven Pro", "Manrope", "Manrope Fallback", sans-serif;

  /* type scale: fluid between 390 px and 1440 px wide */
  --fs-display: clamp(2rem, 10.2vw, 5.5rem);                 /* 32 to 88: hero headline */
  --fs-h1: clamp(2rem, 1.257rem + 3.05vw, 4rem);             /* 32 to 64: statements, page titles */
  --fs-cta: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);             /* 32 to 56: footer call to action */
  --fs-h2: clamp(1.5rem, 1.129rem + 1.52vw, 2.5rem);         /* 24 to 40: large sentences, display lines */
  --fs-h3: clamp(1.25rem, 1.064rem + 0.76vw, 1.75rem);       /* 20 to 28: item titles */
  --fs-h4: clamp(1.125rem, 1.079rem + 0.19vw, 1.25rem);      /* 18 to 20: card titles, questions */
  --fs-lead: clamp(1.125rem, 1.032rem + 0.38vw, 1.375rem);   /* 18 to 22 */
  --fs-body: clamp(1.0625rem, 1.04rem + 0.1vw, 1.125rem);    /* 17 to 18 */
  --fs-small: clamp(0.9375rem, 0.914rem + 0.1vw, 1rem);      /* 15 to 16 */
  --fs-mono: 0.75rem;                                        /* 12: the instrument layer */

  --lh-tight: 1.04; --lh-heading: 1.14; --lh-snug: 1.28; --lh-body: 1.6;
  --ls-display: -0.035em; --ls-h1: -0.028em; --ls-h2: -0.022em; --ls-h3: -0.015em; --ls-mono: 0.06em;
  --w-body: 450; --w-medium: 500; --w-strong: 600; --w-bold: 700;

  /* colour: black, white and three greys, each with one job */
  --ink: #0a0a0a;        /* text, buttons, the footer band, the ink band */
  --ink-2: #585858;      /* secondary text: 7.2:1 on white */
  --ink-3: #6b6b6b;      /* instrument layer text: 5.3:1 on white, 4.8:1 on --surface */
  --line: #d9d9d9;       /* hairlines */
  --surface: #f4f4f4;    /* figure backgrounds, quiet panels, the logo band */
  --paper: #ffffff;      /* the page */
  --inv-ink: #ffffff;    /* text on black */
  --inv-ink-2: #a6a6a6;  /* secondary text on black: 8.3:1 */
  --inv-line: #3a3a3a;   /* hairlines on black */
  --focus: var(--ink);   /* the focus ring; --inv-ink on black (footer, ink band, [data-theme=dark]). Never currentColor. */

  /* space: one scale */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem; --s-10: 8rem;
  --section-gap: clamp(4.5rem, 2.6rem + 7.6vw, 9rem);        /* 72 to 144 between sections */
  --block-gap: clamp(1.5rem, 1rem + 2vw, 3rem);              /* 24 to 48 between a section head and its content */
  --band-pad: clamp(4rem, 2.6rem + 3.8vw, 6rem);             /* 64 to 96: top and bottom of an ink band (N8) */

  /* grid: 12 columns */
  --margin: clamp(1.25rem, 5.556vw, 5rem);                   /* 20 to 80 */
  --gutter: clamp(1rem, 0.63rem + 1vw, 1.5rem);              /* 16 to 24 */
  --page-max: 87.5rem;                                       /* 1400 */
  --measure: 40rem;                                          /* longest comfortable line of body text */
  --header-h: 4rem;                                          /* 3.5rem below 48em */
  --nav-gap: var(--s-6);                                     /* desktop menu links; --s-5 just above the switch */

  /* shape and lines */
  --radius: 4px;         /* controls only; pictures and panels are square */
  --hair: 1px;

  /* motion */
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 320ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.6, 0, 0.2, 1);

  /* icons (used as masks, so they take the text colour) */
  --icon-arrow-ne: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13.667 1.583H4a.75.75 0 0 0 0 1.5h7.856L1.803 13.136a.75.75 0 0 0 1.061 1.061L12.917 4.144V12a.75.75 0 0 0 1.5 0V2.333a.75.75 0 0 0-.75-.75Z'/%3E%3C/svg%3E");
  --icon-arrow-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8h12M9.5 3.5 14 8l-4.5 4.5'/%3E%3C/svg%3E");
  --icon-arrow-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 8H2M6.5 3.5 2 8l4.5 4.5'/%3E%3C/svg%3E");
  --icon-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 5.75 5 5 5-5'/%3E%3C/svg%3E");
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 8.5 3.5 3.5 7.5-8'/%3E%3C/svg%3E");
  --icon-pause: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 3h2.5v10H4zM9.5 3H12v10H9.5z'/%3E%3C/svg%3E");
  --icon-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 2.5v11l9-5.5z'/%3E%3C/svg%3E");
  --icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='m3 3 10 10M13 3 3 13'/%3E%3C/svg%3E");
}
@media (max-width: 47.99em) { :root { --header-h: 3.5rem; } }
/* just above the header's switch the six links need the smaller gap to fit (measured, DESIGN-SYSTEM.md 2.2) */
@media (min-width: 64em) and (max-width: 71.99em) { :root { --nav-gap: var(--s-5); } }
/* dark blocks: the focus ring turns white */
.site-footer, .band--ink, [data-theme="dark"] { --focus: var(--inv-ink); }

/* ---------- 2. Reset and base ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul, address { margin: 0; }
  ol, ul { padding: 0; }
  ul[class], ol[class] { list-style: none; }
  h1, h2, h3, h4, h5, h6 { font: inherit; }
  img, picture, video, svg, iframe { display: block; max-width: 100%; }
  img, video { height: auto; }
  picture { display: contents; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { border: 0; padding: 0; background: none; cursor: pointer; }
  a { color: inherit; }
  address { font-style: normal; }
  /* hidden="until-found" (closed accordion answers, set by site.js) must stay findable: never display: none */
  [hidden]:not([hidden="until-found"]) { display: none !important; }
}

@layer base {
  html {
    color-scheme: light;
    scroll-padding-top: calc(var(--header-h) + var(--hair) + var(--s-5));   /* anchors land 24 px under the header */
    -webkit-tap-highlight-color: transparent;
  }
  /* no smooth scrolling anywhere: every jump is instant (vision §2.5, §7.1) */
  body {
    background: var(--paper);
    color: var(--ink);
    font: var(--w-body) var(--fs-body) / var(--lh-body) var(--font-sans);
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  main { flex: 1 0 auto; }
  main:focus { outline: 0; }
  ::selection { background: var(--ink); color: var(--paper); }
  b, strong { font-weight: var(--w-bold); }
  h1, h2, h3, h4 { text-wrap: balance; }
  p, li { text-wrap: pretty; }

  /* The one focus ring (vision §3.3 rule 10): 2 px in --focus, set off from the element. */
  :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

  a { text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: text-decoration-color var(--dur-2); }

  /* the root scroll lock while the menu dialog is open (the one exception to rule 14, A3 X17). The gutter keeps the
     scrollbar's room while it is locked, so nothing shifts; it is set only then, so full-bleed bands always reach the
     window's edge (a permanent gutter left a blank strip beside them where scrollbars are hidden). */
  html:has(dialog.menu[open]) { overflow: hidden; scrollbar-gutter: stable; }
}

/* ---------- 3. Type ---------- */
@layer base {
  .display { font: var(--w-bold) var(--fs-display) / var(--lh-tight) var(--font-sans); letter-spacing: var(--ls-display); }
  .h1 { font: var(--w-medium) var(--fs-h1) / 1.1 var(--font-sans); letter-spacing: var(--ls-h1); }
  .h2 { font: var(--w-medium) var(--fs-h2) / 1.22 var(--font-sans); letter-spacing: var(--ls-h2); }
  .h3 { font: var(--w-strong) var(--fs-h3) / var(--lh-snug) var(--font-sans); letter-spacing: var(--ls-h3); }
  .h4 { font: var(--w-strong) var(--fs-h4) / 1.35 var(--font-sans); letter-spacing: -0.01em; }
  .lead { font-size: var(--fs-lead); line-height: 1.5; }
  .small { font-size: var(--fs-small); }
  .muted { color: var(--ink-2); }

  /* The instrument layer: small monospace capitals for numbers, captions, counts and metadata. Never for sentences. */
  .mono {
    font: 500 var(--fs-mono) / 1.4 var(--font-mono);
    letter-spacing: var(--ls-mono);
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    color: var(--ink-3);
  }

  /* N5: a display line under a section head (not a heading), and its optional lead on the column 5 axis */
  .lede {
    font: var(--w-medium) var(--fs-h2) / 1.2 var(--font-sans); letter-spacing: var(--ls-h2);
    color: var(--ink); text-wrap: balance; max-width: 22em;
  }
  .lede-lead { margin-top: var(--s-5); font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }
  :where(.lede, .lede-lead) + :where(:not(.lede-lead)) { margin-top: var(--block-gap); }

  /* Running text: paragraphs, lists and links inside any text block. */
  .prose { max-width: var(--measure); }
  .prose > * + * { margin-top: 1em; }
  .prose a { text-decoration: underline; text-decoration-color: var(--ink-3); }
  .prose a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
  .prose a.link { text-decoration-color: transparent; }
  .prose a.link:hover { text-decoration-color: currentColor; text-decoration-thickness: 1px; }
  .prose ul, .prose ol { padding: 0; list-style: none; display: grid; gap: 0.7em; }
  .prose li { position: relative; padding-left: 2em; }
  .prose ul.checks > li::before {          /* the tick lists of the FAQ */
    content: ""; position: absolute; left: 0.15em; top: 0.38em; width: 1em; height: 1em;
    background: currentColor; mask: var(--icon-check) center / contain no-repeat; -webkit-mask: var(--icon-check) center / contain no-repeat;
  }
  .prose ol { counter-reset: n; }
  .prose ol > li { counter-increment: n; }
  .prose ol > li::before {                 /* "1)" to "5)" as on the current site, set in the monospace */
    content: counter(n) ")"; position: absolute; left: 0; top: 0.32em;
    font: 500 var(--fs-mono) / 1.4 var(--font-mono); letter-spacing: var(--ls-mono); color: var(--ink-3); font-variant-numeric: tabular-nums;
  }
}

/* ---------- 4. Layout ---------- */
@layer layout {
  /* The page column: side margins of 20 to 80 px, never wider than 1400 px. */
  .wrap { width: min(100% - 2 * var(--margin), var(--page-max)); margin-inline: auto; }

  /* The 12-column grid. Children choose their columns with .span-N and .start-N (desktop only). */
  .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
  .grid > * { grid-column: 1 / -1; }
  @media (min-width: 68.75em) {
    .span-3 { grid-column-end: span 3; } .span-4 { grid-column-end: span 4; } .span-5 { grid-column-end: span 5; }
    .span-6 { grid-column-end: span 6; } .span-7 { grid-column-end: span 7; } .span-8 { grid-column-end: span 8; }
    .span-9 { grid-column-end: span 9; }
    .start-1 { grid-column-start: 1; } .start-5 { grid-column-start: 5; } .start-7 { grid-column-start: 7; } .start-9 { grid-column-start: 9; }
    /* any block on the column 5 axis without a grid parent: (100% + gutter) / 3 is exactly where column 5 starts */
    .axis-5 { margin-left: calc((100% + var(--gutter)) / 3); }
    .lede-lead { margin-left: calc((100% + var(--gutter)) / 3); }
  }

  /* Vertical rhythm: every section is a .section; the gap between sections is one token. */
  .section { margin-top: var(--section-gap); }
  .section > .section-head + * { margin-top: var(--block-gap); }
  .section > .section-head--flush + * { margin-top: 0; }
  main > :last-child { margin-bottom: var(--section-gap); }
}

/* ---------- 5. Components ---------- */
@layer components {

  /* --- 5.1 Skip link (inside the header region since the hand-over) --- */
  .skip {
    position: absolute; left: var(--margin); top: 0; z-index: 100; translate: 0 -120%;
    padding: 0.7rem 1rem; background: var(--ink); color: var(--paper); border-radius: 0 0 var(--radius) var(--radius);
    font-weight: var(--w-strong); font-size: var(--fs-small); text-decoration: none;
  }
  .skip:focus { translate: 0 0; outline-offset: 2px; }

  /* --- 5.2 Icon (a mask, so it takes the text colour) --- */
  .icon {
    display: inline-block; flex: none; width: 1em; height: 1em; background: currentColor;
    mask: var(--icon) center / contain no-repeat; -webkit-mask: var(--icon) center / contain no-repeat;
  }
  .icon--ne { --icon: var(--icon-arrow-ne); width: 0.85em; height: 0.85em; }
  .icon--right { --icon: var(--icon-arrow-right); }
  .icon--left { --icon: var(--icon-arrow-left); }
  .icon--up { --icon: var(--icon-arrow-left); rotate: 90deg; }
  .icon--down { --icon: var(--icon-chevron-down); }
  .icon--pause { --icon: var(--icon-pause); }
  .icon--play { --icon: var(--icon-play); }
  .icon--close { --icon: var(--icon-close); }

  /* --- 5.3 Button --- */
  .btn {
    --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink);
    display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
    min-height: 3rem; padding: 0.7rem 1.4rem;
    background: var(--btn-bg); color: var(--btn-fg); border: var(--hair) solid var(--btn-bd); border-radius: var(--radius);
    font: var(--w-strong) 1rem / 1.2 var(--font-sans); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), scale var(--dur-1) var(--ease-out);
  }
  .btn .icon { transition: translate var(--dur-2) var(--ease-out); }
  .btn:hover { --btn-bg: var(--paper); --btn-fg: var(--ink); }
  .btn:hover .icon--ne { translate: 2px -2px; }
  .btn:hover .icon--right { translate: 3px 0; }
  .btn:active { scale: 0.975; }
  .btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); }
  .btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: var(--paper); }
  .btn--inverse { --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-bd: var(--paper); }
  .btn--inverse:hover { --btn-bg: transparent; --btn-fg: var(--paper); }
  .btn--sm { min-height: 2.5rem; padding: 0.45rem 1rem; font-size: 0.9375rem; }
  .btn--lg { min-height: 3.5rem; padding: 0.9rem 1.75rem; font-size: 1.0625rem; }

  /* --- 5.4 Text link with an arrow ("Learn More", "See the shop →") --- */
  .link {
    display: inline-flex; align-items: center; gap: 0.5em; min-height: 2.75rem;
    font-weight: var(--w-strong); font-size: var(--fs-small); text-decoration: underline; text-decoration-color: transparent;
  }
  .link .icon { transition: translate var(--dur-2) var(--ease-out); }
  a.link:hover, :is(a, article):hover > .link, .card:hover .link { text-decoration-color: currentColor; }
  a.link:hover .icon, .card:hover .link .icon { translate: 4px 0; }

  /* --- 5.5 Logo: the C mark stands for the first letter of the wordmark --- */
  .logo { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); text-decoration: none; }
  .logo__mark { width: 1.875rem; height: 1.875rem; margin-right: 1px; filter: contrast(1.25) brightness(0.86); }
  .logo__word { font: 600 1.625rem / 1 var(--font-logo); letter-spacing: 0.075em; translate: 0 0.02em; }
  .logo--inverse { color: var(--inv-ink); }
  .logo--inverse .logo__mark { filter: none; }
  @media (max-width: 47.99em) {
    .logo__mark { width: 1.5rem; height: 1.5rem; }
    .logo__word { font-size: 1.25rem; }
  }

  /* --- 5.6 Site header (N1 bar): sticky, white, never hides or shrinks ---
     Desktop bar from 64em: logo, the six links, Book a call. Below 64em: logo, Menu, Book a call (always last). */
  .site-header {
    position: sticky; top: 0; z-index: 50; background: var(--paper);
    border-bottom: var(--hair) solid transparent; transition: border-color var(--dur-2);
  }
  .site-header[data-scrolled] { border-bottom-color: var(--line); }
  .site-header__bar, .menu__bar { display: flex; align-items: center; gap: var(--s-2); height: var(--header-h); }
  .site-header__bar > .logo, .menu__bar > .logo { margin-right: auto; }
  @media (min-width: 48em) { .site-header__bar, .menu__bar { gap: var(--s-3); } }

  /* the header's own logo sizes on phones (vision §2.3): Version 1's from 48em; 1.125rem; 1rem; the C alone */
  @media (max-width: 47.99em) {
    :is(.site-header__bar, .menu__bar) .logo__word { font-size: 1.125rem; }
    :is(.site-header__bar, .menu__bar) .logo__mark { width: 1.35rem; height: 1.35rem; }
  }
  @media (max-width: 23.99em) {
    :is(.site-header__bar, .menu__bar) .logo__word { font-size: 1rem; }
    :is(.site-header__bar, .menu__bar) .logo__mark { width: 1.2rem; height: 1.2rem; }
  }
  @media (max-width: 22.49em) {
    :is(.site-header__bar, .menu__bar) .logo__word { display: none; }
    :is(.site-header__bar, .menu__bar) .logo__mark { width: 1.5rem; height: 1.5rem; }
  }

  /* Book a call: the bar's one button, at every width */
  .site-header__cta { flex: none; }
  @media (pointer: coarse) { .site-header__cta { min-height: 2.75rem; } }
  @media (max-width: 23.99em) { .site-header__cta { padding-inline: 0.75rem; } }

  /* the desktop menu */
  .site-nav { display: none; }
  .site-nav__list { display: flex; align-items: center; gap: var(--nav-gap); }
  .site-nav__list > li { display: flex; align-items: center; }
  .site-nav__list > li > a, .nav-services {
    position: relative; display: inline-flex; align-items: center; min-height: 2.75rem;
    font: var(--w-medium) 1rem / 1.2 var(--font-sans); color: var(--ink); text-decoration: none; white-space: nowrap;
  }
  .site-nav__list > li > a::after, .nav-services::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0.55rem; height: 1.5px; background: currentColor;
    scale: 0 1; transform-origin: 0 50%; transition: scale var(--dur-2) var(--ease-out);
  }
  .site-nav__list > li > a:hover::after, .site-nav__list > li > a[aria-current="page"]::after,
  .nav-services:hover::after, .nav-services.is-current::after { scale: 1 1; }
  @media (min-width: 64em) {
    .site-nav { display: block; }
    .site-header__bar { gap: var(--nav-gap); }
  }

  /* N1 the Services dropdown: a disclosure (button and list of links), opened by click only.
     The chevron shows from the first paint when JavaScript runs, so the upgrade to a button never moves anything. */
  .js .nav-services::before {
    content: ""; order: 2; flex: none; width: 0.625rem; height: 0.625rem; margin-left: 0.375rem; background: currentColor;
    mask: var(--icon-chevron-down) center / contain no-repeat; -webkit-mask: var(--icon-chevron-down) center / contain no-repeat;
    transition: rotate var(--dur-2) var(--ease-out);
  }
  .js .nav-services::after { right: 1rem; }                 /* the underline stops before the chevron */
  .nav-services[aria-expanded="true"]::before { rotate: 180deg; }
  .site-nav__services { position: relative; height: 2.75rem; }
  /* the panel hangs from the header's bottom line (the li is centred in the bar) and slides out from behind it */
  .services-panel {
    position: absolute; z-index: 1; top: calc(100% + (var(--header-h) - 2.75rem) / 2); left: -1.5rem;
    width: 30rem; max-width: calc(100vw - 2 * var(--margin)); overflow: clip;
  }
  .js .services-panel { display: none; }
  .js .site-nav__services.is-open .services-panel { display: block; }
  .services-panel__in { background: var(--paper); border: var(--hair) solid var(--line); border-top-color: var(--ink); }
  .services-panel__list > li + li { border-top: var(--hair) solid var(--line); }
  .services-panel__link {
    display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 1rem; align-items: start;
    min-height: 4.25rem; padding: 0.875rem 1.5rem; color: var(--ink); text-decoration: none; border-radius: 0;
  }
  .services-panel__no { padding-top: 0.28rem; color: var(--ink-3); transition: color var(--dur-2); }
  .services-panel__text { display: grid; gap: 0.125rem; }
  .services-panel__name {
    font: var(--w-strong) 1rem / 1.35 var(--font-sans);
    text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
    transition: text-decoration-color var(--dur-2);
  }
  .services-panel__line { font: var(--w-body) 0.9375rem / 1.45 var(--font-sans); color: var(--ink-2); }
  .services-panel__link .icon { align-self: center; opacity: 0; translate: -4px 0; transition: opacity var(--dur-2), translate var(--dur-2) var(--ease-out); }
  .services-panel__link--page .icon { opacity: 1; translate: 0 0; }
  .services-panel__link:is(:hover, :focus-visible, [aria-current="page"]) .services-panel__no { color: var(--ink); }
  .services-panel__link:hover .services-panel__name { text-decoration-color: currentColor; }
  .services-panel__link:is(:hover, :focus-visible) .icon { opacity: 1; translate: 0 0; }
  .services-panel__link[aria-current="page"] .services-panel__name { font-weight: var(--w-bold); }
  .services-panel__all {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
    min-height: 3rem; padding: 0.75rem 1.5rem 0.75rem 4rem; border-top: var(--hair) solid var(--line);
    font: var(--w-strong) 0.9375rem / 1.35 var(--font-sans); color: var(--ink); text-decoration: underline; text-decoration-color: transparent;
  }
  .services-panel__all:hover { text-decoration-color: currentColor; }
  .services-panel__all .icon { transition: translate var(--dur-2) var(--ease-out); }
  .services-panel__all:hover .icon { translate: 4px 0; }
  .services-panel :focus-visible { outline-offset: -4px; border-radius: 0; }   /* the ring drawn 2 px inside the link */
  @media (prefers-reduced-motion: no-preference) {
    .js .services-panel { transition: display var(--dur-1) allow-discrete; }
    .js .site-nav__services.is-open .services-panel { transition-duration: var(--dur-2); }
    .services-panel__in { opacity: 0; translate: 0 -6px; transition: opacity var(--dur-1) var(--ease-out), translate var(--dur-1) var(--ease-out); }
    .site-nav__services.is-open .services-panel__in { opacity: 1; translate: 0 0; transition-duration: var(--dur-2); }
    @starting-style { .site-nav__services.is-open .services-panel__in { opacity: 0; translate: 0 -6px; } }
  }

  /* Menu (phones and tablets): a button with JavaScript, a link to the footer's navigation without it.
     Both labels sit in one grid cell, so the button has one width whether it says Menu or Close. */
  .menu-btn {
    display: none; position: relative; place-items: center; flex: none;
    min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.5rem; border-radius: var(--radius);
    font: var(--w-strong) 1rem / 1 var(--font-sans); color: var(--ink); text-decoration: none;
  }
  .menu-btn__label, .menu-btn__ghost { grid-area: 1 / 1; }
  .menu-btn__ghost { visibility: hidden; }
  @media (max-width: 63.99em) {
    .js .menu-btn--js, .no-js .menu-btn--nojs, .js.no-dialog .menu-btn--nojs { display: inline-grid; }
    .js.no-dialog .menu-btn--js { display: none; }
  }
  @media (max-width: 23.99em) { .menu-btn { padding-inline: 0.25rem; } }
  .menu__bar .menu-btn { display: inline-grid; }

  /* the hairline under the bar turns black from the left as the page is read (not on Home; scroll timeline only) */
  .site-header__progress { display: none; }
  @supports (animation-timeline: scroll()) {
    .site-header__progress {
      display: block; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink);
      transform-origin: 0 50%; scale: 0 1; animation: progress linear both; animation-timeline: scroll(root block);
    }
  }
  .scroll-sentinel { position: absolute; top: 8px; left: 0; width: 1px; height: 1px; pointer-events: none; visibility: hidden; }

  /* --- 5.6b N2 The menu dialog: Version 3's native modal dialog, drawn in Version 1's look --- */
  .menu {
    position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
    margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .menu[open] { display: flex; flex-direction: column; }
  .menu::backdrop { background: transparent; }
  .menu__top { flex: none; border-bottom: var(--hair) solid var(--line); }
  .menu__nav { flex: 1 0 auto; padding-top: var(--s-5); }
  .menu__list { border-top: var(--hair) solid var(--ink); }
  .menu__list > li { border-bottom: var(--hair) solid var(--line); }
  .menu__link, .menu__label {
    display: flex; align-items: center; min-height: 3.5rem; padding-block: 0.5rem;
    font: var(--w-medium) 1.5rem / 1.2 var(--font-sans); letter-spacing: var(--ls-h2); text-decoration: none;
  }
  .menu__no { flex: none; width: 2rem; }
  .menu__link[aria-current="page"] { font-weight: var(--w-bold); }
  .menu__link[aria-current="page"] .menu__no { color: var(--ink); }
  .menu__label { color: var(--ink-3); }
  .menu__sub { padding-left: 2rem; }
  .menu__sub > li { border-top: var(--hair) solid var(--line); }
  .menu__sublink {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; column-gap: var(--s-4);
    min-height: 3.5rem; padding-block: 0.625rem; text-decoration: none;
  }
  .menu__subname { font: var(--w-strong) 1.0625rem / 1.3 var(--font-sans); }
  .menu__subline { grid-column: 1; font-size: var(--fs-small); line-height: 1.4; color: var(--ink-2); }
  .menu__sublink .icon { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .menu__sublink[aria-current="page"] .menu__subname { font-weight: var(--w-bold); }
  .menu__foot { display: grid; gap: var(--s-3); padding-block: var(--s-6) calc(var(--s-5) + env(safe-area-inset-bottom, 0px)); }
  .menu__foot .btn { width: 100%; }
  .menu__mail {
    display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
    font-size: var(--fs-small); color: var(--ink-2); overflow-wrap: anywhere; text-decoration: none;
  }
  .menu__mail:hover { color: var(--ink); text-decoration: underline; }
  @media (prefers-reduced-motion: no-preference) {
    .menu { opacity: 0; transition: opacity 160ms linear, overlay 160ms allow-discrete, display 160ms allow-discrete; }
    .menu[open] { opacity: 1; }
    @starting-style { .menu[open] { opacity: 0; } }
  }

  /* --- 5.7 Section head: a number and a label sitting on a full-width rule (the site's own device) --- */
  .section-head {
    display: flex; align-items: center; gap: var(--s-4); min-height: 3.25rem; padding-bottom: 0.25rem;
    border-bottom: var(--hair) solid var(--ink);
  }
  .section-head__no { width: 2.25rem; flex: none; }
  .section-head__label { font: var(--w-medium) 1.125rem / 1.3 var(--font-sans); letter-spacing: -0.005em; }
  .section-head__aside { margin-left: auto; display: flex; align-items: center; gap: var(--s-4); }
  .section-head--inverse { border-bottom-color: var(--inv-line); }
  .section-head--inverse .mono { color: var(--inv-ink-2); }
  @media (max-width: 47.99em) {
    .section-head { gap: var(--s-3); }
    .section-head__no { width: 1.75rem; }
    .section-head__label { white-space: nowrap; }
    .section-head__aside { gap: var(--s-3); }
  }
  @media (max-width: 23.99em) { .section-head .rail-nav__count { display: none; } }

  /* --- 5.8 Figure: a picture in a frame with a monospace caption --- */
  .fig { display: grid; gap: 0.625rem; }
  .fig__frame {
    position: relative; overflow: hidden; background: var(--surface);
    aspect-ratio: var(--ratio, 3 / 2);
  }
  .fig__frame img, .fig__frame video {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: var(--pos, 50% 50%);
    scale: var(--zoom, 1); transform-origin: var(--pos, 50% 50%);
  }
  /* a "plate": renders, drawings and cut-out product shots are shown whole on the grey surface */
  .fig--plate .fig__frame img {
    inset: 6%; width: 88%; height: 88%; object-fit: contain; object-position: 50% 50%; scale: 1;
    mix-blend-mode: multiply;   /* a white background takes the colour of the surface */
  }
  .fig__cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
  .fig__cap b { font-weight: 500; color: var(--ink); }
  /* a credit that wraps onto a second line stays on the right of the caption row (vision 8.4; Fb-02) */
  .fig__cap > :last-child:not(:first-child) { margin-left: auto; }

  /* N9 wide figure: across the column, 16:9 (or --ratio-desk), 4:3 on phones (or --ratio-phone) */
  .fig--wide .fig__frame { --ratio: var(--ratio-desk, 16 / 9); }
  .fig--wide.fig--3x2 .fig__frame { --ratio-desk: 3 / 2; }          /* the photo of Darius and Yousef: 3:2, its own 4:3 on phones */
  @media (max-width: 47.99em) { .fig--wide .fig__frame { --ratio: var(--ratio-phone, 4 / 3); } }
  /* N9 split: text cols 1-6, figure cols 8-12 on desktop; stacked, text first, below */
  .split { display: grid; gap: var(--s-7) var(--gutter); align-items: start; }
  @media (min-width: 68.75em) {
    .split { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .split__text { grid-column: 1 / span 6; }
    .split__fig { grid-column: 8 / span 5; }
  }

  /* N14 framed video: 16:9, 3:4 on phones; a <picture> poster under the video, hidden once it plays */
  .fig--video .fig__frame { --ratio: 16 / 9; background: var(--ink); }
  @media (max-width: 47.99em) { .fig--video .fig__frame { --ratio: 3 / 4; } }
  .fig__frame video { z-index: 1; }
  .reel__poster img { z-index: 0; }
  [data-reel].has-played .reel__poster img { visibility: hidden; }

  /* --- 5.9 Hero (Home) --- */
  .hero { padding-top: clamp(1.75rem, 4.2vw, 3.75rem); }
  .hero__kicker {                                     /* N5: one mono line above the hero title (Home only) */
    margin-bottom: var(--s-4);
    font: 500 var(--fs-mono) / 1.4 var(--font-mono); letter-spacing: var(--ls-mono); text-transform: uppercase;
    color: var(--ink-3); text-wrap: balance;
  }
  .hero__title { font: var(--w-bold) var(--fs-display) / 1.02 var(--font-sans); letter-spacing: var(--ls-display); text-wrap: wrap; }
  .hero__title span { display: block; }
  .hero__body { margin-top: clamp(1.5rem, 3.4vw, 3rem); display: grid; gap: var(--s-6) var(--gutter); }
  .hero__side { display: flex; flex-direction: column; gap: var(--s-6); }
  .hero__actions, .actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }   /* a row of buttons: primary first */
  .hero__reel { --ratio: 16 / 9; }
  .hero__reel .fig__frame { max-height: max(15rem, 100svh - 23.5rem); width: 100%; }
  .hero .index { display: none; }
  @media (min-width: 68.75em) {
    .hero__body { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .hero__side { grid-column: 1 / span 4; justify-content: space-between; }
    .hero__reel { grid-column: 5 / span 8; }
    .hero .index { display: block; }
  }
  @media (max-width: 47.99em) {
    .hero__reel { --ratio: 3 / 2; }
    .hero__reel .fig__frame { width: auto; max-height: none; margin-inline: calc(-1 * var(--margin)); }
  }

  /* the reel's caption: label, running time, pause button */
  .reel__meta { display: inline-flex; align-items: center; gap: var(--s-4); margin-left: auto; }
  .reel__toggle {
    display: inline-flex; align-items: center; gap: 0.5em; min-height: 2.75rem; margin-block: -0.75rem; padding-inline: 0.25rem;
    color: var(--ink); border-radius: var(--radius);
  }
  .reel__toggle .icon { width: 0.8em; height: 0.8em; }
  .no-js .reel__meta { display: none; }
  @media (max-width: 29.99em) { .reel__sub { display: none; } }

  /* --- 5.10 Index: a small numbered list of in-page links (Home hero, Projects index) --- */
  .index__label { display: block; padding-bottom: 0.6rem; }
  .index__list { border-top: var(--hair) solid var(--line); }
  .index__list a {
    display: flex; align-items: baseline; gap: var(--s-4); padding-block: 0.5rem; border-bottom: var(--hair) solid var(--line);
    font-size: var(--fs-small); font-weight: var(--w-medium); text-decoration: none;
    transition: padding-left var(--dur-2) var(--ease-out);
  }
  .index__list a .mono { width: 1.75rem; flex: none; transition: color var(--dur-2); }
  .index__list a .icon { margin-left: auto; align-self: center; opacity: 0; translate: -4px 0; transition: opacity var(--dur-2), translate var(--dur-2) var(--ease-out); }
  .index__list a:hover .mono, .index__list a:focus-visible .mono { color: var(--ink); }
  .index__list a:hover .icon, .index__list a:focus-visible .icon { opacity: 1; translate: 0 0; }
  .index--cols .index__list { columns: 3 16rem; column-gap: var(--gutter); border-top: 0; }
  .index--cols .index__list li { break-inside: avoid; }
  .index--cols .index__list a { min-height: 2.75rem; align-items: center; }

  /* --- 5.11 Statement (Home intro) and N4 the value proposition --- */
  .statement { margin-top: var(--section-gap); display: grid; gap: clamp(1.5rem, 3vw, 3rem) var(--gutter); }
  .statement__title { font: var(--w-medium) var(--fs-h1) / 1.1 var(--font-sans); letter-spacing: var(--ls-h1); max-width: 14em; }
  .statement__lead { font: var(--w-medium) var(--fs-h3) / 1.4 var(--font-sans); letter-spacing: var(--ls-h3); max-width: 34ch; }
  @media (min-width: 68.75em) {
    .statement { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .statement__title { grid-column: 1 / span 10; }
    .statement__lead, .statement > .vp, .statement > .vp__who, .statement > .vp__we { grid-column: 5 / span 8; }
  }
  .vp { display: grid; gap: var(--s-2); }
  .vp > li { font: var(--w-medium) var(--fs-h3) / 1.3 var(--font-sans); letter-spacing: var(--ls-h3); color: var(--ink); }
  .vp b { font-weight: var(--w-bold); }
  .vp__who { margin-top: var(--s-5); font: var(--w-strong) var(--fs-lead) / 1.45 var(--font-sans); color: var(--ink); }
  .vp__we { margin-top: var(--s-5); font: var(--w-body) var(--fs-lead) / 1.5 var(--font-sans); color: var(--ink); }
  /* inside the statement's grid the row gap already sits between them: the who line keeps --s-5 */
  .statement > .vp + :is(.vp__who, .vp__we) { margin-top: calc(var(--s-5) - clamp(1.5rem, 3vw, 3rem)); }

  /* --- 5.12 Spec cells: equal cells divided by hairlines (Home tech stack, industries, four doors) --- */
  .specs { --spec-rows: 3; display: grid; grid-template-columns: repeat(var(--spec-cols, 4), minmax(0, 1fr)); }
  .specs--3 { --spec-cols: 3; }
  .specs--4 { --spec-cols: 4; }
  .spec { display: grid; grid-template-rows: subgrid; grid-row: span var(--spec-rows); row-gap: var(--s-4); padding-inline: var(--gutter); border-left: var(--hair) solid var(--line); align-content: start; }
  .spec:first-child { padding-left: 0; border-left: 0; }
  .spec:last-child { padding-right: 0; }
  .spec__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--s-2); }
  .spec__icon { width: 3.5rem; height: 3.5rem; }
  .spec__title { font: var(--w-strong) var(--fs-h4) / 1.3 var(--font-sans); letter-spacing: -0.012em; }
  .spec__text { font-size: var(--fs-small); line-height: 1.6; color: var(--ink-2); }
  .spec__text b { color: var(--ink); font-weight: var(--w-strong); }
  .spec__foot { align-self: end; }
  @media (min-width: 68.75em) {
    .specs:is(.specs--3, .specs--4) { row-gap: var(--s-7); }
    .specs--3 > .spec:nth-child(3n + 1), .specs--4 > .spec:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
    .specs--3 > .spec:nth-child(3n), .specs--4 > .spec:nth-child(4n) { padding-right: 0; }
    .specs--3 > .spec:nth-child(n + 4), .specs--4 > .spec:nth-child(n + 5) { border-top: var(--hair) solid var(--line); padding-top: var(--s-7); }
  }
  @media (max-width: 68.74em) {
    .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-7); }
    .spec:nth-child(odd) { padding-left: 0; border-left: 0; }
    .spec:nth-child(even) { padding-right: 0; }
    .specs:is(.specs--3, .specs--4) > .spec:nth-child(n + 3) { border-top: var(--hair) solid var(--line); padding-top: var(--s-7); }
  }
  @media (max-width: 47.99em) {
    .specs { grid-template-columns: 1fr; row-gap: 0; }
    .spec { grid-row: auto; grid-template-rows: none; grid-template-columns: 3rem minmax(0, 1fr); column-gap: var(--s-4); row-gap: var(--s-2);
      padding: var(--s-5) 0; border-left: 0; border-bottom: var(--hair) solid var(--line); }
    .specs:is(.specs--3, .specs--4) > .spec:nth-child(n + 3) { border-top: 0; padding-top: var(--s-5); }
    .spec:first-child { padding-top: 0; }
    .spec:last-child { border-bottom: 0; padding-bottom: 0; }
    .spec__top { grid-row: 1 / span 2; flex-direction: column; justify-content: flex-start; gap: var(--s-3); margin: 0; }
    .spec__icon { width: 3rem; height: 3rem; }
    .spec__title, .spec__text, .spec > :not(.spec__top) { grid-column: 2; }
  }

  /* --- 5.13 Rail: a row of items that scrolls sideways and snaps (project browser, galleries, machine groups) --- */
  .rail {
    --per: 3;
    display: grid; grid-auto-flow: column; gap: var(--gutter);
    grid-auto-columns: calc((100% - (var(--per) - 1) * var(--gutter)) / var(--per));
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    /* 6 px of room all round so focus rings are not clipped; the negative margin puts the items back on the grid */
    padding: 6px; margin: -6px; scroll-padding-inline: 6px;
  }
  .section-head + .rail { margin-top: calc(var(--block-gap) - 6px); }
  .rail::-webkit-scrollbar { display: none; }
  .rail > * { scroll-snap-align: start; min-width: 0; }
  .rail:focus-visible { outline-offset: -2px; }
  .rail.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
  .rail.is-dragging * { pointer-events: none; }
  @media (hover: hover) and (pointer: fine) { .js .rail[data-rail] { cursor: grab; } }
  @media (max-width: 68.74em) { .rail { --per: 2; } }
  @media (max-width: 47.99em) {
    .rail { --per: 1.14; margin-inline: calc(-1 * var(--margin)); padding-inline: var(--margin); scroll-padding-inline: var(--margin); gap: var(--s-4);
      grid-auto-columns: calc((100% - (var(--per) - 1) * var(--s-4)) / var(--per)); }
  }
  .rail--single { --per: 1 !important; }
  /* one picture per view: on phones it stays inside the text column (no bleed, so no sliver of the next caption) */
  @media (max-width: 47.99em) { .rail--single { gap: var(--s-2); grid-auto-columns: 100%; margin: -6px; padding: 6px; scroll-padding-inline: 6px; } }
  /* a rail only on phones (N17 machine groups): from 48em a plain grid of --cols columns, two on tablet */
  @media (min-width: 48em) {
    .rail--phone {
      grid-auto-flow: row; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--s-7) var(--gutter);
      overflow: visible; scroll-snap-type: none; padding: 0; margin: 0;
    }
    .section-head + .rail--phone { margin-top: var(--block-gap); }
    .js .rail--phone[data-rail] { cursor: auto; }
  }
  @media (min-width: 48em) and (max-width: 68.74em) { .rail--phone { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

  /* the rail's controls: a count and two arrows; they sit in a section head or under a gallery */
  .rail-nav { display: flex; align-items: center; gap: var(--s-3); }
  .rail-nav__count { min-width: 6.5em; text-align: right; }
  .rail-nav__btn {
    display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: var(--hair) solid var(--line); border-radius: var(--radius);
    color: var(--ink); transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), scale var(--dur-1);
  }
  .rail-nav__btn + .rail-nav__btn { margin-left: -0.25rem; }
  .rail-nav__btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .rail-nav__btn:active { scale: 0.94; }
  .rail-nav__btn[aria-disabled="true"] { color: var(--line); pointer-events: none; }
  .no-js .rail-nav { display: none; }
  [data-rail-root].is-static :is(.rail-nav, .rail-ticks) { display: none; }   /* nothing to scroll: no controls */

  /* a ruler under the rail: one tick per item, the ones in view drawn darker and taller */
  .rail-ticks { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 0.5rem; margin-top: var(--s-6); }
  .rail-ticks > * { border: solid var(--line); border-width: 0 0 var(--hair) var(--hair); transition: border-color var(--dur-2) var(--ease-out); }
  .rail-ticks > :last-child { border-right-width: var(--hair); }
  .rail-ticks > .is-on { border-color: var(--ink); }
  .rail-ticks > .is-on + :not(.is-on) { border-left-color: var(--ink); }
  .no-js .rail-ticks { display: none; }

  /* --- 5.14 Card: a figure, a title, a line of text and a link (Home project browser, machine cards) --- */
  .card { position: relative; display: flex; flex-direction: column; height: 100%; container-type: inline-size; }
  .card__body { display: flex; flex-direction: column; flex: 1; gap: 0.5rem; padding-top: var(--s-4); }
  .card__title { font: var(--w-strong) var(--fs-h4) / 1.3 var(--font-sans); letter-spacing: -0.012em; }
  .card__title a { text-decoration: none; }
  .card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }      /* the whole card is the link */
  .card__title a:focus-visible { outline: 0; }
  .card:has(.card__title a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
  .card__text { font-size: var(--fs-small); line-height: 1.55; color: var(--ink-2); }
  .card .link { margin-top: auto; padding-top: 0.25rem; }
  .card .fig__frame img { transition: scale 600ms var(--ease-out); }
  @media (hover: hover) { .card:hover .fig:not(.fig--plate) .fig__frame img { scale: calc(var(--zoom, 1) * 1.025); } }
  @container (min-width: 26rem) { .card__title { font-size: var(--fs-h3); } }
  @media (max-width: 47.99em) { .card .link { margin-top: 0; } }   /* one card in view at a time: no need to line the links up */

  /* --- 5.15 Rows: a ruled list with a title on the left and text on the right (Why work with us, Why it matters) --- */
  .rows { border-bottom: var(--hair) solid var(--line); }
  .row { display: grid; gap: var(--s-3) var(--gutter); padding-block: clamp(1.5rem, 2.6vw, 2.25rem); border-top: var(--hair) solid var(--line); }
  .row:first-child { border-top: 0; }
  .row__head { display: grid; gap: 0.4rem; align-content: start; }
  .row__title { font: var(--w-strong) var(--fs-h3) / 1.25 var(--font-sans); letter-spacing: var(--ls-h3); }
  .row__body { color: var(--ink-2); }
  .row__body b { color: var(--ink); }
  .prose > .row__link, .row__link { margin-top: var(--s-3); }
  .row__link .link { color: var(--ink); }
  @media (min-width: 68.75em) {
    .row { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .row__head { grid-column: 1 / span 4; }
    .row__body { grid-column: 5 / span 7; }
  }

  /* --- 5.16 Pitch (Home "Designing Success"): one large sentence and a button --- */
  .pitch { display: grid; gap: var(--s-6) var(--gutter); justify-items: start; }
  .pitch__text { font: var(--w-medium) var(--fs-h2) / 1.25 var(--font-sans); letter-spacing: var(--ls-h2); color: var(--ink-2); max-width: 26ch; text-wrap: pretty; }
  .pitch__text span { display: block; color: var(--ink); }   /* the first sentence sits on its own line, in full ink */
  @media (min-width: 68.75em) {
    .pitch { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .pitch > * { grid-column: 5 / span 8; }
    .pitch__text { max-width: 30ch; }
  }

  /* --- 5.17 Accordion (FAQ, Services, Questions): every item closed on load; deep links and Find open it --- */
  .acc { border-bottom: var(--hair) solid var(--line); }
  .acc__item { border-top: var(--hair) solid var(--line); }
  .acc__item:first-child { border-top: 0; }
  .acc__btn {
    display: flex; align-items: baseline; gap: var(--s-4); width: 100%; padding-block: clamp(1.1rem, 2vw, 1.6rem); text-align: left;
    font: var(--w-strong) var(--fs-h4) / 1.35 var(--font-sans); letter-spacing: -0.012em; border-radius: 2px; color: inherit; text-decoration: none;
  }
  .acc__no { width: 2.25rem; flex: none; }
  .acc__q { flex: 1; max-width: 46rem; text-wrap: balance; }
  .acc__icon { position: relative; flex: none; align-self: center; width: 2.25rem; height: 2.25rem; margin: -0.4rem 0 -0.4rem auto; border: var(--hair) solid var(--line); border-radius: var(--radius);
    transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
  .acc__icon::before, .acc__icon::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 0.75rem; height: 1.5px; margin: -0.75px 0 0 -0.375rem; background: currentColor;
    transition: rotate var(--dur-3) var(--ease-out), translate var(--dur-2) var(--ease-out);
  }
  .acc__icon::after { rotate: 90deg; }
  .acc__item.is-open .acc__icon::after { rotate: 0deg; }
  .acc__btn:hover .acc__icon { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-3) var(--ease-out); }
  .acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
  .acc__inner { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s linear var(--dur-3); }
  .acc__item.is-open .acc__inner { visibility: visible; transition-delay: 0s; }
  /* where the browser can find text inside hidden="until-found", closed answers must not be visibility: hidden (§3.4) */
  .has-until-found .acc__inner { visibility: visible; }
  .acc__item.is-instant :is(.acc__panel, .acc__inner), .acc__item.is-instant .acc__icon::after { transition: none !important; }
  .acc__content { padding: 0.25rem 0 clamp(1.5rem, 3vw, 2.5rem) calc(2.25rem + var(--s-4)); color: var(--ink-2); font-size: var(--fs-small); line-height: 1.65; }
  .acc__content b { color: var(--ink); font-weight: var(--w-strong); }
  @media (min-width: 68.75em) {
    .acc__inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
    .acc__content { grid-column: 5 / span 7; padding-left: 0; }
  }
  @media (max-width: 47.99em) {
    .acc__no { width: 1.75rem; }
    .acc__btn { gap: var(--s-3); }
    .acc__content { padding-left: 0; }
  }
  /* without JavaScript every answer is open and the buttons do nothing */
  .no-js .acc__panel { grid-template-rows: 1fr; }
  .no-js .acc__inner { visibility: visible; }
  .no-js .acc__item:not(.acc__item--link) .acc__icon { display: none; }

  /* N24 a link row: the same row, an arrow in the square, its one line always visible */
  .acc__icon--go::before {
    width: 0.875rem; height: 0.875rem; margin: -0.4375rem 0 0 -0.4375rem; background: currentColor; rotate: 0deg;
    mask: var(--icon-arrow-right) center / contain no-repeat; -webkit-mask: var(--icon-arrow-right) center / contain no-repeat;
  }
  .acc__icon--go::after { display: none; }
  .acc__btn:hover .acc__icon--go::before { translate: 2px 0; }
  /* the line starts where the link ends (no pull-up), so the focus ring drawn 3 px outside the link passes above its
     words (H-02, B-02; vision 3.3 rule 10, 2.4.7) */
  .acc__line { padding: 0 0 clamp(1.1rem, 2vw, 1.6rem) calc(2.25rem + var(--s-4)); margin-top: 0; color: var(--ink-2); font-size: var(--fs-small); line-height: 1.65; max-width: calc(var(--measure) + 2.25rem + var(--s-4)); }
  @media (min-width: 68.75em) {
    .acc__line { padding-left: 0; margin-left: calc((100% + var(--gutter)) / 3); max-width: calc(7 * (100% + var(--gutter)) / 12 - var(--gutter)); }
  }
  @media (max-width: 47.99em) { .acc__line { padding-left: calc(1.75rem + var(--s-3)); } }

  /* N7 the brand accordion: number and title cols 1-4, a one-line summary cols 5-11, the + in col 12 */
  .acc__sum { display: block; font: var(--w-body) var(--fs-small) / 1.5 var(--font-sans); letter-spacing: 0; color: var(--ink-2); }
  .acc--brands .acc__btn { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; column-gap: var(--s-4); row-gap: 0.2rem; align-items: baseline; }
  .acc--brands .acc__no { grid-column: 1; grid-row: 1; }
  .acc--brands .acc__q { grid-column: 2; grid-row: 1; max-width: none; }
  .acc--brands .acc__sum { grid-column: 2; grid-row: 2; }
  .acc--brands .acc__icon { grid-column: 3; grid-row: 1; margin: -0.4rem 0; }
  @media (min-width: 68.75em) {
    .acc--brands .acc__btn { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
    .acc--brands .acc__no { grid-column: 1; }
    .acc--brands .acc__q { grid-column: 1 / span 4; padding-left: calc(2.25rem + var(--s-4)); }
    .acc--brands .acc__sum { grid-column: 5 / span 7; grid-row: 1; }
    .acc--brands .acc__icon { grid-column: 12; justify-self: end; }
  }
  @media (max-width: 47.99em) { .acc--brands .acc__btn { grid-template-columns: 1.75rem minmax(0, 1fr) auto; column-gap: var(--s-3); } }
  .brands { display: grid; gap: var(--s-4); }
  .brands__row { display: grid; gap: 0.35rem; }
  .brands__row > dd { margin: 0; }
  .brands__list { display: flex; flex-wrap: wrap; row-gap: 0.25rem; font: var(--w-strong) var(--fs-small) / 1.5 var(--font-sans); color: var(--ink); }
  .brands__list > li + li::before { content: "\00B7"; content: "\00B7" / ""; margin-inline: 0.55em; font-weight: var(--w-body); color: var(--ink-3); }
  .brands__fam { font-weight: var(--w-body); color: var(--ink-2); }

  /* --- 5.18 Site footer: Version 1's black band with the call to action, links in two columns (§2.9) --- */
  .site-footer { background: var(--ink); color: var(--inv-ink); padding-block: clamp(3.5rem, 7vw, 6rem) var(--s-6); }
  .cta { display: grid; gap: var(--s-7) var(--gutter); margin-top: var(--block-gap); }
  .cta__title { font: var(--w-medium) var(--fs-cta) / 1.1 var(--font-sans); letter-spacing: var(--ls-h1); max-width: 16ch; }
  .cta__main { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); justify-items: start; align-content: start; }
  .cta__side { display: grid; gap: var(--s-6) var(--gutter); align-content: start; }
  .footer-nav__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; column-gap: var(--gutter); }
  .footer-nav a {
    display: inline-flex; align-items: center; min-height: 2.75rem; padding-block: 0.3rem;
    font-size: 1.125rem; line-height: 1.3; font-weight: var(--w-medium); text-decoration: underline; text-decoration-color: transparent;
  }
  .footer-nav a:hover, .footer-nav a[aria-current="page"] { text-decoration-color: currentColor; }
  .footer-meta { display: grid; gap: var(--s-5) var(--gutter); font-size: var(--fs-small); line-height: 1.5; }
  .footer-meta__contact { display: contents; }
  .footer-meta .mono { display: block; margin-bottom: 0.2rem; color: var(--inv-ink-2); }
  .footer-meta a { display: inline-flex; align-items: center; gap: 0.45em; min-height: 2.75rem; margin-block: -0.6rem; text-decoration: underline; text-decoration-color: var(--inv-ink-2); overflow-wrap: anywhere; }
  .footer-meta a:hover { text-decoration-color: currentColor; }
  .footer-meta__link { padding-top: calc(var(--fs-mono) * 1.4 + 0.2rem); }   /* a link without a label sits on the others' line */
  .site-footer__base {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-6);
    margin-top: clamp(3rem, 7vw, 6rem); padding-top: var(--s-5); border-top: var(--hair) solid var(--inv-line);
  }
  .site-footer__legal { max-width: 46rem; font-size: var(--fs-small); line-height: 1.5; color: var(--inv-ink-2); }
  @media (min-width: 68.75em) {
    .cta { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .cta__main { grid-column: 1 / span 7; }
    .cta__side { grid-column: 9 / span 4; }
    .cta__title { max-width: none; }
    .footer-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-meta__contact > p { grid-column: 1 / -1; }
  }
  @media (min-width: 48em) and (max-width: 68.74em) {
    .cta__side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* --- 5.19 Page head (Projects, About, Automation, Fabrication, Contact, 404): the title block that opens a page --- */
  .page-head { padding-top: clamp(2.5rem, 6vw, 5rem); display: grid; gap: var(--s-5) var(--gutter); }
  .page-head__title { font: var(--w-bold) var(--fs-h1) / 1.06 var(--font-sans); letter-spacing: var(--ls-display); }
  .page-head__kicker {                                /* N5: the mono first line of a slogan h1 */
    display: block; margin-bottom: 1rem;
    font: 500 var(--fs-mono) / 1.4 var(--font-mono); letter-spacing: var(--ls-mono); text-transform: uppercase;
    color: var(--ink-3); font-variant-numeric: tabular-nums;
  }
  .page-head__lead { font: var(--w-medium) var(--fs-h3) / 1.4 var(--font-sans); letter-spacing: var(--ls-h3); max-width: 34ch; }
  @media (min-width: 68.75em) {
    .page-head { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .page-head > * { grid-column: 1 / span 9; }
    .page-head > .page-head__lead { grid-column: 5 / span 8; }
  }

  /* --- 5.20 Project entry (Projects page): text on the left axis, its gallery on the right axis --- */
  .project { display: grid; gap: var(--s-6) var(--gutter); padding-block: clamp(2.5rem, 5vw, 4.5rem); border-top: var(--hair) solid var(--line); scroll-margin-top: var(--s-5); }   /* added to html's scroll-padding: the hairline lands under the header and the Projects bar */
  .project__title { font: var(--w-strong) var(--fs-h3) / 1.2 var(--font-sans); letter-spacing: var(--ls-h3); margin-top: 0.4rem; }
  .project__text { display: grid; gap: var(--s-5); align-content: start; }
  .project__text p { color: var(--ink-2); font-size: var(--fs-small); line-height: 1.65; }
  .project__label { display: block; margin-bottom: 0.35rem; }
  @media (min-width: 68.75em) {
    .project { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .project__text { grid-column: 1 / span 4; }
    /* the pictures stay in view while a long text scrolls past them */
    .project__media { grid-column: 5 / span 8; position: sticky; top: calc(var(--header-h) + var(--s-5)); align-self: start; }
  }
  @media (max-width: 68.74em) { .project__media { order: 2; } }

  /* --- 5.21 Gallery (Projects page): one picture at a time in a rail, thumbnails and a count below --- */
  .gallery { display: grid; gap: var(--s-3); min-width: 0; }
  .gallery__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
  .gallery__bar .rail-nav { margin-left: auto; }        /* arrows stay on the right when the thumbnails are hidden (phones) */
  .gallery .fig__frame { --ratio: 3 / 2; }
  .gallery .fig__cap { min-height: 1.1rem; }
  .gallery video { background: #000; }
  .thumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); }
  .thumbs__btn { position: relative; width: 4rem; height: 2.75rem; overflow: hidden; background: var(--surface); opacity: 0.55; transition: opacity var(--dur-2); }
  .thumbs__btn img { width: 100%; height: 100%; object-fit: cover; }
  .thumbs__btn:hover, .thumbs__btn[aria-current="true"] { opacity: 1; }
  .thumbs__btn[aria-current="true"]::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--ink); }
  .no-js .thumbs { display: none; }
  @media (max-width: 47.99em) { .thumbs { display: none; } }

  /* a picture that opens large: the button covers the frame */
  .zoom { position: absolute; inset: 0; z-index: 1; cursor: zoom-in; }
  .zoom:focus-visible { outline-offset: -4px; }
  .lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(1rem, 4vw, 3rem); border: 0; background: var(--paper); color: var(--ink); }
  .lightbox::backdrop { background: var(--paper); }
  .lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--s-4); animation: fade-in var(--dur-2) var(--ease-out); }
  .lightbox img { width: 100%; height: 100%; object-fit: contain; }
  .lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }

  /* --- 5.22 N13 Team: a small portrait (Version 3's placement) beside the number, name and role; the bio under both --- */
  .team { --portrait: 176px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8) var(--gutter); }
  .team__item { display: grid; grid-template-columns: var(--portrait) minmax(0, 1fr); column-gap: var(--s-5); align-items: end; align-content: start; scroll-margin-top: calc(var(--header-h) + var(--s-5)); }
  .team__item > .frame--portrait { grid-column: 1; grid-row: 1; }
  .team__id { grid-column: 2; grid-row: 1; display: grid; gap: 0.3rem; align-content: end; padding-bottom: var(--s-1); }
  .team__item:not(:has(> .frame--portrait)) { grid-template-columns: minmax(0, 1fr); }
  .team__item:not(:has(> .frame--portrait)) > .team__id { grid-column: 1; }
  .team__name { font: var(--w-bold) var(--fs-h4) / 1.3 var(--font-sans); letter-spacing: -0.012em; color: var(--ink); }
  .team__role { font-size: var(--fs-small); line-height: 1.45; color: var(--ink-2); }
  .team__bio { grid-column: 1 / -1; grid-row: 2; margin-top: var(--s-5); max-width: 32em; font-size: var(--fs-small); line-height: 1.65; color: var(--ink-2); }
  .team__bio b { color: var(--ink); font-weight: var(--w-strong); }
  /* the portrait frame: 4:5, the photo placed by --w, --x, --y (share of the frame) so every head is the same size */
  .frame--portrait { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface); }
  .frame--portrait img { position: absolute; max-width: none; height: auto; width: var(--w, 100%); left: var(--x, 0%); top: var(--y, 0%); filter: grayscale(1) contrast(1.04); }
  @media (max-width: 68.74em) { .team { --portrait: 152px; } }
  @media (max-width: 47.99em) {
    .team { --portrait: 40%; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
    .team__item { column-gap: var(--s-4); }
    .team__bio { margin-top: var(--s-4); }
  }
  /* the wider Spark team: three per row (two tablet, one phone), 120 px portraits (96 phones), one-line bios */
  .team--3 { --portrait: 120px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); }
  .team--3 .team__bio { margin-top: var(--s-3); }
  @media (max-width: 68.74em) { .team--3 { --portrait: 120px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 47.99em) { .team--3 { --portrait: 96px; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); } }
  /* five across on desktop, two per row below (2 + 2 + 1); 96 px portraits (80 phones) above the name; name and role only */
  .team--5 { --portrait: 96px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); }
  .team--5 .team__item { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .team--5 .team__item > .frame--portrait { width: var(--portrait); }
  .team--5 .team__id { grid-column: 1; grid-row: 2; margin-top: var(--s-3); padding-bottom: 0; }
  @media (max-width: 68.74em) { .team--5 { --portrait: 96px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 47.99em) { .team--5 { --portrait: 80px; gap: var(--s-6) var(--gutter); } }

  /* Version 1's person card (3.16), kept only for old markup; N13 replaces it */
  .people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8) var(--gutter); }
  @media (max-width: 68.74em) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 47.99em) { .people { grid-template-columns: 1fr; gap: var(--s-7); } }
  .person { display: grid; gap: var(--s-4); align-content: start; scroll-margin-top: calc(var(--header-h) + var(--s-5)); }
  .person .fig__frame { --ratio: 4 / 5; }
  .person .fig__frame img { filter: grayscale(1) contrast(1.04); }
  .person__name { font: var(--w-bold) var(--fs-h4) / 1.3 var(--font-sans); letter-spacing: -0.012em; }
  .person__bio { font-size: var(--fs-small); line-height: 1.65; color: var(--ink-2); }
  .person__bio > * + * { margin-top: 0.9em; }
  .person__bio b { color: var(--ink); font-weight: var(--w-strong); }
  .person__id { display: grid; gap: 0.3rem; align-content: start; }
  .person__bio .more { margin-top: var(--s-2); margin-left: -0.125rem; }
  .person__rest > * + * { margin-top: 0.9em; }
  @media (min-width: 48em) and (max-width: 68.74em) { .person .fig__frame { --ratio: 1 / 1; } }
  @media (max-width: 47.99em) {
    .people { gap: 0; border-bottom: var(--hair) solid var(--line); }
    .section-head + .people { margin-top: 0; }
    .person { grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-6); border-top: var(--hair) solid var(--line); }
    .person:first-child { border-top: 0; }
    .person .fig__frame { --ratio: 1 / 1; }
    .person__photo { grid-column: 1; grid-row: 1; }
    .person__id { grid-column: 2; grid-row: 1; align-self: end; padding-bottom: var(--s-1); }
    .person__bio { grid-column: 1 / -1; }
  }

  /* a "Read more" switch: the button shows and hides the element named in aria-controls.
     The closed part (class more__rest, or person__rest) is hidden from the first paint when JavaScript runs,
     so nothing moves when site.js starts; without JavaScript everything shows. */
  .js :has(> .more[aria-expanded="false"]) > :is(.more__rest, .person__rest) { display: none; }
  :is(.more__rest, .person__rest):not([hidden]) { animation: fade-in var(--dur-3) var(--ease-out); }
  .more { display: inline-flex; align-items: center; gap: 0.5em; min-height: 2.75rem; font: 500 var(--fs-mono) / 1.4 var(--font-mono); letter-spacing: var(--ls-mono); text-transform: uppercase; color: var(--ink); }
  .more::before { content: "+"; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border: var(--hair) solid var(--line); border-radius: var(--radius); }
  .more[aria-expanded="true"]::before { content: "\2212"; }
  .no-js .more { display: none; }

  /* --- 5.23 Pair: two blocks side by side on one rule --- */
  .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); }
  .pair > * { padding-top: var(--s-5); border-top: var(--hair) solid var(--ink); display: grid; gap: var(--s-3); align-content: start; }
  .pair p { color: var(--ink-2); }
  @media (max-width: 47.99em) { .pair { grid-template-columns: 1fr; } }

  /* --- 5.24 Contact --- */
  .contact { display: grid; gap: var(--s-7) var(--gutter); }
  .contact__info { display: grid; gap: var(--s-6); align-content: start; }
  .contact__item .mono { display: block; margin-bottom: 0.35rem; }
  .contact__item a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: var(--w-strong); overflow-wrap: anywhere; }
  @media (min-width: 68.75em) {
    .contact { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .contact__info { grid-column: 1 / span 4; }
    .contact__main { grid-column: 5 / span 8; }
  }
  /* an outside service (scheduler, map) that loads only when the visitor asks for it */
  .embed { position: relative; display: grid; place-items: center; min-height: var(--embed-h, 28rem); border: var(--hair) solid var(--line); background: var(--surface); }
  .embed__ask { display: grid; gap: var(--s-4); justify-items: center; text-align: center; padding: var(--s-6); max-width: 30rem; }
  .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--paper); }
  .embed--map { --embed-h: 20rem; }
  .embed--map iframe { filter: grayscale(1) contrast(1.05); }
  /* while the service loads: a quiet "Loading" line in place of the button (the box keeps its size: no shift);
     the frame fades in once it has loaded */
  .embed__loading { display: none; }
  .embed.is-loading [data-embed-load] { display: none; }
  .embed.is-loading .embed__loading { display: block; }
  .no-js .embed__loading, .no-js .embed [data-embed-load] { display: none; }
  .embed iframe { transition: opacity var(--dur-3) var(--ease-out); }
  .embed iframe.is-pending { opacity: 0; }

  /* a small "Copy" button beside a value (Contact email) */
  .copy {
    display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding-inline: var(--s-3);
    color: var(--ink); border: var(--hair) solid var(--line); border-radius: var(--radius);
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), scale var(--dur-1) var(--ease-out);
  }
  .copy:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .copy:active { scale: 0.975; }
  .copy.is-done { border-color: var(--ink); }
  .no-js .copy { display: none; }

  /* --- 5.25 Not found (404): the message fills the first screen, the footer band waits below it --- */
  .notfound {
    padding-top: clamp(3rem, 9vw, 8rem); padding-bottom: var(--s-8); display: grid; gap: var(--s-6); justify-items: start;
    min-height: calc(100svh - var(--header-h) - var(--section-gap)); align-content: center;
  }
  .notfound__code { font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem); }
  .notfound__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

  /* --- 5.26 N3 Logo strip, and the band variant (full-bleed --surface) --- */
  .logos { --logo-gap-x: 3rem; --logo-gap-y: 2rem; --logos-max: 36rem; }
  .logos:not(.logos--band), .logos--band > .wrap { display: grid; gap: var(--s-5) var(--gutter); align-items: center; justify-items: center; }
  .logos:not(.logos--band) { padding-block: var(--s-6); border-block: var(--hair) solid var(--line); }
  .logos--band { --logos-max: none; background: var(--surface); padding-block: var(--s-7); }
  .logos__label { justify-self: stretch; text-align: center; }
  .logos__list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--logo-gap-y) var(--logo-gap-x); width: 100%; max-width: var(--logos-max); }
  .logos__list > li {
    display: flex; align-items: center; justify-content: center; min-width: 0; flex: 0 0 auto;
    /* a fixed count per row only where the page sets --per-row-tablet / --per-row-phone (else this is invalid, so auto) */
    flex-basis: calc((100% - (var(--per-row) - 1) * var(--logo-gap-x)) / var(--per-row));
  }
  .logos__list img { display: block; width: auto; height: calc(var(--h) * var(--logo-scale, 1)); max-width: 100%; object-fit: contain; }
  .logos__list img[data-nudge] { translate: 3px 0; }
  .logos__name { font: 500 0.875rem / 1.2 var(--font-mono); color: var(--ink); white-space: nowrap; }
  .logos__caption { justify-self: stretch; text-align: center; font-size: var(--fs-small); color: var(--ink-2); }
  @media (min-width: 48em) and (max-width: 68.74em) { .logos { --per-row: var(--per-row-tablet); } }
  @media (max-width: 47.99em) {
    .logos { --per-row: var(--per-row-phone); --logo-gap-x: 2rem; --logo-gap-y: 1.5rem; }
    .logos__list img { height: var(--h-phone, calc(var(--h) * 0.8)); }
  }
  @media (min-width: 68.75em) {
    .logos:not(.logos--band), .logos--band > .wrap { grid-template-columns: repeat(12, minmax(0, 1fr)); justify-items: stretch; }
    .logos__label { grid-column: 1 / span 2; text-align: left; }
    .logos__list { grid-column: 3 / span 10; max-width: none; flex-wrap: nowrap; justify-content: space-between; gap: var(--s-4); }
    .logos__list > li { flex: 0 1 auto; }
    .logos__caption { grid-column: 3 / span 10; text-align: left; }
    .logos--band > .wrap > :not(.logos__label, .logos__list, .logos__caption) { grid-column: 1 / -1; }
    /* the band's eight logos: the label above them, the row across the column, a touch smaller until it fits */
    .logos--band .logos__label, .logos--band .logos__list, .logos--band .logos__caption { grid-column: 1 / -1; }
  }
  @media (min-width: 68.75em) and (max-width: 74.99em) { .logos--band { --logo-scale: 0.88; } }

  /* --- 5.27 N8 Ink band: full bleed, once per page, never directly above the footer --- */
  .band { margin-top: var(--section-gap); }
  .band--ink { background: var(--ink); color: var(--inv-ink); padding-block: var(--band-pad); }
  .band--ink .section-head--inverse { border-bottom-color: var(--inv-ink); }
  .band--ink .mono, .band--ink .fig__cap { color: var(--inv-ink-2); }
  .band--ink .fig__cap b, .band--ink .reel__toggle { color: var(--inv-ink); }
  .band--ink .lede { color: var(--inv-ink); }
  .band--ink :is(.lede-lead, .muted, .row__body, .spec__text, .acc__content) { color: var(--inv-ink-2); }
  .band--ink :is(a:not(.btn), .prose a) { color: var(--inv-ink); text-decoration-color: var(--inv-ink-2); }
  .band--ink :is(.rows, .row, .acc, .acc__item) { border-color: var(--inv-line); }
  .band--ink .fig__frame { background: var(--inv-line); }
  @media (min-width: 68.75em) { .band--ink .fig--video { margin-inline: calc((100% + var(--gutter)) / 12); } }   /* cols 2-11 */

  /* --- 5.28 N10 Partner lockup: Spark's mark, a "+", Combination's logo --- */
  .lockup { display: flex; flex-wrap: wrap; align-items: center; row-gap: var(--s-3); }
  .lockup__spark { width: auto; height: 4.5rem; }
  .lockup__plus { margin-inline: 1rem; font: 300 2rem / 1 var(--font-sans); color: var(--ink-3); }
  .lockup .logo { min-height: 0; }
  .lockup--inverse .lockup__plus { color: var(--inv-ink-2); }
  .lockup__caption, .lockup__cap { margin-top: var(--s-3); }       /* the automation page's mono "Spark + Combination" */
  /* a declined mark becomes Spark's name in words (release.cjs writes it from data-gate-text, A3 X4) */
  .lockup__name { font: var(--w-bold) 1.625rem / 1 var(--font-sans); letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
  .lockup--inverse .lockup__name { color: var(--inv-ink); }
  @media (max-width: 47.99em) {
    .lockup__spark { height: 3.5rem; }
    .lockup__plus { margin-inline: 0.75rem; }
    .lockup__name { font-size: 1.25rem; }                        /* the phone wordmark's size, so it stays on one line (B-01) */
  }

  /* --- 5.29 N20 Process list: groups of short items (What we automate), or one list in columns (What the shop makes) --- */
  .processes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .processes__group { display: grid; gap: var(--s-3); align-content: start; padding-inline: var(--gutter); border-left: var(--hair) solid var(--line); }
  .processes__group:first-child { padding-left: 0; border-left: 0; }
  .processes__group:last-child { padding-right: 0; }
  /* the group heading is --ink-2 until one of its stations is selected, then turns --ink (vision 6.12; A-01) */
  .processes dt { font: var(--w-strong) var(--fs-h4) / 1.3 var(--font-sans); letter-spacing: -0.012em; color: var(--ink-2); transition: color var(--dur-1); }
  .processes dd { margin: 0; }
  .processes ul, .processes--list { font-size: var(--fs-small); line-height: 1.45; color: var(--ink-2); }
  .processes ul { display: grid; gap: 0.5rem; list-style: none; }
  .processes li { position: relative; transition: color var(--dur-1); }
  .processes li::before { content: ""; position: absolute; left: -0.625rem; top: 0.1em; bottom: 0.1em; width: 2px; background: var(--ink); opacity: 0; transition: opacity var(--dur-1); }
  .processes li.is-selected { color: var(--ink); }
  .processes li.is-selected::before { opacity: 1; }
  .processes__group.is-selected dt { color: var(--ink); }
  .processes--list { display: block; columns: 3; column-gap: var(--gutter); }
  .processes--list > li { break-inside: avoid; padding-bottom: 0.5rem; }
  @media (max-width: 68.74em) {
    .processes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-6); }
    .processes__group:nth-child(odd) { padding-left: 0; border-left: 0; }
    .processes__group:nth-child(even) { padding-right: 0; }
    .processes--list { columns: 2; }
  }
  @media (max-width: 47.99em) {
    .processes { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-5); }
    .processes__group { padding: 0; border-left: 0; }
    .processes__group + .processes__group { padding-top: var(--s-5); border-top: var(--hair) solid var(--line); }
    .processes--list { columns: 1; }
  }
}

/* ---------- 6. Utilities ---------- */
@layer utilities {
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .flow > * + * { margin-top: var(--flow, 1em); }
  .nowrap { white-space: nowrap; }
  .mt-block { margin-top: var(--block-gap); }
  .mt-section { margin-top: var(--section-gap); }
  .on-desktop { display: none; }
  @media (min-width: 68.75em) { .on-desktop { display: revert; } .not-desktop { display: none !important; } }
}

/* ---------- 7. Motion ---------- */
@keyframes progress { to { scale: 1 1; } }
@keyframes fade-in { from { opacity: 0; } }

/* Scroll reveals. site.js decides after the first paint (one IntersectionObserver) which blocks start wholly below the
   first screen, hides only those, and lets each rise 12 px and fade in once, in 320 ms. Nothing is hidden without
   JavaScript, under reduced motion, or when the page loads with an anchor. */
.reveal-wait { opacity: 0; translate: 0 12px; }
.reveal-go { opacity: 1; translate: 0 0; transition: opacity var(--dur-3) var(--ease-out), translate var(--dur-3) var(--ease-out); transition-delay: calc(40ms * var(--i, 0)); }

/* Moving between pages: a short cross-fade; the header bar stays where it is (site.js closes the menus first). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
.site-header__bar { view-transition-name: site-header; }
::view-transition-group(site-header) { animation: none; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal-wait { opacity: 1; translate: 0 0; }
  .site-header__progress { display: none !important; }
}

/* ---------- 8. Forced colours: shapes drawn as backgrounds or masks would vanish; give them the system colours ---------- */
@media (forced-colors: active) {
  .icon, .acc__icon::before, .acc__icon::after, .prose ul.checks > li::before, .js .nav-services::before,
  .processes li::before, .site-header__progress {
    forced-color-adjust: none; background-color: CanvasText;
  }
  a .icon, a .acc__icon::before { background-color: LinkText; }
  button .icon, button .acc__icon::before, button .acc__icon::after, .js .nav-services::before { background-color: ButtonText; }
  .acc__btn:hover .acc__icon { forced-color-adjust: none; background: Canvas; color: CanvasText; border-color: CanvasText; }
  .services-panel__in, .menu { border-color: CanvasText; }
}
/* one-colour logos and line icons are pictures, which forced colours leave alone: on a dark theme the black files
   would vanish into the background, on a light theme the white Spark mark would. Turn them over to match. */
@media (forced-colors: active) and (prefers-color-scheme: dark) {
  .logos__list img, .lockup:not(.lockup--inverse) .lockup__spark, .spotlight__logo, .spec__icon[src$=".svg"] { filter: invert(1); }
}
@media (forced-colors: active) and (prefers-color-scheme: light) {
  .lockup--inverse .lockup__spark { filter: invert(1); }
}

/* ---------- 9. Print: everything visible, nothing sticky, black on white ---------- */
@media print {
  .site-header { position: static; border: 0; }
  .site-nav, .services-panel, .menu-btn, .menu, .site-header__cta, .site-header__progress, .skip,
  .rail-nav, .rail-ticks, .reel__meta, .more, .acc__icon, .copy, .btn, .reel__toggle, video, .lightbox, .embed__ask { display: none !important; }
  .reveal-wait { opacity: 1 !important; translate: 0 0 !important; }
  .rail { display: grid; grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; }
  .acc__panel { grid-template-rows: 1fr !important; }
  .acc__inner { visibility: visible !important; content-visibility: visible !important; }
  .band--ink { background: none; color: var(--ink); border-top: var(--hair) solid var(--ink); padding-block: var(--s-6); }
  .band--ink :is(.lede, .lede-lead, .mono, .fig__cap, .fig__cap b, a) { color: var(--ink) !important; }
  .band--ink .section-head--inverse { border-bottom-color: var(--ink); }
  /* the video is left out, so its poster (the clip's own start frame) stands in for it on paper (Fb-03) */
  [data-reel] .reel__poster img { visibility: visible !important; }
  .logos--band { background: none; }
  .site-footer { background: none; color: var(--ink); border-top: var(--hair) solid var(--ink); }
  .site-footer__legal, .footer-meta .mono { color: var(--ink-2); }
  .logo--inverse, .lockup--inverse .logo { color: var(--ink); }
  .card, .row, .spec, .acc__item, .person, .team__item, .project, .processes__group { break-inside: avoid; }
}
