/* Base: reset mínimo y estilos de los elementos HTML sin clases. */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--tinta) var(--papel-2);
  scroll-padding-top: var(--e-8);
}

body {
  min-height: 100dvh;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente-texto);
  font-size: var(--t-base);
  line-height: var(--interlinea-texto);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--fuente-titulo);
  font-weight: var(--peso-titulo);
  line-height: var(--interlinea-titulo);
  text-transform: uppercase;
  text-wrap: balance;
}

h1 { font-size: var(--t-display); font-weight: var(--peso-display); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }

p { max-width: var(--medida); text-wrap: pretty; }

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

/* Foco visible para teclado; el ratón no lo dispara */
:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Sobre fondos oscuros el foco pasa a ser el acento */
.oscuro :focus-visible { outline-color: var(--acento); }

/* Detalles del navegador, tematizados */
::selection { background: var(--acento); color: var(--tinta); }

/* Enlace para saltar al contenido (accesibilidad) */
.saltar {
  position: absolute;
  left: var(--e-4);
  top: -4rem;
  padding: var(--e-3) var(--e-4);
  background: var(--tinta);
  color: var(--papel);
  border-radius: var(--radio-s);
  z-index: 10;
}
.saltar:focus { top: var(--e-4); }

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

/* Texto solo para lectores de pantalla */
.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
