/* =========================================================
   Parallax pixel-art city — three scrolling layers
   ========================================================= */

.city-hero {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0a2e 0%, #1a1a4e 55%, #2a1a3e 100%);
}

/* Stars sprinkled in sky via pseudo-element */
.city-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 8%,  #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 20%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 5%,  #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 12%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 18%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 7%,  #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 3%  30%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 25%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 78% 30%, #fff 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Ground strip */
.city-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: #0d0d1a;
  z-index: 10;
}

/* ---- Layer base ---- */
.city-layer {
  position: absolute;
  bottom: 32px; /* sit on ground strip */
  left: 0;
  display: flex;
  flex-direction: row;
  /* Each layer contains SVG duplicated so total width = 200vw for seamless loop */
}

/* Each SVG tile stretches to fill one full viewport width.
   Two tiles side-by-side = 200vw total.
   translateX(-50%) = -100vw = one tile, creating a seamless loop. */
.city-layer svg {
  flex: 0 0 100vw;
}

/* ---- Far buildings (layer 1) ---- */
.city-layer--far {
  z-index: 2;
  animation: city-scroll 80s linear infinite;
  opacity: 0.6;
}

/* ---- Mid buildings (layer 2) ---- */
.city-layer--mid {
  z-index: 3;
  animation: city-scroll 45s linear infinite;
  opacity: 0.85;
}

/* ---- Near buildings (layer 3) ---- */
.city-layer--near {
  z-index: 4;
  animation: city-scroll 22s linear infinite;
}

/* ---- Moon ---- */
.city-moon {
  position: absolute;
  top: 30px;
  right: 120px;
  z-index: 1;
}

/* ---- Hero overlay (text sits above city) ---- */
.city-hero-content {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ---- Keyframe ---- */
@keyframes city-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
