/* =============================================================
   ITI Design System — Tokens
   Single source of truth for colour, type, space, motion.
   Palette is derived from the site's own imagery:
     - deep navy ...... slider-02.png ground
     - institute blue . #0071bb, the existing brand blue (kept)
     - electric ....... the brand blue taken to full saturation and lifted.
                        This was the teal of the circuit traces in
                        slider-01.jpg; it is now a blue, so the accent no
                        longer echoes that photograph and sits against it
                        instead.
     - ember .......... the orange traces in slider-01.jpg (used sparingly)
   ============================================================= */

:root {

  /* ---- Ink / dark grounds ---- */
  --iti-ink-900: #04121f;
  --iti-ink-850: #06192c;
  --iti-ink-800: #08243c;
  --iti-ink-700: #0e3553;
  --iti-ink-600: #14466c;

  /* ---- Brand ---- */
  --iti-blue:      #0071bb;
  --iti-blue-700:  #005b96;
  --iti-blue-300:  #66b3e0;
  /* The accent is the brand blue taken electric — same hue family as
     --iti-blue (#0071bb, hue 203), pushed to full saturation and lifted
     until it carries on the darkest ground. Measured: 7.94:1 on
     --iti-ink-900, 5.34:1 on --iti-ink-700. */
  --iti-electric:     #38b0ff;
  --iti-electric-rgb: 56, 176, 255;  /* for rgba() — keep in step with the above */
  --iti-electric-dim: #1b7fd0;   /* decorative only — 4.21:1 on white */
  --iti-electric-ink: #0c66cc;   /* same hue, for TEXT on light grounds
                                 (5.07:1 on white, 4.64:1 on paper) */
  --iti-ember:     #ff6a1f;   /* on the darkest grounds only */
  --iti-ember-lit: #ff8542;   /* same hue, lifted for the lighter slate
                                 (#0e3553): 5.26:1, where #ff6a1f is 4.44 */
  --iti-ember-ink: #b8430c;   /* same hue, darkened for text on light grounds
                                 (4.99:1 on paper, 5.46:1 on white) */

  /* ---- Light surfaces ---- */
  --iti-paper:    #f2f5f8;
  --iti-paper-2:  #e8edf2;
  --iti-surface:  #ffffff;

  /* ---- Text ---- */
  --iti-text:        #122230;
  --iti-text-muted:  #5c6f7e;
  --iti-text-faint:  #5c6f7e;   /* small labels on light grounds
                                   (5.21:1 on white, 4.76:1 on paper) */
  --iti-text-decor:  #8697a4;   /* decorative icons only, never text */
  --iti-on-dark:         #ffffff;
  --iti-on-dark-muted:   rgba(255, 255, 255, .72);
  --iti-on-dark-faint:   rgba(255, 255, 255, .52);

  /* ---- Lines ---- */
  --iti-line:        #dde4ea;
  --iti-line-strong: #c4d0da;
  --iti-line-dark:   rgba(255, 255, 255, .13);

  /* ---- Type ---- */
  --iti-font-sans: "IBM Plex Sans", "Roboto", "Helvetica Neue", Arial, "Segoe UI", sans-serif;
  --iti-font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --iti-fs-display: clamp(2.05rem, 1.15rem + 2.9vw, 3.5rem);
  --iti-fs-h2:      clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem);
  --iti-fs-h3:      clamp(1.05rem, .95rem + .4vw, 1.25rem);
  --iti-fs-lead:    clamp(1rem, .96rem + .22vw, 1.12rem);
  --iti-fs-body:    1rem;
  --iti-fs-sm:      .875rem;
  --iti-fs-xs:      .75rem;

  --iti-lh-tight: 1.08;
  --iti-lh-snug:  1.26;
  --iti-lh-body:  1.65;

  --iti-track-label: .14em;

  /* ---- Space (4px base) ---- */
  --iti-s-1:  .25rem;
  --iti-s-2:  .5rem;
  --iti-s-3:  .75rem;
  --iti-s-4:  1rem;
  --iti-s-5:  1.5rem;
  --iti-s-6:  2rem;
  --iti-s-7:  3rem;
  --iti-s-8:  4rem;
  --iti-s-9:  6rem;

  --iti-section-y: clamp(3.5rem, 2rem + 5vw, 6.5rem);

  /* ---- Geometry ---- */
  --iti-wrap:   1280px;
  --iti-gutter: clamp(1rem, .3rem + 2.4vw, 2.5rem);
  --iti-radius:    0px;
  --iti-radius-lg: 0px;

  /* Chamfered corner — the page's structural signature.
     The straight edges of these polygons sit 2px OUTSIDE the element, so
     only the two diagonal corners are actually cut. A polygon that runs
     exactly along the edges clips 1px borders away (the button ring
     vanished on the hero) — this keeps borders intact. */
  --iti-notch:    14px;
  --iti-notch-sm: 8px;
  --iti-clip: polygon(
    var(--iti-notch) -2px,
    calc(100% + 2px) -2px,
    calc(100% + 2px) calc(100% - var(--iti-notch)),
    calc(100% - var(--iti-notch)) calc(100% + 2px),
    -2px calc(100% + 2px),
    -2px var(--iti-notch));
  --iti-clip-sm: polygon(
    var(--iti-notch-sm) -2px,
    calc(100% + 2px) -2px,
    calc(100% + 2px) calc(100% - var(--iti-notch-sm)),
    calc(100% - var(--iti-notch-sm)) calc(100% + 2px),
    -2px calc(100% + 2px),
    -2px var(--iti-notch-sm));

  /* ---- Elevation ---- */
  --iti-shadow-1: 0 1px 2px rgba(6, 25, 44, .06), 0 2px 8px rgba(6, 25, 44, .05);
  --iti-shadow-2: 0 2px 4px rgba(6, 25, 44, .08), 0 12px 28px rgba(6, 25, 44, .10);
  --iti-glow:     0 0 0 1px rgba(var(--iti-electric-rgb), .5), 0 0 22px rgba(var(--iti-electric-rgb), .28);
  /* The halo that makes an accent mark read as lit rather than printed.
     Every bar, rule and hairline drawn in --iti-electric carries it. */
  --iti-electric-glow:      0 0 12px rgba(var(--iti-electric-rgb), .8);
  /* For an edge on a light ground, where the full halo smears. */
  --iti-electric-glow-edge: -1px 0 10px rgba(var(--iti-electric-rgb), .35);

  /* ---- Textures ---- */
  --iti-grid-line:       rgba(var(--iti-electric-rgb), .07);  /* on dark grounds */
  --iti-grid-line-light: rgba(0, 113, 187, .055);  /* on light grounds */

  /* ---- Motion ---- */
  --iti-ease: cubic-bezier(.2, .7, .3, 1);
  --iti-dur:  .32s;
}

@media (prefers-reduced-motion: reduce) {
  :root { --iti-dur: .01ms; }
}
