/* 首页区块滚动入场动画 */
[data-reveal] {
  opacity: 0;
  transition-property: opacity, transform, filter, clip-path;
  transition-duration: var(--reveal-duration, 0.85s);
  transition-timing-function: var(--reveal-ease, cubic-bezier(0.22, 1, 0.36, 1));
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  filter: none;
  -webkit-clip-path: none;
  clip-path: none;
}

/* —— 纯淡入（无位移） —— */
[data-reveal="fade-in"] {
  transform: none;
}

/* —— 方向淡入 —— */
[data-reveal="fade-up"] {
  transform: translate3d(0, 48px, 0);
}

[data-reveal="fade-down"] {
  transform: translate3d(0, -40px, 0);
}

[data-reveal="fade-left"] {
  transform: translate3d(-56px, 0, 0);
}

[data-reveal="fade-right"] {
  transform: translate3d(56px, 0, 0);
}

/* —— 缩放 —— */
[data-reveal="zoom-in"] {
  transform: scale(0.82);
}

[data-reveal="zoom-out"] {
  transform: scale(1.14);
}

/* —— 模糊浮现 —— */
[data-reveal="blur-in"] {
  filter: blur(14px);
  transform: translate3d(0, 24px, 0) scale(0.96);
}

/* —— 翻转 / 旋转 —— */
[data-reveal="flip-up"] {
  transform: perspective(900px) rotateX(22deg) translate3d(0, 36px, 0);
  transform-origin: center bottom;
}

[data-reveal="rotate-in"] {
  transform: rotate(-8deg) scale(0.9) translate3d(-20px, 30px, 0);
  transform-origin: left bottom;
}

/* —— 弹性上滑 —— */
[data-reveal="bounce-up"] {
  transform: translate3d(0, 72px, 0) scale(0.94);
  --reveal-ease: cubic-bezier(0.34, 1.45, 0.64, 1);
  --reveal-duration: 1s;
}

/* —— 遮罩揭示 —— */
[data-reveal="mask-up"] {
  -webkit-clip-path: inset(100% 0 0 0);
  clip-path: inset(100% 0 0 0);
  transform: translate3d(0, 20px, 0);
}

[data-reveal="mask-up"].is-revealed {
  -webkit-clip-path: none;
  clip-path: none;
}

/* —— 分割线伸展 —— */
[data-reveal="line-grow"] {
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 1;
}

[data-reveal="line-grow"].is-revealed {
  transform: scaleX(1);
}

/* —— 错落延迟（由 JS 写入 --reveal-delay） —— */
[data-reveal-stagger] > [data-reveal] {
  transition-delay: var(--reveal-delay, 0ms);
}

/* 嵌套子元素：父级入场后再依次显现 */
[data-reveal] [data-reveal] {
  transition-duration: var(--reveal-duration, 0.75s);
}

/* 轮播导航箭头：不受入场动画影响，避免被 opacity/clip/transform 裁切 */
.owl-carousel .owl-nav,
.owl-carousel .owl-nav button {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  clip-path: none !important;
  visibility: visible !important;
}

/* 轮播箭头伸出容器，需允许溢出显示 */
.about-summary-wrap.zyjc-wrap,
.zyjc-wrap .zyjc-inner,
.zyjc-wrap .zyjc-panel,
.zyjc-wrap .zyjc-banner,
.zyjc-wrap .zyjc-carousel,
.zyjc-wrap .ppdsj-carousel {
  overflow: visible;
}

/* 产品页轮播：箭头伸出容器，允许溢出 */
.bg-zhishi-banner[data-reveal],
.bg-zhishi-banner-2[data-reveal] {
  overflow: visible;
}

/* 新闻列表卡片 */
.contact-us-type-list .type-box[data-reveal] {
  will-change: opacity, transform;
}

.news-pagination[data-reveal] {
  transform: none;
}

/* 科研实力来源注：随父级区块一起显现，避免移动端底部元素无法触发 IntersectionObserver */
.kysl-wrap-m .about-summary-source-m {
  opacity: 1;
  transform: none;
  filter: none;
  clip-path: none;
}

.kysl-wrap-m[data-reveal-section].is-revealed .about-summary-source-m {
  animation: kysl-source-fade-in 0.7s ease-out both;
  animation-delay: 0.26s;
}

@keyframes kysl-source-fade-in {
  from {
    transform: translate3d(0, 24px, 0);
  }
  to {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    transition: none !important;
  }

  [data-reveal-section].is-revealed,
  .about-summary-wrap[data-reveal-section] {
    animation: none;
  }

  .kysl-wrap-m[data-reveal-section].is-revealed .about-summary-source-m {
    animation: none;
  }
}
