/* ======================================================================
   0. CONFIGURAZIONE CORE & VARIABILI (Colori & Reset Grafico)
   ====================================================================== */
:root {
    --bg: #050505;          
    --surface: #0a0a0f;     
    --cyan: #00f3ff;        
    --magenta: #ff00ff;     
    --white: #ffffff;       
    --gray: #888899;        
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--white);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;     
    position: relative;
}

/* ======================================================================
   EFFETTO GLITCH EXTRA: LINEE DI SCANSIONE VECCHIO MONITOR (Sfondo Sito)
   ====================================================================== */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 99999;
    background-size: 100% 4px, 6px 100%;
    pointer-events: none; /* Permette di cliccare gli elementi sottostanti */
    opacity: 0.4;
}

/* ======================================================================
   1. NAVBAR & LOGO FIXXATO (Correzione proporzioni e menu orizzontale)
   ====================================================================== */
nav {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 0 5%; 
    border-bottom: 1px solid #1c1c24;
    background: #000;
    height: 110px;          
}

.logo-area {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-nav { 
    height: 80px;
    width: 80px;
    max-height: 80px;
    max-width: 80px;
    display: block;
    object-fit: contain;    
    transition: filter 0.3s ease;
}

/* Effetto disturbo sul logo del menu quando ci passi sopra */
.logo-nav:hover {
    animation: img-glitch 0.4s steps(2) infinite;
    filter: drop-shadow(0 0 8px var(--cyan));
}

.logo-fallback { font-size: 1.5rem; font-weight: 900; letter-spacing: -1px; text-transform: uppercase; }
.logo-fallback span { color: var(--cyan); }

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--white); 
    text-decoration: none; 
    margin-left: 2rem;
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    transition: 0.3s;       
}

.nav-links a:hover, .nav-links a.btn-nav { color: var(--cyan); text-shadow: 0 0 5px var(--cyan); }

/* ======================================================================
   2. HERO SECTION & STRUTTURA CENTRALE
   ====================================================================== */
.hero {
    min-height: 60vh; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    text-align: center; 
    flex-direction: column; 
    padding: 4rem 20px;
    background: radial-gradient(circle at center, #0f0f18 0%, #050505 100%);
}

.hero-subtitle { 
    font-size: 1.3rem; 
    color: var(--gray); 
    max-width: 800px; 
    margin: 1.5rem auto 1.5rem auto; 
    line-height: 1.8; 
}

/* ======================================================================
   3. EFFETTO GLITCH (Testo principale animato)
   ====================================================================== */
.glitch { 
    position: relative; 
    text-transform: uppercase; 
    font-weight: 900; 
    font-size: 3.5rem; 
    letter-spacing: -1px; 
    line-height: 1.1; 
    animation: text-flicker 3s infinite;
}

.glitch::before, .glitch::after { 
    content: attr(data-text); 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
}

.glitch::before { left: 2px; text-shadow: -2px 0 var(--cyan); clip: rect(44px, 450px, 56px, 0); animation: glitch-1 4s infinite linear alternate-reverse; }
.glitch::after { left: -2px; text-shadow: -2px 0 var(--magenta); clip: rect(44px, 450px, 56px, 0); animation: glitch-2 4s infinite linear alternate-reverse; }

@keyframes glitch-1 { 0% { clip: rect(20px, 9999px, 40px, 0); } 100% { clip: rect(60px, 9999px, 80px, 0); } }
@keyframes glitch-2 { 0% { clip: rect(40px, 9999px, 30px, 0); } 100% { clip: rect(10px, 9999px, 50px, 0); } }

/* Sfarfallio di luce casuale sui titoli della pagina */
@keyframes text-flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% { opacity: 0.99; }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% { opacity: 0.4; text-shadow: none; }
}

/* ======================================================================
   4. NUOVO EQUALIZZATORE TIPO LOGO (Segmentato a Mattoncini)
   ====================================================================== */
.audio-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 45px;
    width: auto;
    margin: 20px auto;
}

.visualizer-bar {
    width: 8px;
    height: 8px;
    background: repeating-linear-gradient(
        to top,
        var(--cyan) 0px,
        var(--cyan) 4px,
        transparent 4px,
        transparent 7px
    );
    animation: block-bounce 2s ease-in-out infinite alternate;
}

.visualizer-bar:nth-child(even) {
    background: repeating-linear-gradient(
        to top,
        var(--magenta) 0px,
        var(--magenta) 4px,
        transparent 4px,
        transparent 7px
    );
}

.visualizer-bar:nth-child(1) { animation-duration: 0.6s; }
.visualizer-bar:nth-child(2) { animation-duration: 0.9s; }
.visualizer-bar:nth-child(3) { animation-duration: 0.5s; }
.visualizer-bar:nth-child(4) { animation-duration: 0.8s; }
.visualizer-bar:nth-child(5) { animation-duration: 0.4s; }
.visualizer-bar:nth-child(6) { animation-duration: 0.7s; }
.visualizer-bar:nth-child(7) { animation-duration: 0.9s; }
.visualizer-bar:nth-child(8) { animation-duration: 0.5s; }

@keyframes block-bounce {
    0% { height: 7px; }
    100% { height: 42px; }
}

/* ======================================================================
   5. GRIGLIE DI LAYOUT & VETRINA (Effetto disturbo sulle immagini)
   ====================================================================== */
.grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 4rem; 
    padding: 3rem 10% 6rem 10%; 
    align-items: center; 
}

@media (max-width: 768px) { 
    .grid { grid-template-columns: 1fr; text-align: center; padding: 3rem 5%; } 
}

