/* ============================================================
   ANIMATION LIBRARY — Keyframes + Utility Classes
   ============================================================ */

/* ============================================================
   ENTRANCE ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes zoomInSmall {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes flipIn {
    from { opacity: 0; transform: perspective(400px) rotateY(90deg); }
    to { opacity: 1; transform: perspective(400px) rotateY(0); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes blurIn {
    from { opacity: 0; filter: blur(10px); }
    to { opacity: 1; filter: blur(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rotateIn {
    from { opacity: 0; transform: rotate(-10deg) scale(0.95); }
    to { opacity: 1; transform: rotate(0) scale(1); }
}

/* ============================================================
   EXIT ANIMATIONS
   ============================================================ */

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideOutUp {
    to { opacity: 0; transform: translateY(-50px); }
}

@keyframes slideOutDown {
    to { opacity: 0; transform: translateY(50px); }
}

@keyframes slideOutLeft {
    to { opacity: 0; transform: translateX(-50px); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

@keyframes zoomOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.5); }
}

/* ============================================================
   HOVER & INTERACTIVE ANIMATIONS
   ============================================================ */

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 111, 165, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(74, 111, 165, 0); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

@keyframes wobble {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-5px) rotate(-5deg); }
    30% { transform: translateX(5px) rotate(3deg); }
    45% { transform: translateX(-5px) rotate(-3deg); }
    60% { transform: translateX(3px) rotate(2deg); }
    75% { transform: translateX(-2px) rotate(-1deg); }
}

@keyframes swing {
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

@keyframes jello {
    0%, 11.1%, 100% { transform: skewX(0deg) skewY(0deg); }
    22.2% { transform: skewX(-12.5deg) skewY(-12.5deg); }
    33.3% { transform: skewX(6.25deg) skewY(6.25deg); }
    44.4% { transform: skewX(-3.125deg) skewY(-3.125deg); }
    55.5% { transform: skewX(1.5625deg) skewY(1.5625deg); }
    66.6% { transform: skewX(-0.78125deg) skewY(-0.78125deg); }
    77.7% { transform: skewX(0.390625deg) skewY(0.390625deg); }
    88.8% { transform: skewX(-0.1953125deg) skewY(-0.1953125deg); }
}

/* ============================================================
   CONTINUOUS ANIMATIONS (Infinite)
   ============================================================ */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bounceGentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bounceLarge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-40px); }
}

@keyframes bounceHorizontal {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spinReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes wave {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ============================================================
   GLOW & LIGHT EFFECTS
   ============================================================ */

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(27, 42, 74, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(27, 42, 74, 0); }
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px rgba(27, 42, 74, 0.5); }
    50% { text-shadow: 0 0 20px rgba(27, 42, 74, 0.8); }
}

@keyframes lightPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(27, 42, 74, 0.3); }
    50% { box-shadow: 0 0 20px rgba(27, 42, 74, 0.6); }
}

@keyframes shadowPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(27, 42, 74, 0.3); }
    50% { box-shadow: 0 0 20px rgba(27, 42, 74, 0.7); }
}

@keyframes shadowGrow {
    0% { box-shadow: 0 0 0 rgba(27, 42, 74, 0.3); }
    100% { box-shadow: 0 20px 40px rgba(27, 42, 74, 0.3); }
}

/* ============================================================
   RIPPLE & REVEAL EFFECTS
   ============================================================ */

@keyframes ripple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

