/* Valenti Premium Motion System */
:root {
  --motion-ease-premium: cubic-bezier(.22, 1, .36, 1);
  --motion-ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --motion-fast: 180ms;
  --motion-mid: 420ms;
  --motion-slow: 780ms;
}

.motion-ready .login-hero-content,
.motion-ready .login-card-premium {
  animation: motionFadeUp var(--motion-slow) var(--motion-ease-premium) both;
}

.motion-ready .login-card-premium {
  animation-delay: 120ms;
}

.login-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(145deg, rgba(7, 30, 61, .78), rgba(11, 45, 91, .62)),
    var(--login-hero-image, none);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  opacity: .72;
  will-change: transform;
}

.login-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 24%, rgba(194, 138, 46, .34), transparent 24%),
    radial-gradient(circle at 76% 72%, rgba(46, 144, 250, .22), transparent 28%),
    linear-gradient(90deg, rgba(7, 30, 61, .36), rgba(7, 30, 61, .08));
}

.login-spline-viewer {
  width: 100%;
  height: 100%;
  display: block;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(7, 30, 61, .12), rgba(7, 30, 61, .42));
  pointer-events: none;
}

.fruit-stage {
  z-index: 2;
  will-change: transform;
}

.fruit-card {
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.motion-ready .fruit-card {
  animation-name: motionFruitFloat;
  animation-duration: 6.8s;
  animation-timing-function: ease-in-out;
}

.vbtn,
.sticky-cart-button {
  position: relative;
  overflow: hidden;
}

.vbtn::after,
.sticky-cart-button::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -70%;
  width: 48%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34), transparent);
  opacity: 0;
  pointer-events: none;
}

.vbtn:hover::after,
.sticky-cart-button:hover::after {
  animation: motionButtonShine 860ms var(--motion-ease-premium);
}

.premium-product-card,
.product-card,
.mobile-product-card {
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

.premium-product-card:hover,
.product-card:hover,
.mobile-product-card:hover {
  transform: translateY(-4px);
}

.motion-add-bounce {
  animation: motionAddBounce 420ms var(--motion-ease-pop);
}

.motion-cart-pulse {
  animation: motionCartPulse 680ms ease-out;
}

.motion-success-check {
  animation: motionSuccessCheck 720ms var(--motion-ease-pop) both;
}

.motion-fallback {
  display: grid;
  place-items: center;
  min-height: 112px;
}

.motion-fallback-success {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .46), transparent 28%),
    linear-gradient(135deg, #12B76A, #047857);
  box-shadow: 0 20px 44px rgba(18, 183, 106, .28);
}

.motion-fallback-success svg {
  width: 48px;
  height: 48px;
  stroke: currentColor;
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 54;
  stroke-dashoffset: 54;
  animation: motionCheckDraw 540ms 160ms ease forwards;
}

.motion-fallback-gelato,
.motion-fallback-production {
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 30px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 22px 54px rgba(7, 30, 61, .14);
}

.motion-fallback-gelato span,
.motion-fallback-production span,
.motion-fallback-production i {
  position: absolute;
  display: block;
}

.motion-fallback-gelato span {
  border-radius: 50%;
  animation: motionFruitFloat 3.9s ease-in-out infinite;
}

.motion-fallback-gelato span:nth-child(1) {
  width: 54px;
  height: 54px;
  left: 23px;
  top: 28px;
  background: radial-gradient(circle at 32% 26%, #fff, #EF476F 56%, #B42346);
}

.motion-fallback-gelato span:nth-child(2) {
  width: 50px;
  height: 50px;
  right: 21px;
  top: 42px;
  background: radial-gradient(circle at 32% 26%, #fff7d6, #FFB703 58%, #D88400);
  animation-delay: 260ms;
}

.motion-fallback-gelato span:nth-child(3) {
  width: 80px;
  height: 28px;
  left: 19px;
  bottom: 24px;
  border-radius: 6px 6px 28px 28px;
  background: linear-gradient(135deg, #D4B483, #A36A2C);
  animation-delay: 520ms;
}

.motion-fallback-production span {
  width: 72px;
  height: 72px;
  left: 23px;
  top: 22px;
  border-radius: 50%;
  border: 8px solid rgba(11, 79, 156, .16);
  border-top-color: #0B4F9C;
  animation: motionSpin 1.1s linear infinite;
}

.motion-fallback-production i {
  width: 54px;
  height: 18px;
  left: 32px;
  bottom: 25px;
  border-radius: 99px;
  background: linear-gradient(90deg, #C28A2E, #E6AF52);
}

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

@keyframes motionFruitFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  35% { transform: translate3d(0, -10px, 0) rotate(2deg); }
  72% { transform: translate3d(0, 6px, 0) rotate(-2deg); }
}

@keyframes motionButtonShine {
  0% { left: -70%; opacity: 0; }
  18% { opacity: 1; }
  100% { left: 124%; opacity: 0; }
}

@keyframes motionAddBounce {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(.96); }
  72% { transform: scale(1.025); }
}

@keyframes motionCartPulse {
  0% { box-shadow: 0 0 0 0 rgba(194, 138, 46, .42); }
  72% { box-shadow: 0 0 0 14px rgba(194, 138, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(194, 138, 46, 0); }
}

@keyframes motionSuccessCheck {
  0% { opacity: 0; transform: scale(.82) rotate(-8deg); }
  62% { opacity: 1; transform: scale(1.06) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes motionCheckDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes motionSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .login-hero-content,
  .motion-ready .login-card-premium,
  .motion-ready .fruit-card,
  .motion-add-bounce,
  .motion-cart-pulse,
  .motion-success-check,
  .motion-fallback-success svg,
  .motion-fallback-gelato span,
  .motion-fallback-production span {
    animation: none !important;
  }

  .login-hero-media {
    transform: none !important;
  }

  .premium-product-card:hover,
  .product-card:hover,
  .mobile-product-card:hover {
    transform: none;
  }
}
