/* Reset, typography and layout primitives shared by every page. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--navy-900);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
/* Safe areas only apply on pages with viewport-fit=cover (lesson page); elsewhere env() is 0. */
.container {
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-head); line-height: 1.05; letter-spacing: 0.01em; }
h2 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; text-transform: uppercase; }
h3, .h3 { font-size: 1.35rem; font-weight: 600; }
h2.h3 { text-transform: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); }
.eyebrow--center { justify-content: center; }
.lead { font-size: 1.08rem; color: var(--text-muted); max-width: 62ch; }
.gold { color: var(--gold); }
.text-strong { color: var(--text); }

/* ---------- Sections ---------- */
section { padding: 100px 0; scroll-margin-top: 68px; }
.section-head { margin-bottom: 52px; }
.section-head h2 { margin-bottom: 16px; }
@media (max-width: 640px) { section { padding: 72px 0; } .section-head { margin-bottom: 36px; } }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  padding: 10px 18px; border-radius: 999px;
  background: var(--gold-light); color: var(--navy-950); font-weight: 600;
}
.skip-link:focus { top: 12px; }
main:focus { outline: none; } /* skip-link target */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
