/* Ocellus Landing Page - Animations & Micro-interactions */

/* Keyframes */
@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 float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Entrance Animations */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

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

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

/* Staggered animations */
.animate-stagger-1 {
    animation-delay: 0.1s;
    opacity: 0;
}

.animate-stagger-2 {
    animation-delay: 0.2s;
    opacity: 0;
}

.animate-stagger-3 {
    animation-delay: 0.3s;
    opacity: 0;
}

.animate-stagger-4 {
    animation-delay: 0.4s;
    opacity: 0;
}

.animate-stagger-5 {
    animation-delay: 0.5s;
    opacity: 0;
}

.animate-stagger-6 {
    animation-delay: 0.6s;
    opacity: 0;
}

/* Continuous Animations */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.hover-glow {
    position: relative;
    transition: all 0.3s ease;
}

.hover-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hover-glow:hover::before {
    opacity: 1;
}

/* Button Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Loading Shimmer */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Navbar Animation */
.navbar {
    animation: slideInFromTop 0.8s ease-out;
}

/* Hero Section Animations */
.hero-title {
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-cta {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-stats {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.dashboard-preview {
    animation: fadeInRight 1.2s ease-out 0.8s both;
}

/* Feature Cards Hover */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s ease;
}

.feature-card:hover::before {
    left: 100%;
}

/* Tool Card Animations */
.tool-card {
    transform: translateX(-20px);
    opacity: 0;
    animation: fadeInRight 0.6s ease-out forwards;
}

.tool-card:nth-child(1) {
    animation-delay: 0.1s;
}

.tool-card:nth-child(2) {
    animation-delay: 0.2s;
}

.tool-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Status Indicator Animation */
.tool-status {
    position: relative;
}

.status-verified::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2s ease-in-out infinite;
    opacity: 0.6;
}

/* Section Reveal Animation */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Icon Hover Effects */
.feature-icon {
    position: relative;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Badge Animations */
.badge {
    transition: all 0.3s ease;
    position: relative;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.badge:hover::after {
    opacity: 1;
}

/* Text Gradient Animation */
.gradient-text {
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Focus States */
.btn:focus,
.nav-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

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

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hover-lift:hover {
        transform: none;
    }
    
    .feature-card:hover .feature-icon {
        transform: scale(1.05);
    }
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Loading State */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}