/* Motion layer — short, playful micro-animations (all ≤ 0.7s, except a subtle idle float).
   Fully disabled for users who prefer reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  :root { --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-back: cubic-bezier(.34, 1.56, .64, 1); }

  /* ── Hero entrance (staggered, ~0.9s total) ── */
  @keyframes m-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes m-slide-in { from { opacity: 0; transform: translateX(32px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes m-pop { 0% { opacity: 0; transform: scale(.85); } 100% { opacity: 1; transform: none; } }
  @keyframes m-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes m-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
  @keyframes m-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 207, 22, .55); } 100% { box-shadow: 0 0 0 9px rgba(255, 207, 22, 0); } }

  .hero .hero-badge, .hero h1, .hero-sub, .hero-actions, .hero-trust {
    animation: m-rise .6s var(--ease-out) both;
  }
  .hero .hero-badge { animation-delay: .05s; }
  .hero h1 { animation-delay: .12s; }
  .hero h1::after { transform-origin: left center; animation: m-draw .6s var(--ease-out) .45s both; }
  .hero-sub { animation-delay: .22s; }
  .hero-actions { animation-delay: .3s; }
  .hero-trust { animation-delay: .38s; }
  .hero-trust .trust-pill { animation: m-rise .45s var(--ease-out) both; }
  .hero-trust .trust-pill:nth-of-type(1) { animation-delay: .45s; }
  .hero-trust .trust-pill:nth-of-type(2) { animation-delay: .5s; }
  .hero-trust .trust-pill:nth-of-type(3) { animation-delay: .55s; }
  .hero-trust .trust-pill:nth-of-type(4) { animation-delay: .6s; }
  .hero-badge-dot { animation: m-pulse 1.6s ease-out 1s 3; }

  .hero .hero-card.fade-up { opacity: 1; transform: none; transition: none; animation: m-slide-in .7s var(--ease-out) .15s both; }
  .hero .stat-cell { animation: m-pop .5s var(--ease-back) both; transition: transform .25s var(--ease-out), box-shadow .25s; }
  .hero .stat-cell:nth-child(1) { animation-delay: .4s; }
  .hero .stat-cell:nth-child(2) { animation-delay: .48s; }
  .hero .stat-cell:nth-child(3) { animation-delay: .56s; }
  .hero .stat-cell:nth-child(4) { animation-delay: .64s; }
  .hero .stat-cell:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23, 27, 37, .08); }
  .hero-card-footer { animation: m-pop .5s var(--ease-back) .75s both; }
  .hero-card-footer .csi-badge, .hero-card-footer { will-change: transform; }
  .hero-card:hover .hero-card-footer { animation: m-float 2.4s ease-in-out infinite; }

  /* ── Buttons: arrow nudge + press ── */
  .btn-primary, .btn-outline, .prod-trial-btn, .nav-cta, a[class*="btn"] { transition: transform .2s var(--ease-out), box-shadow .2s, background-color .2s, color .2s; }
  .btn-primary:hover, .btn-outline:hover { transform: translateY(-2px); }
  .btn-primary:active, .btn-outline:active { transform: translateY(0) scale(.97); }
  a[class*="btn"] i[class*="ri-arrow"] { display: inline-block; transition: transform .25s var(--ease-out); }
  a[class*="btn"]:hover i[class*="ri-arrow-right"] { transform: translateX(4px); }
  a[class*="btn"]:hover i[class*="ri-arrow-right-up"] { transform: translate(3px, -3px); }

  /* ── Scroll reveal (quick) ── */
  .m-reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); transition-delay: var(--m-delay, 0s); }
  .m-reveal.m-in { opacity: 1; transform: none; }
  .fade-up { transition-duration: .55s !important; transition-timing-function: var(--ease-out) !important; transition-delay: var(--m-delay, 0s); }

  /* ── Product cards: lift + icon wiggle ── */
  .product-card { transition: transform .3s var(--ease-out), box-shadow .3s, opacity .55s var(--ease-out) !important; }
  .product-card.visible:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(23, 27, 37, .10); }
  @keyframes m-wiggle { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-10deg) scale(1.08); } 60% { transform: rotate(6deg) scale(1.08); } }
  .product-card:hover .pb-icon { animation: m-wiggle .5s var(--ease-out); }

  /* ── Customer logos: pop in, gentle hover ── */
  .clogo.m-reveal { transform: translateY(12px) scale(.96); }
  .clogo.m-reveal.m-in { transform: none; }
  .clogo.m-reveal.m-in:hover { transform: translateY(-2px); }
  .clogo img { transition: transform .3s var(--ease-out); }
  .clogo:hover img { transform: scale(1.06); }

  /* ── Stats bar numbers ── */
  .stats-bar .stat-item.m-reveal { transform: translateY(10px); }
}
