/* ─────────────────────────────────────────────────────────────────
   OmniApex — Animations
   All motion respects prefers-reduced-motion
   ───────────────────────────────────────────────────────────────── */

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

/* ── Page entry ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  @keyframes scaleIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
  }

  @keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }

  .hero-home__eyebrow { animation: fadeIn 0.5s ease both; animation-delay: 0.1s; }
  .hero-home__title   { animation: fadeUp 0.6s ease both; animation-delay: 0.2s; }
  .hero-home__sub     { animation: fadeUp 0.6s ease both; animation-delay: 0.35s; }
  .gateway-grid       { animation: fadeUp 0.6s ease both; animation-delay: 0.5s; }

  /* Card hover glow pulse */
  .gateway-card:hover .gateway-card__icon {
    animation: pulse-glow 1.4s ease-in-out infinite;
  }
  @keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59,123,247,0); }
    50%       { box-shadow: 0 0 0 6px rgba(59,123,247,0.18); }
  }

  /* Nav mobile — slide in */
  .mobile-menu {
    transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Hamburger → X animation */
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Button active state */
  .btn:active { transform: scale(0.97); }
  .btn--primary:active { transform: scale(0.97) translateY(0); }

  /* Loading spinner for submit button */
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  .btn[aria-busy="true"]::after {
    content: "";
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 6px;
  }
}
