/* ==========================================================================
   HUAYI — 首页
   ========================================================================== */

/* ---------- 视频背景 ---------- */
.home-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1920 / 950;
  min-height: 420px;
  max-height: 100vh;
}

.home-banner__video {
  position: relative;
  width: 100%;
  height: 100%;
}

.home-banner__video video {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #000;
  display: block;
}

.home-banner__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.home-banner__inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.home-banner__inner .wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  /* background-color: #fff;  */
  transform: translateY(-100px);
}

.home-banner__content {
  max-width: 1200px;
  pointer-events: none;
  text-align: center;
  margin-inline: auto;
  /* background-color: aqua; */
}

.home-banner__title {
  font-weight: 700;
  font-size: clamp(22px, 5.5vw, 58px);
  line-height: 1.25;
  color: var(--c-gold);
  overflow-wrap: break-word;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  /* background-color: #fff; */
}

.home-banner__sub {
  margin-top: 20px;
  font-size: clamp(15px, 2.5vw, 24px);
  line-height: 1.5;
  color: #fff;
  /* max-width: 670px; */
  overflow-wrap: break-word;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);

  /* background-color: red; */
}

.home-banner__cta {
  margin-top: 48px;
  pointer-events: auto;
  display: inline-flex;
}
.h-img-two{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
}
/* 文案入场动画 */
.home-banner .anim {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition: opacity 0.85s var(--ease-expo), transform 0.85s var(--ease-expo);
}
.home-banner.is-ready .anim {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.home-banner.is-ready .anim:nth-child(1) {
  transition-delay: 0.12s;
}
.home-banner.is-ready .anim:nth-child(2) {
  transition-delay: 0.22s;
}
.home-banner.is-ready .anim:nth-child(3) {
  transition-delay: 0.32s;
}

/* ---------- 产品三栏 ---------- */
.home-dev {
  display: flex;
  align-items: flex-end;
  gap: clamp(36px, 4vw, 72px);
  color: #fff;
}

.home-dev__left {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.home-dev__head {
  margin-bottom: 40px;
}

.home-dev__head p {
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.2;
  margin-top: 12px;
  white-space: nowrap;
}

.home-dev__list {
  display: flex;
  flex-direction: column;
}

/* 产品区：列表 + 预览图 横排容器（原内联样式抽离为类，便于响应式控制） */
.home-dev__row {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: center;
  min-width: 0;
}
.home-dev__row .home-dev__list {
  flex: 1 1 auto;
  min-width: 0;
}

.home-dev__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 706px;
  padding: 26px 28px;
  border-radius: var(--radius);
  border-bottom: 1px solid var(--c-line);
  border-left: 2px solid transparent;
  color: inherit;
  transition: background 0.4s var(--ease-expo), border-color 0.4s,
    transform 0.4s var(--ease-expo), color 0.4s;
}

.home-dev__item + .home-dev__item {
  margin-top: 19px;
}

.home-dev__item:hover,
.home-dev__item.is-active {
  background: var(--c-surface-3);
  border-left-color: var(--c-accent-2);
  transform: translateX(4px);
  color: var(--c-accent-2);
}

.home-dev__item-num {
  font-weight: 600;
  font-size: 24px;
  color: #715042;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.home-dev__item-body {
  flex: 1;
  min-width: 0;
}

.home-dev__item-body p {
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 16px;
  color: inherit;
}

.home-dev__item-row {
  display: flex;
  gap: 10px;
  font-size: 16px;
  line-height: 1.75;
  color: #fff;
}

.home-dev__item-row .node-dot {
  margin-top: 10px;
}

.home-dev__arrow {
  width: 32px;
  height: 32px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.35s var(--ease-expo), transform 0.35s var(--ease-expo);
  flex-shrink: 0;
}
.home-dev__item:hover .home-dev__arrow,
.home-dev__item.is-active .home-dev__arrow {
  opacity: 1;
  transform: translateX(0);
}

.home-dev__preview {
  flex-shrink: 1;
  width: 634px;
  max-width: 46%;
  min-width: 0;
  height: 590px;
  aspect-ratio: 634 / 590;
  position: relative;
  align-self: center;
}

.home-dev__preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.55s var(--ease-expo), transform 0.55s var(--ease-expo);
}
.home-dev__preview img.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

/* ---------- 视频 ---------- */
.home-video video {
  width: 100%;
  aspect-ratio: 1400 / 753;
  object-fit: cover;
  border-radius: var(--radius);
  background: #000;
}

