/* ============================================================
   BASE — reset, typography, layout primitives
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: var(--lh-norm);
  color: var(--c-graphite);
  background: var(--c-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 var(--s-4);
  font-family: var(--font-display);
  font-weight: var(--w-semi);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
  color: var(--c-ink);
  text-wrap: balance;
}

h1 { font-size: var(--t-5xl); }
h2 { font-size: var(--t-3xl); }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-lg); }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.15rem; }
li { margin-bottom: var(--s-2); }
li:last-child { margin-bottom: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: var(--s-7) 0;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--c-accent); color: #fff; }

/* ---- Layout primitives ---- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

.wrap--wide { max-width: var(--wrap-wide); }
.wrap--text { max-width: var(--wrap-text); }

.section { padding-block: var(--s-9); }
.section--tight { padding-block: var(--s-8); }
.section--alt  { background: var(--c-surface-alt); }
.section--warm { background: var(--c-surface-warm); }
.section--dark {
  background: var(--c-deep);
  color: #EAEFEB;
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: #fff; }

.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---- Type utilities ---- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: var(--w-med);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--s-4);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--c-accent);
}

.section--dark .eyebrow { color: var(--c-brass); }
.section--dark .eyebrow::before { background: var(--c-brass); }

.lead {
  font-size: var(--t-lg);
  line-height: var(--lh-loose);
  color: var(--c-slate);
}

.section--dark .lead { color: #CBD7CF; }

.muted { color: var(--c-mute); }
.small { font-size: var(--t-sm); }

.section-head {
  max-width: 720px;
  margin-bottom: var(--s-7);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow { justify-content: center; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-deep);
  color: #fff;
  padding: var(--s-3) var(--s-5);
  z-index: 200;
}
.skip-link:focus { left: 0; }

.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;
}
