/* Homepage hero: architecture-carousel.html structure, adapted only for
   WenCui's black palette, local video frames, and existing canvas background. */
.hero-bg-frame,
.hero-media,
.hero-stagger,
.hero-stat,
.hero-metrics {
  display: none !important;
}

/* Fixed hotspot bar: full-width, flat and patterned like the supplied reference. */
.home-hotspot-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 120;
  height: 82px;
  padding-top: 24px;
  color: #fff;
  /* Fixed notebook composition: never use cover/center cropping. */
  background-image: url('assets/home-hotspot/background.png');
  background-position: left bottom;
  background-size: auto 100%;
  background-repeat: repeat-x;
  transform: translateY(0);
  transition: transform .7s ease;
  isolation: isolate;
}

.home-hotspot-inner {
  display: flex;
  align-items: center;
  width: min(77.0833%, 1480px);
  height: 58px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.home-hotspot-title {
  flex: 0 0 160px;
  color: #fff;
  font: 600 22px/1.2 "Songti SC", "STSong", "Noto Serif SC", serif;
  letter-spacing: .08em;
  white-space: nowrap;
}

.home-hotspot-links {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  height: 100%;
}

.home-hotspot-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 140px;
  gap: 18px;
  padding: 0 16px;
  color: rgba(255, 255, 255, .93) !important;
  font: 400 15px/1.4 "Songti SC", "STSong", "Noto Serif SC", serif;
  letter-spacing: .04em;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}

.home-hotspot-links a i {
  position: relative;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  background: url('assets/home-hotspot/icon.png') center / contain no-repeat;
}

.home-hotspot-links a:hover {
  color: #fff !important;
  background: rgba(112, 31, 36, .18);
}

.home-hotspot-toggle {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-left: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(126, 43, 48, .36);
  color: rgba(255, 255, 255, .9);
  cursor: pointer;
}
.home-hotspot-toggle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -65%) rotate(45deg);
  transition: transform .25s ease;
}
.home-hotspot-toggle:hover { filter: brightness(1.2); }
.home-hotspot-bar.is-collapsed { transform: translateY(calc(100% - 34px)); }
.home-hotspot-bar.is-collapsed .home-hotspot-title,
.home-hotspot-bar.is-collapsed .home-hotspot-links { visibility: hidden; }
.home-hotspot-bar.is-collapsed .home-hotspot-toggle {
  position: absolute;
  top: -24px;
  right: 18px;
  margin-left: 0;
  z-index: 5;
}
.home-hotspot-bar.is-collapsed .home-hotspot-toggle::before { transform: translate(-50%, -35%) rotate(225deg); }

@media (max-width: 900px) {
  .home-hotspot-bar { height: 60px; padding-top: 0; }
  .home-hotspot-inner { width: calc(100% - 24px); height: 60px; }
  .home-hotspot-title { flex-basis: auto; margin-right: 18px; font-size: 17px; }
  .home-hotspot-links { overflow-x: auto; scrollbar-width: none; }
  .home-hotspot-links::-webkit-scrollbar { display: none; }
  .home-hotspot-links a { flex: 0 0 auto; min-width: 112px; gap: 9px; padding: 0 10px; font-size: 13px; }
  .home-hotspot-links a i { flex-basis: 15px; width: 15px; height: 15px; }
  .home-hotspot-toggle { flex-basis: 30px; width: 30px; height: 30px; margin-left: 8px; }
  .home-hotspot-bar.is-collapsed .home-hotspot-toggle { right: 8px; }
}

.hero {
  position: relative !important;
  min-height: 100svh !important;
  height: 100svh !important;
  overflow: hidden !important;
  background: #090909 !important;
  color: #f5f5f2 !important;
}

.hero::before { display: none !important; }

/* Use the supplied Silk Road artwork as a dedicated hero atmosphere layer.
   It stays behind the copy and carousel while the transparent cutout keeps
   the original red / gold winding silhouette intact. */
