/* Motion sits below the KV; its final image and coordinates remain untouched. */
@media (prefers-reduced-motion: no-preference) {
  .motion-stage {
    opacity: 0;
    translate: 0 28px;
    scale: .985;
    transition: opacity .78s cubic-bezier(.2,.7,.2,1),
                translate .78s cubic-bezier(.2,.7,.2,1),
                scale .78s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--motion-delay, 0ms);
  }
  .motion-stage.is-revealed { opacity: 1; translate: 0 0; scale: 1; }

  #qua-moi-ngay.motion-in-view .daily-wheel {
    animation: home-wheel-breathe 7s ease-in-out infinite;
  }
  #qua-moi-ngay.motion-in-view .daily-prize:nth-child(-n+2) .small-prize-image > img {
    animation: home-prize-float 5.4s ease-in-out infinite;
  }
  #qua-moi-ngay.motion-in-view .daily-prize:nth-child(2) .small-prize-image > img {
    animation-delay: -2.7s;
  }
  #qua-moi-ngay.motion-in-view .daily-prize:nth-child(-n+2)::after {
    animation: home-prize-sparkle 4.2s ease-in-out infinite;
  }
  #qua-moi-ngay.motion-in-view .daily-prize:nth-child(2)::after {
    animation-delay: -2.1s;
  }
  #trung-nha .home-prize { position: relative; }
  #trung-nha .home-prize::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 32%, #ffffff2a 50%, transparent 68%);
    transform: translateX(-140%);
  }
  #trung-nha.motion-in-view .home-prize.is-revealed {
    animation: home-card-drift 7s ease-in-out infinite;
  }
  #trung-nha.motion-in-view .home-prize:nth-child(1).is-revealed { animation-delay: -2s; }
  #trung-nha.motion-in-view .home-prize:nth-child(2).is-revealed { animation-delay: -4s; }
  #trung-nha.motion-in-view .home-prize.is-revealed::after {
    animation: home-card-sheen 1.15s ease-out .3s both;
  }
  .motion-tab-hidden .daily-wheel,
  .motion-tab-hidden .daily-prize .small-prize-image > img,
  .motion-tab-hidden .daily-prize::after,
  .motion-tab-hidden .home-prize,
  .motion-tab-hidden .home-prize::after { animation-play-state: paused!important; }

  @keyframes home-wheel-breathe {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -7px; }
  }
  @keyframes home-prize-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -7px; }
  }
  @keyframes home-prize-sparkle {
    0%, 100% { opacity: .5; scale: .84; }
    50% { opacity: 1; scale: 1.12; }
  }
  @keyframes home-card-drift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }
  @keyframes home-card-sheen {
    from { transform: translateX(-140%); }
    to { transform: translateX(140%); }
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .daily-prize:nth-child(-n+2) .small-prize-image > img { transition: scale .4s cubic-bezier(.2,.7,.2,1); }
  .daily-prize:nth-child(-n+2):hover .small-prize-image > img { scale: 1.045; }
  #trung-nha.motion-in-view .home-prize:hover { border-color: #e9ce8e; animation-play-state: paused; }
  .product-features .round-icon { transition: scale .35s ease, rotate .35s ease; }
  .product-features article:hover .round-icon { scale: 1.08; rotate: -5deg; }
  .section .button svg { transition: translate .25s ease; }
  .section .button:hover svg { translate: 3px 0; }
}

@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .motion-stage { translate: 0 19px; transition-duration: .62s; }
  #qua-moi-ngay.motion-in-view .daily-wheel { animation-duration: 8s; }
  #qua-moi-ngay.motion-in-view .daily-prize:nth-child(-n+2) .small-prize-image > img { animation-duration: 6.5s; }
  #trung-nha.motion-in-view .home-prize.is-revealed { animation-duration: 8s; }
}

@media (prefers-reduced-motion: reduce) {
  .motion-stage { opacity: 1!important; translate: none!important; scale: 1!important; transition: none!important; }
}