.image-wrapper { display: flex; justify-content: center; }

.logo-showcase { 
    width: 100%; 
    max-width: 400px; 
    border-radius: 8px; 
    filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.15)); 
    transition: all 0.3s ease;
}

/* Quando l'utente passa il mouse sull'immagine grande, questa subisce un glitch digitale alternato */
.logo-showcase:hover {
    animation: img-glitch 0.6s steps(2) infinite;
    filter: drop-shadow(0 0 25px var(--magenta)) hue-rotate(90deg);
}

/* Animazione che sposta i blocchi dell'immagine per simulare un segnale corrotto */
@keyframes img-glitch {
    0% { clip-path: inset(40% 0 61% 0); transform: skew(-3deg) translateX(-5px); }
    20% { clip-path: inset(92% 0 1% 0); transform: skew(1deg) translateX(3px); }
    40% { clip-path: inset(15% 0 80% 0); transform: skew(-1deg) translateX(-2px); }
    60% { clip-path: inset(80% 0 5% 0); transform: skew(3deg) translateX(5px); }
    80% { clip-path: inset(3% 0 92% 0); transform: skew(-2deg) translateX(-3px); }
    100% { clip-path: inset(50% 0 42% 0); transform: skew(0deg) translateX(0px); }
}

/* ======================================================================
   6. BOTTONI & ELEMENTI INTERATTIVI (Effetto Neon Flicker)
   ====================================================================== */
.btn {
    background: transparent; 
    border: 1px solid var(--cyan); 
    color: var(--cyan);
    padding: 1.2rem 2.5rem; 
    text-transform: uppercase; 
    font-weight: 700; 
    letter-spacing: 1px;
    cursor: pointer; 
    transition: 0.3s; 
    text-decoration: none; 
    border-radius: 4px;
    display: inline-block;
    position: relative;
}

/* Al passagio del mouse il bottone pulsa, sfarfalla come un neon guasto e crea un'ombra profonda */
.btn:hover { 
    background: var(--cyan); 
    color: #000; 
    box-shadow: 0 0 25px var(--cyan), 0 0 50px rgba(0, 243, 255, 0.2);
    animation: button-flash 0.5s infinite alternate;
}

@keyframes button-flash {
    0% { opacity: 1; }
    50% { opacity: 0.92; box-shadow: 0 0 15px var(--cyan); }
    100% { opacity: 1; }
}

/* ======================================================================
   7. FORM DI INVIO & INPUT
   ====================================================================== */
.form-card { background: var(--surface); padding: 3rem; border-radius: 8px; border: 1px solid #1c1c24; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: bold; font-size: 0.9rem; margin-bottom: 8px; letter-spacing: 0.5px; }
.form-group p.subtitle { font-size: 0.8rem; color: var(--gray); margin-bottom: 10px; margin-top: -4px; }

input, select, textarea { width: 100%; background: #000; border: 1px solid #1c1c24; padding: 1rem; color: #fff; border-radius: 4px; font-size: 1rem; transition: border 0.3s; }
input:focus, select:focus, textarea:focus { border-color: var(--magenta); outline: none; box-shadow: 0 0 10px rgba(255,0,255,0.2); }

.grid-options { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 1.5rem; }
.option-card { background: #000; border: 1px solid #1c1c24; padding: 1rem; border-radius: 4px; display: flex; align-items: center; cursor: pointer; transition: background 0.2s; }
.option-card:hover { background: #0c0c14; border-color: var(--cyan); }
.option-card input { width: auto; margin-right: 12px; accent-color: var(--cyan); transform: scale(1.1); }

/* ======================================================================
   8. NOTIFICHE DI STATO
   ====================================================================== */
.status-msg { padding: 15px; border-radius: 4px; margin-bottom: 2rem; text-align: center; font-weight: bold; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }
.success { background: rgba(0, 243, 255, 0.1); color: var(--cyan); border: 1px solid var(--cyan); box-shadow: 0 0 15px rgba(0, 243, 255, 0.2); }
.error { background: rgba(255, 0, 255, 0.1); color: var(--magenta); border: 1px solid var(--magenta); box-shadow: 0 0 15px rgba(255, 0, 255, 0.2); }

/* ======================================================================
   9. SEZIONE LEGALE INTERAMENTE AGGIUSTATA (Fix spaziatura bordi)
   ====================================================================== */
.legal-container { 
    max-width: 900px; 
    margin: 5rem auto; 
    padding: 0 40px; 
}
.legal-container h2 { color: var(--cyan); margin-top: 3rem; margin-bottom: 1.2rem; text-transform: uppercase; font-size: 1.5rem; border-bottom: 1px solid #1c1c24; padding-bottom: 10px; }
.legal-container p, .legal-container li { color: #ccc; margin-bottom: 1.2rem; font-size: 1.05rem; text-align: justify; }
.legal-container ul { padding-left: 25px; margin-bottom: 2rem; }
.legal-container a { color: var(--magenta); text-decoration: none; }
.legal-container a:hover { text-decoration: underline; }

#cookiefirst-cookies-table, #cookiefirst-policy-page { color: #fff !important; margin-top: 2rem; }

/* ======================================================================
   10. FOOTER
   ====================================================================== */
.footer { text-align: center; padding: 4rem; color: var(--gray); font-size: 0.75rem; letter-spacing: 2px; border-top: 1px solid #1c1c24; }
.footer-links { margin-top: 1rem; }
.footer-links a { color: var(--gray); text-decoration: none; margin: 0 10px; font-size: 0.8rem; }
.footer-links a:hover { color: var(--cyan); }