.hero-scene {
  container-type: size;
  --hero-art-focus: 50%;
  /* Anchor the crop near the wheel contact line on wide monitors. */
  --hero-art-focus-y: 85%;
  --hero-art-zoom: 1.015;
}

.hero-scene .hero-background {
  object-position: var(--hero-art-focus) var(--hero-art-focus-y);
  transform-origin: var(--hero-art-focus) var(--hero-art-focus-y);
  transform: scale(var(--hero-art-zoom));
}

/* The overlay follows the image's 1659 × 948 cover crop. */
.hero-car-effects {
  position: absolute;
  z-index: -1;
  top: var(--hero-art-focus-y);
  left: var(--hero-art-focus);
  width: max(100cqw, 175cqh);
  aspect-ratio: 1659 / 948;
  transform-origin: var(--hero-art-focus) var(--hero-art-focus-y);
  transform: translate(calc(-1 * var(--hero-art-focus)), calc(-1 * var(--hero-art-focus-y))) scale(var(--hero-art-zoom));
  pointer-events: none;
}

.hero-headlights {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 8% 3.3% at 17.5% 81.5%, #ffba8d52, #ff7cb12a 55%, transparent),
    radial-gradient(ellipse 13% 4.1% at 29.5% 87.9%, #ffd7b555, #ff9dbe36 46%, transparent);
}

.hero-headlight {
  position: absolute;
  left: 26.4%;
  top: 67.55%;
  width: 7%;
  height: 6.8%;
  transform: translate(-50%, -50%) rotate(-43deg);
  background: radial-gradient(ellipse, #fffcdbd6, #ffdcac63 23%, #ffad9c33 44%, transparent 72%);
}

.hero-headlight--near {
  left: 45.55%;
  top: 68.75%;
  width: 13%;
  height: 6.3%;
  transform: translate(-50%, -50%) rotate(-17deg);
  background: radial-gradient(ellipse, #fffceaee, #ffe7c577 25%, #f9cfff33 49%, transparent 73%);
}

@media (801px <= width <= 1015px) {
  .hero-scene { --hero-art-focus: 87%; }
}

@media (max-width: 800px) {
  .hero-scene {
    container-type: inline-size;
    --hero-art-focus: 50%;
    --hero-art-focus-y: 50%;
    --hero-art-zoom: 1;
    --hero-art-top: clamp(160px, 41vw, 294px);
    --hero-art-height: calc(100cqw / 1.75);
    --hero-floor: calc(var(--hero-art-top) + var(--hero-art-height) * .93);
    height: auto;
    min-height: 0;
    padding-block-end: clamp(18px, 4vw, 28px);
    background: linear-gradient(
      180deg,
      #792885 0,
      #a84191 var(--hero-art-top),
      #773083 calc(var(--hero-art-top) + 55vw),
      #542067 100%
    );
  }

  .hero-scene .hero-background,
  .hero-scene .hero-environment,
  .hero-scene .hero-car-effects {
    inset: var(--hero-art-top) 0 auto;
    width: 100%;
    height: var(--hero-art-height);
    transform: none;
  }

  .hero-scene .hero-background,
  .hero-scene .hero-environment {
    mask-image: linear-gradient(to bottom, transparent, #000 22% 89%, transparent);
  }

  .hero-scene .hero-sky-life {
    top: var(--hero-art-top);
    height: calc(var(--hero-art-height) * .77);
  }
}

@media (max-width: 540px) {
  .hero-scene { --hero-art-top: max(177px, 44vw); }
}

.motion-off .hero-scene { --hero-art-zoom: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-scene { --hero-art-zoom: 1; }
}
