/* Aparición al hacer scroll, ligada a la posición de la página (no a JavaScript).
   El contenido siempre termina visible: si el navegador no soporta animaciones por scroll,
   o la persona prefiere menos movimiento, simplemente se muestra sin animar. */
@keyframes aparecer {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .seccion [data-revelar]:not([data-revelar='hijos']),
    .seccion [data-revelar='hijos'] > *,
    .cierre [data-revelar] {
      animation: aparecer linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}

/* La portada entra al cargar, escalonada. Solo se mueve, nunca parte invisible:
   si la animación no corre (pestaña en segundo plano, capturas, el renderizador de Google),
   el contenido principal se ve igual. */
@keyframes subir {
  from { transform: translateY(18px); }
  to { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .portada [data-revelar='hijos'] > * {
    animation: subir .7s cubic-bezier(.2, .7, .2, 1) both;
  }
  .portada [data-revelar='hijos'] > :nth-child(2) { animation-delay: .08s; }
  .portada [data-revelar='hijos'] > :nth-child(3) { animation-delay: .16s; }
  .portada [data-revelar='hijos'] > :nth-child(4) { animation-delay: .24s; }
  .portada [data-revelar='hijos'] > :nth-child(5) { animation-delay: .32s; }
  .portada [data-revelar='hijos'] > :nth-child(n + 6) { animation-delay: .4s; }
  .portada__visual { animation: subir .9s .2s cubic-bezier(.2, .7, .2, 1) both; }
}
