/* ============================================================
   NursingRidge official public brand tokens — v3
   /var/www/nursingridge/web/modules/custom/nr_brand_system/css/nr-brand-tokens.css

   WHAT THIS IS
   A drop-in replacement. Every variable name from the previous
   token file is preserved, so the 134 module CSS files and the
   41 templates with inline <style> blocks keep working untouched.
   Only the VALUES change.

   DEPLOY
     cd /var/www/nursingridge/web/modules/custom/nr_brand_system/css
     cp nr-brand-tokens.css nr-brand-tokens.css.bak-$(date +%Y%m%d)
     # replace file, then:
     cd /var/www/nursingridge/web && ../vendor/bin/drush cr

   ROLLBACK
     cp nr-brand-tokens.css.bak-<date> nr-brand-tokens.css && drush cr

   CONTRAST RULE BAKED IN
   The legacy alias --teal is kept TEXT-SAFE (5.2:1 on paper),
   because unaudited module CSS uses it for body copy. The bright
   brand teal is exposed separately as --teal-500 / --nr-teal-500
   for fills, rules, and large display type only. Same split for
   gold: --gold for dark grounds, --gold-600 for light grounds.
   Do not swap them.
   ============================================================ */

:root {

  /* ---------- NAVY ---------- */
  --nr-navy-950:#071523;   /* deepest — rare */
  --nr-navy-900:#0B1D33;   /* PRIMARY navy — headings, bands, footer. 14.2:1 on paper */
  --nr-navy-800:#143A66;   /* secondary band */
  --nr-navy-700:#1E5085;   /* hover / tertiary */
  --nr-navy-600:#274A72;   /* rules on navy grounds */

  /* ---------- GOLD ---------- */
  --nr-gold-700:#6E5418;   /* gold text on white, 7.8:1 */
  --nr-gold-600:#8A6A1F;   /* gold text on paper, 5.4:1 — USE FOR TEXT ON LIGHT */
  --nr-gold-500:#C9A24B;   /* brand gold — on NAVY only, 6.6:1 */
  --nr-gold-300:#E8D5A6;   /* accents on navy */

  /* ---------- TEAL ---------- */
  --nr-teal-800:#075F59;   /* teal text on white, 7.1:1 */
  --nr-teal-700:#0A7A72;   /* teal text on paper, 5.2:1 — USE FOR TEXT ON LIGHT */
  --nr-teal-600:#0C8F86;   /* button hover */
  --nr-teal-500:#0FA79D;   /* BRAND teal — fills, rules, large type. ~3:1, NEVER body text */
  --nr-teal-100:#E3F5F3;   /* tint panels */

  /* ---------- GROUND ---------- */
  --nr-paper:#F7F9FC;      /* page background */
  --nr-ivory:#F7F9FC;      /* legacy name, now cool paper */
  --nr-ivory-soft:#FFFFFF; /* raised cards */
  --nr-white:#FFFFFF;

  /* ---------- TEXT ---------- */
  --nr-head:#0B1D33;       /* headings, 14.2:1 */
  --nr-ink:#1C3049;        /* body, 11.4:1 */
  --nr-muted:#4A6076;      /* captions, 6.1:1 — replaces all low-alpha greys */
  --nr-on-navy:#EEF3F9;    /* body text on navy, 14.6:1 */
  --nr-on-navy-soft:#AFC2D6; /* secondary text on navy, 7.9:1 */

  /* ---------- LINES ---------- */
  --nr-line:#D3DCE8;       /* rules on light */
  --nr-line-dark:#274A72;  /* rules on navy */

  /* ---------- STATUS ---------- */
  --nr-danger:#B42318;
  --nr-warning:#9A4A06;    /* darkened from b54708 to clear 4.5:1 on paper */
  --nr-success:#146B41;

  /* ---------- ELEVATION ---------- */
  --nr-shadow:0 22px 70px rgba(11,29,51,.13);
  --nr-shadow-soft:0 12px 38px rgba(11,29,51,.08);

  /* ---------- TYPE ---------- */
  --nr-display:"Bebas Neue",Impact,sans-serif;
  --nr-sans:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --nr-mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
  --nr-serif:Georgia,"Times New Roman",serif;  /* legacy — being retired */

  /* ============================================================
     COMPATIBILITY ALIASES
     Used throughout existing NursingRidge modules. Do not rename
     or remove — these are what make the re-skin work without a
     refactor of 134 stylesheets.
     ============================================================ */

  --navy:#0B1D33;
  --navy-950:#071523;
  --navy-900:#0B1D33;
  --navy-800:#143A66;
  --navy-700:#1E5085;

  --gold:#C9A24B;          /* on navy grounds */
  --gold-600:#8A6A1F;      /* on light grounds — text-safe */
  --gold-500:#C9A24B;
  --gold-300:#E8D5A6;

  --ivory:#F7F9FC;
  --paper:#F7F9FC;

  /* NOTE: --teal is text-safe on purpose. Legacy module CSS uses it
     for links and body copy. For fills and large display type use
     --teal-500. */
  --teal:#0A7A72;
  --teal-800:#075F59;
  --teal-700:#0A7A72;
  --teal-600:#0C8F86;
  --teal-500:#0FA79D;
  --teal-100:#E3F5F3;

  --ink:#1C3049;
  --head:#0B1D33;
  --muted:#4A6076;
  --line:#D3DCE8;
  --white:#FFFFFF;

  /* ---------- BOOTSTRAP 5 BRIDGE ----------
     The active theme is bootstrap5, so these carry the palette into
     every core/contrib component without touching the theme. */
  --bs-primary:#0B1D33;
  --bs-primary-rgb:11,29,51;
  --bs-secondary:#0A7A72;
  --bs-secondary-rgb:10,122,114;
  --bs-success:#146B41;
  --bs-danger:#B42318;
  --bs-warning:#9A4A06;
  --bs-link-color:#0A7A72;
  --bs-link-hover-color:#143A66;
  --bs-body-color:#1C3049;
  --bs-body-bg:#F7F9FC;
  --bs-border-color:#D3DCE8;
  --bs-emphasis-color:#0B1D33;
  --bs-secondary-color:#4A6076;
  --bs-tertiary-bg:#FFFFFF;
  --bs-code-color:#0A7A72;
}

/* ============================================================
   SAFETY NET
   Modules that set text colour to the bright brand teal fail
   contrast on light grounds. Rather than edit 134 files, catch
   the common cases here. Extend this list as audits find more.
   ============================================================ */
a,
.nr-link,
.nr-text-teal {
  color: var(--nr-teal-700);
}

a:hover,
.nr-link:hover {
  color: var(--nr-navy-800);
}

/* Bright teal is legitimate as a FILL — keep those intact. */
.nr-btn-primary,
.btn-primary.nr-btn,
.nr-fill-teal {
  background: var(--nr-teal-500);
  color: #062E2B;               /* 6.4:1 on the teal fill */
  border-color: var(--nr-teal-500);
}

.nr-btn-primary:hover,
.nr-fill-teal:hover {
  background: var(--nr-teal-600);
}

/* Dark grounds: force readable body text regardless of module CSS. */
.nr-band-navy,
.nr-section-navy,
footer.nr-footer {
  background: var(--nr-navy-900);
  color: var(--nr-on-navy);
}

.nr-band-navy a,
.nr-section-navy a,
footer.nr-footer a {
  color: var(--nr-on-navy);
}

.nr-band-navy a:hover,
.nr-section-navy a:hover,
footer.nr-footer a:hover {
  color: var(--nr-teal-500);
}
