/**
 * Animations - Animaciones estilo Apple con fluidez y elegancia
 */

/* Apple-style Easing Functions */
:root {
    --apple-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --apple-ease-in: cubic-bezier(0.5, 0, 0.875, 0.25);
    --apple-ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);
    --apple-ease-in-out: cubic-bezier(0.86, 0, 0.07, 1);
    --apple-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Liquid Glass Effects */
.glass-morphism {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-dark {
    background: rgba(29, 29, 31, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Floating Elements with Apple-style Physics */
@keyframes appleFloat {
    0% {
        transform: translateY(0px) scale(1);
        filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
    }
    50% {
        transform: translateY(-12px) scale(1.02);
        filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.15));
    }
    100% {
        transform: translateY(0px) scale(1);
        filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
    }
}

@keyframes liquidPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes magneticHover {
    0% {
        transform: translateY(0) scale(1);
        filter: blur(0px) brightness(1);
    }
    100% {
        transform: translateY(-8px) scale(1.05);
        filter: blur(0.5px) brightness(1.1);
    }
}

/* Apple-style Reveal Animations */
@keyframes appleReveal {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(10px);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.02);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0px);
    }
}

@keyframes appleSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-100px) scale(0.8);
        filter: blur(8px);
    }
    70% {
        opacity: 0.9;
        transform: translateX(10px) scale(1.05);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0px);
    }
}

/* Shimmer Effect for Premium Feel */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.shimmer-effect {
    background: linear-gradient(90deg, 
        transparent 25%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 75%);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

/* Keyframe Animations */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-80px) scale(0.9);
        filter: blur(8px);
    }
    70% {
        opacity: 0.8;
        transform: translateX(10px) scale(1.02);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(80px) scale(0.9);
        filter: blur(8px);
    }
    70% {
        opacity: 0.8;
        transform: translateX(-10px) scale(1.02);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        filter: blur(6px);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-8px) scale(1.02);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes logoAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

@keyframes iconAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

@keyframes accentGlow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

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

/* About Page Animations */
@keyframes aboutTitleReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

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

@keyframes teamCardAppear {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes linkedInPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes dashboardFloat {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg) rotateY(0deg);
        filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.08));
    }
    33% {
        transform: translateY(-8px) rotateX(1deg) rotateY(-0.5deg);
        filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.12));
    }
    66% {
        transform: translateY(-4px) rotateX(-0.5deg) rotateY(1deg);
        filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.1));
    }
}

@keyframes metricsFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
        filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.08));
    }
    50% {
        transform: translateY(-6px) scale(1.01);
        filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.12));
    }
}

@keyframes imageFloat {
    0%, 100% {
        transform: translateY(0px) scale(1) rotate(0deg);
        filter: drop-shadow(0 20px 40px rgba(255, 107, 53, 0.15));
    }
    33% {
        transform: translateY(-12px) scale(1.02) rotate(-0.5deg);
        filter: drop-shadow(0 28px 56px rgba(255, 107, 53, 0.2));
    }
    66% {
        transform: translateY(-6px) scale(1.01) rotate(0.3deg);
        filter: drop-shadow(0 24px 48px rgba(255, 107, 53, 0.18));
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(12deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-16px) rotate(12deg);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.4));
    }
    100% {
        filter: drop-shadow(0 8px 24px rgba(255, 215, 0, 0.6));
    }
}

/* Apple-style Micro-interactions */
@keyframes buttonPress {\n    0% { transform: scale(1); }\n    50% { transform: scale(0.98); }\n    100% { transform: scale(1); }\n}\n\n@keyframes cardMagnetism {\n    0% { transform: translateY(0) scale(1); }\n    100% { transform: translateY(-12px) scale(1.03); }\n}\n\n@keyframes liquidRipple {\n    0% {\n        transform: scale(0);\n        opacity: 1;\n    }\n    100% {\n        transform: scale(4);\n        opacity: 0;\n    }\n}\n\n/* Glass Morphism Variations */\n.glass-card {\n    background: linear-gradient(135deg, \n        rgba(255, 255, 255, 0.1) 0%, \n        rgba(255, 255, 255, 0.05) 100%);\n    backdrop-filter: blur(20px) saturate(180%);\n    -webkit-backdrop-filter: blur(20px) saturate(180%);\n    border: 1px solid rgba(255, 255, 255, 0.2);\n    box-shadow: \n        0 8px 32px rgba(0, 0, 0, 0.1),\n        inset 0 1px 0 rgba(255, 255, 255, 0.3);\n}\n\n.glass-button {\n    background: rgba(255, 255, 255, 0.15);\n    backdrop-filter: blur(10px) saturate(180%);\n    -webkit-backdrop-filter: blur(10px) saturate(180%);\n    border: 1px solid rgba(255, 255, 255, 0.2);\n    transition: all 0.3s var(--apple-ease-out);\n}\n\n.glass-button:hover {\n    background: rgba(255, 255, 255, 0.25);\n    transform: translateY(-2px) scale(1.02);\n    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);\n}\n\n/* Visual Element Animations */\n.dashboard-svg {\n    max-width: 100%;\n    height: auto;\n    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.08));\n    animation: dashboardFloat 12s var(--apple-ease-in-out) infinite;\n    transform-style: preserve-3d;\n    transition: all 0.3s var(--apple-ease-out);\n}\n\n.dashboard-svg:hover {\n    animation-play-state: paused;\n    transform: translateY(-8px) scale(1.02);\n    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));\n}

