/* ==========================================================================
   tokens.css — Kuneo website design tokens (spec §6, §7.2, §8, §9, §10, §34)
   Baseline per spec §34 "Exact CSS starter tokens"; deliberate additions are
   marked. Never redefine master brand colors (#2457FF / #0F172A / #F7F8FA).
   ========================================================================== */

/* Sora, self-hosted. Variable font, latin subset, wght 100-800 (one file covers
   every weight the site uses). SIL Open Font License 1.1: see
   /assets/fonts/OFL.txt. Replaces the third-party Google Fonts stylesheet, so
   no request leaves this origin for type. */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/sora-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/sora-latin-wght-normal.woff2") format("woff2");
}

:root {
  /* ---- Color system (spec §6, redesign §8) -------------------------- */
  --kuneo-blue: #2457FF;
  --brand-ink: #0F172A;
  --off-white: #F7F8FA;
  --white: #FFFFFF;

  /* Unrevealed neutral for the homepage statement reveal. #8A93A1 is the
     lightest value that still clears the WCAG AA large-text floor on white
     (3.10:1); anything lighter fails contrast, and accessibility stays
     authoritative over art direction. */
  --x-reveal-gray: #8A93A1;

  /* Subdued-but-readable large text: a statement that is visible while a
     neighbour holds the emphasis. Gray 400 is 3.77:1 on
     white and 3.56:1 on Off White, above the 3:1 large-text floor; the
     Gray 300 it replaces measured 1.83:1. */
  --text-subdued-large: var(--gray-400);

  /* ---- Neutrals (spec §6.2 — implementation tokens only) ----------- */
  --gray-050: #F7F8FA;
  --gray-100: #EEF0F4;
  --gray-200: #DDE1E8;
  --gray-300: #B8C0CC;
  --gray-400: #7B8494;
  --gray-500: #5F6877;
  --gray-600: #4C5564;
  --gray-700: #242A33;

  /* ---- Blue scale (spec §6.3 — Blue 500 is the brand anchor) ------- */
  --blue-050: #EEF2FF;
  --blue-100: #DCE5FF;
  --blue-200: #BFD0FF;
  --blue-300: #8EABFF;
  --blue-400: #5A7FFF;
  --blue-500: #2457FF;
  --blue-600: #1B46D9;
  --blue-700: #1537B3;
  --blue-800: #102B8C;
  --blue-900: #0B1E66;

  /* The light accent used on dark surfaces. Promoted to a token because it was
     already the established value in two independent places — the partners
     page (`--pt-blue-light`) and the pre-launch gate (`--gate-blue-light`) —
     and the delivery-path icons need the same one. Naming it here means a
     third consumer does not introduce a fourth copy of the same hex, which is
     exactly what the brief asks ("reuse the real existing colour value from
     the project", "do not invent a new accent colour"). */
  --kuneo-cyan: #6688FF;

  /* ---- The line behind yours (creative direction 2026-11-10, §2, §3.1) --
     Two parallel hairlines: the INK line is the partner (their client, their
     brand, their working day); the BLUE line runs beneath it and is Kuneo.
     Consumed by the .k-lines component in components.css.
       --line-quiet          decorative only (grids, dividers), never meaning
       --line-ink / -blue    meaningful lines on light surfaces (3:1+):
                             Ink 16.8:1, Kuneo Blue 5.09:1 on Off White
       --line-*-on-ink       the same pair on an Ink surface: Gray 300 9.73:1,
                             Blue 300 8.01:1 (Kuneo Blue is only 3.30:1 there) */
  --line-quiet: #DDE1E8;
  --line-quiet-on-ink: rgba(255, 255, 255, 0.14);
  --line-ink: var(--brand-ink);
  --line-blue: var(--kuneo-blue);
  --line-ink-on-ink: var(--gray-300);
  --line-blue-on-ink: var(--blue-300);
  --lines-weight: 1px;
  --lines-gap: 6px;

  /* Spec register (direction §3.2): facts, times, sources and conditions in
     sentence case with tabular numbers. Replaces tracked uppercase eyebrows. */
  --fs-spec: 0.875rem;                        /* 14px */
  --fs-spec-sm: 0.8125rem;                    /* 13px, margin notes only */
  --lh-spec: 1.45;

  /* ---- Semantic (spec §6.1 — status/validation only) --------------- */
  --success: #137A50;
  --warning: #A85400;
  --error: #B42F3A;

  /* ---- Typography scale (spec §7.2 — exact clamps) ----------------- */
  --fs-display: clamp(3.25rem, 6vw, 5rem);   /* 52–80px  */
  --lh-display: 0.98;
  --fs-h1: clamp(3rem, 4.5vw, 4rem);          /* 48–64px  */
  --lh-h1: 1.06;
  --fs-h2: clamp(2.25rem, 3.5vw, 3.5rem);     /* 36–56px  */
  --lh-h2: 1.08;
  --fs-h3: 1.75rem;                           /* 28px     */
  --lh-h3: 1.28;
  --fs-h4: 1.25rem;                           /* 20px     */
  --lh-h4: 1.4;
  --fs-body-lg: 1.125rem;                     /* 18px     */
  --lh-body-lg: 1.67;
  --fs-body: 1rem;                            /* 16px     */
  --lh-body: 1.5;
  --fs-small: 0.875rem;                       /* 14px     */
  --lh-small: 1.43;
  --fs-label: 0.75rem;                        /* 12px     */
  --lh-label: 1.33;

  /* ---- Editorial display scale (redesign §9 — homepage only) --------
     Secondary pages keep the spec §7.2 marketing scale above; the homepage
     composes around these monumental clamps. `min(vw, svh)` mixes keep giant
     type inside short laptop viewports instead of clipping. */
  --fs-editorial-xl: clamp(3.5rem, min(12vw, 17svh), 12rem);
  --fs-editorial-lg: clamp(3rem, min(9vw, 14svh), 9.5rem);
  --fs-editorial-md: clamp(2.5rem, min(6.5vw, 11svh), 7rem);
  --lh-editorial: 0.94;
  --tracking-editorial: -0.05em;

  /* ---- Layout modes (redesign §28) ---------------------------------
     Content = existing --container-max (1200px); wide editorial shell used
     by homepage scene statements / galleries; full bleed = 100vw. */
  --shell-wide: min(1600px, calc(100% - 64px));

  /* ---- Mobile layout scale (mobile refinement §4) ------------------
     WHY A TOKEN AND NOT A LITERAL: --shell-wide subtracts a FLAT 64px, which
     is a desktop gesture — it is 2% of a 1440px window and 20% of a 320px one.
     At 320px it left a 256px column, and the eight-row capability index needs
     264px of min-content (number + "Communications" + arrow), so the list
     measured 334px inside a 320px viewport. A proportionally-sized gutter is
     the fix; the desktop value stays exactly as it was.

     --page-gutter is the single horizontal inset below 1024px, so the two
     indents the earlier audit found out of step (.container at 16px, .shell-wide
     at 32px) resolve to one number. clamp() keeps it from collapsing to nothing
     on a narrow phone or ballooning on a tablet.

     SECTION SPACING NEEDS NO TOKEN: the brief's reference is 72–104px, and the
     existing `clamp(72px, 10vh, 132px)` on .p-chapter already resolves inside
     that band on every phone (measured 72px at 320x700, 84px at 390x844), as do
     the homepage scenes' `clamp(80px, 12vh, 140px)`. Adding a second token for
     a value the viewport-height clamps already produce would be one more number
     to keep in sync for no change on screen. */
  --page-gutter: clamp(20px, 5vw, 28px);

  /* ---- Tracking (spec §7.4) ---------------------------------------- */
  --tracking-display: -0.045em;
  --tracking-h1: -0.035em;
  --tracking-h2: -0.025em;
  --tracking-h3: -0.012em;
  --tracking-body: 0;
  --tracking-overline: 0.12em;

  /* ---- Font stack (spec §7.1; design D3: variable Sora, self-hosted) - */
  --font-sora: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  /* ---- Layout (spec §8.1, §34) ------------------------------------- */
  --container-max: 1200px;
  /* Header, two independent numbers:
       --logo-box-h  the approved wordmark's box height. Sizing is driven by
                     kuneo_wordmark_black.svg: viewBox 2531×1389 with ink at
                     x 461–2071, y 461–931, so the ink is 63.6% of the box
                     width (1610/2531). The brand guideline floors the wordmark
                     at 120px wide, so the box must be ≥189px wide → 104px
                     tall. This is the mark's geometry and does not change.
       --header-h    the BAR height. The graphic is slimmer than its box: the
                     box's transparent padding bleeds symmetrically past the
                     bar (negative block margin), so the bar can shrink without
                     shrinking the mark below the guideline.
     Back to the full 104px bar after the slimmer pass: with the boundary line
     gone, the extra height reads as breathing room rather than as a strip. */
  --logo-box-h: 104px;
  --header-h: 104px;
  /* Phone bar height. The BOX above is a brand constraint, not a style choice:
     at 104px the wordmark's ink measures 121px wide against a 120px guideline
     floor, so the box cannot shrink. The bar can, because the art bleeds its
     transparent padding past it via a negative margin (see sections.css), and
     the ink is vertically centred inside the box — the mark stays optically
     centred in the shorter bar.
     104px on a phone is 12.3% of an 844px viewport spent on chrome before any
     content. Compacted to the reference 64px (<1024px, phone and tablet alike). */
  --header-h-mobile: 64px;
  --grid-gutter: 24px;                        /* tablet/desktop; 16/32px in layout.css */

  /* ---- Spacing rhythm (spec §8.3 — 8px scale) ---------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;

  /* ---- Section spacing (spec §8.2) --------------------------------- */
  --section-y-xl: 120px;
  --section-y-lg: 96px;
  --section-y-md: 80px;
  --section-y-sm: 64px;

  /* ---- Radius (spec §9.2) ------------------------------------------ */
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-large: 18px;
  --radius-pill: 999px;

  /* ---- Borders (spec §9.1 — borders before shadows) ---------------- */
  --border-subtle: 1px solid #DDE1E8;
  --border-strong: 1px solid #B8C0CC;
  /* Form field boundary (WCAG 1.4.11, B09). A field's edge is the only thing
     that tells a reader where to type, so it needs 3:1 against the surface.
     #DDE1E8 measured 1.31:1 on white. Gray 400 (#7B8494) is 3.77:1 on white
     and 3.56:1 on Off White. Decorative hairlines keep --border-subtle. */
  --border-field-color: var(--gray-400);
  --border-field: 1px solid var(--border-field-color);

  /* ---- Shadow (spec §9.3 — hover/floating only) -------------------- */
  --shadow-hover: 0 18px 50px rgba(15, 23, 42, 0.08);

  /* ---- Motion (spec §10.2 — exact) --------------------------------- */
  --ease-standard: cubic-bezier(.22, .61, .36, 1);
  --ease-emphasized: cubic-bezier(.16, 1, .3, 1);
  --duration-fast: 160ms;
  --duration-base: 280ms;
  --duration-slow: 450ms;                     /* reveal cap 400–500ms (brand motion rule, B10) */
  --duration-state: 220ms;                    /* switch / ladder state change (direction §4) */
  --duration-draw: 700ms;                     /* the one signature line draw per page */

  /* ---- z-index scale (spec §31 — 0/20/40/60/80) -------------------- */
  --z-base: 0;
  --z-sticky: 20;
  --z-menu: 40;
  --z-modal: 60;
  --z-toast: 80;

  /* ---- Focus (B09: two-tone ring, WCAG 2.4.7 / 1.4.11) --------------
     The old ring was Kuneo Blue at 45% alpha: 2.04:1 on white, 1.61:1 on Ink
     and 1.00:1 on the blue bands, so it vanished on most of /partners/.

     TWO TONES. A solid outer ring (--focus-color) plus a halo in the gap
     between the ring and the control (--focus-halo, drawn as a box-shadow).
     The pair always contains one colour that clears 3:1 against the surface
     AND the two tones clear 3:1 against each other, so the indicator reads on
     any surface, including a photograph or a gradient.

       light surfaces (white, paper, mist)  ring Blue 700, halo white
       dark surfaces (ink, partners ink)    ring white,   halo Blue 700
       Kuneo Blue bands                     ring white,   halo Ink

     Dark and blue surfaces opt in by redefining the two colours (see
     "Focus on dark surfaces" in base.css), so every component keeps reading
     the same tokens. Measured ratios are in the base.css block. */
  --focus-color: var(--blue-700);
  --focus-halo: var(--white);
  --focus-width: 3px;
  --focus-offset: 2px;
  --focus-ring: var(--focus-width) solid var(--focus-color);
  /* The halo fills exactly the offset gap, so it is never wider than the gap
     and never reads as a second, detached outline. */
  --focus-halo-shadow: 0 0 0 var(--focus-offset) var(--focus-halo);
}