/*
  @file /css/reset.css
  @brief A reset file for removing all default html styling from the page
  @author I dunno
  @updated 2026-03-26

  @note
    - I got this from the internet, I did not write this myself,
      However it works pretty good so do with it what you will.

  @warning
    - This should be included either before token.css or
      directly after it at the top of the webpage so you
      don't remove you're own styling.
*/

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

/* Document defaults */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Remove default margins */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
figure,
dl,
dd,
ol,
ul {
  margin: 0;
}

/* Remove default list styling where a list role is still semantic */
ol,
ul {
  list-style: none;
  padding: 0;
}

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

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

img,
picture,
video {
  height: auto;
}

/* Form controls inherit typography */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Textarea resizing */
textarea {
  resize: vertical;
}

/* Better anchor behavior */
a {
  color: inherit;
}

/* Prevent overflow issues in text elements */
p,
h1,
h2,
h3,
h4,
h5,
h6,
li,
figcaption {
  overflow-wrap: break-word;
}

/* Respect reduced motion preferences */
@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;
  }
}
