/* ==========================================================================
   Chi Ventures website: the one stylesheet. No framework, no build step. v5 (2026-11-19).

   0. Site switch (the Designs page link)
   1. Fonts (self-hosted, see fonts/SHA256SUMS.txt and the OFL files)
   2. Brand tokens (copied unchanged from HQ brand/tokens.css)
   3. Site tokens (spacing, type, per-theme roles)
   4. Base
   5. Layout
   6. Header
   7. Hero
   8. Sections
   9. Contact band and footer
   10. Privacy and 404 pages
   11. Utilities, placeholders, forced colours
   13. Night surfaces (the heroes and the process story, dark in both themes)
   14. From idea to prototype (the story's plain layout)
   15. "What do you want to build?" picker
   Breakpoints
   12. Motion: what stays still (the moving rules are in motion.css)
   16. v3 motion (moved to motion.css)
   17. v5: one drawing set, one light (the night site: lighting, grid, type, components, every section)
   18. v4 motion (moved to motion.css)
   19. The header's motion switch (v4.1)
   ========================================================================== */

/* 0. SITE SWITCH: links to the Designs page -----------------------------------
   Every link to designs.html (nav, home hero, home Designs section, contact fine print,
   on every page) has a twin that stays on the home page instead. This one line picks
   which twin shows, on all pages at once. See README, "Designs page switch".

   PENDING (now): the Designs page is not published yet; links go to Contact / #designs.
   LIVE: replace the line below with   .designs-pending { display: none !important; }  */
.designs-live { display: none !important; }

/* 1. Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: 'Michroma';
  src: url('fonts/michroma-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-latin-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
/* Local fallbacks sized to match each web font, so text barely moves when the fonts arrive.
   Numbers measured with fontTools against Arial (Liberation Sans and Arimo share its metrics). */
@font-face {
  font-family: 'Michroma Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Arimo');
  size-adjust: 142.11%;
  ascent-override: 81.36%;
  descent-override: 18.69%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Arimo');
  size-adjust: 106.87%;
  ascent-override: 90.65%;
  descent-override: 22.57%;
  line-gap-override: 0%;
}

/* 2. Brand tokens: copied unchanged from C:/SideProjects/ChiVentures/brand/tokens.css (the logo kit's
   palette, adopted 2026-11-18, #155/#156). The only colour values on the site. To change the palette,
   replace this whole block with another token file that uses the same names (README, "Colours"). --- */
/* Chi Ventures brand tokens, from the owner's email-signature logo (company brand since 2026-11-18, #155/#156).
   The same file is in the HQ kit (C:/SideProjects/ChiVentures/brand/tokens.css) and the website kit
   (projects/chi-ventures-web/brand/tokens.css). Every token name of the old HQ kit is kept, so a site built on the
   old tokens can swap the whole block. Contrast ratios are WCAG 2.1. Source: brand/source/brand_tokens.py */
:root {
  /* Core palette */
  --chi-blue: #0056FB;          /* C ring, arrow, CHI, tagline initials; links, primary buttons (5.64:1 on white) */
  --chi-blue-deep: #0044CC;     /* hover / pressed blue (7.78:1 on white) */
  --chi-blue-bright: #3B82FF;   /* the blue on dark surfaces (4.97:1 on night) */
  --chi-blue-light: #8AB2FF;    /* accents on dark (8.44:1 on night) */
  --chi-ink: #27292E;           /* V, VENTURES, tagline; body text (14.55:1 on white) */
  --chi-slate: #5D636E;         /* secondary text (6.04:1 on white, 5.54:1 on mist) */
  --chi-silver: #C9CCD2;        /* borders, dividers; decorative only (1.61:1 on white, never text) */
  --chi-mist: #F4F5F7;          /* light surface; text on dark (16.42:1 on night) */
  --chi-night: #16171B;         /* dark surface */
  --chi-white: #FFFFFF;

  /* Semantic, light theme */
  --chi-bg: var(--chi-white);
  --chi-surface: var(--chi-mist);
  --chi-text: var(--chi-ink);
  --chi-text-muted: var(--chi-slate);
  --chi-accent: var(--chi-blue);
  --chi-border: var(--chi-silver);

  /* Type. The logo needs no font: it is paths. Display stays Michroma until the owner decides #158 (Montserrat,
     which matches the wordmark); if approved, put 'Montserrat' first and serve it from the site. */
  --chi-font-display: 'Michroma', 'Arial Black', Arial, sans-serif;
  --chi-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --chi-font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chi-bg: var(--chi-night);
    --chi-surface: var(--chi-ink);
    --chi-text: var(--chi-mist);
    --chi-text-muted: #A4AAB5;     /* 7.67:1 on night */
    --chi-accent: var(--chi-blue-bright);
    --chi-border: #33363D;
  }
}
:root[data-theme="dark"] {
  --chi-bg: var(--chi-night);
  --chi-surface: var(--chi-ink);
  --chi-text: var(--chi-mist);
  --chi-text-muted: #A4AAB5;
  --chi-accent: var(--chi-blue-bright);
  --chi-border: #33363D;
}

/* 2b. The 3D mark's metals. The live 3D mark is the logo, so like the logo files it keeps the logo
   kit's own colours whichever site palette is in use: the kit's blue (since #156 the same value as
   --chi-blue above) and the graphic designer's graphite for the V (their 3D spec, matching the poster
   render). Used only by assets/hero3d.js; never for text or backgrounds. */
:root {
  --mark-3d-blue: #0056FB;
  --mark-3d-graphite: #5A5E68;
}

/* 3. Site tokens ------------------------------------------------------------
   Built only from token names that both the HQ kit and the new logo kit define (--chi-blue,
   -blue-bright, -ink, -mist, -night, -white and the semantic --chi-bg/-surface/-text/...),
   so replacing section 2 with another token file recolours the whole site (README, "Colours").
   --chi-blue-deep and --chi-blue-light exist only in the HQ kit; without them, they are mixed
   from the shared tokens below.
   Contrast (WCAG 2.1): on mist surfaces links and blue text use the deeper blue, and on dark
   surfaces the lighter blue, so text stays at 4.5:1 or more with either palette. */
:root {
  --font-display: 'Michroma', 'Michroma Fallback', 'Arial Black', Arial, sans-serif;
  --font-body: 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  --space-1: 0.25rem;  /*  4px */
  --space-2: 0.5rem;   /*  8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.5rem;   /* 24px */
  --space-6: 2rem;     /* 32px */
  --space-7: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-9: 6rem;     /* 96px */

  --gutter: 1rem;                       /* 16px on phones, see media queries */
  --max: 72rem;                         /* 1152px content width */
  --section-y: clamp(4rem, 3rem + 4vw, 7rem);
  --radius-control: 4px;                /* buttons, Contact, tags, inputs (v5) */
  --radius-card: 8px;                   /* cards, frames, media, the picker, the sheet (v5) */
  --tracking-display: 0.06em;
  --header-h: 0px;                      /* the sticky header's height (from 768 px), for pinned sections */

  /* Two blues every palette needs */
  --blue-deep: var(--chi-blue-deep, color-mix(in srgb, var(--chi-blue) 72%, #000));
  --blue-light: var(--chi-blue-light, color-mix(in srgb, var(--chi-blue-bright) 55%, var(--chi-mist)));

  /* Roles, light theme */
  --link: var(--chi-blue);
  --link-hover: var(--blue-deep);
  --link-on-surface: var(--blue-deep);
  --initial: var(--chi-blue);           /* the blue C, H and I */
  --btn-bg: var(--chi-blue);
  --btn-bg-hover: var(--blue-deep);
  --btn-text: var(--chi-white);
  --focus: var(--chi-blue);
  --grid-line: color-mix(in srgb, var(--chi-ink) 7%, transparent);
  --header-rule: var(--chi-border);
  --mark-blue: var(--chi-blue);         /* the hero mark follows the palette, like the logo kit (blue, ink) */
  --mark-ink: var(--chi-ink);
  --trace: color-mix(in srgb, var(--chi-text) 14%, transparent);

  /* Contact band: always ink, in both themes */
  --band-bg: var(--chi-ink);
  --band-text: var(--chi-mist);
  --band-muted: color-mix(in srgb, var(--chi-mist) 72%, var(--chi-ink));
  --band-link: var(--blue-light);
  --band-btn-bg: var(--chi-blue-bright);
  --band-btn-bg-hover: var(--blue-light);
  --band-btn-text: var(--chi-night);
  --band-focus: var(--blue-light);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --link: var(--chi-blue-bright);
    --link-hover: var(--blue-light);
    --link-on-surface: var(--blue-light);
    --initial: var(--chi-blue-bright);
    --btn-bg: var(--chi-blue-bright);
    --btn-bg-hover: var(--blue-light);
    --btn-text: var(--chi-night);
    --focus: var(--blue-light);
    --grid-line: color-mix(in srgb, var(--chi-mist) 6%, transparent);
    --mark-blue: var(--chi-blue-bright);
    --mark-ink: var(--chi-mist);
  }
}
:root[data-theme="dark"] {
  --link: var(--chi-blue-bright);
  --link-hover: var(--blue-light);
  --link-on-surface: var(--blue-light);
  --initial: var(--chi-blue-bright);
  --btn-bg: var(--chi-blue-bright);
  --btn-bg-hover: var(--blue-light);
  --btn-text: var(--chi-night);
  --focus: var(--blue-light);
  --grid-line: color-mix(in srgb, var(--chi-mist) 6%, transparent);
  --mark-blue: var(--chi-blue-bright);
  --mark-ink: var(--chi-mist);
}

/* 4. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--chi-bg);
  color: var(--chi-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.2; }
p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus { outline: none; }  /* the skip link's target; not itself interactive */

/* 5. Layout ---------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section-surface { background: var(--chi-surface); --link: var(--link-on-surface); --initial: var(--link-on-surface); }

/* Section head: heading left, intro right on wide screens */
.split { display: grid; gap: var(--space-5); }
.prose { max-width: 40rem; }
:where(.prose) p { font-size: 1.0625rem; }

.section-title {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* The thin blue rule from the owner's email signature, used as the section marker.
   Sits level with the first line when a long heading wraps. */
.section-title::before {
  content: "";
  flex: none;
  width: 2rem;
  height: 2px;
  margin-top: calc(0.6em - 1px);
  background: var(--chi-accent);
}

.intro { font-size: 1.125rem; color: var(--chi-text); max-width: 40rem; }

/* Small label above a heading ("Chi Ventures Products"). Live text, not a heading. */
.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--chi-text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Sentence-style subheadings (Designs page, privacy) use Inter, not Michroma */
.prose h3, .text-heading {
  margin: var(--space-6) 0 var(--space-2);
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}
.prose h3:first-child { margin-top: 0; }

/* 6. Header ---------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 10;
  padding: var(--space-3) var(--space-4);
  background: var(--chi-bg);
  color: var(--link);
  font-weight: 600;
  border: 2px solid var(--focus);
  border-radius: var(--radius-control);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--header-rule); }
/* Phones: brand on the first row, the four menu items on a second row. One row from 768 px. */
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--space-4);
  min-height: 4rem;
  padding-block: var(--space-2);
}
.site-nav { flex-basis: 100%; }

