/*!
 * Emperyland Motion CSS
 * 配合 motion.js 使用：进度条、GSAP 接管后的样式修正、无障碍降级
 */

/* 顶部滚动进度条 */
.mp-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 999;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #2f7bff, #5aa9ff 55%, #8fd0ff);
  pointer-events: none;
  will-change: transform;
}

/* GSAP 接管后，禁用原生过渡，避免与 JS 动画打架 */
.motion-on .rv {
  transition: none !important;
  will-change: transform, opacity;
}

/* GSAP 完成后的清理：动画结束后移除 will-change，释放合成层 */
.motion-on .rv.in {
  will-change: auto;
}

/* 首屏图片区：防止 GSAP 缩放时出现边缘露白 */
.motion-on .hero-band {
  transform-origin: 50% 40%;
  backface-visibility: hidden;
}

/* 卡片悬停：交给 GSAP，CSS 不参与位移 */
.motion-on .card,
.motion-on .hw,
.motion-on .news-item {
  will-change: transform;
}

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  .mp-bar {
    display: none;
  }
  .motion-on .rv {
    opacity: 1 !important;
    transform: none !important;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 移动端降低动效强度，避免低端机掉帧 */
@media (max-width: 768px) {
  .mp-bar {
    height: 1.5px;
  }
}
