/* ==========================================================================
   Modern CSS Reset
   Based on Josh Comeau's Custom CSS Reset + Andy Bell's Modern Reset
   ========================================================================== */

/* Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Allow percentage-based heights */
html, body {
  height: 100%;
}

/* Improve text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* Remove built-in form typography styles */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

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

/* Remove list styles on ul, ol with role="list" */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Anchor defaults */
a {
  color: inherit;
  text-decoration: none;
}

/* Remove button defaults */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Reduced motion — respect user preferences */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Smooth scroll for anchors (when motion is OK) */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
