/* ============================================================================
   base.css — reset + document defaults
   ----------------------------------------------------------------------------
   Direction B's document baseline, expressed entirely in tokens. No raw colour
   values live here; see tokens.css.

   Applied by pages that opt in via the `styles:` front-matter key. The four
   migrated pages do NOT load this yet — they keep their legacy sheets until
   SBB-2 rethemes them.
   ========================================================================== */

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

html { scroll-behavior: smooth; }

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

body {
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-450);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

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

img,
video { height: auto; }

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

/* ---------------------------------------------------------------- headings
   Weight and size carry the hierarchy — Direction B has no display face. */
h1, h2, h3, h4, h5, h6 { font-weight: var(--fw-black); }

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

h2 {
  font-size: var(--fs-display-section);
  line-height: var(--lh-section);
  letter-spacing: var(--ls-heading);
}

h3 {
  font-size: var(--fs-600);
  line-height: var(--lh-card-title);
  letter-spacing: var(--ls-tight);
}

/* ------------------------------------------------------------- focus state
   The mockup ships no focus style; the Sun ring is the accessible minimum. */
:focus-visible {
  outline: var(--border-medium) solid var(--accent);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: calc(var(--z-header) + 1);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--fs-350);
  font-weight: var(--fw-black);
  padding: var(--space-12) var(--space-22);
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus { left: 0; }
