/* ==========================================================================
   Design tokens (every page)
   The site's colours, faces and a few shared measures, in one place. New
   pages style themselves through these and never through literal colours,
   so the site-wide dark mode only has to redefine this file.

   The theme's older stylesheet (all.css) still uses literals; it is migrated
   when dark mode lands. Sections that are dark by design (the Zero Flare
   night band, the footer) keep their own night palette in either mode.
   ========================================================================== */

:root {
  /* Brand */
  --d-blue: #015a8d;          /* petroleum blue: links, primary actions, headings on light */
  --d-blue-deep: #01446b;     /* hover and pressed states */
  --d-blue-night: #012a44;    /* deep blue bands */
  --d-gold: #f1c42b;          /* the signature accent: rules, icons, highlights */
  --d-gold-ink: #8a6a00;      /* gold that passes contrast as text on a light ground */

  /* CSR focus areas: one accent each, deep enough to carry a white icon */
  --d-area-education: #015a8d;   /* Education & Training: petroleum blue */
  --d-area-health: #b23a5e;      /* Healthcare: muted raspberry */
  --d-area-environment: #2e7d4f; /* Environment: leaf green */
  --d-area-municipal: #a87400;   /* Municipal & Public Services: deep gold */

  /* Surfaces */
  --d-bg: #ffffff;            /* page */
  --d-surface: #f6f9fb;       /* alternate section, quiet panels */
  --d-card: #ffffff;          /* cards that sit on --d-surface */
  --d-line: #e3e9ee;          /* hairlines and card borders */
  --d-tint: #e8f0f6;          /* hover and keyboard highlight on light surfaces */

  /* Text */
  --d-ink: #232323;           /* headings, strong text */
  --d-text: #6f6f6f;          /* body copy */
  --d-muted: #8b98a5;         /* captions, meta */
  --d-on-blue: #ffffff;       /* text on --d-blue and darker */
  --d-on-gold: #232323;       /* text on --d-gold: stays dark in both modes */
  --d-link: #015a8d;          /* links and blue text in running copy */

  /* Type */
  --d-display: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --d-body: 'Roboto', 'Helvetica Neue', Arial, sans-serif;

  /* Shape */
  --d-radius: 4px;
  --d-shadow: 0 14px 34px -20px rgba(1, 42, 68, .35);
  --d-focus: 0 0 0 3px rgba(241, 196, 43, .65);
}

/* Arabic pages: Montserrat and Roboto have no Arabic letters, so the browser
   fell back to a system face. Use the theme's Arabic face (set up in
   arabic.css), as the navigation and the older pages do. */
:root[dir="rtl"] {
  --d-display: 'Droid Arabic Kufi', 'Montserrat', Arial, sans-serif;
  --d-body: 'Droid Arabic Kufi', 'Roboto', Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Dark mode
   <html data-mode="dark"> is set before first paint by the inline script in
   includes/head.blade.php: from the visitor's choice (light, dark, or auto,
   which follows the device). Only tokens change here; legacy theme rules
   are overridden in dark.css.
   -------------------------------------------------------------------------- */
:root[data-mode="dark"] {
  color-scheme: dark;

  /* Petroleum blue lifts a step so it reads as text on a dark ground and
     still carries white text as a button. */
  --d-blue: #2a83bd;
  --d-blue-deep: #1f6c9e;
  --d-blue-night: #0a2233;
  --d-gold: #f1c42b;
  --d-gold-ink: #f1c42b;      /* full gold reads fine on dark */

  --d-area-education: #2a83bd;
  --d-area-health: #c9557a;
  --d-area-environment: #3a9a63;
  --d-area-municipal: #c08a10;

  --d-bg: #0e1821;
  --d-surface: #13212c;
  --d-card: #172836;
  --d-line: #24394a;
  --d-tint: #1d3344;

  --d-ink: #e9eff4;
  --d-text: #a9b7c3;
  --d-muted: #7d8f9e;
  --d-on-blue: #ffffff;
  --d-link: #63aedd;          /* blue text needs more lift than blue fills */

  --d-shadow: 0 14px 34px -20px rgba(0, 0, 0, .7);
  --d-focus: 0 0 0 3px rgba(241, 196, 43, .55);
}
