/* global.css — base typography, layout primitives, accessibility, motion utilities */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, h4 { line-height: var(--lh-tight); letter-spacing: -0.015em; font-weight: 700; color: var(--ink); }
h1 { font-size: var(--fs-display); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-lg); line-height: var(--lh-snug); }
p { line-height: 1.65; }
strong { font-weight: 700; }
small { font-size: var(--fs-sm); }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

::selection { background: var(--blue-100); color: var(--ink); }

.icon { flex-shrink: 0; display: inline-block; vertical-align: -0.2em; }
.num { font-variant-numeric: tabular-nums; }

/* Layout */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-2); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.stack > * + * { margin-top: var(--s-4); }

/* Section header: numbered eyebrow → title → lead */
.section-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-10); max-width: 760px; }
.section-head--split { max-width: none; }
@media (min-width: 960px) {
  .section-head--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; column-gap: var(--s-16); }
  .section-head--split .section-lead { justify-self: end; max-width: 460px; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}
.eyebrow__num { color: var(--blue); font-variant-numeric: tabular-nums; }
.eyebrow__num::after { content: ''; display: inline-block; width: 20px; height: 2px; background: var(--yellow); margin-left: var(--s-3); vertical-align: middle; }
.section-title { font-size: var(--fs-3xl); }
.section-lead { color: var(--ink-2); font-size: var(--fs-md); line-height: 1.6; }

/* Accessibility */
.sr-only {
  position: absolute !important; 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(--s-4); top: -100px; z-index: 100; padding: var(--s-3) var(--s-4);
  background: var(--blue); color: var(--white); border-radius: var(--r); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-4); color: var(--white); }

/* Text helpers */
.muted { color: var(--ink-3); }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mb-3 { margin-bottom: var(--s-3); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prose p + p { margin-top: var(--s-4); }
.prose { color: var(--ink-2); font-size: var(--fs-md); max-width: 68ch; }

/* Reveal on scroll (added by ui.js; content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* Image reveal: fade in when loaded */
.img-fade { opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.img-fade.is-loaded { opacity: 1; }
