/* RESET E BASE */
* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; /* Custom Cursor */ }
html { scroll-behavior: smooth; font-size: 16px; }
body { 
    font-family: 'Inter', sans-serif; 
    line-height: 1.6; 
    color: #e2e8f0; 
    overflow-x: hidden; 
    background-color: #030712; /* Deep Dark */
    position: relative;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* DESIGN TOKENS */
:root {
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #0f172a;
    --accent: #8b5cf6; /* Neon Purple */
    --accent-glow: rgba(139, 92, 246, 0.6);
    --success: #10b981;
    --whatsapp: #25D366;
    
    --bg-color: #030712;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-muted: #94a3b8;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-hero: linear-gradient(to bottom, rgba(3,7,18,0.3) 0%, rgba(3,7,18,1) 100%);
    
    /* Shadows */
    --glow-sm: 0 0 15px var(--primary-glow);
    --glow-md: 0 0 30px var(--accent-glow);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 10; }

/* CUSTOM CURSOR */
.custom-cursor {
    position: fixed; top: 0; left: 0; width: 40px; height: 40px; border: 2px solid var(--accent); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, background 0.3s; mix-blend-mode: screen;
}
.custom-cursor.hover { width: 60px; height: 60px; background: rgba(139, 92, 246, 0.2); border-color: transparent; }
.custom-cursor-dot {
    position: fixed; top: 0; left: 0; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%);
}
@media (max-width: 768px) { * { cursor: auto !important; } .custom-cursor, .custom-cursor-dot { display: none !important; } }

/* ANIMATED BACKGROUND BLOBS */
.bg-blobs { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; overflow: hidden; z-index: 0; pointer-events: none; }
.blob { position: absolute; filter: blur(90px); opacity: 0.5; border-radius: 50%; animation: float 10s infinite alternate ease-in-out; }
.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--primary-glow); }
.blob-2 { bottom: -10%; right: -10%; width: 600px; height: 600px; background: var(--accent-glow); animation-delay: -5s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(50px, 50px) scale(1.1); } }

/* UTILITY CLASSES */
.section-title { font-size: 3rem; text-align: center; margin-bottom: 1.5rem; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; letter-spacing: -0.02em; }
.section-subtitle { text-align: center; max-width: 800px; margin: 0 auto 4rem; color: var(--text-muted); font-size: 1.25rem; line-height: 1.8; }
.highlight { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; }

/* BOTTONI CON NEON GLOW */
.btn { 
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 1.2rem 2.5rem; border-radius: 50px; font-weight: 700; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); cursor: none; border: 1px solid transparent; font-size: 1.1rem; text-decoration: none; position: relative; overflow: hidden; z-index: 1;
}
.btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: 0.5s; z-index: -1; }
.btn:hover::before { left: 100%; }

.btn-primary { background: var(--gradient-primary); color: #fff; box-shadow: var(--glow-sm); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--glow-md); }
.btn-accent { background: transparent; color: #fff; border: 1px solid var(--accent); box-shadow: inset 0 0 10px rgba(139,92,246,0.1); }
.btn-accent:hover { background: rgba(139, 92, 246, 0.1); box-shadow: 0 0 20px var(--accent-glow); transform: translateY(-3px); }

/* NAVIGAZIONE GLASSMORPHISM */
nav { 
    background: rgba(3, 7, 18, 0.7); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: 1rem 0; position: fixed; top: 0; width: 100%; z-index: 1000; border-bottom: 1px solid var(--surface-border); transition: 0.3s;
}
/* Spazio per nav fissa */
body { padding-top: 76px; }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; }
.logo-img { height: 50px; width: 50px; object-fit: cover; border-radius: 50%; border: 2px solid var(--primary); box-shadow: 0 0 15px var(--primary-glow); transition: 0.5s; cursor: none; }
.logo-img:hover { transform: rotate(360deg) scale(1.1); box-shadow: var(--glow-md); }

.nav-center-text { flex-grow: 1; text-align: center; color: #fff; font-weight: 700; font-size: 0.9rem; position: relative; height: 20px; overflow: hidden; }
.nav-center-text span { position: absolute; width: 100%; left: 0; opacity: 0; animation: rotateText 12s infinite; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; }
.nav-center-text span:nth-child(1) { animation-delay: 0s; } .nav-center-text span:nth-child(2) { animation-delay: 3s; }
.nav-center-text span:nth-child(3) { animation-delay: 6s; } .nav-center-text span:nth-child(4) { animation-delay: 9s; }
@keyframes rotateText { 0% { opacity: 0; transform: translateY(15px); } 4%, 21% { opacity: 1; transform: translateY(0); } 25%, 100% { opacity: 0; transform: translateY(-15px); } }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; transition: 0.3s; position: relative; padding: 0.5rem 0; cursor: none; }
.nav-links a:hover, .nav-links a.active-link { color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.5); }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 2px; background: var(--gradient-primary); transition: 0.3s ease-out; box-shadow: 0 0 10px var(--primary); }
.nav-links a:hover::after, .nav-links a.active-link::after { width: 100%; }
.nav-links .contact-link { color: var(--accent); font-weight: 800; text-shadow: 0 0 10px var(--accent-glow); }

