/* ==========================================================================
   BASE — reset, typographic baseline, shared utilities
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Leave room for the sticky header on anchor jumps, otherwise the heading
     ends up hidden behind it. */
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  background: var(--c-base);
  color: var(--c-body);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

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

img { height: auto; }

input,
select,
textarea,
button {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

ul, ol { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }

/* --- Headings ------------------------------------------------------------ */
h1, h2, h3, h4 {
  color: var(--c-heading);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); letter-spacing: -0.028em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.025em; }
h3 { font-size: var(--fs-h3); letter-spacing: -0.011em; }
h4 { font-size: var(--fs-h4); letter-spacing: -0.005em; }

p { text-wrap: pretty; }

/* Eyebrow: the small uppercase dark red phrase above a section heading */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--c-accent);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.115em;
  line-height: 1;
  text-transform: uppercase;
}

/* The short rule to the left of the eyebrow */
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1.5px;
  flex: none;
  background: currentColor;
}

.section__head--center .eyebrow { justify-content: center; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.62;
  max-width: 62ch;
}

/* --- Utilities ----------------------------------------------------------- */

/* Screen readers only: visually hidden but still announced */
.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, revealed when a keyboard user presses Tab */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  background: var(--c-accent);
  color: #fff;
  transition: top var(--t-fast);
}

.skip-link:focus { top: 16px; }

/* Consistent keyboard focus ring */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* Respect the system "reduce motion" setting: drop smooth scrolling and
   transitions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
