/* ===== HOME PAGE ===== */

/* Reset di base */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* Impedisce lo scorrimento normale della pagina */
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    color: #f1f1f1;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: transparent;
    z-index: 1000;
    box-sizing: border-box;
}

/* Logo in alto a sinistra -> torna alla home */
.site-logo {
    display: block;
    width: 80px;
    line-height: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.site-logo img {
    width: 100%;
    height: auto;
    display: block;
    /* il logo è nero su sfondo bianco: lo rendiamo bianco sul tema scuro */
    filter: invert(1);
}
.site-logo:hover { transform: scale(1.08); opacity: 0.75; }

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 12px 35px;
    background: rgba(255, 255, 255, 0);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
    cursor: pointer;
}

nav a:hover { color: white; }

/* ===== SELETTORE LINGUA ===== */
.lang-switch { position: relative; }
.lang-current {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 12px 22px;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    transition: background 0.3s ease;
    backdrop-filter: blur(8px);
}
.lang-current::after { content: " ▾"; }
.lang-current:hover { background: rgba(255, 255, 255, 0.28); }

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu a {
    display: block;
    padding: 12px 18px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease;
}
.lang-menu a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.lang-menu a.active { color: #ffd700; }

/* Sidebar a sinistra */
.sidebar {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sidebar li {
    width: 60px;
    height: 80px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease, outline 0.3s ease;
    border-radius: 2px;
    overflow: hidden;
}
.sidebar li.active {
    opacity: 1;
    outline: 2px solid #ffd700;
    outline-offset: 1px;
    transform: scale(1.05);
}
.sidebar img { width: 100%; height: 100%; object-fit: cover; }

/* Carosello dei progetti */
#projects-carousel {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}
#projects-slides-container {
    display: flex;
    flex-direction: column;
    height: auto;
    transition: transform 0.8s ease-out;
}
.project-slide {
    height: 100vh;
    width: 100vw;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.project-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}
.project-slide .content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 0 40px;
}
.project-slide .eyebrow {
    display: block;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 18px;
}
.project-slide h1 {
    font-size: 60px;
    font-weight: bold;
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.05;
}
.project-slide p {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto 30px;
    font-weight: 300;
    max-width: 650px;
}
.btn-watch-showreel {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
}
.btn-watch-showreel:hover { background: rgba(255, 255, 255, 0.35); transform: translateY(-2px); }

/* ===== MODALE CONTATTI ===== */
.contact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 5000;
}
.contact-overlay.open { opacity: 1; visibility: visible; }
.contact-box {
    background: #111;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 45px 50px;
    max-width: 460px;
    width: 90%;
    text-align: center;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.35s ease;
}
.contact-overlay.open .contact-box { transform: translateY(0) scale(1); }
.contact-box h2 {
    margin: 0 0 6px;
    font-size: 22px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.contact-box .sub {
    margin: 0 0 28px;
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
}
.contact-box a {
    display: block;
    color: #f1f1f1;
    text-decoration: none;
    font-size: 15px;
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    transition: color 0.25s ease;
}
.contact-box a:hover { color: #ffd700; }
.contact-box .close-contact {
    margin-top: 26px;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    padding: 11px 26px;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.5px;
}
.contact-box .close-contact:hover { background: rgba(255,255,255,0.25); }

/* ===== LOADER DI APERTURA (logo) ===== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fbfbfb;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    pointer-events: all;
    transition: opacity 0.6s ease;
}
.loader-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.line {
    fill: none;
    stroke: #000;
    stroke-miterlimit: 10;
    stroke-width: 2px;
}

/* Mobile */
@media (max-width: 768px) {
    nav { display: none; }
    .sidebar { display: none; }
    .project-slide h1 { font-size: 34px; }
    header { padding: 16px 20px; }
}
