/* ============================================================
   BASE, reset, typography defaults, accessibility floor
   ============================================================ */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "kern" 1, "liga" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--ls-head);
  line-height: var(--lh-snug);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); letter-spacing: var(--ls-display); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); letter-spacing: var(--ls-display); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p  { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
}
button { cursor: pointer; }

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

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
  border-radius: 3px;
}
.on-dark :focus-visible,
.section--dark :focus-visible { outline-color: var(--bronze-lite); }

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

.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;
}

/* ---------- Shared type utilities ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--bronze);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}
.section--dark .eyebrow { color: var(--bronze-lite); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.58;
  color: var(--text-2);
  max-width: 54ch;
}
.section--dark .lead { color: var(--on-dark-2); }

.display { font-size: var(--fs-display); letter-spacing: var(--ls-display); line-height: var(--lh-tight); }

.muted     { color: var(--text-2); }
.dim       { color: var(--text-3); }
.accent    { color: var(--bronze); }
.section--dark .accent { color: var(--bronze-lite); }

/* Emphasised word inside a big heading, kept quiet */
.tone-soft { color: var(--text-3); }
.section--dark .tone-soft { color: var(--on-dark-3); }

/* ---------- 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;
    scroll-behavior: auto !important;
  }
}
