/* Variables & Reset */
:root {
    --bg-color: #050505;
    /* Deep, almost absolute black */
    --text-color: #e5e5e5;
    --accent-color: #ffffff;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Hide default cursor for custom one */
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.1;
    color: var(--accent-color);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background-color 0.2s, opacity 0.2s;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.15);
    opacity: 0;
}

.cursor.active {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: flex-end; /* Allinea a destra un eventuale tasto (es. Btn Close) */
    align-items: center;
    z-index: 2000;
    background-color: var(--bg-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Sottile linea di divisione nera dal video */
    transition: padding 0.4s ease;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    align-items: center;
}

.img-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.menu-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    z-index: 2000;
    position: relative;
    padding: 10px;
}

.v-line {
    width: 24px;
    height: 2px; /* Righette orizzontali */
    background-color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-btn:hover .v-line {
    background-color: var(--accent-color);
}

.nav {
    display: flex;
    align-items: center;
    position: relative;
}

.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 1.5rem;
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem 1.5rem 2rem 3rem; /* Ridotto il padding destro per incollare il blocco sotto l'icona menu */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.8rem;
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    list-style: none;
}

.nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-links li {
    list-style: none; /* Rimuovi pallini classici delle liste HTML */
    text-align: right; /* Forza tutti i testi ad allinearsi perfettamente a destra come il pulsante a righette */
}

.nav-links li a {
    display: block;
    white-space: nowrap; /* Evita fisicamente che 'CHI SIAMO' vada a capo sovrapponendosi in colonna */
    font-family: var(--font-heading);
    font-size: 0.85rem; /* Assolutamente più piccolo per estetica premium */
    font-weight: 400;
    text-transform: uppercase;
    color: var(--text-color);
    transition: color 0.3s ease;
    letter-spacing: 3px; /* Maggior respiro per compensare il font più piccolo */
}

.nav-links li a:hover {
    color: var(--accent-color);
}



/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg-color);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 1; /* Video originale, nessuna ombra */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* Nessun gradiente scuro */
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: -2px;
    margin-bottom: 1rem;
    /* Split animation generic setup */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease forwards 0.5s;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.8s;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeUp 1s ease forwards 1.2s;
}

.scroll-indicator span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-indicator .line {
    width: 60px;
    height: 1px;
    background-color: var(--text-color);
    position: relative;
    overflow: hidden;
}

.scroll-indicator .line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    animation: scrollLine 2s infinite linear;
}

/* Manifesto Section */
.manifesto {
    width: 100%;
    padding: 2vh 2rem; /* Spazio verticale ridotto al minimo indispensabile */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--bg-color);
}

.manifesto h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
}

/* Portfolio Section */
.portfolio {
    padding-top: 0;
}

.project-item {
    position: relative;
    width: 100%;
    height: 18vh; /* Very thin panoramic banners */
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4rem;
    overflow: hidden;
    text-align: center;
}

.project-item.align-right {
    justify-content: center;
}

.project-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: -1;
    filter: brightness(1) grayscale(0%);
    transition: filter 0.8s ease, transform 1.5s ease;
}

.placeholder-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -1;
    color: #333;
    font-family: var(--font-heading);
}

.project-item:hover .project-img {
    filter: brightness(0.3) grayscale(20%);
    transform: scale(1.02);
}

.project-info {
    z-index: 2;
    width: 90%;
}

.project-info h2 {
    font-size: clamp(0.75rem, 1.3vw, 1.4rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
    color: var(--accent-color);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-item:hover .project-info h2 {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   PROJECT GALLERY (Inner Pages Overrides)
   ========================================================================= */
.project-gallery .project-item {
    height: auto; /* Adatta l'altezza all'immagine originale senza tagliare teste */
    border-bottom: none; /* Rimuove la striscia bianca di separazione */
    padding: 0; /* Espande l'immagine fino ai bordi */
    cursor: default; /* Disattiva la manina del mouse */
    display: block; 
    margin-bottom: 0px; /* Nessuno stacco, le immagini si toccheranno come pellicola pura */
}

.project-gallery .project-img {
    position: relative; /* Sgancia dal posizionamento assoluto del banner home */
    width: 100%;
    height: auto; /* Rispetta il 16:9 naturale esatto */
    object-fit: contain; /* Niente cropping */
    display: block;
}

/* Rimuove l'effetto scurimento al passaggio del mouse tipico della home */
.project-gallery .project-item:hover .project-img {
    filter: brightness(1) grayscale(0%);
    transform: none;
}

/* Typography Sections */
.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 2rem;
}

.section-title.huge {
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: -2px;
}

.section-padding {
    padding: 15vh 4rem;
}

/* About Section */
.about {
    border-top: 1px solid rgba(255, 255, 255, 0.08); /* Linea divisoria elegante */
    padding: 10vh 2rem 0vh 2rem; /* Zero padding in basso per avvicinare il target */
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 80px; /* Separazione cinematografica per lo split screen testuale */
    align-items: flex-start;
}

.about-label {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
    min-width: 100px;
    padding-top: 5px;
}

.about-text p {
    font-size: 1.15rem;
    color: #888;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Contact Section */
.contact {
    padding-top: 10vh; /* Ridotto drasticamente l'inserimento rispetto ai precedenti 15vh standard */
    padding-bottom: 15vh;
}

.contact-container {
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-link {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.contact-link:hover::after {
    width: 100%;
}

/* =========================================================================
   SERVICES PAGE 
   ========================================================================= */
.services-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 140px 24px 80px 24px;
}

.services-intro {
    margin-bottom: 80px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 60px;
}

.services-intro h1 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem); /* Taglia decisamente più piccola per stare sotto alla maestosità del logo */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin-bottom: 24px;
}

.services-intro p {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    line-height: 1.85;
    opacity: 0.7;
    max-width: 700px;
}

.service-item {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    padding: 64px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.service-item:last-child {
    border-bottom: none;
}

.service-number {
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.25;
    padding-top: 6px;
    min-width: 40px;
}

.service-content {
    flex: 1;
}

.service-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    margin-bottom: 16px;
}

.service-tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.5;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 2px;
    margin-bottom: 24px;
}

.service-desc {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.85;
    opacity: 0.7;
}

.service-cta {
    margin-top: 80px;
    text-align: center;
    padding: 80px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.service-cta h2 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 32px;
}

.service-cta a {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    text-decoration: none;
    position: relative;
}

.service-cta a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.service-cta a:hover::after {
    width: 100%;
}


/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: #666;
}

