:root {
    --bg-color: #000000;
    --primary-text: #EAEAEA;
    --secondary-text: #888888;
    --accent-color: #00BFFF;
    --accent-yellow: #fdd835; /* Aggiunto per il glitch */
    --glow-color: rgba(0, 191, 255, 0.5);
    --font-main: 'Poppins', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    --border-color: rgba(255, 255, 255, 0.1);
    --base-shadow-color: rgba(0, 191, 255, 0.3);
    --hover-shadow-color: rgba(0, 191, 255, 0.6);
    --hover-shadow-color-secondary: rgba(253, 216, 53, 0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--primary-text);
    font-family: var(--font-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- BACKGROUND EFFETCS --- */
.background-effects { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; }
#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.35; /* MODIFICA: Leggermente più visibile */
}

/* --- LAYOUT & TYPOGRAPHY --- */
.container { width: 90%; max-width: 1200px; margin: 0 auto; text-align: center; }
.hero-section { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.content-section { padding: 5vh 0 10vh 0; }
.logo { max-width: 455px; margin-bottom: 40px; animation: pulseGlowLogo 5s infinite alternate; }

@keyframes pulseGlowLogo {
    from { filter: drop-shadow(0 0 10px var(--base-shadow-color)) drop-shadow(0 0 20px var(--base-shadow-color-secondary)); }
    to { filter: drop-shadow(0 0 15px var(--hover-shadow-color)) drop-shadow(0 0 30px var(--hover-shadow-color-secondary)); }
}

h1 { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 300; letter-spacing: 2px; text-transform: uppercase; color: var(--secondary-text); margin-bottom: 20px; }
.glitch-text {
    font-family: var(--font-main);
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-text);
    position: relative;
    text-shadow: 0 0 15px var(--glow-color);
    margin-bottom: 30px;
    white-space: nowrap;
    padding: 15px 30px;
    border-radius: 15px;
    background: rgba(15, 15, 25, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
}
.subtitle { font-size: 1.3rem; color: var(--secondary-text); max-width: 650px; margin: 0 auto; line-height: 1.9; }
h2 { font-family: var(--font-mono); font-size: 1.5rem; text-transform: uppercase; letter-spacing: 2px; color: var(--secondary-text); margin-bottom: 60px; }

/* --- STILE PER EFFETTO GLITCH COMING SOON --- */
.glitch-text span {
    position: relative;
    color: transparent;
    display: inline-block;
}
.glitch-text span::before, .glitch-text span::after {
    content: 'COMING SOON';
    color: var(--primary-text);
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
}
.glitch-text span::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-yellow);
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
}
.glitch-text span::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-color), 2px 2px var(--accent-yellow);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 { 0% { clip-path: inset(15% 0 86% 0); } 20% { clip-path: inset(50% 0 23% 0); } 40% { clip-path: inset(21% 0 34% 0); } 60% { clip-path: inset(78% 0 1% 0); } 80% { clip-path: inset(40% 0 41% 0); } 100% { clip-path: inset(63% 0 2% 0); } }
@keyframes glitch-anim-2 { 0% { clip-path: inset(74% 0 16% 0); } 20% { clip-path: inset(46% 0 33% 0); } 40% { clip-path: inset(4% 0 18% 0); } 60% { clip-path: inset(86% 0 6% 0); } 80% { clip-path: inset(45% 0 45% 0); } 100% { clip-path: inset(10% 0 68% 0); } }


/* --- CARD GENERICHE E LORO EFFETTI --- */
.service-card {
    background: rgba(15, 15, 25, 0.5);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-in-out, border-color 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 8px var(--base-shadow-color);
}
.service-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--hover-shadow-color), 0 0 25px var(--hover-shadow-color-secondary);
}
.card-content h3 { font-family: var(--font-mono); font-size: 1.2rem; color: var(--primary-text); margin-bottom: 15px; }
.card-content p { font-size: 1.05rem; color: var(--secondary-text); line-height: 1.8; }
.service-card p b { color: var(--accent-color); font-weight: 600; text-shadow: 0 0 7px rgba(0, 191, 255, 0.8); }

/* --- CARD ARTEMIDE SPECIFIC --- */
.artemide-section { display: flex; flex-direction: column; align-items: center; }
.artemide-card { width: 100%; max-width: 900px; margin: 0 auto; min-height: 250px; display: flex; flex-direction: column; justify-content: center; z-index: 1; }
.particles-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; opacity: 0.6; }
.artemide-title { font-family: var(--font-main); font-size: 2.5rem; font-weight: 700; color: var(--primary-text); margin-bottom: 10px; text-shadow: 0 0 15px var(--glow-color); }
.artemide-status { font-family: var(--font-mono); font-size: 0.9rem; color: var(--secondary-text); letter-spacing: 1px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; }
.terminal-cursor { display: inline-block; width: 0.6em; font-weight: 700; animation: blink-caret .75s step-end infinite; }
@keyframes blink-caret { from, to { opacity: 0; } 50% { opacity: 1; } }
.artemide-card .card-content p { font-size: 1.2rem; max-width: 700px; margin: 0 auto; line-height: 1.8; }

