.hero-city {
  isolation: isolate;
  width: 100%;
  min-height: clamp(390px, 25vw, 500px);
  max-height: 500px;
  aspect-ratio: 4 / 1;
  padding: 28px 40px 64px;
  align-items: flex-start;
  background: #ff40ff;
  text-align: left;
}

.hero-city::before {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 25%),
    radial-gradient(circle at 50% 28%, rgba(255, 246, 219, .16), transparent 42%);
  pointer-events: none;
}

.hero-city-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: #ff40ff;
}

.hero-city-space {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(255, 42, 141, .08), transparent 25% 75%, rgba(20, 12, 25, .12)),
    linear-gradient(180deg, transparent 58%, rgba(255, 45, 142, .11));
}

.hero-city-layer {
  position: absolute;
  inset: -1.5%;
  background-image: var(--hero-city-image);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: auto 100%;
  pointer-events: none;
  will-change: background-position;
}

.hero-city-far {
  z-index: 1;
  opacity: 1;
  animation: hero-city-far-move 24s ease-in-out infinite alternate;
}

.hero-city-near {
  z-index: 2;
  opacity: 1;
  filter: drop-shadow(0 -2px 0 rgba(10, 10, 10, .08));
  animation: hero-city-near-move 18s ease-in-out infinite alternate;
}

.hero-city-panda {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 14px;
  width: clamp(74px, 6vw, 90px);
  aspect-ratio: 433 / 454;
  z-index: 6;
  transform: translateX(-50%);
  background-image: var(--hero-panda-sprite);
  background-repeat: no-repeat;
  background-size: 800% 100%;
  background-position: 0 0;
  image-rendering: pixelated;
  filter: drop-shadow(4px 5px 0 rgba(53, 15, 45, .28));
  animation: hero-panda-run 1.45s steps(8, end) infinite;
}

.hero-city .hero-wrap {
  z-index: 5;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 30px;
  border: 4px solid #0a0a0a;
  background: rgba(255, 248, 227, .78);
  text-align: center;
  box-shadow: 10px 10px 0 rgba(10, 10, 10, .9);
  -webkit-backdrop-filter: blur(8px) saturate(1.08);
  backdrop-filter: blur(8px) saturate(1.08);
}

.hero-city .hero-name {
  justify-content: center;
  font-size: clamp(66px, 9vw, 128px);
}

.hero-city .hero-tagline {
  margin-left: auto;
  margin-right: auto;
}

.hero-city .hero-eyebrow {
  margin-bottom: 16px;
}

@keyframes hero-city-far-move {
  from { background-position: 65% center; }
  to { background-position: 35% center; }
}

@keyframes hero-city-near-move {
  from { background-position: 35% center; }
  to { background-position: 65% center; }
}

@keyframes hero-panda-run {
  from { background-position: 0 0; }
  to { background-position: 114.285714% 0; }
}

@media (max-width: 1050px) {
  .hero-city {
    min-height: 520px;
    max-height: none;
    aspect-ratio: auto;
  }

  .hero-city-panda {
    width: 86px;
  }

  .hero-city .hero-name {
    font-size: clamp(64px, 10vw, 108px);
  }
}

@media (max-width: 760px) {
  .hero-city {
    min-height: 470px;
    padding: 20px 14px 22px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
  }

  .hero-city-space {
    background:
      linear-gradient(180deg, rgba(255, 46, 147, .03), rgba(255, 246, 219, .05) 45%, rgba(31, 14, 31, .08)),
      linear-gradient(90deg, rgba(255, 39, 137, .08), transparent 24% 76%, rgba(26, 10, 26, .09));
  }

  .hero-city .hero-wrap {
    width: 100%;
    padding: 18px 15px 20px;
    border-width: 3px;
    background: rgba(255, 248, 227, .8);
    box-shadow: 6px 6px 0 rgba(10, 10, 10, .9);
    -webkit-backdrop-filter: blur(7px) saturate(1.08);
    backdrop-filter: blur(7px) saturate(1.08);
  }

  .hero-city .hero-name {
    justify-content: center;
    font-size: clamp(58px, 20vw, 86px);
  }

  .hero-city .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-city-layer {
    inset: -1%;
    background-position: center 46%;
    background-size: auto 100%;
  }

  .hero-city-far {
    opacity: 1;
  }

  .hero-city-near {
    opacity: 1;
  }

  .hero-city-panda {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 4px;
    width: 76px;
    margin: 0;
    transform: translateX(-50%);
    pointer-events: none;
    filter: drop-shadow(3px 4px 0 rgba(53, 15, 45, .24));
  }
}

@media (max-width: 420px) {
  .hero-city {
    min-height: 450px;
    padding-top: 16px;
    padding-bottom: 18px;
  }

  .hero-city .hero-eyebrow {
    font-size: 8px;
    letter-spacing: .12em;
  }

  .hero-city .hero-name {
    font-size: clamp(54px, 19vw, 76px);
  }

  .hero-city-panda {
    bottom: 3px;
    width: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-city-layer,
  .hero-city-panda {
    animation: none !important;
  }

  .hero-city-panda {
    background-position: 0 0;
  }
}
