/* =========================================================================
   reset.css — modern, accessibility-respecting reset
   Order: load FIRST, before tokens/base/layout/components/utilities.
   Notes:
   - Keeps user font-size (no html{font-size:62.5%} hacks) so rem == user pref.
   - Respects prefers-reduced-motion globally as a safety net.
   ========================================================================= */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%; /* don't auto-inflate text on orientation change */
  text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  line-height: 1.5;            /* WCAG 1.4.12 friendly default */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Media defaults — block-level, never overflow their container */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form elements inherit typography instead of using tiny UA defaults */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

/* Avoid text overflow on long words/URLs */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Lists used as nav/unstyled get reset via a class, not globally,
   so real prose lists keep their semantics + markers. */

/* Remove list styling only where explicitly opted in */
:where(ul, ol).u-list-reset {
  list-style: none;
  padding: 0;
}

/* Make sure hidden truly hides (some libs override) */
[hidden] { display: none !important; }

/* Root stacking + smooth scroll (smooth is removed under reduced-motion) */
:root { scroll-behavior: smooth; }

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