/* =========================================================
   v9.42 全屏左右分屏身份选择页（替代 v9.33 前的 gate 弹窗，旧弹窗样式已全部移除）
   左=工厂版 / 右=集成商版；桌面 hover 栏 flex 1→1.55 + 海报 scale(1.04) 视差；
   点击栏放大到整屏（~480ms）后跳转（B 档转场）；<768px 上下两行、点按直接选中；
   prefers-reduced-motion 下无动画。
   ========================================================= */

.gate2 {
  position: relative;
  display: flex;
  height: 100dvh;
  min-height: 480px;
  overflow: hidden;
  background: #0b1220;
}

/* 顶部居中品牌行 */
.gate2-brand {
  position: absolute;
  z-index: 3;
  top: clamp(28px, 6vh, 64px);
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  color: #ffffff;
  transition: opacity 0.3s ease;
}
.gate2-brand-name {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}
.gate2-brand-sub {
  margin: 8px 0 0;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: 0.35em;
  text-indent: 0.35em; /* 字间距视觉居中补偿 */
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

/* 分屏栏（整栏即链接） */
.gate2-panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  transition: flex-grow 0.6s cubic-bezier(0.22, 0.61, 0.21, 1);
}
.gate2-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1) translateX(0);
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.21, 1);
  will-change: transform;
}
/* 渐变蒙版：底部深（保文字可读）顶部浅；未 hover 稍深，hover 变浅海报更鲜明 */
.gate2-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 10, 22, 0.88) 0%,
    rgba(5, 10, 22, 0.55) 34%,
    rgba(5, 10, 22, 0.22) 62%,
    rgba(5, 10, 22, 0.3) 100%
  );
  transition: opacity 0.6s ease;
}
.gate2-veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 22, 0.18);
  transition: opacity 0.6s ease;
}

/* 文案区：锚定左下，不随海报缩放，hover 时不动不抖 */
.gate2-copy {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 4vw, 56px);
  right: clamp(24px, 4vw, 56px);
  bottom: clamp(32px, 8vh, 84px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.gate2-title {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.2;
  font-weight: 800;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.gate2-sub {
  max-width: 26em;
  font-size: clamp(14px, 1.5vw, 16.5px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.gate2-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}
.gate2-cta svg { transition: transform 0.3s ease; }

/* 桌面 hover/focus：栏 1→1.55，另一栏相对被挤压；
   海报 scale(1.04) + 轻微平移视差；蒙版变浅；文字区保持不动 */
@media (min-width: 768px) {
  .gate2-panel:hover,
  .gate2-panel:focus-visible {
    flex-grow: 1.55;
  }
  .gate2-panel:hover .gate2-poster,
  .gate2-panel:focus-visible .gate2-poster {
    transform: scale(1.04);
  }
  .gate2-panel--factory:hover .gate2-poster,
  .gate2-panel--factory:focus-visible .gate2-poster {
    transform: scale(1.04) translateX(10px);
  }
  .gate2-panel--integrator:hover .gate2-poster,
  .gate2-panel--integrator:focus-visible .gate2-poster {
    transform: scale(1.04) translateX(-10px);
  }
  .gate2-panel:hover .gate2-veil::after,
  .gate2-panel:focus-visible .gate2-veil::after {
    opacity: 0;
  }
  .gate2-panel:hover .gate2-cta svg,
  .gate2-panel:focus-visible .gate2-cta svg {
    transform: translateX(5px);
  }
}

/* 键盘焦点环 */
.gate2-panel:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -3px;
  z-index: 2;
}

/* B 档点击转场：被点栏放大到整屏，另一栏收没；品牌行淡出 */
.gate2.is-leaving .gate2-panel {
  flex-grow: 0;
  transition-duration: 0.48s;
  transition-timing-function: cubic-bezier(0.5, 0, 0.75, 0.4);
}
.gate2.is-leaving .gate2-panel.is-picked { flex-grow: 1; }
.gate2.is-leaving .gate2-panel.is-picked .gate2-veil::after { opacity: 0; }
.gate2.is-leaving .gate2-brand { opacity: 0; }

/* 移动端 <768px：上下两行分屏；无 hover 放大，点按=直接选中（JS 播同款放大转场） */
@media (max-width: 767px) {
  .gate2 { flex-direction: column; min-height: 100dvh; }
  .gate2-brand { top: 20px; }
  .gate2-copy { bottom: 22px; gap: 8px; }
  .gate2-cta { margin-top: 2px; }
}

/* reduced-motion：无动画，JS 侧同步直接跳 */
@media (prefers-reduced-motion: reduce) {
  .gate2-panel,
  .gate2-poster,
  .gate2-veil,
  .gate2-veil::after,
  .gate2-cta svg,
  .gate2-brand {
    transition: none !important;
  }
  .gate2-panel:hover .gate2-poster,
  .gate2-panel:focus-visible .gate2-poster {
    transform: none !important;
  }
}
