/* =========================================================================
   Utah DHHS brand design tokens
   Source: DHHS Style Guide (State of Utah "branded house" standard).
   Canonical variable names are taken verbatim from the guide's
   §"Website global colors" so this file matches the official spec.

   Load this FIRST in <head> so every downstream stylesheet and inline
   <style> block can consume the tokens via var(--...).

   Brand rules encoded here:
     - Primary = Navy (#071D49), Secondary = Teal (#165857).
     - No tints/shades outside the approved colors. Hover/active states
       therefore shift to another *approved* color, never a lightened tint.
     - Accents (red/orange/gold) are for emphasis only, used sparingly.
     - Body text >= 16px; all pairings below meet WCAG 2.2 AA (>=4.5:1).
   ========================================================================= */

:root {
  /* ---- Primary state-level colors ---------------------------------- */
  --utah-brand-primary-color-blue-dark: #071D49;   /* Navy  — DHHS PRIMARY */
  --utah-brand-primary-color-blue-medium: #093692;
  --utah-brand-primary-color-blue-light: #81D0F0;
  --utah-brand-primary-color-gold-light: #FFB81D;
  --utah-brand-primary-color-gold-medium: #FF8C03;
  --utah-brand-primary-color-red: #AA0200;

  /* ---- Secondary department-level colors --------------------------- */
  --utah-brand-secondary-color-teal-05: #0D262E;
  --utah-brand-secondary-color-teal-04: #165857;   /* Teal  — DHHS SECONDARY */
  --utah-brand-secondary-color-teal-00: #A6C4CA;
  --utah-brand-secondary-color-clay-04: #52393B;
  --utah-brand-secondary-color-clay-03: #78555A;
  --utah-brand-secondary-color-clay-00: #E9DCC8;

  /* ---- Grayscale --------------------------------------------------- */
  --utah-brand-black: #000000;      /* text only, never a background */
  --utah-brand-gray-dark: #333333;  /* body text */
  --utah-brand-gray-light: #F1F1F1; /* surfaces (needs black text) */
  --utah-brand-white: #FFFFFF;

  /* =====================================================================
     Semantic aliases — PREFER THESE in app CSS. If the brand ever
     retunes a value, it changes in one place above.
     ===================================================================== */

  /* Structure / brand anchor (navy) */
  --brand-primary:        var(--utah-brand-primary-color-blue-dark);
  --brand-primary-hover:  var(--utah-brand-primary-color-blue-medium); /* #093692, still white-legible */
  --brand-on-primary:     var(--utah-brand-white);                     /* 16.39:1 on navy */

  /* Interactive accent / DHHS identifier (teal) — should be "almost always present" */
  --brand-secondary:       var(--utah-brand-secondary-color-teal-04);
  --brand-secondary-hover: var(--utah-brand-secondary-color-teal-05);  /* #0D262E darker approved teal */
  --brand-on-secondary:    var(--utah-brand-white);                    /* 8.18:1 on teal */

  /* Surfaces & text */
  --brand-ink:            var(--utah-brand-gray-dark);   /* #333 body copy */
  --brand-surface:        var(--utah-brand-white);
  --brand-surface-muted:  var(--utah-brand-gray-light);  /* #F1F1F1 — pair with black/navy text */
  --brand-border:         #d9dde3;                       /* neutral hairline (not a brand fill) */

  /* Accents — emphasis only, "like sprinkles on a birthday cake" */
  --brand-accent-red:     var(--utah-brand-primary-color-red);
  --brand-accent-orange:  var(--utah-brand-primary-color-gold-medium);
  --brand-accent-gold:    var(--utah-brand-primary-color-gold-light);

  /* Translucent affordances (focus rings / subtle hovers). Transparencies
     are permitted for UI affordances; they are not brand *fills*. */
  --brand-focus-ring:     rgba(22, 88, 87, 0.35);   /* teal @35% */
  --brand-primary-soft:   rgba(7, 29, 73, 0.08);    /* navy @8%  */
  --brand-secondary-soft: rgba(22, 88, 87, 0.08);   /* teal @8%  */

  /* =====================================================================
     Typography (guide §Typography)
       H1/H2  -> UT Industry (serif). Source Serif 4 is the guide-authorized
                 stand-in until UT Industry is broadly licensed for the web.
       H3/H4/body -> Source Sans 3 (fallback Open Sans, sans-serif).
       Body >= 16px.
     ===================================================================== */
  --ut-industry-font-family: "Source Serif 4", "UT Industry", Georgia, "Times New Roman", serif;
  --brand-body-font: "Source Sans 3", "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* -------------------------------------------------------------------------
   Global typography defaults. Kept low-specificity so page-level styles can
   still override where needed.
   ------------------------------------------------------------------------- */
body {
  font-family: var(--brand-body-font);
  font-size: 16px;                 /* guide minimum: 16px / 1rem */
  color: var(--brand-ink);
}

h1, h2, .h1, .h2 {
  font-family: var(--ut-industry-font-family);
  font-optical-sizing: auto;
  font-style: normal;
}
h1, .h1 { font-weight: 500; }
h2, .h2 { font-weight: 400; }

h3, h4, h5, h6, .h3, .h4, .h5, .h6 {
  font-family: var(--brand-body-font);
  font-optical-sizing: auto;
  font-style: normal;
}
h3, .h3 { font-weight: 700; }
h4, .h4 { font-weight: 400; }
