/* motion.css — premium parallax & reveal styles (additive overlay) */

/* ============== Scroll reveals ============== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    translate: 0 22px;
    transition:
      opacity 0.85s cubic-bezier(0.2, 0.8, 0.2, 1),
      translate 0.95s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, translate;
  }
  .reveal.is-revealed {
    opacity: 1;
    translate: 0 0;
  }

  /* Stagger grid children for cinematic flow */
  .solutions-grid .solution-card.reveal:nth-child(2) { transition-delay: 0.08s; }
  .solutions-grid .solution-card.reveal:nth-child(3) { transition-delay: 0.16s; }
  .solutions-grid .solution-card.reveal:nth-child(4) { transition-delay: 0.24s; }

  .steps-row .step.reveal:nth-child(1) { transition-delay: 0.04s; }
  .steps-row .step.reveal:nth-child(2) { transition-delay: 0.14s; }
  .steps-row .step.reveal:nth-child(3) { transition-delay: 0.24s; }

  .cases-grid .case.reveal:nth-child(1) { transition-delay: 0.04s; }
  .cases-grid .case.reveal:nth-child(2) { transition-delay: 0.14s; }
  .cases-grid .case.reveal:nth-child(3) { transition-delay: 0.24s; }

  .faq-list .faq-item.reveal:nth-child(n+2) { transition-delay: calc((var(--i, 0) * 0.05s)); }

  .footer .footer-col.reveal:nth-child(2) { transition-delay: 0.06s; }
  .footer .footer-col.reveal:nth-child(3) { transition-delay: 0.12s; }
  .footer .footer-col.reveal:nth-child(4) { transition-delay: 0.18s; }

  /* Float cards: smaller initial offset, no scale — they get JS mouse parallax post-reveal */
  .float-card.reveal { translate: 0 14px; }

  /* Stage uses scroll parallax via JS-set translate */
  .hero-stage { will-change: translate; }
  .hero h1, .hero-sub, .hero-eyebrow { will-change: translate, opacity; }
}

/* ============== Ambient mouse-following glow ============== */
/* Sits ABOVE the page bg as a fixed soft radial that drifts with cursor.
   No layout cost — pointer-events:none, low opacity. */
@media (prefers-reduced-motion: no-preference) and (min-width: 721px) {
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(
      600px 600px at var(--glow-x, 50%) var(--glow-y, 30%),
      color-mix(in oklab, var(--c-1) 8%, transparent) 0%,
      color-mix(in oklab, var(--c-2) 4%, transparent) 40%,
      transparent 70%
    );
    pointer-events: none;
    z-index: 0;
    transition: background 0.4s linear;
  }
}

/* ============== Floating cards — ambient hover lift on hover ============== */
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .solution-card, .step, .case, .tier {
    transition:
      transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
      box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
      border-color 0.3s ease,
      opacity 0.85s cubic-bezier(0.2, 0.8, 0.2, 1),
      translate 0.95s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

/* ============== Reduced motion respect ============== */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-revealed {
    opacity: 1 !important;
    translate: 0 0 !important;
    transition: none !important;
  }
  .hero-stage,
  .hero h1,
  .hero-sub,
  .hero-eyebrow,
  .float-card {
    translate: 0 0 !important;
  }
}
