/* Chinese homepage carousel. The product images and accessible copy stay independent. */
.page-home #hero[data-hero-fold][data-theme] {
  --hero-ink: #fff;
  --hero-muted: #fff;
  --hero-border: #ffffffc9;
  --hero-track: #ffffff58;
  --hero-base: #0a1b38;
  --hero-floor: #0b234f;
  background: linear-gradient(180deg, var(--hero-base) 0%, var(--hero-base) 32%, var(--hero-floor) 100%);
}

.page-home #hero[data-hero-fold][data-theme="keyboard-pair"] {
  --hero-base: #3e4c6a;
  --hero-floor: #c4d1e0;
}

.page-home #hero[data-hero-fold][data-theme="software-pair"] {
  --hero-base: #17223f;
  --hero-floor: #736f8e;
}

.page-home #hero[data-hero-fold][data-theme="service"] {
  --hero-base: #343f53;
  --hero-floor: #a9b0ba;
}

.page-home #hero[data-hero-fold][data-theme] .hero-inner {
  height: clamp(610px, 42vw, 825px);
  padding: clamp(94px, 7vw, 138px) 24px 48px;
}

.page-home #hero[data-hero-fold] .hero-copy {
  perspective: 900px;
  text-shadow: 0 2px 15px #07132180;
}

.page-home #hero[data-hero-fold] .hero-copy > :is(.eyebrow, h1, .hero-description, .actions) {
  transform-origin: 50% 0;
}

.page-home #hero[data-hero-fold] .eyebrow {
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .05em;
}

.page-home #hero[data-hero-fold] h1 {
  font-size: clamp(39px, 3.8vw, 68px);
  line-height: 1.13;
  margin: 9px 0 10px;
}

.page-home #hero[data-hero-fold] .hero-description {
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1.45;
}

.page-home #hero[data-hero-fold] .actions { gap: 12px; margin-top: 18px; }
.page-home #hero[data-hero-fold] .actions .btn { min-height: 38px; padding: 6px 18px; color: #fff; }
.page-home #hero[data-hero-fold][data-theme] .actions .btn:hover { color: #14213a; background: #fff; }
.page-home #hero[data-hero-fold] .actions .btn:focus-visible { outline-color: #fff; }

.page-home #hero[data-hero-fold][data-theme] .hero-stage {
  inset: auto 0 0;
  height: 100%;
  mask-image: none;
}

.page-home #hero[data-hero-fold][data-theme] .hero-stage img {
  display: block;
  object-fit: cover;
  object-position: center bottom;
}

.page-home #hero[data-hero-fold][data-theme="touch-night"] .hero-stage {
  /* Start the fade at the artwork's edge, even when a narrow window shrinks it. */
  width: min(100%, calc(clamp(610px, 42vw, 825px) * 1.85));
  height: auto;
  aspect-ratio: 1983 / 793;
  margin-inline: auto;
  mask-image: linear-gradient(transparent, #000 26%);
}

.page-home #hero[data-hero-fold][data-theme="touch-night"] .hero-stage img {
  object-fit: contain;
  mask-image: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent);
}

.page-home #hero[data-hero-fold][data-theme="keyboard-pair"] .hero-stage::after,
.page-home #hero[data-hero-fold][data-theme="service"] .hero-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(#13203976, #14213c76 25%, #17264724 50%, transparent 73%);
}

.page-home #hero[data-hero-fold][data-theme] .slide-controls .slide-track {
  box-shadow: 0 1px 4px #14213d99;
}

@media (max-width: 800px) {
  .page-home #hero[data-hero-fold][data-theme] .hero-inner {
    height: clamp(570px, 84svh, 670px);
    padding: 94px 20px 40px;
  }
  .page-home #hero[data-hero-fold] h1 { font-size: clamp(30px, 5vw, 39px); }
}

@media (max-width: 600px) {
  .page-home #hero[data-hero-fold][data-theme] .hero-inner {
    height: clamp(520px, 69svh, 590px);
    padding: 82px 18px 35px;
  }

  .page-home #hero[data-hero-fold] .hero-description { font-size: 15px; }
  .page-home #hero[data-hero-fold] .actions .btn { min-height: 40px; padding-inline: 13px; }

  .page-home #hero[data-hero-fold][data-theme] .hero-stage {
    inset: auto 0 0;
    height: min(98vw, calc(100% - 216px));
    mask-image: linear-gradient(transparent, #000 16%);
  }

  .page-home #hero[data-hero-fold][data-theme="touch-night"] .hero-stage img {
    object-fit: cover;
    mask-image: none;
  }

  .page-home #hero[data-hero-fold][data-theme="touch-night"] .hero-stage {
    width: 100%;
    aspect-ratio: auto;
  }

  .page-home #hero[data-hero-fold]:is([data-theme="keyboard-pair"], [data-theme="software-pair"]) .hero-stage {
    height: 49.375vw; /* 158vw of a 3.2:1 image, without a letterboxed edge. */
    mask-image: linear-gradient(transparent, #000 36%);
  }

  .page-home #hero[data-hero-fold][data-theme="service"] .hero-stage {
    height: min(80vw, calc(100% - 240px));
  }

  .page-home #hero[data-hero-fold]:is([data-theme="keyboard-pair"], [data-theme="software-pair"]) .hero-stage img {
    position: relative;
    left: -29%;
    width: 158%;
    max-width: none;
    object-fit: contain;
  }

  .page-home #hero[data-hero-fold][data-theme="service"] .hero-stage img {
    object-fit: contain;
    width: 124%;
    max-width: none;
    margin-left: -12%;
  }
}
