/* ============================================
   AGON 4.0 - Homepage Animation Styles
   File: HOME_PAGE/CSS/ANIMATION.CSS
   ============================================ */

/* ----- RESET & BASE ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* ----- CONTAINER PRINCIPALE ----- */
.animation-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ----- CANVAS LAYERS ----- */
/* Z-index gestiti da JS tramite CONFIG.JS */

#trailCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

#overlayCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

#runnerCanvas {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    display: none;
}

/* ----- FASCIA LUMINOSA ----- */
/* Creata dinamicamente da LIGHT-BAND.JS */
/* Tutti gli stili applicati via JavaScript per massima flessibilità responsive */
#lightBand {
    /* Stili applicati dinamicamente */
}

/* ----- TESTO CENTRALE ----- */
#textReveal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* Typography */
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 72px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 4px;
    
    /* Colore arancione standard sito (da h1) */
    color: #FF8C00;
    
    /* Ombra nera per profondità (senza glow) */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    
    /* Sempre visibile - reveal tramite clip-path controllato da JS */
    opacity: 1;
    pointer-events: none;
    
    /* Clip-path iniziale (nascosto a sinistra) - modificato da JS */
    clip-path: inset(0 0 0 100%);
    
    /* NO transition - animazione controllata via JavaScript */
    transition: none;
    
    /* Annulla margin di h1 per mantenere centramento perfetto */
    margin: 0;
}

/* Stato finale - testo completamente rivelato */
/* Nessun effetto aggiuntivo - mantiene stile base nitido */
#textReveal.text-revealed {
    /* Classe aggiunta da JS ma senza effetti visivi */
}

/* ----- RUNNER IMMAGINE ----- */
#runner {
    position: fixed;
    height: 400px;
    width: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    will-change: transform;
    image-rendering: crisp-edges;
}

#runner.runner-hidden {
    opacity: 0;
}

/* ----- PULSANTE LOGIN ----- */
/* Usa classe .btn-yes da CSS_COMMON/style.css per stile base */
/* Override solo posizionamento e animazione ingresso */

#loginBtn {
    /* Posizionamento fisso centrato */
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    
    /* Stato iniziale invisibile */
    opacity: 0;
    pointer-events: none;
}

/* Stato visibile con animazione fadeInUp */
#loginBtn.visible {
    opacity: 1;
    pointer-events: auto;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Override hover per mantenere centramento */
#loginBtn:hover {
    transform: translateX(-50%);
}

/* Animazione ingresso dal basso */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ----- UTILITY CLASSES ----- */
.hidden {
    opacity: 0;
    pointer-events: none;
}

.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ----- DEBUG MODE ----- */
.debug-info {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #0f0;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    z-index: 9999;
    border-radius: 5px;
    line-height: 1.5;
}

.debug-info div {
    margin-bottom: 5px;
}

.debug-bounds {
    outline: 2px dashed red;
    outline-offset: 4px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* ----- TABLET (768px - 1199px) ----- */
@media (max-width: 1199px) and (min-width: 768px) {
    #runner {
        height: 320px;
    }
    
    #textReveal {
        font-size: 54px;
        letter-spacing: 3px;
    }
    
    #loginBtn {
        bottom: 40px;
    }
}

/* ----- MOBILE (max 767px) ----- */
@media (max-width: 767px) {
    #runner {
        height: 250px;
    }
    
    #textReveal {
        font-size: 36px;
        letter-spacing: 2px;
    }
    
    #loginBtn {
        bottom: 30px;
    }
}

/* ----- LANDSCAPE MOBILE ----- */
@media (max-height: 500px) and (orientation: landscape) {
    #runner {
        height: 200px;
    }
    
    #textReveal {
        font-size: 28px;
    }
    
    #loginBtn {
        bottom: 20px;
    }
}
