/* ==========================================================================
   base.css — reset, typography, layout primitives, container
   Depends on variables.css (load it first).
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brand); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--ink); }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

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

/* ---- headings ------------------------------------------------------------ */
h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 800;
  line-height: var(--lh-tight);
}
h1 { font-size: var(--fs-h1); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--fs-h2); letter-spacing: var(--tracking-tight); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: var(--lh-snug); }
h4 { font-size: 1.0625rem; font-weight: 700; }

p { color: var(--text); }

strong { color: var(--ink); font-weight: 700; }

/* financial figures: mono + tabular */
.mono, .figure {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---- layout primitives --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }

.section-head { max-width: 720px; margin-bottom: var(--sp-6); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--sp-2);
}

.lede { font-size: var(--fs-lede); color: var(--text); line-height: var(--lh-normal); }

/* generic grid helpers */
.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---- accessibility ------------------------------------------------------- */
.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;
}
.skip-link {
  position: absolute; left: var(--sp-3); top: -60px; z-index: var(--z-overlay);
  background: var(--ink); color: #fff; padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md); transition: top var(--t-fast);
}
.skip-link:focus { top: var(--sp-3); color: #fff; }

:focus-visible { outline: 2px solid var(--brand-glow); outline-offset: 2px; border-radius: var(--r-sm); }

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---- reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