/* --- GRIGLIA STATICA PER COMPETENZE --- */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}
.services-grid .service-card {
    flex: 1 1 300px;
    max-width: 350px;
}

/* --- SLIDER AUTOMATICO SERVIZI --- */
.services-slider-section { padding-top: 10vh; }
.marquee-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}
.marquee-track {
    display: flex;
    width: fit-content;
    animation: scroll 40s linear infinite;
}
@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.marquee-item {
    flex-shrink: 0;
    padding: 10px 30px;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--secondary-text);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin: 0 15px;
    background: rgba(15, 15, 25, 0.4);
    white-space: nowrap;
}

/* --- IMMAGINI --- */
.clients-image { max-width: 100%; height: auto; margin-top: 20px; opacity: 0.8; transition: opacity 0.3s, filter 0.3s ease-in-out; filter: drop-shadow(0 0 8px var(--base-shadow-color)); }
.clients-image:hover { opacity: 1; filter: drop-shadow(0 0 12px var(--hover-shadow-color)) drop-shadow(0 0 20px var(--hover-shadow-color-secondary)); }

/* --- FOOTER --- */
.footer-section { border-top: 1px solid var(--border-color); text-align: left; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.footer-column { display: flex; flex-direction: column; gap: 10px; }
.footer-logo { width: 180px; height: auto; margin-bottom: 5px; }
.footer-column h4 { font-family: var(--font-mono); font-size: 1.1rem; color: var(--primary-text); margin-bottom: 10px; }
.footer-column p { font-size: 1rem; color: var(--secondary-text); line-height: 1.7; }
.footer-column p.company-info { font-size: 0.9rem; line-height: 1.6; }
.footer-column a { color: var(--secondary-text); text-decoration: none; transition: color 0.3s, text-shadow 0.3s; cursor: pointer; }
.footer-column a:hover { color: var(--accent-color); text-shadow: 0 0 5px var(--glow-color); }
.contact-item { display: flex; align-items: center; gap: 10px; }
.contact-item svg { fill: var(--secondary-text); width: 20px; height: 20px; transition: fill 0.3s; }
.contact-item:hover svg { fill: var(--accent-color); }
.linkedin-button { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; }
.linkedin-button svg { height: 24px; width: 24px; fill: var(--primary-text); }
.footer-copyright { text-align: center; margin-top: 60px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--secondary-text); opacity: 0.7; }

/* --- POPUPS E BANNER --- */
.popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(10px); display: none; align-items: center; justify-content: center; z-index: 1000; }
.popup-content { background: rgba(15, 15, 25, 0.8); border: 1px solid var(--border-color); border-radius: 15px; padding: 40px; max-width: 700px; width: 90%; max-height: 80vh; overflow-y: auto; position: relative; box-shadow: 0 0 25px var(--base-shadow-color); }
.close-popup { position: absolute; top: 15px; right: 20px; background: none; border: none; color: var(--secondary-text); font-size: 2rem; cursor: pointer; transition: color 0.3s; }
.close-popup:hover { color: var(--primary-text); }
.popup-content h3 { font-family: var(--font-mono); font-size: 1.5rem; margin-bottom: 20px; text-shadow: 0 0 8px var(--glow-color); }
.popup-content p { font-size: 1rem; line-height: 1.8; color: var(--secondary-text); text-align: left; }
.popup-content p:not(:last-child) { margin-bottom: 15px; }
.popup-accept-btn { background: var(--accent-color); border: none; border-radius: 5px; padding: 10px 20px; color: var(--bg-color); font-family: var(--font-mono); cursor: pointer; margin-top: 20px; transition: background 0.3s; }
.popup-accept-btn:hover { background: var(--primary-text); }
.cookie-banner { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 200%); width: calc(100% - 40px); max-width: 1200px; background: rgba(15, 15, 25, 0.8); backdrop-filter: blur(10px); border: 1px solid var(--border-color); border-radius: 10px; padding: 20px; box-shadow: 0 0 25px var(--base-shadow-color); display: flex; justify-content: space-between; align-items: center; z-index: 999; transition: transform 0.5s ease-in-out; }
.cookie-banner.active { transform: translate(-50%, 0); }
.cookie-banner p { color: var(--secondary-text); margin: 0; }
.cookie-banner a { color: var(--primary-text); text-decoration: underline; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .glitch-text { font-size: 2.5rem; }
    .subtitle { font-size: 1.1rem; }
    .logo { max-width: 350px; }
    .cookie-banner { flex-direction: column; text-align: center; gap: 15px; }
}
