/* 首页主视觉：矮一些；背景左右滑，文案始终固定显示 */
.hero-slider {
  --hero-h: 380px;
  position: relative;
  height: var(--hero-h);
  min-height: var(--hero-h);
  overflow: hidden;
  background: #020617;
  color: #fff;
}
.hero-slider__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-slider__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* 背景 1：电路板 */
.hero-slide--circuit {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.55) 48%, rgba(2, 6, 23, 0.28) 100%),
    radial-gradient(circle at 72% 40%, rgba(118, 185, 0, 0.22), transparent 34%),
    url('/assets/hero-circuit.jpg') center right / cover no-repeat;
}

/* 背景 2：板卡示意 */
.hero-slide--board {
  background: #0b1220;
}
.hero-slide--board::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.82) 0%, rgba(2, 6, 23, 0.45) 46%, rgba(2, 6, 23, 0.18) 100%);
  z-index: 1;
}
.hero-slide__board-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

/* 固定文案层（任意幻灯片都显示） */
.hero-slider__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px max(24px, calc((100vw - 1080px) / 2)) 48px;
  pointer-events: none;
  max-width: none;
}
.hero-slider__overlay .eyebrow,
.hero-slider__overlay .hero-title,
.hero-slider__overlay .hero-sub {
  max-width: 640px;
}
.hero-slider__overlay .eyebrow {
  color: #9be22d;
  text-shadow: 0 0 24px rgba(118, 185, 0, 0.26);
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.hero-slider__overlay .hero-title {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.18;
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}
.hero-slider__overlay .hero-sub {
  margin: 0 0 18px;
  color: #dbeafe;
  font-size: 15px;
  line-height: 1.55;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.hero-slider__overlay .hero-cta {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  pointer-events: auto;
}
.hero-slider__overlay .btn-primary,
.hero-slider__overlay .btn-ghost {
  padding: 10px 22px;
  font-size: 14px;
}

/* 底部淡入白底 */
.hero-slider::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 56px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg, #f8fafc));
}

/* 左右箭头 */
.hero-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.hero-slider__btn:hover {
  background: rgba(2, 6, 23, 0.72);
  border-color: rgba(155, 226, 45, 0.55);
}
.hero-slider__btn--prev { left: 12px; }
.hero-slider__btn--next { right: 12px; }

/* 底部圆点 */
.hero-slider__dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 8px;
}
.hero-slider__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.hero-slider__dot.is-active {
  width: 22px;
  background: #9be22d;
}

@media (max-width: 640px) {
  .hero-slider {
    --hero-h: 300px;
  }
  .hero-slider__overlay {
    padding: 20px 16px 40px;
  }
  .hero-slider__overlay .hero-title {
    font-size: clamp(24px, 7vw, 32px);
  }
  .hero-slider__overlay .hero-sub {
    font-size: 13px;
    margin-bottom: 14px;
  }
  .hero-slider__overlay .btn-primary,
  .hero-slider__overlay .btn-ghost {
    padding: 8px 16px;
    font-size: 13px;
  }
  .hero-slider__btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .hero-slider__btn--prev { left: 6px; }
  .hero-slider__btn--next { right: 6px; }
  .hero-slider__dots { bottom: 10px; }
}
