/* ============================================
   Animations - Maximus & Co Modern
   ============================================ */

/* Gradient Shift - Animated gradient background position */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Glow Pulse - Subtle glow on interactive elements */
@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 5px rgba(124, 58, 237, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.5), 0 0 10px rgba(244, 114, 182, 0.3);
    }
    100% {
        box-shadow: 0 0 5px rgba(124, 58, 237, 0.3);
    }
}

/* Fade In */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

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

/* Slide In Animations */
.slide-in-top {
    opacity: 0;
    transform: translateY(-50px);
    animation: slideInTop 0.5s ease forwards;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.5s ease forwards;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.5s ease forwards;
}

.slide-in-bottom {
    opacity: 0;
    transform: translateY(50px);
    animation: slideInBottom 0.5s ease forwards;
}

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

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

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

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

/* Stagger delay for feature items */
.feature.slide-in-left:nth-child(1) { animation-delay: 0.1s; }
.feature.slide-in-left:nth-child(2) { animation-delay: 0.2s; }
.feature.slide-in-left:nth-child(3) { animation-delay: 0.3s; }
.feature.slide-in-left:nth-child(4) { animation-delay: 0.4s; }

/* Floating Icons Animation - Slower, smaller amplitude */
.float {
    animation: float 5s ease-in-out infinite;
}

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

/* Card 3D Animation */
.service-card {
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

/* When tilting (not flipped), use fast transition for mouse tracking */
.service-card.tilt-active {
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
}

/* Flipped state — click to flip */
.service-card.flipped {
    transform: rotateY(180deg) !important;
}

/* Input Animation */
.input-animation {
    transform-origin: left;
    animation: inputScale 0.3s ease forwards;
}

@keyframes inputScale {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Icons Positioning */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icons i {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.15);
}

.floating-icons i:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.floating-icons i:nth-child(2) {
    top: 60%;
    right: 20%;
    animation-delay: 0.5s;
}

.floating-icons i:nth-child(3) {
    bottom: 20%;
    left: 50%;
    animation-delay: 1s;
}

/* Typing Animation (kept for potential use) */
.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #7c3aed;
    width: 100%;
    animation:
        typing 3s steps(40, end),
        blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #7c3aed }
}

/* Bounce Animation */
.bounce {
    animation: bounce 2s infinite;
}

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