/* ---------- 市场分布 ---------- */
.home-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.home-share__title .h-display {
  margin-top: 8px;
  font-size: clamp(30px, 3.6vw, 50px);
}

.home-share__regions {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0;
  max-width: 700px;
  scrollbar-width: none;
}
.home-share__regions::-webkit-scrollbar {
  display: none;
}

.home-box {
  flex-shrink: 0;
  padding: 0 24px;
  height: 36px;
  line-height: 34px;
  text-align: center;
  background: var(--c-surface-2);
  border: 1px solid rgba(120, 86, 51, 1);
  border-radius: 32px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.35s, border-color 0.35s, transform 0.35s var(--ease-expo);
}
.home-box.is-active,
.home-box:hover {
  background: var(--c-accent-2);
  border-color: var(--c-accent-2);
}
.color-bian{
  background: linear-gradient(180deg, #FCFAFA 0%, #E56930 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* 走马灯 */
.marquee {
  width: 100%;
  overflow: hidden;
  margin-top: 60px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee--left .marquee__track {
  animation: marquee-left 42s linear infinite;
}
.marquee--right .marquee__track {
  animation: marquee-right 36s linear infinite;
}
@keyframes marquee-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@keyframes marquee-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none !important;
  }
}
@media (hover: hover) {
  .marquee:hover .marquee__track {
    animation-play-state: paused;
  }
}

.marquee__group {
  display: flex;
  gap: 30px;
  flex-shrink: 0;
  padding-right: 30px;
  box-sizing: content-box;
}

/* 区域卡片 */
.region-card {
  position: relative;
  width: 447px;
  height: 322px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.region-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.5s var(--ease-expo);
}
.region-card__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-caption);
  border-radius: 0 0 16px 16px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.4s var(--ease-expo);
}
@media (hover: hover) {
  .region-card:hover .region-card__caption {
    opacity: 1;
  }
  .region-card:hover img {
    transform: scale(1.05);
  }
}

/* 小 logo */
.marquee__group--logos {
  gap: 32px;
}
.marquee__group--logos img {
  width: 206px;
  height: 68px;
  flex-shrink: 0;
  object-fit: contain;
}

/* ---------- 数字统计 ---------- */
.home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 60px;
  padding: clamp(32px, 4vw, 48px) clamp(24px, 4vw, 63px);
  background: var(--c-surface);
  border-radius: var(--radius);
}

