/* ==========================================================================
   BASE: reset, element defaults, accessibility helpers.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }   /* mobile menu / lightbox open */

h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }

h1, h2, h3 {
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

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

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-light :focus-visible,
.tile:not(.tile--dark) :focus-visible { outline-color: var(--teal-700); }

/* Skip link */
.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: calc(var(--z-curtain) + 1);
  padding: var(--space-3) var(--space-5);
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--radius-pill);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

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

/* Reduced motion: no animation or smooth scrolling anywhere */
@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;
  }
}
