/* Document defaults only. Section layouts and visual effects stay in page CSS. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scrollbar-color: var(--fg) var(--bg);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--bg); }
img, video, svg { display: block; max-width: 100%; }
button, input, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.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 {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  padding: var(--space-3) var(--space-4);
  background: var(--fg);
  color: var(--bg);
  transform: translateY(-180%);
  transition: transform 180ms ease;
}
.skip-link:focus { transform: translateY(0); }

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