/* --- OPTLYX SOFT THEME (styles.css) --- */

:root {
    /* Brand Colors */
    --brand-primary: #738bf4;       /* Il tuo Blu Soft */
    --brand-dark: #5b6de3;          /* Hover state */
    --brand-light: #aebbf9;         /* Accenti chiari */
    --brand-surface: rgba(115, 139, 244, 0.08); /* Sfondi leggeri */
    
    /* Text Colors */
    --text-main: #1e293b; 
    --text-muted: #64748b;
    
    /* Fonts */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter Tight', sans-serif;
}

/* BASE SETUP */
body { 
    font-family: var(--font-body); 
    color: var(--text-main);
    background: #ffffff;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* --- SFONDO ENGAGING (Soft Gradient + Blobs) --- */
.ambient-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: -1;
    background: radial-gradient(circle at 50% 0%, rgba(115, 139, 244, 0.15), rgba(255,255,255,0) 70%), #ffffff;
}

.blob {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5;
    animation: floatBlob 20s infinite alternate ease-in-out; z-index: -1;
}
.blob-1 { top: -10%; left: -10%; width: 700px; height: 700px; background: rgba(115, 139, 244, 0.2); animation-delay: 0s; }
.blob-2 { top: 30%; right: -20%; width: 600px; height: 600px; background: rgba(160, 180, 255, 0.25); animation-delay: -5s; }
.blob-3 { bottom: -20%; left: 10%; width: 500px; height: 500px; background: rgba(115, 139, 244, 0.15); animation-delay: -8s; }

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 60px) scale(1.1); }
}

/* --- TOP TIER TYPOGRAPHY --- */
h1, h2, h3, h4, .font-display { font-family: var(--font-display); }

/* Gradiente Animato Premium */
.text-gradient-brand {
    background: linear-gradient(135deg, #1e293b 0%, #738bf4 40%, #aebbf9 70%, #5b6de3 100%);
    background-size: 300% auto;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shineText 6s linear infinite;
}
@keyframes shineText { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* Sottolineatura Animata SVG */
.hero-underline-container { position: relative; display: inline-block; white-space: nowrap; }
.hero-svg-underline {
    position: absolute; left: 0; bottom: -15px; width: 100%; height: 20px; z-index: -1; overflow: visible;
}
.hero-svg-underline path {
    stroke: #738bf4; stroke-width: 6; stroke-linecap: round; fill: none;
    stroke-dasharray: 600; stroke-dashoffset: 600; opacity: 0.8;
    animation: drawPath 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards; animation-delay: 0.5s;
}
@keyframes drawPath { to { stroke-dashoffset: 0; } }

.glow-effect {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 120%; height: 120%; background: radial-gradient(circle, rgba(115, 139, 244, 0.2) 0%, transparent 70%);
    filter: blur(20px); z-index: -2; pointer-events: none;
}

/* --- GLASS NAVBAR (Updated: Ultra Transparent) --- */
/* Navbar fissa e centrata senza sbordare (Mobile Bigger) */
.glass-navbar {
    position: fixed !important;
    top: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 92% !important; 
    max-width: 1200px;
    
    /* MODIFICA QUI: Altezza Mobile aumentata */
    height: 74px !important; 
    
    padding: 0 20px !important; /* Più spazio ai lati */
    border-radius: 20px !important;
    z-index: 9999 !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    
    /* Stile Vetro Mobile */
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
}

.nav-link { font-weight: 500; color: var(--text-muted); font-size: 0.95rem; transition: color 0.2s; position: relative; }
.nav-link:hover { color: var(--brand-primary); }

/* --- BUTTONS --- */
.btn-primary {
    background: var(--brand-primary); color: white; padding: 14px 32px; border-radius: 100px;
    font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 25px -5px rgba(115, 139, 244, 0.4);
}
.btn-primary:hover {
    background: var(--brand-dark); transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(115, 139, 244, 0.6);
}

.btn-secondary {
    background: rgba(255,255,255,0.8); color: var(--text-main); padding: 14px 32px; border-radius: 100px;
    font-weight: 600; text-decoration: none; border: 1px solid rgba(115, 139, 244, 0.2);
    display: inline-flex; align-items: center; gap: 10px; transition: 0.3s; backdrop-filter: blur(4px);
}
.btn-secondary:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: white; }

/* --- STRIP BAR (Ticker Slow) --- */
.strip-container {
    margin-top: 4rem; position: relative; width: 100%; max-width: 1000px;
    margin-left: auto; margin-right: auto;
    background: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255,255,255,0.5); border-bottom: 1px solid rgba(255,255,255,0.5);
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.strip-track { display: flex; gap: 5rem; width: max-content; animation: scrollLogos 80s linear infinite; /* RALLENTATO */ }
.strip-container:hover .strip-track { animation-play-state: paused; }

.logo-item {
    height: 40px; display: flex; align-items: center;
    filter: grayscale(100%) opacity(0.5); transition: all 0.4s ease; cursor: pointer;
}
.logo-item img { height: 100%; width: auto; object-fit: contain; }
.logo-item:hover { filter: grayscale(0%) opacity(1); transform: scale(1.1); }
@keyframes scrollLogos { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- ARCHITECTURE FLOW (Stripe Style - Beam Edition) --- */
.flow-container {
    position: relative; width: 100%; height: 500px; padding: 0;
}
.flow-lines {
    position: absolute; top: 0; left: 0; z-index: 0;
    width: 100%; height: 100%; pointer-events: none;
}

/* New: Long Smooth Beams */
.flow-path {
    stroke-dasharray: 200 1000; /* Beam lungo, gap enorme */
    stroke-dashoffset: 1200; /* Inizia fuori */
    animation: smoothBeam 4s linear infinite;
    opacity: 0.8;
}
.delay-1 { animation-delay: 1.5s; }
.delay-2 { animation-delay: 3s; }
.delay-3 { animation-delay: 2.2s; }

@keyframes smoothBeam {
    to { stroke-dashoffset: 0; }
}

.tech-box {
    background: white; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 16px 20px; min-width: 220px; text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); position: relative; z-index: 2;
    transition: 0.3s; display: flex; flex-direction: column;
}
.tech-box.input-node { border-left: 4px solid #94a3b8; }
.tech-box.output-node { border-left: 4px solid #10b981; }
.tech-box.output-node.highlight { border-color: var(--brand-primary); box-shadow: 0 10px 25px -5px rgba(115, 139, 244, 0.2); }

.tech-box:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }

.tech-box .label { font-size: 0.65rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin-bottom: 4px; }
.tech-box .name { font-weight: 700; color: #1e293b; font-size: 0.95rem; }

/* CORE OS BOX */
.core-os-box {
    width: 240px; height: 240px; background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: white; position: relative; z-index: 5;
    box-shadow: 0 20px 60px rgba(115, 139, 244, 0.4);
    border: 6px solid #2e3b4e;
}
.core-icon-wrap { background: var(--brand-primary); padding: 16px; border-radius: 50%; margin-bottom: 10px; z-index: 2; }
.core-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; z-index: 2; }
.core-badge { font-size: 0.75rem; background: rgba(255,255,255,0.1); padding: 4px 12px; border-radius: 20px; margin-top: 5px; z-index: 2; }

/* Radar Beam */
.scanning-beam {
    position: absolute; width: 100%; height: 100%; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(115, 139, 244, 0.3) 60deg, transparent 60deg);
    animation: radarSpin 4s linear infinite; z-index: 1;
}
@keyframes radarSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* --- CARDS --- */
.glass-card {
    background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 24px; padding: 2.5rem; transition: all 0.4s ease;
}
.glass-card:hover {
    background: rgba(255, 255, 255, 0.9); transform: translateY(-8px);
    border-color: var(--brand-light); box-shadow: 0 20px 40px -10px rgba(115, 139, 244, 0.15);
}
.icon-box {
    width: 50px; height: 50px; border-radius: 14px;
    background: rgba(115, 139, 244, 0.1); color: var(--brand-primary);
    display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; transition: 0.3s;
}
.glass-card:hover .icon-box { background: var(--brand-primary); color: white; transform: rotate(-5deg) scale(1.1); }
.section-padding { padding-top: 6rem; padding-bottom: 6rem; }
/* --- STRIPE-STYLE GRID SECTION --- */

.stripe-grid-wrapper {
    position: relative;
    width: 500px;
    height: 400px;
    /* La griglia sottile di sfondo */
    background-image: 
        linear-gradient(rgba(226, 232, 240, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226, 232, 240, 0.5) 1px, transparent 1px);
    background-size: 80px 80px; /* Dimensione cella */
    border: 1px solid rgba(226, 232, 240, 0.5);
    /* Maschera per sfumare i bordi */
    mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

/* SVG Lines Layer */
.grid-lines-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    overflow: visible;
}

.line-path {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.line-path.blue-accent {
    stroke: var(--brand-primary);
    stroke-dasharray: 10 10;
    animation: flowDash 30s linear infinite;
}

@keyframes flowDash {
    to { stroke-dashoffset: -1000; }
}

/* Grid Boxes */
.grid-box {
    position: absolute;
    width: 80px; height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Ghost Boxes (Decorativi) */
.grid-box.ghost {
    border: 1px solid rgba(115, 139, 244, 0.2);
    background: rgba(255, 255, 255, 0.3);
    z-index: 0;
}
.grid-box.ghost:hover {
    background: rgba(115, 139, 244, 0.05);
}

/* Active Boxes (Con contenuto) */
.grid-box.active {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    z-index: 2;
    cursor: default;
}

.grid-box.active:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--brand-light);
}

/* Styling specifico per Core Node */
.grid-box.active.core {
    width: 90px; height: 90px; /* Leggermente più grande */
    border-color: var(--brand-primary);
    box-shadow: 0 10px 25px -5px rgba(115, 139, 244, 0.25);
    z-index: 3;
}

/* Icon Wrappers */
.icon-wrap {
    width: 32px; height: 32px;
    margin-bottom: 8px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    color: #64748b;
}
.icon-wrap i { width: 20px; height: 20px; }

.icon-wrap.main { width: 40px; height: 40px; }
.icon-wrap.main img { width: 100%; height: 100%; object-fit: contain; }

.icon-wrap.success { color: #10b981; background: #ecfdf5; }
.icon-wrap.warning { color: #f59e0b; background: #fffbeb; }

/* Labels */
.grid-box .label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-main);
    font-family: var(--font-display);
}

/* Mobile Responsiveness for Diagram */
@media (max-width: 640px) {
    .stripe-grid-wrapper {
        transform: scale(0.7); /* Riduci tutto su mobile */
        margin: -40px 0; /* Compensa lo spazio vuoto */
    }
}
/* --- STRIPE-STYLE INTEGRATION (Clean & Flow Version) --- */

.stripe-section-bg {
    background-color: transparent; 
    background-image: none; /* NESSUNA GRIGLIA, PULITO */
}

.integration-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 500px;
    margin: 0 auto;
}

