/* ============================================================
   PrepBenchmark · base.css
   Fonts, reset, element defaults. Load SECOND.
   ============================================================ */

/* ---- Self-hosted fonts (source of truth; place files in fonts/) ---- */
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* Reserve the scrollbar gutter permanently so locking the page behind the open
   mobile menu (overflow:hidden) never reclaims the scrollbar width and shifts
   the sticky header sideways. */
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---- Headings: serif is reserved for major headlines ---- */
h1, h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--color-navy);
  text-wrap: balance;
}
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--color-navy);
}
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-base); }
p { text-wrap: pretty; }

/* ---- Links ---- */
a {
  color: var(--color-navy-2);
  text-decoration: underline;
  text-decoration-color: rgba(36, 59, 83, 0.35);
  text-underline-offset: 3px;
  transition: color var(--transition), text-decoration-color var(--transition);
}
a:hover { color: var(--color-navy); text-decoration-color: currentColor; }

/* ---- Focus visibility (WCAG) ---- */
:focus-visible {
  outline: 2px solid var(--focus-on-light);
  outline-offset: 2px;
  border-radius: 2px;
}
.on-dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--focus-on-dark);
}

::selection { background: var(--color-navy-2); color: var(--color-ink-on-navy); }

/* ---- Utilities ---- */
.sr-only {
  position: absolute;
  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: var(--space-4); top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-navy);
  color: var(--color-ink-on-navy);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus-visible { top: var(--space-2); color: var(--color-ink-on-navy); }
