/*
 * Modern CSS Reset
 * Inspirado en Andy Bell (https://piccalil.li/blog/a-more-modern-css-reset/)
 * y Josh Comeau (https://www.joshwcomeau.com/css/custom-css-reset/).
 */

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

/* 2. Eliminar margins por defecto. */
* {
  margin: 0;
}

/* 3. Asegurar que body y html ocupan toda la altura disponible. */
html,
body {
  height: 100%;
}

/* 4. Defaults sensatos en body. */
body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 5. Media elements como bloque y nunca desbordan. */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 6. Que los form controls hereden tipografía. */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* 7. Word wrap en texto largo (slugs, URLs, etc.). */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 8. Botones sin estilo nativo, listos para customizar. */
button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* 9. Anchors heredan color por defecto. */
a {
  color: inherit;
  text-decoration: none;
}

/* 10. Listas marcadas con role="list" pierden bullets (accesibilidad). */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* 11. Smooth scroll cuando el usuario lo permite. */
html:focus-within {
  scroll-behavior: smooth;
}

/* 12. Respetar prefers-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;
  }
}
