/* base.css: reset, letra, enlaces, foco y movimiento. Solo variables de tokens.css. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-synthesis: var(--sintesis-fuente);
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-weight: var(--peso-texto);
  font-size: var(--texto-base);
  line-height: var(--interlineado);
  font-feature-settings: var(--rasgos-fuente);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--fuente-titulares);
  font-weight: var(--peso-titulares);
  font-style: normal;
  line-height: var(--interlineado-titulos);
  letter-spacing: var(--tracking-titulos);
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }

p, ul, ol, figure, blockquote { margin: 0; }
p { text-wrap: pretty; }
strong, b { font-weight: var(--peso-fuerte); }

a {
  color: var(--enlace);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--tinta); }

button { font: inherit; color: inherit; }

::selection { background: var(--marcador); color: var(--tinta); }

:focus-visible {
  outline: var(--foco-ancho) solid var(--foco);
  outline-offset: var(--foco-separacion);
  border-radius: var(--radio-s);
}
main:focus { outline: none; }

/* Solo para lectores de pantalla */
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Saltar al contenido */
.saltar {
  position: absolute;
  z-index: 60;
  left: var(--margen-lateral);
  top: calc(-1 * var(--e-9));
  padding: var(--e-3) var(--e-4);
  border-radius: var(--radio-m);
  background: var(--fondo);
  color: var(--tinta);
  text-decoration: none;
}
.saltar:focus { top: var(--e-3); }

/* Las letras grandes esperan a su fuente (como mucho 1,5 s) para que nada cambie de medida al llegar */
.letra-espera h1,
.letra-espera .palabra,
.letra-espera .portada .figura,
.letra-espera .portada .contenido { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
