/* ============================================
   Ambient Visual Effects
   - Floating gradient orbs (CSS-only, hero + CTA)
   - Floating blobs (CSS-only, all pages)
   - Cursor glow (hero section)
   ============================================ */

/* -------------------------------------------
   1. Floating Gradient Orbs
   ------------------------------------------- */

.ambient-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    will-change: transform;
    pointer-events: none;
}

/* Hero orbs */
.orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(74, 144, 255, 0.6);
    top: -10%;
    left: -5%;
    animation: orb-float-1 22s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.7);
    top: 20%;
    right: -8%;
    animation: orb-float-2 18s ease-in-out infinite;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: rgba(30, 86, 204, 0.8);
    bottom: -15%;
    left: 30%;
    animation: orb-float-3 28s ease-in-out infinite;
}

/* CTA orbs - slightly different positioning */
.ambient-orbs-cta .orb-1 {
    width: 450px;
    height: 450px;
    top: -20%;
    left: -10%;
    animation: orb-float-1 24s ease-in-out infinite;
}

.ambient-orbs-cta .orb-2 {
    width: 400px;
    height: 400px;
    top: 10%;
    right: -12%;
    animation: orb-float-2 20s ease-in-out infinite;
}

@keyframes orb-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, 30px) scale(1.05); }
    66% { transform: translate(-20px, -15px) scale(0.95); }
}

@keyframes orb-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 20px) scale(0.95); }
    66% { transform: translate(25px, -25px) scale(1.05); }
}

@keyframes orb-float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.03); }
    50% { transform: translate(-15px, 25px) scale(0.97); }
    75% { transform: translate(-30px, -10px) scale(1.02); }
}

/* -------------------------------------------
   2. Floating Blobs (all pages)
   ------------------------------------------- */

/* White background on html so blobs at z-index:-1 are visible
   through sections with transparent (inherited) backgrounds */
html {
    background-color: var(--color-bg-white);
}

body {
    background-color: transparent;
}

#ambient-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: rgba(36, 107, 253, 0.07);
    filter: blur(100px);
    top: 10%;
    left: -5%;
    animation: blob-drift-1 28s ease-in-out infinite;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: rgba(74, 144, 255, 0.06);
    filter: blur(90px);
    top: 30%;
    right: -8%;
    animation: blob-drift-2 24s ease-in-out infinite;
}

.blob-3 {
    width: 600px;
    height: 600px;
    background: rgba(30, 86, 204, 0.08);
    filter: blur(120px);
    top: 50%;
    left: 20%;
    animation: blob-drift-3 32s ease-in-out infinite;
}

.blob-4 {
    width: 350px;
    height: 350px;
    background: rgba(36, 107, 253, 0.06);
    filter: blur(80px);
    top: 15%;
    right: 25%;
    animation: blob-drift-4 22s ease-in-out infinite;
}

.blob-5 {
    width: 450px;
    height: 450px;
    background: rgba(74, 144, 255, 0.09);
    filter: blur(110px);
    bottom: 5%;
    left: 40%;
    animation: blob-drift-5 35s ease-in-out infinite;
}

@keyframes blob-drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, 40px) scale(1.05); }
    50% { transform: translate(-30px, 80px) scale(0.95); }
    75% { transform: translate(40px, -20px) scale(1.02); }
}

@keyframes blob-drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    30% { transform: translate(-50px, 60px) scale(0.96); }
    60% { transform: translate(30px, -40px) scale(1.04); }
}

@keyframes blob-drift-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(40px, -50px) scale(1.03); }
    45% { transform: translate(-60px, 30px) scale(0.97); }
    70% { transform: translate(20px, 60px) scale(1.01); }
}

@keyframes blob-drift-4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    35% { transform: translate(-40px, -30px) scale(1.06); }
    65% { transform: translate(50px, 40px) scale(0.94); }
}

@keyframes blob-drift-5 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-50px, -40px) scale(0.97); }
    50% { transform: translate(60px, 20px) scale(1.04); }
    75% { transform: translate(-20px, 50px) scale(0.98); }
}

/* -------------------------------------------
   3. Cursor Glow
   ------------------------------------------- */

.cursor-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    transform: translate(-50%, -50%);
    will-change: left, top;
}

.cursor-glow.active {
    opacity: 1;
}

/* -------------------------------------------
   4. Section overrides for effect layers
   ------------------------------------------- */

/* Hero needs relative positioning for orbs + glow */
.hero {
    position: relative;
}

/* Final CTA needs relative + overflow hidden for orbs */
.final-cta {
    position: relative;
    overflow: hidden;
}

/* -------------------------------------------
   5. Responsive
   ------------------------------------------- */

@media (max-width: 767px) {
    /* Smaller orbs on mobile */
    .orb-1 {
        width: 300px;
        height: 300px;
    }

    .orb-2 {
        width: 250px;
        height: 250px;
    }

    /* Hide third orb on mobile */
    .orb-3 {
        display: none;
    }

    /* Reduce blur on mobile */
    .orb {
        filter: blur(60px);
    }

    /* Hide blobs on mobile */
    #ambient-blobs {
        display: none;
    }

    /* Hide cursor glow on mobile */
    .cursor-glow {
        display: none;
    }

    /* CTA orbs smaller too */
    .ambient-orbs-cta .orb-1 {
        width: 280px;
        height: 280px;
    }

    .ambient-orbs-cta .orb-2 {
        width: 220px;
        height: 220px;
    }
}

/* -------------------------------------------
   6. Reduced Motion
   ------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .orb {
        animation: none !important;
    }

    .blob {
        animation: none !important;
    }

    #ambient-blobs {
        display: none;
    }

    .cursor-glow {
        display: none;
    }
}