.stat-item {
  text-align: center;
  padding: 0 24px;
  border-right: 1px solid var(--c-line);
}
.stat-item:last-child {
  border-right: none;
}
.stat-item__num {
  font-weight: 800;
  font-size: clamp(34px, 3.4vw, 48px);
  line-height: 1.2;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-item__num .plus {
  font-size: 0.6em;
  vertical-align: super;
}
.stat-item__label {
  margin-top: 8px;
  font-size: clamp(16px, 1.5vw, 20px);
  color: #fff;
}

/* ---------- 证书 coverflow ---------- */
.home-trust {
  width: 100%;
  height: auto;
  min-height: 860px;
  padding: 72px var(--gutter);
  background-image: url("../img/home/bj.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.home-trust__title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-trust__title .trust-num {
  font-weight: 800;
  font-size: 40px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.coverflow {
  position: relative;
  height: 640px;
  margin-top: 48px;
  perspective: 1540px;
  perspective-origin: 50% 42%;
  cursor: grab;
  user-select: none;
}
.coverflow.is-dragging {
  cursor: grabbing;
}
.coverflow__stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.coverflow__slide {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -185px;
  margin-top: -318px;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
  will-change: transform;
}
.coverflow__slide img {
  width: 370px;
  height: auto;
  display: block;
  border-radius: 2px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* ---------- 新闻 ---------- */
.home-news {
  min-height: 752px;
  padding: 72px 56px;
  background: #1b1c1e;
  border-radius: 8px;
}

.home-news__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(40px, 5vw, 72px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--c-line);
}

.home-news__left {
  position: relative;
  width: 674px;
  max-width: 100%;
}

.home-news__title {
  font-weight: 700;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.4;
  margin: 20px 0 30px;
}

.home-news__desc {
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  max-width: 520px;
}

.home-news__cta {
  margin-top: 32px;
}

.home-news__img {
  flex-shrink: 0;
}
.home-news__img img {
  height: 264px;
  width: auto;
  border-radius: 8px;
}

.home-news__bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 60px;
}

.home-news__card {
  padding: 0 32px;
  border-right: 1px solid var(--c-line);
  cursor: pointer;
  transition: transform 0.35s var(--ease-expo);
  display: block;
  color: inherit;
}
.home-news__card:last-child {
  border-right: none;
}
.home-news__card .date {
  display: inline-block;
  font-size: 14px;
  padding: 8px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--c-line);
  border-radius: 32px;
  color: #fff;
}
.home-news__card .text {
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  transition: color 0.3s;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
@media (hover: hover) {
  .home-news__card:hover {
    transform: translateY(-4px);
  }
  .home-news__card:hover .text {
    color: var(--c-gold);
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  /* 平板横屏：保持两栏布局，缩窄宽度与间距 */
  .home-dev {
    gap: 28px;
  }
  /* banner 文字：平板端高度变矮，取消上移并压缩间距，避免文字挤在一起 */
  .home-banner__inner .wrapper {
    transform: translateY(0);
  }
  .home-banner__title {
    font-size: clamp(24px, 5vw, 44px);
    line-height: 1.2;
  }
  .home-banner__sub {
    margin-top: 14px;
    font-size: clamp(14px, 2.2vw, 20px);
  }
  .home-banner__cta {
    margin-top: 28px;
  }
  .home-dev__item {
    width: auto;
    max-width: 100%;
    padding: 22px;
  }
  .home-dev__preview {
    width: 42%;
    max-width: none;
    height: auto;
  }
  .home-dev__head p {
    font-size: clamp(28px, 3.4vw, 40px);
  }
  .home-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .stat-item:nth-child(2) {
    border-right: none;
  }
  .home-trust {
    height: auto;
    min-height: 720px;
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .home-news {
    min-height: 0;
    padding: 56px 40px;
  }
  .home-news__top {
    gap: 32px;
  }
  .home-news__title {
    font-size: clamp(24px, 2.6vw, 34px);
  }
  .home-news__bottom {
    gap: 0;
  }
  .home-news__card {
    padding: 0 20px;
  }
}

@media (max-width: 767px) {
  .home-dev {
    flex-direction: column;
    align-items: stretch;
  }  .home-dev__preview {
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 10;
  }
  .home-stats {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .home-trust {
    min-height: 620px;
    padding-top: 30px;
    padding-bottom: 30px;
  }
  .home-news {
    padding: 34px 22px;
  }
  .home-news__top {
    flex-direction: column;
    align-items: flex-start;
  }
  .home-news__bottom {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .home-news__card {
    border-right: none;
    border-bottom: 1px solid var(--c-line);
    padding-bottom: 24px;
    padding-left: 0;
    padding-right: 0;
  }
  .home-banner {
    aspect-ratio: 16 / 10;
  }
  .stat-item {
    border-right: none;
    padding: 0;
  }
  .region-card {
    width: 300px;
    height: 220px;
  }
  .coverflow {
    height: 480px;
    transform: scale(0.55);
    transform-origin: top center;
    margin-bottom: -230px;
  }
}

/* ---------- 应用场景 APPLICATION ---------- */
.app-marquee-group {
  gap: 24px;
}.app-marquee-group img {
  width: 380px;
  height: 285px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: transform 0.5s var(--ease-expo);
}
@media (hover: hover) {
  .app-marquee-group img:hover {
    transform: scale(1.04);
  }
}
@media (max-width: 767px) {
  .app-marquee-group img {
    width: 260px;
    height: 195px;
  }
}

/* ---------- iPad 竖屏（768–820px）优化 ---------- */
@media (min-width: 768px) and (max-width: 820px) {
  /* 产品区：竖屏空间有限，改为上下堆叠，避免左右挤压溢出 */
  .home-dev {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }
  /* 列表 + 预览图容器：竖屏改为纵向堆叠 */
  .home-dev__row {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }
  .home-dev__item {
    width: 100%;
    max-width: 100%;
  }
  .home-dev__preview {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 10;
    order: -1;
  }
  .home-dev__head p {
    white-space: normal;
  }
  /* 新闻区：标题栏与底部卡片适当收窄 */
  .home-news {
    padding: 48px 32px;
  }
  .home-news__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .home-news__bottom {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .home-news__card {
    border-right: none;
    border-bottom: 1px solid var(--c-line);
    padding: 0 0 24px;
  }
  /* 证书 coverflow 区高度适度 */
  .home-trust {
    min-height: 680px;
  }
}

/* ---------- 小平板 / iPad 横屏窄窗口（821–900px）优化 ---------- */
@media (min-width: 821px) and (max-width: 900px) {
  .home-dev__row {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }
  .home-dev__preview {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 10;
    order: -1;
  }
}
