/* =============================================================================
 * ZCUHMWPE · 首页首个 Banner（背景动画面板）—— hero-banner.css
 * -----------------------------------------------------------------------------
 * 结构约定（见 index.html 里的 @HERO-SECTION 区块）：
 *   .zc-hero
 *     .zc-hero__stage       ← 3D 背景动画挂载点（hero-banner.js 往里塞 canvas）
 *     .zc-hero__scrim       ← 压暗蒙版，保证白字可读
 *     .zc-hero__blueprint   ← 极淡的工程蓝图网格（工业感）
 *     .zc-hero__content > .zc-hero__inner
 *     .zc-hero__stats > .zc-hero__stats-inner > .zc-hero__stat × 4
 *
 * 主题色 / 尺寸全部走下面的 CSS 变量，接站时按站点规范改这里就够了。
 * ========================================================================== */

/* 自带的盒模型重置：本 Banner 会被拷进既有站点，不能依赖站点的全局 reset。
   （缺了它，按钮 width:100% 会变成"内容宽 + 内边距"，手机端会横向溢出被裁。） */
.zc-hero,
.zc-hero *,
.zc-hero *::before,
.zc-hero *::after {
  box-sizing: border-box;
}

.zc-hero {
  /* —— 主色 —— */
  --zc-bg: #0a0e13;                       /* 兜底底色（也是无 WebGL 时的底色） */
  --zc-ink: #ffffff;
  --zc-ink-soft: rgba(226, 233, 239, 0.80);
  --zc-ink-mute: rgba(226, 233, 239, 0.60);
  --zc-accent: #f2b63e;                   /* 工业安全黄，与 3D 场景里的警示色同源 */
  --zc-accent-deep: #d5901c;
  --zc-line: rgba(255, 255, 255, 0.10);

  /* —— 版式 —— */
  --zc-font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --zc-maxw: 1320px;                      /* 内容栅格最大宽度（含左右 gutter） */
  --zc-gutter: clamp(20px, 4vw, 56px);
  --zc-min-h: clamp(560px, 78vh, 820px);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: var(--zc-min-h);
  background: var(--zc-bg);
  color: var(--zc-ink);
  font-family: var(--zc-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------------------- 背景层 */
.zc-hero__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--zc-bg);
}

.zc-hero__stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* 背景动画不接收指针事件：不挡链接点击、不挡页面滚动 */
  pointer-events: none;
}

/* 蒙版：左侧竖向压暗（放文案）+ 顶底渐变（让 Banner 与页头/下文衔接更干净） */
.zc-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(122% 96% at 78% 46%, rgba(4, 7, 11, 0) 40%, rgba(4, 7, 11, 0.45) 100%),
    linear-gradient(90deg,
      rgba(5, 8, 12, 0.90) 0%,
      rgba(5, 8, 12, 0.66) 24%,
      rgba(5, 8, 12, 0.26) 50%,
      rgba(5, 8, 12, 0) 72%),
    linear-gradient(180deg,
      rgba(5, 8, 12, 0.62) 0%,
      rgba(5, 8, 12, 0.12) 22%,
      rgba(5, 8, 12, 0.10) 58%,
      rgba(5, 8, 12, 0.80) 100%);
}

/* 工程蓝图网格：只在文案一侧隐约可见，右侧让位给 3D 画面 */
.zc-hero__blueprint {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: linear-gradient(100deg, #000 0%, rgba(0, 0, 0, 0.5) 36%, transparent 70%);
  mask-image: linear-gradient(100deg, #000 0%, rgba(0, 0, 0, 0.5) 36%, transparent 70%);
}

/* ---------------------------------------------------------------- 文案层 */
.zc-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--zc-maxw);
  margin: 0 auto;
  padding: clamp(72px, 10vh, 132px) var(--zc-gutter) clamp(150px, 19vh, 196px);
}

.zc-hero__inner {
  max-width: 660px;
}

.zc-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--zc-accent);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.zc-hero__rule {
  display: block;
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: 0.85;
}

