/* ================================================================
   ADVERTEKS PREMIUM ANIMATIONS
   v2 — Particles, Parallax, Glow, Ripple, Stagger
   ================================================================ */

/* ----------------------------------------------------------------
   PARTICLES CANVAS (full-page background)
   ---------------------------------------------------------------- */
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* ----------------------------------------------------------------
   GEOFENCING / GLOBAL NETWORK SECTION — Canvas 3D Globe
   ---------------------------------------------------------------- */
.geo-map-section {
    position: relative;
    overflow: hidden;
    background: #030610 !important;
}

/* Canvas globe container pulse */
.geo-map-container {
    animation: geoMapGlow 5s ease-in-out infinite alternate !important;
}

@keyframes geoMapGlow {
    from { box-shadow: 0 0 40px rgba(0, 180, 216, 0.06); }
    to   { box-shadow: 0 0 100px rgba(0, 229, 255, 0.14), 0 0 160px rgba(255, 60, 172, 0.06); }
}

/* ----------------------------------------------------------------
   BUTTON MICRO-INTERACTIONS
   ---------------------------------------------------------------- */

/* Scope to clear button classes — don't touch nav/text links */
[class*="btn-hero"],
[class*="btn-sol"],
[class*="btn-investor"],
.btn-primary,
.btn-secondary,
.btn-nav-getstarted,
.btn-signup {
    position: relative;
    overflow: hidden;
    transition:
        transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.22s ease !important;
}

[class*="btn-hero"]:hover,
[class*="btn-sol"]:hover,
.btn-primary:hover,
.btn-nav-getstarted:hover,
.btn-signup:hover {
    transform: scale(1.04) !important;
    box-shadow:
        0 0 18px rgba(99, 102, 241, 0.55),
        0 0 40px rgba(99, 102, 241, 0.22),
        0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

[class*="btn-hero"]:active,
[class*="btn-sol"]:active,
.btn-primary:active {
    transform: scale(0.98) !important;
    transition-duration: 0.08s !important;
}

.btn-hero-outline:hover,
.btn-secondary:hover,
.btn-sol-adv:hover {
    transform: scale(1.03) !important;
    box-shadow:
        0 0 14px rgba(96, 165, 250, 0.4),
        0 0 32px rgba(96, 165, 250, 0.16) !important;
}

/* Click ripple wave */
.ripple-wave {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: rippleAnim 0.55s linear forwards;
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4.5);
        opacity: 0;
    }
}

/* Glassmorphism card border glow on hover */
.geo-card:hover,
.rtb-card:hover,
.security-card:hover {
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.35),
        0 16px 40px rgba(0, 0, 0, 0.35),
        0 0 28px rgba(99, 102, 241, 0.1) !important;
}

/* ----------------------------------------------------------------
   ENHANCED STAGGER DELAYS — grid cards
   ---------------------------------------------------------------- */
.geo-grid .geo-card:nth-child(1) { transition-delay: 0s; }
.geo-grid .geo-card:nth-child(2) { transition-delay: 0.1s; }
.geo-grid .geo-card:nth-child(3) { transition-delay: 0.2s; }
.geo-grid .geo-card:nth-child(4) { transition-delay: 0.3s; }

.rtb-grid .rtb-card:nth-child(1) { transition-delay: 0s; }
.rtb-grid .rtb-card:nth-child(2) { transition-delay: 0.1s; }
.rtb-grid .rtb-card:nth-child(3) { transition-delay: 0.2s; }
.rtb-grid .rtb-card:nth-child(4) { transition-delay: 0.3s; }
.rtb-grid .rtb-card:nth-child(5) { transition-delay: 0.4s; }
.rtb-grid .rtb-card:nth-child(6) { transition-delay: 0.5s; }

.security-grid .security-card:nth-child(1) { transition-delay: 0s; }
.security-grid .security-card:nth-child(2) { transition-delay: 0.09s; }
.security-grid .security-card:nth-child(3) { transition-delay: 0.18s; }
.security-grid .security-card:nth-child(4) { transition-delay: 0.27s; }
.security-grid .security-card:nth-child(5) { transition-delay: 0.36s; }
.security-grid .security-card:nth-child(6) { transition-delay: 0.45s; }

.features-grid .feature-item:nth-child(1) { transition-delay: 0s; }
.features-grid .feature-item:nth-child(2) { transition-delay: 0.08s; }
.features-grid .feature-item:nth-child(3) { transition-delay: 0.16s; }
.features-grid .feature-item:nth-child(4) { transition-delay: 0.24s; }
.features-grid .feature-item:nth-child(5) { transition-delay: 0.32s; }
.features-grid .feature-item:nth-child(6) { transition-delay: 0.40s; }

/* ----------------------------------------------------------------
   PARALLAX SECTION DEPTH
   ---------------------------------------------------------------- */
.geo-map-section,
.rtb-section,
.solutions-section {
    transform: translateZ(0);   /* GPU layer */
}

/* Stats bar subtle glow pulse */
.geo-stats-bar {
    animation: statsBarPulse 5s ease-in-out infinite alternate !important;
}

@keyframes statsBarPulse {
    from { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
    to   { box-shadow: 0 0 24px rgba(99, 102, 241, 0.12); }
}

/* ----------------------------------------------------------------
   SECTION FADE-IN SLIDE — hero section entrance
   ---------------------------------------------------------------- */
.hero-badge,
.hero-title,
.hero-subtitle,
.hero-actions,
.hero-trust-bar,
.hero-stats-row {
    opacity: 0;
    transform: translateY(18px);
    animation: heroEnter 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-badge      { animation-delay: 0.1s; }
.hero-title      { animation-delay: 0.22s; }
.hero-subtitle   { animation-delay: 0.34s; }
.hero-actions    { animation-delay: 0.44s; }
.hero-trust-bar  { animation-delay: 0.56s; }
.hero-stats-row  { animation-delay: 0.66s; }

@keyframes heroEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------------------------------
   prefers-reduced-motion — kill everything animated
   ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    #particles-bg               { display: none !important; }
    .geo-dark-overlay           { animation: none !important; }
    .geo-bg-parallax            { inset: 0 !important; animation: none !important; }
    .geo-map-container          { animation: none !important; }
    .geo-stats-bar              { animation: none !important; }
    .ripple-wave                { animation: none !important; }

    [class*="btn-hero"],
    [class*="btn-sol"],
    .btn-primary,
    .btn-secondary,
    .btn-nav-getstarted,
    .btn-signup {
        transition: none !important;
        transform: none !important;
    }

    .fade-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero-badge,
    .hero-title,
    .hero-subtitle,
    .hero-actions,
    .hero-trust-bar,
    .hero-stats-row {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}
