/* ==================================================================
   3D动画制作 / 产品视频 详情页 —— 仅「顶部右侧 3D 场景」样式
   作用域严格限定 #anim-scene 及其子元素：
   不修改左侧内容、技术栈卡片、优势卡片、FAQ、CTA、导航、页脚，
   也不影响任何其它页面。
   依赖站点既有 ../css/style.css（容器定位 / 尺寸 / 圆角由原样式提供）。
   ================================================================== */

/* ---------- 3D 场景容器：浅蓝白底，与集团品牌页 / 营销型页同一设计语言 ---------- */
#anim-scene.service-detail-hero-img {
  background:
    radial-gradient(120% 100% at 50% 6%, rgba(255,255,255,.88) 0%, rgba(255,255,255,0) 58%),
    radial-gradient(92% 82% at 86% 94%, rgba(160,193,232,.44) 0%, rgba(160,193,232,0) 66%),
    linear-gradient(168deg, #F2F8FF 0%, #E5F0FB 46%, #D5E6F6 100%);
  border: 1px solid rgba(146,175,213,.32);
  box-shadow:
    inset 0 -60px 80px -70px rgba(27,44,70,.20),
    0 26px 60px -26px rgba(30,58,102,.30),
    0 2px 10px rgba(30,58,102,.05);
  isolation: isolate;
}

/* 极淡网点：只作空气感，不抢主体 */
#anim-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(150,180,216,.060) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150,180,216,.060) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(72% 62% at 50% 58%, #000 12%, transparent 100%);
  mask-image: radial-gradient(72% 62% at 50% 58%, #000 12%, transparent 100%);
}

/* ---------- 3D 画布 ---------- */
#anim-scene .anim-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 3;
  opacity: 0;
  transition: opacity .9s ease;
}
#anim-scene.anim-ready .anim-canvas { opacity: 1; }

/* ---------- 静态海报：3D 未加载 / 移动端 / 减少动效时的降级内容 ---------- */
#anim-scene img.showcase-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .7s ease, transform 1.2s cubic-bezier(.2,.7,.2,1);
}
#anim-scene:hover img.showcase-img { transform: scale(1.03); }
#anim-scene.anim-ready img.showcase-img { opacity: 0; }

/* 容器必须始终可见：站点 .animate-on-scroll 初始 opacity:0，
   若脚本未触发会导致 3D 区域整块白屏，这里保证内容与降级图始终可读。 */
#anim-scene.animate-on-scroll { opacity: 1; }
#anim-scene.animate-on-scroll.animated {
  animation: animSceneIn .9s cubic-bezier(.16,.84,.3,1) both;
}
@keyframes animSceneIn {
  from { opacity: 0; transform: translateY(22px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* 降级态：静态海报保留极克制的呼吸感 */
#anim-scene.anim-static img.showcase-img { animation: animBreath 9s ease-in-out infinite; }
@keyframes animBreath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}

/* ---------- 模块悬停提示（环节名称 + 简短说明） ---------- */
#anim-scene .anim-tooltip {
  position: absolute;
  z-index: 6;
  min-width: 172px;
  max-width: 248px;
  padding: 10px 13px 11px;
  border-radius: 10px;
  background: rgba(20,36,62,.94);
  border: 1px solid rgba(201,168,76,.55);
  box-shadow: 0 12px 32px rgba(16,30,54,.30);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease;
}
#anim-scene .anim-tooltip.is-visible { opacity: 1; transform: none; }
#anim-scene .anim-tooltip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #E7D08A;
}
#anim-scene .anim-tooltip span {
  display: block;
  font-size: 11.5px;
  line-height: 1.65;
  color: rgba(255,255,255,.82);
}

/* ---------- 响应式（只调 3D 区域本身，不改页面布局） ---------- */
@media (max-width: 767px) {
  #anim-scene .anim-tooltip { display: none; }
}

/* ---------- 减少动效：内容始终可见，停止一切装饰动画 ---------- */
@media (prefers-reduced-motion: reduce) {
  #anim-scene.animate-on-scroll,
  #anim-scene.animate-on-scroll.animated {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  #anim-scene.anim-static img.showcase-img { animation: none !important; }
  #anim-scene .anim-canvas,
  #anim-scene img.showcase-img { transition-duration: .01ms !important; }
}
