/* --- VARIABILI E RESET --- */
:root {
    --bg-dark: #050509; 
    --text-light: #f4f4f7;
    --accent-primary: #10b981;
    --accent-secondary: #8b5cf6;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --glow-effect: 0 0 25px rgba(16, 185, 129, 0.15);
    --footer-bg: #050509;
    --accent-green: #10b981;
}

body {
    background-color: var(--bg-dark) !important;
    color: var(--text-light);
    font-family: 'Urbanist', sans-serif;
    overflow-x: hidden;
}

/* --- NAVBAR & FULL SCREEN MENU --- */
#navigazione {
    background-color: transparent !important;
    transition: all 0.4s ease;
    padding: 20px 0;
    z-index: 10000;
}

#navigazione.scrolled {
    background-color: rgba(5, 5, 9, 0.9) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-brand span {
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    margin: 0 15px;
    position: relative;
    transition: 0.3s;
}

/* FIX: RIMOZIONE EFFETTO CLICK BLU/GRIGIO */
.navbar-toggler {
    border: none !important;
    padding: 0;
    z-index: 11000; 
    position: relative;
    outline: none !important;
    box-shadow: none !important;
}

.bar {
    width: 28px; height: 2px;
    background-color: white;
    margin: 6px 0;
    transition: 0.4s;
}

.navbar-toggler:not(.collapsed) .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.navbar-toggler:not(.collapsed) .bar:nth-child(2) { opacity: 0; }
.navbar-toggler:not(.collapsed) .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 991px) {
    .navbar-collapse {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh;
        background: #050509 !important;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 10500;
    }

    .navbar-collapse.show {
        opacity: 1;
        visibility: visible;
    }

    .navbar-nav { width: 100%; }

    #navigazione .nav-link {
        font-size: 2.5rem !important;
        font-family: 'DM Serif Display', serif;
        text-transform: none;
        margin: 15px 0 !important;
        letter-spacing: 0;
    }

    .mobile-socials {
        position: absolute;
        bottom: 50px;
        width: 100%;
        text-align: center;
    }
}

/* --- LAYOUT GENERALE --- */
main.container { max-width: 1200px; margin: 0 auto; }

.gradient-blur { position: fixed; width: 600px; height: 600px; border-radius: 50%; z-index: -1; filter: blur(100px); opacity: 0.2; pointer-events: none; }
.blur-1 { top: -150px; right: -150px; background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%); }
.blur-2 { bottom: -200px; left: -200px; background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%); }

/* --- CASE STUDY CONTENT --- */
.project-hero { padding: 150px 15px 40px; text-align: center; }
.hero-tag { color: var(--accent-primary); text-transform: uppercase; letter-spacing: 3px; font-size: 0.8rem; font-weight: 800; margin-bottom: 15px; display: block; }
.project-hero h1 { font-size: 4.5em; font-weight: 900; letter-spacing: -2px; background: linear-gradient(to right, #fff, var(--accent-primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.meta-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin: 40px auto; 
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px; padding: 20px;
}
@media (min-width: 768px) { .meta-grid { grid-template-columns: repeat(4, 1fr); padding: 30px; } }
.meta-item strong { color: #888; font-size: 0.65rem; text-transform: uppercase; display: block; margin-bottom: 5px; }
.meta-item span { font-size: 0.95rem; font-weight: 600; color: #fff; }

.project-story { margin: 60px 0; }
.story-label h2 { 
    border-left: 4px solid var(--accent-primary); padding-left: 20px; 
    font-family: 'DM Serif Display', serif; font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 20px;
}
.story-content { font-size: 1.1rem; line-height: 1.7; color: rgba(255,255,255,0.7); }
@media (min-width: 992px) {
    .project-story { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; align-items: start; }
    .story-label h2 { margin-bottom: 0; }
}

.mockup-section-vertical { 
    max-width: 800px; margin: 60px auto; padding: 40px 20px; 
    background: rgba(255,255,255,0.015); border: 1px solid rgba(255,255,255,0.06); 
    border-radius: 40px; text-align: center; 
}
.iphone-frame { 
    width: 240px; height: 500px; background: #000; border: 10px solid #1a1a1a; 
    border-radius: 35px; overflow: hidden; margin: 0 auto 30px; position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
@media (min-width: 768px) { .iphone-frame { width: 280px; height: 580px; } .mockup-section-vertical { padding: 60px 40px; } }
.iphone-frame video { width: 100%; height: 100%; object-fit: cover; }

.bento-container { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 60px 0; }
@media (min-width: 992px) { 
    .bento-container { grid-template-columns: repeat(3, 1fr); gap: 25px; } 
    .col-span-2 { grid-column: span 2; }
}
.bento-card { 
    background: var(--card-bg); border: 1px solid var(--border-color); 
    border-radius: 28px; overflow: hidden; transition: all 0.5s ease; 
    min-height: 250px; display: flex; flex-direction: column; justify-content: center; 
}
.bento-card:hover { transform: translateY(-5px); border-color: var(--accent-primary); }
.bento-card img { width: 100%; height: 100%; object-fit: cover; }

.label-box { font-size: 0.7rem; text-transform: uppercase; color: var(--accent-primary); letter-spacing: 2px; margin-bottom: 15px; font-weight: 800; }

.palette-row-horizontal { display: flex; justify-content: space-around; align-items: center; gap: 10px; margin-top: 10px; }
.color-wrapper { text-align: center; transition: transform 0.3s ease; }
.color-wrapper:hover { transform: scale(1.15); }
.circle-large { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 8px; border: 1px solid rgba(255,255,255,0.1); }
@media (min-width: 768px) { .circle-large { width: 48px; height: 48px; } }
.hex-text { font-size: 0.65rem; font-weight: 700; color: #888; display: block; }

/* --- FOOTER --- */
.site-footer {
    background-color: var(--footer-bg);
    color: #fff;
    padding: 120px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.footer-main-title {
    font-family: 'Urbanist', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 30px;
}

.footer-main-title span {
    color: var(--accent-green);
}

.footer-email-link {
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-email-link:hover {
    color: var(--accent-green);
    transform: translateX(10px);
}

.footer-nav-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 25px;
    display: block;
}

.footer-nav-link {
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    font-size: 1rem;
    opacity: 0.7;
    transition: 0.3s;
}

.footer-nav-link:hover {
    opacity: 1;
    color: var(--accent-green);
    padding-left: 5px;
}

.footer-socials {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-socials a {
    color: #fff;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: 0.3s;
}

.footer-socials a:hover {
    opacity: 1;
    color: var(--accent-green);
}

.footer-bottom {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 991px) {
    .site-footer { 
        padding: 80px 0 30px; 
        text-align: center;
    }
    .footer-main-title { font-size: 3rem; }
    .footer-email-link { justify-content: center; }
    .footer-email-link:hover { transform: translateY(-5px); }
    .footer-socials { justify-content: center; }
    .footer-bottom { 
        flex-direction: column; 
        gap: 15px; 
        text-align: center; 
    }
    .footer-nav-link:hover { padding-left: 0; }
    .ps-lg-5 { padding-left: 0 !important; }
}