/* ============================================================
   GAT 2026 — SHARED STYLESHEET (Versione Aggiornata)
   ============================================================ */

/* --- VARIABILI GLOBALI --- */
:root {
    --asphalt-dark:  #121212;
    --asphalt-grey:  #1e2329;
    --neon-green:    #ccff00;
    --alert-red:     #ff3333;
    --text-white:    #ffffff;
    --text-dim:      #a0a0a0;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--asphalt-dark);
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.6;
}

::-webkit-scrollbar             { width: 10px; }
::-webkit-scrollbar-track       { background: var(--asphalt-dark); }
::-webkit-scrollbar-thumb       { background: var(--neon-green); border-radius: 5px; }

a   { text-decoration: none; color: inherit; transition: 0.3s; }
ul  { list-style: none; }

/* =============================================================
   NAVIGAZIONE — Hamburger + Overlay Moderno (No Glitch)
   ============================================================= */

/* Bottone hamburger */
.menu-toggle {
    position: fixed;
    top: 30px; right: 30px;
    z-index: 2200; /* Sopra a tutto */
    cursor: pointer;
    width: 50px; height: 50px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    border: 1.5px solid rgba(255,255,255,0.15);
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.menu-toggle:hover {
    border-color: var(--neon-green);
    background: #000;
    transform: scale(1.08);
    box-shadow: 0 0 18px rgba(204,255,0,0.22);
}

.hamburger {
    width: 22px; height: 1.5px;
    background: white;
    position: relative;
    transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px; height: 1.5px;
    background: white;
    transition: transform 0.35s cubic-bezier(0.7, 0, 0.3, 1), background 0.3s;
}
.hamburger::before { transform: translateY(-7px); }
.hamburger::after  { transform: translateY(7px); }

.menu-open .hamburger              { background: transparent; }
.menu-open .hamburger::before      { transform: translateY(0) rotate(45deg);  background: var(--neon-green); }
.menu-open .hamburger::after       { transform: translateY(0) rotate(-45deg); background: var(--neon-green); }

/* Logo brand fisso */
.brand-logo {
    position: fixed;
    top: 30px; left: 30px;
    z-index: 2100;
    font-weight: 900;
    font-size: 1.6rem;
    color: #fff;
    text-decoration: none;
    line-height: 1;
    transition: transform 0.3s, opacity 0.3s;
}
.brand-logo:hover { transform: scale(1.05); opacity: 0.85; }
.brand-logo span  { color: var(--neon-green); }

/* Overlay menu fullscreen - Smooth Fade + Scale */
.nav-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;

    /* Stato iniziale nascosto */
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    pointer-events: none;
    transition: 
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.5s;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(40px, 8vw, 100px);
    border-bottom: 2px solid var(--neon-green);
    will-change: transform, opacity;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

/* Link del menu */
.nav-links li {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: clamp(10px, 2.4vh, 26px);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-overlay.active .nav-links li { opacity: 1; transform: translateY(0); }
.nav-overlay.active .nav-links li:nth-child(1) { transition-delay: 0.2s; }
.nav-overlay.active .nav-links li:nth-child(2) { transition-delay: 0.3s; }
.nav-overlay.active .nav-links li:nth-child(3) { transition-delay: 0.4s; }
.nav-overlay.active .nav-links li:nth-child(4) { transition-delay: 0.5s; }
.nav-overlay.active .nav-links li:nth-child(5) { transition-delay: 0.6s; }
.nav-overlay.active .nav-links li:nth-child(6) { transition-delay: 0.7s; }

.nav-num {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    color: var(--neon-green);
    opacity: 0.45;
    min-width: 22px;
}

.nav-links a {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    text-transform: uppercase;
    font-style: italic;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.3);
    position: relative;
    display: inline-block;
    line-height: 1;
}

/* Effetto riempimento verde */
.nav-links a::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    width: 0;
    color: var(--neon-green);
    -webkit-text-stroke: 0;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.7, 0, 0.3, 1);
    white-space: nowrap;
}

