/* ==========================================================================
   Healthwatch B&S — Design Tokens
   Sampled 1:1 from the Figma "UI Design" foundations (node 230:2702) and the
   WordPress Front-End Build Brief §2–§5.

   RULE: everything visual binds to these variables. A post-March-2027 rebrand
   must be a token change here, NOT a re-skin of components.
   ========================================================================== */

:root {
  /* ---- Brand: blue -------------------------------------------------------- */
  --blue-900: #0A3E52; /* header top bar, footer, deepest surfaces */
  --blue-700: #0E536E; /* PRIMARY — headings, dark bands, nav */
  --blue-500: #1D7196; /* secondary blue, data viz */
  --blue-100: #E4EFF3; /* icon tiles, image placeholders, tints */

  /* ---- Brand: magenta ----------------------------------------------------- */
  --magenta-700: #B30F76; /* PRIMARY CTA fill (white text) */
  --magenta-500: #E21394; /* logo accent — decorative / large only */
  --magenta-100: #FBE3F1; /* magenta tint */

  /* ---- Brand: green ------------------------------------------------------- */
  --green-700: #5F8E03; /* text-safe green (large only) */
  --green-500: #80BC04; /* accent — eyebrow rules, review CTAs, decorative */
  --green-100: #EFF7DE; /* green tint */

  /* ---- Neutrals ----------------------------------------------------------- */
  --ink: #0F1D25;       /* body text */
  --secondary: #48606A; /* secondary text */
  --muted: #6C838C;     /* muted / meta text */
  --border: #D9E3E7;    /* borders, dividers */
  --surface: #F3F8F9;   /* section grounds */
  --white: #FFFFFF;     /* base */

  /* ---- Semantic aliases (use these in components) ------------------------- */
  --color-bg: var(--white);
  --color-text: var(--ink);
  --color-text-secondary: var(--secondary);
  --color-text-muted: var(--muted);
  --color-heading: var(--blue-700);
  --color-primary: var(--blue-700);
  --color-cta: var(--magenta-700);
  --color-cta-text: var(--white);
  --color-accent: var(--green-500);
  --color-link: var(--blue-500);
  --color-link-hover: var(--blue-700);

  /* ---- Typography — families --------------------------------------------- */
  /* Brand font: Poppins throughout (headings + body). The logo font is never
     used for page text — Poppins is the approved, more legible website face. */
  --font-display: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; /* headings / display */
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* ---- Type scale (size / line-height / tracking) — brief §3 -------------- */
  --fs-stat: 58px;    --lh-stat: 64px;    --ls-stat: -1.4px;
  --fs-h1: 50px;      --lh-h1: 58px;      --ls-h1: -1.2px;
  --fs-h2: 36px;      --lh-h2: 44px;      --ls-h2: -0.7px;
  --fs-h3: 26px;      --lh-h3: 34px;      --ls-h3: -0.4px;
  --fs-h4: 19px;      --lh-h4: 27px;      --ls-h4: 0px;
  --fs-body-lg: 18px; --lh-body-lg: 29px;
  --fs-body: 16px;    --lh-body: 26px;
  --fs-body-sm: 14px; --lh-body-sm: 21px;
  --fs-eyebrow: 13px; --lh-eyebrow: 16px; --ls-eyebrow: 1.4px;
  --fs-button: 16px;  --lh-button: 16px;  --ls-button: 0.2px;
  --fs-nav: 15px;     --lh-nav: 20px;

  /* ---- Layout & spacing — brief §4 --------------------------------------- */
  --container: 1200px;
  --gutter: 120px;           /* 1440 artboard side gutter */
  --gutter-mobile: 20px;
  --section-py: 100px;       /* desktop section vertical padding */
  --section-py-tablet: 64px;
  --section-py-mobile: 40px;
  --grid-gap: 24px;
  --header-h: 146px;   /* topbar 53 + mainbar 93 (48px logo + 22px py) */

  /* ---- Radii — brief §4 --------------------------------------------------- */
  --r-card: 20px;
  --r-card-sm: 16px;
  --r-tile: 14px;    /* icon tiles */
  --r-input: 12px;
  --r-pill: 999px;

  /* ---- Elevation (blue-tinted, not black) — brief §5 --------------------- */
  --shadow-card: 0 1px 2px rgba(10,62,82,.05), 0 8px 24px -4px rgba(10,62,82,.08);
  --shadow-raised: 0 2px 4px rgba(10,62,82,.06), 0 16px 40px -8px rgba(10,62,82,.12);
  --shadow-button: 0 2px 6px -1px rgba(10,62,82,.18);
  --shadow-button-hover: 0 6px 16px -2px rgba(10,62,82,.28);

  /* ---- Motion — brief §11b ----------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-entrance: 620ms;
  --dur-micro: 200ms;
  --reveal-rise: 20px;
  --reveal-stagger: 75ms;

  /* ---- Z-index scale ------------------------------------------------------ */
  --z-header: 1000;
  --z-drawer: 1100;
  --z-skiplink: 1200;
}

/* Fluid overrides at smaller viewports (mobile-first refinements live in base.css) */
@media (max-width: 1199px) {
  :root {
    --gutter: 40px;
    --section-py: var(--section-py-tablet);
  }
}
@media (max-width: 767px) {
  :root {
    --gutter: var(--gutter-mobile);
    --section-py: var(--section-py-mobile);
    /* trim display sizes on mobile — keeps the display scale from overflowing */
    --fs-stat: 44px;  --lh-stat: 50px;
    --fs-h1: 34px;    --lh-h1: 42px;   --ls-h1: -0.6px;
    --fs-h2: 28px;    --lh-h2: 36px;
    --fs-h3: 22px;    --lh-h3: 30px;
  }
}
