/* ==========================================================================
   T-Learn Brand 2.0 — design tokens
   Source of truth: Figma "Main" › ① Brand Guidelines (boards 03 Colour,
   04 Type, 05 UI foundations). Dark is the default theme.
   Themes are switched with <html data-theme="dark|light|contrast">.
   Accessible font: <html data-font="accessible">.
   ========================================================================== */

:root {
  /* ---- Ember scale ---- */
  --ember-300: #FFB15C;
  --ember-400: #FF8A3D;
  --ember-500: #FF6A1A;
  --ember-600: #E5520A;
  --ember-700: #C2410C;
  --ember-800: #A33A00;
  --ember-gradient: linear-gradient(135deg, #FFB15C 0%, #FF6A1A 50%, #FF3D2E 100%);

  /* ---- Family colours (dark) ---- */
  --family-digital: #FF6A1A;
  --family-health: #3DDC97;
  --family-construction: #FFC233;
  --family-engineering: #5AA9FF;
  --family-education: #FF7FA8;
  --family-creative: #B38CFF;
  --family-business: #2EC4D6;
  --family-legal: #D9B76A;
  --family-marketing: #FF4D6D;
  --family-agriculture: #8BD450;
  --family-sport: #F3F35B;

  /* T Level shades — Digital family */
  --tl-software-development: #FF6A1A;
  --tl-data-analytics: #FFA366;
  --tl-digital-support: #D9480F;

  /* ---- Type ---- */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: var(--font-sans);

  --fs-display-xl: 104px; --lh-display-xl: 106px;
  --fs-display-l: 80px;   --lh-display-l: 84px;
  --fs-h1: 56px; --lh-h1: 60px;
  --fs-h2: 36px; --lh-h2: 40px;
  --fs-h3: 24px; --lh-h3: 30px;
  --fs-h4: 20px; --lh-h4: 28px;
  --fs-body-l: 20px; --lh-body-l: 32px;
  --fs-body: 16px; --lh-body: 24px;
  --fs-small: 14px; --lh-small: 20px;
  --fs-button: 15px; --lh-button: 20px;
  --fs-overline: 12px; --lh-overline: 16px;
  --fs-code: 14px; --lh-code: 22px;

  /* ---- Space (4px grid) ---- */
  --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;
  --gutter: 24px;
  --page-margin: 120px;
  --sidebar-w: 248px;
  --content-w: 1128px;

  /* ---- Radius ---- */
  --radius-xs: 6px;
  --radius-sm: 12px;   /* buttons, inputs */
  --radius-md: 16px;
  --radius-lg: 24px;   /* cards */
  --radius-xl: 32px;
  --radius-device: 44px;
  --radius-pill: 999px;

  /* ---- Line system ---- */
  --line-weight: 10px;
  --stop-done: 18px;
  --ring-size: 32px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 400ms;
}

/* ---------------------------------------------------------------- Dark (default) */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: #0A0A0F;
  --bg-sidebar: #0E0F15;
  --bg-surface: #14151C;
  --bg-raised: #1D1F28;
  --border: #2E3140;
  --border-strong: #3A3E50;

  --text-primary: #F5F5F7;
  --text-body: #C9CCD6;
  --text-secondary: #8B8FA3;

  --brand: #FF6A1A;
  --brand-hover: #FF8A3D;
  --brand-on: #0A0A0F;
  --brand-text: #FF8A3D;
  --brand-soft: rgba(255, 106, 26, .12);

  --line: #FF6A1A;           /* Software Development line */
  --line-track: #2E3140;
  --stop-locked: #4A4E60;
  --ring: #FFFFFF;
  --ring-halo: rgba(255, 255, 255, .18);

  --success: #3DDC97;
  --success-soft: rgba(61, 220, 151, .12);
  --danger: #FF6B6B;
  --danger-soft: rgba(255, 107, 107, .12);
  --warning: #FFC233;
  --warning-soft: rgba(255, 194, 51, .12);
  --info: #5AA9FF;
  --info-soft: rgba(90, 169, 255, .12);

  --focus: #FFFFFF;
  --glow: radial-gradient(60% 60% at 50% 40%, rgba(255, 106, 26, .22) 0%, rgba(255, 106, 26, 0) 70%);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, .45);
  --border-w: 1px;
}