/* Layer SVG */
.integration-lines {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    overflow: visible;
}

/* 1. Il Cavo Fisico (Statico) */
.connector-wire {
    fill: none;
    stroke: #cbd5e1; /* Grigio chiaro */
    stroke-width: 1.5;
    opacity: 0.4; /* Sottile */
}

/* 2. Il Flusso Dati (Animato) */
.connector-data {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    /* Definisce i "pacchetti": 15px di colore, 185px di spazio vuoto */
    stroke-dasharray: 15 185; 
    stroke-dashoffset: 200; /* Punto di partenza */
    animation: flowPulse 3s linear infinite;
}

/* Colore differenziato per Input (blu scuro/neutro) e Output (Brand/Verde) */
.data-input { stroke: #64748b; opacity: 0.6; }
.data-output { stroke: var(--brand-primary); opacity: 0.9; filter: drop-shadow(0 0 3px rgba(115, 139, 244, 0.5)); }

/* Animazione che muove i pacchetti lungo la linea */
@keyframes flowPulse {
    to { stroke-dashoffset: 0; }
}

/* --- CARDS STYLE (Invariato) --- */
.app-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 12px;
    width: 72px; height: 72px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 20px -5px rgba(115, 139, 244, 0.15), 0 0 0 1px rgba(115, 139, 244, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.app-card:hover {
    background: #ffffff; transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 30px -5px rgba(115, 139, 244, 0.25), 0 0 0 2px rgba(115, 139, 244, 0.1); z-index: 20;
}
.app-card.core-node {
    width: 100px; height: 100px; background: #ffffff;
    box-shadow: 0 20px 50px -10px rgba(115, 139, 244, 0.4), 0 0 0 1px rgba(115, 139, 244, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
}
.app-card img, .app-card i { width: 32px; height: 32px; object-fit: contain; color: #64748b; transition: 0.3s; }
.app-card.core-node img { width: 48px; height: 48px; }
.app-label {
    position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%);
    font-size: 11px; font-weight: 700; color: #64748b; white-space: nowrap; opacity: 0; transition: 0.3s; pointer-events: none;
    font-family: var(--font-display); background: rgba(255,255,255,0.9); padding: 3px 8px; border-radius: 100px;
    box-shadow: 0 4px 10px rgba(115, 139, 244, 0.1); border: 1px solid rgba(115, 139, 244, 0.1);
}
.app-card:hover .app-label, .app-card.show-label .app-label { opacity: 1; bottom: -32px; }
@media (max-width: 768px) { .integration-wrapper { transform: scale(0.65); transform-origin: center top; height: 350px; margin-top: 2rem; } }
/* --- MODULES BENTO GRID (Colored & Animated) --- */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}
@media (min-width: 768px) { .bento-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .bento-grid { grid-template-columns: repeat(12, 1fr); } }

/* Layout Colonne */
.col-span-4 { grid-column: span 12; }
@media (min-width: 1024px) { .col-span-4 { grid-column: span 4; } }
.col-span-6 { grid-column: span 12; }
@media (min-width: 1024px) { .col-span-6 { grid-column: span 6; } }

/* STILE CARD */
.bento-item {
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; flex-direction: column; justify-content: space-between;
    
    /* Base style: sfondo bianco pulito con bordo sottile */
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

/* Color Themes per Card */
.card-vision { --accent-color: #6366f1; --bg-tint: rgba(99, 102, 241, 0.03); } /* Indigo */
.card-accounting { --accent-color: #10b981; --bg-tint: rgba(16, 185, 129, 0.03); } /* Emerald */
.card-workflow { --accent-color: #f59e0b; --bg-tint: rgba(245, 158, 11, 0.03); } /* Amber */
.card-chasing { --accent-color: #ec4899; --bg-tint: rgba(236, 72, 153, 0.03); } /* Pink */
.card-webapp { --accent-color: #3b82f6; --bg-tint: rgba(59, 130, 246, 0.03); } /* Blue */

/* Applicazione Colori */
.bento-item { background-color: var(--bg-tint); }

.bento-item:hover {
    transform: translateY(-5px);
    /* Bordo colorato e Ombra colorata */
    border-color: var(--accent-color);
    box-shadow: 
        0 20px 40px -5px rgba(0,0,0,0.05),
        0 0 0 1px var(--accent-color); /* Finto bordo extra */
}

/* Icona colorata */
.module-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: #ffffff; border: 1px solid rgba(0,0,0,0.05);
    color: var(--accent-color);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px; transition: all 0.3s ease;
}
.bento-item:hover .module-icon {
    background: var(--accent-color); color: white;
    transform: rotate(-5deg) scale(1.1);
    border-color: transparent;
}

/* Tag */
.tech-tag {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 4px 10px; border-radius: 100px;
    background: #ffffff; color: #64748b; border: 1px solid #e2e8f0;
    display: inline-block; margin-bottom: 12px;
}

/* --- LINK CON SOTTOLINEATURA ANIMATA --- */
.learn-more-link {
    margin-top: 20px;
    font-size: 14px; font-weight: 700; 
    color: var(--accent-color); /* Prende il colore della card */
    display: inline-flex; align-items: center; gap: 8px;
    position: relative;
    text-decoration: none;
    width: fit-content;
    opacity: 0.8; transition: opacity 0.3s;
}

.bento-item:hover .learn-more-link { opacity: 1; }

/* Linea che appare */
.learn-more-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0); /* Parte invisibile */
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.learn-more-link:hover::after {
    transform: scaleX(1); /* Si espande */
    transform-origin: bottom left;
}

.learn-more-link i { transition: transform 0.3s; }
.learn-more-link:hover i { transform: translateX(4px); }
/* --- TECH STACK ANIMATIONS --- */

/* 1. Laser Scan Effect */
.scan-beam {
    fill: url(#scanGradient);
    opacity: 0.5;
    animation: scanMove 3s ease-in-out infinite;
}

@keyframes scanMove {
    0%, 100% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    50% { transform: translateY(120px); opacity: 1; }
    90% { opacity: 0; }
}

/* 2. Data Packets Flow */
.data-packet {
    fill: var(--brand-primary);
    animation: moveData 2s linear infinite;
    opacity: 0;
}

@keyframes moveData {
    0% { offset-distance: 0%; opacity: 1; }
    90% { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}

/* 3. Typing Effect (Simula inserimento campi nel gestionale) */
.erp-field {
    fill: #f1f5f9; /* Colore vuoto */
    transition: fill 0.3s;
    animation: autoType 3s steps(1) infinite;
}

@keyframes autoType {
    0%, 30% { fill: #f1f5f9; } /* Vuoto */
    35% { fill: #cbd5e1; } /* Campo 1 scritto */
    40% { fill: #cbd5e1; }
    45% { fill: #94a3b8; } /* Campo 2 scritto */
    100% { fill: #94a3b8; }
}

/* 4. Success Pulse (Riconciliazione) */
.reconcile-check {
    transform-origin: center;
    animation: successPulse 3s ease infinite;
}

@keyframes successPulse {
    0%, 60% { transform: scale(0.8); opacity: 0.5; stroke: #94a3b8; }
    70% { transform: scale(1.2); opacity: 1; stroke: #10b981; }
    80%, 100% { transform: scale(1); opacity: 1; stroke: #10b981; }
}
/* --- TECH STACK PRO ANIMATIONS --- */

/* Flusso dati nei cavi */
.circuit-flow {
    fill: none;
    stroke: var(--brand-primary);
    stroke-width: 2;
    stroke-dasharray: 10 10;
    opacity: 0.6;
    animation: dashFlow 1s linear infinite;
}

@keyframes dashFlow {
    to { stroke-dashoffset: -20; }
}

/* Scansione Laser High-Tech */
.laser-line {
    fill: url(#laserGradient);
    opacity: 0.8;
    animation: laserScan 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes laserScan {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100px); opacity: 0; }
}

/* Pulsazione del Core AI */
.core-pulse {
    animation: pulseGlow 3s ease-in-out infinite;
    transform-origin: center;
}

@keyframes pulseGlow {
    0%, 100% { r: 25; opacity: 0.2; }
    50% { r: 35; opacity: 0.1; }
}

/* UI Loading Bars (ERP) */
.ui-loader {
    fill: #e2e8f0;
    animation: loadBar 2s ease-out infinite;
    transform-origin: left;
}

@keyframes loadBar {
    0% { transform: scaleX(0); fill: #e2e8f0; }
    50% { fill: #94a3b8; }
    100% { transform: scaleX(1); fill: #64748b; }
}

/* Checkmark animata */
.check-draw {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawCheck 2s ease-in-out infinite;
    animation-delay: 0.5s;
}

@keyframes drawCheck {
    0% { stroke-dashoffset: 50; opacity: 0; }
    20% { opacity: 1; }
    50%, 90% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}
/* --- REAL WORLD SIMULATION ANIMATIONS --- */

/* 1. Raggio Scanner che legge il documento */
.doc-scanner {
    fill: url(#scanGradient);
    animation: scanDocument 3s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes scanDocument {
    0%, 100% { transform: translateY(0); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    50% { transform: translateY(80px); }
}

/* 2. Dati che volano (Particelle) */
.flying-data {
    offset-path: path('M120,100 C200,100 250,150 380,80');
    animation: transportData 3s linear infinite;
    opacity: 0;
}
.flying-data.path-2 {
    offset-path: path('M120,100 C200,100 250,150 380,240');
    animation-delay: 0.5s;
}

@keyframes transportData {
    0% { offset-distance: 0%; opacity: 0; transform: scale(0.5); }
    10% { opacity: 1; transform: scale(1); }
    90% { opacity: 1; transform: scale(1); }
    100% { offset-distance: 100%; opacity: 0; transform: scale(0.5); }
}

/* 3. Effetto "Ghost Typing" (Scrittura automatica) */
.ghost-type {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: typeWrite 3s steps(20) infinite;
}

.ghost-type.delay-1 { animation-delay: 0.8s; }
.ghost-type.delay-2 { animation-delay: 1.6s; }

@keyframes typeWrite {
    0% { stroke-dashoffset: 40; } /* Vuoto */
    30% { stroke-dashoffset: 40; } /* Pausa iniziale */
    60% { stroke-dashoffset: 0; }  /* Scritto */
    90% { stroke-dashoffset: 0; }  /* Pausa finale */
    100% { stroke-dashoffset: 0; }
}

/* 4. Bank Match (Rosso -> Verde) */
.bank-status-icon {
    animation: statusFlip 3s step-end infinite;
}
.bank-row-bg {
    animation: rowHighlight 3s step-end infinite;
}

@keyframes statusFlip {
    0%, 65% { fill: #ef4444; } /* Rosso (Pending) */
    66%, 100% { fill: #10b981; } /* Verde (Matched) */
}

@keyframes rowHighlight {
    0%, 65% { fill: #ffffff; }
    66%, 100% { fill: #f0fdf4; stroke: #bbf7d0; }
}
/* --- INTERACTIVE DEMO STYLES --- */

/* 1. Interactive Nodes (Hover effects) */
.interactive-node {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.interactive-node:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 10px 15px rgba(99, 102, 241, 0.2));
}
.interactive-node:hover rect, 
.interactive-node:hover path {
    stroke: var(--brand-primary);
}

/* 2. Tooltip (Pop-up info) */
.tech-tooltip {
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    transform: translateY(10px);
}
.group:hover .tech-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* 3. Animation Control Classes (Gestite via JS) */
.anim-idle .doc-scanner,
.anim-idle .flying-data,
.anim-idle .ghost-type,
.anim-idle .bank-status-icon,
.anim-idle .bank-row-bg {
    animation: none !important; /* Ferma tutto se idle */
    opacity: 0;
}

/* Quando attiviamo la demo, le animazioni partono */
.anim-active .doc-scanner { animation: scanDocument 2s ease-in-out forwards; opacity: 1; }
.anim-active .flying-data { animation: transportData 1.5s linear forwards; animation-delay: 1.5s; opacity: 1; }
.anim-active .ghost-type { animation: typeWrite 2s steps(20) forwards; animation-delay: 2.5s; opacity: 1; stroke-dashoffset: 0; }

/* Status finale */
.anim-active .bank-row-bg { animation: rowHighlight 0.5s step-end forwards; animation-delay: 4s; }
.anim-active .bank-status-icon { animation: statusFlip 0.5s step-end forwards; animation-delay: 4s; }

/* Pulsante Play */
.play-btn-pulse {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    animation: pulse-btn 2s infinite;
}
@keyframes pulse-btn {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}
/* --- STATIC DEMO STYLES (No Movement) --- */

/* 1. Nodi SVG (FERMI) */
.interactive-node {
    /* Nessun cursore pointer se non sono cliccabili singolarmente */
    cursor: default; 
}

/* Rimosso ogni effetto hover sui nodi. Ora sono solidi. */
.node-visuals {
    transform: none !important;
    filter: none !important;
}

/* Tooltip (Statici o appaiono discretamente senza muovere nulla) */
.tech-tooltip {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    transform: translateY(5px); /* Posizione fissa */
    z-index: 50;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Mostra tooltip solo con fade in, niente movimento */
.interactive-node:hover + .tech-tooltip {
    opacity: 1;
}

/* 2. Animazioni FLUSSO (Attive solo durante la demo) */
.anim-idle .doc-scanner,
.anim-idle .flying-data,
.anim-idle .ghost-type,
.anim-idle .bank-status-icon,
.anim-idle .bank-row-bg {
    animation: none !important; opacity: 0;
}

.anim-active .doc-scanner { animation: scanDocument 2s ease-in-out forwards; opacity: 1; }
.anim-active .flying-data { animation: transportData 1.5s linear forwards; animation-delay: 1.5s; opacity: 1; }
.anim-active .ghost-type { animation: typeWrite 2s steps(20) forwards; animation-delay: 2.5s; opacity: 1; stroke-dashoffset: 0; }
.anim-active .bank-row-bg { animation: rowHighlight 0.5s step-end forwards; animation-delay: 4s; }
.anim-active .bank-status-icon { animation: statusFlip 0.5s step-end forwards; animation-delay: 4s; }

/* 3. SUPER BUTTON (Solido & Fermo) */
.btn-tech-primary {
    position: relative;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 
        0 4px 6px -1px rgba(79, 70, 229, 0.2), 
        0 10px 15px -3px rgba(79, 70, 229, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: filter 0.2s ease, background 0.2s ease; /* Solo transizione colore/luce */
    overflow: hidden;
    transform: none !important; /* BLOCCATO */
}

/* Hover State: Solo Luce, NESSUN MOVIMENTO */
.btn-tech-primary:hover {
    filter: brightness(1.15); /* Diventa solo più luminoso */
    transform: none !important; /* Si assicura che resti fermo */
    box-shadow: 
        0 4px 6px -1px rgba(79, 70, 229, 0.2), 
        0 10px 15px -3px rgba(79, 70, 229, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.2); /* Ombra identica */
}

/* Active / Click State: Effetto pressione minimo */
.btn-tech-primary:active {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%); /* Si scurisce leggermente */
    transform: none !important;
}
/* --- VISION SECTION: THE GLASS MONOLITH (Vivid & Clear) --- */

.vision-section {
    position: relative;
    background: radial-gradient(circle at 60% 50%, #f1f5f9 0%, #ffffff 100%);
    overflow: hidden;
}

.monolith-container {
    perspective: 1600px; /* Prospettiva profonda */
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Gruppo che ruota */
.glass-stack {
    position: relative;
    width: 340px; /* Più largo per leggere meglio */
    height: 420px;
    transform-style: preserve-3d;
    transform: rotateX(60deg) rotateZ(-30deg) translateZ(-50px);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: stackFloat 8s ease-in-out infinite;
}

/* Hover: raddrizza leggermente per leggere meglio */
.monolith-container:hover .glass-stack {
    transform: rotateX(50deg) rotateZ(-20deg) translateZ(0px);
}

@keyframes stackFloat {
    0%, 100% { transform: rotateX(60deg) rotateZ(-30deg) translateZ(-50px); }
    50% { transform: rotateX(58deg) rotateZ(-30deg) translateZ(-30px); }
}

/* --- GLI STRATI COLORATI --- */
.stack-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Layer 1: BASE (Titanio - Industria) */
.layer-base {
    transform: translateZ(0px);
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.9), rgba(203, 213, 225, 0.8));
    border: 2px solid #cbd5e1;
    z-index: 1;
}

/* Layer 2: CORE (Viola - Orchestration) */
.layer-core {
    transform: translateZ(100px);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(124, 58, 237, 0.2));
    border: 2px solid rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
    z-index: 2;
}

/* Layer 3: TOP (Smeraldo - Successo) */
.layer-top {
    transform: translateZ(200px);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.2));
    border: 2px solid rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.2);
    z-index: 3;
}

/* Hover Separation Effect (Esplosione controllata) */
.monolith-container:hover .layer-core { transform: translateZ(160px); }
.monolith-container:hover .layer-top { transform: translateZ(320px); }

/* --- CONTENUTO INTERNO (Testo Leggibile) --- */
.layer-content {
    transform: rotateZ(30deg) rotateX(-60deg); /* Contro-rotazione fissa */
    text-align: center;
    background: rgba(255,255,255,0.8); /* Sfondo testo per leggibilità */
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    border: 1px solid rgba(255,255,255,0.9);
}

/* Beam Centrale */
.energy-beam {
    position: absolute; top: 50%; left: 50%; width: 4px; height: 300px;
    background: linear-gradient(to top, #94a3b8 0%, #6366f1 50%, #10b981 100%);
    transform: translate(-50%, -50%) rotateX(90deg);
    opacity: 0.8;
    filter: blur(2px);
}
/* --- BOOKING SECTION: HIGH CONVERSION CLEAN --- */

.booking-section {
    position: relative;
    background: #ffffff; /* Bianco puro */
    overflow: hidden;
}

/* Luce ambientale soffusa (no griglia) */
.ambient-soft-glow {
    position: absolute;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
    top: 50%; left: 0;
    transform: translate(-30%, -50%);
    pointer-events: none;
    z-index: 0;
}

/* Card Calendario */
.calendar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    /* Ombra "Elevata" molto morbida premium */
    box-shadow: 
        0 20px 40px -5px rgba(0, 0, 0, 0.08), 
        0 10px 10px -5px rgba(0, 0, 0, 0.02),
        0 0 0 1px rgba(0,0,0,0.01);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* BENEFIT CARDS (Converting Elements) */
.benefit-card {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc; /* Sfondo leggero per contrasto */
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.benefit-card:hover {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateX(5px); /* Micro-movimento invito */
}

.benefit-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: #ffffff; color: #4f46e5;
    border: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Social Proof Badges */
.avatar-initials {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: white;
    border: 3px solid #ffffff; /* Bordo bianco spesso per separazione */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

/* Badge Garanzia */
.trust-badge {
    display: inline-flex; items-center; gap: 6px;
    padding: 6px 12px; background: #ecfdf5; 
    color: #059669; font-size: 11px; font-weight: 700; 
    border-radius: 100px; text-transform: uppercase; letter-spacing: 0.05em;
    border: 1px solid #d1fae5;
}
/* --- FOOTER STYLES --- */

.footer-section {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    font-family: var(--font-body);
}

.footer-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: #0f172a;
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 1rem;
}

.footer-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0f172a; /* Slate 900 */
    margin-bottom: 1.25rem;
}

.footer-link {
    display: block;
    color: #64748b; /* Slate 500 */
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--brand-primary);
    transform: translateX(2px);
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Indicatore Status "Operational" */
.system-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 100px;
    font-size: 10px; font-weight: 600; color: #15803d;
}
/* --- MOBILE FIXES (Sistemiamo l'immagine che hai mandato) --- */


/* --- FIX MOBILE DEFINITIVO --- */
@media (max-width: 768px) {
    /* Navbar fissa in alto, più compatta */
    /* Navbar fissa e centrata senza sbordare */
/* Navbar fissa e centrata senza sbordare (Mobile Bigger) */
.glass-navbar {
    position: fixed !important;
    top: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 92% !important; 
    max-width: 1200px;
    
    /* MODIFICA QUI: Altezza Mobile aumentata */
    height: 74px !important; 
    
    padding: 0 20px !important; /* Più spazio ai lati */
    border-radius: 20px !important;
    z-index: 9999 !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    
    /* Stile Vetro Mobile */
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
}

    /* Nascondi elementi desktop in modo aggressivo */
    .hidden.md\:flex {
        display: none !important;
    }

    /* Assicura che il contenuto della pagina non finisca sotto la navbar */
    body {
        padding-top: 0 !important;
    }
    
    /* La prima sezione deve avere padding per scendere sotto la navbar */
    main > section:first-of-type, 
    body > section:first-of-type {
        padding-top: 8rem !important;
    }

    /* Testi ridimensionati per evitare l'overlap */
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
}
/* --- FIX MOBILE OVERFLOW & NAVBAR --- */
html, body {
    overflow-x: hidden; /* BLOCCA SCROLL LATERALE */
    width: 100%;
    position: relative;
}

/* --- GLASS NAVBAR (Updated: Ultra Transparent) --- */
.glass-navbar {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    width: 95%; max-width: 1200px; height: 72px; z-index: 100;
    
    /* MODIFICA QUI: Sfondo quasi trasparente (10%) e Blur alto */
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%); /* Supporto Safari */
    
    /* Bordo sottilissimo e trasparente */
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    border-radius: 100px;
    box-shadow: 0 8px 32px -10px rgba(115, 139, 244, 0.1);
    display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem;
    transition: all 0.3s ease;
}

/* Menu Mobile Dropdown a tutto schermo */
#mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    z-index: 9998; /* Subito sotto la navbar (o sopra se vuoi coprire tutto) */
    padding-top: 100px; /* Spazio per non finire sotto la navbar */
    transform: translateY(-150%); /* Nascosto in alto */
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

#mobile-menu-overlay.open {
    transform: translateY(0); /* Visibile */
}

/* Nascondi elementi desktop su mobile */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
}
/* --- NEW BUTTON ANIMATION (Gradient Border) --- */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.btn-glowing-anim {
    position: relative;
    /* Colore di sfondo interno del bottone */
    background: #4f46e5; 
    color: white;
    font-weight: 700;
    display: inline-flex;
    justify-content: center; /* CENTRA IL TESTO Orizzontale */
    align-items: center;     /* CENTRA IL TESTO Verticale */
    text-align: center;
    padding: 16px 32px;
    border-radius: 100px; /* Pill shape */
    z-index: 1;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.5);
}

/* Il bordo rotante */
.btn-glowing-anim::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; 
    height: 100%;
    padding: 3px; /* SPESSORE DEL BORDO */
    border-radius: 100px;
    background: conic-gradient(from var(--angle), transparent 20%, #ffffff 50%, transparent 80%);
    -webkit-mask: 
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateBorder 3s linear infinite;
    z-index: 2;
    pointer-events: none;
}

/* Hover effect */
.btn-glowing-anim:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px -5px rgba(79, 70, 229, 0.6);
}

@keyframes rotateBorder {
    to { --angle: 360deg; }
}

/* Fallback per browser che non supportano @property (vecchi safari) */
@supports not (background: paint(something)) {
    .btn-glowing-anim::before {
        background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.8));
    }
}


/* --- MOBILE FIXES AGGIORNATI --- */
/* --- MOBILE OPTIMIZATION V3 (Vertical Architecture Fix) --- */

@media (max-width: 768px) {
    
    /* 1. NAVBAR FIX */
    /* Navbar fissa e centrata senza sbordare (Mobile Bigger) */
/* Navbar fissa e centrata senza sbordare (Mobile Bigger) */
.glass-navbar {
    position: fixed !important;
    top: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 92% !important; 
    max-width: 1200px;
    
    /* MODIFICA QUI: Altezza Mobile aumentata */
    height: 74px !important; 
    
    padding: 0 20px !important; /* Più spazio ai lati */
    border-radius: 20px !important;
    z-index: 9999 !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    
    /* Stile Vetro Mobile */
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
}
    /* 2. TYPOGRAPHY SCALING */
    h1, h2 { 
        word-wrap: break-word; /* Evita rotture layout su parole lunghe */
    }
    
    .text-3xl, .text-4xl, .text-5xl {
        font-size: 2rem !important; 
        line-height: 1.2 !important;
    }

    /* 3. DIAGRAMMA VERTICALE */
    .integration-wrapper {
        /* Reset proprietà desktop */
        min-width: 0 !important; 
        width: 100% !important;
        
        /* ALTEZZA FISSA CALCOLATA */
        /* Il diagramma originale è 500px. Scalato a 0.55 diventa ~275px. 
           Diamo un po' di margine (320px) per le etichette che sporgono */
        height: 320px !important; 
        
        /* SCALING */
        /* Riduce il diagramma al 55% della grandezza originale */
        transform: scale(0.55) !important;
        
        /* PUNTO DI ANCORAGGIO */
        /* Importante: Top Center per tenerlo centrato sotto il testo */
        transform-origin: top center !important;
        
        /* Posizionamento */
        position: relative !important;
        margin-top: 20px !important; /* Distanza dal testo sopra */
        margin-left: auto !important;
        margin-right: auto !important;
        
        /* Assicuriamoci che si veda tutto */
        overflow: visible !important; 
    }

    /* Centra leggermente le card interne se necessario */
    .integration-wrapper .app-card {
        /* Piccolo aggiustamento ottico se le card sembrano spostate */
        transform: translateZ(0); 
    }
    
    /* Riduce leggermente le card e le icone per leggibilità su mobile */
    .app-card {
        padding: 8px !important;
        width: 60px !important; 
        height: 60px !important;
    }
    .app-card.core-node {
        width: 90px !important;
        height: 90px !important;
    }
    .app-label {
        font-size: 14px !important; /* Etichette più leggibili */
        bottom: -35px !important; /* Spazio per non coprire le linee */
        opacity: 1 !important; /* Sempre visibili su mobile */
    }
}
/* --- MOBILE ARCHITECTURE VIZ (ANIMATED) --- */

/* Stile Base Card */
.mob-card {
    width: 52px; height: 52px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

/* 1. Animazione Flusso Linee (Sfondo) */
.flow-line {
    stroke: url(#lineGradient); /* Usa il gradiente definito nell'HTML */
    stroke-width: 2;
    stroke-dasharray: 6 6; /* Trattini più visibili */
    animation: flowDashMove 3s linear infinite;
}

@keyframes flowDashMove {
    from { stroke-dashoffset: 24; }
    to { stroke-dashoffset: 0; }
}

/* 2. Animazione Core Centrale (Pulsazione tipo cuore) */
.mob-core-card {
    width: 86px; height: 86px;
    background: white;
    border: 2px solid #738bf4; /* Bordo colorato */
    border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    z-index: 20;
    animation: coreHeartbeat 3s ease-in-out infinite;
}

/* Anello che si espande dietro il core */
.core-pulse-ring {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 22px;
    border: 2px solid #738bf4;
    animation: ringRipple 3s ease-out infinite;
    z-index: -1;
}

@keyframes coreHeartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 10px 25px -5px rgba(115, 139, 244, 0.4); }
}

@keyframes ringRipple {
    0% { transform: scale(1); opacity: 0.8; }
    80% { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* 3. Animazione Card Inputs (Galleggiamento leggero) */
.mob-input-card {
    animation: gentleFloat 4s ease-in-out infinite;
}

/* 4. Animazione Card Outputs (Attivazione) */
.mob-output-card {
    animation: activePulse 4s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes activePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); filter: brightness(1.05); }
}

/* Etichette */
.mob-label {
    position: absolute;
    bottom: -22px; left: 50%; transform: translateX(-50%);
    font-size: 10px; font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Ritardi per rendere l'animazione organica */
.delay-1 { animation-delay: 0.8s; }
.delay-2 { animation-delay: 1.6s; }
.delay-3 { animation-delay: 2.4s; }
/* --- MOBILE ANIMATION: SMOOTH & CENTERED --- */

/* Cards Input */
.mob-card {
    width: 64px; height: 64px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 18px; /* Più arrotondato */
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02); /* Ombra più soffusa */
    z-index: 20;
    position: relative;
    background-clip: padding-box;
}

/* Cards Output */
.mob-card-out {
    width: 74px; height: 74px;
    border-radius: 18px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 1px solid transparent;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    z-index: 20;
    position: relative;
}

/* Core Centrale */
.mob-core-container { 
    position: relative; 
    z-index: 30; 
    display: flex; 
    justify-content: center; 
}

.mob-core-card {
    width: 110px; height: 110px; /* Leggermente più grande per importanza */
    background: white;
    border-radius: 28px;
    display: flex; align-items: center; justify-content: center;
    /* Ombra profonda ma morbida */
    box-shadow: 0 20px 40px -10px rgba(115, 139, 244, 0.25);
    border: 4px solid white; /* Bordo bianco spesso per pulizia visiva */
}

/* --- ANIMAZIONI LINEE SMOOTH --- */

.connector-base {
    stroke: #e2e8f0; /* Grigio più chiaro */
    stroke-width: 1.5;
    stroke-dasharray: 6 6;
}

.connector-flow-smooth, .connector-flow-out-smooth {
    stroke: url(#smoothEnergy);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 60 400; /* Scia più lunga e morbida */
    stroke-dashoffset: 460;
    filter: drop-shadow(0 0 3px rgba(115, 139, 244, 0.4));
}

/* Flusso in entrata (Rallentato e fluido) */
.connector-flow-smooth { animation: flowInSmooth 4s cubic-bezier(0.45, 0, 0.55, 1) infinite; }

/* Flusso in uscita */
.connector-flow-out-smooth { animation: flowOutSmooth 4s cubic-bezier(0.45, 0, 0.55, 1) infinite; }

@keyframes flowInSmooth {
    0% { stroke-dashoffset: 460; opacity: 0; }
    15% { opacity: 1; }
    55% { stroke-dashoffset: 0; opacity: 1; }
    60% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes flowOutSmooth {
    0% { opacity: 0; }
    50% { stroke-dashoffset: 460; opacity: 0; }
    55% { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}

/* --- ANIMAZIONI OGGETTI SMOOTH --- */

/* Core che respira (Molto lento e delicato) */
.smooth-breath {
    animation: breathSoft 5s ease-in-out infinite;
}
@keyframes breathSoft {
    0%, 100% { transform: scale(1); box-shadow: 0 20px 40px -10px rgba(115, 139, 244, 0.25); }
    50% { transform: scale(1.03); box-shadow: 0 25px 50px -10px rgba(115, 139, 244, 0.35); }
}

/* Galleggiamento impercettibile */
.float-anim-smooth { animation: floatSoft 6s ease-in-out infinite; }
@keyframes floatSoft { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-3px); } 
}

/* Reazione Output (Delicata) */
.pop-anim-smooth { animation: popSoft 4s infinite; }
@keyframes popSoft {
    0%, 85% { transform: scale(1); }
    92% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Delays */
.delay-1 { animation-delay: 1.2s; }
.delay-2 { animation-delay: 2.4s; }
.delay-3 { animation-delay: 3s; }
/* --- FIX DEMO MOBILE --- */
@media (max-width: 768px) {
    #demo-container {
        padding: 1rem !important; /* Meno padding su mobile per dare spazio all'SVG */
        min-height: 250px; /* Altezza minima garantita */
    }
    
    #demo-svg {
        min-width: 100%; /* Occupa tutto lo spazio disponibile */
        height: auto;
    }

    /* Rendi il bottone bello evidente su mobile */
    #run-demo-btn {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

/* Animazione Loader per il bottone */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 1s linear infinite;
}
/* --- FIX MOBILE VISION STACK --- */
@media (max-width: 768px) {
    /* Riduci il contenitore per evitare spazi vuoti enormi */
    .monolith-container {
        height: 320px !important; 
        margin-top: 1rem !important;
        perspective: 800px !important;
    }

    /* Scala il contenuto 3D al 50% per farlo entrare */
    .glass-stack {
        transform: scale(0.5) rotateX(60deg) rotateZ(-30deg) translateZ(-50px) !important;
        width: 100% !important; 
        max-width: 300px !important;
    }

    /* Evita che l'hover su mobile rompa il layout */
    .monolith-container:hover .glass-stack {
        transform: scale(0.5) rotateX(60deg) rotateZ(-30deg) translateZ(-50px) !important;
    }

    /* Riduci dimensioni del testo nei livelli su mobile */
    .layer-content {
        padding: 10px 15px !important;
        min-width: auto !important;
    }
    .layer-content .text-lg {
        font-size: 0.9rem !important;
    }
}
/* Animazione fluida per FAQ */
.faq-details[open] .faq-content {
    animation: fadeInSlide 0.4s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rimuove la freccia predefinita del browser su Safari/Chrome */
.faq-details summary::-webkit-details-marker {
    display: none;
}

.faq-details {
    overflow: hidden; /* Evita glitch durante l'animazione */
}

.faq-details[open] {
    border-color: #6366f1; /* Colore Indigo quando aperto */
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.1);
}
/* --- CHRISTMAS ADDONS --- */

/* Animazione Cappellino */
.christmas-hat-anim {
    animation: hatBob 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

@keyframes hatBob {
    0%, 100% { transform: rotate(-15deg) translateY(0); }
    50% { transform: rotate(-10deg) translateY(-3px); }
}

/* Opzionale: Rendi la scrollbar "natalizia" (Rossa) */
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #ef4444, #b91c1c) !important;
    border-radius: 10px;
}
/* --- CHRISTMAS LIGHTS HERO --- */

/* 1. Effetto Gradiente Natalizio (Rosso -> Oro -> Verde) */
.christmas-gradient {
    background: linear-gradient(to right, #ef4444 0%, #f59e0b 50%, #10b981 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: shineChristmas 4s linear infinite;
}

@keyframes shineChristmas {
    to { background-position: 200% center; }
}

/* 2. Effetto "Luci Attorno" (Alone colorato pulsante) */
.christmas-glow {
    /* Bagliore morbido che cambia colore */
    animation: christmasAmbientLight 5s infinite alternate;
}

@keyframes christmasAmbientLight {
    0% { 
        text-shadow: 0 0 20px rgba(239, 68, 68, 0.3); /* Luce Rossa */
    }
    50% { 
        text-shadow: 0 0 20px rgba(245, 158, 11, 0.3); /* Luce Oro */
    }
    100% { 
        text-shadow: 0 0 20px rgba(16, 185, 129, 0.3); /* Luce Verde */
    }
}
/* --- CHRISTMAS GLOW (Luci Attorno) --- */

.christmas-glow {
    /* Mantiene il testo originale ma aggiunge un alone luminoso che cambia colore */
    animation: ambientGlow 4s infinite alternate;
}

@keyframes ambientGlow {
    0% { 
        /* Luce Rossa */
        filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.6)) drop-shadow(0 0 20px rgba(239, 68, 68, 0.3));
    }
    50% { 
        /* Luce Oro */
        filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6)) drop-shadow(0 0 20px rgba(245, 158, 11, 0.3));
    }
    100% { 
        /* Luce Verde */
        filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.6)) drop-shadow(0 0 20px rgba(16, 185, 129, 0.3));
    }
}
/* --- LEO MASCOT & ANIMATIONS --- */
/* --- LEO MASCOT & ANIMATIONS --- */

/* Classe Base per Leo */
.leo-mascot {
    position: absolute;
    z-index: 20;
    pointer-events: none; /* Lascia cliccare sotto */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animazione "Pop In" allo scroll */
.leo-reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.8);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.leo-reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Animazione Galleggiamento (Parallasse finto) */
.leo-float {
    animation: leoFloat 6s ease-in-out infinite;
}
@keyframes leoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

/* 1. LEO HERO (Sopra il traduttore) */
.leo-hero-pos {
    width: 120px;
    top: -90px;
    right: 40px;
    z-index: 0; /* Dietro al box ma visibile */
    transform: rotate(5deg);
}

/* 2. LEO TARGET (Posizionamenti specifici per le card) */
.leo-target-pmi {
    width: 140px;
    top: -70px;
    right: -20px;
    transform: rotate(10deg);
}
.leo-target-studi {
    width: 130px;
    top: -60px;
    right: 10px;
    transform: rotate(-5deg);
}

/* 3. LEO PRICING (Dietro la card centrale) */
.leo-pricing-peek {
    width: 100px;
    top: -75px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1; /* Dietro la card */
}

/* --- UX IMPROVEMENTS --- */

/* Typewriter Effect per il Traduttore */
.typewriter-text {
    overflow: hidden;
    white-space: pre-wrap; /* Permette a capo */
    animation: fadeInText 0.5s ease-out forwards;
}
@keyframes fadeInText {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Feedback click traduttore */
.translator-wrapper.translating {
    animation: shakeBox 0.3s ease-in-out;
    border: 2px solid #6366f1;
}
@keyframes shakeBox {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* MOBILE FIX: River Timeline */
@media (max-width: 768px) {
    .river-line {
        left: 20px !important;
        border-left: 2px dashed #cbd5e1; /* Linea tratteggiata meno invasiva */
        background: none !important;
        width: 0 !important;
    }
    .river-dot {
        left: 20px !important;
        width: 16px !important; height: 16px !important;
        border-width: 3px !important;
    }
    .river-card {
        margin-left: 45px !important; /* Più spazio dal pallino */
        margin-bottom: 40px !important; /* Respiro verticale */
        width: auto !important;
    }
    
    /* Disabilita 3D pesante su mobile */
    .premium-3d-badge, .premium-cert-landscape, .scene-3d {
        animation: none !important;
        transform: none !important;
        perspective: none !important;
    }
    .premium-3d-badge {
        transform: scale(0.9) !important; /* Solo ridimensionato */
        margin: 0 auto;
    }
}
/* --- FIX POSIZIONAMENTO AVATAR PRICING --- */

/* Wrapper per la card centrale per gestire gli elementi esterni (Leo) */
.pricing-wrapper-premium {
    position: relative;
    z-index: 20;
    margin-top: 40px; /* Spazio extra in alto per la testa di Leo */
}

/* Posizionamento Leo sulla card Academy */
.leo-pricing-top {
    width: 110px;
    position: absolute;
    top: -65px; /* Esce fuori in alto */
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
    z-index: 0; /* Va dietro al badge ma sopra lo sfondo pagina */
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

/* Effetto hover: Leo sbircia su */
.pricing-wrapper-premium:hover .leo-pricing-top {
    transform: translateX(-50%) translateY(-10px) rotate(-2deg);
}

/* Badge "Consigliato" posizionato assolutamente sul wrapper */
.badge-recommended {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30; /* Sopra tutto */
    width: max-content;
}

/* Uniformiamo le icone Lucide nelle liste */
.benefit-list li i {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px; /* Icone più "cicciotte" e visibili */
    flex-shrink: 0;
}
/* --- FIX POSIZIONAMENTO AVATAR PRICING --- */

/* Wrapper per la card centrale */
.pricing-wrapper-premium {
    position: relative;
    z-index: 20;
    margin-top: 80px; /* Aumentato drasticamente per dare spazio alla testa di Leo */
}

/* Posizionamento Leo - VERSIONE POP-UP */
.leo-pricing-top {
    width: 160px; /* Molto più grande (era 110px) */
    position: absolute;
    top: -110px; /* Spostato molto più in alto */
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
    z-index: 0; /* Dietro la card ma visibile */
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3)); /* Ombra per staccarlo dallo sfondo */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Effetto molla */
}

/* Effetto hover: Leo salta fuori */
.pricing-wrapper-premium:hover .leo-pricing-top {
    transform: translateX(-50%) translateY(-15px) scale(1.1) rotate(-3deg);
}

/* Badge "Consigliato" */
.badge-recommended {
    position: absolute;
    top: -18px; /* Posizionato a cavallo del bordo */
    left: 50%;
    transform: translateX(-50%);
    z-index: 30; /* Sopra tutto (Leo e Card) */
    width: max-content;
    pointer-events: none; /* Lascia cliccare sotto */
}

/* Uniformiamo le icone Lucide nelle liste */
.benefit-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.benefit-list li i {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
    flex-shrink: 0;
}
/* --- FIX PRICING (Leo Academy) --- */

.pricing-wrapper-premium {
    position: relative;
    z-index: 20;
    /* AUMENTATO: Crea lo spazio fisico sopra la card per la testa di Leo */
    margin-top: 100px !important; 
    height: 100%;
}

.leo-pricing-top {
    width: 150px; /* Un po' più grande */
    position: absolute;
    /* Tirato molto più su per non essere coperto dal badge */
    top: -115px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 0; /* Dietro la card */
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.pricing-wrapper-premium:hover .leo-pricing-top {
    /* Effetto "Sbuccù" all'hover */
    transform: translateX(-50%) translateY(-10px) scale(1.1);
}

.badge-recommended {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30; /* Sopra tutto */
    width: max-content;
    pointer-events: none;
}

/* --- FIX TARGET CARDS (PMI & STUDI) --- */

.target-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    padding: 2.5rem;
    position: relative;
    /* FONDAMENTALE: Permette a Leo di uscire dai bordi */
    overflow: visible !important; 
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Spinge il footer in basso */
    height: 100%;
}

.leo-target-pos {
    position: absolute;
    width: 110px;
    /* Posizionato a cavallo dell'angolo in alto a destra */
    top: -50px;
    right: -20px;
    z-index: 30;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    transform: rotate(10deg);
    transition: transform 0.4s ease;
}

.target-card:hover .leo-target-pos {
    transform: rotate(0deg) scale(1.1) translateY(-5px);
}

/* Fix Colori e Bordi */
.target-card.pmi:hover { border-color: rgba(59, 130, 246, 0.5); }
.target-card.studi:hover { border-color: rgba(168, 85, 247, 0.5); }

/* Box interni */
.pain-box, .promise-box {
    position: relative;
    z-index: 10;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    background: rgba(0,0,0,0.2);
}
.pain-box { border-left: 4px solid #ef4444; }
.pmi .promise-box { border-left: 4px solid #3b82f6; }
.studi .promise-box { border-left: 4px solid #a855f7; }
/* --- FIX TARGET CARDS & LEO --- */

/* 1. Assicuriamoci che la card non tagli le immagini che escono fuori */
.target-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    padding: 2.5rem;
    position: relative;
    /* FONDAMENTALE: overflow visible permette a Leo di uscire dai bordi */
    overflow: visible !important; 
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    z-index: 1; /* Livello base */
}

/* 2. Ingrandiamo e posizioniamo meglio Leo */
.leo-target-pos {
    position: absolute;
    /* Aumentato da 110px a 180px per renderlo ben visibile */
    width: 180px; 
    height: auto;
    /* Posizionamento a cavallo dell'angolo */
    top: -90px;
    right: -40px;
    z-index: 50; /* Sopra a tutto */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4)); /* Ombra per staccarlo dallo sfondo */
    transform: rotate(10deg);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Effetto molla fluido */
    pointer-events: none; /* Così puoi cliccare sulla card anche se tocchi l'immagine */
}

/* 3. Effetto Hover: Leo "salta" e si raddrizza */
.target-card:hover .leo-target-pos {
    transform: rotate(0deg) scale(1.1) translateY(-10px);
}

/* Fix Colori Hover (già presenti, ma per sicurezza) */
.target-card.pmi:hover { border-color: rgba(59, 130, 246, 0.5); }
.target-card.studi:hover { border-color: rgba(168, 85, 247, 0.5); }
/* --- ULTRA PREMIUM TARGET SECTION (Fix Mascotte + High Appeal) --- */

/* 1. La Card Principale (Contenitore) */
.target-card {
    /* Glassmorphism Scuro & Premium */
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* Bordo sottile e luminoso */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem; /* 32px */
    padding: 3rem 2.5rem; /* Spaziatura interna generosa */
    
    /* Layout */
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    
    /* FONDAMENTALE: Permette alla mascotte di "uscire" dai bordi */
    overflow: visible !important; 
    
    /* Transizioni fluide */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.4s ease, 
                border-color 0.4s ease;
    z-index: 1;
}

/* 2. Effetti Hover sulla Card */
.target-card:hover {
    transform: translateY(-10px); /* Si solleva */
    z-index: 10; /* Passa in primo piano */
}

/* Specifico per PMI (Blu) */
.target-card.pmi:hover {
    border-color: rgba(59, 130, 246, 0.5); /* Blue-500 */
    box-shadow: 0 25px 60px -15px rgba(37, 99, 235, 0.25), 
                inset 0 0 40px rgba(37, 99, 235, 0.05); /* Glow interno */
}

/* Specifico per Studi (Viola) */
.target-card.studi:hover {
    border-color: rgba(168, 85, 247, 0.5); /* Purple-500 */
    box-shadow: 0 25px 60px -15px rgba(168, 85, 247, 0.25), 
                inset 0 0 40px rgba(168, 85, 247, 0.05); /* Glow interno */
}

/* 3. La Mascotte "Leo" (Il Fix Principale) */
.leo-target-pos {
    position: absolute;
    /* Dimensioni aumentate per impatto visivo */
    width: 160px; 
    height: auto;
    
    /* Posizionamento "a cavallo" dell'angolo in alto a destra */
    top: -85px;   /* Esce fuori in alto */
    right: -30px; /* Esce fuori a destra */
    
    z-index: 50; /* Sopra a tutto */
    
    /* Effetti visivi */
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.5)); /* Ombra profonda per staccarlo */
    transform: rotate(5deg) scale(1);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none; /* Lascia cliccare la card sotto */
}

/* Animazione Leo all'hover della card */
.target-card:hover .leo-target-pos {
    transform: rotate(0deg) scale(1.15) translateY(-5px); /* Pop-up effect */
}

/* 4. Icona Sfondo Sfumata (Decorazione) */
.bg-icon-faded {
    position: absolute;
    bottom: -20px;
    right: -20px;
    opacity: 0.03; /* Molto sottile */
    transform: rotate(-15deg) scale(1);
    transition: all 0.6s ease;
    pointer-events: none;
    z-index: 0;
}
.bg-icon-faded svg { width: 250px; height: 250px; } /* Icona gigante */

.target-card:hover .bg-icon-faded {
    opacity: 0.08;
    transform: rotate(0deg) scale(1.1);
}

/* 5. Box "Il Problema" (Pain) */
.pain-box {
    position: relative;
    background: rgba(239, 68, 68, 0.08); /* Rosso molto trasparente */
    border-left: 3px solid #ef4444;      /* Linea rossa solida */
    padding: 1.25rem 1.5rem;
    border-radius: 0 1rem 1rem 0;        /* Arrotondato solo a destra */
    margin-bottom: 1.5rem;
    z-index: 2;
}
.pain-box p { color: #cbd5e1; font-style: italic; }

/* 6. Box "Soluzione Optlyx" (Promise) */
.promise-box {
    position: relative;
    padding: 1.25rem 1.5rem;
    border-radius: 0 1rem 1rem 0;
    margin-top: auto; /* Spinge verso il basso */
    z-index: 2;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left-width: 3px; /* Bordo colorato a sinistra */
}

/* Colori specifici per la Promise Box */
.pmi .promise-box {
    border-left-color: #3b82f6; /* Blu */
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
}
.studi .promise-box {
    border-left-color: #a855f7; /* Viola */
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.1) 0%, transparent 100%);
}

/* Titoli ed etichette interne */
.target-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
/* --- PREMIUM GLASS ARCHITECTURE (Hero Diagram) --- */

/* 1. Il Palcoscenico 3D */
.arch-stage {
    position: relative;
    height: 600px; /* Altezza generosa per l'animazione */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px; /* Profondità 3D */
    overflow: visible; /* Permette alle ombre di espandersi */
}

/* 2. Effetto Vetro Master (Le Card) */
.glass-node {
    /* Base setup */
    position: absolute;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* THE ULTRA GLASS EFFECT */
    background: rgba(255, 255, 255, 0.55); /* Base bianca semitrasparente */
    /* Il segreto del vetro premium: Blur alto + Saturazione aumentata */
    backdrop-filter: blur(24px) saturate(180%); 
    -webkit-backdrop-filter: blur(24px) saturate(180%); /* Supporto Safari */
    
    /* Bordi e Luci */
    border: 1px solid rgba(255, 255, 255, 0.8); /* Bordo esterno luminoso */
    border-radius: 28px; /* Angoli morbidi */
    
    /* Profondità e Riflessi */
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.1), /* Ombra profonda morbida */
        inset 0 1px 0 0 rgba(255, 255, 255, 0.6), /* Riflesso luce bordo superiore */
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.05); /* Sottile ombra bordo inferiore */
}

/* Hover Effect: Sollevamento e Glow */
.glass-node:hover {
    z-index: 50; /* Porta in primo piano */
    /* Importante: !important serve per sovrascrivere le animazioni di galleggiamento */
    transform: translateY(-12px) scale(1.03) !important; 
    background: rgba(255, 255, 255, 0.8); /* Più luminoso */
    border-color: #ffffff;
    /* Glow colorato Indigo */
    box-shadow: 
        0 35px 70px -20px rgba(99, 102, 241, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.8);
    cursor: default;
}

/* 3. POSIZIONAMENTO E DIMENSIONI CARD */

/* Card Centrale (Core AI) */
.node-core {
    width: 320px;
    height: 360px;
    z-index: 20;
    /* Animazione di galleggiamento centrale (usa le keyframes esistenti) */
    animation: floatCenter 7s ease-in-out infinite;
}

/* Card Satelliti (Input/Output) */
.node-satellite {
    width: 220px;
    padding: 24px;
    min-height: 160px;
}

.node-input {
    left: 5%; top: 20%;
    animation: floatLeft 8s ease-in-out infinite;
}

.node-output {
    right: 5%; bottom: 20%;
    animation: floatRight 9s ease-in-out infinite;
}

/* 4. FLUSSI DI DATI REALI (SVG Connections) */

.connection-svg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1; /* Dietro le card */
}

/* Il "Tubo" Trasparente (Base) */
.cable-base {
    fill: none;
    stroke: rgba(255, 255, 255, 0.5); /* Bianco semitrasparente */
    stroke-width: 8; /* Più spesso */
    stroke-linecap: round;
    filter: blur(1px); /* Bordi leggermente morbidi */
}

/* L'Energia che Scorre (Flow) */
.cable-flow {
    fill: none;
    stroke: url(#dataGradient); /* Usa il gradiente definito nell'HTML */
    stroke-width: 4; /* Leggermente più sottile del tubo base */
    stroke-linecap: round;
    
    /* Crea i "pacchetti" di dati: [lunghezza tratto, lunghezza spazio] */
    stroke-dasharray: 40 300; 
    stroke-dashoffset: 340; /* Punto di partenza */
    animation: dataFlow 3s linear infinite;
    
    /* GLOW EFFECT: L'ombra colorata crea l'effetto neon */
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.9));
}
/* Ritardo per la seconda linea per creare un loop continuo */
.connection-svg path.cable-flow:nth-of-type(4) {
    animation-delay: -1.5s; 
}

/* 5. DETTAGLI INTERNI (Core & Tags) */

/* Icona Logo Pulsante nel Core */
.core-logo-wrap {
    width: 90px; height: 90px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(241, 245, 249, 0.9));
    border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,1);
    border: 1px solid rgba(255,255,255,0.5);
    margin-bottom: 24px;
    position: relative;
}
/* Aura colorata pulsante dietro il logo */
.core-logo-wrap::after {
    content: ''; position: absolute; inset: -5px; border-radius: 30px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    opacity: 0.3; filter: blur(20px); z-index: -1;
    animation: pulseAura 4s infinite alternate;
}

/* Loader Glassy */
.processing-bar {
    width: 100%; height: 6px;
    background: rgba(0,0,0,0.05); /* Sfondo sottile */
    border-radius: 10px; overflow: hidden; margin: 15px 0;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}
.processing-fill {
    position: absolute; top: 0; left: 0; height: 100%; width: 40%;
    background: linear-gradient(90deg, #6366f1, #ec4899);
    border-radius: 10px;
    animation: loadingMove 2s ease-in-out infinite;
    /* Glow sulla barra di caricamento */
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Etichette Glassy */
.glass-tag {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 6px 12px; border-radius: 99px;
    /* Stile vetro in miniatura */
    background: rgba(255,255,255,0.5); 
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 12px; display: inline-block; color: #64748b;
}
/* Varianti colore per le tag */
.node-input .glass-tag { color: #ef4444; background: rgba(254, 226, 226, 0.5); border-color: rgba(252, 165, 165, 0.4); }
.node-output .glass-tag { color: #10b981; background: rgba(209, 250, 229, 0.5); border-color: rgba(110, 231, 183, 0.4); }

/* KEYFRAMES (Assicurati che queste esistano nel tuo CSS, altrimenti aggiungile) */
@keyframes floatCenter { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes floatLeft { 0%,100% { transform: translate(0,0) rotate(-2deg); } 50% { transform: translate(10px, -15px) rotate(1deg); } }
@keyframes floatRight { 0%,100% { transform: translate(0,0) rotate(2deg); } 50% { transform: translate(-10px, -10px) rotate(-1deg); } }
@keyframes pulseAura { 0% { opacity: 0.3; transform: scale(0.95); } 100% { opacity: 0.6; transform: scale(1.15); } }
@keyframes loadingMove { 0% { left: -40%; } 100% { left: 140%; } }
@keyframes dataFlow { to { stroke-dashoffset: 0; } }

/* Mobile adjustments */
@media (max-width: 768px) {
    .arch-stage { transform: scale(0.65); margin-top: -50px; height: 450px; }
}
/* --- BUTTONS SMOOTH & LIQUID --- */

/* Base comune per transizioni fluide */
.btn-smooth-dark, .btn-smooth-light {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px; /* Spaziatura generosa */
    border-radius: 18px; /* Curvatura smooth (non pillola, non quadrato) */
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Curva "Liquid" */
    position: relative;
    overflow: hidden;
}

/* STILE DARK (Nero profondo/Navy) */
.btn-smooth-dark {
    background: #0f172a; /* Slate 900 */
    color: #ffffff;
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.3);
    border: 1px solid transparent;
}

.btn-smooth-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.4);
    background: #1e293b; /* Leggermente più chiaro all'hover */
}

/* STILE LIGHT (Bianco con bordo sottile) */
.btn-smooth-light {
    background: #ffffff;
    color: #334155; /* Slate 700 */
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.btn-smooth-light:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

/* Icone interne (per centratura perfetta) */
.icon-circle-dark, .icon-circle-light {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

.btn-smooth-dark:hover .icon-circle-dark { transform: rotate(-10deg) scale(1.1); }
.btn-smooth-light:hover .icon-circle-light { transform: scale(1.1); color: #4f46e5; }
/* --- ULTRA LIQUID GLASS ARCHITECTURE --- */

.arch-stage {
    position: relative;
    height: 500px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    /* Rimuoviamo overflow hidden per permettere alle ombre di espandersi */
    overflow: visible; 
}

/* NODO BASE (Glass + Liquid Motion) */
.glass-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10;
    
    /* GLASS REALISTICO */
    background: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    
    /* OMBRA SOFFICE E PROFONDA */
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 0 rgba(255, 255, 255, 1);
        
    /* Transizione "Liquid" al passaggio del mouse */
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); 
}

.glass-node:hover {
    transform: translateY(-8px) scale(1.02) !important; /* Override animazione float */
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 30px 60px -20px rgba(99, 102, 241, 0.15),
        inset 0 0 20px rgba(255,255,255,0.8);
    z-index: 50;
    cursor: default;
}

/* --- ANIMAZIONI GALLEGGIAMENTO ORGANICO --- */
/* Usiamo tempi diversi e curve diverse per evitare l'effetto "robotico" */

.node-core {
    width: 280px;
    padding: 30px 20px;
    animation: liquidFloat 6s ease-in-out infinite; 
    z-index: 20;
}

.node-satellite {
    width: 190px;
    padding: 20px;
    min-height: 150px;
}

.node-input {
    left: 2%; 
    /* Galleggia in controtempo rispetto al core */
    animation: liquidFloatDelayed 7s ease-in-out infinite; 
}

.node-output {
    right: 2%;
    /* Movimento più lento e ampio */
    animation: liquidFloatReverse 8s ease-in-out infinite;
}

@keyframes liquidFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes liquidFloatDelayed {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes liquidFloatReverse {
    0%, 100% { transform: translateY(0) rotate(1deg); }
    50% { transform: translateY(-12px) rotate(-1deg); }
}

/* --- ELEMENTI INTERNI --- */

.core-logo-wrap {
    width: 72px; height: 72px; border-radius: 20px;
    background: linear-gradient(135deg, #fff, #f8fafc);
    border: 1px solid rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    margin-bottom: 16px;
    position: relative;
}

/* Effetto Aura dietro il logo (Pulsazione morbida) */
.core-logo-wrap::after {
    content: ''; position: absolute; inset: 0; border-radius: 20px;
    background: inherit; z-index: -1;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
    animation: softPulse 4s infinite alternate;
}
@keyframes softPulse { 0% { opacity: 0.5; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1.05); } }

/* Processing Bar (Smooth) */
.processing-bar {
    width: 100%; height: 5px; background: rgba(241, 245, 249, 1);
    border-radius: 10px; overflow: hidden; margin: 10px 0; position: relative;
}
.processing-fill {
    position: absolute; left: 0; top: 0; bottom: 0; width: 50%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 10px;
    animation: liquidBar 2.5s ease-in-out infinite;
}
@keyframes liquidBar {
    0% { left: -50%; width: 50%; }
    50% { width: 80%; } 
    100% { left: 100%; width: 20%; }
}

/* --- CAVI SVG (LIQUIDI) --- */

.connection-svg {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; height: 100%; pointer-events: none; z-index: 1;
    overflow: visible;
}

/* Il "Tubo" trasparente */
.cable-base {
    fill: none; stroke: rgba(203, 213, 225, 0.4); 
    stroke-width: 6; stroke-linecap: round;
}

/* Il flusso di energia */
.cable-beam {
    fill: none; 
    stroke: url(#beamGradient); 
    stroke-width: 3; 
    stroke-linecap: round;
    stroke-dasharray: 60 400; /* Segmento corto, spazio lungo */
    stroke-dashoffset: 460;
    animation: flowLiquid 3s linear infinite;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.6)); /* Glow */
}
.delay-beam { animation-delay: 1.5s; }

@keyframes flowLiquid {
    to { stroke-dashoffset: 0; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .arch-stage { transform: scale(0.65); margin-top: -30px; }
    .node-input { left: -10px; }
    .node-output { right: -10px; }
    .btn-smooth-dark, .btn-smooth-light { width: 100%; justify-content: center; }
}
/* --- TITOLO GOD-TIER --- */

/* 1. Testo Gradiente che Scorre (Shine Effect) */
.text-gradient-flow {
    background: linear-gradient(
        to right, 
        #4f46e5 20%, 
        #a855f7 40%, 
        #ec4899 60%, 
        #4f46e5 80%
    );
    background-size: 200% auto;
    color: #000;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineFlow 4s linear infinite;
}

@keyframes shineFlow {
    to { background-position: 200% center; }
}

/* 2. Animazione Linea Sotto (Draw Effect) */
.draw-underline {
    stroke-dasharray: 300;
    stroke-dashoffset: 300; /* Parte nascosta */
    animation: drawPath 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.2s; /* Parte leggermente dopo */
    opacity: 0.8;
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

/* 3. Animazione Stellina */
.animate-spin-slow {
    animation: spinSlow 8s linear infinite;
}
@keyframes spinSlow {
    from { transform: rotate(0deg) scale(0.8); }
    50% { transform: rotate(180deg) scale(1); }
    to { transform: rotate(360deg) scale(0.8); }
}

/* --- BOTTONI STATICI (NO HOVER MOVE) --- */

.btn-static-dark, .btn-static-light {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    /* Transizione solo colore, NIENTE transform */
    transition: background-color 0.2s ease, box-shadow 0.2s ease; 
    cursor: pointer;
}

/* DARK BTN */
.btn-static-dark {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid transparent;
    /* Ombra solida, non diffusa */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
}

/* Hover: Solo cambio colore leggero, FERMO IMMOBILE */
.btn-static-dark:hover {
    background: #1e293b; /* Leggermente più chiaro */
    transform: none !important; /* Blocca movimento */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Ombra identica */
}
.btn-static-dark:active {
    background: #020617; /* Feedback click */
}

/* LIGHT BTN */
.btn-static-light {
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-static-light:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: none !important; /* Blocca movimento */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.btn-static-light:active {
    background: #f1f5f9;
}

/* Icone Interne */
.icon-box-static {
    display: flex; align-items: center; justify-content: center;
}