/* ============================================
   Hero / KV Section - 精确还原 Figma 设计
   ============================================ */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-bg-dark);
  overflow: hidden;
}

/* --- 背景图 (绝对定位 + 单独滑动) --- */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: translateX(100%);
  transition: none;
}

.hero__bg-img.is-active {
  opacity: 1;
  transform: translateX(0);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 首张图：直接显示，无过渡 */
.hero__bg-img.is-initial {
  transition: none;
}

/* 旧图滑出：保持可见直到滑出画面 */
.hero__bg-img.slide-out-left {
  opacity: 1;
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 新图滑入：从右侧进入 */
.hero__bg-img.slide-in-right {
  opacity: 1;
  transform: translateX(100%);
  transition: none;
}

/* --- 渐变遮罩 (从上黑到下透明, opacity 0.35) --- */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(102, 102, 102, 0) 100%
  );
}

/* --- 内容区域 (滑动后文字渐显) --- */
.hero__content {
  position: absolute;
  top: 50%;
  left: 213px;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 1053px;
  opacity: 0;
  pointer-events: none;
}

.hero__content.is-active {
  pointer-events: auto;
}

/* 初始加载：保留原始交错动画 */
.hero__content[data-initial].is-active {
  animation: hero-slide-fade-in 0.6s var(--ease-decelerate) forwards;
}

/* 切换后：滑动完成 → 文字渐显 */
.hero__content.is-active:not([data-initial]) {
  animation: hero-slide-fade-in 0.5s var(--ease-decelerate) 0.5s forwards;
}

@keyframes hero-slide-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero__since {
  font-family: var(--font-primary);
  font-size: min(1.667vw, 2rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-white);
  letter-spacing: normal;
  text-transform: uppercase;
  margin: 0;
  opacity: 0;
  animation: fade-in var(--duration-slow) var(--ease-decelerate) 0.2s forwards;
}

.hero__title {
  font-family: var(--font-primary);
  font-size: min(5vw, 6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-white);
  margin: 0;
  opacity: 0;
  animation: slide-up var(--duration-xl) var(--ease-decelerate) 0.4s forwards;
}

.hero__title-line {
  display: block;
}

/* --- CTA 按钮 (精确 SVG 药丸形 + 白色描边) --- */
.hero__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 182px;
  height: 58px;
  text-decoration: none;
  opacity: 0;
  animation: slide-up var(--duration-slow) var(--ease-decelerate) 0.6s forwards;
  transition: transform var(--duration-micro) var(--ease-emphasized);
}

/* 切换后：滑动完成 → 文字渐显（更慢、更大位移） */
.hero__content.is-active:not([data-initial]) .hero__since {
  animation: hero-text-in 0.8s var(--ease-decelerate) 0.8s forwards;
}

.hero__content.is-active:not([data-initial]) .hero__title-line {
  display: block;
  opacity: 0;
  animation: hero-text-in 0.8s var(--ease-decelerate) forwards;
}

.hero__content.is-active:not([data-initial]) .hero__title-line:nth-child(1) {
  animation-delay: 1s;
}

.hero__content.is-active:not([data-initial]) .hero__title-line:nth-child(2) {
  animation-delay: 1.3s;
}

.hero__content.is-active:not([data-initial]) .hero__title-line:nth-child(3) {
  animation-delay: 1.6s;
}

.hero__content.is-active:not([data-initial]) .hero__cta {
  animation: hero-text-in 0.8s var(--ease-decelerate) 1.9s forwards;
}

@keyframes hero-text-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__cta-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__cta-shape path {
  transition: fill var(--duration-base) var(--ease-standard);
}

.hero__cta-text {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: clamp(1rem, 0.08vw + 0.98rem, 1.125rem);
  font-weight: 600;
  white-space: nowrap;
  transform: translateY(-2px);
}

.hero__cta:hover .hero__cta-shape path {
  fill: var(--color-primary-dark);
}

.hero__cta:active {
  transform: scale(0.96);
}

/* --- 蓝色装饰块 (左上角斜切曲线) --- */
.hero__blue-block {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 61%;
  height: 110px;
  z-index: 3;
  pointer-events: none;
}

.hero__blue-block svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- 底部控件栏 (在蓝色块上) --- */
.hero__bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 110px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
    padding: 0 40px 0 calc(39% + 70px);
  overflow: hidden;
}

