/* Modern Logo Animations - Faster and More Fluid */
@keyframes logoRotate {
    0% { 
        transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg); 
    }
    100% { 
        transform: rotateY(720deg) rotateX(360deg) rotateZ(180deg); 
    }
}

@keyframes ringPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

@keyframes pointGlow {
    0%, 100% { 
        opacity: 0.4;
        transform: scale(0.8);
    }
    50% { 
        opacity: 1;
        transform: scale(1.4);
    }
}

@keyframes pointOrbit {
    0% { 
        transform: rotate(0deg) translateX(40px) rotate(0deg);
    }
    100% { 
        transform: rotate(360deg) translateX(40px) rotate(-360deg);
    }
}

@keyframes pointRipple {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes morphToLabels {
    0% { 
        transform: scale(1) rotateY(0deg) rotateZ(0deg); 
    }
    25% { 
        transform: scale(1.3) rotateY(90deg) rotateZ(45deg); 
    }
    50% { 
        transform: scale(1.1) rotateY(180deg) rotateZ(90deg); 
    }
    75% { 
        transform: scale(1.4) rotateY(270deg) rotateZ(135deg); 
    }
    100% { 
        transform: scale(1) rotateY(360deg) rotateZ(180deg); 
    }
}

@keyframes morphToBoundingBoxes {
    0% { 
        transform: scale(1) rotateX(0deg) rotateY(0deg); 
    }
    25% { 
        transform: scale(1.2) rotateX(90deg) rotateY(45deg); 
    }
    50% { 
        transform: scale(1.3) rotateX(180deg) rotateY(90deg); 
    }
    75% { 
        transform: scale(1.1) rotateX(270deg) rotateY(135deg); 
    }
    100% { 
        transform: scale(1) rotateX(360deg) rotateY(180deg); 
    }
}

@keyframes morphToSegmentation {
    0% { 
        transform: scale(1) rotateZ(0deg) rotateX(0deg); 
    }
    25% { 
        transform: scale(1.4) rotateZ(90deg) rotateX(45deg); 
    }
    50% { 
        transform: scale(1.2) rotateZ(180deg) rotateX(90deg); 
    }
    75% { 
        transform: scale(1.5) rotateZ(270deg) rotateX(135deg); 
    }
    100% { 
        transform: scale(1) rotateZ(360deg) rotateX(180deg); 
    }
}

/* Floating Elements */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(10deg); 
    }
}

@keyframes floatReverse {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(20px) rotate(-10deg); 
    }
}

/* Fade In Animations */
@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);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotation Animations */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    }
}

/* Apply animations to elements */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

.rotate-in {
    animation: rotateIn 0.8s ease-out;
}

/* 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.2);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    animation: glow 2s ease-in-out infinite;
}

/* Loading animations */
.loading-shimmer {
    background: linear-gradient(90deg, 
        var(--light-gray) 25%, 
        var(--medium-gray) 50%, 
        var(--light-gray) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Stagger animations for lists */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }

/* Parallax animations */
.parallax-slow {
    transform: translateY(var(--parallax-offset, 0));
    transition: transform 0.1s ease-out;
}

.parallax-fast {
    transform: translateY(calc(var(--parallax-offset, 0) * 0.5));
    transition: transform 0.1s ease-out;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .logo-core,
    .logo-ring,
    .data-point,
    .fade-in-up,
    .fade-in-left,
    .fade-in-right,
    .scale-in,
    .rotate-in,
    .hover-lift,
    .hover-glow,
    .loading-shimmer {
        animation: none;
        transition: none;
    }
    
    .stagger-item {
        opacity: 1;
        transform: none;
        animation: none;
    }
}