/* ===========================================================================
   AIA Uniandes — Base
   Reset, tipografía y accesibilidad. Sin componentes ni maquetación.
   =========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--cuerpo);
  font-size: 16px;
  line-height: 1.6;
  color: var(--texto);
  background-color: var(--fondo);
  background-image: var(--fondo-brillo), var(--fondo-trama);
  background-size: auto, var(--fondo-trama-tam);
  background-attachment: fixed, scroll;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 260ms ease, color 260ms ease;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}

h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.03;
}
h2 {
  font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.5rem);
}
h3 {
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.5rem);
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--acento);
  text-decoration: none;
  transition: color 180ms ease;
}
a:hover {
  color: var(--texto);
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* El foco de teclado tiene que verse: es la única forma de navegar el sitio
   sin ratón, y los filtros y el carrusel son todos controles. */
:focus-visible {
  outline: 3px solid var(--acento);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Texto solo para lectores de pantalla. */
.oculto-visual {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Salto al contenido: primer elemento enfocable de cada página. */
.saltar {
  position: absolute;
  top: -100px;
  left: var(--margen-lateral);
  z-index: 100;
  padding: 12px 20px;
  background: var(--primario-fondo);
  color: var(--primario-texto);
  border-radius: var(--r-control);
  font-weight: 600;
  transition: top 160ms ease;
}
.saltar:focus {
  top: 12px;
  color: var(--primario-texto);
}

/* --- Tipografía de apoyo --- */

.etiqueta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--acento);
}

.entradilla {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--texto-2);
  max-width: 34em;
}

.apoyo {
  font-size: 0.9375rem;
  line-height: 1.68;
  color: var(--texto-2);
}

.menudo {
  font-size: 0.8125rem;
  color: var(--texto-3);
}

/* Quien pidió menos movimiento, recibe menos movimiento. */
@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;
    scroll-behavior: auto !important;
  }
}