/* Header logo: the compact lockup (graphic designer's kit), 32 px tall on phones, 34 px from
   768 px (so the menu still fits on one row), 40 px from 960 px. */
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.brand-lockup { display: block; height: 2rem; width: auto; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  margin-left: calc(-1 * var(--space-2));   /* line the first word up with the logo */
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-2);
  color: var(--chi-text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 0.3em; }
.nav a[aria-current="page"] {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}
.nav .nav-contact {
  margin-left: var(--space-1);
  padding-inline: var(--space-3);
  border: 2px solid var(--chi-accent);
  border-radius: var(--radius-control);
  color: var(--link);
}
.nav .nav-contact:hover { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); text-decoration: none; }

/* 7. Hero ------------------------------------------------------------------ */
.hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem); border-bottom: 1px solid var(--header-rule); }
.hero-grid { display: grid; gap: var(--space-7); align-items: center; }
.hero-text { container-type: inline-size; }

.tagline {
  margin-bottom: var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1rem + 4vw, 3.5rem);   /* fallback for browsers without container units */
  font-size: min(4.5rem, 9.6cqi);                  /* largest size where HARMONIZE. still fits */
  line-height: 1.18;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tagline-word { display: block; }
.initial-word { display: inline-block; }
/* Colour only the first letters. Done with ::first-letter so each word stays whole for screen readers. */
.tagline-word::first-letter,
.initial-word::first-letter,
.step-title::first-letter { color: var(--initial); }

.lead {
  max-width: 34rem;
  margin-bottom: var(--space-6);
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-2) var(--space-5);
  border: 2px solid transparent;          /* shows as an outline in Windows high-contrast mode */
  border-radius: var(--radius-control);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.button:hover { background: var(--btn-bg-hover); color: var(--btn-text); text-decoration: none; }
button.button { appearance: none; cursor: pointer; }
.button-secondary { background: transparent; color: var(--link); border-color: var(--chi-accent); }
.button-secondary:hover { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.button-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Designs page hero: eyebrow, headline, sub-line, one button. Text only. */
.page-hero-copy { max-width: 48rem; }
.display-title {
  margin-bottom: var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1rem + 3vw, 3.25rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* The mark on a drawing-board grid with circuit traces. Decorative (aria-hidden).
   A 3:2 band under the text on phones, a square beside it from 768 px.
   Layers: panel background, ::before grid, .hero-spot (pointer light, JS), the SVG, ::after scan line. */
.hero-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  width: 100%;
  border: 1px solid var(--chi-border);
  border-radius: var(--radius-control);
  background-color: var(--chi-surface);
}
.hero-panel::before {                    /* the grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
  background-position: -1px -1px;
}
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.traces path, .traces circle { fill: none; stroke: var(--trace); stroke-width: 2; }
.traces circle { fill: var(--chi-surface); }
.pulse { fill: none; stroke: var(--chi-accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0.07 1.2; stroke-dashoffset: 0.07; opacity: 0; }
.mark-ring, .mark-arrow { fill: var(--mark-blue); }
.mark-v { fill: var(--mark-ink); }
.ring-draw { fill: none; stroke: var(--chi-white); stroke-width: 72; stroke-dasharray: 1; stroke-dashoffset: 0; }
.mark-trail { fill: none; stroke: url(#trail-fade); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 1; opacity: 0; }
.trail-stop-0 { stop-color: var(--mark-blue); stop-opacity: 0; }
.trail-stop-1 { stop-color: var(--mark-blue); stop-opacity: 0.85; }

/* The live 3D mark (assets/hero3d.js) and the optional poster render. Both sit over the SVG
   mark; the canvas is added by motion.js and shows only once its first frame is drawn. */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
/* The swap itself is done by motion.js with inline style properties (canvas opacity 1; poster
   hidden; flat mark opacity 0). With the poster it is instant: the canvas's first frame matches the
   poster to about 1/255 per pixel, so it can't be seen. */
/* The poster's mark fills 14-89% of its square image's width and 16-83% of its height. At 77.7% of
   the panel's width it matches the SVG mark's 58%, centred the same way. hero3d.js reads this box
   and renders the live mark onto exactly the same pixels. */
.hero-poster-wrap {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 77.7%;
  aspect-ratio: 1;
  translate: calc(-50% - 1.5%) calc(-50% + 0.5%);
}
.hero-poster { width: 100%; height: 100%; object-fit: contain; }
.hero-panel:has(.hero-poster) .hero-art .mark { display: none; }   /* with the render in place, the flat SVG mark is only the fallback */

.hero-visual { position: relative; }

/* 8. Sections ---------------------------------------------------------------- */
.section-body { margin-top: var(--space-7); }

/* Home, Designs section: the four-line list */
.pitch-list { display: grid; gap: var(--space-3); margin: var(--space-5) 0 var(--space-6); }
.pitch-list li { position: relative; padding-left: var(--space-5); font-size: 1.0625rem; }
.pitch-list li::before {                 /* short rule as the bullet; decorative */
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 0.875rem;
  height: 2px;
  background: var(--chi-accent);
}

/* Designs page: services as cards with a line icon. 1, 2 or 3 per row; any number of services. */
.services { display: grid; gap: var(--space-4); margin-top: var(--space-7); }
.service {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--chi-border);
  border-radius: var(--radius-card);
  background: var(--chi-bg);
}
.service-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-2);
  fill: none;
  stroke: var(--chi-accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-icon .ic-muted { stroke: var(--chi-text-muted); }
.service-icon .ic-pad { fill: var(--chi-bg); }
.service-icon .ic-led { fill: var(--chi-accent); stroke: none; }
.service-icon .ic-pulse { stroke-width: 3; stroke-dasharray: 0.16 1.2; opacity: 0; }
.service-icon .ic-cursor { stroke-width: 2; }
.service-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: var(--tracking-display);
  line-height: 1.45;
  text-transform: uppercase;
}
.service-body { max-width: 40rem; }
.service-body p { font-size: 1.0625rem; }
.you-get { margin-top: var(--space-3); color: var(--chi-text-muted); }
.service-body .you-get { font-size: 0.9375rem; }
.you-get-label { color: var(--chi-text); font-weight: 700; }

