/* Luni — mięciutkie piórko z buzią. Warstwy ruchu jak w aplikacji:
   unoszenie > kołysanie u nasady dutki > oddech (squash & stretch) > oczy (mruganie + rozglądanie).
   Różne długości cykli (2,8 s / 3,4 s / 2,2 s) nie zgrywają się, więc ruch nie wygląda na zapętlony. */

.lf { overflow: visible; }
.lf__float { animation: lf-float 2.8s ease-in-out infinite alternate; }
.lf__sway { transform-box: view-box; transform-origin: 38% 96%; animation: lf-sway 3.4s ease-in-out infinite alternate; }
.lf__breath { transform-box: view-box; transform-origin: 50% 76%; animation: lf-breath 2.2s ease-in-out infinite alternate; }
.lf__eyes { transform-box: fill-box; transform-origin: center; animation: lf-blink 4.2s infinite, lf-look 7s ease-in-out infinite; }
.lf__tw { transform-box: fill-box; transform-origin: center; animation: lf-tw 1.8s ease-in-out infinite; }
.lf__tw--2 { animation-delay: .7s; }

/* słuchanie: nachylony w stronę mówiącego, szybszy oddech, bez rozglądania */
.lf--listen .lf__sway { animation: lf-lean 1.4s ease-in-out infinite alternate; }
.lf--listen .lf__breath { animation-duration: .9s; }
.lf--listen .lf__eyes { animation: lf-blink 4.2s infinite; }

/* dotknięcie: skok z przysiadem, rozciągnięciem i sprężynką przy lądowaniu */
.lf.is-joy .lf__breath { animation: lf-jump .9s cubic-bezier(.3,.7,.4,1) 1; }

@keyframes lf-float { to { transform: translateY(-7px); } }
@keyframes lf-sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes lf-lean { from { transform: rotate(-11deg) translateY(0); } to { transform: rotate(-8deg) translateY(-4px); } }
@keyframes lf-breath { from { transform: scale(1, 1); } to { transform: scale(1.035, .97); } }
@keyframes lf-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes lf-look { 0%, 30% { translate: 0 0; } 36%, 54% { translate: -3px 0; } 62%, 80% { translate: 3px -1px; } 88%, 100% { translate: 0 0; } }
@keyframes lf-tw { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes lf-jump {
  0% { transform: none; }
  14% { transform: scale(1.12, .86); }
  42% { transform: translateY(-30px) scale(.92, 1.12); }
  66% { transform: translateY(0) scale(1.1, .88); }
  80% { transform: scale(.97, 1.04); }
  100% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lf__float, .lf__sway, .lf__breath, .lf__eyes, .lf__tw { animation: none !important; }
}