.mobile-menu-btn { display: none; color: #fff; font-size: 1.8rem; cursor: none; }
.mobile-nav { display: none; background: rgba(3, 7, 18, 0.95); backdrop-filter: blur(20px); text-align: center; position: fixed; top: 76px; left: 0; width: 100%; box-shadow: 0 20px 40px rgba(0,0,0,0.5); border-bottom: 1px solid var(--surface-border); }
.mobile-nav.active { display: block; animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.mobile-nav a { display: block; color: #fff; padding: 1.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.02); font-weight: 600; font-size: 1.2rem; transition: 0.3s; }
.mobile-nav a:hover { color: var(--accent); background: rgba(255,255,255,0.03); }

/* HERO SECTION CINEMATICA */
.hero { position: relative; padding: 14rem 0 10rem; text-align: center; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: 1; transform: translate(-50%, -50%); object-fit: cover; opacity: 0.4; mix-blend-mode: luminosity; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--gradient-hero); z-index: 2; }
.hero-content { position: relative; z-index: 3; width: 100%; max-width: 900px; margin: 0 auto; }
.hero h1 { font-size: 4.5rem; font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; text-shadow: 0 10px 30px rgba(0,0,0,0.8); letter-spacing: -0.04em; }
.hero p { font-size: 1.4rem; line-height: 1.7; color: #cbd5e1; max-width: 700px; margin: 0 auto 3rem; font-weight: 300; }

/* SEZIONI TRASPARENTI */
.section { padding: 8rem 0; position: relative; z-index: 10; }

/* GRIGLIE E CARD 3D GLASSMORPHISM */
.grid-cards { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cards { grid-template-columns: repeat(4, 1fr); } }

.card { 
    background: var(--surface); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    padding: 3rem 2rem; border-radius: 24px; border: 1px solid var(--surface-border);
    text-align: center; transition: 0.4s; height: 100%; position: relative; overflow: hidden;
    transform-style: preserve-3d; /* Per Vanilla Tilt */
}
.card::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent); transform: skewX(-20deg); transition: 0.7s; }
.card:hover::after { left: 150%; }
.card:hover { border-color: rgba(139, 92, 246, 0.4); box-shadow: 0 20px 40px rgba(0,0,0,0.4), var(--glow-sm); }

.card .icon { font-size: 3.5rem; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.5rem; display: inline-block; transform: translateZ(30px); transition: 0.3s; filter: drop-shadow(0 0 10px rgba(59,130,246,0.3)); }
.card:hover .icon { transform: translateZ(50px) scale(1.1); }
.card h3 { margin-bottom: 1rem; font-size: 1.5rem; color: #fff; font-weight: 800; transform: translateZ(20px); }
.card p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; transform: translateZ(10px); }

/* RECENSIONI NEON */
.grid-testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.card-testimonial { background: var(--surface); padding: 2.5rem; border-radius: 24px; border: 1px solid var(--surface-border); text-align: left; transition: 0.3s; backdrop-filter: blur(12px); }
.card-testimonial:hover { transform: translateY(-10px); border-color: rgba(16, 185, 129, 0.3); box-shadow: 0 15px 30px rgba(0,0,0,0.4); }
.stars { color: var(--success); margin-bottom: 1.2rem; font-size: 1.1rem; filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.5)); }
.review-text { font-style: italic; margin-bottom: 2rem; font-size: 1.1rem; line-height: 1.8; color: #f1f5f9; }
.client-info { display: flex; align-items: center; gap: 15px; border-top: 1px solid var(--surface-border); padding-top: 1.5rem; }
.client-avatar { width: 60px; height: 60px; background: var(--gradient-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 1.5rem; box-shadow: var(--glow-sm); }
.client-details h4 { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.client-details span { font-size: 0.9rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* INFO BOX GLOW */
.info-box { background: rgba(3,7,18,0.6); backdrop-filter: blur(20px); border: 1px solid var(--surface-border); padding: 5rem 3rem; border-radius: 30px; margin-top: 5rem; text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,0.5); position: relative; overflow: hidden; }
.info-box::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 60%); pointer-events: none; animation: pulse 4s infinite alternate; }
@keyframes pulse { 0% { opacity: 0.5; } 100% { opacity: 1; } }
.info-box h3 { font-size: 2.8rem; margin-bottom: 1.5rem; color: #fff; font-weight: 900; }
.info-box p { font-size: 1.25rem; margin-bottom: 3rem; color: #cbd5e1; max-width: 800px; margin-left: auto; margin-right: auto; }

/* WHATSAPP FLOAT NEON */
.whatsapp-float { position: fixed; width: 70px; height: 70px; bottom: 40px; right: 40px; background-color: var(--whatsapp); color: #FFF; border-radius: 50%; text-align: center; font-size: 35px; z-index: 2000; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(37, 211, 102, 0.6); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.whatsapp-float:hover { transform: scale(1.15) rotate(-10deg); box-shadow: 0 0 40px rgba(37, 211, 102, 0.8); }

/* FOOTER */
footer { background: #000; color: var(--text-muted); padding: 5rem 0 2rem; text-align: center; font-size: 0.9rem; border-top: 1px solid var(--surface-border); position: relative; z-index: 10; }
.f-info { color: #fff; font-weight: 800; margin-bottom: 1rem; font-size: 1.5rem; letter-spacing: 1px; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.f-address { margin-bottom: 2rem; line-height: 1.8; font-size: 1rem; }
.f-links { margin-bottom: 3rem; display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.f-links a { color: #cbd5e1; transition: 0.3s; font-weight: 500; font-size: 0.95rem; }
.f-links a:hover { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }
.created-by { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 30px; border-top: 1px solid var(--surface-border); color: #64748b; }
.created-by a { display: flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 800; transition: 0.3s; }
.created-by a:hover { color: var(--accent); filter: drop-shadow(0 0 5px var(--accent)); }
.created-by img { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--primary); }

/* LEGACY COMPONENTS (RESTYLED FOR DARK MODE) */
.section-light, .section-dark, .section-testimonials, .faq-section { padding: 8rem 0; position: relative; z-index: 10; }
.faq-section { border-top: 1px solid var(--surface-border); }
.grid-3 { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.info-box { background: var(--surface); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--surface-border); border-radius: 24px; padding: 4rem 2rem; margin-top: 4rem; text-align: center; position: relative; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.info-box h3 { font-size: 2.2rem; margin-bottom: 1.5rem; color: #fff; font-weight: 800; }
.info-box p { color: var(--text-muted); font-size: 1.15rem; line-height: 1.7; max-width: 800px; margin: 0 auto 2.5rem; }
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--surface); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 16px; margin-bottom: 1.5rem; border: 1px solid var(--surface-border); overflow: hidden; transition: 0.3s; }
.faq-item:hover { border-color: rgba(16, 185, 129, 0.3); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); }
.faq-question { padding: 1.5rem 2rem; font-weight: 700; font-size: 1.15rem; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { padding: 0 2rem 1.5rem; color: var(--text-muted); line-height: 1.7; }
.hero-inner { min-height: 60vh !important; padding-top: 12rem !important; padding-bottom: 6rem !important; }

/* MOBILE OPTIMIZATION */
@media (max-width: 768px) {
    /* Reset cursore custom su mobile */
    * { cursor: auto !important; }
    .custom-cursor, .custom-cursor-dot { display: none !important; }

    /* Navbar mobile: logo a sinistra, testo centrato assoluto, hamburger a destra */
    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    .logo-img { height: 42px; width: 42px; flex-shrink: 0; }

    /* Testo rotante: centrato in modo assoluto rispetto alla navbar */
    .nav-center-text {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        max-width: 180px;
        text-align: center;
        font-size: 0.65rem;
        height: 18px;
        overflow: visible;
        pointer-events: none;
    }
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex !important; flex-shrink: 0; font-size: 1.8rem; cursor: pointer; align-items: center; color: #ffffff !important; z-index: 1100; position: relative; }

    /* Hero */
    .hero { padding: 6rem 0 4rem; min-height: auto; }
    .hero h1 { font-size: 2.4rem; letter-spacing: -0.02em; }
    .hero p { font-size: 1.1rem; }

    /* Sezioni e layout */
    .section { padding: 4rem 0; }
    .section-title { font-size: 2rem; }
    .info-box { padding: 3rem 1.5rem; }
    .grid-testimonials { grid-template-columns: 1fr; padding: 0 16px; }
    .whatsapp-float { width: 58px; height: 58px; bottom: 20px; right: 20px; font-size: 28px; }
}
