/* Smart Web Labs: design tokens, blue and white theme (November 2026; D36, D37).

   Every colour, type, space, radius, shadow, motion and breakpoint value the
   site uses is defined here, as a custom property. site.css and diagrams.css
   refer to these tokens only, never to a raw colour.

   Contrast ratios are WCAG 2.2, measured against the surface named. Text needs
   4.5:1 (large text, 24 px or 19 px bold and up, 3:1); control edges, icons
   and other marks need 3:1. "Separation" is the OKLab distance x 100 between
   two accents under simulated protanopia and deuteranopia (Machado, Oliveira
   and Fernandes, 2009); 10 or more is easy to tell apart. The scales were
   generated in OKLCH and are checked by tools/check-tokens.mjs. */

:root {
  color-scheme: light;

  /* ---------- Primitives: white paper and navy ink ----------
     The owner's blue and white theme (D37): crisp white surfaces, pale-blue
     alternate sections, deep navy ink, and brand blue as the main colour.
     Exact ratios: check-tokens.mjs. */

  --paper-50: #FFFFFF;   /* raised surface: cards, panels, fields */
  --paper-100: #FFFFFF;  /* the canvas: crisp white */
  --paper-200: #F1F6FF;  /* sunken surface: alternate sections, a pale blue */
  --paper-300: #E3ECFB;  /* pressed and selected surfaces */
  --paper-400: #B4C3DD;  /* muted text on navy: 6.13:1 or more on every navy surface */

  --ink-900: #0B1A33;    /* text, headings, the primary button: deep navy */
  --ink-700: #3B4964;    /* body copy: 7.48:1 or more on every surface and wash */
  --ink-600: #52607A;    /* labels, captions, placeholders: 5.25:1 or more */
  --ink-500: #75829C;    /* control edges (fields, secondary buttons): 3.32:1 or more */

  /* ---------- Primitives: brand blue and navy ----------
     Blue leads: links, glows, focus, the progress line and every page that
     isn't a service's own. 50-100 washes, 200-300 soft fills and colour on
     navy, 400-600 marks and light, 700-900 text. */

  --blue-50: #EEF4FF;
  --blue-100: #E0EAFF;
  --blue-200: #C3D6FF;
  --blue-300: #9DBDFF;   /* labels and icons on navy: 5.80:1 or more */
  --blue-400: #709CFA;
  --blue-500: #4B7CF0;
  --blue-600: #2F62DE;   /* marks and large text: 4.59:1 or more */
  --blue-700: #1E4FCC;   /* links and small text: 5.71:1 or more, incl. its washes */
  --blue-800: #1A3FA3;
  --blue-900: #172F74;

  --navy-950: #0A1730;   /* the call-to-action panel and the footer */
  --navy-900: #12264D;   /* raised on navy: chips and the switch in the footer */
  --navy-800: #163786;   /* the lit end of a navy panel; text on navy is checked against it */
  --navy-400: #7C8FB5;   /* control edges on navy: 3.35:1 or more */
  --navy-300: #9CADCD;   /* labels on navy: 4.82:1 or more */

  /* ---------- Primitives: the three service blues ----------
     Three shades of blue, one per service (owner decision D37): sky for
     Build, royal for Grow (the brand blue itself), indigo for Automate.
     Generated in OKLCH around the brand blue: Build lighter and toward cyan,
     Automate darker and toward violet, so the three differ in lightness as
     well as hue. 50-100 are washes, 200-300 soft fills, 400-500 marks on
     washes and illustration, 600-900 text and marks on the canvas.
     Separation at the 300, 500 and 700 stops (protanopia, deuteranopia):
     10.6 or more for every pair. Each also travels with its words ("01 / Build"). */

  --build-50: #F5FBFF;
  --build-100: #E4F4FF;
  --build-200: #C4E8FE;
  --build-300: #B4E2FF;  /* labels on navy: 7.93:1 on navy-800 */
  --build-400: #66C7FE;
  --build-500: #05ACEF;
  --build-600: #0793CD;
  --build-700: #0881B4;  /* large text and marks: 4.03:1 or more */
  --build-800: #026B98;  /* text: 5.25:1 or more, incl. its washes */
  --build-900: #015478;

  --grow-50: #EEF4FF;   /* the brand blue's own scale */
  --grow-100: #E0EAFF;
  --grow-200: #C3D6FF;
  --grow-300: #9DBDFF;
  --grow-400: #709CFA;
  --grow-500: #4B7CF0;
  --grow-600: #2F62DE;
  --grow-700: #1E4FCC;
  --grow-800: #1A3FA3;
  --grow-900: #172F74;

  --automate-50: #F1F3FF;
  --automate-100: #E5E8FF;
  --automate-200: #BFC6F1; /* labels on navy: 6.53:1 on navy-800 */
  --automate-300: #868FD2;
  --automate-400: #666CCC;
  --automate-500: #4C49C2; /* marks: 6.37:1 or more */
  --automate-600: #3A2BB0; /* text: 8.83:1 or more */
  --automate-700: #2F109E;
  --automate-800: #200477;
  --automate-900: #11014C;

  /* Status: errors only. Not a brand accent; always paired with an icon and words. */
  --danger-50: #FDECEA;
  --danger-700: #B3261E; /* 6.13:1 canvas, 6.38 raised, 5.72 on danger-50 */

  /* ---------- Semantic colour ---------- */

  --canvas: var(--paper-100);
  --surface: var(--paper-50);
  --surface-sunken: var(--paper-200);
  --surface-pressed: var(--paper-300);
  --text: var(--ink-900);
  --text-muted: var(--ink-700);
  --text-subtle: var(--ink-600);
  --line: rgb(11 26 51 / 0.1);          /* hairlines between surfaces (decorative) */
  --line-strong: rgb(11 26 51 / 0.16);  /* hairlines that group content */
  --grid-line: rgb(30 79 204 / 0.065);  /* blueprint grid behind heroes (decorative) */
  --grid-line-fine: rgb(30 79 204 / 0.055); /* blueprint grid inside figures (decorative) */
  --crop-mark: rgb(11 26 51 / 0.35);    /* the corner marks on a figure plate */
  --mask: var(--ink-900);               /* any opaque colour: masks read only its alpha */
  --line-control: var(--ink-500);       /* edges people must see: fields, outline buttons (3:1+) */
  --focus: var(--ink-900);              /* focus ring: navy, 16:1 or more on the canvas */
  --focus-halo: rgb(157 189 255 / 0.6); /* soft blue glow outside the ring (blue-300) */
  --selection: var(--blue-200);
  --link: var(--blue-700);              /* links in running text, on every page */
  --light: var(--blue-400);             /* light running along an edge, a sheen (decorative) */
  --sheen: rgb(251 252 255 / 0.24);     /* the band of light across a navy button (decorative) */
  --glint: rgb(255 255 255 / 0.9);      /* the light crossing the logo's blue metal once (decorative) */
  /* The backdrop (D38): soft fields of light behind every page. Each is at
     least as light as relative luminance 0.75, so any text over them keeps
     4.5:1 (labels 4.84:1, links 5.27:1, sky text 4.51:1 at the very centre). */
  --aurora-blue: #D9E5FF;
  --aurora-sky: #DDF0FF;
  --aurora-indigo: #DCDFFF;
  --button-wash: rgb(30 79 204 / 0.38); /* the primary button on hover: navy deepening to royal blue (label 12:1+) */
  --button-wash-off: rgb(30 79 204 / 0);
  --danger: var(--danger-700);
  --danger-wash: var(--danger-50);
  --success: var(--build-800);          /* "done" states reuse Build's teal, with a tick and words */
  --success-wash: var(--build-50);

  /* Navy panels: the call to action and the footer, from navy-950 to
     navy-800. Text on them is paper or muted paper; labels use the page
     accent's --accent-on-ink (5.80:1 or more on navy-800). */
  --ink-panel: var(--navy-950);
  --ink-panel-lit: var(--navy-800);
  --on-ink: var(--paper-100);
  --on-ink-muted: var(--paper-400);
  --on-ink-subtle: var(--navy-300);
  --on-ink-edge: var(--navy-400);
  --on-ink-raised: var(--navy-900);
  --on-ink-line: rgb(244 247 252 / 0.42);  /* the outline button on navy */
  --on-ink-hair: rgb(180 195 221 / 0.16);  /* hairlines on navy (decorative) */
  --on-ink-hair-strong: rgb(180 195 221 / 0.24);
  --on-ink-grid: rgb(157 189 255 / 0.08);  /* blueprint grid on navy (decorative) */

  /* The header once the page scrolls: a floating glass capsule. */
  --glass-capsule: rgb(255 255 255 / 0.86);
  --shadow-capsule: 0 1px 2px rgb(11 26 51 / 0.05), 0 14px 34px -18px rgb(23 47 116 / 0.35);


  /* The page's accent. Blue is the default (company, market and legal
     pages); service pages, cards and tiles switch with
     data-accent="build|grow|automate" and keep their own colour as markers. */
  --accent-wash: var(--blue-50);
  --accent-tint: var(--blue-100);
  --accent-soft: var(--blue-200);
  --accent-fill: var(--blue-300);
  --accent-mark: var(--blue-600);     /* lines, icons and dots on the canvas (3:1+) */
  --accent-display: var(--blue-600);  /* large headline words (3:1+) */
  --accent-text: var(--blue-700);     /* small text and labels (4.5:1+) */
  --accent-shadow: var(--blue-shadow);
  --accent-on-ink: var(--blue-300);   /* labels on the navy panels (4.5:1+ on navy-800) */

  /* Shadow tints, one per accent (the 500-600 stop at about 20 % opacity). */
  --blue-shadow: rgb(47 98 222 / 0.22);
  --build-shadow: rgb(7 147 205 / 0.22);
  --grow-shadow: var(--blue-shadow);
  --automate-shadow: rgb(58 43 176 / 0.2);

  /* ---------- Type ---------- */

  --font-display: "Fraunces", "Fraunces Fallback", "Fraunces Fallback Android", Georgia, "Times New Roman", serif;
  --font-body: "Geist", "Geist Fallback", "Geist Fallback Android", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Roboto Mono", monospace; /* code samples only; labels use Geist */

  /* A fluid scale: each size grows smoothly from a 360 px phone to a 1440 px
     screen, so headlines feel editorial on a desktop and still fit a phone. */
  --fs-lab: 0.75rem;                                     /* 12 px; 13 px from 1024 px */
  --fs-small: 0.9375rem;                                 /* 15 px */
  --fs-body: clamp(1.0625rem, 1.02rem + 0.18vw, 1.125rem); /* 17-18 px */
  --fs-lede: clamp(1.125rem, 1.03rem + 0.45vw, 1.375rem);  /* 18-22 px */
  --fs-h3: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);       /* 20-24 px */
  --fs-h2: clamp(1.875rem, 1.35rem + 2.3vw, 3.25rem);      /* 30-52 px */
  --fs-h1: clamp(2.375rem, 1.5rem + 3.9vw, 4.75rem);       /* 38-76 px, inner pages */
  --fs-display: clamp(2.75rem, 1.6rem + 5.2vw, 6.25rem);   /* 44-100 px, the home headline */

  --fw-text: 400;
  --fw-text-strong: 600;
  --fw-display: 500;
  --fw-display-strong: 600;

  --lh-tight: 1.04;
  --lh-snug: 1.25;
  --lh-body: 1.68;

  --track-display: -0.022em;
  --track-tight: -0.01em;
  --track-lab: 0.14em;

  /* ---------- Space ---------- */

  --space-1: 0.25rem;  /* 4 px */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */
  /* The side gutter: never less than 16 px, and never inside a phone's
     notch or rounded corners when it is held sideways. */
  --pad: max(clamp(16px, 5.5vw, 72px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --content: 1240px;
  --measure: 68ch;
  --section: clamp(4rem, 9vw, 8.5rem);

  /* ---------- Shape ---------- */

  --radius-sm: 12px;   /* fields, chips' focus, small panels */
  --radius: 16px;      /* cards */
  --radius-lg: 20px;   /* panels, figures */
  --radius-xl: 24px;   /* hero plates, the services panel */
  --radius-pill: 999px;
  --hairline: 1px;

  /* ---------- Depth: two levels, soft and tinted toward the accent ---------- */

  --shadow-button: 0 1px 0 rgb(251 252 255 / 0.1) inset, 0 10px 22px -14px rgb(11 26 51 / 0.7), 0 6px 20px -12px rgb(47 98 222 / 0.45);
  --shadow-rest: 0 1px 1px rgb(11 26 51 / 0.04), 0 10px 28px -18px var(--accent-shadow);
  --shadow-raised: 0 2px 4px rgb(11 26 51 / 0.05), 0 22px 44px -22px var(--accent-shadow), 0 8px 18px -12px rgb(23 47 116 / 0.14);
  --glass: rgb(255 255 255 / 0.86);       /* the canvas, translucent, behind a blur */
  --glass-solid: rgb(255 255 255 / 0.97); /* where backdrop-filter is not supported */
  --glass-blur: blur(16px) saturate(1.4);

  /* ---------- Motion: short, small and never looping ---------- */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-settle: cubic-bezier(0.34, 1.4, 0.64, 1); /* a small overshoot, then rest: needles, pins, dots */
  --dur-fast: 160ms;   /* focus rings, colour changes */
  --dur: 220ms;        /* hover lifts, panels */
  --dur-reveal: 280ms; /* scroll reveals (the brief's limit is 300 ms) */
  --lift: -2px;        /* hover lift */
  --rise: 10px;        /* reveal distance (the brief allows 8-12 px) */

  /* ---------- Layout ---------- */

  --header-h: 64px;
  --dock-h: 0px;
  /* Breakpoints. Media queries can't read custom properties, so these record
     the widths every @media rule in site.css uses, for reference. */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
  --bp-2xl: 1440px;

  --z-dock: 55;
  --z-header: 60;
  --z-skip: 100;
}

@media (min-width: 1024px) {
  :root { --header-h: 72px; --fs-lab: 0.8125rem; }
}
/* The bottom bar's height, its 1px top border included, reserved under the page. */
@media (max-width: 767.98px) {
  :root { --dock-h: calc(65px + env(safe-area-inset-bottom, 0px)); }
}
/* A phone held sideways has little height: a slimmer header and bottom bar. */
@media (max-width: 767.98px) and (max-height: 440px) and (orientation: landscape) {
  :root { --header-h: 56px; --dock-h: calc(57px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Accent switches ---------- */

[data-accent="blue"] {
  --accent-wash: var(--blue-50);
  --accent-tint: var(--blue-100);
  --accent-soft: var(--blue-200);
  --accent-fill: var(--blue-300);
  --accent-mark: var(--blue-600);
  --accent-display: var(--blue-600);
  --accent-text: var(--blue-700);
  --accent-shadow: var(--blue-shadow);
  --accent-on-ink: var(--blue-300);
}
[data-accent="build"] {
  --accent-wash: var(--build-50);
  --accent-tint: var(--build-100);
  --accent-soft: var(--build-200);
  --accent-fill: var(--build-300);
  --accent-mark: var(--build-700);
  --accent-display: var(--build-700);
  --accent-text: var(--build-800);
  --accent-shadow: var(--build-shadow);
  --accent-on-ink: var(--build-300);
}
[data-accent="grow"] {
  --accent-wash: var(--grow-50);
  --accent-tint: var(--grow-100);
  --accent-soft: var(--grow-200);
  --accent-fill: var(--grow-300);
  --accent-mark: var(--grow-600);
  --accent-display: var(--grow-600);
  --accent-text: var(--grow-700);
  --accent-shadow: var(--grow-shadow);
  --accent-on-ink: var(--grow-300);
}
[data-accent="automate"] {
  --accent-wash: var(--automate-50);
  --accent-tint: var(--automate-100);
  --accent-soft: var(--automate-200);
  --accent-fill: var(--automate-300);
  --accent-mark: var(--automate-500);
  --accent-display: var(--automate-600);
  --accent-text: var(--automate-600);
  --accent-shadow: var(--automate-shadow);
  --accent-on-ink: var(--automate-200);
}