/* Designs page: "What we don't do yet" */
.plain-list { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
.plain-list li { margin-bottom: var(--space-2); padding-left: var(--space-1); font-size: 1.0625rem; }
.plain-list li::marker { color: var(--chi-text-muted); }

/* Designs page: "How to start a project", a real numbered list */
.numbered { display: grid; gap: var(--space-6); margin-top: var(--space-7); counter-reset: step; }
.numbered > li {
  position: relative;
  padding-top: var(--space-4);
  border-top: 2px solid var(--chi-border);
  counter-increment: step;
}
.numbered > li::after {                  /* blue tick on the line */
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 2.25rem;
  height: 2px;
  background: var(--chi-accent);
}
.numbered > li::before {                 /* the step number, also read out as text */
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: var(--space-2);
  color: var(--initial);
  font-family: var(--font-display);
  font-size: 1.125rem;
  letter-spacing: var(--tracking-display);
}
.numbered h3 { margin-top: 0; }
.numbered p { color: var(--chi-text-muted); }
.after-steps { margin-top: var(--space-7); max-width: 40rem; }
.note { color: var(--chi-text-muted); }

/* Product cards: ready for later, not used in v1 (README, "Adding a product") */
.cards { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.card {
  position: relative;
  padding: var(--space-5);
  border: 1px solid var(--chi-border);
  border-radius: var(--radius-control);
  background: var(--chi-bg);
}
.card::before {                          /* short blue rule, echoing the section marker */
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin-bottom: var(--space-4);
  background: var(--chi-accent);
}
.card-title {
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  letter-spacing: var(--tracking-display);
  line-height: 1.4;
  text-transform: uppercase;
}
.card p { color: var(--chi-text-muted); }

/* How we work: three steps, a vertical line on phones, a horizontal one on desktop */
.steps { position: relative; display: grid; gap: var(--space-6); }
.step {
  position: relative;
  padding-left: var(--space-5);
  border-left: 2px solid var(--chi-border);
}
.step::before {                          /* a blue tick where each step sits on the line */
  content: "";
  position: absolute;
  top: 0;
  left: -2px;
  width: 2px;
  height: 2.25rem;
  background: var(--chi-accent);
}
.step-title {
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}
.step p { max-width: 34rem; color: var(--chi-text-muted); }

.product-stage {
  display: inline-block;
  padding: 0.125rem var(--space-2);
  border: 1px solid currentColor;
  border-radius: var(--radius-control);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 9. Contact band and footer ------------------------------------------------ */
.band {
  --link: var(--band-link);
  --link-hover: var(--chi-white);
  --focus: var(--band-focus);
  --chi-accent: var(--band-link);
  background: var(--band-bg);
  border-top: 1px solid var(--chi-border);   /* separates it from an ink surface in dark mode */
  color: var(--band-text);
}
.band .button { background: var(--band-btn-bg); color: var(--band-btn-text); }
.band .button:hover { background: var(--band-btn-bg-hover); color: var(--band-btn-text); }
.band .button-secondary { background: transparent; color: var(--band-link); border-color: var(--band-link); }
.band .button-secondary:hover { background: var(--band-btn-bg); border-color: var(--band-btn-bg); color: var(--band-btn-text); }

.contact-email {
  margin-block: var(--space-5) var(--space-5);
  font-size: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.contact-email a { display: inline-flex; align-items: center; min-height: 44px; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.fine-print {
  margin-top: var(--space-6);
  max-width: 34rem;
  font-size: 0.875rem;
  color: var(--band-muted);
}

.site-footer {
  padding-block: var(--space-6);
  border-top: 1px solid var(--header-rule);
  color: var(--chi-text-muted);
  font-size: 0.875rem;
}
/* Footer: the full lockup (with the tagline), then the copyright line and links.
   300 px wide, the designer's minimum for a readable tagline. */
.footer-inner { display: grid; gap: var(--space-5); }
.footer-inner p { margin: 0; }
.footer-logo { display: block; height: 3.5625rem; width: auto; }   /* 57 px, the lockup's letters at the v4 size */
.footer-meta { display: grid; gap: var(--space-1); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-3); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links li + li::before {          /* the middle dot from the copy, as decoration */
  content: "\00B7";
  margin-right: var(--space-3);
  color: var(--chi-text-muted);
}
.footer-links li { display: inline-flex; align-items: center; }

/* 10. Privacy and 404 pages ------------------------------------------------- */
.page { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.page-title {
  margin-bottom: var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}
.legal { max-width: 42rem; }
.legal h2 {
  margin: var(--space-6) 0 var(--space-2);
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 700;
}
:where(.legal) p { font-size: 1.0625rem; }
.meta { color: var(--chi-text-muted); }

/* 11. Utilities, placeholders, forced colours ----------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Unresolved placeholders are loud on purpose: the site must not go live with one. */
.placeholder {
  padding: 0 0.2em;
  border-radius: var(--radius-control);
  background: #FFE58F;
  color: #0E1A33;
  outline: 1px dashed #0E1A33;
}

/* (hover colour transitions and smooth scrolling: assets/motion.css) */

@media (forced-colors: active) {
  .section-title::before, .card::before, .step::before, .numbered > li::after, .pitch-list li::before { background: CanvasText; }
  .nav .nav-contact, .button-secondary { border-color: LinkText; }
  .chip label { border-color: ButtonText; }
  .chip input:checked + label { background: Highlight; color: HighlightText; border-color: Highlight; }
  .story-tag, .story-rail { border-color: CanvasText; }
}

/* 13. Night surfaces -------------------------------------------------------------
   The heroes (home and Designs) and the process story are dark in both themes, so the metal and
   glass mark and the renders glow. Same idea as the contact band: the section re-points the
   site's role tokens at the palette's dark values. Contrast (WCAG 2.1, measured, README):
   mist text 17:1, muted text 9:1, blue initials and buttons 6:1, links 9:1 on night. */
.night {
  --chi-bg: var(--chi-night);
  --chi-surface: color-mix(in srgb, var(--chi-ink) 70%, var(--chi-night));
  --chi-text: var(--chi-mist);
  --chi-text-muted: color-mix(in srgb, var(--chi-mist) 74%, var(--chi-night));
  --chi-accent: var(--chi-blue-bright);
  --chi-border: color-mix(in srgb, var(--chi-mist) 16%, var(--chi-night));
  --header-rule: var(--chi-border);
  --link: var(--blue-light);
  --link-hover: var(--chi-white);
  --link-on-surface: var(--blue-light);
  --initial: var(--chi-blue-bright);
  --btn-bg: var(--chi-blue-bright);
  --btn-bg-hover: var(--blue-light);
  --btn-text: var(--chi-night);
  --focus: var(--blue-light);
  --grid-line: color-mix(in srgb, var(--chi-mist) 7%, transparent);
  --trace: color-mix(in srgb, var(--chi-mist) 15%, transparent);
  --mark-blue: var(--chi-blue-bright);
  --mark-ink: var(--chi-mist);
  --glow: color-mix(in srgb, var(--chi-blue) 30%, transparent);
  --glow-soft: color-mix(in srgb, var(--chi-blue) 14%, transparent);
  background-color: var(--chi-night);
  color: var(--chi-text);
  color-scheme: dark;
}
.night .button-secondary:hover { color: var(--btn-text); }

/* 14. From idea to prototype ----------------------------------------------------------
   The plain layout: five stages, one after another, each readable on its own. This is what
   shows without JavaScript, with reduced motion and in short windows. The pinned, scrubbed
   version is in section 16. */
.story { border-top: 1px solid var(--chi-border); border-bottom: 1px solid var(--chi-border); }
.story-head { margin-bottom: var(--space-7); }
.story-label {
  max-width: 34rem;
  padding-left: var(--space-3);
  border-left: 2px solid var(--chi-accent);
  color: var(--chi-text-muted);
  font-size: 0.9375rem;
}
.story-stages { display: grid; gap: var(--space-8); }
.story-stage { display: grid; gap: var(--space-5); align-items: center; }
.story-num {
  margin-bottom: var(--space-2);
  color: var(--chi-accent);
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: var(--tracking-display);
}
.story-title {
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}
.story-caption { max-width: 26rem; color: var(--chi-text-muted); font-size: 1.0625rem; }
.story-media {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--chi-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--chi-surface);
}
.story-reveal { position: absolute; inset: 0; }
.story-img { width: 100%; height: 100%; object-fit: cover; }
.story-tag {                              /* "Render", "Illustration": always visible, never hover-only */
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  z-index: 2;
  padding: 0.125rem var(--space-2);
  border: 1px solid var(--chi-border);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--chi-night) 82%, transparent);
  color: var(--chi-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
}
.story-rail { display: none; }            /* progress rail: pinned layout only */
.story-echo { margin-top: var(--space-6); font-size: 1.0625rem; }   /* Designs page: link to the story */
.story-echo a { font-weight: 600; }

/* Stage 4: example firmware, as text (invented for this page). Syntax colours are blues and greys from the tokens. */
.story-stage-code .story-media { aspect-ratio: auto; border: 0; background: none; overflow: visible; }
.story-stage-code .story-reveal { position: static; }
.story-stage-code .story-tag { position: static; display: inline-block; margin-top: var(--space-3); }
.code-card {
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  border: 1px solid var(--chi-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--chi-night) 72%, var(--chi-ink));
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--chi-border);
  color: var(--chi-text-muted);
  font-family: var(--chi-font-mono);
  font-size: 0.75rem;
}
.code-dots {
  width: 2.25rem;
  height: 0.5rem;
  background: radial-gradient(circle, var(--chi-border) 0.22rem, transparent 0.24rem) 0 50% / 0.75rem 0.5rem repeat-x;
}
.code {
  margin: 0;
  padding: var(--space-4);
  color: var(--chi-text);
  font-family: var(--chi-font-mono);
  font-size: clamp(0.6875rem, 0.62rem + 0.3vw, 0.875rem);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
.c-com { color: var(--chi-text-muted); }
.c-kw { color: var(--blue-light); }
.c-fn { color: var(--chi-text); font-weight: 700; }
.c-num { color: var(--chi-blue-bright); }

/* 15. "What do you want to build?" picker (contact block) ---------------------------------
   Native radio buttons styled as chips (arrow keys move within a group), a live preview of
   the email, and a mailto: link. Shown by picker.js only; [hidden] keeps it out otherwise. */
.picker {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 1px solid color-mix(in srgb, var(--band-text) 20%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--band-text) 4%, transparent);
}
.picker[hidden] { display: none; }
.picker-title { margin-bottom: var(--space-2); font-family: var(--font-body); font-size: 1.25rem; font-weight: 700; }
.prose .picker-intro { color: var(--band-muted); font-size: 0.9375rem; }
.picker-group { min-width: 0; margin: var(--space-5) 0 0; padding: 0; border: 0; }
.picker-legend { margin-bottom: var(--space-3); padding: 0; font-size: 0.9375rem; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid color-mix(in srgb, var(--band-text) 45%, transparent);
  border-radius: 999px;
  color: var(--band-text);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}
.chip input:hover + label { border-color: var(--band-link); }
.chip input:checked + label {
  border-color: var(--band-btn-bg);
  background: var(--band-btn-bg);
  color: var(--band-btn-text);
  font-weight: 600;
}
.chip input:checked + label::before {     /* a tick as well as the fill, so the choice doesn't rest on colour */
  content: "";
  width: 0.375rem;
  height: 0.7rem;
  margin: -0.15rem 0.05rem 0 -0.15rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}
.chip input:focus-visible + label { outline: 3px solid var(--band-focus); outline-offset: 2px; }
.picker-preview {
  margin-top: var(--space-6);
  padding: var(--space-4);
  border: 1px solid color-mix(in srgb, var(--band-text) 22%, transparent);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--band-bg) 55%, var(--chi-night));
}
.prose .picker-preview-label {
  margin-bottom: var(--space-3);
  color: var(--band-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.picker-meta { display: grid; gap: var(--space-1); margin: 0 0 var(--space-3); font-size: 0.9375rem; }
.picker-meta div { display: flex; gap: var(--space-3); }
.picker-meta dt { flex: none; min-width: 4.25rem; color: var(--band-muted); }
.picker-meta dd { margin: 0; overflow-wrap: anywhere; }
.prose .picker-body {
  margin: 0;
  padding-top: var(--space-3);
  border-top: 1px solid color-mix(in srgb, var(--band-text) 16%, transparent);
  font-size: 0.9375rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.picker .button-row { margin-top: var(--space-5); }
.prose .picker-status { min-height: 1.5em; margin: var(--space-3) 0 0; color: var(--band-muted); font-size: 0.875rem; }
.band.has-picker .picker-replaces { display: none; }

/* Breakpoints ---------------------------------------------------------------- */
@media (min-width: 768px) {
  :root { --gutter: 1.5rem; --header-h: calc(4.5rem + 1px); }
  .brand-lockup { height: 2.125rem; }
  .header-inner { flex-wrap: nowrap; min-height: 4.5rem; }
  .site-nav { flex-basis: auto; }
  .nav { justify-content: flex-end; margin-left: 0; }
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .hero-panel { aspect-ratio: 1 / 1; max-width: 26rem; margin-left: auto; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
  .numbered { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-6); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--space-7); align-items: start; }
  .split > .section-title, .split > .section-head { padding-top: 0.2em; }
  .numbered { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
  .step { padding: var(--space-5) 0 0; border-left: 0; border-top: 2px solid var(--chi-border); }
  .step::before { top: -2px; left: 0; width: 2.25rem; height: 2px; }
  .brand-lockup { height: 2.5rem; }
  .footer-inner { grid-template-columns: auto 1fr; align-items: center; column-gap: var(--space-7); }
  .footer-meta { justify-items: end; text-align: right; }
  .footer-links { justify-content: flex-end; }
  .story-stage { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--space-7); }
}

@media (min-width: 1100px) {
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  :root { --gutter: 2rem; }
}

/* 12. Motion ------------------------------------------------------------------
   v4.1: everything that moves now lives in assets/motion.css (see its header): it applies only
   when motion is on (the header switch; off by default for reduced motion). What stays here is the
   page in its final, still state, which is what reduced motion and "Motion off" show. Scroll-linked effects also need
   animation-timeline support (Chrome, Edge, Safari 26). Only transform, translate, scale,
   opacity and small SVG stroke offsets are animated. Colours come from the tokens. */

/* Header: sticky and frosted from 768 px (a colour change, not motion, so it stays on) */
@media (min-width: 768px) {
  html { scroll-padding-top: 5.5rem; }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: color-mix(in srgb, var(--chi-bg) 82%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
  }
  @supports (animation-timeline: scroll()) {
    .site-header { animation: header-glass linear both; animation-timeline: scroll(root); animation-range: 0 120px; }
  }
}

.hero-spot {
  position: absolute;
  left: 0;
  top: 0;
  width: 16rem;
  height: 16rem;
  margin: -8rem 0 0 -8rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--light) 18%, transparent) 0%, color-mix(in srgb, var(--light) 7%, transparent) 55%, transparent 100%);
  translate: var(--sx, 50%) var(--sy, 50%);
  opacity: 0;
  pointer-events: none;
}

