/* --- IMPORT FONT --- */
@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');


/* --- VARIABILI COLORI --- */
:root {
    --green: #00ff00;
    --pink: #ff00ff;
    --cyan: #00ffff;
    --black: #000000;
}

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

body {
    background-color: var(--black);
    font-family: 'Archivo Black', sans-serif;
    color: white;
    height: 100vh; /* Forza altezza schermo intero */
    overflow: hidden; /* Niente scroll nella home */
}

/* --- LAYOUT A GRIGLIA VERTICALE (Il fix per le sovrapposizioni) --- */
#main-layout {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column; /* Impila verticalmente */
    justify-content: space-between; /* Spinge Logo in alto, Bottoni in basso */
    align-items: center; /* Centra orizzontalmente */
    padding: 20px;
    
    /* SFONDO E IMMAGINE */
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.8)), 
                url('sfondo.jpg') no-repeat center center;
    background-size: cover;
}

/* --- ZONA 1: LOGO (Alto) --- */
.top-zone {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 20px;
    z-index: 10;
}

.logo-img {
    max-width: 180px; /* Dimensione logo tablet/mobile */
    filter: drop-shadow(0 0 10px var(--green));
    /* Animazione galleggiamento */
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- ZONA 2: SLOGAN (Centro Assoluto) --- */
.center-zone {
    flex-grow: 1; /* Prende tutto lo spazio disponibile al centro */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.hero-text {
    font-size: clamp(2.5rem, 6vw, 5rem); /* Si adatta al tablet */
    text-align: center;
    line-height: 1.1;
    color: white;
    text-shadow: 3px 3px 0 var(--pink), -3px -3px 0 var(--cyan);
    transform: skewY(-3deg);
    
    /* Stato iniziale invisibile per animazione JS */
    opacity: 0; 
    transform: skewY(-3deg) translateY(30px);
    transition: all 0.5s ease-out;
    cursor: default;
}

/* Animazione Hover GLITCH sullo Slogan */
.hero-text:hover {
    color: var(--green);
    animation: text-glitch 0.2s infinite;
}

@keyframes text-glitch {
    0% { transform: skewY(-3deg) translate(2px, 2px); }
    20% { transform: skewY(-5deg) translate(-2px, -2px); }
    40% { transform: skewY(-3deg) translate(-2px, 2px); }
    60% { transform: skewY(-2deg) translate(2px, -2px); }
    80% { transform: skewY(-4deg) translate(0px, 2px); }
    100% { transform: skewY(-3deg) translate(0, 0); }
}

/* --- ZONA 3: BOTTONI (Basso) --- */
.bottom-zone {
    width: 100%;
    padding-bottom: 40px;
    z-index: 10;
}

.btn-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; /* Se lo schermo è piccolo, vanno a capo */
}

.nfs-btn {
    text-decoration: none;
    background: var(--green);
    color: black;
    font-size: 1.2rem;
    padding: 15px 30px;
    text-transform: uppercase;
    transform: skewX(-15deg); /* Inclinazione */
    position: relative;
    transition: 0.2s;
    border: 2px solid transparent;
    
    /* Stato iniziale invisibile */
    opacity: 0;
    transform: skewX(-15deg) translateY(50px);
}

.nfs-btn:hover {
    background: black;
    color: var(--green);
    border: 2px solid var(--green);
    box-shadow: 5px 5px 0 var(--pink);
    transform: skewX(-15deg) scale(1.1);
}

/* --- LOADER & FLASH --- */
#loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: black; z-index: 999;
    display: flex; align-items: center; justify-content: center;
}
.loader-text { color: var(--green); animation: blink 0.5s infinite; }

#flash {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: white; z-index: 998;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s;
}
.flash-now { opacity: 1 !important; }

/* --- CLASSI ATTIVE (Aggiunte da JS) --- */
.visible { opacity: 1 !important; transform: skewY(-3deg) translateY(0) !important; }
.btn-visible { opacity: 1 !important; transform: skewX(-15deg) translateY(0) !important; }
@keyframes blink { 50% { opacity: 0; } }