.metrics-svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.08));
    animation: metricsFloat 8s var(--apple-ease-in-out) infinite;
    transition: all 0.4s var(--apple-ease-out);
}

.metrics-svg:hover {
    animation-play-state: paused;
    transform: translateY(-6px) scale(1.02);
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.12));
}

.integration-image {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    filter: drop-shadow(0 20px 40px rgba(255, 107, 53, 0.15));
    animation: imageFloat 10s var(--apple-ease-in-out) infinite;
    transition: all 0.6s var(--apple-spring);
    position: relative;
    overflow: hidden;
}

.integration-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: left 0.6s var(--apple-ease-out);
    opacity: 0;
}

.integration-image:hover {
    animation-play-state: paused;
    transform: translateY(-8px) scale(1.05) rotate(-1deg);
    filter: drop-shadow(0 32px 64px rgba(255, 107, 53, 0.25));
}

.integration-image:hover::before {
    left: 100%;
    opacity: 1;
}

.feature-img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.6s var(--apple-spring);
    position: relative;
    overflow: hidden;
}

.feature-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s var(--apple-ease-out);
}

.feature-img:hover {
    transform: translateY(-12px) scale(1.03) rotate(-0.5deg);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.25);
}

.feature-img:hover::after {
    opacity: 1;
}

/* Power Pitch Animations */
.pitch-text {
    opacity: 0;
    animation: pitchReveal 1.2s ease 0.3s forwards;
}

.pitch-accent::after {
    animation: accentGlow 3s ease-in-out infinite;
}

/* Footer Animations */
.footer-pitch {
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.footer-cta-btn {
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

.footer-logo-image {
    opacity: 0;
    animation: fadeInUp 1s ease 0.1s forwards;
}

.floating-element {
    font-size: 6rem;
    color: #FFD700;
    animation: appleFloat 6s var(--apple-ease-in-out) infinite, 
               liquidPulse 3s var(--apple-ease-in-out) infinite alternate;
    transform: rotate(12deg);
    filter: drop-shadow(0 8px 24px rgba(255, 215, 0, 0.4));
    opacity: 0;
    animation-delay: 1s;
    animation-fill-mode: forwards;
    transition: all 0.4s var(--apple-spring);
    backdrop-filter: blur(2px);
}

.floating-element:hover {
    animation-play-state: paused;
    transform: rotate(18deg) scale(1.1);
    filter: drop-shadow(0 16px 32px rgba(255, 215, 0, 0.6));
}

/* Apple-style Staggered Animations */
.stagger-delay-1 { animation-delay: 0.1s; }
.stagger-delay-2 { animation-delay: 0.2s; }
.stagger-delay-3 { animation-delay: 0.3s; }
.stagger-delay-4 { animation-delay: 0.4s; }
.stagger-delay-5 { animation-delay: 0.5s; }
.stagger-delay-6 { animation-delay: 0.6s; }

/* Sophisticated Parallax */
.parallax-element {
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

/* Advanced Liquid Glass Effects */
.glass-nav {
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s var(--apple-ease-out);
}

.glass-nav:hover {
    background: rgba(250, 250, 250, 0.9);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    box-shadow: 0 1px 24px rgba(0, 0, 0, 0.06);
}

.glass-hero-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.6s var(--apple-spring);
}

.glass-hero-card:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.12) 100%);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    transform: translateY(-2px) scale(1.005);
    box-shadow: 
        0 12px 36px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.15);
}

/* Subtle Liquid Glass Transitions - Apple Style */
@keyframes subtleGlassShimmer {
    0%, 100% {
        background-position: -200% center;
        opacity: 0;
    }
    50% {
        background-position: 200% center;
        opacity: 0.1;
    }
}

/* Subtle Liquid Glass Effects - Apple Style */
.liquid-glass-element {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s var(--apple-ease-out);
    position: relative;
    overflow: hidden;
}

.liquid-glass-element::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    transition: left 0.6s var(--apple-ease-out);
    pointer-events: none;
    opacity: 0;
}

.liquid-glass-element:hover::before {
    left: 100%;
    opacity: 1;
}

.liquid-glass-element:hover {
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
