/*
 * base.css — reset, body, link baseline, focus ring, reduced-motion.
 * Keep this file minimal; it's the reset/body layer, not typography.
 */

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

html {
  margin-top: 0 !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s var(--ease);
}

a:hover {
  color: var(--clay);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--clay);
  color: var(--cream);
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
  border-radius: 4px;
}

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

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