/* WayWage design tokens (new interface).
   Every v2 color, radius and font comes from here; components read the
   --ww-* variables, never raw hex. Light is the default; dark is opt-in
   through [data-theme="dark"], which the <head> script sets from the
   user's choice (light / dark / auto). Company overrides (background tint,
   brand color) are injected after this file as a :root style block. */

/* Hanken Grotesk, SIL Open Font License 1.1 — see fonts/OFL.txt */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/hanken-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/hanken-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root.ww-v2 {
  --ww-font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* surfaces and text */
  --ww-bg: #F5F7FA;
  --ww-surface: #FFFFFF;
  --ww-surface-2: #F9FAFB;
  --ww-hover: #EEF1F5;
  --ww-ink: #0E1726;
  --ww-muted: #5E6B7E;
  --ww-line: #E4E7EC;
  --ww-line-strong: #CDD3DC;

  /* brand (overridable per company) */
  --ww-pri: #0B7A5C;
  --ww-on-pri: #FFFFFF;
  --ww-pri-soft: color-mix(in srgb, var(--ww-pri) 11%, var(--ww-surface));
  --ww-pri-text: color-mix(in srgb, var(--ww-pri) 82%, var(--ww-ink));
  --ww-link: #1F4FD1;

  /* meaning (never overridable, so alerts look the same everywhere) */
  --ww-alert: #D92D20;        /* solid: today's operational problem */
  --ww-alert-soft: #FEE4E2;   /* tint: coming due soon */
  --ww-alert-text: #B42318;
  --ww-ok: #12A160;
  --ww-ok-soft: #E7F6EE;
  --ww-ok-text: #067647;
  --ww-info: #2E6BE6;
  --ww-info-soft: #EBF0FD;
  --ww-info-text: #1F4FD1;
  --ww-neutral: #98A2B3;
  --ww-neutral-soft: #EEF1F5;
  --ww-track: #E4E7EC;

  /* chart series, in this fixed order (validated for color blindness and
     contrast); fixed per theme, so a company's brand color never repaints them */
  --ww-c1: #0B7A5C;
  --ww-c2: #2E6BE6;
  --ww-c3: #E07B1F;
  --ww-orange: #E8590C;       /* map distance band only */

  /* shape and depth */
  --ww-radius: 10px;
  --ww-radius-sm: 7px;
  --ww-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --ww-shadow-pop: 0 8px 24px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .08);
  --ww-focus: 0 0 0 3px color-mix(in srgb, var(--ww-pri) 22%, transparent);

  /* layout */
  --ww-rail: 60px;
  --ww-rail-open: 236px;

  color-scheme: light;
}

:root.ww-v2[data-theme="dark"] {
  --ww-bg: #0B0F16;
  --ww-surface: #131924;
  --ww-surface-2: #161D29;
  --ww-hover: #1B222E;
  --ww-ink: #EEF1F5;
  --ww-muted: #93A0B4;
  --ww-line: #252D3A;
  --ww-line-strong: #364152;

  --ww-pri: #2BB98C;
  --ww-on-pri: #06110D;
  --ww-link: #8DAEFF;

  --ww-alert: #F04438;
  --ww-alert-soft: #3A1714;
  --ww-alert-text: #FDA29B;
  --ww-ok: #32D583;
  --ww-ok-soft: #10291D;
  --ww-ok-text: #4ED69A;
  --ww-info: #6F9BFF;
  --ww-info-soft: #16213D;
  --ww-info-text: #8DAEFF;
  --ww-neutral: #667085;
  --ww-neutral-soft: #1B222E;
  --ww-track: #2A3240;

  --ww-c1: #22A67D;
  --ww-c2: #5887F0;
  --ww-c3: #D9702A;
  --ww-orange: #FB8C3C;

  --ww-shadow: none;
  --ww-shadow-pop: 0 8px 24px rgba(0, 0, 0, .45);

  color-scheme: dark;
}
