/* animations.css - Animation definitions and transitions */

/* ================================
   Scroll Animations
   ================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ================================
   Page Transitions
   ================================ */
.page-transition {
    transition: opacity 0.3s ease;
}

.page-exit {
    opacity: 0;
    transform: translateY(-10px);
}

/* ================================
   Hover Animations
   ================================ */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-brightness {
    transition: filter var(--transition-base);
}

.hover-brightness:hover {
    filter: brightness(1.1);
}

/* ================================
   Fade 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);
    }
}

/* ================================
   Scale Animations
   ================================ */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* ================================
   Pulse Animation
   ================================ */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ================================
   Shimmer Effect
   ================================ */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ================================
   Skeleton Loading
   ================================ */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--gray-200);
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ================================
   Parallax Classes
   ================================ */
[data-parallax] {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ================================
   Counter Animation Support
   ================================ */
.counting {
    display: inline-block;
    min-width: 2ch;
}

/* ================================
   Entrance Animations
   ================================ */
.entrance-fade {
    animation: fadeIn 0.8s ease both;
}

.entrance-slide-up {
    animation: fadeInUp 0.8s ease both;
}

.entrance-slide-down {
    animation: fadeInDown 0.8s ease both;
}

.entrance-slide-left {
    animation: fadeInLeft 0.8s ease both;
}

.entrance-slide-right {
    animation: fadeInRight 0.8s ease both;
}

.entrance-scale {
    animation: scaleIn 0.8s ease both;
}

/* ================================
   Micro-interactions
   ================================ */
.clickable {
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.clickable:active {
    transform: scale(0.95);
}

/* Button press effect */
.btn:active {
    transform: translateY(1px);
}

/* Input focus effects */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* ================================
   Responsive Animations
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}