/* =====================================================================
   Entwurf 2 — Hero-Effekte: aufsteigende Bläschen + Delfin-Animationen.
   Portiert aus mockups/entwurf-2/assets/css/site.css (Abschnitte 6-7).
   Ausgelagert aus hero.css zur Einhaltung von R1 (<400 Zeilen).
   ===================================================================== */

/* ---------- Aufsteigende Bläschen ---------- */
.entwurf2 .bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.entwurf2 .bubble-wrap {
  position: absolute;
  bottom: -40px;
  width: var(--s, 12px);
  height: var(--s, 12px);
  left: var(--x);
  animation: e2-rise var(--d, 9s) linear infinite;
  animation-delay: var(--del, 0s);
}

.entwurf2 .bubble {
  display: block;
  width: 100%;
  height: 100%;
  background: rgb(255 255 255 / 0.16);
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 50%;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.1, 1);
  will-change: transform;
}

@keyframes e2-rise {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  100% {
    transform: translateY(-120vh) translateX(var(--drift, 25px));
    opacity: 0;
  }
}

/* Burst-Bläschen: einmaliger Aufstieg mit Ease-Out */
.entwurf2 .bubble-wrap--burst {
  animation: e2-rise var(--d, 4s) ease-out 1 forwards;
}

.entwurf2 .bubble-wrap--burst .bubble {
  background: rgb(255 255 255 / 0.28);
  border-color: rgb(255 255 255 / 0.42);
}

/* ---------- Logo-Press / Wobble (per JS getriggert) ---------- */
.entwurf2 .hero__logo.is-wobbling {
  animation: e2-logo-press 640ms cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

@keyframes e2-logo-press {
  0% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 12px 32px rgb(10 40 80 / 0.22),
      0 4px 10px rgb(10 40 80 / 0.12),
      inset 0 0 0 1px rgb(15 71 135 / 0.08);
  }

  18% {
    transform: translateY(6px) scale(0.92);
    box-shadow:
      0 4px 10px rgb(10 40 80 / 0.3),
      0 2px 4px rgb(10 40 80 / 0.14),
      inset 0 0 0 1px rgb(15 71 135 / 0.14);
  }

  40% {
    transform: translateY(-5px) scale(1.05);
    box-shadow:
      0 22px 44px rgb(10 40 80 / 0.26),
      0 8px 16px rgb(10 40 80 / 0.14),
      inset 0 0 0 1px rgb(15 71 135 / 0.06);
  }

  65% {
    transform: translateY(1px) scale(0.99);
  }

  85% {
    transform: translateY(-1px) scale(1.01);
  }

  100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 12px 32px rgb(10 40 80 / 0.22),
      0 4px 10px rgb(10 40 80 / 0.12),
      inset 0 0 0 1px rgb(15 71 135 / 0.08);
  }
}

.entwurf2 .hero__logo.is-wobbling svg {
  animation: e2-logo-wobble 720ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes e2-logo-wobble {
  0% {
    transform: translateY(-2%) rotate(0deg) scale(1);
  }

  22% {
    transform: translateY(-2%) rotate(-4deg) scale(1.04);
  }

  48% {
    transform: translateY(-2%) rotate(3deg) scale(1.02);
  }

  72% {
    transform: translateY(-2%) rotate(-1deg) scale(1);
  }

  100% {
    transform: translateY(-2%) rotate(0deg) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .entwurf2 .hero__logo.is-wobbling,
  .entwurf2 .hero__logo.is-wobbling svg {
    animation: none;
  }
}

/* ---------- Vorbeiziehende Delfine ---------- */
.entwurf2 .dolphin-swim {
  position: absolute;
  left: 0;
  pointer-events: none;
  z-index: 1;
  color: #fff;
  overflow: visible;
  will-change: transform, opacity;
  opacity: 0;
  transform: translateX(-25vw);
}

.entwurf2 .dolphin-swim--lead {
  bottom: 8%;
  width: 130px;
}

.entwurf2 .dolphin-swim--mid {
  bottom: 28%;
  width: 72px;
}

.entwurf2 .dolphin-swim--follow {
  bottom: 50%;
  width: 96px;
}

.entwurf2 .dolphin-swim.is-swimming {
  animation: e2-dolphin-swim 22s linear 1 backwards;
}

@media (width <= 720px) {
  .entwurf2 .dolphin-swim--lead {
    width: 92px;
    bottom: 6%;
  }

  .entwurf2 .dolphin-swim--mid {
    width: 56px;
    bottom: 24%;
  }

  .entwurf2 .dolphin-swim--follow {
    width: 68px;
    bottom: 42%;
  }
}

@keyframes e2-dolphin-swim {
  0% {
    transform: translateX(-18vw) translateY(0) rotate(4deg);
    opacity: 0;
  }

  3% {
    opacity: 1;
  }

  10% {
    transform: translateX(8vw) translateY(-10px) rotate(-1deg);
  }

  20% {
    transform: translateX(22vw) translateY(8px) rotate(3deg);
  }

  30% {
    transform: translateX(38vw) translateY(-8px) rotate(0deg);
  }

  40% {
    transform: translateX(55vw) translateY(6px) rotate(3deg);
  }

  48% {
    transform: translateX(75vw) translateY(-4px) rotate(1deg);
    opacity: 1;
  }

  55% {
    transform: translateX(110vw) translateY(2px) rotate(4deg);
    opacity: 0;
  }

  100% {
    transform: translateX(110vw);
    opacity: 0;
  }
}

.entwurf2 .dolphin-svg {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.entwurf2 .dolphin-svg.is-fleeing,
.entwurf2 .bubble.is-fleeing {
  transition: transform 0.35s cubic-bezier(0.35, 0.7, 0.2, 1);
}

.entwurf2 .dolphin-svg .dolphin {
  transform-origin: 55% 50%;
  transform-box: fill-box;
  animation: e2-dolphin-rock 1.8s ease-in-out infinite;
}

.entwurf2 .dolphin-swim--follow .dolphin-svg .dolphin {
  animation-duration: 1.55s;
}

.entwurf2 .dolphin-swim--mid .dolphin-svg .dolphin {
  animation-duration: 1.95s;
}

.entwurf2 .dolphin-svg .dolphin__inner {
  transform-origin: 75% 18%;
  transform-box: fill-box;
  animation: e2-dolphin-tail-flex 1.4s ease-in-out infinite;
}

.entwurf2 .dolphin-swim--follow .dolphin-svg .dolphin__inner {
  animation-duration: 1.2s;
}

.entwurf2 .dolphin-swim--mid .dolphin-svg .dolphin__inner {
  animation-duration: 1.55s;
}

@keyframes e2-dolphin-rock {
  0%,
  100% {
    transform: rotate(-1.8deg) scaleX(0.97) scaleY(1.025);
  }

  50% {
    transform: rotate(1.8deg) scaleX(1.05) scaleY(0.965);
  }
}

@keyframes e2-dolphin-tail-flex {
  0%,
  100% {
    transform: skewX(-8deg) scaleY(1.015);
  }

  50% {
    transform: skewX(8deg) scaleY(0.97);
  }
}
