/* =========================================================================
   fxweb 首屏轮播横幅（fx-hero2）
   参考结构：左文案 + 右视觉 + 底部 4 张功能卡压住区块下沿 + 左右切换箭头
   支持后台每张幻灯片单独配置「图片」或「视频」
   ========================================================================= */

.fx-h2 {
  position: relative;
  isolation: isolate;
  /* 🚨 不能 overflow:hidden：底部功能卡用负 margin 上浮，
     放在 section 子级时需要能溢出媒体区，否则下半截被裁（曾踩）。 */
  overflow: visible;
  background: linear-gradient(180deg, #eef3f9 0%, #f2f6fb 46%, #f7fafd 100%);
  border-bottom: 1px solid var(--fx-line);
}

/* ---------- 幻灯片轨道 ----------
   🚨 以前是写死 min-height:560px，内容（尤其移动端单列）超了就溢出，
   媒体按 cover 铺满又会把 5120x1080 的超宽画幅主体裁掉。
   改成「自适应高度 + 媒体双轨制」：
     · 底层 .fx-h2-fill：同一张图/视频，模糊 + 放大 + 低饱和，负责把容器铺满；
     · 上层 .fx-h2-main：真实画幅 contain 居中，保证主体（地图/光球）完整可见。
   这样任意比例的素材都不会在下方留出空白，也不会裁掉关键内容。 */
.fx-h2-track {
  position: relative;
  min-height: clamp(520px, 56vw, 640px);
}
.fx-h2-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
}
/* 新页直接以不透明状态盖在上层，旧页在下层淡出，
   避免两页同时半透明造成中间一秒"空白" */
.fx-h2-slide.is-on {
  opacity: 1;
  visibility: visible;
  z-index: 3;
}
.fx-h2-slide.is-out {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  animation: fx-h2-fadeout .7s var(--fx-ease) forwards;
}
@keyframes fx-h2-fadeout {
  from { opacity: 1; }
  to { opacity: 0; }
}
/* 第一张不做入场动画，避免首屏白闪 */
.fx-h2-slide.is-first.is-on { animation: none; }

/* ---------- 背景层：图片 / 视频 ---------- */
.fx-h2-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}
.fx-h2-bg img,
.fx-h2-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* —— 首屏媒体层 ——
   🚨 性能要点（实测）：
      早期版本用一个「模糊底层 video + 主层 video」的双轨结构，
      结果**同一个 3.2MB 的 mp4 被两个 <video> 各自解码**（模糊层还放大到 1584×704），
      网络真下载 4 次 206 分片，解码和合成开销翻倍，
      低端机 LayoutDuration 飙到 1005ms —— 这是首页卡顿的最大来源。
      现在：主层 cover 已能完全铺满容器，模糊层**不再承载第二份视频**，
      只保留一层纯 CSS 渐变兜底（0 字节、0 解码），
      视频解码从 2 路降到 1 路。
      下方的 .fx-h2-fill 仍保留样式，用于「图片」幻灯片做柔边氛围，不再放 video。 */
.fx-h2-fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  /* 视频/图片尚未解码完成时的兜底底色，和首屏色调一致，避免白闪 */
  background:
    radial-gradient(120% 90% at 78% 12%, #dfeafb 0%, rgba(223, 234, 251, 0) 62%),
    linear-gradient(160deg, #f2f7fd 0%, #e8f0fa 52%, #dfeafa 100%);
}
.fx-h2-fill img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  height: 110%;
  min-width: 110%;
  min-height: 110%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: blur(30px) saturate(1.2) brightness(1.04);
}
/* 🚨 明确禁止模糊层再出现 video（历史结构兜底，防止旧模板回潮） */
.fx-h2-fill video { display: none !important; }

/* 上层：真实画幅铺满容器
   🚨 这里必须用 cover 而不是 contain。
      本模板首屏视频是 5120×1080 的超宽画幅（比例 4.74:1），
      而容器比例约 2.25:1（1440×640）。用 contain 时视频只能占到中间
      约 200px 高，上下各留一大块 → 配合模糊底层就会出现
      「上白带 / 影片 / 下白带」三段式，看起来就是底部空出一条（踩过）。
      改 cover 后视频按容器高度撑满，左右自然裁掉多余的天空与海面，
      中部主体（地图、光球、岛群）仍然居中可见。
      object-position 取 center：文案在左、视觉在右，纵向居中裁切最稳妥。 */
