/*!
 * AnbomaHvlsBanner.css  v1.1.0
 * 安伯玛天鹤 HVLS 工业大风扇 · 互动通栏样式
 *
 * 全局引用（放在公共 head 里，所有页面共用，浏览器只缓存一份）：
 *   <link rel="stylesheet" href="/css/AnbomaHvlsBanner.css">
 *
 * 作用域：全部类名以 hb- 开头，且只在 .hb-hero 根节点内生效，
 *         不会污染站点已有样式。组件内部已做 isolation。
 * 注意：JS 会自动补 link（与 JS 同目录），已手动引入则不会重复添加。
 */

/* JS 接管前先把容器里的原始文字藏住：脚本在 body 末尾加载，这期间容器还没有
   .hb-hero 类，h1/p 会以浏览器默认样式闪在错误位置。CSS 在 head 同步阻塞渲染，
   所以这条规则先于页面绘制生效；容器拿到 .hb-hero 后自动失效。 */
[data-hvls-banner]:not(.hb-hero) > *{visibility:hidden}

.hb-hero{
  position:relative;width:100%;
  --hb-h:200px;                      /* 通栏高度：改这里，同时把 JS 的 H 改成同值 */
  height:calc(var(--hb-h) * var(--hb-k,1));
  overflow:hidden;color:#e9f2f0;
  /* 兜底底色：背景图未就绪时也有质感，不是死黑 */
  background:linear-gradient(160deg,#20404b 0%,#142831 46%,#0b1820 100%);
  font-family:"HarmonyOS Sans SC","PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  -webkit-font-smoothing:antialiased;isolation:isolate;
}
.hb-hero *{margin:0;padding:0;box-sizing:border-box}
.hb-hero.hb-hide-sm{display:block}
@media (max-width:719px){ .hb-hero.hb-hide-sm{display:none} }

.hb-bg{
  position:absolute;left:0;top:0;
  width:calc(100% / var(--hb-k,1));height:var(--hb-h);
  transform-origin:0 0;transform:scale(var(--hb-k,1));
  display:block;z-index:0;
}
.hb-stage{
  position:absolute;left:0;right:0;top:0;margin:0 auto;
  width:100%;max-width:1440px;height:var(--hb-h);
  z-index:1;
}

/* ---- 左侧文案 ---- */
.hb-copy{
  position:absolute;left:0;top:0;width:620px;height:var(--hb-h);
  display:flex;flex-direction:column;justify-content:center;
  align-items:flex-start;            /* 子元素按内容宽，按钮/徽标不会被拉成整行 */
  z-index:3;
}
.hb-copy .hb-title{
  font-size:36px;line-height:1.26;font-weight:700;letter-spacing:.3px;
  color:#fff;text-shadow:0 2px 14px rgba(0,0,0,.55);margin-bottom:9px;
}
/* 行数由 JS 量出来打类：单行 36px，双行 30px（CSS 本身无法按行数选字号） */
.hb-copy .hb-title.hb-two{font-size:30px}
.hb-copy .hb-title em{font-style:normal;color:#a6e07c}
.hb-copy p{font-size:16px;line-height:1.62;color:rgba(226,240,237,.78);max-width:560px}
/* p 内的 em 只换成标题同样的绿色，字号/行高/字重全部继承父级 */
.hb-copy p em{font-style:normal;color:#a6e07c}
/* 文案区按钮：组件自带，页面直接用 .hb-btn 即可 */
.hb-copy .hb-btn{
  display:inline-block;margin-top:9px;padding:5px 20px;border-radius:999px;
  background:#a6e07c;color:#0d2419;font-size:14px;font-weight:700;
  text-decoration:none;border:0;letter-spacing:.4px;
}
/* 文案由各页面自己写，这里只兜底：多段正文的间隔、行内链接不致变成默认蓝链 */
.hb-copy p+p{margin-top:4px}
.hb-copy a{color:#a6e07c;text-decoration:none;border-bottom:1px solid rgba(166,224,124,.42)}
.hb-copy a:hover{border-bottom-color:#a6e07c}

/* ---- 风扇画布 ---- */
.hb-fan{
  position:absolute;left:560px;top:0;width:640px;height:var(--hb-h);
  z-index:2;pointer-events:auto;                 /* 需要接收 hover / 点击，用于部件热区 */
  cursor:default;
}

/* ---- 部件提示气泡（跟随命中点，随 stage 一起缩放） ---- */
.hb-tip{
  position:absolute;left:0;top:0;z-index:6;pointer-events:none;
  padding:10px 16px 11px;border-radius:9px;white-space:nowrap;
  background:linear-gradient(160deg,rgba(18,38,44,.88),rgba(8,21,27,.93));
  border:1px solid rgba(166,224,124,.50);
  -webkit-backdrop-filter:blur(4px) saturate(1.1);
  backdrop-filter:blur(4px) saturate(1.1);
  box-shadow:0 12px 26px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.14);
  opacity:0;
  transition:opacity .16s ease;                    /* 位移由 JS 给整数像素，CSS 不参与，避免半像素糊字 */
}
.hb-tip.on{opacity:1}
/* 侧挂变体：气泡在鼠标左侧、垂直跟随（控制箱这类左右空间够、上下不足的部件用） */
.hb-tip b{display:block;font-size:14.5px;font-weight:700;letter-spacing:.4px;color:#f4fbf8;
  text-shadow:0 1px 3px rgba(0,0,0,.9),0 0 12px rgba(0,0,0,.55)}
.hb-tip i{display:block;font-style:normal;font-size:12.5px;letter-spacing:.2px;
  color:#b6e888;margin-top:3px;text-shadow:0 1px 3px rgba(0,0,0,.85)}
.hb-tip i:empty{display:none}
.hb-tip::after{
  content:"";position:absolute;left:50%;bottom:-5px;width:7px;height:7px;
  margin-left:-3.5px;border-radius:50%;background:#a6e07c;
  box-shadow:0 0 9px 2px rgba(166,224,124,.7);
}
.hb-tip.side::after{left:auto;right:-4px;bottom:auto;top:50%;margin:-3.5px 0 0 0}

/* ---- 右侧控制箱 ---- */
.hb-ctrl{position:absolute;right:58px;top:50%;width:132px;transform:translateY(-50%);z-index:4;cursor:default}
.hb-ctrl:hover .hb-box{
  border-color:rgba(210,238,228,.52);
  box-shadow:0 14px 30px rgba(0,0,0,.34),
             inset 0 1px 0 rgba(255,255,255,.28),
             inset 0 -1px 0 rgba(0,0,0,.18);
}
.hb-box{
  position:relative;padding:13px 12px 14px;border-radius:11px;
  background:
    radial-gradient(130% 90% at 18% -12%,rgba(255,255,255,.16),rgba(255,255,255,0) 62%),
    linear-gradient(158deg,rgba(104,132,145,.92),rgba(60,86,99,.95));
  border:1px solid rgba(196,226,218,.34);
  box-shadow:0 12px 26px rgba(0,0,0,.30),
             inset 0 1px 0 rgba(255,255,255,.22),
             inset 0 -1px 0 rgba(0,0,0,.18);
  backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);
  transition:border-color .25s ease,box-shadow .25s ease;
}
.hb-box::before{
  content:"";position:absolute;right:100%;top:50%;width:44px;height:1px;
  background:linear-gradient(90deg,rgba(140,220,120,0),rgba(140,220,120,.42));
}
.hb-box::after{
  content:"";position:absolute;right:calc(100% + 42px);top:50%;
  width:5px;height:5px;margin-top:-2.5px;border-radius:50%;
  background:#8ee06a;box-shadow:0 0 9px 2px rgba(142,224,106,.5);
}
.hb-tag{display:flex;align-items:center;justify-content:space-between;margin-bottom:11px}
.hb-tag img{display:block;height:16px;width:auto;opacity:.97}
.hb-dot{
  width:5px;height:5px;border-radius:50%;background:#8ee06a;
  box-shadow:0 0 7px rgba(142,224,106,.85);transition:background .35s,box-shadow .35s;
}
.hb-dot.off{background:#54636a;box-shadow:none}

.hb-lcd{
  display:flex;align-items:baseline;justify-content:flex-end;gap:5px;
  padding:11px 11px 6px 10px;border-radius:6px;
  background:linear-gradient(180deg,rgba(24,62,60,.98),rgba(10,34,34,.99));
  border:1px solid rgba(112,198,190,.20);
  box-shadow:inset 0 1px 0 rgba(178,250,244,.16),inset 0 -7px 13px rgba(0,0,0,.26);
  transition:opacity .4s,filter .4s;
}
.hb-lcd .v{
  font-family:"DIN Alternate","Bahnschrift",Menlo,Consolas,monospace;
  font-size:28px;font-weight:700;line-height:1;color:#8ae8f7;letter-spacing:1px;
  text-shadow:0 0 8px rgba(120,225,245,.55),0 0 18px rgba(80,190,215,.28);
}
.hb-lcd .u{font-size:9px;letter-spacing:1.6px;color:rgba(150,225,240,.72);padding-bottom:3px}
.hb-lcd.off{opacity:.42;filter:grayscale(.85)}

.hb-row{display:flex;align-items:center;gap:8px;margin-top:12px}
.hb-power{
  flex:0 0 auto;width:31px;height:31px;padding:0;border-radius:50%;
  border:1px solid rgba(150,215,180,.34);
  background:linear-gradient(160deg,rgba(68,96,90,.92),rgba(38,60,55,.95));
  color:rgba(198,226,214,.70);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:.35s;-webkit-tap-highlight-color:transparent;
}
.hb-power svg{width:13.5px;height:13.5px;display:block}
.hb-power:hover{border-color:rgba(150,225,175,.5)}
.hb-power.hb-on{
  color:#0d1f16;background:linear-gradient(160deg,#9fe377,#6fbb46);
  border-color:rgba(180,240,150,.75);
  box-shadow:0 0 10px rgba(126,205,85,.35),inset 0 1px 0 rgba(255,255,255,.35);
}

.hb-spd{flex:1 1 auto;min-width:0}
.hb-spd-top{
  display:flex;align-items:baseline;justify-content:space-between;margin-bottom:6px;
  font-size:8.5px;letter-spacing:1.2px;color:rgba(232,244,240,.78);
}
.hb-spd-top b{font-family:"DIN Alternate","Bahnschrift",Menlo,monospace;font-size:10px;color:#a6e07c;letter-spacing:.5px}
.hb-range{
  -webkit-appearance:none;appearance:none;display:block;width:100%;height:3px;
  border-radius:2px;background:#dbe6e0;outline:none;cursor:pointer;
}
.hb-range::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:11px;height:11px;border-radius:50%;
  background:#f2fbf4;border:2px solid #6fbb46;box-shadow:0 0 8px rgba(126,205,85,.55);cursor:pointer;
}
.hb-range::-moz-range-thumb{
  width:9px;height:9px;border-radius:50%;background:#f2fbf4;border:2px solid #6fbb46;
  box-shadow:0 0 8px rgba(126,205,85,.55);cursor:pointer;
}

/* ==================================================================
   响应式三档（由 JS 按视口宽度切类，样式只管排版）
   ≥1440      1440 版式：主体 1440 居中，两侧背景继续延伸
   1024–1439  1024 版式：在 1024 宽内重新排布，元素保持原始尺寸，不做等比缩放
   <1024      静态图：page.jpg 作通栏背景，只留文案，动画/控制箱/部件提示全部关闭
   注意：不做 scale 缩放是刻意的 —— DOM 文字一旦被位图缩放就会发虚（控制箱曾经糊在这里）
   ================================================================== */
.hb-hero.hb-w1024 .hb-stage{width:1024px;max-width:1024px}
.hb-hero.hb-w1024 .hb-copy{width:320px}
.hb-hero.hb-w1024 .hb-copy .hb-title{font-size:22px;margin-bottom:8px}
.hb-hero.hb-w1024 .hb-copy p{font-size:11.5px;max-width:312px}
.hb-hero.hb-w1024 .hb-fan{left:320px;width:540px}
.hb-hero.hb-w1024 .hb-ctrl{right:12px}

/* <1024 静态档：铺 page.jpg（仰拍吊扇实拍）替换深色底。
   与动画档的 TopBanner 不是同一张 —— 小屏没动画，画面里得有产品。
   这份 url 是兜底 + 抗缓存：JS 切档时会再内联注入一次，旧 CSS 缓存压不过内联样式 */
.hb-hero.hb-static{
  /* 整块按 1024×200 的设计稿等比缩小：高度用 vw 跟随视口。
     窄屏得到的是"缩小版通栏"，而不是硬撑 200px 高、把图裁掉一大块。
     高度下限 66px：字号有保底后内容至少需要这么高，再窄就只缩图不压字 */
  --hb-h: clamp(66px, 19.5313vw, 200px);   /* 200 / 1024 × 100 */
  background-color:#0b1820;
  background-image:url("https://oss.anboma.cn/img/page.jpg");
  background-position:center center;
  background-size:cover;
  background-repeat:no-repeat;
}
.hb-hero.hb-static .hb-bg,
.hb-hero.hb-static .hb-fan,
.hb-hero.hb-static .hb-ctrl{display:none}
.hb-hero.hb-static .hb-stage{width:100%;max-width:100%;z-index:2}
/* 内距与字号同样按 1024 基准等比，但字号带下限：
   375 宽若纯等比正文只有 4px 出头，手机上没法读（标题 ≥13 / 正文 ≥9） */
.hb-hero.hb-static .hb-copy{width:100%;padding:0 clamp(10px, 1.9531vw, 20px)}
.hb-hero.hb-static .hb-copy .hb-title{
  font-size:clamp(13px, 1.8555vw, 19px);margin-bottom:clamp(4px, .6836vw, 7px);
}
.hb-hero.hb-static .hb-copy p{font-size:clamp(9px, 1.1230vw, 11.5px);max-width:100%}
/* 静态图左侧压暗，保证文案可读（图本身是厂房实拍，中间偏亮） */
.hb-hero.hb-static::after{
  content:"";position:absolute;left:0;top:0;right:0;bottom:0;z-index:1;pointer-events:none;
  background:linear-gradient(90deg,rgba(6,17,22,.86) 0%,rgba(6,17,22,.56) 48%,rgba(6,17,22,.12) 82%);
}
