/* ============================================================
   全站动画增强 (site-animations)
   作用于首页 / 分类页 / about 等主页面（不覆盖现有样式，
   只增量添加滚动进场、卡片 hover、懒加载表现）
   ============================================================ */

/* ---------- 滚动进场 ---------- */
/* 注意：不要用 will-change 常驻，否则每个元素都会常占 GPU 图层导致滚动卡顿。
   opacity+transform 过渡本身现代浏览器会自动提升图层，只在动画期间产生，足够顺滑。 */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1),
              transform .6s cubic-bezier(.2, .7, .2, 1);
}
.reveal-on-scroll.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- 首屏 hero 加载淡入（页面打开即从无到有浮现） ---------- */
.home-ref-hero-bg,
.home-ref-hero-content > * {
  opacity: 0;
  transform: translateY(30px);
  animation: heroEnter .9s cubic-bezier(.2, .7, .2, 1) forwards;
}
.home-ref-hero-bg { animation-delay: .05s; }
.home-ref-hero-content > *:nth-child(1) { animation-delay: .18s; }
.home-ref-hero-content > *:nth-child(2) { animation-delay: .32s; }
.home-ref-hero-content > *:nth-child(3) { animation-delay: .46s; }
.home-ref-hero-content > *:nth-child(4) { animation-delay: .60s; }
@keyframes heroEnter {
  to { opacity: 1; transform: none; }
}
.reveal-on-scroll[data-delay="1"] { transition-delay: .08s; }
.reveal-on-scroll[data-delay="2"] { transition-delay: .16s; }
.reveal-on-scroll[data-delay="3"] { transition-delay: .24s; }
.reveal-on-scroll[data-delay="4"] { transition-delay: .32s; }

/* ---------- 其它导航页 hero 顶部：加载即「从无到有」淡入（仅门面，下方板块保持静态） ---------- */
.company-about-hero,
.contact-rebuild-hero,
.factory-v2-hero,
.oem-new-hero,
.cert-new-hero {
  opacity: 0;
  transform: translateY(26px);
  animation: heroEnter .9s cubic-bezier(.2, .7, .2, 1) forwards;
}

/* 注意：本站点为营销展示，用户明确要求保留滚动渐显 / hero 淡入，
   故不再响应 prefers-reduced-motion，确保任意环境下动画均可见。
   若日后需要无障碍降级，可在此重新加入对应媒体查询。 */

/* ---------- 卡片 hover 上浮 + 阴影（在现有 hover 基础上增强） ---------- */
.home-category-card,
.home-category-card-with-media,
.category-product-card,
.ref-grid-item,
.six-factory-card,
.feedback-card,
.pd-related-card {
  transition: transform .35s ease, box-shadow .35s ease;
}
.home-category-card:hover,
.home-category-card-with-media:hover,
.category-product-card:hover,
.ref-grid-item:hover,
.six-factory-card:hover,
.feedback-card:hover,
.pd-related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(17, 24, 39, .14);
}

/* ---------- 数字 count-up 基础样式（由 JS 填充 [data-count]） ---------- */
.count-up {
  font-variant-numeric: tabular-nums;
  display: inline-block;
}