/* ---------------------------------------------------------------- Light */
[data-theme="light"] {
  color-scheme: light;
  --bg-canvas: #F7F6F2;
  --bg-sidebar: #F1F0EC;
  --bg-surface: #FFFFFF;
  --bg-raised: #F1F0EC;
  --border: #E4E4E8;
  --border-strong: #D3D3DA;

  --text-primary: #14151C;
  --text-body: #4A4E60;
  --text-secondary: #6B6E7E;

  --brand: #C2410C;
  --brand-hover: #A33A00;
  --brand-on: #FFFFFF;
  --brand-text: #C2410C;
  --brand-soft: rgba(194, 65, 12, .10);

  --line: #B84C13;
  --line-track: #E4E4E8;
  --stop-locked: #C3C4CC;
  --ring: #14151C;
  --ring-halo: rgba(20, 21, 28, .12);

  --success: #1F8A5B;
  --success-soft: rgba(31, 138, 91, .10);
  --danger: #D92D20;
  --danger-soft: rgba(217, 45, 32, .08);
  --warning: #A86B00;
  --warning-soft: rgba(168, 107, 0, .10);
  --info: #2970C5;
  --info-soft: rgba(41, 112, 197, .10);

  --tl-software-development: #B84C13;
  --tl-data-analytics: #99623D;
  --tl-digital-support: #C3410D;
  --family-digital: #B84C13;
  --family-health: #227B55;
  --family-construction: #8A691C;
  --family-engineering: #3B70A8;
  --family-education: #A8546F;
  --family-creative: #7A5FAD;
  --family-business: #1D7A85;
  --family-legal: #7E6A3D;
  --family-marketing: #C73C55;
  --family-agriculture: #4E772D;
  --family-sport: #70702A;

  --focus: #14151C;
  --glow: radial-gradient(60% 60% at 50% 40%, rgba(255, 106, 26, .12) 0%, rgba(255, 106, 26, 0) 70%);
  --shadow-pop: 0 24px 60px rgba(20, 21, 28, .14);
}

/* ---------------------------------------------------------------- High contrast */
[data-theme="contrast"] {
  color-scheme: dark;
  --bg-canvas: #000000;
  --bg-sidebar: #000000;
  --bg-surface: #000000;
  --bg-raised: #000000;
  --border: #FFFFFF;
  --border-strong: #FFFFFF;
  --border-w: 2px;

  --text-primary: #FFFFFF;
  --text-body: #FFFFFF;
  --text-secondary: #D6D6DE;

  --brand: #FFB15C;
  --brand-hover: #FFC88A;
  --brand-on: #000000;
  --brand-text: #FFB15C;
  --brand-soft: rgba(255, 177, 92, .16);

  --line: #FF8A3D;
  --line-track: #FFFFFF;
  --stop-locked: #D6D6DE;
  --ring: #FFFFFF;
  --ring-halo: transparent;
  --line-weight: 12px;

  --glow: none;
  --shadow-pop: none;
  --focus: #FFB15C;
}

/* ---------------------------------------------------------------- Accessible font */
[data-font="accessible"] {
  --font-sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", "Geist Mono", ui-monospace, monospace;
}

@media (max-width: 1100px) {
  :root { --page-margin: 40px; }
}
@media (max-width: 720px) {
  :root {
    --page-margin: 20px;
    --line-weight: 8px;
    --fs-display-xl: 56px; --lh-display-xl: 58px;
    --fs-display-l: 48px;  --lh-display-l: 52px;
    --fs-h1: 40px; --lh-h1: 44px;
    --fs-h2: 28px; --lh-h2: 32px;
    --fs-h3: 22px; --lh-h3: 28px;
    --fs-body-l: 18px; --lh-body-l: 28px;
  }
}
