/* ==========================================================================
   Base: reset, typography, layout primitives, accessibility helpers
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---- Headings: refined serif, medium weight ---- */
h1, h2, h3, h4 {
  margin: 0 0 0.45em;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--color-heading);
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.02; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

/* ---- Links ---- */
a {
  color: var(--color-link);
  text-decoration-line: underline;
  text-decoration-color: var(--vd-taupe-500);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
a:hover { color: var(--vd-blue-900); text-decoration-color: var(--vd-blue-900); }

/* Outbound links that the live site styles to read as plain text (class "hide-link").
   Kept identical in appearance; flagged in docs/03-open-items.md (WCAG 1.4.1). */
a.hide-link { color: inherit; text-decoration: none; cursor: text; }
a.hide-link:hover { color: inherit; text-decoration: none; }
a.hide-link:focus-visible { text-decoration: underline; }

/* ---- Focus: always visible ---- */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--vd-taupe-300); }

/* ---- Layout ---- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--wide { width: min(100% - 2 * var(--gutter), var(--container-wide)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--white { background: var(--vd-white); }

.section-head { max-width: 46rem; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--color-text-muted); font-size: var(--fs-lead); }
.section-head .btn { margin-top: 0.75rem; }

/* Small letter-spaced uppercase label: the only place uppercase tracking is used besides the logo */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 1.1rem;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vd-taupe-700);
}
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--vd-taupe-500); }
.on-dark .eyebrow { color: var(--vd-taupe-300); }

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

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 300;
  padding: 12px 18px;
  background: var(--vd-blue-900); color: var(--vd-ivory-100);
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; }
.icon--fill { fill: currentColor; stroke: none; }

/* Scroll reveal: content is always visible without JS or with reduced motion */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

.is-static .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

@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; }
  .js .reveal { opacity: 1; transform: none; }
}
