/* ========================================
   GDR Agency - Animations
   ======================================== */

/* Keyframes */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(-5px) rotate(-1deg);
    }
    75% {
        transform: translateY(-20px) rotate(1deg);
    }
}

@keyframes scrollDown {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(16px);
        opacity: 0;
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes fadeInUp {
    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 scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Float Animation Classes */
.float-1 {
    animation: float 6s ease-in-out infinite;
}

.float-2 {
    animation: float 8s ease-in-out infinite;
    animation-delay: -2s;
}

.float-3 {
    animation: float 7s ease-in-out infinite;
    animation-delay: -4s;
}

/* ========================================
   Scroll Reveal - Disabled for instant display
   ======================================== */
.reveal {
    opacity: 1;
    transform: none;
}

.reveal-left {
    opacity: 1;
    transform: none;
}

.reveal-right {
    opacity: 1;
    transform: none;
}

.reveal-scale {
    opacity: 1;
    transform: none;
}

/* Stagger Animation Delays */
.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; }

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

/* Text Animations */
.text-shimmer {
    background: linear-gradient(
        90deg,
        var(--gray-900) 0%,
        var(--primary) 50%,
        var(--gray-900) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Parallax Effect */
.parallax {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Magnetic Button Effect */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cursor Trail Effect */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--gradient);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.5;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    z-index: 9999;
    mix-blend-mode: difference;
}

/* Page Transition */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.active {
    transform: translateY(0);
}

/* Smooth Scroll Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient);
    z-index: 10001;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.1s linear;
}

/* Card Tilt Effect */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, var(--primary) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(51px, 9999px, 28px, 0); }
    20% { clip: rect(70px, 9999px, 63px, 0); }
    40% { clip: rect(26px, 9999px, 97px, 0); }
    60% { clip: rect(82px, 9999px, 95px, 0); }
    80% { clip: rect(20px, 9999px, 73px, 0); }
    100% { clip: rect(67px, 9999px, 32px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(129px, 9999px, 36px, 0); }
    20% { clip: rect(36px, 9999px, 4px, 0); }
    40% { clip: rect(85px, 9999px, 66px, 0); }
    60% { clip: rect(91px, 9999px, 91px, 0); }
    80% { clip: rect(12px, 9999px, 59px, 0); }
    100% { clip: rect(30px, 9999px, 22px, 0); }
}

/* Morphing Background */
.morph-bg {
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(244, 114, 182, 0.1) 0%, transparent 50%);
    animation: morphBg 10s ease-in-out infinite;
}

@keyframes morphBg {
    0%, 100% {
        background: 
            radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 50%, rgba(244, 114, 182, 0.1) 0%, transparent 50%);
    }
    50% {
        background: 
            radial-gradient(circle at 80% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 20% 70%, rgba(244, 114, 182, 0.1) 0%, transparent 50%);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
