/* =============================================================================
   Base Reset & Accessibility Foundation
   ============================================================================= */

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

/* Hidden content */
[hidden] {
  display: none !important;
}

/* Smooth scrolling with reduced motion support */
html {
  scroll-behavior: smooth;
}

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

/* Body defaults */
body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Image and SVG scaling */
img,
svg {
  max-width: 100%;
  height: auto;
}

/* Focus visibility styles (WCAG AAA) */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* Skip link styles */
.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 200;
  background-color: var(--gold-bright);
  color: var(--paper);
  border: 3px solid var(--ink);
  padding: .7rem 1.4rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  text-decoration: none;
  border-radius: .85rem;
  transition: transform 0.3s ease;
}

.skip-link:focus-visible {
  transform: translateX(-50%) translateY(0);
}