/* ==========================================================================
   GENERIC · RESET — a modern, opinionated reset. Normalises the box model,
   strips default margins, makes media well-behaved, and honours reduced-motion
   globally. Sets nothing that belongs to the design (that is the ELEMENTS job).
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button { background: none; border: 0; cursor: pointer; }

p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

h1, h2, h3, h4 { text-wrap: balance; }

ul[role="list"],
ol[role="list"] { list-style: none; padding: 0; }

:target { scroll-margin-top: var(--space-xl); }

/* Anchored sections under no sticky chrome still need a little air */
[id] { scroll-margin-top: var(--space-lg); }

::selection {
  background: var(--selection);
  color: var(--ink);
}

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