.hero-exhaust {
  --exhaust-x: 93.68%;
  --exhaust-y: 74.42%;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 2.7% 2.4% at calc(var(--exhaust-x) + .75%) calc(var(--exhaust-y) - .35%), #fff0d77a, #e5bce63a 42%, transparent);
  /* Follow the rear silhouette of the car in the source illustration. */
  clip-path: polygon(87% 21%, 100% 21%, 100% 82%, 91% 82%, 92.1% 77.2%, 93.19% 75.95%, 93.67% 74.37%, 93.97% 72.78%, 94.45% 70.15%, 94.94% 67.51%, 95.2% 64.2%, 94.85% 62.6%, 94.55% 57.4%, 93.9% 55.2%, 90% 53.4%, 87% 53.1%);
}

.hero-exhaust::before,
.hero-exhaust::after {
  content: '';
  position: absolute;
  left: calc(var(--exhaust-x) + 1.3%);
  top: calc(var(--exhaust-y) + .3%);
  width: 12%;
  height: 49%;
  transform-origin: 27% 100%;
  transform: translate(-27%, -100%) skewX(-4deg);
  background: url('assets/cartoon/hero-exhaust-loop.webp') top / 100% 150% no-repeat;
  filter: sepia(.16) drop-shadow(0 0 0 #ffeee2) blur(clamp(.3px, .06vw, .85px));
  opacity: .79;
  /* Reveal the first plume and feather its tip into the sunset. */
  mask-image:
    linear-gradient(to right, transparent, #000 7% 38%, transparent 56%),
    linear-gradient(to bottom, transparent, #000 20% 87%, #000a 97%, transparent);
  mask-composite: intersect;
}

.hero-exhaust::after {
  left: calc(var(--exhaust-x) + 1.8%);
  top: calc(var(--exhaust-y) - .8%);
  height: 41%;
  width: 7%;
  transform: translate(-27%, -100%) skewX(6deg);
  opacity: .30;
}

.hero-tail-light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 3.2% 5.8% at 94.76% 63.87%, #ff523d8a, #ff30294f 25%, #ff303123 56%, transparent),
    radial-gradient(ellipse 3.7% 1.15% at 95.2% 75.9%, #ff594031, #ff30441c 52%, transparent);
}

.hero-tail-light::before {
  content: '';
  position: absolute;
  left: 94.76%;
  top: 63.87%;
  width: 1.22%;
  height: max(1px, .39%);
  transform: translate(-50%, -50%) rotate(-63deg);
  border-radius: 60% 40% 44% 56%;
  background: linear-gradient(90deg, #ff432d, #fff0c9 45% 73%, #ff735a);
  box-shadow: 0 0 .35cqw .08cqw #ff423c, 0 0 .85cqw .21cqw #ff3a2c98;
}

@media (max-width: 800px) {
  .hero-exhaust::before { width: 14%; opacity: .92; }
  .hero-tail-light::before { height: max(1.3px, .39%); }
}

.motion-off .hero-exhaust::before,
.motion-off .hero-exhaust::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  body:not(.motion-enabled) .hero-exhaust::before,
  body:not(.motion-enabled) .hero-exhaust::after { display: none; }
}