/* (motion for this section: assets/motion.css, block 2) */

/* 16. v3 motion ------------------------------------------------------------------
   Same rules as section 12: inside "no-preference" only, colours from tokens, nothing hidden
   waiting for a script. */

/* The story's scrub position: 0.5 = stage 1 ... 4.5 = stage 5. Registered so CSS can animate it. */
@property --p { syntax: '<number>'; inherits: true; initial-value: 0.5; }
/* v5: the hero's key light leans toward the pointer by up to 4% (motion.js section 1). */
@property --kx { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --ky { syntax: '<length>'; inherits: true; initial-value: 0px; }

/* (motion for this section: assets/motion.css, block 3) */

@keyframes story-scrub { from { --p: 0.5; } to { --p: 4.5; } }
@keyframes vt-out { to { opacity: 0; translate: 0 -10px; } }
@keyframes vt-in { from { opacity: 0; translate: 0 16px; } }

@keyframes header-glass {
  from { background-color: var(--chi-bg); box-shadow: none; }
  to {
    background-color: color-mix(in srgb, var(--chi-bg) 86%, transparent);
    box-shadow: 0 12px 30px -24px color-mix(in srgb, var(--chi-ink) 70%, transparent);
  }
}
@keyframes rise-in { from { opacity: 0; translate: 0 0.35em; } to { opacity: 1; translate: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes poster-reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes initial-glow { 0% { opacity: 0; scale: 0.5; } 35% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.3; } }
@keyframes scan { 0% { opacity: 1; translate: 0 -100%; } 85% { opacity: 1; } 100% { opacity: 0; translate: 0 320%; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes v-drop { from { opacity: 0; translate: 0 -90px; } to { opacity: 1; translate: none; } }
@keyframes arrow-launch { 0% { opacity: 0; translate: -96px 98px; } 35% { opacity: 1; } 100% { opacity: 1; translate: none; } }
@keyframes trail { 0% { opacity: 1; stroke-dashoffset: 1; } 45% { opacity: 1; stroke-dashoffset: 0; } 100% { opacity: 0; stroke-dashoffset: 0; } }
@keyframes pulse-run { 0% { opacity: 1; stroke-dashoffset: 0.07; } 92% { opacity: 1; } 100% { opacity: 0; stroke-dashoffset: -1.05; } }
@keyframes reveal { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: none; } }
@keyframes fill-y { from { scale: 1 0; } to { scale: 1 1; } }
@keyframes fill-x { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes node-on { from { opacity: 0.25; } to { opacity: 1; } }
@keyframes nozzle-rise { from { translate: 0 23px; } to { translate: none; } }
@keyframes ic-pulse { 0% { opacity: 1; stroke-dashoffset: 0.16; } 90% { opacity: 1; } 100% { opacity: 0; stroke-dashoffset: -1.04; } }
@keyframes ic-cursor-move { from { translate: -14px 0; } to { translate: none; } }
@keyframes ic-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes ic-led { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes ic-focus { 0%, 100% { scale: 1; } 40% { scale: 0.86; } }

@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .site-header { position: static; }
  .hero-spot, .motion-switch { display: none; }
}

/* ==========================================================================
   17. v5: one drawing set, one light (art direction: ../design/review_v5/review.md; the owner,
   2026-11-19: "Yes, build v5", charcoal with the v5 lighting, #174)
   The site is a set of drawing sheets on a dark drafting table, lit by one studio light.
   - Charcoal (--chi-night) everywhere, with a quiet blueprint grid whose lines sit on the content
     edge (from 1344 px also on the 720 px centre line). Fine grain over everything, so no light
     gradient bands.
   - Light only comes from things that give it off: the hero's key light behind the 3D mark, the
     top edge of every section (its light bar and a pool that reveals the grid), the blue C, H and I,
     and the signal traces. Nothing else glows at rest, and there are no blue shadows.
   - One component language: solid surfaces with a lit top edge (--surface-sheet, -1, -2),
     hairlines (--line, --line-strong), radius 4 for controls and 8 for cards; 999 only for the
     picker's choices and the Motion toggle.
   - Every two-column layout splits exactly on the centre line (the left column keeps 4rem of air),
     and every section opens the same way: sheet number, tick, eyebrow, title.
   All colours are token mixes; brand/tokens.css is unchanged. Contrast: README, "Colours".
   ========================================================================== */
:root {
  --max: 80rem;                                         /* 1280 px content width */
  --section-y: clamp(4rem, 1.6rem + 7.2vw, 8rem);       /* 128 px at 1440: four 32 px grid units */
  --head-gap: clamp(2rem, 1rem + 3vw, 4rem);            /* from a section's head to its body */
  --band-h: clamp(4.5rem, 2.5rem + 6.2vw, 9rem);        /* the capability band: the first screen's floor */
  --fs-h1: clamp(2.25rem, 1.2rem + 3vw, 4rem);          /* Contact, privacy and 404 titles (the hero H1's size) */
  --fs-h2: clamp(2rem, 1.25rem + 2.2vw, 3.25rem);       /* section titles, 52 px at 1440 */
  --fs-lead: clamp(1.1875rem, 1.05rem + 0.55vw, 1.4375rem);   /* every lead, 23 px at 1440 */
  --fs-body: clamp(1.0625rem, 1rem + 0.15vw, 1.125rem);       /* body text, 18 px at 1440 */
  --surface-sheet: color-mix(in srgb, var(--chi-ink) 28%, var(--chi-night));   /* Products sheet, privacy panel */
  --surface-1: color-mix(in srgb, var(--chi-ink) 45%, var(--chi-night));       /* cards, the picker */
  --surface-2: color-mix(in srgb, var(--chi-ink) 80%, var(--chi-night));       /* the picker's preview */
  --line: color-mix(in srgb, var(--chi-mist) 11%, transparent);                /* dividers */
  --line-strong: color-mix(in srgb, var(--chi-mist) 20%, transparent);         /* card edges */
  --edge-lit: inset 0 1px 0 color-mix(in srgb, var(--chi-mist) 7%, transparent);   /* a top edge catching the light */
  --light: var(--chi-blue);                             /* the colour of light: 2 to 24% inside light shapes only */
  --mark-line: color-mix(in srgb, var(--chi-blue-light) 55%, transparent);     /* crop marks, dimension lines */
  --grid-minor: color-mix(in srgb, var(--chi-mist) 5%, transparent);           /* the grid where light falls */
  --grid-major: color-mix(in srgb, var(--chi-mist) 9%, transparent);
  --page-grid-minor: color-mix(in srgb, var(--chi-mist) 2.5%, transparent);    /* the quiet page grid */
  --page-grid-major: color-mix(in srgb, var(--chi-mist) 4.5%, transparent);
  --grid-x-major: var(--gutter);                        /* every grid: vertical lines start on the content edge */
  --grid-x-minor: var(--gutter);
}
@media (min-width: 1344px) {                            /* content 1280 wide and centred: lines on the edges and the centre line */
  :root { --grid-x-major: calc(50% + 80px); --grid-x-minor: calc(50% + 16px); }
}

/* Page base (M1, M6): charcoal, the quiet grid, grain on top; the footer sits at the bottom of every page. */
html { background-color: var(--chi-night); color-scheme: dark; }
body.night { min-height: 100svh; display: flex; flex-direction: column; background-color: transparent; }
body.night > main { flex: 1 0 auto; }
main { counter-reset: sheet; }
body.night::before {                     /* the drafting table's grid: quiet, aligned, fading to the edges */
  content: "";
  position: fixed;
  top: -20vh;
  bottom: -20vh;
  left: 0;
  right: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, var(--page-grid-major) 1px, transparent 1px),
    linear-gradient(var(--page-grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--page-grid-minor) 1px, transparent 1px),
    linear-gradient(var(--page-grid-minor) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: var(--grid-x-major) -1px, 0 -1px, var(--grid-x-minor) -1px, 0 -1px;
  -webkit-mask-image: radial-gradient(65vw 75vh at 50% 35%, var(--chi-ink) 35%, transparent 100%);
  mask-image: radial-gradient(65vw 75vh at 50% 35%, var(--chi-ink) 35%, transparent 100%);
}
body.night::after {                      /* fine grain over everything: dithers every light gradient */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: url(grain.svg) 0 0 / 180px 180px;
}

/* Header (S7): one bordered control (Contact); the Motion switch is a quiet toggle (section 19). */
.site-header { border-bottom-color: var(--line); }
.nav .nav-contact { border-width: 1.5px; border-color: var(--chi-blue-bright); color: var(--chi-blue-light); }

/* Controls (M5, N4): 1.5 px borders; secondary buttons fill 14% blue on hover, primary ones fill solid. */
.button { border-width: 1.5px; }
.night .button-secondary:hover,
.night .band .button-secondary:hover {
  background: color-mix(in srgb, var(--chi-blue-bright) 14%, transparent);
  border-color: var(--chi-blue-bright);
  color: var(--chi-blue-light);
}

/* ---- The hero (M1, M2, S11): an object on the lit drawing board ------------------------------ */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: 2rem 2.5rem;
  border: 0;
  background-color: var(--chi-night);
  background-image: none;
}
.hero::before {                          /* the one key light, behind the 3D mark; leans toward the pointer (motion.js) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(28rem 22rem at calc(55% + var(--kx, 0px)) calc(78% + var(--ky, 0px)),
    color-mix(in srgb, var(--light) 24%, transparent) 0%,
    color-mix(in srgb, var(--light) 13%, transparent) 25%,
    color-mix(in srgb, var(--light) 5%, transparent) 55%,
    transparent 100%);
}
.hero::after {                           /* the board's grid, shown only where the key light falls */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: var(--grid-x-major) 0, 0 0, var(--grid-x-minor) 0, 0 0;
  -webkit-mask-image: radial-gradient(26rem 20rem at calc(55% + var(--kx, 0px)) calc(78% + var(--ky, 0px)), var(--chi-ink) 0%, color-mix(in srgb, var(--chi-ink) 50%, transparent) 45%, transparent 100%);
  mask-image: radial-gradient(26rem 20rem at calc(55% + var(--kx, 0px)) calc(78% + var(--ky, 0px)), var(--chi-ink) 0%, color-mix(in srgb, var(--chi-ink) 50%, transparent) 45%, transparent 100%);
}
.hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.hero-text { padding-right: 0; }
.tagline { font-size: min(4.5rem, 10cqi); }   /* 64 px in a 640 px half; "HARMONIZE." is 606 px in Michroma, 597 in the fallback */
.tagline-word::first-letter { text-shadow: 0 0 28px color-mix(in srgb, var(--chi-blue-bright) 55%, transparent); }
.lead, .lead-xl, .intro, .sheet-lead { font-size: var(--fs-lead); line-height: 1.45; letter-spacing: -0.012em; }
@media (max-width: 479px) {              /* phones: two equal full-width buttons */
  .hero .button-row .button { flex: 1 1 100%; }
}

/* The 3D frame: crop marks, not a box. Fills the right half from 960 px; full width at 16:10 below. */
.hero-panel {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  margin: 0;
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: clip;
  overflow-clip-margin: 2.5rem;          /* the traces fade out past the frame; the opening scan line stays near it */
}
.hero-panel::before {                    /* four 20 px crop marks at the frame's corners */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(var(--mark-line), var(--mark-line)) 0 0 / 20px 1px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 0 0 / 1px 20px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 100% 0 / 20px 1px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 100% 0 / 1px 20px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 0 100% / 20px 1px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 0 100% / 1px 20px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 100% 100% / 20px 1px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 100% 100% / 1px 20px no-repeat;
}
.hero-art {                              /* the traces run past the frame and fade instead of being cut */
  inset: -6%;
  width: 112%;
  height: 112%;
  -webkit-mask-image: radial-gradient(closest-side, var(--chi-ink) 55%, transparent 98%);
  mask-image: radial-gradient(closest-side, var(--chi-ink) 55%, transparent 98%);
}
.traces path, .traces circle { stroke: color-mix(in srgb, var(--chi-mist) 16%, transparent); stroke-width: 1.5; }
.traces circle { fill: var(--chi-night); }
.traces .hot { stroke: color-mix(in srgb, var(--chi-blue-bright) 70%, transparent); }
@media (max-width: 959px) { .hero-poster-wrap { width: 58%; } }   /* phones and tablets: the mark with air round it in the 16:10 frame (as the approved 390 mock); hero3d.js follows this box */
.hero-visual::before {                   /* a soft contact shadow under the mark (N2) */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 13%;
  width: 44%;
  height: 6%;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--chi-night) 85%, transparent), transparent);
  filter: blur(6px);
  pointer-events: none;
}
@media (min-width: 960px) {
  .hero { padding-block: 3rem; }
  .hero::before {
    background: radial-gradient(42rem 30rem at calc(50% + 20rem + var(--kx, 0px)) calc(46% + var(--ky, 0px)),
      color-mix(in srgb, var(--light) 24%, transparent) 0%,
      color-mix(in srgb, var(--light) 15%, transparent) 22%,
      color-mix(in srgb, var(--light) 7%, transparent) 48%,
      color-mix(in srgb, var(--light) 2%, transparent) 74%,
      transparent 100%);
  }
  .hero::after {
    -webkit-mask-image: radial-gradient(46rem 34rem at calc(50% + 20rem + var(--kx, 0px)) calc(46% + var(--ky, 0px)), var(--chi-ink) 0%, color-mix(in srgb, var(--chi-ink) 55%, transparent) 45%, color-mix(in srgb, var(--chi-ink) 15%, transparent) 75%, transparent 100%);
    mask-image: radial-gradient(46rem 34rem at calc(50% + 20rem + var(--kx, 0px)) calc(46% + var(--ky, 0px)), var(--chi-ink) 0%, color-mix(in srgb, var(--chi-ink) 55%, transparent) 45%, color-mix(in srgb, var(--chi-ink) 15%, transparent) 75%, transparent 100%);
  }
  .hero-grid { grid-template-columns: 1fr 1fr; column-gap: 0; }
  .hero-panel { aspect-ratio: auto; height: min(34rem, calc(100svh - var(--header-h) - var(--band-h) - 6rem)); min-height: 24rem; }
  .hero-visual::after {                  /* a dimension line under the frame: drawing language, no number (N6) */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1.25rem;
    height: 9px;
    --d: color-mix(in srgb, var(--chi-blue-light) 35%, transparent);
    background:
      linear-gradient(var(--d), var(--d)) 0 50% / 100% 1px no-repeat,
      linear-gradient(var(--d), var(--d)) 0 0 / 1px 100% no-repeat,
      linear-gradient(var(--d), var(--d)) 100% 0 / 1px 100% no-repeat;
    pointer-events: none;
  }
}
@media (min-width: 960px) and (min-height: 700px) {   /* the first screen ends with the band */
  .hero { min-height: calc(100svh - var(--header-h) - var(--band-h)); display: grid; align-items: center; }
}

