/**
 * Swyfttrade - Hero background FX v3
 * Aurora blobs, angled mesh, live bars, node network, data streams
 */

.hero-globe-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.hero-fx-layer {
    position: absolute;
    inset: 0;
}

/* Slow drifting color washes — no bouncing circles */
.hero-fx-aurora {
    position: absolute;
    border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
    filter: blur(72px);
    opacity: 0.45;
    will-change: transform;
}

.hero-fx-aurora--1 {
    width: 55vw;
    height: 45vh;
    top: -8%;
    right: -5%;
    background: radial-gradient(circle, rgba(17, 119, 58, 0.55) 0%, transparent 68%);
    animation: heroAuroraDrift1 22s ease-in-out infinite alternate;
}

.hero-fx-aurora--2 {
    width: 48vw;
    height: 40vh;
    bottom: -12%;
    left: -8%;
    background: radial-gradient(circle, rgba(45, 155, 92, 0.35) 0%, transparent 70%);
    animation: heroAuroraDrift2 26s ease-in-out infinite alternate;
}

@keyframes heroAuroraDrift1 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(-6%, 8%) rotate(12deg) scale(1.08); }
}

@keyframes heroAuroraDrift2 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(10%, -6%) rotate(-10deg) scale(1.12); }
}

/* Angled line mesh */
.hero-fx-mesh {
    position: absolute;
    inset: -30%;
    opacity: 0.2;
    background-image:
        linear-gradient(105deg, rgba(17, 119, 58, 0.35) 1px, transparent 1px),
        linear-gradient(-15deg, rgba(17, 119, 58, 0.2) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 75% 65% at 60% 40%, #000 15%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 60% 40%, #000 15%, transparent 70%);
    animation: heroMeshShift 40s linear infinite;
}

@keyframes heroMeshShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(48px, 24px); }
}

/* Vertical market bars — subtle height pulse, not orb bounce */
.hero-fx-bars {
    position: absolute;
    right: 6%;
    bottom: 18%;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: min(42vh, 280px);
    padding: 0 12px;
    z-index: 2;
    opacity: 0.75;
}

.hero-fx-bars span {
    display: block;
    width: 14px;
    height: var(--h, 50%);
    min-height: 12%;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(180deg, rgba(58, 175, 110, 0.9) 0%, rgba(17, 119, 58, 0.35) 100%);
    box-shadow: 0 0 16px rgba(17, 119, 58, 0.25);
    transform-origin: bottom center;
    animation: heroBarPulse 3.5s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}

@keyframes heroBarPulse {
    0%, 100% {
        transform: scaleY(0.92);
        opacity: 0.55;
    }
    50% {
        transform: scaleY(1.06);
        opacity: 1;
    }
}

/* Node network — square nodes + lines */
.hero-fx-network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
    z-index: 1;
}

.hero-fx-network-lines line {
    stroke: rgba(58, 175, 110, 0.35);
    stroke-width: 1.5;
    stroke-dasharray: 8 12;
    animation: heroLineFlow 5s linear infinite;
}

.hero-fx-network-nodes rect {
    fill: rgba(17, 119, 58, 0.85);
    stroke: rgba(94, 201, 138, 0.6);
    stroke-width: 1;
    filter: drop-shadow(0 0 6px rgba(17, 119, 58, 0.5));
    animation: heroNodeGlow 2.8s ease-in-out infinite;
}

.hero-fx-network-nodes rect:nth-child(2) { animation-delay: 0.4s; }
.hero-fx-network-nodes rect:nth-child(3) { animation-delay: 0.8s; }
.hero-fx-network-nodes rect:nth-child(4) { animation-delay: 1.2s; }
.hero-fx-network-nodes rect:nth-child(5) { animation-delay: 0.6s; }
.hero-fx-network-nodes rect:nth-child(6) { animation-delay: 1s; }

@keyframes heroLineFlow {
    0% { stroke-dashoffset: 40; opacity: 0.35; }
    50% { stroke-dashoffset: 0; opacity: 0.7; }
    100% { stroke-dashoffset: -40; opacity: 0.35; }
}

