/* ==========================================================================
   Base — reset, tipografía por defecto, accesibilidad
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: from-font;
}

::selection {
  background: var(--color-sage);
  color: #fff;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: var(--fw-light);
}

/* ---- Accesibilidad: foco visible ---------------------------------------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  background: var(--color-sage);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  transition: top var(--duration-fast) ease;
}

.skip-link:focus {
  top: 16px;
}

/* ---- Movimiento reducido -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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