/* Shared motion layer for the storefront, the admin, the super admin and the marketing site.
   Class names, keyframes and easings follow Tailwind CSS v4 (animate-spin/ping/pulse/bounce) and the
   tw-animate-css enter/exit API (animate-in fade-in slide-in-from-bottom-4 zoom-in-95 ...), written as plain CSS
   so they work beside each app's own stylesheet without Tailwind's preflight reset. */
:root{
  --ease-in:cubic-bezier(0.4,0,1,1);--ease-out:cubic-bezier(0,0,0.2,1);--ease-in-out:cubic-bezier(0.4,0,0.2,1);
  --ease-spring:cubic-bezier(0.34,1.56,0.64,1);--ease-expo:cubic-bezier(0.16,1,0.3,1);
  --tw-duration:.5s;--tw-delay:0s;
  --tw-enter-opacity:1;--tw-enter-scale:1;--tw-enter-rotate:0;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-enter-blur:0;
  --tw-exit-opacity:1;--tw-exit-scale:1;--tw-exit-rotate:0;--tw-exit-translate-x:0;--tw-exit-translate-y:0;
}

/* Tailwind v4 built-ins */
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes ping{75%,100%{transform:scale(2);opacity:0}}
@keyframes pulse{50%{opacity:.5}}
@keyframes bounce{0%,100%{transform:translateY(-25%);animation-timing-function:cubic-bezier(0.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,0.2,1)}}
.animate-spin{animation:spin 1s linear infinite}
.animate-ping{animation:ping 1s cubic-bezier(0,0,0.2,1) infinite}
.animate-pulse{animation:pulse 2s cubic-bezier(0.4,0,0.6,1) infinite}
.animate-bounce{animation:bounce 1s infinite}

/* tw-animate-css: animate-in / animate-out composed from modifiers */
@keyframes tw-enter{from{opacity:var(--tw-enter-opacity);filter:blur(var(--tw-enter-blur));transform:translate3d(var(--tw-enter-translate-x),var(--tw-enter-translate-y),0) scale3d(var(--tw-enter-scale),var(--tw-enter-scale),var(--tw-enter-scale)) rotate(var(--tw-enter-rotate))}}
@keyframes tw-exit{to{opacity:var(--tw-exit-opacity);transform:translate3d(var(--tw-exit-translate-x),var(--tw-exit-translate-y),0) scale3d(var(--tw-exit-scale),var(--tw-exit-scale),var(--tw-exit-scale)) rotate(var(--tw-exit-rotate))}}
.animate-in{animation:tw-enter var(--tw-duration) var(--ease-expo) var(--tw-delay) both}
.animate-out{animation:tw-exit calc(var(--tw-duration) * .6) var(--ease-in) both}
.fade-in{--tw-enter-opacity:0}.fade-out{--tw-exit-opacity:0}
.zoom-in-90{--tw-enter-scale:.9}.zoom-in-95{--tw-enter-scale:.95}.zoom-in-105{--tw-enter-scale:1.05}.zoom-out-95{--tw-exit-scale:.95}
.blur-in{--tw-enter-blur:8px}
.slide-in-from-bottom-2{--tw-enter-translate-y:.5rem}.slide-in-from-bottom-4{--tw-enter-translate-y:1rem}.slide-in-from-bottom-8{--tw-enter-translate-y:2rem}
.slide-in-from-top-2{--tw-enter-translate-y:-.5rem}.slide-in-from-top-4{--tw-enter-translate-y:-1rem}
.slide-in-from-left-4{--tw-enter-translate-x:-1rem}.slide-in-from-right-4{--tw-enter-translate-x:1rem}
.slide-out-to-bottom-4{--tw-exit-translate-y:1rem}.slide-out-to-right-4{--tw-exit-translate-x:1rem}
.duration-150{--tw-duration:.15s}.duration-300{--tw-duration:.3s}.duration-500{--tw-duration:.5s}.duration-700{--tw-duration:.7s}.duration-1000{--tw-duration:1s}
.delay-75{--tw-delay:75ms}.delay-150{--tw-delay:150ms}.delay-300{--tw-delay:300ms}.delay-500{--tw-delay:500ms}

/* stagger children: <div class="stagger"> gives each child its own delay */
.stagger>*{animation:tw-enter .6s var(--ease-expo) both;--tw-enter-opacity:0;--tw-enter-translate-y:.75rem}
.stagger>*:nth-child(2){animation-delay:.05s}.stagger>*:nth-child(3){animation-delay:.1s}.stagger>*:nth-child(4){animation-delay:.15s}
.stagger>*:nth-child(5){animation-delay:.2s}.stagger>*:nth-child(6){animation-delay:.25s}.stagger>*:nth-child(7){animation-delay:.3s}.stagger>*:nth-child(n+8){animation-delay:.35s}

/* scroll reveal: add .reveal, then [data-in] is set by an IntersectionObserver */
.reveal{opacity:0;transform:translateY(24px);transition:opacity .8s var(--ease-expo),transform .8s var(--ease-expo)}
.reveal[data-in]{opacity:1;transform:none}

/* small interaction helpers */
.hover-lift{transition:transform .3s var(--ease-expo),box-shadow .3s var(--ease-expo)}.hover-lift:hover{transform:translateY(-3px)}
.press{transition:transform .12s var(--ease-out)}.press:active{transform:scale(.97)}
@keyframes shimmer{to{background-position:-200% 0}}
.shimmer{background:linear-gradient(90deg,transparent 0,rgba(255,255,255,.35) 50%,transparent 100%) 0 0/200% 100%;animation:shimmer 1.6s linear infinite}
@keyframes float{50%{transform:translateY(-8px)}}.animate-float{animation:float 6s var(--ease-in-out) infinite}
@keyframes marquee{to{transform:translateX(-50%)}}.animate-marquee{animation:marquee 30s linear infinite}
@keyframes gradient-x{50%{background-position:100% 50%}}.animate-gradient{background-size:200% 200%;animation:gradient-x 8s ease infinite}

@media(prefers-reduced-motion:reduce){
  .animate-in,.animate-out,.stagger>*,.animate-float,.animate-marquee,.animate-gradient,.animate-bounce,.animate-ping,.shimmer{animation:none!important}
  .reveal{opacity:1;transform:none;transition:none}
}
