/* ============================================================================
 * WZ HELIO² · 型号卡与三维演示弹窗（2026-11-05）
 *
 * 页面结构：
 *   Hero（原图文版，原样保留）
 *   型号卡（三张并排，紧贴 hero 下沿；整卡可点、无选中态、无次级链接）
 *   三维演示弹窗（点卡才开，<template> 里的舞台标记克隆进来后装载引擎）
 *
 * 三个文件的分工（改之前先看这一行）：
 *   css/wz-helio-stage.css      tracking-demo.css 的 .wz-tk 命名空间版（脚本生成，勿手改）
 *   css/wz-helio-stage-fit.css  作用域适配层（令牌重申 / 贴顶基准 / 窄屏补偿）
 *   css/wz-helio-3d.css         本文件 —— 只管控件的观感：卡片带 + 弹窗外壳
 * ========================================================================== */

/* ---- 型号卡带：紧贴 hero，不留白条 --------------------------------------- */
.wz_helio_models-band{
  position: relative;
  padding: 0;
  background: #f2f2f2;      /* 与卡片底色同色，卡片 hover 时不会露出色差边 */
}

.wz_helio_pcard{
  cursor: pointer;
  position: relative;
  outline: none;
}

.wz_helio_pcard:focus-visible{
  box-shadow: inset 0 0 0 2px #157a33;
}

/* 卡片底部参数区已经承担"这台是什么"的信息，去掉次级链接后把留白收一点 */
.wz_helio_pcard .wz_helio_mcard-cells{
  margin-bottom: 0;
}

/* ---- 三维演示弹窗 -------------------------------------------------------- */
.wz_helio_modal{
  position: fixed;
  inset: 0;
  z-index: 9000;
  overscroll-behavior: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wz_helio_modal[hidden]{
  display: none;
}

.wz_helio_modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 18, .74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .3s ease;
}

.wz_helio_modal-panel{
  position: relative;
  width: min(1720px, 96vw);
  height: min(920px, 91vh);
  border-radius: 16px;
  overflow: hidden;
  background: #081527;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .55);
  opacity: 0;
  transform: translateY(16px) scale(.986);
  transition: opacity .3s ease, transform .34s cubic-bezier(.22, .61, .36, 1);
}

.wz_helio_modal.is-open .wz_helio_modal-backdrop{
  opacity: 1;
}

.wz_helio_modal.is-open .wz_helio_modal-panel{
  opacity: 1;
  transform: none;
}

/* 舞台宿主：铺满面板。
   ⚠️ 整条 height:100% 链每一环都要补（host → .wz-tk → .tk-hero → .tk-stage），
      断一环舞台就塌成只剩深底，模型和文案全都不出现。 */
.wz_helio_modal-stage{
  position: absolute;
  inset: 0;
}

.wz_helio_modal-stage .wz-tk,
.wz_helio_modal-stage .tk-hero,
.wz_helio_modal-stage .tk-stage{
  height: 100%;
  min-height: 0;
}

/* 关闭：右上角圆形按钮，压在舞台上方（舞台自带 isolation，这里给 button 更高层） */
.wz_helio_modal-close{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 30;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(12, 20, 32, .52);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.wz_helio_modal-close:hover{
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .45);
  transform: rotate(90deg);
}

.wz_helio_modal-close:focus-visible{
  outline: 2px solid #7ee2a8;
  outline-offset: 2px;
}

/* 弹窗打开时冻结页面滚动（Lenis 也会一起停，见 js） */
html.wz-helio-lock,
html.wz-helio-lock body{
  overflow: hidden;
}

/* body 冻结由 JS 内联（position:fixed + 负 top），这里只兜滚动条占位，
   避免冻结瞬间页面横向抖一下 */
html.wz-helio-lock{
  overscroll-behavior: none;
}

/* ---- 窄屏 --------------------------------------------------------------- */
@media (max-width: 900px), (orientation: portrait){
  .wz_helio_modal{
    padding: 0;
  }

  .wz_helio_modal-panel{
    width: 100vw;
    height: 100svh;
    border-radius: 0;
  }

  .wz_helio_modal-close{
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    width: 44px;
    height: 44px;
  }
}

/* 系统降级：减少动态偏好时全部直给 */
@media (prefers-reduced-motion: reduce){
  .wz_helio_modal-backdrop,
  .wz_helio_modal-panel,
  .wz_helio_modal-close{
    transition: none;
  }
  .wz_helio_modal-close:hover{
    transform: none;
  }
}
