/* ============================================================
   aSolve flying butterflies
   Motion mirrors the extension popup (popup.html / style.css):
   each butterfly loops around the mascot on its own path while
   the wings flap. Sizes scale down for medium and mini mascots.
   ============================================================ */

.mascot-stage {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  line-height: 0;
  z-index: 1;
  pointer-events: none;
}

.hero .mascot-stage {
  display: block;
  width: fit-content;
  margin: 0 auto 8px;
}

.butterfly {
  position: absolute;
  pointer-events: none;
  z-index: 5;
}

.butterfly svg {
  width: 100%;
  height: auto;
  display: block;
}

.butterfly-1 { width: 34px; left: -46px; top: 30px; animation: fly1 7s ease-in-out infinite; }
.butterfly-2 { width: 26px; right: -52px; top: 90px; animation: fly2 8s ease-in-out infinite 1s; }
.butterfly-3 { width: 24px; left: 24px; bottom: -14px; animation: fly3 9s ease-in-out infinite 2s; }

@keyframes fly1 {
  0%   { transform: translate(0, 0) rotate(-10deg); }
  25%  { transform: translate(34px, -26px) rotate(4deg); }
  50%  { transform: translate(6px, -48px) rotate(-6deg); }
  75%  { transform: translate(-30px, -22px) rotate(10deg); }
  100% { transform: translate(0, 0) rotate(-10deg); }
}

@keyframes fly2 {
  0%   { transform: translate(0, 0) rotate(8deg); }
  25%  { transform: translate(-30px, -22px) rotate(-4deg); }
  50%  { transform: translate(-4px, -44px) rotate(6deg); }
  75%  { transform: translate(32px, -18px) rotate(-8deg); }
  100% { transform: translate(0, 0) rotate(8deg); }
}

@keyframes fly3 {
  0%   { transform: translate(0, 0) rotate(-6deg); }
  30%  { transform: translate(26px, -34px) rotate(8deg); }
  60%  { transform: translate(-8px, -50px) rotate(-4deg); }
  100% { transform: translate(0, 0) rotate(-6deg); }
}

/* medium mascots (success / cancel cards) */
.mascot-stage.md .butterfly-1 { width: 26px; left: -34px; top: 22px; }
.mascot-stage.md .butterfly-2 { width: 20px; right: -38px; top: 66px; }
.mascot-stage.md .butterfly-3 { width: 18px; left: 18px; bottom: -10px; }

/* mini mascots (nav logo / price plan header) */
.mascot-stage.mini .butterfly { width: 9px; }
.mascot-stage.mini .butterfly-1 { left: -18px; top: 0; animation: fly1m 5s ease-in-out infinite; }
.mascot-stage.mini .butterfly-2 { right: -16px; top: 8px; animation: fly2m 6s ease-in-out infinite 1s; }
.mascot-stage.mini .butterfly-3 { left: 12px; bottom: -6px; animation: fly3m 7s ease-in-out infinite 2s; }

@keyframes fly1m {
  0%   { transform: translate(0, 0) rotate(-8deg); }
  25%  { transform: translate(8px, -6px) rotate(4deg); }
  50%  { transform: translate(1px, -10px) rotate(-4deg); }
  75%  { transform: translate(-7px, -5px) rotate(8deg); }
  100% { transform: translate(0, 0) rotate(-8deg); }
}

@keyframes fly2m {
  0%   { transform: translate(0, 0) rotate(8deg); }
  25%  { transform: translate(-8px, -5px) rotate(-4deg); }
  50%  { transform: translate(-1px, -9px) rotate(6deg); }
  75%  { transform: translate(7px, -4px) rotate(-8deg); }
  100% { transform: translate(0, 0) rotate(8deg); }
}

@keyframes fly3m {
  0%   { transform: translate(0, 0) rotate(-6deg); }
  30%  { transform: translate(6px, -8px) rotate(8deg); }
  60%  { transform: translate(-2px, -11px) rotate(-4deg); }
  100% { transform: translate(0, 0) rotate(-6deg); }
}

/* wing flap (same as popup.html) */
@keyframes flap {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.35); }
}

.butterfly .wing-l,
.butterfly .wing-r,
.cursor-butterfly .wing-l,
.cursor-butterfly .wing-r {
  animation: flap 0.32s ease-in-out infinite;
  transform-box: view-box;
  transform-origin: 20px 20px;
}

/* cursor followers: glide smoothly, never jitter */
.cursor-butterfly {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}

.cursor-butterfly svg {
  width: 100%;
  height: 100%;
  display: block;
}