/* ---- The band (S9): the hero's floor. Hairlines, no fill; its top edge catches the key light. ---- */
.ticker {
  position: relative;
  display: grid;
  align-items: center;
  height: var(--band-h);
  padding-block: 0;
  overflow: hidden;
  border-block: 1px solid var(--line);
  border-top: 0;
  background: none;
}
.ticker::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--line) 0%, var(--line) 45%, color-mix(in srgb, var(--chi-blue-light) 55%, transparent) 55%, color-mix(in srgb, var(--chi-blue-light) 55%, transparent) 72%, var(--line) 95%);
}
.ticker-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, var(--chi-ink) 6%, var(--chi-ink) 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, var(--chi-ink) 6%, var(--chi-ink) 94%, transparent);
}
.ticker-row {
  display: flex;
  width: max-content;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 0.9rem + 3.4vw, 4.25rem);
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker-row span { display: inline-flex; align-items: center; color: var(--chi-text); }
.ticker-row span:nth-child(odd) { color: transparent; -webkit-text-stroke: 1.2px var(--blue-light); }
.ticker-row span::after {                /* the signal dots: the only glow in the band */
  content: "";
  flex: none;
  width: 0.2em;
  height: 0.2em;
  margin-inline: 0.7em;
  border-radius: 50%;
  background: var(--chi-blue-bright);
  box-shadow: 0 0 6px var(--chi-blue-bright);
}