.hero-silk-road {
  position: absolute !important;
  z-index: 2 !important;
  top: clamp(-2%, 4vw, -34px) !important;
  right: clamp(-5%, -8vw, 0px) !important;
  width: clamp(760px, 62vw, 1020px) !important;
  aspect-ratio: 1952 / 1229 !important;
  background: url("images/chinese/silk-road-hero.png?v=20260902-right-v1") center / contain no-repeat !important;
  opacity: .78 !important;
  filter: saturate(1.08) contrast(1.04) brightness(1.02) drop-shadow(0 20px 30px rgba(32, 7, 8, .22)) !important;
  mix-blend-mode: normal !important;
  transform: none !important;
  pointer-events: none !important;
}

html[data-theme="light"] .hero-silk-road {
  opacity: .80 !important;
  mix-blend-mode: normal !important;
  filter: saturate(1.08) contrast(1.03) brightness(1.02) !important;
}

.hero-grid {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100svh !important;
  height: 100svh !important;
  padding: clamp(104px, 13svh, 144px) 0 clamp(38px, 6svh, 68px) !important;
  justify-content: space-between !important;
}

.hero-heading {
  position: relative !important;
  isolation: isolate !important;
  z-index: 3 !important;
  order: 1 !important;
  width: min(760px, calc(100% - 40px)) !important;
  margin: 0 auto !important;
  text-align: center !important;
  pointer-events: none !important;
}

.hero-heading > * {
  position: relative !important;
  z-index: 1 !important;
}

.hero-heading .hero-label {
  display: block !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(245, 245, 242, .54) !important;
  font-size: 14px !important;
  letter-spacing: .22em !important;
  font-style: italic !important;
}

.hero-heading h1 {
  margin: 0 !important;
  padding: 10px 0 16px !important;
  color: #f5f5f2 !important;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif !important;
  font-size: clamp(50px, 5vw, 76px) !important;
  font-style: italic !important;
  font-weight: 600 !important;
  line-height: .92 !important;
  letter-spacing: 0 !important;
}

.hero-heading h1 .gold,
.hero-heading h1 .red { color: inherit !important; }

/* Keep the dark hero's highlighted line in the same restrained navy family
   as the primary action button. The light-theme stylesheet overrides this
   with the paper/coral palette at runtime. */
.hero-heading h1 .gold { color: var(--accent-navy) !important; }

/* The two-line headline should feel editorial rather than mechanically stacked. */
.hero-heading h1 .gold { display: inline-block !important; transform: translateX(clamp(10px, 1.8vw, 28px)) !important; }

.hero-carousel {
  position: relative !important;
  z-index: 3 !important;
  order: 2 !important;
  width: 100% !important;
  margin: clamp(22px, 4svh, 48px) 0 0 !important;
  overflow: hidden !important;
  touch-action: pan-y !important;
}

.hero-track {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 16px 0 clamp(54px, 8svh, 76px) !important;
  overflow-x: scroll !important;
  overflow-y: visible !important;
  scrollbar-width: none !important;
  cursor: default !important;
}

.hero-track::-webkit-scrollbar { display: none !important; }
.hero-track.is-dragging { cursor: default !important; }

.hero-slide {
  position: relative !important;
  flex: 0 0 clamp(235px, 21vw, 345px) !important;
  height: clamp(310px, 44svh, 465px) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #171717 !important;
  box-shadow: none !important;
  transform: var(--carousel-transform, none) !important;
  transform-origin: center center !important;
  transition: none !important;
  user-select: none !important;
  will-change: transform !important;
}

/* The reference composition uses an editorial row rather than identical
   tiles. Keep each repeated five-card cycle subtly different in height so
   the moving rail has a visible rhythm even when it is between frames. */
.hero-slide:nth-child(5n + 1) { height: clamp(350px, 48svh, 500px) !important; margin-top: 0 !important; }
.hero-slide:nth-child(5n + 2) { height: clamp(325px, 45svh, 470px) !important; margin-top: 10px !important; }
.hero-slide:nth-child(5n + 3) { height: clamp(300px, 42svh, 440px) !important; margin-top: 22px !important; }
.hero-slide:nth-child(5n + 4) { height: clamp(325px, 45svh, 470px) !important; margin-top: 10px !important; }
.hero-slide:nth-child(5n + 5) { height: clamp(350px, 48svh, 500px) !important; margin-top: 0 !important; }

.hero-slide::after,
.hero-slide .hero-card-shade,
.hero-slide .hero-card-content { display: none !important; }

