/* base.css — reset, typography scale, layout primitives.
 * No raw colour values. Everything comes from tokens.css.
 */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-s);
  line-height: var(--leading-tight);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
h4 { font-size: var(--step-0); letter-spacing: 0; }

p, ul, ol { margin: 0 0 var(--space-s); }
p { max-width: var(--measure); }

a { color: var(--action); text-underline-offset: 0.18em; }
a:hover { color: var(--action-hover); }

:focus-visible {
  outline: var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

img { display: block; max-width: 100%; height: auto; }

strong { font-weight: 700; }

hr {
  height: 1px;
  margin: var(--space-l) 0;
  border: 0;
  background: var(--border);
}

/* --- layout primitives ---------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 760px; }

.section { padding-block: clamp(2.5rem, 7vw, 5rem); }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }

/* Light background blocks, all drawn from the brand palette: the blue of the
   crew shirts and the red of the vehicle decals, washed right back so text
   contrast is untouched. */
.section--alt { background: var(--bg-alt); }
.section--warm { background: var(--bg-warm); }
.section--blue { background: var(--bg-blue); }

.section--ink {
  background: var(--bg-ink);
  color: var(--text-on-ink);
}
.section--ink h2, .section--ink h3 { color: var(--text-on-ink); }
.section--ink p { color: var(--text-on-ink-muted); }

.section-head { margin-bottom: var(--space-l); }
.section-head p { color: var(--text-muted); }
.section--ink .section-head p { color: var(--text-on-ink-muted); }

.eyebrow {
  display: block;
  margin-bottom: var(--space-2xs);
  color: var(--accent-text);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section--ink .eyebrow { color: var(--focus); }

.grid { display: grid; gap: var(--space-m); }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.stack > * + * { margin-top: var(--space-s); }

.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -100%;
  z-index: 100;
  padding: var(--space-2xs) var(--space-s);
  background: var(--bg-ink);
  color: var(--text-on-ink);
  border-radius: var(--radius-s);
}
.skip-link:focus { top: var(--space-s); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- small utilities -------------------------------------------------- */
/* These exist so no element needs a style="" attribute. Inline styles are
   blocked by the Content-Security-Policy the site is served under, so a
   layout tweak written inline simply does not apply in production. */

.u-center       { text-align: center; }
.u-center p     { margin-inline: auto; }
.u-center .btn-row { justify-content: center; }

.u-mt-m         { margin-top: var(--space-m); }
.u-mt-l         { margin-top: var(--space-l); }
.u-mt-0         { margin-top: 0; }

.u-figure       { margin: var(--space-l) 0 0; }
.u-figure img   { border-radius: var(--radius-l); }
