/* Dekorative, unabhängige Nebelschichten hinter Schrift und Bedienung.
   Leichte Alpha-Texturen statt animierter Filter, Masken oder Fullscreen-Canvas. */
.fog {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
}

.fog-field {
  position: absolute;
  display: block;
  inset: auto -35% 0;
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

/* Negative Startzeiten: der Nebel treibt sichtbar schon beim ersten Besuch.
   Alternate + sanfte Umkehr: keine Bildsprünge an den Schleifen-Enden. */
.fog-far {
  bottom: 46%;
  height: 29%;
  opacity: .48;
  background-image: url("../assets/nebel21-fern.png");
  animation: nebel21-fern 43s -16s cubic-bezier(.31, 0, .66, 1) infinite alternate;
}
.fog-mid {
  bottom: 24%;
  height: 36%;
  opacity: .60;
  background-image: url("../assets/nebel21-mittel.png");
  animation: nebel21-mittel 30s -12s cubic-bezier(.32, 0, .66, 1) infinite alternate;
}
.fog-near {
  bottom: 1%;
  height: 41%;
  opacity: .53;
  background-image: url("../assets/nebel21-nah.png");
  animation: nebel21-nah 37s -27s cubic-bezier(.34, 0, .67, 1) infinite alternate;
}
body:not([data-page="index"]) .fog { opacity: .49; }

@keyframes nebel21-fern {
  0% { transform: translate3d(-12%, 4%, 0) scale(1.04); opacity: .35; }
  46% { opacity: .53; }
  100% { transform: translate3d(13%, -3%, 0) scale(1.08); opacity: .36; }
}
@keyframes nebel21-mittel {
  0% { transform: translate3d(14%, 4%, 0) scale(1.07); opacity: .43; }
  59% { opacity: .66; }
  100% { transform: translate3d(-14%, -7%, 0) scale(1.03); opacity: .48; }
}
@keyframes nebel21-nah {
  0% { transform: translate3d(-16%, 3%, 0) scale(1.07); opacity: .43; }
  54% { opacity: .63; }
  100% { transform: translate3d(15%, -6%, 0) scale(1.14); opacity: .50; }
}

@media (max-width: 720px) {
  .fog-field { left: -45%; right: -45%; }
  .fog-far { display: none; }
  .fog-mid { bottom: 31%; height: 44%; }
  .fog-near { bottom: 1%; height: 48%; }
}

@media (prefers-reduced-motion: reduce) {
  .fog-field {
    animation: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    will-change: auto;
  }
  .fog-far { opacity: .33; }
  .fog-mid { opacity: .40; }
  .fog-near { opacity: .33; }
}
