/* ==========================================================================
   Base / Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 var(--space-3);
  color: var(--ink-900);
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-900); }
h2 { font-size: var(--fs-800); }
h3 { font-size: var(--fs-700); }
h4 { font-size: var(--fs-600); text-transform: none; letter-spacing: normal; }

p { margin: 0 0 var(--space-4); color: var(--ink-700); }
p.lead { font-size: var(--fs-500); color: var(--ink-600); }

a {
  color: var(--red-600);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

ul, ol { padding-left: 1.25em; }

button { font-family: inherit; }

/* --- Focus visibility (WCAG 2.4.7) --- */
:focus-visible {
  outline: 3px solid var(--red-600);
  outline-offset: 3px;
  border-radius: 3px;
}
.on-dark :focus-visible,
[data-on-dark] :focus-visible {
  outline-color: var(--white);
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--red-700);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top var(--dur-fast) var(--ease);
  font-weight: 600;
}
.skip-link:focus {
  top: var(--space-4);
}

/* --- Layout helpers --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: var(--space-9);
}
.section--alt { background: var(--offwhite); }
.section--dark {
  background: linear-gradient(155deg, var(--red-900) 0%, var(--red-700) 60%, var(--red-600) 100%);
  color: var(--white);
}
.section--dark p { color: rgba(255,255,255,0.85); }

/* Headings must explicitly inherit white on dark/red surfaces — h1-h4 set
   their own color and would otherwise fall back to near-black (contrast fail). */
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4,
[data-on-dark] h1, [data-on-dark] h2, [data-on-dark] h3, [data-on-dark] h4 {
  color: var(--white);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-7);
}
.section-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-600);
  font-size: var(--fs-300);
  margin-bottom: var(--space-2);
}
.section--dark .section-head .eyebrow { color: var(--red-100); }

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

.text-center { text-align: center; }

@media (max-width: 720px) {
  .section { padding-block: var(--space-7); }
}
