/* ==========================================================================
   Base — reset, document defaults, elements.
   No component styling here.
   ========================================================================== */

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

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Links -------------------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease), background-color var(--ease), border-color var(--ease);
}
a:hover { color: var(--teal); }

/* ---- Focus -------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* ---- Media -------------------------------------------------------------- */
img { max-width: 100%; }

/* ---- Headings ----------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
}

p { margin: 0; }

/* ---- Skip link ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--teal);
  color: var(--teal-on);
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
  color: var(--teal-on);
}

/* ---- Screen-reader only -------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
