/* ==========================================================================
   Base — reset, typography, layout primitives
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "kern", "liga";
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}
.section--navy :focus-visible,
.site-footer :focus-visible,
.mobile-menu :focus-visible,
.donate-cta :focus-visible,
.utility-bar :focus-visible { outline-color: var(--steel); }

::selection { background: var(--navy); color: var(--ivory); }

/* --- Type ---------------------------------------------------------------- */

.serif { font-family: var(--font-serif); font-weight: 400; }

.display,
.h1,
.h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-heading);
  text-wrap: balance;
}
.display { font-size: var(--fs-display); line-height: 0.92; letter-spacing: -0.02em; }
.h1 { font-size: var(--fs-h1); line-height: 1; letter-spacing: -0.02em; }
.h2 { font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -0.02em; }
.h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.h4 {
  font-family: var(--font-sans);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.3;
}

.lead { font-size: var(--fs-lead); line-height: 1.6; }
.muted { color: var(--color-text-muted); }

.label {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1.4;
}

.tabular { font-variant-numeric: tabular-nums lining-nums; }

/* --- Layout -------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2); /* content area = --container */
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
}

.section { padding-block: var(--section-y); position: relative; }
.section--white { background: var(--white); }
.section--navy { background: var(--navy); color: var(--color-on-dark); }

.rule { border: 0; border-top: 1px solid var(--color-rule); margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--navy);
  color: var(--ivory);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Site background: white with faint blue blooms that stay put while the page scrolls.
   Light sections are transparent so the blooms show through; navy sections cover them. */
body { background: var(--white); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vw 38vw at 6% 82%, rgba(47, 93, 154, 0.10), transparent 70%),
    radial-gradient(34vw 34vw at 96% 40%, rgba(169, 189, 211, 0.28), transparent 70%),
    radial-gradient(28vw 28vw at 60% 0%, rgba(47, 93, 154, 0.06), transparent 70%);
}
.section--white { background: transparent; }
/* Site background matches the goals block: stronger blooms, blurred */
body::before {
  background:
    radial-gradient(46vw 46vw at 0% 95%, rgba(47, 93, 154, 0.22), transparent 65%),
    radial-gradient(42vw 42vw at 100% 45%, rgba(169, 189, 211, 0.5), transparent 65%),
    radial-gradient(30vw 30vw at 55% -5%, rgba(47, 93, 154, 0.08), transparent 65%);
  filter: blur(40px);
}
/* plain white site background (blooms switched off) */
body::before { display: none; }

/* Site background: a touch of cool grey instead of pure white */
body { background: #F6F7F9; }

/* Cards: white and raised on the grey page background (all pages) */
html body .acard:not(.acard--quote), html body .gcard2 a, html body .goals2__index .index__row, html body .value, html body .dept {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 36, 58, 0.04), 0 2px 4px rgba(16, 36, 58, 0.04), 0 24px 48px -24px rgba(16, 36, 58, 0.22);
}
html body .acard:not(.acard--quote):hover, html body .gcard2 a:hover, html body .goals2__index .index__row:hover {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 36, 58, 0.04), 0 2px 4px rgba(16, 36, 58, 0.06), 0 34px 60px -22px rgba(16, 36, 58, 0.32);
}