/* ---- Sections (M1, S1): every section is a sheet lit from its top edge ------------------------
   In the top --lit of each section: a pool of light, the grid it reveals, and darkness that fades
   the grid away from the light, over a night base (so the page grid never doubles up with it).
   All in the section's own background, so the light scrolls with its sheet. */
main > .section {
  --lit: 30rem;
  position: relative;
  container-type: inline-size;
  counter-increment: sheet;
  padding-block: var(--section-y);
  background:
    radial-gradient(ellipse 44% 100% at 50% 0, color-mix(in srgb, var(--light) 11%, transparent) 0%, color-mix(in srgb, var(--light) 5%, transparent) 40%, color-mix(in srgb, var(--light) 1.5%, transparent) 72%, transparent 100%) 50% 0 / 100% var(--lit) no-repeat,
    radial-gradient(ellipse 48% 100% at 50% 0, transparent 0%, color-mix(in srgb, var(--chi-night) 72%, transparent) 55%, var(--chi-night) 92%) 50% 0 / 100% var(--lit) no-repeat,
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px) var(--grid-x-major) 0 / 160px var(--lit) repeat-x,
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px) var(--grid-x-minor) 0 / 32px var(--lit) repeat-x,
    repeating-linear-gradient(var(--grid-minor) 0 1px, transparent 1px 32px) 0 0 / 100% var(--lit) no-repeat,
    linear-gradient(var(--chi-night), var(--chi-night)) 0 0 / 100% var(--lit) no-repeat;
}
main > .section::before {                /* the light bar: the section's light source (the trace runs along it, motion.css) */
  content: "";
  position: absolute;
  top: 0;
  left: max(var(--gutter), 50% - var(--max) / 2);
  right: max(var(--gutter), 50% - var(--max) / 2);
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--chi-blue-light) 35%, transparent) 15%, color-mix(in srgb, var(--chi-blue-light) 75%, transparent) 50%, color-mix(in srgb, var(--chi-blue-light) 35%, transparent) 85%, transparent);
}
.story { border: 0; }

/* The opener (S1): sheet number, tick, eyebrow, then the title at H2 size. The number is CSS
   counter text with empty alternative text, so screen readers skip it; no words are added. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--chi-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}
.eyebrow::before {                       /* the tick (the Designs hero's eyebrow has no sheet number) */
  content: "";
  flex: none;
  width: 3rem;
  height: 1px;
  border-radius: 0;
  background: var(--chi-blue-bright);
  box-shadow: none;
}
.section-title {
  flex-direction: column;
  gap: 1.25rem;
  font-size: min(var(--fs-h2), 7.6cqi);  /* the section is the container: "INFORMATION" still fits at 360 px */
  line-height: 1.06;
  letter-spacing: 0.02em;
  text-wrap: balance;
  text-shadow: none;
}
.section-title::before { content: none; }
.split > .section-title, .split > .section-head { padding-top: 0; }
main > .section .eyebrow:has(+ .section-title)::before,   /* only the eyebrow that opens a title carries the number */
main > .section .section-title::before {
  content: counter(sheet, decimal-leading-zero);
  content: counter(sheet, decimal-leading-zero) / "";
  flex: none;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding-right: 3.75rem;                /* 12 px of air, then the 48 px tick */
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(var(--chi-blue-bright), var(--chi-blue-bright)) 100% 50% / 3rem 1px no-repeat;
  color: var(--chi-blue-light);
  font: 400 0.8125rem/1 var(--font-display);
  letter-spacing: 0.08em;
}
main > .section .eyebrow + .section-title::before { content: none; }

/* Type (M3, S14) */
:where(.prose) p, .service-body p, .numbered p, .legal p { font-size: var(--fs-body); }
.lead-xl { max-width: 34rem; margin: 0; color: var(--chi-text); font-weight: 500; text-wrap: pretty; }

/* Every two-column layout splits on the centre line (M4) */
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; column-gap: 0; align-items: end; }
  .split > :first-child { padding-right: 4rem; }
}

/* Cards (M5): one surface, a lit top edge, hairline edges, radius 8. No glass, no shadows. */
.service, .step-panel, .contact .picker {
  position: relative;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface-1);
  box-shadow: var(--edge-lit);
}
.service-icon { width: 3.5rem; height: 3.5rem; margin-bottom: 1.5rem; stroke-width: 1.6; filter: none; }
.service-icon .ic-pad { fill: var(--surface-1); }
.service-title { font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem); }

/* ---- Products (S2): a finished drawing sheet ----------------------------------------------- */
.sheet {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: clamp(1.5rem, 0.5rem + 4vw, 4rem);
  border: 1px solid color-mix(in srgb, var(--chi-blue-light) 24%, transparent);
  border-radius: var(--radius-card);
  background: var(--surface-sheet);
  box-shadow: var(--edge-lit);
  overflow: visible;
}
.sheet::before {                         /* the inner drawing frame */
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid color-mix(in srgb, var(--chi-blue-light) 14%, transparent);
  border-radius: var(--radius-control);
  pointer-events: none;
}
.sheet::after {                          /* registration marks in the four corners */
  content: "";
  position: absolute;
  inset: 24px;
  pointer-events: none;
  --m: color-mix(in srgb, var(--chi-blue-light) 45%, transparent);
  background:
    linear-gradient(var(--m), var(--m)) 0 0 / 14px 1px no-repeat, linear-gradient(var(--m), var(--m)) 0 0 / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 0 / 14px 1px no-repeat, linear-gradient(var(--m), var(--m)) 100% 0 / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 100% / 14px 1px no-repeat, linear-gradient(var(--m), var(--m)) 0 100% / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 100% / 14px 1px no-repeat, linear-gradient(var(--m), var(--m)) 100% 100% / 1px 14px no-repeat;
}
.sheet-lead { max-width: 34rem; margin: 1.5rem 0 0; color: var(--chi-text); font-weight: 400; }
.sheet-foot { display: grid; gap: 2rem; margin-top: 3rem; align-items: end; }
.dim-line { display: block; width: 100%; height: 22px; overflow: hidden; color: var(--mark-line); }
.chi-titleblock { justify-self: end; width: min(20rem, 100%); height: auto; }
@media (min-width: 960px) {
  .sheet { grid-template-columns: 1fr 1fr; }
  .sheet-head { padding-right: 4rem; }
  .sheet-lead { margin: 0; }
  .sheet-foot { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 4rem; }
  .dim-line { width: calc(100% - 4rem); }
}
/* Asset A1 (graphic-designer): colours from the tokens through currentColor */
.chi-titleblock { color: var(--chi-blue-light); }
.chi-titleblock .tb-mark-blue { color: var(--chi-blue-bright); }
.chi-titleblock .tb-mark-v { color: var(--chi-mist); }

