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

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-charcoal);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-2);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }

p { margin: 0 0 var(--space-2); color: var(--color-text-muted); }

a { color: var(--color-royal-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-royal-blue);
  color: var(--color-white);
  padding: var(--space-1) var(--space-2);
  z-index: var(--z-skip-link);
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

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

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

section { padding-block: var(--space-6); }

/* Lazy-loaded images fade in once loaded */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-standard);
}
img[loading="lazy"].is-loaded { opacity: 1; }
