#home.hero {
  isolation: isolate;
}

#home.hero::before,
#home.hero::after {
  content: none;
}

.hero-mist-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-mist-field::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(ellipse at 50% 48%, #fff7ed8c, #fff7ed3b 47%, transparent 86%);
}

.hero-mist {
  position: absolute;
  width: max(105%, 650px);
  height: max(135%, 610px);
  background:
    radial-gradient(ellipse 44% 43% at 45% 52%, var(--mist-light), transparent),
    radial-gradient(ellipse 47% 46% at 52% 47%, var(--mist-colour), var(--mist-fade) 48%, transparent 100%);
  animation: hero-mist-drift var(--mist-duration) ease-in-out var(--mist-delay) infinite;
}

.hero-mist--amber {
  top: -48%;
  left: -39%;
  --mist-light: #ffe0aa68;
  --mist-colour: #bd6c37a2;
  --mist-fade: #db8d5848;
  --mist-x: 24%;
  --mist-y: 24%;
  --mist-duration: 23s;
  --mist-delay: -4s;
}

.hero-mist--rose {
  right: -35%;
  bottom: -50%;
  --mist-light: #f9c9dd60;
  --mist-colour: #bb547ea2;
  --mist-fade: #cf6f994e;
  --mist-x: -21%;
  --mist-y: -25%;
  --mist-duration: 27s;
  --mist-delay: -9s;
}

.hero-mist--sage {
  top: -42%;
  right: -48%;
  --mist-light: #dae8c55e;
  --mist-colour: #4f7d62aa;
  --mist-fade: #6b997b53;
  --mist-x: -24%;
  --mist-y: 18%;
  --mist-duration: 32s;
  --mist-delay: -15s;
}

@keyframes hero-mist-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  36% { transform: translate(var(--mist-x), var(--mist-y)) scale(1.17, .92); }
  71% { transform: translate(calc(-.22 * var(--mist-x)), calc(.55 * var(--mist-y))) scale(.96, 1.12); }
}

@media (max-width: 600px) {
  .hero-mist {
    width: max(145%, 430px);
    height: 115%;
  }

  .hero-mist--amber { top: -36%; left: -61%; }
  .hero-mist--rose { right: -48%; bottom: -37%; }
  .hero-mist--sage { top: -20%; right: -58%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mist { animation: none; }
}