.fx-h2-main {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.fx-h2-main img,
.fx-h2-main video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
/* 竖屏手机：素材更宽，改为按高度铺满并顶对齐，保留天空与主体 */
@media (max-width: 767px) {
  .fx-h2-main img,
  .fx-h2-main video {
    object-fit: cover;
    object-position: center top;
  }
}
/* 纯色 / 渐变兜底背景（未配置图或视频时） */
.fx-h2-bg.is-plain {
  background:
    radial-gradient(90% 130% at 82% 8%, #dbeafe 0%, rgba(219, 234, 254, 0) 58%),
    linear-gradient(115deg, #eef4fa 0%, #e6eef8 52%, #dfe9f5 100%);
}
.fx-h2-bg.is-plain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(46, 160, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(46, 160, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 34% 42%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 34% 42%, #000 0%, transparent 70%);
}

/* 遮罩：保证左侧文案可读（透明度跟后台 opacity 联动） */
.fx-h2-veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(96deg,
      #fbfdff 0%,
      rgba(250, 253, 255, .96) 26%,
      rgba(244, 250, 255, .82) 46%,
      rgba(238, 246, 254, .46) 66%,
      rgba(236, 245, 254, .18) 100%);
}
/* 遮罩强度由后台 opacity 控制（通过 CSS 变量注入到 .fx-h2-slide 的 --h2-veil 上） */
.fx-h2-slide { --h2-veil: 0.9; }
.fx-h2-veil { opacity: var(--h2-veil); }
.fx-h2-veil--blue {
  background: linear-gradient(96deg,
      #ffffff 0%,
      rgba(250, 253, 255, .96) 26%,
      rgba(240, 249, 255, .82) 46%,
      rgba(226, 243, 255, .46) 66%,
      rgba(222, 240, 255, .18) 100%);
}
.fx-h2-veil--violet {
  background: linear-gradient(96deg,
      #ffffff 0%,
      rgba(253, 252, 255, .96) 26%,
      rgba(248, 245, 255, .82) 46%,
      rgba(240, 236, 255, .46) 66%,
      rgba(238, 234, 255, .18) 100%);
}

/* ---------- 内容栅格 ---------- */
.fx-h2-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  /* 🚨 不再写死 min-height：轨道高度由 clamp() 决定，
     内容靠 padding 撑出安全区，避免移动端内容多于高度时溢出被裁 */
  min-height: clamp(460px, 50vw, 560px);
  padding-top: 62px;
  padding-bottom: 118px; /* 给底部功能卡留出叠压空间 */
  box-sizing: border-box;
}

.fx-h2-copy { max-width: 560px; }

.fx-h2-title {
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: -.025em;
  color: #0d1b2e;
}
.fx-h2-title em {
  font-style: normal;
  color: #2ea0ff;
}
.fx-h2-title,
.fx-h2-sub { text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.fx-h2-sub {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.75;
  color: #5b6b80;
  max-width: 500px;
}

.fx-h2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.fx-h2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .22s var(--fx-ease), box-shadow .22s var(--fx-ease), background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.fx-h2-btn svg { width: 15px; height: 15px; }
/* 主按钮：黑色商务风（和导航「免费注册」同色系，统一品牌色）
   🚨 必须用 .fxpage .fx-h2-btn--primary 提高权重：
      模板有 `.fxpage a { color: inherit }`，同为单类选择器且排在后面，
      只写 .fx-h2-btn--primary 会被它盖掉 → 黑底上出现继承来的深色文字（踩过）。 */
.fxpage .fx-h2-btn--primary,
.fx-h2-btn--primary {
  background: #14161b !important;
  color: #fff !important;
  border: 1px solid #14161b;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .72);
}
.fxpage .fx-h2-btn--primary:hover,
.fx-h2-btn--primary:hover {
  background: #000 !important;
  color: #fff !important;
  border-color: #000;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .8);
}
.fxpage .fx-h2-btn--primary svg,
.fx-h2-btn--primary svg { stroke: #fff; transition: transform .22s var(--fx-ease); }
.fx-h2-btn--primary:hover svg { transform: translateX(3px); }
/* 次按钮：黑描边白底，hover 反相 */
.fxpage .fx-h2-btn--ghost,
.fx-h2-btn--ghost {
  background: rgba(255, 255, 255, .82) !important;
  border: 1px solid rgba(20, 22, 27, .26);
  color: #14161b !important;
  backdrop-filter: blur(4px);
}
.fxpage .fx-h2-btn--ghost:hover,
.fx-h2-btn--ghost:hover {
  background: #14161b !important;
  border-color: #14161b;
  color: #fff !important;
  transform: translateY(-2px);
}

/* ---------- 右侧视觉 ---------- */
.fx-h2-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 340px;
}
.fx-h2-visual img {
  width: 100%;
  max-width: 720px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 26px 50px rgba(30, 80, 140, .18));
  animation: fx-h2-float 9s ease-in-out infinite;
}
.fx-h2-visual video {
  width: 100%;
  max-width: 720px;
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(15, 60, 110, .35);
}
@keyframes fx-h2-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* 无右侧素材时的占位：抽象机房层叠块 */
.fx-h2-stack {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1 / .82;
}
.fx-h2-stack i {
  position: absolute;
  left: 50%;
  border-radius: 16px;
  background: linear-gradient(150deg, #ffffff 0%, #e8f1fb 46%, #cfe2f4 100%);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow:
    0 30px 60px -26px rgba(24, 70, 120, .38),
    inset 0 1px 0 rgba(255, 255, 255, .95);
  transform: translateX(-50%) skewY(-6deg);
}
.fx-h2-stack i:nth-child(1) { width: 76%; height: 22%; top: 8%;  }
.fx-h2-stack i:nth-child(2) { width: 84%; height: 22%; top: 34%; }
.fx-h2-stack i:nth-child(3) { width: 92%; height: 22%; top: 60%; }
.fx-h2-stack i::after {
  content: "";
  position: absolute;
  left: 8%;
  top: 50%;
  width: 22%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2ea0ff 0%, #7cc4ff 100%);
  box-shadow: 0 0 14px rgba(46, 160, 255, .65);
}

/* ---------- 左右切换箭头 ---------- */
.fx-h2-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .9);
  color: #5b7a99;
  box-shadow: 0 6px 18px -8px rgba(15, 60, 110, .3);
  backdrop-filter: blur(6px);
  transition: background .2s, color .2s, transform .2s;
  opacity: .85;
}
.fx-h2-arrow:hover {
  background: #fff;
  color: #1b8ae8;
  opacity: 1;
}
.fx-h2-arrow svg { width: 16px; height: 16px; }
.fx-h2-arrow--prev { left: 22px; }
.fx-h2-arrow--next { right: 22px; }

/* ---------- 底部 4 张功能卡（压住区块下沿） ----------
   🚨 卡片区已移出 .fx-h2-track（那个容器定高 + overflow:hidden，
      留在里面会被裁掉下半截）。现在是 section 的直接子元素：
      用负 margin 上浮压住媒体下沿，同时 section 高度自动把它包含进来。 */
.fx-h2-feats {
  position: relative;
  z-index: 9;
  margin-top: -84px;
  /* 卡片底部就是区块底部，不留多余留白（否则卡片下方出现一条空白带） */
  padding-bottom: 0;
}
/* 媒体区（track）自己裁切，卡片才能溢出到媒体之外 */
.fx-h2-track { overflow: hidden; }
.fx-h2-feat-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  /* 🚨 grid 默认只保证「同一行」元素等高，跨行会各自按内容高。
     第一行标题 2 行、第二行 1 行时两行差 20px（768px 实测），
     grid-auto-rows:1fr 让所有行等高，四张卡彻底对齐。 */
  grid-auto-rows: 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 18px 44px -22px rgba(20, 60, 110, .32);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}