@keyframes heroNodeGlow {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

/* Horizontal data streams */
.hero-fx-streams {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-fx-streams span {
    position: absolute;
    left: -40%;
    height: 1px;
    width: 35%;
    background: linear-gradient(90deg, transparent, rgba(58, 175, 110, 0.5), transparent);
    animation: heroStreamPass 8s linear infinite;
}

.hero-fx-streams span:nth-child(1) { top: 28%; animation-delay: 0s; }
.hero-fx-streams span:nth-child(2) { top: 48%; animation-delay: 2.5s; width: 28%; }
.hero-fx-streams span:nth-child(3) { top: 68%; animation-delay: 4.8s; }
.hero-fx-streams span:nth-child(4) { top: 38%; animation-delay: 6.2s; width: 22%; opacity: 0.6; }

@keyframes heroStreamPass {
    0% { transform: translateX(0); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translateX(420%); opacity: 0; }
}

/* Top mini bars — mobile only */
.hero-fx-bars--top {
    display: none;
}

/* Legacy elements — hidden */
.hero-globe-line-orb,
.hero-globe-wavy-line,
.hero-fx-grid,
.hero-fx-beam,
.hero-fx-rings,
.hero-fx-ring,
.hero-fx-particles,
.globe-center-dot {
    display: none !important;
}

@media (max-width: 768px) {
    .hero-globe-background {
        min-height: 100%;
    }

    /* Top glow wash behind headline area */
    .hero-fx-layer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 52%;
        background:
            radial-gradient(ellipse 90% 80% at 50% 0%, rgba(17, 119, 58, 0.28) 0%, transparent 72%),
            radial-gradient(ellipse 60% 50% at 20% 15%, rgba(58, 175, 110, 0.15) 0%, transparent 70%);
        pointer-events: none;
        z-index: 0;
        animation: heroTopGlow 10s ease-in-out infinite alternate;
    }

    @keyframes heroTopGlow {
        0% { opacity: 0.7; transform: translateY(0); }
        100% { opacity: 1; transform: translateY(6px); }
    }

    .hero-fx-aurora {
        filter: blur(52px);
    }

    .hero-fx-aurora--1 {
        width: 100%;
        max-width: 100%;
        height: 38vh;
        top: -12%;
        right: 0;
        left: 0;
        margin-left: 0;
        opacity: 0.5;
    }

    .hero-fx-aurora--2 {
        width: 100%;
        max-width: 100%;
        height: 32vh;
        top: 6%;
        bottom: auto;
        left: 0;
        opacity: 0.4;
    }

    .hero-fx-mesh {
        opacity: 0.28;
        mask-image: radial-gradient(ellipse 130% 100% at 50% 22%, #000 20%, transparent 78%);
        -webkit-mask-image: radial-gradient(ellipse 130% 100% at 50% 22%, #000 20%, transparent 78%);
    }

    .hero-fx-network {
        opacity: 0.4;
        transform: scale(1.15) translateY(-8%);
        transform-origin: center top;
    }

    .hero-fx-streams {
        opacity: 0.55;
    }

    .hero-fx-streams span:nth-child(1) { top: 10%; }
    .hero-fx-streams span:nth-child(2) { top: 22%; }
    .hero-fx-streams span:nth-child(3) { top: 55%; }
    .hero-fx-streams span:nth-child(4) { top: 72%; }

    .hero-fx-streams::before,
    .hero-fx-streams::after {
        content: '';
        position: absolute;
        left: -40%;
        height: 1px;
        width: 32%;
        background: linear-gradient(90deg, transparent, rgba(58, 175, 110, 0.55), transparent);
        animation: heroStreamPass 7s linear infinite;
    }

    .hero-fx-streams::before {
        top: 6%;
        animation-delay: 1.2s;
    }

    .hero-fx-streams::after {
        top: 16%;
        width: 26%;
        animation-delay: 3.8s;
        opacity: 0.75;
    }

    /* Bottom bars */
    .hero-fx-bars {
        right: 2%;
        bottom: 10%;
        height: 140px;
        gap: 6px;
        opacity: 0.55;
    }

    .hero-fx-bars span {
        width: 10px;
    }

    .hero-fx-bars--top {
        display: flex;
        position: absolute;
        top: 10%;
        right: 4%;
        left: auto;
        bottom: auto;
        height: 72px;
        gap: 5px;
        opacity: 0.5;
        z-index: 2;
    }

    .hero-fx-bars--top span {
        width: 8px;
        min-height: 18%;
    }
}
