/* SafePlan brand tokens, blue-white edition (09/11/2026). Light is the default; dark follows the OS unless
   data-theme="light" is set, and data-theme="dark" forces it.
   The idea: the plan is a blueprint. "Blueprint blue" (deep, ink-like) + white paper + a light blue-grey desk
   surface. Safety yellow survives as ONE accent only: the signature cell ("חתומה ובתוקף"), never a field or a button.
   Every text/surface pair below was computed with the WCAG 2.x relative-luminance formula (AA: 4.5:1 text,
   3:1 UI); ratios are noted next to the pair and listed in BRAND_HE.md. Fonts: Rubik (display) + Assistant (text). */

:root {
  /* type */
  --font-display: "Rubik", "Assistant", "Arial Hebrew", Arial, sans-serif;
  --font-text: "Assistant", "Rubik", "Arial Hebrew", Arial, sans-serif;
  --fw-text: 400;
  --fw-strong: 700;
  --fw-display: 700;
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.95rem);   /* notes, captions */
  --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);    /* body 17 to 19px */
  --step-1: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);      /* statement, h3 */
  --step-2: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);           /* section heading */
  --step-3: clamp(2.6rem, 1.5rem + 5.2vw, 6.25rem);        /* hero headline */
  --leading-text: 1.55;
  --leading-display: 1.02;
  --tracking-display: -0.025em;

  /* space */
  --gutter: clamp(16px, 3vw, 32px);
  --section: clamp(88px, 12vw, 200px);
  --maxw: 1360px;
  --radius: 0px;          /* square corners everywhere, decided once (a deliberate difference from rounded SaaS cards) */
  --radius-pill: 999px;   /* only for status chips inside product fragments */

  /* colour: light */
  --bg: #FFFFFF;          /* white paper */
  --surface: #EDF1F6;     /* blue-grey desk, one tone step below paper */
  --surface-2: #DFE6EF;
  --tint: #DDE8F8;        /* light blue field (replaces the old full-yellow field) */
  --ink: #0B1B33;         /* on --bg 17.2:1, on --surface 15.2:1, on --surface-2 13.7:1, on --tint 13.9:1 */
  --muted: #4A5A70;       /* on --bg 7.0:1, on --surface 6.2:1, on --surface-2 5.6:1, on --tint 5.7:1 */
  --line: #C5CFDB;        /* only inside tables and form fields */
  --brand: #0F3D7A;       /* blueprint blue; white on it 10.7:1 */
  --on-brand: #FFFFFF;
  --on-brand-muted: #C9D8EE; /* captions on --brand 7.4:1 */
  --signal: #F5C400;      /* safety yellow, the signature cell only; --ink on it 10.5:1. Never text on white (1.6:1) */
  --on-signal: #0B1B33;
  --link: #1A56B0;        /* on --bg 7.0:1, on --surface 6.2:1, on --tint 5.7:1 */
  --action: #1A56B0;      /* primary button fill; white on it 7.0:1 */
  --on-action: #FFFFFF;
  --focus: #0B1B33;       /* 3px outline + 2px offset; on blue fields it switches to --signal (6.5:1 on --brand) */

  /* risk bands (2013 guidelines, table 1): unchanged, they carry meaning */
  --band-ok: #2F7D4F;     --on-band-ok: #FFFFFF;   /* 5.0:1 */
  --band-warn: #F5C400;   --on-band-warn: #0B1B33; /* 10.5:1 */
  --band-stop: #B3261E;   --on-band-stop: #FFFFFF; /* 6.9:1 */

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1424;
    --surface: #111E33;
    --surface-2: #1A2A44;
    --tint: #142A4D;
    --ink: #E8EEF6;       /* on --bg 15.8:1, on --surface 14.3:1 */
    --muted: #A6B4C8;     /* on --bg 8.8:1, on --surface 7.9:1 */
    --line: #2E4060;
    --brand: #10284D;     /* --ink on it 12.6:1 */
    --on-brand: #E8EEF6;
    --on-brand-muted: #C9D8EE;
    --signal: #F5C400;
    --on-signal: #0A1424;
    --link: #8DB8F2;      /* on --bg 9.0:1 */
    --action: #8DB8F2;    /* the action stays blue in the dark; --on-action on it 9.0:1 */
    --on-action: #0A1424;
    --focus: #F5C400;
    --band-ok: #3E9A63;   --on-band-ok: #0A1424;
    --band-warn: #F5C400; --on-band-warn: #0A1424;
    --band-stop: #E5534B; --on-band-stop: #0A1424;
  }
}

:root[data-theme="dark"] {
  --bg: #0A1424;
  --surface: #111E33;
  --surface-2: #1A2A44;
  --tint: #142A4D;
  --ink: #E8EEF6;
  --muted: #A6B4C8;
  --line: #2E4060;
  --brand: #10284D;
  --on-brand: #E8EEF6;
  --on-brand-muted: #C9D8EE;
  --signal: #F5C400;
  --on-signal: #0A1424;
  --link: #8DB8F2;
  --action: #8DB8F2;
  --on-action: #0A1424;
  --focus: #F5C400;
  --band-ok: #3E9A63;   --on-band-ok: #0A1424;
  --band-warn: #F5C400; --on-band-warn: #0A1424;
  --band-stop: #E5534B; --on-band-stop: #0A1424;
}
