/* ==========================================================================
   HERO 3D —— 一张被线性变换的平面
   画布在渐变天空之上、文字之下；未成功渲染前保持透明，CSS 山脊照旧。
   ========================================================================== */

.hero-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* 首帧真正画出来之后才淡入 */
.hero.has-three .hero-3d {
  opacity: 1;
}

/* 3D 地面取代 CSS 山脊，避免两种“地面”叠在一起 */
.hero.has-three::before,
.hero.has-three::after {
  opacity: 0;
  transition: opacity 700ms ease;
}

/* 不支持 WebGL / 上下文丢失：回到原来的渐变封面 */
.hero.no-three .hero-3d {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-3d {
    transition: none;
  }
}
