/* ===== ANIMATIONS ===== */

/* ===== REVEAL ANIMATIONS ===== */
.reveal-up,
.reveal-down,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: var(--delay, 0s);
}

.reveal-up {
    transform: translateY(60px);
}

.reveal-down {
    transform: translateY(-60px);
}

.reveal-left {
    transform: translateX(-60px);
}

.reveal-right {
    transform: translateX(60px);
}

.reveal-scale {
    transform: scale(0.9);
}

.reveal-up.revealed,
.reveal-down.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* ===== TEXT ANIMATIONS ===== */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent-primary);
    white-space: nowrap;
    animation: typing 3s steps(30) forwards,
        blink 0.7s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ===== HOVER EFFECTS ===== */
/* Magnetic Button Effect - handled in JS */
.magnetic {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow Effect */
.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    inset: -5px;
    background: var(--gradient-primary);
    filter: blur(20px);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.glow-effect:hover::after {
    opacity: 0.4;
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* ===== LOADING STATES ===== */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-tertiary) 25%,
            var(--bg-card) 50%,
            var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== PARALLAX ===== */
.parallax-container {
    overflow: hidden;
}

.parallax-element {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ===== STAGGER ANIMATIONS ===== */
.stagger-children>* {
    opacity: 0;
    transform: translateY(30px);
}

.stagger-children.revealed>* {
    animation: stagger-reveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-children.revealed>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-children.revealed>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-children.revealed>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-children.revealed>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-children.revealed>*:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-children.revealed>*:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes stagger-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FLOATING ANIMATION ===== */
.floating {
    animation: floating 3s ease-in-out infinite;
}

.floating-delayed {
    animation: floating 3s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ===== ROTATE ANIMATION ===== */
.rotate-slow {
    animation: rotate-slow 20s linear infinite;
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===== SCALE PULSE ===== */
.scale-pulse {
    animation: scale-pulse 2s ease-in-out infinite;
}

@keyframes scale-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ===== FADE IN VARIATIONS ===== */
.fade-in {
    animation: fade-in 0.5s ease forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in-up {
    animation: fade-in-up 0.6s ease forwards;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RIPPLE EFFECT ===== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.ripple:active::before {
    animation: ripple-effect 0.6s ease;
}

@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
    }

    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ===== TRANSITION UTILITIES ===== */
.transition-none {
    transition: none !important;
}

.transition-fast {
    transition-duration: 150ms !important;
}

.transition-slow {
    transition-duration: 500ms !important;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal-up,
    .reveal-down,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }

    .marquee-content {
        animation: none;
    }

    .testimonial-track {
        animation: none;
    }
}