/* ==========================================================================
   A. Woods — base.css
   Reset, design tokens, and base typography.
   ========================================================================== */

:root {
  /* ---- Color tokens ----
     Warm charcoal + cream, rust accent, steel secondary.
     No blue/purple gradients by design — this is an industrial palette. */
  --ink: #1b1b1a;
  --ink-soft: #262523;
  --line-dark: #3d3b36;

  --paper: #f5f1e8;
  --paper-dim: #ece4d2;
  --line: #d9d0ba;

  --text: #201f1c;
  --text-muted: #5c584e;
  --text-on-ink: #f5f1e8;
  --text-on-ink-muted: #b6b0a1;

  --accent: #b5502f;       /* rust — backgrounds, borders, buttons */
  --accent-dark: #8a3c22;  /* accent text on paper (contrast-safe) */
  --accent-light: #dd7c4c; /* accent text/links on ink */

  --steel: #4a5a63;
  --steel-dark: #38454c;

  /* ---- Type ---- */
  --font-head: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* ---- Spacing scale ---- */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6.5rem;

  --container-w: 1180px;
  --border-w: 2px;
  --focus-ring: 3px solid var(--accent-dark);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin: 0;
}

ul[class], ol[class] {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

button {
  cursor: pointer;
}

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

/* Respect reduced-motion preference */
@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;
  }
}

/* ---- Base typography ---- */
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text);
  line-height: 1.55;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-transform: uppercase;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p {
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: var(--border-w);
  background: var(--accent);
  display: inline-block;
}

/* ---- Focus visibility (accessibility) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 0;
  top: -100%;
  background: var(--accent);
  color: var(--text-on-ink);
  padding: var(--space-1) var(--space-2);
  z-index: 1000;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.skip-link:focus {
  top: 0;
}

.section {
  padding-block: var(--space-6);
}

.section--tight {
  padding-block: var(--space-5);
}

.section--ink {
  background: var(--ink);
  color: var(--text-on-ink);
}

.section--ink h1,
.section--ink h2,
.section--ink h3 {
  color: var(--text-on-ink);
}

.section--dim {
  background: var(--paper-dim);
}

.section-head {
  max-width: 44rem;
  margin-bottom: var(--space-4);
}

.section-head h2 {
  margin-top: var(--space-1);
}
