/*
Purpose: Overrides default browser styles so your website looks identical across all browsers.
Key contents: Removes default margins, paddings, and inconsistent form styles.
Industry choice: Use a popular pre-made baseline like Modern Reset or Normalize.css.
*/

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

/* 2. Remove default margins and paddings for common layout elements */
* {
  margin: 0;
  padding: 0;
}

/* 3. Allow percentage-based heights in the application */
html, body {
  /*height: 100%;*/
}

/* 4. Improve media defaults and prevent overflow issues */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img {
  /* Fixes fluid layouts and removes phantom bottom spacing */
  display: block;
  max-width: 100%;
  height: auto;

  /* Visually separates alt text from regular text if an image breaks */
  font-style: italic;

  /* Prevents broken image icons from repeating if background properties are applied */
  background-repeat: no-repeat;
  background-size: cover;
}

/* 5. Inherit fonts for form controls so they match layout typography */
input, button, textarea, select {
  font: inherit;
}

/* 6. Avoid text overflow and wrapping bugs */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 7. Remove animations for users who prefer reduced motion */
@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;
  }
}