.nav-links a:hover::before,
.nav-links a.active::before { width: 100%; }
.nav-links a.active { -webkit-text-stroke: 1px var(--neon-green); }

.nav-footer {
    position: absolute;
    bottom: 28px;
    left: clamp(40px, 8vw, 100px);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.18);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* =============================================================
   PAGE HEADER
   ============================================================= */
.page-header {
    height: 42vh;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.45), var(--asphalt-dark)), url('fotoprova.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 50px;
    position: relative;
}

.page-title {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    font-style: italic;
    border-left: 8px solid var(--neon-green);
    padding-left: 25px;
    line-height: 0.95;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.page-title .subtitle-tech {
    font-size: 1.1rem;
    font-family: 'Roboto Mono', monospace;
    color: var(--neon-green);
    letter-spacing: 6px;
    display: block;
    margin-top: 14px;
    font-style: normal;
    font-weight: 400;
}

/* =============================================================
   BOTTONI
   ============================================================= */
.btn-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--neon-green);
    border-bottom: 2px solid var(--neon-green);
    padding-bottom: 3px;
}
.btn-link:hover { opacity: 0.75; }

.btn-outline {
    display: inline-block;
    padding: 14px 28px;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: 0.3s;
    cursor: pointer;
}
.btn-outline:hover { background: var(--neon-green); color: var(--asphalt-dark); }

/* =============================================================
   SEZIONI E CARDS
   ============================================================= */
.section-header           { margin-bottom: 40px; }
.section-header h2 {
    font-size: 3rem;
    text-transform: uppercase;
    font-weight: 900;
    color: white;
    border-left: 5px solid var(--neon-green);
    padding-left: 20px;
    margin-bottom: 10px;
}
.section-header p {
    color: var(--text-dim);
    padding-left: 25px;
    font-size: 1.1rem;
    max-width: 600px;
}

.card {
    background: var(--asphalt-grey);
    padding: 30px;
    border-left: 3px solid var(--neon-green);
    transition: transform 0.3s, background 0.3s;
}
.card:hover          { transform: translateY(-5px); background: #252b32; }
.card h3             { color: var(--neon-green); text-transform: uppercase; font-size: 1.5rem; margin-bottom: 15px; font-style: italic; }
.card p              { color: #ccc; margin-bottom: 20px; font-size: 0.95rem; }

.highlight { color: var(--neon-green); font-weight: bold; }

/* =============================================================
   FOOTER
   ============================================================= */
footer {
    background: #000;
    padding: 55px 20px;
    text-align: center;
    color: #555;
    font-size: 0.8rem;
    margin-top: 80px;
}
footer p + p { margin-top: 10px; color: #333; }

/* =============================================================
   HERO VIDEO (HOME PAGE)
   ============================================================= */
.parallax-hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden; /* Evita che il video sbordi */
    z-index: 1;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover; /* Mantiene le proporzioni */
    z-index: -2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Opacità per far leggere il testo */
    z-index: -1;
}

.audio-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--neon-green);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-btn:hover {
    background: var(--neon-green);
    color: var(--asphalt-dark);
}

/* Assicura che titoli e freccia stiano sopra al video */
.hero-title, .scroll-indicator {
    position: relative;
    z-index: 2;
}

/* =============================================================
   RESPONSIVE (SEMPRE ALLA FINE DEL FILE!)
   ============================================================= */
@media (max-width: 900px) {
    .page-header  { padding: 30px; }
    .page-title   { font-size: 3rem; }
}

@media (max-width: 600px) {
    .menu-toggle  { top: 16px; right: 16px; width: 44px; height: 44px; }
    .brand-logo   { top: 20px; left: 16px; font-size: 1.2rem; }
    .nav-overlay  { padding: 70px 24px 60px; }
    .nav-num      { display: none; }
    .page-header  { height: auto; min-height: 180px; padding: 80px 20px 28px; }
    
    /* Adatta il bottone audio su mobile */
    .audio-btn {
        bottom: 20px;
        right: 20px;
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}