/* ============================================================
   BASE / RESET / TYPOGRAPHY / LAYOUT PRIMITIVES
   ============================================================ */

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

/* The [hidden] attribute is how tabs/filters hide inactive panels (see
   main.js). By default it has the same CSS specificity as our own
   `.card-grid { display:grid }` etc., and since our stylesheet loads
   after the browser's UA sheet, our display rule was winning — so
   "hidden" panels stayed visible and stacked on top of each other.
   This forces [hidden] to always win, regardless of what else targets
   the element. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-charcoal);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin: 0;
  color: var(--color-navy);
}

h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); font-weight: 600; }

p { margin: 0; }

.lead { font-size: var(--fs-lead); color: var(--color-slate); line-height: var(--lh-relaxed); }

blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-h5);
  line-height: var(--lh-snug);
  color: var(--color-navy);
  margin: 0;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--sp-2) var(--sp-3);
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Layout containers ---- */
.wrap {
  max-width: var(--width-content);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
.wrap-max {
  max-width: var(--width-max);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
.wrap-narrow {
  max-width: var(--width-narrow);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
.wrap-prose {
  max-width: var(--width-prose);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

.section { padding-block: var(--sp-15); }
.section-tight { padding-block: var(--sp-12); }
.section-alt { background: var(--color-warm-gray); }
.section-navy { background: var(--color-navy); color: rgba(255,255,255,0.86); }
.section-navy h1, .section-navy h2, .section-navy h3, .section-navy h4 { color: var(--color-white); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 900px) {
  .grid-12 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Eyebrow labels ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-gold-deep);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--color-gold);
}
.section-navy .eyebrow { color: var(--color-gold); }

.section-head {
  max-width: 720px;
  margin-bottom: var(--sp-8);
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: var(--sp-2); }
.section-head p { margin-top: var(--sp-3); }

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

/* ---- Responsive type scale for headings on mobile ---- */
@media (max-width: 600px) {
  .lead { font-size: var(--fs-base); }
}
