/* ==========================================================================
   Regalo Digital - "Capi" Official Mascot (Capybara Vector & Animations)
   ========================================================================== */

/* Main SVG Vector Graphic */
.capybara-svg {
  width: 195px;
  height: 195px;
  overflow: visible;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

/* ==========================================================================
   ENTRANCE JUMP & PEEKING POSE
   ========================================================================== */
.character-stage {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%) translateY(140px) scale(0);
  width: 200px;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 40 !important;
  opacity: 0;
  pointer-events: none;
  overflow: visible !important;
  transition: opacity 0.3s ease;
}

.character-stage.is-active {
  opacity: 1;
  pointer-events: auto;
  animation: capiJumpOut 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes capiJumpOut {
  0% {
    transform: translateX(-50%) translateY(140px) scale(0.2);
    opacity: 0;
  }
  50% {
    transform: translateX(-50%) translateY(-115px) scale(1.1) rotate(-3deg);
    opacity: 1;
  }
  75% {
    transform: translateX(-50%) translateY(-75px) scale(0.95) rotate(2deg); /* Squash on landing edge */
  }
  88% {
    transform: translateX(-50%) translateY(-90px) scale(1.03); /* Rebound stretch */
  }
  100% {
    transform: translateX(-50%) translateY(-85px) scale(1); /* Settled peeking pose */
  }
}

/* ==========================================================================
   IDLE ANIMATIONS (ALIVE FEEL)
   ========================================================================== */

/* Body Idle Breathing & Subtle Swaying */
.capy-body-group {
  transform-origin: bottom center;
  animation: capiIdleBreathing 4s ease-in-out infinite alternate;
}

@keyframes capiIdleBreathing {
  0% {
    transform: translateY(0px) scaleY(1) rotate(0deg);
  }
  50% {
    transform: translateY(-4px) scaleY(1.02) rotate(1.2deg);
  }
  100% {
    transform: translateY(0px) scaleY(0.985) rotate(-1.2deg);
  }
}

/* Head Tilt & Gentle Curiosity Motion */
.capy-head-group {
  transform-origin: 100px 110px;
  animation: capiHeadTilt 6.5s ease-in-out infinite;
}

@keyframes capiHeadTilt {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(4deg); }
  35% { transform: rotate(-3deg); }
  70% { transform: rotate(3.5deg); }
}

/* Ear Wiggles (Occasional & Natural) */
.capy-ear-left {
  transform-origin: 56px 62px;
  animation: earTwitchLeft 5s ease-in-out infinite;
}

.capy-ear-right {
  transform-origin: 144px 62px;
  animation: earTwitchRight 5s 0.25s ease-in-out infinite;
}

@keyframes earTwitchLeft {
  0%, 88%, 100% { transform: rotate(0deg); }
  91% { transform: rotate(-18deg); }
  94% { transform: rotate(10deg); }
  97% { transform: rotate(-5deg); }
}

@keyframes earTwitchRight {
  0%, 88%, 100% { transform: rotate(0deg); }
  91% { transform: rotate(18deg); }
  94% { transform: rotate(-10deg); }
  97% { transform: rotate(5deg); }
}

/* Eye Blinking (Expressive & Randomized feel) */
.capy-eye-left, .capy-eye-right {
  transform-origin: center;
  animation: capiEyeBlink 4s ease-in-out infinite;
}

@keyframes capiEyeBlink {
  0%, 47%, 53%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.08); }
}

/* Waving Paw */
.capy-paw-wave {
  transform-origin: 138px 154px;
  animation: capiPawWave 2.2s 0.9s ease-in-out infinite alternate;
}

@keyframes capiPawWave {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(-18deg); }
  40% { transform: rotate(-4deg); }
  60% { transform: rotate(-22deg); }
  80% { transform: rotate(-8deg); }
  100% { transform: rotate(-15deg); }
}

/* Cheeks Glow & Blush Pulse */
.capy-blush-cheek {
  opacity: 0.75;
  animation: cheekGlow 3s ease-in-out infinite alternate;
}

@keyframes cheekGlow {
  0% { opacity: 0.65; transform: scale(0.95); }
  100% { opacity: 0.95; transform: scale(1.1); }
}

/* Yuzu Fruit Float / Wobble */
.capy-yuzu-group {
  transform-origin: 100px 48px;
  animation: yuzuWobble 3.5s ease-in-out infinite alternate;
}

@keyframes yuzuWobble {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(6deg); }
}

/* Mouth Smile Animation (Talking effect) */
.capy-mouth {
  transition: d 0.3s ease;
}
