/*
  Base reset + accessible defaults.
  Kept separate from styles.css so it's obvious what's a global
  reset vs. a page-specific component.
*/

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

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Respect reduced-motion preferences everywhere, not just scroll */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible keyboard focus, everywhere, no exceptions */
:focus {
  outline: none;
}
:focus-visible {
  outline: 3px solid var(--color-corsa);
  outline-offset: 2px;
}

/* Skip link: hidden until focused, then jumps above everything */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--color-ink);
  color: var(--color-paper);
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  text-decoration: none;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 12px;
}

/* Screen-reader-only utility, for context sighted users don't need repeated */
.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;
}
