/* =============================================================================
   reset.css — Normalización y estilos base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font-body);
  /* 16 px en móvil, 17 px en escritorio */
  font-size: clamp(1rem, 0.955rem + 0.19vw, 1.0625rem);
  line-height: var(--leading-body);
  background-color: var(--bg);
  color: var(--fg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--fg);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { color: var(--fg-soft); text-wrap: pretty; }
p + p { margin-top: var(--space-4); }

strong { color: var(--fg); font-weight: 600; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }

/* Debe ir después de la regla anterior: `svg { display: block }` anularía el
   [hidden] del navegador y los dos iconos del menú se verían a la vez. */
[hidden] { display: none !important; }

button, input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
}

button { background: none; border: none; cursor: pointer; }

ul, ol { list-style: none; }

hr { border: none; border-top: 1px solid var(--line); }

/* --- Utilidades ---------------------------------------------------------- */
.text-center { text-align: center; }
.measure { max-width: var(--measure); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 2000;
  padding: var(--space-3) var(--space-5);
  background: var(--green-500);
  color: var(--ink-900);
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: transform var(--t-fast);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* --- Accesibilidad ------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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