/* ============================================================
   Cooper University Health Care — Design Tokens
   Source of truth: https://branding.cooperhealth.org
   Live product: https://www.cooperhealth.org
   ============================================================ */

/* Display headlines now use Lato (thin/light weights) — Cooper's licensed sans. */
/* Lato — Cooper's licensed body/UI sans (user-provided TTFs in /fonts) */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-ThinItalic.ttf') format('truetype');
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ---------- PRIMARY BRAND COLORS (from branding.cooperhealth.org) ---------- */
  --cooper-red:        #bf0d3e;   /* Primary. Hexagon mark, primary CTAs, headlines */
  --cooper-navy:       #2a3b6b;   /* Secondary. Deep accents, dark surfaces */
  --cooper-lavender:   #f0f1fa;   /* Tertiary. Section backgrounds, warm neutral */

  /* ---------- EXTENDED SCALES ---------- */
  /* Reds — derived for hover / press / surface tints */
  --red-50:   #fbe7ec;
  --red-100:  #f4c5cf;
  --red-200:  #e88a9f;
  --red-300:  #d94f70;
  --red-400:  #cc2b55;
  --red-500:  #bf0d3e;   /* = --cooper-red */
  --red-600:  #a60a36;   /* hover */
  --red-700:  #8a0a30;   /* press / dark-on-red */
  --red-800:  #6e0825;

  /* Navy — serious, institutional */
  --navy-50:  #edeff6;
  --navy-100: #d4d9e8;
  --navy-200: #a9b3d1;
  --navy-300: #7b89b8;
  --navy-400: #51628f;
  --navy-500: #2a3b6b;   /* = --cooper-navy */
  --navy-600: #223058;
  --navy-700: #1a2544;
  --navy-800: #121a30;
  --navy-900: #0b1120;

  /* Warm neutral — lavender-tinted grays (not pure cool gray) */
  --neutral-50:  #fafafc;
  --neutral-100: #f0f1fa;   /* = --cooper-lavender */
  --neutral-200: #e3e5ef;
  --neutral-300: #c9ccda;
  --neutral-400: #9aa0b3;
  --neutral-500: #6c7286;
  --neutral-600: #4a4f60;
  --neutral-700: #323642;
  --neutral-800: #1d1f28;
  --neutral-900: #0f1016;

  /* ---------- SEMANTIC COLORS (healthcare-appropriate) ---------- */
  --success:   #1f7a46;   /* ok / healthy / confirmed */
  --success-bg:#e3f2ea;
  --warning:   #b35c00;   /* caution / advisory */
  --warning-bg:#fdf0dc;
  --danger:    #b00020;   /* critical — distinct from brand red */
  --danger-bg: #fce8ec;
  --info:      #2a3b6b;   /* defers to navy */
  --info-bg:   #edeff6;

  /* ---------- SURFACES ---------- */
  --bg-page:        #ffffff;
  --bg-subtle:      var(--neutral-50);
  --bg-muted:       var(--cooper-lavender);   /* the hero "alt" section bg */
  --bg-inverse:     var(--navy-500);          /* dark footer */
  --bg-inverse-alt: var(--navy-700);

  /* ---------- TEXT ---------- */
  --fg-primary:    var(--navy-800);    /* body copy — navy-tinted, not pure black */
  --fg-secondary:  var(--neutral-600);
  --fg-muted:      var(--neutral-500);
  --fg-inverse:    #ffffff;
  --fg-on-red:     #ffffff;
  --fg-on-navy:    #ffffff;
  --fg-link:       var(--cooper-red);
  --fg-link-hover: var(--red-700);

  /* ---------- BORDERS ---------- */
  --border-subtle: var(--neutral-200);
  --border-strong: var(--neutral-300);
  --border-focus:  var(--cooper-red);

  /* ---------- TYPOGRAPHY ---------- */
  /* Cooper's licensed sans, Lato, is used for both display headlines (thin/light
     weights) and UI + body. Both families below resolve to Lato with a
     Helvetica Neue / Arial / system fallback. */
  --font-display: 'Lato', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --display-weight: 300;   /* thin/light headings */
  --font-sans:    'Lato', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Type scale — major-third-ish, tuned for editorial density */
  --fs-12: 0.75rem;     /* 12 — micro labels */
  --fs-14: 0.875rem;    /* 14 — meta, captions */
  --fs-16: 1rem;        /* 16 — body default */
  --fs-18: 1.125rem;    /* 18 — lede / large body */
  --fs-20: 1.25rem;     /* 20 — subheads */
  --fs-24: 1.5rem;      /* 24 — h4 */
  --fs-30: 1.875rem;    /* 30 — h3 */
  --fs-36: 2.25rem;     /* 36 — h2 */
  --fs-48: 3rem;        /* 48 — h1 */
  --fs-64: 4rem;        /* 64 — hero / display */

  --lh-tight:   1.1;
  --lh-snug:    1.25;
  --lh-normal:  1.5;
  --lh-relaxed: 1.65;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-caps:   0.08em;    /* for eyebrow labels */

  /* ---------- SPACING (4px base grid) ---------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* ---------- RADII ---------- */
  /* Cooper's visual language is squared-off and editorial. Radii are subtle;
     the hexagon mark itself provides the "shape" character. */
  --radius-none: 0;
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   8px;
  --radius-pill: 999px;

  /* ---------- SHADOWS ---------- */
  --shadow-xs: 0 1px 2px rgba(42, 59, 107, 0.06);
  --shadow-sm: 0 2px 6px rgba(42, 59, 107, 0.08);
  --shadow-md: 0 6px 16px rgba(42, 59, 107, 0.10);
  --shadow-lg: 0 14px 32px rgba(42, 59, 107, 0.14);
  --shadow-ring: 0 0 0 3px rgba(191, 13, 62, 0.25);   /* focus ring — red */

  /* ---------- MOTION ---------- */
  --ease-out:  cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in:   cubic-bezier(0.55, 0.06, 0.68, 0.19);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:  120ms;
  --dur-base:  200ms;
  --dur-slow:  320ms;

  /* ---------- LAYOUT ---------- */
  --container-max: 1280px;
  --container-pad: clamp(16px, 4vw, 48px);
}

/* ============================================================
   Semantic element styles — use these by default, not raw vars
   ============================================================ */

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: var(--lh-normal);
  color: var(--fg-primary);
  background: var(--bg-page);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--fg-primary);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
  font-weight: var(--display-weight);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(var(--fs-36), 4.5vw, var(--fs-64)); }
h2 { font-size: clamp(var(--fs-30), 3.2vw, var(--fs-48)); }
h3 { font-size: var(--fs-30); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-24); line-height: var(--lh-snug); }

h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: var(--lh-snug);
  margin: 0;
}
h5 { font-size: var(--fs-20); }
h6 { font-size: var(--fs-16); }

p { margin: 0; line-height: var(--lh-relaxed); text-wrap: pretty; }

/* Eyebrow / category label — seen above section headings */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--cooper-red);
}

/* Lede / intro paragraph */
.lede {
  font-size: var(--fs-20);
  line-height: var(--lh-relaxed);
  color: var(--fg-secondary);
}

a {
  color: var(--fg-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--fg-link-hover); text-decoration-thickness: 2px; }

*:focus-visible {
  outline: 2px solid var(--cooper-red);
  outline-offset: 2px;
}
