.builder-parade {
  margin-top: 80px;
  background: #f5f3ee;
  color: #080808;
  border-top: 1px solid #f5f3ee;
}

.parade-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 32px;
  border-bottom: 1px solid #c8c4bb;
}

.parade-copy span {
  font: 9px "DM Mono", monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.parade-copy p {
  margin: 0;
  font: italic 18px Fraunces, Georgia, serif;
}

.parade-stage {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.08)), #f5f3ee;
  isolation: isolate;
}

.crowd-layer {
  display: none !important;
}

.crowd-person {
  position: absolute;
  left: var(--x);
  bottom: var(--y);
  width: var(--size);
  height: calc(var(--size) * 1.8);
  opacity: 0.9;
  animation: crowd-bob 2s ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

.crowd-person::before,
.crowd-person::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.crowd-person::before {
  top: 0;
  width: calc(var(--size) * 0.62);
  height: calc(var(--size) * 0.62);
  border-radius: 50%;
  background: #111;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.12);
}

.crowd-person::after {
  bottom: 0;
  width: calc(var(--size) * 0.7);
  height: calc(var(--size) * 1.18);
  border-radius: 14px 14px 8px 8px;
  background: rgba(17,17,17,0.94);
}

.parade-runner {
  position: absolute;
  bottom: 0;
  width: 290px;
  height: 360px;
  z-index: 2;
  will-change: transform;
  contain: layout;
}

.runner-art {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 205px;
  height: 325px;
  display: block;
  background: transparent center bottom / 100% 100% no-repeat url("builder-1.png") !important;
  border-radius: 0 !important;
  filter: drop-shadow(0 12px 14px rgba(0,0,0,0.1));
  animation: walk-bob 0.9s ease-in-out infinite alternate;
}

.runner-art::before,
.runner-art::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.runner-art::before,
.runner-art::after {
  display: none;
}

.runner-art::before {
  top: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #121212;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.12);
}

.runner-art::after {
  bottom: 0;
  left: 50%;
  width: 78px;
  height: 148px;
  border-radius: 22px 22px 10px 10px;
  background: linear-gradient(180deg, rgba(0,0,0,0.14), rgba(0,0,0,0.42)), #121212;
}

.art-two { background-image: url("people/2.png") !important; }

.art-three { background-image: url("people/3.png") !important; }

.art-four { background-image: url("people/4.png") !important; }
.art-one { background-image: url("people/1.png") !important; }
.art-five { background-image: url("people/5.png") !important; }
.art-six { background-image: url("people/6.png") !important; }
.art-eight { background-image: url("people/8.png") !important; }
.art-nine { background-image: url("people/9.png") !important; }
.art-ten { background-image: url("people/10.png") !important; }
.art-eleven { background-image: url("people/11.png") !important; }
.art-twelve { background-image: url("people/12.png") !important; }

/* The source portraits have different side margins, so normalize their visible width. */
.art-one { background-size: 104% 100% !important; }
.art-two { background-size: 103% 100% !important; }
.art-three { background-size: 139% 100% !important; }
.art-four { background-size: 99% 100% !important; }
.art-five { background-size: 97% 100% !important; }
.art-six { background-size: 99% 100% !important; }
.art-seven { background-size: 101% 100% !important; }
.art-eight { background-size: 93% 100% !important; }
.art-nine { background-size: 97% 100% !important; }
.art-ten { background-size: 109% 100% !important; }
.art-eleven { background-size: 95% 100% !important; }
.art-twelve { background-size: 90% 100% !important; }

.parade-note {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 142px;
  width: 132px;
  padding: 8px 9px;
  background: #0a0a09;
  color: #f5f3ee;
  font: 8px/1.35 "DM Mono", monospace;
  letter-spacing: 0.03em;
  box-shadow: 4px 4px 0 #f3efe8, 5px 5px 0 #080808;
}

.parade-runner:has(.art-one),
.parade-runner:has(.art-two),
.parade-runner:has(.art-five),
.parade-runner:has(.art-seven),
.parade-runner:has(.art-ten),
.parade-runner:has(.art-eleven) {
  animation-name: parade-right !important;
}

.parade-runner:has(.art-three),
.parade-runner:has(.art-four),
.parade-runner:has(.art-six),
.parade-runner:has(.art-eight),
.parade-runner:has(.art-nine),
.parade-runner:has(.art-twelve) {
  animation-name: parade-left !important;
}
.parade-runner:nth-child(odd) .parade-note {
  transform: rotate(-1.5deg);
}

.parade-runner:nth-child(even) .parade-note {
  transform: rotate(1.8deg);
}

.runner-one { animation: parade-right 26s linear infinite; }
.runner-two { animation: parade-left 38s linear infinite -10s; }
.runner-three { animation: parade-right 46s linear infinite -18s; }
.runner-four { animation: parade-left 32s linear infinite -7s; }
.runner-five { animation: parade-right 54s linear infinite -24s; }
.runner-six { animation: parade-left 44s linear infinite -20s; }
.runner-seven { animation: parade-right 35s linear infinite -17s; }
.runner-eight { animation: parade-left 42s linear infinite -11s; }
.runner-nine { animation: parade-right 49s linear infinite -29s; }
.runner-ten { animation: parade-left 53s linear infinite -16s; }
.runner-eleven { animation: parade-right 36s linear infinite -13s; }
.runner-twelve { animation: parade-left 40s linear infinite -18s; }
.runner-thirteen { animation: parade-right 28s linear infinite -8s; }
.runner-fourteen { animation: parade-left 51s linear infinite -27s; }
.runner-fifteen { animation: parade-right 41s linear infinite -19s; }
.runner-sixteen { animation: parade-left 45s linear infinite -21s; }

.runner-one,
.runner-two,
.runner-three,
.runner-four,
.runner-five,
.runner-six,
.runner-seven,
.runner-eight,
.runner-nine,
.runner-ten,
.runner-eleven,
.runner-twelve,
.runner-thirteen,
.runner-fourteen,
.runner-fifteen,
.runner-sixteen {
  animation-duration: 20s;
}

.runner-extra {
  height: 350px;
}

.runner-one { bottom: 0; }
.runner-two { bottom: 5px; }
.runner-three { bottom: 11px; }
.runner-four { bottom: 2px; }
.runner-five { bottom: 8px; }
.runner-six { bottom: 15px; }
.runner-seven { bottom: 1px; }
.runner-eight { bottom: 12px; }
.runner-nine { bottom: 7px; }
.runner-ten { bottom: 3px; }
.runner-eleven { bottom: 9px; }
.runner-twelve { bottom: 16px; }
.runner-thirteen { bottom: 6px; }
.runner-fourteen { bottom: 4px; }
.runner-fifteen { bottom: 13px; }
.runner-sixteen { bottom: 10px; }

@keyframes parade-right {
  from { transform: translate3d(-220px, 0, 0); }
  to { transform: translate3d(calc(100vw + 220px), 0, 0); }
}

@keyframes parade-left {
  from { transform: translate3d(calc(100vw + 220px), 0, 0); }
  to { transform: translate3d(-220px, 0, 0); }
}

@keyframes walk-bob {
  from { transform: translateY(0) rotate(-1deg); }
  to { transform: translateY(-12px) rotate(1deg); }
}

@keyframes crowd-bob {
  from { transform: translateY(0) scale(0.98); }
  to { transform: translateY(-8px) scale(1.02); }
}

@media (max-width: 760px) {
  .builder-parade { margin-top: 50px; }
  .parade-copy { padding: 14px 18px; }
  .parade-copy p { font-size: 14px; }
  .parade-stage { height: 300px; }
  .parade-runner { transform: scale(0.78); transform-origin: bottom left; }
}

@media (prefers-reduced-motion: reduce) {
  .parade-runner,
  .runner-art,
  .crowd-person {
    animation: none !important;
  }
}