.zc-hero__title {
  margin: 0 0 20px;
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.012em;
  /* 双重投影：近处 0.5 保字口清晰，远处大范围压住 3D 画面的亮部 */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 2px 26px rgba(0, 0, 0, 0.55);
}

.zc-hero__lede {
  margin: 0 0 34px;
  max-width: 560px;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.68;
  color: var(--zc-ink-soft);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.zc-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* ---------------------------------------------------------------- 按钮 */
.zc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 27px;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background-color 0.18s ease, border-color 0.18s ease;
}

.zc-btn--primary {
  background: linear-gradient(180deg, #f6c45c, var(--zc-accent-deep));
  color: #151a20;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
}

.zc-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.44);
}

.zc-btn--ghost {
  border-color: rgba(255, 255, 255, 0.34);
  color: var(--zc-ink);
}

.zc-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.6);
}

.zc-btn:focus-visible {
  outline: 2px solid var(--zc-accent);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- 底部数据条 */
.zc-hero__stats {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid var(--zc-line);
  background: linear-gradient(180deg, rgba(7, 10, 15, 0.42), rgba(7, 10, 15, 0.88));
  -webkit-backdrop-filter: blur(7px) saturate(115%);
  backdrop-filter: blur(7px) saturate(115%);
}

.zc-hero__stats-inner {
  max-width: var(--zc-maxw);
  margin: 0 auto;
  padding: 0 var(--zc-gutter);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.zc-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px 18px 0;
  border-left: 1px solid var(--zc-line);
}

.zc-hero__stat:first-child {
  border-left: 0;
  padding-left: 0;
}

.zc-hero__stat-value {
  font-size: clamp(19px, 1.45vw, 23px);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.zc-hero__stat-label {
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zc-ink-mute);
}

/* ---------------------------------------------------------------- 无 WebGL 兜底 */
.zc-hero.is-no-webgl .zc-hero__stage {
  background:
    radial-gradient(120% 100% at 70% 40%, rgba(66, 198, 200, 0.14) 0%, rgba(10, 14, 19, 0) 58%),
    linear-gradient(120deg, #0a0e13 0%, #131a22 52%, #0a0e13 100%);
}

/* 上下文丢失时画布会变黑，必须藏起来，上面的兜底底图才露得出来 */
.zc-hero.is-no-webgl .zc-hero__stage canvas {
  display: none;
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
  .zc-hero__stats-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zc-hero__stat {
    padding: 16px 18px;
    border-top: 1px solid var(--zc-line);
  }

  .zc-hero__stat:nth-child(-n + 2) {
    border-top: 0;
  }

  .zc-hero__stat:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .zc-hero__content {
    padding-bottom: clamp(190px, 26vh, 240px);
  }
}

@media (max-width: 820px) {
  .zc-hero {
    min-height: clamp(600px, 86vh, 760px);
  }

  .zc-hero__scrim {
    background:
      linear-gradient(180deg,
        rgba(5, 8, 12, 0.86) 0%,
        rgba(5, 8, 12, 0.52) 34%,
        rgba(5, 8, 12, 0.44) 62%,
        rgba(5, 8, 12, 0.88) 100%);
  }

  .zc-hero__title {
    font-size: clamp(27px, 7.2vw, 36px);
  }

  .zc-hero__lede {
    font-size: 15px;
  }

  .zc-hero__content {
    padding-top: clamp(56px, 9vh, 88px);
  }
}

@media (max-width: 560px) {
  .zc-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .zc-btn {
    width: 100%;
  }

  .zc-hero__stat {
    padding: 14px 14px;
  }

  .zc-hero__stat-value {
    font-size: 18px;
  }

  .zc-hero__stat-label {
    font-size: 10.5px;
    letter-spacing: 0.09em;
  }
}

/* ---------------------------------------------------------------- 无障碍 */
@media (prefers-reduced-motion: reduce) {
  .zc-btn {
    transition: none;
  }
}
