* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  font-family: var(--font-body);
  color: var(--color-text);
}

a {
  color: var(--color-green);
  text-decoration: none;
}
a:hover { color: var(--color-green-hover); }

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

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

/* Oculto visualmente, disponible para lectores de pantalla — para encabezados
   que arreglan la jerarquía (h2/h3) sin agregar un título visible de más. */
.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;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-green-mid);
  outline-offset: 2px;
}

@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;
  }
}

/* Reveal genérico al entrar en viewport (js/reveal.js) — reutilizable por
   cualquier módulo del rediseño v3. prefers-reduced-motion ya colapsa la
   transición arriba, así que el estado igual cambia, solo sin animación. */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.16,.84,.44,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animaciones globales reutilizadas por varios módulos (ej. Módulo 6 — Prueba) */
@keyframes barFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-22px); }
}

@keyframes barSwirl {
  0%   { transform: rotate(0deg) scale(1); opacity: 1; filter: blur(0px); }
  35%  { transform: rotate(220deg) scale(.55); opacity: .35; filter: blur(3px); }
  70%  { transform: rotate(400deg) scale(.85); opacity: .8; filter: blur(1px); }
  100% { transform: rotate(360deg) scale(1); opacity: 1; filter: blur(0px); }
}
