/* 
 * Catalyst Accounting - Animation Stylesheet
 * Enhanced animations for hero section and background effects
 */

/* Hero Background with Gradient Overlay */
.hero {
    /* Background image with gradient overlay */
    background-image: 
        /* linear-gradient(rgba(15, 42, 68, 0.85), rgba(15, 42, 68, 0.85)),
        url("../images/hero-finance-bg.png"); */
    linear-gradient(rgba(15, 42, 68, 0.85), rgba(15, 42, 68, 0.85));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Floating Financial Elements Container */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Individual Floating Elements */
.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation-duration: 15s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    pointer-events: none;
}

/* Different types of floating elements */
.floating-element[data-element-type="0"] {
    /* Calculator icon style */
    background: rgba(44, 99, 255, 0.15);
    box-shadow: 0 0 20px rgba(44, 99, 255, 0.3);
}

.floating-element[data-element-type="1"] {
    /* Chart/graph style */
    background: rgba(255, 193, 7, 0.15);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
    border-radius: 10px;
}

.floating-element[data-element-type="2"] {
    /* Dollar sign style */
    background: rgba(40, 167, 69, 0.15);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

.floating-element[data-element-type="3"] {
    /* Shield/security style */
    background: rgba(220, 53, 69, 0.15);
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.3);
    border-radius: 5px;
}

/* Floating Animation Keyframes */
@keyframes float1 {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg); 
        opacity: 0.7;
    }
    25% { 
        transform: translate(30px, -40px) rotate(90deg); 
        opacity: 1;
    }
    50% { 
        transform: translate(60px, 20px) rotate(180deg); 
        opacity: 0.7;
    }
    75% { 
        transform: translate(-20px, 50px) rotate(270deg); 
        opacity: 1;
    }
}

@keyframes float2 {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
    }
    33% { 
        transform: translate(-40px, -30px) scale(1.2); 
    }
    66% { 
        transform: translate(50px, 40px) scale(0.8); 
    }
}

@keyframes float3 {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg); 
    }
    50% { 
        transform: translate(-60px, 30px) rotate(180deg); 
    }
}

@keyframes float4 {
    0% { 
        transform: translate(0, 0) rotate(0deg); 
    }
    100% { 
        transform: translate(80px, -50px) rotate(360deg); 
    }
}

/* Assign different animations to elements */
.floating-element:nth-child(1) { animation-name: float1; animation-duration: 20s; top: 20%; left: 10%; width: 40px; height: 40px; }
.floating-element:nth-child(2) { animation-name: float2; animation-duration: 25s; top: 60%; left: 80%; width: 60px; height: 60px; animation-delay: 2s; }
.floating-element:nth-child(3) { animation-name: float3; animation-duration: 18s; top: 80%; left: 20%; width: 30px; height: 30px; animation-delay: 1s; }
.floating-element:nth-child(4) { animation-name: float4; animation-duration: 30s; top: 30%; left: 70%; width: 50px; height: 50px; animation-delay: 3s; }
.floating-element:nth-child(5) { animation-name: float1; animation-duration: 22s; top: 70%; left: 40%; width: 35px; height: 35px; animation-delay: 4s; }
.floating-element:nth-child(6) { animation-name: float2; animation-duration: 28s; top: 40%; left: 30%; width: 45px; height: 45px; animation-delay: 1.5s; }
.floating-element:nth-child(7) { animation-name: float3; animation-duration: 19s; top: 10%; left: 60%; width: 55px; height: 55px; animation-delay: 2.5s; }
.floating-element:nth-child(8) { animation-name: float4; animation-duration: 32s; top: 50%; left: 90%; width: 40px; height: 40px; animation-delay: 5s; }

/* Gradient Overlay for Depth */
.gradient-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, 
        rgba(15, 42, 68, 0.4) 0%, 
        rgba(28, 53, 94, 0.6) 50%, 
        rgba(44, 99, 255, 0.2) 100%);
    z-index: 0;
    pointer-events: none;
}

/* Particle Canvas Styling */
.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Hero Content Animations */
.hero-content {
    animation: fadeInUp 1.5s ease-out 0.5s both;
}

.hero h1 {
    animation: fadeInUp 1s ease-out 0.8s both;
}

.hero p {
    animation: fadeInUp 1s ease-out 1s both;
}

.hero .btn {
    animation: fadeInUp 1s ease-out 1.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Card Hover Animations */
.card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .bg-grid,
    .floating-element,
    .hero-content,
    .hero h1,
    .hero p,
    .hero .btn,
    .card {
        animation: none !important;
        transition: none !important;
    }
    
    .btn::after {
        display: none;
    }
}

/* Pulse Animation for Call-to-Action */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(44, 99, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(44, 99, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(44, 99, 255, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Typewriter Effect for Hero Title */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    margin: 0 auto;
    animation:
        typing 3.5s steps(40, end);
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

/* @keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #2c63ff }
} */

/* Mobile adjustments for typewriter */
@media (max-width: 767px) {
    .typewriter {
        white-space: normal;
        overflow: visible;
        animation: none;
        width: auto;
    }
}