/* ==========================================================================
   HUAYI — 页顶 Hero（内页 Banner + Ken Burns）
   ========================================================================== */

.hero {
  position: relative;
  width: 100%;
  height: min(90vh, 760px);
  min-height: 420px;
  overflow: hidden;
}

/* MODEL AI 组（3D / AI）：与 MODEL 组视频 hero 统一高度，避免切换页面时首屏跳动 */
body[data-page="threeD"] .hero,
body[data-page="ai"] .hero {
  height: min(105vh, 900px);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform: scale(1.02);
}

.hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #000;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__bg {
    animation: hero-kenburns 9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
}

@keyframes hero-kenburns {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

/* 底部渐隐过渡到正文背景 */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--c-bg));
  z-index: 1;
  pointer-events: none;
}

/* 视频背景 hero：去掉底部渐隐，改为整体 0.8 黑色蒙版 */
.hero--video::after {
  display: none;
}

/* 静态 Banner：去掉底部渐隐（如 S-live） */
.hero--no-fade::after {
  display: none;
}
.hero--video::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* 视频 hero 高度：比普通 hero 略高，向下扩展 */
.hero--video {
  height: min(105vh, 900px);
}
@media (max-width: 767px) {
  .hero--video {
    height: 62vh;
    min-height: 340px;
  }
}
@media (min-width: 768px) and (max-width: 1080px) and (orientation: landscape) {
  .hero--video {
    height: min(82vh, 640px);
  }
}

/* 平板端：hero 标题限宽并加大行距/间距，避免文字挤在一起 */
@media (min-width: 768px) and (max-width: 1080px) {
  .hero__title {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.3;
    max-width: 720px;
  }
  .hero--center .hero__title {
    margin-inline: auto;
  }
  .hero__sub {
    margin-top: 24px;
    font-size: clamp(15px, 1.8vw, 20px);
    max-width: 620px;
  }
  .hero--center .hero__sub {
    margin-inline: auto;
  }
}

/* iPad 竖屏：压低 hero 高度，让正文尽早露出 */
@media (min-width: 768px) and (max-width: 820px) and (orientation: portrait) {
  .hero {
    height: min(50vh, 460px);
    min-height: 340px;
  }
  .hero--video {
    height: min(55vh, 520px);
    min-height: 360px;
  }
}
.hero__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* background-color: red; */
}
.heroAi{
  display: flex;
  align-items: center;
  justify-content: center;
}
/* AI 页 hero：文字 + gif 作为一个整体居中，标题不偏左 */
.heroAi__box {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(24px, 4vw, 64px);
  max-width: var(--wrapper);
}
.heroAi__box .hero__content--ai {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 820px;
}
.heroAi__gif {
  flex-shrink: 0;
  width: clamp(200px, 24vw, 360px);
  height: auto;
  margin-left: auto;
}
.heroThreeD__gif {
  flex-shrink: 0;
  width: clamp(400px, 50vw, 600px);
  height: auto;
  margin-left: auto;
}

.hero__content {
  max-width: 1200px;
  /* background-color: red; */
  
}
.hero__content--ai{
  display: flex; 
  flex-direction: column;
  align-items: start;
  justify-content: start;
  width: 100%;
  max-width: var(--wrapper);
  /* background-color: pink; */
}

.hero__title {
  font-weight: 700;
  font-size: clamp(30px, 4.5vw, 58px);
  line-height: 1.25;
  color: var(--c-gold);
}

.hero__sub {
  margin-top: 20px;
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.5;
  color: #fff;
  /* max-width: 670px; */
}

/* 居中变体 */
.hero--center .hero__inner {
  justify-content: center;
}
.hero--center .hero__content {
  text-align: center;
  margin-inline: auto;
}
.hero--center .hero__sub {
  margin-inline: auto;
}

/* 移动端 */
@media (max-width: 767px) {
  .hero {
    height: 56vh;
    min-height: 320px;
  }
}

/* 平板横屏（高度受限）：压低 Hero 高度，避免占满首屏 */
@media (min-width: 768px) and (max-width: 1080px) and (orientation: landscape) {
  .hero {
    height: min(72vh, 560px);
    min-height: 400px;
  }
}
