/**
 * Animations & Effects
 */

/* Gradient Orbs Background */
.gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.gradient-orb--1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    right: -100px;
    animation: float-orb-1 20s ease-in-out infinite;
}

.gradient-orb--2 {
    width: 500px;
    height: 500px;
    background: var(--accent-secondary);
    bottom: -150px;
    left: -100px;
    animation: float-orb-2 25s ease-in-out infinite;
}

.gradient-orb--3 {
    width: 400px;
    height: 400px;
    background: var(--accent-tertiary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float-orb-3 18s ease-in-out infinite;
}

/* Orb Float Animations */
@keyframes float-orb-1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(-50px, 50px) scale(1.1);
    }
    50% {
        transform: translate(-100px, 0) scale(1);
    }
    75% {
        transform: translate(-50px, -50px) scale(0.9);
    }
}

@keyframes float-orb-2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(60px, -40px) scale(1.05);
    }
    50% {
        transform: translate(100px, 20px) scale(0.95);
    }
    75% {
        transform: translate(40px, 60px) scale(1.1);
    }
}

@keyframes float-orb-3 {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    33% {
        transform: translate(-40%, -60%) scale(1.1);
    }
    66% {
        transform: translate(-60%, -40%) scale(0.9);
    }
}

/* Floating IT Icons Background */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
    overflow: hidden;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    opacity: 0.08;
    color: var(--accent-primary);
    filter: blur(1px);
}

.floating-icon svg {
    width: 100%;
    height: 100%;
}

/* Individual icon positions and animations - evenly distributed */
/* Row 1: Top area (0-25%) */
.floating-icon--1 {
    width: 100px;
    height: 100px;
    top: 5%;
    left: 3%;
    color: var(--accent-primary);
    animation: float-rotate-1 25s ease-in-out infinite;
}

.floating-icon--7 {
    width: 70px;
    height: 70px;
    top: 8%;
    left: 35%;
    color: var(--accent-primary);
    animation: float-rotate-1 19s ease-in-out infinite;
}

.floating-icon--10 {
    width: 85px;
    height: 85px;
    top: 3%;
    left: 70%;
    color: var(--accent-primary);
    animation: float-rotate-1 23s ease-in-out infinite reverse;
}

/* Row 2: Upper-middle area (25-45%) */
.floating-icon--2 {
    width: 80px;
    height: 80px;
    top: 28%;
    left: 8%;
    color: var(--accent-secondary);
    animation: float-rotate-2 20s ease-in-out infinite;
}

.floating-icon--3 {
    width: 90px;
    height: 90px;
    top: 32%;
    left: 45%;
    color: var(--accent-tertiary);
    animation: float-rotate-3 22s ease-in-out infinite;
}

.floating-icon--6 {
    width: 95px;
    height: 95px;
    top: 25%;
    right: 5%;
    color: var(--accent-tertiary);
    animation: float-rotate-3 24s ease-in-out infinite reverse;
}

/* Row 3: Middle area (45-65%) */
.floating-icon--4 {
    width: 75px;
    height: 75px;
    top: 55%;
    left: 2%;
    color: var(--accent-primary);
    animation: float-rotate-1 28s ease-in-out infinite reverse;
}

.floating-icon--8 {
    width: 85px;
    height: 85px;
    top: 52%;
    left: 30%;
    color: var(--accent-secondary);
    animation: float-rotate-2 26s ease-in-out infinite reverse;
}

.floating-icon--9 {
    width: 70px;
    height: 70px;
    top: 58%;
    right: 25%;
    color: var(--accent-tertiary);
    animation: float-rotate-3 21s ease-in-out infinite;
}

/* Row 4: Bottom area (70-95%) */
.floating-icon--11 {
    width: 65px;
    height: 65px;
    top: 78%;
    left: 15%;
    color: var(--accent-secondary);
    animation: float-rotate-2 17s ease-in-out infinite;
}

.floating-icon--5 {
    width: 80px;
    height: 80px;
    top: 82%;
    left: 50%;
    color: var(--accent-secondary);
    animation: float-rotate-2 18s ease-in-out infinite;
}

.floating-icon--12 {
    width: 90px;
    height: 90px;
    top: 75%;
    right: 8%;
    color: var(--accent-tertiary);
    animation: float-rotate-3 27s ease-in-out infinite reverse;
}

/* Float and Rotate Animations */
@keyframes float-rotate-1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(30px, -40px) rotate(10deg) scale(1.05);
    }
    50% {
        transform: translate(-20px, -80px) rotate(-5deg) scale(0.95);
    }
    75% {
        transform: translate(40px, -30px) rotate(15deg) scale(1.02);
    }
}

@keyframes float-rotate-2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(-40px, 30px) rotate(-12deg) scale(1.08);
    }
    50% {
        transform: translate(30px, 60px) rotate(8deg) scale(0.92);
    }
    75% {
        transform: translate(-20px, 20px) rotate(-5deg) scale(1.04);
    }
}

@keyframes float-rotate-3 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(50px, -50px) rotate(15deg) scale(1.1);
    }
    66% {
        transform: translate(-30px, 40px) rotate(-10deg) scale(0.9);
    }
}

/* Subtle glow effect on icons */
.floating-icon--glow {
    filter: blur(0.5px) drop-shadow(0 0 20px currentColor);
    opacity: 0.12;
}

/* Gradient Text Animation */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 200% center;
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Fade In 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 Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease forwards;
}

/* Staggered Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Integration diagram animations */
@keyframes dash-flow {
    to {
        stroke-dashoffset: -20;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.4), 0 0 80px rgba(99, 102, 241, 0.15);
    }
    50% {
        box-shadow: 0 0 50px rgba(99, 102, 241, 0.5), 0 0 100px rgba(99, 102, 241, 0.25);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-icon {
        animation: none;
    }
}
