/* ============================================================
   Base: reinicio, tipografía, foco, utilidades
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 15px;
  line-height: 1.45;
  color: var(--texto);
  background: var(--fondo-app);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

button {
  margin: 0;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }

/* --- Foco visible en todo lo interactivo (sección 9) --- */
:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 2px;
  border-radius: var(--r-chico);
}
/* Sobre superficies oscuras el anillo negro no se ve: se invierte */
.sobre-oscuro :focus-visible,
.fab:focus-visible {
  outline-color: var(--acento);
}

.salto-contenido {
  position: absolute;
  left: var(--e-2);
  top: -100px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: var(--tactil);
  padding: 0 var(--e-2);
  background: var(--primario);
  color: var(--sobre-primario);
  border-radius: var(--r-chico);
  font-weight: 600;
  transition: top .15s ease;
}
.salto-contenido:focus { top: var(--e-2); }

/* --- Escala tipográfica --- */
.etiqueta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--texto-tenue);
}

.metrica {
  font-size: clamp(4.75rem, 18vw, 6rem);   /* 76px → 96px */
  font-weight: 800;
  line-height: .88;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}

.metrica-media {
  font-size: clamp(2rem, 7vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

/* El titular manda, como en la referencia: grande, muy apretado y en
   el peso más alto de la familia. */
.titulo-vista {
  font-size: clamp(1.75rem, 5.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.titulo-seccion {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.texto-medio { color: var(--texto-medio); }
.texto-tenue { color: var(--texto-tenue); }
.numerico    { font-variant-numeric: tabular-nums; }

.solo-lectores {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Animaciones de entrada, respetando la preferencia del sistema --- */
@keyframes aparecer {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.aparece { animation: aparecer .22s ease both; }

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