/* Base: reinicio, tipografía, foco y accesibilidad. */

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

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

body {
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--texto);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, .titulo { font-family: var(--fuente-titulo); font-weight: 700; line-height: 1.2; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

a { color: var(--c-azul); }
img, svg { display: block; max-width: 100%; }
.icono { flex-shrink: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
button:disabled { cursor: not-allowed; }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--foco); border-radius: var(--radio-xs); }

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

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--texto-2); }
.suave { color: var(--texto-3); }
.positivo { color: var(--c-verde); }
.negativo { color: var(--c-rojo); }
.advertencia { color: var(--c-ambar); }
.oculto { display: none !important; }

@keyframes aparecer {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Solo opacidad: una transformación en el contenedor rompería los elementos position: fixed de adentro */
@keyframes aparecer-suave {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes latido {
  0% { transform: scale(1); }
  40% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
@keyframes girar { to { transform: rotate(360deg); } }

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