/* Capa de movimiento del tema hijo.
 *
 * Mejora progresiva:
 * - El contenido es visible de forma predeterminada.
 * - main.js añade .ljmx-reveal a objetivos concretos y solo después activa
 *   html.ljmx-motion-ready.
 * - Si main.js no carga, no se ejecuta o falla antes de estar listo, ninguna
 *   regla de esta hoja oculta contenido.
 */

/* Estado inicial de los objetivos que JavaScript preparó correctamente. */
html.ljmx-motion-ready .ljmx-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Estado revelado por main.js o por su mecanismo de seguridad. */
html.ljmx-motion-ready .ljmx-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Apertura segura ante un fallo detectado después de iniciar main.js. */
.ljmx-motion-failed {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  /* FAQ: la respuesta entra con un fundido suave al abrir. */
  .ljmx-faq-item[open] .ljmx-faq-item__answer {
    animation: ljmx-answer 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes ljmx-answer {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Si el usuario reduce el movimiento, todo queda visible y sin transiciones. */
@media (prefers-reduced-motion: reduce) {
  html.ljmx-motion-ready .ljmx-reveal,
  html.ljmx-motion-ready .ljmx-reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  .ljmx-faq-item[open] .ljmx-faq-item__answer {
    animation: none !important;
    transform: none !important;
  }

}