/* ---- Designs pitch (S3): the CTA in the head; the four lines as one parts-list strip ---------- */
.pitch-head { display: grid; gap: 1.5rem; }
.pitch-actions { margin-top: 1.75rem; }
.pitch-tiles {
  display: grid;
  gap: 0;
  margin-top: var(--head-gap);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface-1);
  box-shadow: var(--edge-lit);
  overflow: hidden;
}
.pitch-tiles > .pitch-tile {             /* cells of the strip: no surface of their own */
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.5rem 1.25rem;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.pitch-tiles > .pitch-tile + .pitch-tile { border-top: 1px solid var(--line); }
.pitch-tile .service-icon { width: 2.75rem; height: 2.75rem; margin: 0; }
.pitch-tile p { margin: 0; color: var(--chi-text-muted); font-size: var(--fs-body); }
.pitch-tile strong { display: block; margin-bottom: var(--space-2); color: var(--chi-text); font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
@media (min-width: 640px) {
  .pitch-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pitch-tiles > .pitch-tile { display: block; padding: 2rem 1.75rem 2.25rem; }
  .pitch-tiles > .pitch-tile + .pitch-tile { border-top: 0; }
  .pitch-tiles > .pitch-tile:nth-child(even) { border-left: 1px solid var(--line); }
  .pitch-tiles > .pitch-tile:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .pitch-tile .service-icon { width: 3.5rem; height: 3.5rem; margin-bottom: 1.5rem; }
}
@media (min-width: 960px) {
  .pitch-head { grid-template-columns: 1fr 1fr; column-gap: 0; align-items: end; }
  .pitch-head > .section-head { padding-right: 4rem; }
}
@media (min-width: 1200px) {             /* four cells; the dividers land on 400, 720 and 1040 at 1440 */
  .pitch-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pitch-tiles > .pitch-tile:nth-child(n + 3) { border-top: 0; }
  .pitch-tiles > .pitch-tile + .pitch-tile { border-left: 1px solid var(--line); }
}

/* ---- Designs page services (S12): v3's even cards on the v5 surface ------------------------- */
.services { margin-top: var(--head-gap); }
.services .service-icon { width: 3rem; height: 3rem; margin-bottom: var(--space-2); stroke-width: 1.75; }
.story-echo { font-size: var(--fs-lead); letter-spacing: -0.012em; }

/* ---- From idea to prototype (S4, M8 in motion.css) ------------------------------------------ */
.story-head { margin-bottom: var(--head-gap); }
.story-head .prose { max-width: 34rem; }
.story-label { margin-top: 1.25rem; }
.story-media { border: 1px solid var(--line-strong); border-radius: var(--radius-card); background: var(--surface-1); box-shadow: var(--edge-lit); }
.story-title { font-size: clamp(1.5rem, 1rem + 1.75vw, 2.5rem); }
.story-caption { max-width: 30rem; font-size: var(--fs-body); }
.story-num { color: var(--blue-light); }
.story-tag { border-color: var(--line-strong); background: color-mix(in srgb, var(--chi-night) 85%, transparent); }
.code-card { border: 1px solid var(--line-strong); border-radius: var(--radius-card); background: var(--surface-1); box-shadow: var(--edge-lit); }
.code-bar { border-bottom-color: var(--line); }
.c-num { color: color-mix(in srgb, var(--chi-blue-light) 55%, var(--chi-mist)); }   /* blue text on a card uses the light blue */
@media (min-width: 960px) {
  .story-stage { grid-template-columns: 3fr 5fr; column-gap: 0; }   /* media from 560 to 1360 at 1440 */
  .story-copy { padding-right: 4rem; }
}

/* ---- How we work (S5) ---------------------------------------------------------------------- */
.how-head { display: grid; gap: 1.5rem; margin-bottom: var(--head-gap); }
@media (min-width: 960px) {
  .how-head { grid-template-columns: 1fr 1fr; column-gap: 0; align-items: end; }
  .how-head > :first-child { padding-right: 4rem; }
}
.how .steps {
  --node: clamp(1.25rem, 0.9rem + 1.6vw, 3rem);
  position: relative;
  display: grid;
  grid-template-columns: none;
  gap: clamp(3rem, 2rem + 4vw, 6.5rem);
  padding-left: calc(var(--node) + clamp(1rem, 0.6rem + 1.5vw, 2.5rem));
  container-type: inline-size;
}
.how .steps::before {                    /* the trace */
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0;
  left: calc(var(--node) / 2 - 1px);
  width: 2px;
  background: color-mix(in srgb, var(--chi-mist) 12%, transparent);
}
.how .step { position: relative; padding: 0; border: 0; }
.how .step::before {                     /* the node, centred on the capitals (Michroma: their centre is 0.57 em below the line top) */
  top: calc(min(10.5rem, 10cqi) * 0.57 - 8px);
  left: calc(-1 * (var(--node) + clamp(1rem, 0.6rem + 1.5vw, 2.5rem)) + var(--node) / 2 - 8px);
  width: 16px;
  height: 16px;
  border: 2px solid var(--chi-blue-bright);
  border-radius: 50%;
  background: var(--chi-night);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--chi-blue) 20%, transparent), 0 0 6px color-mix(in srgb, var(--chi-blue-bright) 60%, transparent);
}
.how .step-title {
  margin-bottom: var(--space-5);
  font-size: min(10.5rem, 10cqi);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--chi-text);
}
.step-panel {                            /* all three start on the centre line */
  display: grid;
  gap: var(--space-3);
  max-width: 40rem;
  margin-left: auto;
  margin-right: 0;
  padding: var(--space-6);
}
.step-num { margin: 0; color: var(--chi-blue-light); font-family: var(--font-display); font-size: 1.5rem; letter-spacing: var(--tracking-display); }
.how .step p:not(.step-num) { max-width: none; color: var(--chi-text); font-size: var(--fs-body); }

/* ---- About (M7) ---------------------------------------------------------------------------- */
.about-grid { display: grid; gap: var(--space-6) 0; }
.about-statement {
  margin: 0;
  padding-left: clamp(1rem, 0.5rem + 1.5vw, 2rem);
  border-left: 3px solid var(--chi-blue-bright);
  box-shadow: none;
  color: var(--chi-text);
  font-size: clamp(1.375rem, 1rem + 1.2vw, 2rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.018em;
  text-wrap: pretty;
}
.about-owner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); }
.about-owner p { margin: 0; max-width: 34rem; color: var(--chi-text-muted); font-size: var(--fs-body); }
.owner-photo { width: 10rem; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--line-strong); border-radius: var(--radius-card); }
.chi-spell { margin: 0; color: var(--chi-text-muted); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.chi-spell .initial-word {               /* C, H and I at size, spelling CHI; the rest of each word smaller */
  display: block;
  color: color-mix(in srgb, var(--chi-mist) 62%, var(--chi-night));
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 0.9rem + 1.4vw, 2.25rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
}
.chi-spell .initial-word:first-of-type { margin-top: var(--space-5); }
.chi-spell .initial-word::first-letter { /* every initial gets the same 1.10 em advance, so the word-rests line up */
  padding-right: 0.05em;                 /* C: 1.05 em wide in Michroma */
  color: var(--chi-blue-bright);
  font-size: 3em;
  line-height: 0.95;
  text-shadow: 0 0 28px color-mix(in srgb, var(--chi-blue-bright) 55%, transparent);
}
.chi-spell .initial-word:nth-of-type(2)::first-letter { padding-right: 0.03em; }   /* H: 1.07 em */
.chi-spell .initial-word:nth-of-type(3)::first-letter { padding-right: 0.82em; }   /* I: 0.28 em */
@media (min-width: 1100px) {             /* 5fr 3fr: the CHI column starts on 880 at 1440, a major grid line */
  .about-grid { grid-template-columns: 5fr 3fr; column-gap: 0; grid-template-areas: "title chi" "statement chi" "owner chi"; align-items: start; }
  .about-grid > .section-title { grid-area: title; padding-right: 4rem; }
  .about-statement { grid-area: statement; margin-right: 4rem; }
  .about-owner { grid-area: owner; padding-right: 4rem; }
  .chi-spell { grid-area: chi; justify-self: start; }
}

/* ---- Contact (S6): bookends the hero ------------------------------------------------------- */
.contact-grid { max-width: calc(var(--max) + 2 * var(--gutter)); display: grid; gap: var(--head-gap); }
.contact .section-title { font-size: min(var(--fs-h1), 9cqi); line-height: 1.04; }
.contact-intro > p:not(.contact-email):not(.fine-print) { max-width: 30rem; margin-top: 1.5rem; font-size: var(--fs-lead); line-height: 1.45; letter-spacing: -0.012em; }
.contact-email { font-size: clamp(1.375rem, 1rem + 1.6vw, 2.25rem); letter-spacing: -0.018em; }
.contact .picker { margin: 0; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.contact .picker:focus-within { border-color: color-mix(in srgb, var(--chi-blue-bright) 60%, transparent); }
.contact .picker-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; letter-spacing: 0.03em; line-height: 1.2; text-transform: uppercase; }
.picker-preview { border-color: var(--line); border-radius: var(--radius-control); background: var(--surface-2); }
@media (min-width: 1100px) {             /* the picker starts on the centre line, 640 px wide at 1440 */
  .contact-grid { grid-template-columns: 1fr 1fr; column-gap: 0; align-items: start; }
  .contact-grid:has(> .picker[hidden]) { grid-template-columns: minmax(0, 1fr); }
  .contact-intro { position: sticky; top: calc(var(--header-h) + var(--space-6)); padding-right: 4rem; }
}

/* ---- Designs page (S12) -------------------------------------------------------------------- */
.page-hero-copy { max-width: 60rem; }
.display-title { font-size: clamp(2.25rem, 1rem + 5vw, 5.5rem); line-height: 1.04; text-shadow: none; }
.designs-hero-art {                      /* decorative circuit traces beside the headline, under the hero's key light */
  position: absolute;
  z-index: -1;
  top: 50%;
  right: max(var(--gutter), 50% - var(--max) / 2);
  width: min(38rem, 46vw);
  height: auto;
  translate: 0 -50%;
  fill: none;
  stroke: color-mix(in srgb, var(--chi-blue-light) 38%, transparent);
  stroke-width: 1.5;
  -webkit-mask-image: radial-gradient(closest-side, var(--chi-ink) 55%, transparent);
  mask-image: radial-gradient(closest-side, var(--chi-ink) 55%, transparent);
}
.designs-hero-art .node { fill: var(--chi-night); stroke: var(--chi-blue-bright); stroke-width: 2; }
.designs-hero-art .hot { stroke: var(--chi-blue-bright); stroke-width: 2; }
@media (max-width: 959px) { .designs-hero-art { opacity: 0.45; width: 90vw; } }

/* "What we don't do yet" and "Your idea and your information": heading above, then an even grid of
   items, each with a hairline and a blue tick (like "How to start a project"). */
#limits .split, #your-idea .split { grid-template-columns: minmax(0, 1fr); row-gap: var(--head-gap); align-items: start; }
#limits .split > :first-child, #your-idea .split > :first-child { padding-right: 0; }
#limits .prose, #your-idea .prose { max-width: none; }
#limits .prose > p { max-width: 46rem; }
.item-grid, .ideas { display: grid; gap: 2rem 0; margin: 2rem 0; padding: 0; list-style: none; }
.ideas { margin: 0; }
.item-grid > li, .ideas > .idea { position: relative; margin: 0; padding: 1.25rem 0 0; border-top: 1px solid var(--line); font-size: var(--fs-body); }
.item-grid > li::before, .ideas > .idea::before { content: ""; position: absolute; top: -1px; left: 0; width: 2.25rem; height: 2px; background: var(--chi-blue-bright); }
.ideas h3 { margin: 0 0 var(--space-2); font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); }
.ideas p { margin: 0; }
@media (min-width: 960px) {
  .item-grid, .ideas { grid-template-columns: 1fr 1fr; }
  .item-grid > li:nth-child(odd), .ideas > .idea:nth-child(odd) { padding-right: 4rem; }
}
.numbered { margin-top: var(--head-gap); }
.numbered > li { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.numbered > li::after { top: -1px; box-shadow: none; }
.numbered .text-heading { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); }