.fx-h2-feat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  height: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eef3f9;
  transition: transform .24s var(--fx-ease), box-shadow .24s var(--fx-ease), border-color .24s;
}
.fx-h2-feat:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 160, 255, .4);
  box-shadow: 0 12px 26px -14px rgba(27, 138, 232, .5);
}
.fx-h2-feat-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #eaf5ff 0%, #dcecfe 100%);
  color: #2b8fdc;
}
.fx-h2-feat-icon svg { width: 16px; height: 16px; }
.fx-h2-feat-text { min-width: 0; }
.fx-h2-feat-text b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #16283d;
  line-height: 1.4;
}
.fx-h2-feat-text p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.55;
  color: #7a8ba0;
}

/* ---------- 指示点 ---------- */
.fx-h2-dots {
  position: absolute;
  left: 50%;
  bottom: 96px;              /* 落在一块留白带上，不压功能卡 */
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 4px 14px -6px rgba(15, 60, 110, .28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.fx-h2-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
  background: rgba(46, 160, 255, .32);
  transition: background .25s var(--fx-ease), width .28s var(--fx-ease);
}
.fx-h2-dots button:hover { background: rgba(46, 160, 255, .6); }
.fx-h2-dots button.is-on {
  width: 20px;
  background: #2ea0ff;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .fx-h2-feat-inner { gap: 10px; padding: 14px; }
  .fx-h2-feat { padding: 12px 12px; gap: 10px; }
}

@media (max-width: 1024px) {
  .fx-h2-inner {
    grid-template-columns: 1fr;
    gap: 26px;
    min-height: 0;
    padding-top: 44px;
    padding-bottom: 96px;
  }
  /* 单列后文案+视觉堆叠，轨道高度要跟着内容走，否则溢出被 overflow:hidden 切掉 */
  .fx-h2-track { min-height: 0; }
  .fx-h2-slide.is-on { position: relative; }
  .fx-h2-slide.is-on .fx-h2-bg { position: absolute; }
  .fx-h2-visual { min-height: 0; justify-content: center; }
  .fx-h2-visual img { max-width: 460px; }
  .fx-h2-stack { width: min(100%, 380px); }
  .fx-h2-title { font-size: 30px; }
  .fx-h2-feats { margin-top: -70px; }
  .fx-h2-feat-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-h2-arrow { width: 34px; height: 34px; }
  .fx-h2-arrow--prev { left: 8px; }
  .fx-h2-arrow--next { right: 8px; }
}

@media (max-width: 760px) {
  .fx-h2-inner {
    padding-top: 34px;
    padding-bottom: 84px;
    gap: 18px;
  }
  .fx-h2-title { font-size: 25px; line-height: 1.3; }
  .fx-h2-sub { font-size: 13.5px; margin-top: 12px; }
  .fx-h2-actions { margin-top: 20px; gap: 10px; }
  .fx-h2-btn { height: 38px; padding: 0 18px; font-size: 13.5px; }
  .fx-h2-visual { display: none; }
  .fx-h2-arrow { display: none; }
  .fx-h2-feats { margin-top: -56px; padding-bottom: 0; }
  .fx-h2-feat-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
  }

  /* 🚨🚨 四张卡必须等高。
     原来 .fx-h2-feat 是 align-items:flex-start + 文字自然高度，
     "高性能计算"的描述 3 行、其余 2 行，同一行两张卡就差了 20px，
     截图里一眼看到"下面那张矮一截"。
     这里改成：卡片 flex-direction:column + 图标与文字成组，
     标题固定行数、描述统一 clamp 到 3 行，四张卡高度完全一致。 */
  .fx-h2-feat {
    flex-direction: row;
    align-items: flex-start;
    padding: 11px 10px;
    gap: 8px;
    min-height: 76px;
    height: 100%;
    box-sizing: border-box;
  }
  /* 标题统一预留 1 行（首行对齐），不再强留 2 行——
     强留会让标题和描述之间出现一条空洞（截图实感），
     卡片高度已由 grid-auto-rows:1fr 保证，无需靠标题撑。 */
  .fx-h2-feat-text b {
    min-height: 0;
  }
  .fx-h2-feat-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    margin-top: 1px;
  }
  .fx-h2-feat-icon svg { width: 14px; height: 14px; }
  .fx-h2-feat-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-width: 0;
  }
  .fx-h2-feat-text b {
    font-size: 12.5px;
    line-height: 1.35;
    /* 标题最多两行，避免"AI 模型部署支持"这种长标题把卡撑高 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .fx-h2-feat-text p {
    font-size: 10.5px;
    line-height: 1.5;
    margin-top: 3px;
    /* 统一 3 行（超出省略），四张卡描述区高度一致 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-break: auto;
  }
  .fx-h2-dots { display: none; }
}

/* 380px 以下：不再整块隐藏描述（原来是 display:none，卡片会突然变空），
   而是压缩到 2 行，信息量降级但结构不变 */
@media (max-width: 380px) {
  .fx-h2-feat { min-height: 68px; padding: 10px 9px; }
  .fx-h2-feat-text b { font-size: 12px; }
  .fx-h2-feat-text p {
    display: -webkit-box;
    font-size: 10px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
