﻿/* =============================================
           SPINNER INIZIALE — responsive
           ============================================= */
#itnet-loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 4vw, 40px);
    z-index: 9999;
    transition: opacity 0.45s ease;
    padding: 24px;
}

    #itnet-loader.fade-out {
        opacity: 0;
        pointer-events: none;
    }

    /* Alone radiale — scala con il viewport */
    #itnet-loader::before {
        content: '';
        position: absolute;
        width: min(340px, 70vw);
        height: min(220px, 45vw);
        background: radial-gradient(ellipse, rgba(253,195,0,0.18) 0%, transparent 70%);
        border-radius: 50%;
        animation: glowPulse 2.8s ease-in-out infinite;
        pointer-events: none;
    }

/* Logo — scala fluida tra mobile e desktop */
.itnet-logo-wrap {
    position: relative;
    z-index: 2;
    width: clamp(160px, 40vw, 280px);
    filter: drop-shadow(0 4px 18px rgba(253,195,0,0.25));
}

    .itnet-logo-wrap svg {
        width: 100%;
        height: auto;
        overflow: visible;
    }

/* Badge pulse */
.itnet-badge-anim {
    transform-box: fill-box;
    transform-origin: center;
    animation: badgePulse 2.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Net fade */
.itnet-net-anim {
    animation: netFade 2.6s ease-in-out infinite;
    animation-delay: 0.4s;
}

/* Barra shimmer — larghezza fluida */
.itnet-progress-bar {
    position: relative;
    z-index: 2;
    width: clamp(120px, 35vw, 200px);
    height: 2px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.itnet-progress-fill {
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, transparent 0%, #fdc300 50%, transparent 100%);
    border-radius: 99px;
    animation: sweep 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ---- Keyframes ---- */
@keyframes glowPulse {
    0%, 100% {
        transform: scale(0.75);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.25);
        opacity: 1;
    }
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 2px 8px rgba(253,195,0,0.2));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 4px 20px rgba(253,195,0,0.5));
    }
}

@keyframes netFade {
    0%, 100% {
        opacity: 1;
        transform: translateX(0);
    }

    50% {
        opacity: 0.6;
        transform: translateX(3px);
    }
}

@keyframes sweep {
    0% {
        transform: translateX(-150%);
    }

    100% {
        transform: translateX(280%);
    }
}
