/* W29: the owl's poses (./mascot.js). Short and soft; prefers-reduced-motion keeps the owl still (no bob, no blink). */
.owl { display: block; overflow: visible; }
.owl .ow-body, .owl .ow-wing-l, .owl .ow-wing-r, .owl .ow-lid, .owl .ow-pupil { transform-box: view-box; }
.owl .ow-body { transform-origin: 60px 110px; }
.owl .ow-lid { transform: scaleY(0); }

/* idle: a slow breath + a blink every few seconds */
.owl[data-pose="idle"] .ow-body { animation: ow-breathe 3.2s ease-in-out infinite; }
.owl[data-pose="idle"] .ow-lid,
.owl[data-pose="wave"] .ow-lid,
.owl[data-pose="peek"] .ow-lid { animation: ow-blink 4.2s ease-in-out infinite; }

/* intro: pop in with a spring, blink, then wave */
.owl[data-pose="wave"] .ow-body { animation: ow-pop 520ms cubic-bezier(.34, 1.56, .64, 1) both, ow-breathe 3.2s ease-in-out 600ms infinite; }
.owl[data-pose="wave"] .ow-wing-r { animation: ow-wave 900ms ease-in-out 420ms 2 both; }
[dir="ltr"] .owl[data-pose="wave"] .ow-wing-r { animation: none; }
[dir="ltr"] .owl[data-pose="wave"] .ow-wing-l { animation: ow-wave-l 900ms ease-in-out 420ms 2 both; }

/* success: a hop + both wings clap */
.owl[data-pose="clap"] .ow-body { animation: ow-hop 560ms cubic-bezier(.34, 1.56, .64, 1) both; }
.owl[data-pose="clap"] .ow-wing-l { animation: ow-clap-l 280ms ease-in-out 2 alternate; }
.owl[data-pose="clap"] .ow-wing-r { animation: ow-clap-r 280ms ease-in-out 2 alternate; }

/* peek: rises a little from below the edge, looks around */
.owl[data-pose="peek"] .ow-body { animation: ow-peek 700ms cubic-bezier(.34, 1.4, .64, 1) 300ms both; }
.owl[data-pose="peek"] .ow-pupil { animation: ow-look 5s ease-in-out 1.2s infinite; }

@keyframes ow-breathe { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-1.5px) scale(1.012, .988); } }
@keyframes ow-blink { 0%, 92%, 100% { transform: scaleY(0); } 95% { transform: scaleY(1); } }
@keyframes ow-pop { 0% { transform: translateY(18px) scale(.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes ow-wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-38deg); } 50% { transform: rotate(-14deg); } 75% { transform: rotate(-38deg); } }
@keyframes ow-wave-l { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(38deg); } 50% { transform: rotate(14deg); } 75% { transform: rotate(38deg); } }
@keyframes ow-hop { 0% { transform: none; } 40% { transform: translateY(-10px) scale(1.04, .97); } 100% { transform: none; } }
@keyframes ow-clap-l { to { transform: rotate(-22deg) translateX(6px); } }
@keyframes ow-clap-r { to { transform: rotate(22deg) translateX(-6px); } }
@keyframes ow-peek { from { transform: translateY(40px); } to { transform: none; } }
@keyframes ow-look { 0%, 40%, 100% { transform: none; } 50%, 70% { transform: translateX(2.5px); } 80%, 90% { transform: translateX(-2.5px); } }

@media (prefers-reduced-motion: reduce) {
  .owl .ow-body, .owl .ow-wing-l, .owl .ow-wing-r, .owl .ow-lid, .owl .ow-pupil { animation: none !important; }
}
