/* ==========================================================================
   La Casita Luna - animations.css
   Smooth staggered fade & hover effects
   ========================================================================== */

/* Button Entrance Animation (applied to the wrapping <div>, never the
   button itself, so it can't collide with the hover transform below). */
.button-entrance {
  animation-name: casitaPop;
  animation-duration: 0.65s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: both;
  animation-delay: calc(var(--delay) * 0.08s);
}

@keyframes casitaPop {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fadein {
  animation: casitaFade 1.2s ease-out both;
}

@keyframes casitaFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==========================================================================
   Hover micro-interaction shared by buttons, the credit logo & social icons.
   Explicitly excluded for .sharebutton so the compact share trigger remains stable.
   ========================================================================== */
.button-hover:not(.sharebutton),
.credit-hover,
.social-hover {
  transform: perspective(1px) translateZ(0);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.credit-hover,
.social-hover {
  display: inline-block;
}

/* LinkStack link buttons */
.button-hover:not(.sharebutton) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.button-hover:not(.sharebutton):hover,
.credit-hover:hover,
.social-hover:hover {
  transform: translateY(-2px) scale(1.015);
}

@media (prefers-reduced-motion: reduce) {
  .button-entrance,
  .fadein {
    animation: none;
  }

  .button-hover:not(.sharebutton),
  .credit-hover,
  .social-hover {
    transition: none;
  }

  .button-hover:not(.sharebutton):hover,
  .credit-hover:hover,
  .social-hover:hover {
    transform: none;
  }
}