/* ---- Privacy (S13) and 404 (M6) ------------------------------------------------------------ */
.page { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.page-title { margin-bottom: 1rem; font-size: var(--fs-h1); line-height: 1.06; letter-spacing: 0.03em; text-shadow: none; }
.legal {
  max-width: 46rem;
  margin-top: var(--space-6);
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface-sheet);
  box-shadow: var(--edge-lit);
}
.main-nf { display: grid; align-content: center; }
.nf { position: relative; isolation: isolate; padding-block: 3rem 4rem; }
.nf::before {                            /* the key light, behind the drawing */
  content: "";
  position: absolute;
  inset: -6rem 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(28rem 22rem at 50% 70%, color-mix(in srgb, var(--light) 20%, transparent) 0%, color-mix(in srgb, var(--light) 10%, transparent) 30%, color-mix(in srgb, var(--light) 3%, transparent) 62%, transparent 100%);
}
.nf::after {                             /* the grid where that light falls */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: var(--grid-x-major) 0, 0 0, var(--grid-x-minor) 0, 0 0;
  -webkit-mask-image: radial-gradient(24rem 18rem at 50% 70%, var(--chi-ink) 0%, color-mix(in srgb, var(--chi-ink) 50%, transparent) 45%, transparent 100%);
  mask-image: radial-gradient(24rem 18rem at 50% 70%, var(--chi-ink) 0%, color-mix(in srgb, var(--chi-ink) 50%, transparent) 45%, transparent 100%);
}
.nf-grid { display: grid; gap: 2.5rem; align-items: center; }
.nf-text .lead { margin-bottom: 2.5rem; }
.nf-frame { position: relative; aspect-ratio: 16 / 10; }
.nf-frame::before {                      /* crop marks, as the hero's frame */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--mark-line), var(--mark-line)) 0 0 / 20px 1px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 0 0 / 1px 20px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 100% 0 / 20px 1px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 100% 0 / 1px 20px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 0 100% / 20px 1px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 0 100% / 1px 20px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 100% 100% / 20px 1px no-repeat,
    linear-gradient(var(--mark-line), var(--mark-line)) 100% 100% / 1px 20px no-repeat;
}
.chi-404-drawing { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (min-width: 960px) {
  .nf::before { background: radial-gradient(36rem 26rem at calc(50% + 20rem) 50%, color-mix(in srgb, var(--light) 18%, transparent) 0%, color-mix(in srgb, var(--light) 8%, transparent) 40%, color-mix(in srgb, var(--light) 2%, transparent) 72%, transparent 100%); }
  .nf::after {
    -webkit-mask-image: radial-gradient(34rem 26rem at calc(50% + 20rem) 50%, var(--chi-ink) 0%, color-mix(in srgb, var(--chi-ink) 50%, transparent) 45%, transparent 100%);
    mask-image: radial-gradient(34rem 26rem at calc(50% + 20rem) 50%, var(--chi-ink) 0%, color-mix(in srgb, var(--chi-ink) 50%, transparent) 45%, transparent 100%);
  }
  .nf-grid { grid-template-columns: 1fr 1fr; column-gap: 0; }
  .nf-text { padding-right: 4rem; }
  .nf-frame { aspect-ratio: 1.25; }      /* 640 x 512 at 1440 */
}
/* Asset A2 (graphic-designer): colours from the tokens through currentColor */
.chi-404-drawing { color: var(--chi-blue-light); }
.chi-404-drawing .nf-v, .chi-404-drawing .nf-num { color: var(--chi-mist); }
.chi-404-drawing .nf-signal { color: var(--chi-blue-bright); }
.chi-404-drawing .nf-paper { color: var(--chi-night); }

/* ---- Footer (S8): the drawing set's title block ------------------------------------------- */
.site-footer { position: relative; padding-block: 2rem 2.5rem; border-top: 0; color: var(--chi-text-muted); font-size: 0.875rem; }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
}
.footer-brand, .footer-copy { display: flex; align-items: center; margin: 0; padding: 1.25rem 1.75rem; }
.footer-logo { display: block; width: 19.875rem; max-width: 100%; height: auto; }   /* 72 px tall, 318 px wide: the tagline's capitals at about 8.7 px */
.footer-copy { border-top: 1px solid var(--line); }
.footer-links { display: flex; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.footer-links li { display: flex; align-items: center; padding: 0.25rem 1.25rem; }
.footer-links li + li { border-left: 1px solid var(--line); }
.footer-links li + li::before { content: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 600px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-links { border-left: 1px solid var(--line); }
  .footer-links li { padding-inline: 1.75rem; }
}
@media (min-width: 960px) {
  .footer-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  .footer-brand { grid-column: auto; }
  .footer-copy, .footer-links { border-top: 0; border-left: 1px solid var(--line); }
}

/* Forced colours and print */
@media (forced-colors: active) {
  body.night::before, body.night::after, .hero::before, .hero::after, .nf::before, .nf::after, .hero-visual::before { display: none; }
  main > .section { background: none; }
  main > .section::before, .ticker::before, .eyebrow::before, .hero-visual::after { background: CanvasText; }
  main > .section .eyebrow::before, main > .section .section-title::before { background: none; }
  .hero-panel::before, .nf-frame::before { display: none; }
  .item-grid > li::before, .ideas > .idea::before { background: CanvasText; }
  .ticker-row span:nth-child(odd), .how .step-title { color: CanvasText; -webkit-text-stroke: 0; }
  .chi-titleblock, .chi-404-drawing, .chi-titleblock *, .chi-404-drawing * { color: CanvasText; }
  .chi-404-drawing .nf-paper { color: Canvas; }
}
@media print {
  html { background: none; }
  body.night { --chi-text: var(--chi-ink); --chi-text-muted: var(--chi-slate); --link: var(--chi-blue); color: var(--chi-ink); }
  body.night::before, body.night::after, .hero::before, .hero::after, .ticker, .picker { display: none; }
  main > .section { background: none; }
}

/* ==========================================================================
   18. v4 motion (inside "no-preference" only, as sections 12 and 16)
   ========================================================================== */
@property --fill { syntax: '<percentage>'; inherits: false; initial-value: 100%; }

/* (motion for this section: assets/motion.css, block 4) */
@keyframes grid-drift { from { translate: 0 0; } to { translate: 0 -12vh; } }
@keyframes trace-run { from { translate: 0 0; opacity: 0; } 20% { opacity: 1; } to { translate: calc(100cqi - 2 * max(var(--gutter), 50cqi - var(--max) / 2) - 9rem) 0; opacity: 0.2; } }
@keyframes ticker-loop { from { translate: 0 0; } to { translate: -50% 0; } }
@keyframes word-fill { from { --fill: 0%; } to { --fill: 100%; } }

/* ==========================================================================
   19. The header's motion switch (v4.1): one button on every page that turns all motion off and
   on (motion.js; "off" is the reduced-motion page). Hidden until motion.js shows it, so without
   JavaScript there is no dead control. On by default; off by default where the device asks for
   reduced motion. Not remembered between pages (the site stores nothing).
   ========================================================================== */
.motion-switch[hidden] { display: none; }
.motion-switch {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  position: relative;
  min-width: 44px;
  min-height: 44px;
  margin-left: var(--space-2);
  padding: 0 var(--space-1);
  border: 0;                             /* v5 (S7): Contact is the header's only bordered control */
  border-radius: var(--radius-control);
  background: none;
  color: var(--chi-text-muted);
  font: 500 0.8125rem/1 var(--font-body);
  letter-spacing: 0.02em;
  cursor: pointer;
  appearance: none;
}
.motion-switch:hover { color: var(--chi-text); }
.motion-switch-track {                   /* a small switch: knob right and blue for on, left and grey for off */
  position: relative;
  flex: none;
  width: 1.75rem;
  height: 1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--chi-mist) 45%, var(--chi-night));
}
.motion-switch-track::after {
  content: "";
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--chi-night);
}
.motion-switch[aria-pressed="true"] .motion-switch-track { background: var(--chi-blue-bright); }
.motion-switch[aria-pressed="true"] .motion-switch-track::after { translate: 0.75rem 0; }
.motion-switch-text {                    /* the accessible name; shown as text from 1100 px */
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (max-width: 767px) {              /* phones: on the logo's row, right-hand end (no third row) */
  .header-inner { column-gap: 0; }
  .motion-switch { order: 1; margin-left: auto; margin-right: -4px; }
  .site-nav { order: 2; }
}
@media (min-width: 768px) {                /* nav and switch together on the right, beside Contact */
  .site-nav { margin-left: auto; }
  .motion-switch { margin-left: calc(1.25rem + 1px + 0.5rem); }
  .motion-switch::before {               /* a 1 px rule before the toggle, echoing the lockup's own divider */
    content: "";
    position: absolute;
    top: 50%;
    left: calc(-0.5rem - 1px);
    width: 1px;
    height: 1.5rem;
    translate: 0 -50%;
    background: color-mix(in srgb, var(--chi-mist) 20%, transparent);
    pointer-events: none;
  }
}
@media (min-width: 1100px) {
  .motion-switch { padding: 0 var(--space-2); }
  .motion-switch-text { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}
@media (forced-colors: active) {
  .motion-switch::before { background: CanvasText; }
  .motion-switch-track { border: 1px solid ButtonText; background: Canvas; }
  .motion-switch[aria-pressed="true"] .motion-switch-track { background: Highlight; }
}