.hero-slide img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  filter: saturate(.88) contrast(1.04) !important;
  pointer-events: none !important;
  transform: scale(1.06) !important;
  transition: transform .8s cubic-bezier(.22, 1, .36, 1) !important;
}

.hero-slide:hover img { transform: scale(1.11) !important; }

.hero-intro {
  position: relative !important;
  z-index: 3 !important;
  order: 3 !important;
  width: min(650px, calc(100% - 40px)) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  transform: translateY(clamp(14px, 2.2svh, 30px)) !important;
  text-align: center !important;
}

.hero-intro .hero-desc {
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  color: rgba(245, 245, 242, .72) !important;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif !important;
  font-size: clamp(15px, 1vw, 17px) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  line-height: 1.8 !important;
  letter-spacing: .018em !important;
}

.hero-intro .hero-actions {
  justify-content: center !important;
  margin-top: 22px !important;
}

.hero-intro .btn {
  padding: 0 26px !important;
  min-height: 46px !important;
  border: 1px solid #536b9a !important;
  border-radius: 999px !important;
  background: #1d2d50 !important;
  box-shadow: none !important;
  color: #f7f7f4 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.hero-intro .btn-outline {
  border-color: rgba(247, 247, 244, .8) !important;
  background: #f7f7f4 !important;
  color: #111b33 !important;
}

.hero-intro .btn:hover {
  border-color: #647eae !important;
  background: #2a3e68 !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
}

.hero-intro .btn-outline:hover {
  border-color: #fff !important;
  background: #fff !important;
  color: #111b33 !important;
}

@media (max-width: 760px) {
  .hero { height: auto !important; min-height: 100svh !important; }
  .hero-grid { min-height: 100svh !important; height: auto !important; padding: 84px 0 88px !important; }
  .hero-heading { width: calc(100% - 32px) !important; }
  .hero-silk-road {
    top: 36px !important;
    right: clamp(-220px, -42vw, -140px) !important;
    width: clamp(620px, 150vw, 800px) !important;
    opacity: .64 !important;
  }
  html[data-theme="light"] .hero-silk-road { opacity: .68 !important; }
  .hero-heading h1 { font-size: clamp(47px, 14vw, 63px) !important; line-height: .9 !important; }
  .hero-carousel { margin-top: 16px !important; }
  .hero-track { gap: 10px !important; padding: 10px 0 24px !important; }
  .hero-slide,
  .hero-slide:nth-child(5n + 1),
  .hero-slide:nth-child(5n + 2),
  .hero-slide:nth-child(5n + 3),
  .hero-slide:nth-child(5n + 4),
  .hero-slide:nth-child(5n + 5) {
    flex-basis: min(68vw, 300px) !important;
    height: min(82vw, 350px) !important;
    margin-top: 0 !important;
  }
  .hero-intro { width: calc(100% - 32px) !important; transform: none !important; }
  .hero-intro .hero-desc { font-size: 13px !important; line-height: 1.75 !important; }
  .hero-intro .hero-actions { margin-top: 16px !important; gap: 8px !important; }
  .hero-intro .btn { min-height: 42px !important; padding: 0 18px !important; font-size: 12px !important; }
}

/* Final desktop override: the center card is visibly shortest, with each
   neighboring card stepping up toward the two outer edges. */
@media (min-width: 761px) {
  /* Keep the rail proportional on short laptop screens. The source covers
     are 2:3 portraits; tying both dimensions to the available height avoids
     the fixed 50svh cards being clipped by the carousel's flex item. */
  .hero {
    height: auto !important;
    min-height: 100svh !important;
  }

  .hero-grid {
    height: auto !important;
    min-height: 100svh !important;
  }

  .hero-carousel {
    flex: 0 0 auto !important;
  }

  .hero-carousel .hero-track > .hero-slide,
  .hero-carousel .hero-track > .hero-slide:nth-child(5n + 1),
  .hero-carousel .hero-track > .hero-slide:nth-child(5n + 2),
  .hero-carousel .hero-track > .hero-slide:nth-child(5n + 3),
  .hero-carousel .hero-track > .hero-slide:nth-child(5n + 4),
  .hero-carousel .hero-track > .hero-slide:nth-child(5n + 5) {
    flex-basis: clamp(220px, min(20vw, 30svh), 330px) !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    margin-top: 0 !important;
  }
}