/* Animations */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem 2rem;
    }

    .hero {
        padding: 0 2rem;
    }

    .project-item {
        padding: 0 2rem;
    }

    .section-padding {
        padding: 10vh 2rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cursor {
        display: none;
    }

    /* Disable custom cursor on touch devices */
    body {
        cursor: auto;
    }
}

/* =========================
   VIDEO PROJECT PAGE STYLES
   ========================= */
.video-page {
    background-color: var(--bg-color);
    overflow-x: hidden;
}

.btn-close {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    z-index: 2000;
    transition: transform 0.4s ease, color 0.4s ease;
}

.btn-close svg {
    width: 45px;
    height: 45px;
}

.btn-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.project-view-container {
    max-width: 100%; /* Estendi per video edgetoedge */
    margin: 0 auto;
    padding: 110px 0 0; /* Solo paddingTop per staccare dal master header */
}

.project-header {
    margin-bottom: 3rem;
    text-align: center;
}

.project-header .project-title {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    letter-spacing: 1px;
}

/* Responsive YouTube Video wrapper Trick */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #050505; /* Black placeholder preloading */
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    margin-bottom: 0; /* Zero gap per incollare le grafiche sottostanti al video */
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.clean-info {
    padding: 1.5rem 4rem 4rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center; /* Rigore accentrato */
}

.clean-info .meta-data {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Incolonnamento verticale richiesto */
    align-items: center; /* Centrati in massa piana */
    gap: 0.5rem; /* Respiro tra una riga e l'altra fortemente ridotto */
}

.clean-info .meta-data li {
    font-size: 1rem;
    color: #aeaeae;
    line-height: 1.5;
}

.clean-info .meta-data strong {
    color: var(--text-color);
    display: inline; /* Sulla stessa riga del testo */
    margin-right: 0.8rem;
    font-size: 1.3rem; 
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* =========================================================================
   SOCIAL ADS & VERTICAL REELS (9:16)
   ========================================================================= */
.reels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonne su Desktop */
    gap: 2rem;
    padding: 2rem 4rem 6rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.reel-responsive {
    position: relative;
    padding-bottom: 177.77%; /* Inverso di 16:9 = 9:16 Aspect Ratio esatto */
    height: 0;
    overflow: hidden;
    background-color: #0c0c0c;
    border-radius: 20px; /* Effetto form-factor Smartphone curvo */
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transition: transform 0.3s ease;
}

.reel-responsive:hover {
    transform: translateY(-10px);
}

.reel-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
/* Mobile Optimization (Smartphones) */
@media (max-width: 768px) {
    .header {
        padding: 1rem 1.5rem;
    }
    
    .img-logo {
        height: 45px;
    }
    
    .section-padding {
        padding: 10vh 1.5rem;
    }
    
    .project-info h2 {
        /* Dimensioni molto inferiori fisse per le versioni mobile, onde evitare sovrapposizioni o sbrodolamenti */
        font-size: 0.70rem;
        letter-spacing: 1.5px;
        line-height: 1.4;
        padding: 0 1rem;
        opacity: 1;
        transform: translateY(0);
        text-shadow: 0 4px 15px rgba(0,0,0,1);
    }

    .project-img {
        /* Scuriamo leggermente l'immagine nativamente su mobile in modo che il testo bianco risalti perfettamente */
        filter: brightness(0.5) grayscale(20%);
    }
    
    .project-item {
        /* I banner orizzontali un pelo più alti su mobile per essere toccati col pollice */
        height: 20vh; 
    }
    
    .manifesto {
        padding: 4vh 1.5rem;
    }
    
    .manifesto h2 {
        font-size: 1.6rem;
    }

    .reels-grid {
        grid-template-columns: 1fr; /* Colonna singola a stack da scrollare su Mobile */
        padding: 1rem 1.5rem 4rem 1.5rem;
        gap: 3rem; /* Più spazio in mobile tra un IG block e l'altro */
    }

    .about-container {
        flex-direction: column;
        gap: 20px;
        padding: 40px 0;
    }

    /* Il mobile ora beneficia del dropdown hamburger standard */

    .service-item {
        flex-direction: column;
        gap: 16px;
        padding: 40px 0;
    }
    
    .services-page {
        padding: 120px 20px 60px 20px;
    }
}