/* --- 右侧: 标题 + 轮播 (紧挨着) --- */
.hero__bottom-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* --- Scroll Down 提示 --- */
.hero__scroll {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.hero__scroll-text {
  font-family: var(--font-primary);
  font-size: clamp(0.8125rem, 0.04vw + 0.8rem, 0.875rem);
  font-weight: 600;
  line-height: 1.6;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.hero__scroll-arrow {
  width: 8px;
  height: 26px;
  order: -1;
  animation: bounce-down 2s var(--ease-standard) infinite;
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* --- 图片标题 --- */
.hero__caption {
  font-family: var(--font-primary);
  font-size: clamp(1rem, 0.08vw + 0.98rem, 1.125rem);
  font-weight: 600;
  line-height: 1.6;
  color: var(--color-white);
  white-space: nowrap;
  display: none;
}

.hero__caption.is-active {
  display: block;
}

/* --- 轮播控件 (左箭头 + 六边形 + 右箭头) --- */
.hero__carousel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__carousel-dots {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* --- 六边形切换按钮 --- */
.hero__carousel-dot {
  width: 22px;
  height: 19px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.3;
  position: relative;
  transition: opacity var(--duration-base) var(--ease-standard),
              transform var(--duration-micro) var(--ease-standard);
}

/* 触控目标扩展至 ≥44px */
.hero__carousel-dot::before {
  content: "";
  position: absolute;
  inset: -15px;
}

.hero__carousel-dot svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero__carousel-dot svg path {
  fill: var(--color-white);
  transition: fill var(--duration-base) var(--ease-standard);
}

.hero__carousel-dot:hover {
  opacity: 0.6;
}

.hero__carousel-dot.is-active {
  opacity: 1;
}

.hero__carousel-dot:active {
  transform: scale(0.9);
}

.hero__carousel-arrow {
  width: 32px;
  height: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--color-white);
  cursor: pointer;
  padding: 0;
  transition: background-color var(--duration-base) var(--ease-standard);
}

.hero__carousel-arrow::before {
  content: "";
  position: absolute;
  inset: -8px;
}

.hero__carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hero__carousel-arrow svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Responsive Hero
   ============================================ */

@media (max-width: 1400px) {
  .hero__content {
    left: 120px;
  }



  .hero__bottom-bar {
  padding: 0 40px 0 calc(39% + 70px);
  }
}

@media (max-width: 1200px) {
  .hero__content {
    left: 80px;
    gap: 28px;
  }



  .hero__blue-block {
    width: 70%;
    height: 90px;
  }

  .hero__bottom-bar {
    padding: 0 40px 0 calc(30% + 70px);
    height: 90px;
  }

  .hero__caption {
    font-size: 1rem;
  }
}

@media (max-width: 992px) {
  .hero {
    height: 560px;
    min-height: 560px;
  }

  .hero__content {
    left: 24px;
    right: 24px;
    gap: 24px;
    align-items: center;
    text-align: center;
  }

  .hero__since {
    font-size: clamp(1rem, 0.16vw + 0.96rem, 1.25rem);
  }

  .hero__title {
    font-size: clamp(1.5rem, 0.81vw + 1.31rem, 2.75rem);
    line-height: 1.15;
  }

  /* 移动端：默认隐藏所有图片 */
  .hero__bg-img {
    opacity: 0;
    transform: none;
    animation: none;
  }

  /* 移动端：只显示当前激活的图片 */
  .hero__bg-img.is-active {
    opacity: 1;
    transform: none;
  }

  .hero__content {
    animation: none;
    opacity: 0;
    pointer-events: none;
  }

  .hero__content.is-active {
    animation: none;
    opacity: 1;
    pointer-events: auto;
  }

  /* 移动端：小标题 - 初始状态 */
  .hero__since {
    animation: none;
    opacity: 0;
    transform: translateY(20px);
  }

  /* 移动端：大标题 - 初始状态 */
  .hero__title {
    animation: none;
    opacity: 1;
  }

  .hero__title-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
  }

  /* 移动端：按钮 - 初始状态 */
  .hero__cta {
    animation: none;
    opacity: 0;
    transform: translateY(20px);
  }

  /* 移动端：激活时的动画序列 */
  .hero__content.is-active .hero__since {
    animation: hero-mobile-slide-up 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.1s forwards;
  }

  .hero__content.is-active .hero__title-line:nth-child(1) {
    animation: hero-mobile-slide-up 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.25s forwards;
  }

  .hero__content.is-active .hero__title-line:nth-child(2) {
    animation: hero-mobile-slide-up 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.4s forwards;
  }

  .hero__content.is-active .hero__cta {
    animation: hero-mobile-slide-up 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.55s forwards;
  }

  @keyframes hero-mobile-slide-up {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hero__cta {
    width: auto;
    height: 50px;
    padding: 0 24px;
  }

  .hero__cta-text {
    font-size: 1rem;
  }

  .hero__blue-block {
    width: 100%;
    height: 80px;
  }

  .hero__bottom-bar {
    padding: 0 24px;
    bottom: 0;
    height: 80px;
    justify-content: center;
    align-items: center;
  }

  .hero__scroll {
    display: none;
  }

  .hero__caption,
  .hero__caption.is-active {
    display: none;
  }

  .hero__carousel {
    margin: 0 auto;
  }
}

@media (max-width: 576px) {
  .hero {
    min-height: 480px;
  }

  .hero__content {
    left: 20px;
    right: 20px;
    gap: 20px;
    align-items: center;
    text-align: center;
  }

  .hero__since {
    font-size: 1rem;
  }

  .hero__title {
    font-size: clamp(1.625rem, 8vw, 2.25rem);
    line-height: 1.15;
  }

  .hero__cta {
    width: auto;
    height: 44px;
    padding: 0 20px;
  }

  .hero__cta-text {
    font-size: clamp(0.8125rem, 0.04vw + 0.8rem, 0.875rem);
  }

  .hero__blue-block {
    height: 64px;
  }

  .hero__bottom-bar {
    height: 64px;
  }

  .hero__carousel-dots {
    gap: 8px;
  }

  .hero__carousel-dot {
    width: 16px;
    height: 14px;
  }

  .hero__carousel-arrow {
    width: 28px;
    height: 28px;
  }
}

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .hero__bg { transition: none; }
  .hero__content,
  .hero__since,
  .hero__title,
  .hero__cta {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}
