/* ===================================
   ANIMATIONS FOR LANDING PAGE
   =================================== */

/* Parallax Background Layers */
.parallax-container {
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

.parallax-layer {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.parallax-layer-slow {
    animation: none;
    transform-origin: center;
}

.parallax-layer-medium {
    animation: none;
    transform-origin: center;
}

.parallax-layer-fast {
    animation: none;
    transform-origin: center;
}

/* Grid animation fallback */
@keyframes grid-float {
    0% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-20px) translateX(10px);
    }
    100% {
        transform: translateY(0px) translateX(0px);
    }
}

/* Fade In & Slide Up on Scroll */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(1, 168, 106, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(1, 168, 106, 0);
    }
}

/* Apply animations via class */
.fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

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

.slide-down {
    animation: slide-down 0.8s ease-out forwards;
}

.slide-in-left {
    animation: slide-in-left 0.8s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-glow-pulse {
    animation: glow-pulse 2s infinite;
}

/* Stagger delays for multiple elements */
.fade-in-up:nth-child(1) { animation-delay: 0s; }
.fade-in-up:nth-child(2) { animation-delay: 0.1s; }
.fade-in-up:nth-child(3) { animation-delay: 0.2s; }
.fade-in-up:nth-child(4) { animation-delay: 0.3s; }
.fade-in-up:nth-child(5) { animation-delay: 0.4s; }

/* Glass Panel Effects */
.glass-panel {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Professional animated background for hero - PARALLAX EFFECT */
.hero-bg-animated {
    position: relative;
    background-color: #f4f8ff;
    overflow: hidden;
}

/* Animated diagonal lines - layer 1 */
.hero-bg-animated::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(1, 168, 106, 0.03) 2px,
        rgba(1, 168, 106, 0.03) 80px
    );
    pointer-events: none;
    z-index: 1;
}

/* Animated diagonal lines - layer 2 */
.hero-bg-animated::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 2px,
        rgba(0, 87, 184, 0.03) 2px,
        rgba(0, 87, 184, 0.03) 80px
    );
    pointer-events: none;
    z-index: 0;
}

/* Hero grid overlay - animated with anime.js */
.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 59px,
            rgba(1, 168, 106, 0.5) 59px,
            rgba(1, 168, 106, 0.5) 60px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 59px,
            rgba(0, 87, 184, 0.5) 59px,
            rgba(0, 87, 184, 0.5) 60px
        );
    background-size: 60px 60px;
    pointer-events: none;
    opacity: 1;
    z-index: 2;
    will-change: transform;
}

/* Mesh background pattern (original) */
.bg-mesh {
    background-color: #f4f8ff;
    background-image:
        radial-gradient(at 0% 0%, rgba(1, 168, 106, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(0, 87, 184, 0.14) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(1, 168, 106, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(0, 87, 184, 0.10) 0px, transparent 50%);
}

.hover-lift {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button hover scales */
.btn-scale {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-scale:hover {
    transform: scale(1.05);
}

.btn-scale:active {
    transform: scale(0.95);
}

/* Hover text color transition */
.text-hover {
    transition: color 0.3s ease;
}

.text-hover:hover {
    color: #01A86A;
}

/* Connection orb glow */
.connection-orb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, #4dd9a4 0%, #01A86A 100%);
    box-shadow: 0 0 10px rgba(1, 168, 106, 0.6);
    animation: glow-pulse 2s infinite;
}

/* Brand Solid Colors (No Gradients) */
.brand-gradient {
    background: #01A86A;
}

.teal-gradient {
    background: #01A86A;
}

.blue-gradient {
    background: #0057B8;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .animate-float {
        animation: float 4s ease-in-out infinite;
    }
    
    .fade-in-up {
        animation: fade-in-up 0.6s ease-out forwards;
    }
}

/* Smooth transitions for all interactive elements */
button, a, [role="button"] {
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
a:focus, button:focus, [role="button"]:focus {
    outline: 2px solid #01A86A;
    outline-offset: 2px;
}

/* Link underline effect */
.link-underline {
    position: relative;
    text-decoration: none;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #01A86A;
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}