/* ============================================================
   Hero 入场动画（仅 index.shtml 首页）
   参考 products KV 动效，仅作用于首屏第一组 slide
   ============================================================ */

/* ---- ① 蓝色装饰块：缓缓浮现 ---- */
.hero-anim .hero__blue-block {
  opacity: 0;
  animation: hero-block-in 1.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.3s forwards;
}

@keyframes hero-block-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- ② since 小字 ---- */
.hero-anim .hero__content[data-slide="0"] .hero__since {
  opacity: 0;
  animation: hero-fade-up 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.5s forwards;
}

/* ---- ③ 主标题逐行滑入 ---- */
.hero-anim .hero__content[data-slide="0"] .hero__title {
  display: flex;
  flex-direction: column;
  animation: none;
  opacity: 1;
}

.hero-anim .hero__content[data-slide="0"] .hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: hero-title-up 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.hero-anim .hero__content[data-slide="0"] .hero__title-line:nth-child(1) {
  animation-delay: 1.0s;
}

.hero-anim .hero__content[data-slide="0"] .hero__title-line:nth-child(2) {
  animation-delay: 1.4s;
}

@keyframes hero-title-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- ④ CTA 按钮 ---- */
.hero-anim .hero__content[data-slide="0"] .hero__cta {
  opacity: 0;
  animation: hero-fade-up 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 1.8s forwards;
}

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- ⑤ 底部控制栏 ---- */
.hero-anim .hero__bottom-bar {
  opacity: 0;
  animation: hero-block-in 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 2.0s forwards;
}

/* ---- 移动端简化：纯 fade-in ---- */
@media (max-width: 992px) {
  .hero-anim .hero__blue-block {
    animation: hero-fade 0.6s ease-out 0.2s forwards;
  }
  /* 基态：所有 slide 子元素隐藏 */
  .hero-anim .hero__since,
  .hero-anim .hero__title-line,
  .hero-anim .hero__cta {
    opacity: 0;
    animation: none;
  }
  /* 仅激活 slide 的子元素执行 fade 动画 */
  .hero-anim .hero__content.is-active .hero__since {
    animation: hero-fade 0.5s ease-out 0.3s forwards;
  }
  .hero-anim .hero__content.is-active .hero__title-line {
    animation: hero-fade 0.5s ease-out 0.5s forwards;
    transform: none;
  }
  .hero-anim .hero__content.is-active .hero__title-line:nth-child(2) {
    animation-delay: 0.7s;
  }
  .hero-anim .hero__content.is-active .hero__cta {
    animation: hero-fade 0.5s ease-out 0.9s forwards;
  }
  .hero-anim .hero__bottom-bar {
    animation: hero-fade 0.4s ease-out 1.0s forwards;
  }
}

@keyframes hero-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- 无障碍降级 ---- */
@media (prefers-reduced-motion: reduce) {
  .hero-anim .hero__blue-block,
  .hero-anim .hero__since,
  .hero-anim .hero__title-line,
  .hero-anim .hero__cta,
  .hero-anim .hero__bottom-bar {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}