@keyframes rippleExpand {
    0% { box-shadow: 0 0 0 0 rgba(27, 42, 74, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(27, 42, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(27, 42, 74, 0); }
}

@keyframes clipReveal {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

/* ============================================================
   TEXT ANIMATIONS
   ============================================================ */

@keyframes typewriter {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes blink {
    0%, 49%, 100% { border-right-color: transparent; }
    50%, 99% { border-right-color: currentColor; }
}

@keyframes fadeInCharacters {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ============================================================
   SCALE & SIZE ANIMATIONS
   ============================================================ */

@keyframes scaleUp {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

@keyframes scaleDown {
    from { transform: scale(1.05); }
    to { transform: scale(1); }
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes expandHeight {
    from { height: 0; }
    to { height: 100%; }
}

/* ============================================================
   ROTATION ANIMATIONS
   ============================================================ */

@keyframes rotate180 {
    from { transform: rotate(0deg); }
    to { transform: rotate(180deg); }
}

/* ============================================================
   PATH & MOTION ANIMATIONS
   ============================================================ */

@keyframes travelRight {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100vw); }
}

@keyframes diagonal {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

/* ============================================================
   SHIMMER & GRADIENT ANIMATIONS
   ============================================================ */

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================================
   MORPHING ANIMATION
   ============================================================ */

@keyframes morphing {
    0%, 100% { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
    14% { border-radius: 40% 60% 30% 70% / 60% 30% 70% 40%; }
    28% { border-radius: 70% 30% 66% 34% / 30% 30% 70% 70%; }
    42% { border-radius: 25% 75% 40% 60% / 60% 60% 30% 40%; }
    56% { border-radius: 50% 50% 35% 65% / 61% 35% 65% 39%; }
    70% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    84% { border-radius: 58% 42% 38% 62% / 58% 58% 42% 42%; }
}

/* ============================================================
   UTILITY CLASSES — Entrance
   ============================================================ */

.animate-fade-in { animation: fadeIn 0.8s ease-out; }
.animate-fade-up { animation: fadeInUp var(--transition-normal) forwards; }
.animate-fade-down { animation: fadeInDown var(--transition-normal) forwards; }
.animate-fade-left { animation: fadeInLeft var(--transition-normal) forwards; }
.animate-fade-right { animation: fadeInRight var(--transition-normal) forwards; }
.animate-zoom-in { animation: zoomIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-zoom-in-small { animation: zoomInSmall 0.6s ease-out; }
.animate-flip-in { animation: flipIn 0.8s ease-out; }
.animate-bounce-in { animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-slide-up { animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-slide-down { animation: slideDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-slide-left { animation: slideLeft 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-slide-right { animation: slideRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-blur-in { animation: blurIn 0.8s ease-out; }
.animate-scale-in { animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-rotate-in { animation: rotateIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ============================================================
   UTILITY CLASSES — Exit
   ============================================================ */

.animate-fade-out { animation: fadeOut 0.8s ease-out; }

/* ============================================================
   UTILITY CLASSES — Continuous
   ============================================================ */

.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse-soft { animation: pulse 2s ease-in-out infinite; }
.animate-pulse-glow { animation: pulseGlow 2s ease-out infinite; }
.animate-heartbeat { animation: heartbeat 1.3s ease-in-out infinite; }
.animate-spin-smooth { animation: spin 2s linear infinite; }
.animate-spin-reverse { animation: spinReverse 2s linear infinite; }
.animate-wave { animation: wave 2s ease-in-out infinite; }
.animate-bounce-gentle { animation: bounceGentle 1.5s ease-in-out infinite; }
.animate-bounce-large { animation: bounceLarge 1.5s ease-in-out infinite; }
.animate-glow-text { animation: glow 2s ease-in-out infinite; }
.animate-light-pulse { animation: lightPulse 2s ease-in-out infinite; }
.animate-shadow-pulse { animation: shadowPulse 2s ease-in-out infinite; }
.animate-morphing { animation: morphing 8s ease-in-out infinite; }

/* ============================================================
   UTILITY CLASSES — One-shot effects
   ============================================================ */

.animate-wobble { animation: wobble 0.8s ease-in-out; }
.animate-swing { animation: swing 1s ease-in-out; }
.animate-shake-soft { animation: shake 0.5s ease-in-out; }
.animate-jello { animation: jello 0.9s ease-in-out; }
.animate-ripple { animation: ripple 1s ease-out; }
.animate-ripple-expand { animation: rippleExpand 1.5s ease-out; }
.animate-expand-width { animation: expandWidth 0.8s ease-out; }
.animate-scale-up { animation: scaleUp 0.6s ease-out; }
.animate-scale-down { animation: scaleDown 0.6s ease-out; }
.animate-shadow-grow { animation: shadowGrow 0.8s ease-out; }
.animate-shimmer {
    background: linear-gradient(90deg, transparent 25%, rgba(255, 255, 255, 0.1) 50%, transparent 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ============================================================
   HOVER EFFECT CLASSES
   ============================================================ */

.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: scale(1.05); }

.hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.hover-slide-icon i { transition: transform 0.3s ease; }
.hover-slide-icon:hover i { transform: translateX(5px); }

/* ============================================================
   BUTTON SHINE ANIMATION
   ============================================================ */

.btn-animate { position: relative; overflow: hidden; }
.btn-animate::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}
.btn-animate:hover::after { left: 100%; }

/* ============================================================
   STAGGER DELAYS
   ============================================================ */

.delay-100 { transition-delay: 0.1s; animation-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; animation-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; animation-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; animation-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; animation-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; animation-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; animation-delay: 0.7s; }
.delay-800 { transition-delay: 0.8s; animation-delay: 0.8s; }
