/* ==========================================================
  RESET.CSS — Reinicio / Normalización de CSS
   ----------------------------------------------------------
  Elimina inconsistencias de navegador por defecto y define
  valores base razonables. Incluye preferencias de movimiento
  orientadas a accesibilidad.
   ========================================================== */

/* ---------- Modelo de caja ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Documento ---------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5rem; /* compensación para cabecera fija */
}

/* ---------- Cuerpo ---------- */
body {
  min-height: 100vh;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--clr-text);
  background-color: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color var(--transition-base),
    color var(--transition-base);
}

/* ---------- Tipografía ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  line-height: var(--lh-heading);
  font-weight: var(--fw-bold);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ---------- Enlaces ---------- */
a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- Imágenes y medios ---------- */
img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic; /* estilo del texto alternativo */
}

/* ---------- Listas ---------- */
ul, ol {
  list-style: none;
}

/* ---------- Formularios y botones ---------- */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

/* ---------- Tablas ---------- */
table {
  border-collapse: collapse;
}

/* ---------- Varios ---------- */
fieldset {
  border: none;
}

/* Utilidad solo para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Focus visible global ---------- */
:focus-visible {
  outline: 3px solid var(--clr-primary);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
