<!DOCTYPE html>
<html lang="it" dir="ltr">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
  <title>Installazione Locale On-Premise — Neuralog CORTEX</title>
  <meta name="description" content="Installa Neuralog on-premise sui server della tua azienda: 100% offline, privacy assoluta, modelli LLM quantizzati e zero dispersione verso l&#039;esterno.">
  <meta name="robots" content="index, follow, max-image-preview:large">
  <link rel="canonical" href="https://neuralog.pro/installazione-locale.php">
  <link rel="alternate" hreflang="it" href="https://neuralog.pro/installazione-locale.php">
  <link rel="alternate" hreflang="x-default" href="https://neuralog.pro/installazione-locale.php">

  <!-- DNS Prefetch & Performance -->
  <link rel="dns-prefetch" href="//neuralog.pro">

  <!-- Security & Privacy Headers -->
  <meta http-equiv="X-Content-Type-Options" content="nosniff">
  <meta name="referrer" content="strict-origin-when-cross-origin">

  <!-- Favicon & Touch Icons -->
  <link rel="icon" type="image/x-icon" href="/favicon.ico">
  <link rel="shortcut icon" href="/favicon.ico">
  <link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon-32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon-16.png">
  <link rel="apple-touch-icon" sizes="180x180" href="/assets/img/favicon-180.png">
  <link rel="icon" type="image/png" sizes="192x192" href="/assets/img/favicon-192.png">
  <link rel="icon" type="image/png" sizes="512x512" href="/assets/img/favicon-512.png">
  <meta name="theme-color" content="#080A10">

  <!-- Open Graph / Social -->
  <meta property="og:type" content="website">
  <meta property="og:site_name" content="NEURALOG">
  <meta property="og:title" content="Installazione Locale On-Premise — Neuralog CORTEX">
  <meta property="og:description" content="Installa Neuralog on-premise sui server della tua azienda: 100% offline, privacy assoluta, modelli LLM quantizzati e zero dispersione verso l&#039;esterno.">
  <meta property="og:url" content="https://neuralog.pro/installazione-locale.php">
  <meta property="og:image" content="https://neuralog.pro/assets/img/og-neuralog-1200x630.jpg">
  <meta property="og:image:width" content="1200">
  <meta property="og:image:height" content="630">
  <meta property="og:image:alt" content="NEURALOG — Infrastruttura di agenti AI per i processi aziendali">
  <meta property="og:locale" content="it_IT">

  <!-- Twitter Card -->
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:title" content="Installazione Locale On-Premise — Neuralog CORTEX">
  <meta name="twitter:description" content="Installa Neuralog on-premise sui server della tua azienda: 100% offline, privacy assoluta, modelli LLM quantizzati e zero dispersione verso l&#039;esterno.">
  <meta name="twitter:image" content="https://neuralog.pro/assets/img/og-neuralog-1200x630.jpg">

  <!-- Universal Stylesheet (§4) with Cache-Buster -->
  <link rel="stylesheet" href="/assets/css/app.css?v=1790081060">

  <!-- Strict Background Isolation for Neural Visual Canvas (§Zero Interaction Block) -->
  <style>
    #electric-synapse-canvas {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
      pointer-events: none !important;
      z-index: 0 !important;
      opacity: 0.38 !important;
      user-select: none !important;
      display: block !important;
    }
    .site-header {
      position: sticky !important;
      top: 0 !important;
      z-index: 1000 !important;
      pointer-events: auto !important;
    }
    main, section, .hero, .tight, .stage, .stage__safe, .stage__content, .card, .mini-webinar-card, .btn, a, button, input, select, textarea, video, form {
      position: relative;
      z-index: 1;
      pointer-events: auto !important;
    }
  </style>

  <!-- Structured Data JSON-LD (§10 Super SEO) -->
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "Organization",
        "@id": "https://neuralog.pro/#organization",
        "name": "NEURALOG",
        "url": "https://neuralog.pro",
        "logo": "https://neuralog.pro/assets/img/og-neuralog-1200x630.jpg",
        "description": "Infrastruttura di agenti AI sovrani on-premise e in perimetro aziendale per l'automazione dei processi d'impresa.",
        "email": "info@neuralog.pro",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "IT",
          "addressRegion": "Veneto / Italia"
        },
        "areaServed": {
          "@type": "Country",
          "name": "Italy"
        },
        "knowsAbout": [
          "Intelligenza Artificiale Sovrana",
          "Agenti AI On-Premise",
          "Automazione Processi D.Lgs 81/08",
          "CORTEX OS Company Brain",
          "Local LLM Air-Gap"
        ]
      },
      {
        "@type": "WebSite",
        "@id": "https://neuralog.pro/#website",
        "url": "https://neuralog.pro",
        "name": "NEURALOG",
        "inLanguage": "it-IT",
        "publisher": { "@id": "https://neuralog.pro/#organization" }
      }
          ]
  }
  </script>
    <script type="application/ld+json">
  {"@context":"https://schema.org","@graph":[{"@type":"TechArticle","@id":"https://neuralog.pro/installazione-locale.php#article","headline":"Architettura di Installazione Locale On-Premise Neuralog","description":"Linee guida architetturali per eseguire il Company Brain all'interno del perimetro di rete aziendale in modalità air-gapped o ibrida.","breadcrumb":{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://neuralog.pro/"},{"@type":"ListItem","position":2,"name":"Installazione Locale","item":"https://neuralog.pro/installazione-locale.php"}]}}]}  </script>
  </head>
<body>
  <a href="#main" class="skip-link">Salta al contenuto principale</a>
{
    "timestamp": "2026-12-01 06:16:58",
    "carts_recovered": 0,
    "warmup_sent": 0,
    "pending_orders_reminded": 0,
    "psychographic_sent": 1,
    "errors": [
        "Lead #9053 psychographic send failed: Invalid destination email format"
    ]
}<br />
<b>Notice</b>:  ob_get_clean(): Failed to discard buffer of zlib output compression (1) in <b>/home/u173050672/domains/neuralog.pro/public_html/assets/inc/pseudo_cron.php</b> on line <b>81</b><br />
<br />
<b>Notice</b>:  ob_get_clean(): Failed to delete buffer of zlib output compression (1) in <b>/home/u173050672/domains/neuralog.pro/public_html/assets/inc/pseudo_cron.php</b> on line <b>81</b><br />
<!-- Inclusione Sprite SVG Icone Universali -->
<svg xmlns="http://www.w3.org/2000/svg" style="display:none;" aria-hidden="true">
  <symbol id="icon-rocket" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M12 2c2.8 2 4.5 5.4 4.5 9 0 2-.5 3.8-1.3 5.3L12 19l-3.2-2.7C8 14.8 7.5 13 7.5 11c0-3.6 1.7-7 4.5-9z"/>
    <circle cx="12" cy="10" r="1.6"/>
    <path d="M8.7 15.5 6 18.2M15.3 15.5 18 18.2M9.5 19l1 3 1.5-1.4 1.5 1.4 1-3"/>
  </symbol>

  <symbol id="icon-brain" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <circle cx="12" cy="12" r="9"/>
    <circle cx="8.2" cy="9.5" r="1.1" fill="currentColor" stroke="none"/>
    <circle cx="15.5" cy="8.8" r="1.1" fill="currentColor" stroke="none"/>
    <circle cx="9" cy="15" r="1.1" fill="currentColor" stroke="none"/>
    <circle cx="15.8" cy="14.6" r="1.1" fill="currentColor" stroke="none"/>
    <circle cx="12.3" cy="12" r="1.1" fill="currentColor" stroke="none"/>
    <path d="M8.2 9.5 12.3 12M15.5 8.8 12.3 12M9 15 12.3 12M15.8 14.6 12.3 12"/>
  </symbol>

  <symbol id="icon-spark" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M12 2l1.8 6.2L20 10l-6.2 1.8L12 18l-1.8-6.2L4 10l6.2-1.8z"/>
  </symbol>

  <symbol id="icon-chat" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M4 5h16v10H9l-4 4v-4H4z"/>
    <path d="M8 9h8M8 12.5h5"/>
  </symbol>

  <symbol id="icon-building" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <rect x="5" y="3" width="14" height="18" rx="1"/>
    <path d="M9 7h1.4M13.6 7H15M9 11h1.4M13.6 11H15M9 15h1.4M13.6 15H15"/>
    <path d="M10.5 21v-4h3v4"/>
  </symbol>

  <symbol id="icon-bot" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <rect x="5" y="8" width="14" height="11" rx="2.5"/>
    <path d="M12 8V4.5"/>
    <circle cx="12" cy="3.2" r="1.1" fill="currentColor" stroke="none"/>
    <circle cx="9.3" cy="13.2" r="1.2" fill="currentColor" stroke="none"/>
    <circle cx="14.7" cy="13.2" r="1.2" fill="currentColor" stroke="none"/>
    <path d="M9 17h6"/>
    <path d="M3.3 12.5h1.7M19 12.5h1.7"/>
  </symbol>

  <symbol id="icon-chart" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M4 20h16"/>
    <rect x="6" y="13" width="3" height="7"/>
    <rect x="11" y="9" width="3" height="11"/>
    <rect x="16" y="5" width="3" height="15"/>
  </symbol>

  <symbol id="icon-plug" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M9 3v5M15 3v5"/>
    <path d="M7 8h10v4a5 5 0 0 1-10 0V8z"/>
    <path d="M12 17v2a3 3 0 0 1-3 3H7"/>
  </symbol>

  <symbol id="icon-cursor" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M5 3l6.5 16 2-6.7L20 10.5z"/>
  </symbol>

  <symbol id="icon-leaf" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M6 20c-1.2-6 1-11.5 12-13.5C19 17 13.5 20 6 20z"/>
    <path d="M7 19c2-3 4.5-6 10-11"/>
  </symbol>

  <symbol id="icon-crown" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M4 8l3.5 3L12 5l4.5 6L20 8l-1.6 9H5.6L4 8z"/>
    <path d="M5.6 17h12.8"/>
  </symbol>

  <symbol id="icon-coin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <circle cx="12" cy="12" r="9"/>
    <path d="M9.5 9.3c0-1 1-1.8 2.5-1.8s2.5.8 2.5 1.8-1 1.4-2.5 1.7-2.5.7-2.5 1.7 1 1.8 2.5 1.8 2.5-.8 2.5-1.8"/>
    <path d="M12 6.3v11.4"/>
  </symbol>

  <symbol id="icon-users" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <circle cx="9" cy="8.5" r="2.6"/>
    <path d="M3.5 19c.6-3.2 2.7-5 5.5-5s4.9 1.8 5.5 5"/>
    <circle cx="16.5" cy="8" r="2.1"/>
    <path d="M15 14.3c2.4.2 4 1.8 4.5 4.7"/>
  </symbol>

  <symbol id="icon-check" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
    <path d="M4 12.5l5 5L20 6"/>
  </symbol>

  <symbol id="icon-mouse" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <rect x="7" y="3" width="10" height="18" rx="5"/>
    <path d="M12 6v4"/>
  </symbol>

  <symbol id="icon-sound-on" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
    <path d="M4 10v4h4l5 4V6L8 10H4z"/>
    <path d="M16.5 9a4.2 4.2 0 0 1 0 6M19 6.5a8 8 0 0 1 0 11"/>
  </symbol>

  <symbol id="icon-sound-off" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
    <path d="M4 10v4h4l5 4V6L8 10H4z"/>
    <path d="M15.5 9.5l5 5M20.5 9.5l-5 5"/>
  </symbol>

  <symbol id="icon-cart" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <circle cx="9" cy="21" r="1"/>
    <circle cx="20" cy="21" r="1"/>
    <path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/>
  </symbol>

  <symbol id="icon-lightning" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/>
  </symbol>

  <symbol id="icon-shield" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
  </symbol>

  <symbol id="icon-chain" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/>
    <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>
  </symbol>

  <symbol id="icon-server" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <rect x="2" y="2" width="20" height="8" rx="2" ry="2"/>
    <rect x="2" y="14" width="20" height="8" rx="2" ry="2"/>
    <line x1="6" y1="6" x2="6.01" y2="6"/>
    <line x1="6" y1="18" x2="6.01" y2="18"/>
  </symbol>

  <symbol id="icon-network" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <circle cx="12" cy="12" r="3"/>
    <circle cx="6" cy="6" r="2.5"/>
    <circle cx="18" cy="6" r="2.5"/>
    <circle cx="6" cy="18" r="2.5"/>
    <circle cx="18" cy="18" r="2.5"/>
    <line x1="8" y1="7.5" x2="10" y2="10.5"/>
    <line x1="16" y1="7.5" x2="14" y2="10.5"/>
    <line x1="8" y1="16.5" x2="10" y2="13.5"/>
    <line x1="16" y1="16.5" x2="14" y2="13.5"/>
  </symbol>

  <symbol id="icon-file-text" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
    <polyline points="14 2 14 8 20 8"/>
    <line x1="16" y1="13" x2="8" y2="13"/>
    <line x1="16" y1="17" x2="8" y2="17"/>
    <polyline points="10 9 9 9 8 9"/>
  </symbol>

  <symbol id="icon-star" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
    <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/>
  </symbol>

  <symbol id="icon-play" viewBox="0 0 24 24" fill="currentColor" stroke="none">
    <polygon points="5 3 19 12 5 21 5 3"/>
  </symbol>

  <symbol id="icon-academic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M22 10v6M2 10l10-5 10 5-10 5z"/>
    <path d="M6 12v5c3 3 9 3 12 0v-5"/>
  </symbol>

  <symbol id="icon-swords" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <polyline points="14.5 17.5 3 6 3 3 6 3 17.5 14.5"/>
    <line x1="13" y1="19" x2="19" y2="13"/>
    <line x1="16" y1="16" x2="20" y2="20"/>
    <line x1="19" y1="21" x2="21" y2="19"/>
    <polyline points="14.5 6.5 18 3 21 3 21 6 17.5 9.5"/>
    <line x1="5" y1="14" x2="11" y2="20"/>
    <line x1="7" y1="17" x2="3" y2="21"/>
    <line x1="3" y1="19" x2="5" y2="21"/>
  </symbol>

  <symbol id="icon-close" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
    <line x1="18" y1="6" x2="6" y2="18"/>
    <line x1="6" y1="6" x2="18" y2="18"/>
  </symbol>

  <symbol id="icon-search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <circle cx="11" cy="11" r="8"/>
    <line x1="21" y1="21" x2="16.65" y2="16.65"/>
  </symbol>

  <symbol id="icon-globe" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <circle cx="12" cy="12" r="10"/>
    <line x1="2" y1="12" x2="22" y2="12"/>
    <path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>
  </symbol>

  <symbol id="icon-fire" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z"/>
  </symbol>

  <symbol id="icon-send" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <line x1="22" y1="2" x2="11" y2="13"/>
    <polygon points="22 2 15 22 11 13 2 9 22 2"/>
  </symbol>

  <symbol id="icon-gift" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <polyline points="20 12 20 22 4 22 4 12"/>
    <rect x="2" y="7" width="20" height="5"/>
    <line x1="12" y1="22" x2="12" y2="7"/>
    <path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"/>
    <path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"/>
  </symbol>

  <symbol id="icon-clock" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
    <circle cx="12" cy="12" r="10"/>
    <polyline points="12 6 12 12 16 14"/>
  </symbol>

  <symbol id="icon-plus" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
    <line x1="12" y1="5" x2="12" y2="19"/>
    <line x1="5" y1="12" x2="19" y2="12"/>
  </symbol>

  <symbol id="icon-edit" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
    <path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
    <path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
  </symbol>

  <symbol id="icon-download" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
    <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
    <polyline points="7 10 12 15 17 10"/>
    <line x1="12" y1="15" x2="12" y2="3"/>
  </symbol>

  <symbol id="icon-book" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
    <path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/>
    <path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/>
  </symbol>

  <symbol id="icon-list" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
    <line x1="8" y1="6" x2="21" y2="6"/>
    <line x1="8" y1="12" x2="21" y2="12"/>
    <line x1="8" y1="18" x2="21" y2="18"/>
    <line x1="3" y1="6" x2="3.01" y2="6"/>
    <line x1="3" y1="12" x2="3.01" y2="12"/>
    <line x1="3" y1="18" x2="3.01" y2="18"/>
  </symbol>

  <symbol id="icon-tag" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
    <path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"/>
    <line x1="7" y1="7" x2="7.01" y2="7"/>
  </symbol>
</svg>
<!-- Top Announcement Ribbon (§Massima Visibilità Masterclass Video) -->
<div class="site-announcement-bar" style="background: linear-gradient(90deg, rgba(8,10,16,0.98) 0%, rgba(217,181,76,0.12) 50%, rgba(8,10,16,0.98) 100%); border-bottom: 1px solid rgba(217,181,76,0.25); padding: 6px 16px; font-size: 0.8rem; text-align: center; color: #E2E8F0; z-index: 1001; position: relative;">
  <span style="color: var(--color-gold, #FFD700); font-weight: 700; margin-right: 6px;">DIMOSTRAZIONE OPERATIVA:</span>
  <span>Come azzerare 15 ore a settimana di compiti ripetitivi in azienda.</span>
  <a href="/webinar.php" style="color: #FFD700; text-decoration: underline; font-weight: 700; margin-left: 8px;">Guarda la Masterclass da 17 minuti</a>
</div>

<header class="site-header" role="banner">
  <div class="site-header__inner">
    <a href="/" class="site-brand" aria-label="NEURALOG — Pagina Iniziale">
      <img src="/assets/img/logo.png" alt="NEURALOG Logo" class="site-brand__logo" width="38" height="38">
      <span class="site-brand__text">NEURALOG</span>
    </a>

    <!-- Operational Infrastructure Status -->
    <div class="site-header__live-status" id="live-telemetry" aria-label="Stato operativo dell'infrastruttura">
      <span class="live-pill">
        <span class="live-pulse" aria-hidden="true"></span>
        <span>Infrastruttura Operativa</span>
      </span>
      <span class="live-divider" aria-hidden="true">|</span>
      <span class="live-pill live-pill--secondary">
        <svg class="icon-inline" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
        <span>Perimetro Sovrano On-Premise &amp; Cloud EU</span>
      </span>
    </div>

    <!-- Right Controls: Quick CTA, Webinar & Burger Menu -->
    <div class="site-header__actions" style="display: flex; align-items: center; gap: 10px;">
      <a href="/webinar.php" class="btn btn-secondary header-webinar-btn" style="padding: 0.45rem 0.85rem; font-size: 0.82rem; display: inline-flex; align-items: center; gap: 6px; border-color: rgba(255, 215, 0, 0.45); color: var(--color-gold, #FFD700); background: rgba(255, 215, 0, 0.08);" aria-label="Webinar Masterclass da 17 minuti">
        <svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><polygon points="5 3 19 12 5 21 5 3"/></svg>
        <span class="header-webinar-text">Webinar 17 min</span>
      </a>

      <a href="/carrello.php" class="btn btn-secondary header-cart-btn" style="padding: 0.45rem 0.85rem; font-size: 0.82rem; display: inline-flex; align-items: center; gap: 6px;" aria-label="Carrello e Cassa">
        <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>
        <span class="header-cart-text">Carrello</span>
      </a>

      <button type="button" class="menu-toggle" id="menu-toggle" aria-expanded="false" aria-controls="mobile-drawer" aria-label="Apri menu di navigazione">
        <span class="menu-toggle__bar"></span>
        <span class="menu-toggle__bar"></span>
        <span class="menu-toggle__bar"></span>
      </button>
    </div>
  </div>
</header>

<!-- Navigation Drawer (§All pages accessible via Top-Right Burger) -->
<div class="mobile-drawer" id="mobile-drawer" role="dialog" aria-modal="true" aria-label="Menu di navigazione" hidden>
  <div class="mobile-drawer__panel" id="mobile-drawer-panel">
    <div style="display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--color-border); padding-bottom:12px;">
      <div style="font-weight:800; font-size:1.1rem; color:var(--color-text); display:flex; align-items:center; gap:8px;">
        <img src="/assets/img/logo.png" alt="NEURALOG" style="width:28px; height:28px; object-fit:contain; border-radius:4px;">
        <span>NEURALOG</span>
      </div>
      <button type="button" class="mobile-drawer__close" id="menu-close" aria-label="Chiudi menu" style="display:inline-flex; align-items:center; gap:6px;">
        <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
        <span>Chiudi</span>
      </button>
    </div>

    <nav class="mobile-drawer__nav" aria-label="Menu completo del sito">
      <a href="/" class="mobile-drawer__link ">
        <span>Home</span>
      </a>
      <a href="/catalogo.php" class="mobile-drawer__link ">
        <span>Catalogo Prodotti & Servizi</span>
        <span style="font-size:0.7rem; color:var(--color-gold); font-family:var(--font-mono); background:rgba(255,215,0,0.1); padding:2px 6px; border-radius:4px;">PRODOTTI</span>
      </a>
      <a href="/prezzi.php" class="mobile-drawer__link ">
        <span>Prezzi & Piani B2B</span>
        <span style="font-size:0.7rem; color:#00FF88; font-family:var(--font-mono); background:rgba(0,255,136,0.1); padding:2px 6px; border-radius:4px;">LISTINO</span>
      </a>
      <a href="/webinar.php" class="mobile-drawer__link ">
        <span>Masterclass Webinar (17 min)</span>
        <span style="font-size:0.7rem; color:var(--color-gold); font-family:var(--font-mono); background:rgba(255,215,0,0.15); padding:2px 6px; border-radius:4px;">VIDEO ESCLUSIVO</span>
      </a>
      <a href="/come-funziona.php" class="mobile-drawer__link ">
        <span>Come Funziona</span>
      </a>
      <a href="/#cosa-fa" class="mobile-drawer__link">
        <span>Cosa Fa in Azienda</span>
      </a>
      <a href="/casi-uso.php" class="mobile-drawer__link ">
        <span>Casi Documentati & Dati</span>
      </a>
      <a href="/cortex-os.php" class="mobile-drawer__link ">
        <span>CORTEX OS 3D (Cervello Neurale)</span>
        <span style="font-size:0.7rem; color:#00F0FF; font-family:var(--font-mono); background:rgba(0,240,255,0.12); padding:2px 6px; border-radius:4px;">3D LIVE</span>
      </a>
      <a href="/settori.php" class="mobile-drawer__link ">
        <span>Codici ATECO Supportati</span>
      </a>
      <a href="/sicurezza.php" class="mobile-drawer__link ">
        <span>Sicurezza & Isolamento Air-Gap</span>
      </a>
      <a href="/manuale.php" class="mobile-drawer__link ">
        <span>Manuale Operativo</span>
      </a>
      <a href="/faq.php" class="mobile-drawer__link ">
        <span>Domande Frequenti (FAQ)</span>
      </a>
      <a href="/preventivo.php" class="mobile-drawer__link ">
        <span>Calcola Preventivo B2B</span>
        <span style="font-size:0.7rem; color:#10B981; font-family:var(--font-mono); background:rgba(16,185,129,0.12); padding:2px 6px; border-radius:4px;">CALCOLATORE</span>
      </a>
      <a href="/carrello.php" class="mobile-drawer__link ">
        <span>Carrello & Cassa</span>
        <span style="font-size:0.7rem; color:var(--color-gold); font-family:var(--font-mono); background:rgba(255,215,0,0.1); padding:2px 6px; border-radius:4px;">CHECKOUT</span>
      </a>
    </nav>

    <div style="margin-top: auto; padding-top: 16px; border-top: 1px solid var(--color-border);">
      <a href="/contatti.php?piano=collaudo" class="btn btn-primary w-full" data-track="cta-drawer" style="padding: 12px 16px; font-size: 0.85rem;">
        Prenota il Collaudo Neurale — 1.500 € + IVA
      </a>
      <div style="text-align:center; margin-top:10px; font-size:0.72rem; color:var(--color-text-dim);">
        Server dedicati · Nessun dato all'esterno · Consegna in 5gg
      </div>
    </div>
  </div>
</div>

<main id="main">

<section class="hero" style="padding-top:56px; padding-bottom:32px;">
  <div class="container text-center" style="text-align:center;">
    <span class="badge" style="margin:0 auto 12px;">
      <svg class="icon icon-inline icon-gold"><use href="#icon-crown"></use></svg> INFRASTRUTTURA SOVRANA
    </span>
    <h1>Il Cervello della tua Azienda, Dentro le tue Mura</h1>
    <p style="max-width:640px; margin:12px auto 0; font-size:1.1rem;">
      Per realtà con vincoli stringenti di data residency, settori regolamentati o infrastruttura IT interna dedicata: Neuralog opera on-premise con hardware specializzato.
    </p>
  </div>
</section>

<section class="tight" style="padding-bottom:48px;">
  <div class="container">
    <div class="grid grid-2">
      <div class="card">
        <span class="card-icon"><svg class="icon icon-gold"><use href="#icon-shield"></use></svg></span>
        <h3 style="margin:8px 0 4px;">Quando ha senso l'On-Premise</h3>
        <p style="margin:0;">Settori con vincoli normativi sulla localizzazione fisica dei dati (sanità, finanza, brevetti industriali, difesa) o aziende che preferiscono mantenere il flusso informativo circoscritto alla propria intranet senza dipendenze da cloud pubblici.</p>
      </div>

      <div class="card">
        <span class="card-icon"><svg class="icon icon-gold"><use href="#icon-chart"></use></svg></span>
        <h3 style="margin:8px 0 4px;">Cosa cambia rispetto al Cloud</h3>
        <p style="margin:0 0 14px;">Le funzionalità rimangono le medesime (chat globale, oracolo documentale, reparti, automazioni, monitoraggio immunitario): cambia esclusivamente la residenza fisica del silicio di calcolo.</p>
        <a href="cloud-vs-locale.php" class="btn btn-ghost btn-sm" style="width:fit-content;">Confronto Cloud Locale</a>
      </div>
    </div>
  </div>
</section>

<section class="tight" style="padding-bottom:56px;">
  <div class="container">
    <div class="card card-gold-highlight text-center" style="text-align:center; padding: clamp(24px, 4vw, 40px); max-width:860px; margin:0 auto;">
      <span class="badge" style="margin:0 auto 10px;">SOLUZIONE CHIAVI IN MANO</span>
      <h2 style="margin-bottom:10px;">CORTEX Sovereign Hardware Box</h2>
      <p style="max-width:620px; margin:0 auto 20px;">
        Un server industriale pre-configurato dai nostri ingegneri, consegnato e collaudato nella tua sede con modelli quantizzati e zero canoni obbligatori.
      </p>
      <div style="display:flex; gap:12px; justify-content:center; flex-wrap:wrap;">
        <a href="catalogo.php" class="btn btn-primary">Vedi Scheda Hardware</a>
        <a href="consulenza.php" class="btn btn-ghost">Richiedi Studio Fattibilità</a>
      </div>
    </div>
  </div>
</section>

</main>

<footer class="site-footer" role="contentinfo">
  <div class="site-footer__inner">
    <div class="site-footer__columns">
      <!-- Colonna 1: Profilo e Dati Aziendali -->
      <div>
        <div class="site-brand" style="margin-bottom: var(--space-xs);">
          <span class="site-brand__mark">◈</span>
          <span>NEURALOG</span>
        </div>
        <p style="font-size: var(--size-xs); line-height: 1.6; margin-bottom: var(--space-sm);">
          Infrastruttura on-premise per i processi ripetitivi aziendali.
          I dati rimangono nel perimetro del cliente; ogni azione critica richiede approvazione umana.
        </p>
        <p style="font-size: var(--size-xs); color: var(--color-text-dim); line-height: 1.6;">
          Powered by <strong>LABO TECNIC STUDIO</strong><br>
          PORTO VIRO - ITALY<br>
          Email: <a href="mailto:info@neuralog.pro" class="site-footer__link">info@neuralog.pro</a>
        </p>
      </div>

      <!-- Colonna 2: Processi e Soluzioni -->
      <div>
        <h3 class="site-footer__title">Processi</h3>
        <ul class="site-footer__links">
          <li><a href="/#processi" class="site-footer__link">Fatture passive SDI</a></li>
          <li><a href="/#processi" class="site-footer__link">Risposte inbound e preventivi</a></li>
          <li><a href="/#processi" class="site-footer__link">Monitoraggio scadenze</a></li>
          <li><a href="/#processi" class="site-footer__link">Assistenza interna mansionari</a></li>
          <li><a href="/settori.php" class="site-footer__link">3.257 Codici ATECO</a></li>
        </ul>
      </div>

      <!-- Colonna 3: Offerta e Documentazione -->
      <div>
        <h3 class="site-footer__title">Percorso B2B</h3>
        <ul class="site-footer__links">
          <li><a href="/contatti.php?piano=collaudo" class="site-footer__link">Collaudo Neurale (1.500 € + IVA)</a></li>
          <li><a href="/prezzi.php" class="site-footer__link">Listino Piani e Presidio</a></li>
          <li><a href="/competitors.php" class="site-footer__link">Benchmark vs Competitors</a></li>
          <li><a href="/preventivo.php" class="site-footer__link">Richiedi Preventivo B2B (PDF)</a></li>
          <li><a href="/partner.php" class="site-footer__link">Programma Partner (15% Ricorrente)</a></li>
          <li><a href="/casi-uso.php" class="site-footer__link">Caso Documentato (81plus)</a></li>
          <li><a href="/come-funziona.php" class="site-footer__link">Architettura e Requisiti</a></li>
          <li><a href="/catalogo.php" class="site-footer__link">Catalogo Moduli & Piani</a></li>
          <li><a href="/manuale.php" class="site-footer__link">Manuale Operativo (533 pag.)</a></li>
        </ul>
      </div>

      <!-- Colonna 4: Note Legali e Riservatezza -->
      <div>
        <h3 class="site-footer__title">Trasparenza</h3>
        <ul class="site-footer__links">
          <li><a href="/privacy.php" class="site-footer__link">Presidio Privacy e Dati</a></li>
          <li><a href="/privacy-policy.php" class="site-footer__link">Privacy Policy GDPR</a></li>
          <li><a href="/cookie-policy.php" class="site-footer__link">Gestione Cookie</a></li>
          <li><a href="/termini-di-servizio.php" class="site-footer__link">Termini di Servizio</a></li>
          <li><a href="/chi-siamo.php" class="site-footer__link">Chi Siamo</a></li>
          <li><span style="font-size: var(--size-xs); color: var(--color-text-dim);">Nessun dato ceduto a reti pubblicitarie</span></li>
        </ul>
      </div>
    </div>
  </div>
</footer>
<!-- Neural Background Effect (§14 - Sfondo Neuroni e Sinapsi) with Cache-Buster -->
<script defer src="/assets/js/electric-synapse-bg.js?v=1790081038"></script>

<!-- Core Vanilla JS (No External Frameworks) -->
<script>
(function() {
  'use strict';

  // 1. Mobile Drawer Navigation with Focus Trap & Escape key
  const menuToggle = document.getElementById('menu-toggle');
  const drawer = document.getElementById('mobile-drawer');
  const drawerClose = document.getElementById('menu-close');
  const panel = document.getElementById('mobile-drawer-panel');

  if (menuToggle && drawer) {
    function openMenu(e) {
      if (e) e.preventDefault();
      drawer.removeAttribute('hidden');
      drawer.hidden = false;
      drawer.classList.add('is-open');
      menuToggle.setAttribute('aria-expanded', 'true');
      if (drawerClose) drawerClose.focus();
      document.body.style.overflow = 'hidden';
    }

    function closeMenu() {
      drawer.classList.remove('is-open');
      drawer.setAttribute('hidden', '');
      drawer.hidden = true;
      menuToggle.setAttribute('aria-expanded', 'false');
      menuToggle.focus();
      document.body.style.overflow = '';
    }

    menuToggle.addEventListener('click', openMenu);
    if (drawerClose) {
      drawerClose.addEventListener('click', function(e) {
        if (e) e.preventDefault();
        closeMenu();
      });
    }

    drawer.addEventListener('click', function(e) {
      if (e.target === drawer) closeMenu();
    });

    document.addEventListener('keydown', function(e) {
      if (e.key === 'Escape' && drawer.classList.contains('is-open')) {
        closeMenu();
      }
    });

    // Gestione click su tutti i link del menu di navigazione
    const drawerLinks = drawer.querySelectorAll('a');
    drawerLinks.forEach(function(link) {
      link.addEventListener('click', function(e) {
        const href = link.getAttribute('href') || '';
        closeMenu();
        // Se è un'ancora interna sulla stessa pagina (es. /#cosa-fa dalla home)
        const isHomePage = window.location.pathname === '/' || window.location.pathname === '/index.php' || window.location.pathname === '';
        if (href.startsWith('#') || (href.startsWith('/#') && isHomePage)) {
          const targetId = href.replace(/^\/?#/, '');
          const targetEl = document.getElementById(targetId);
          if (targetEl) {
            e.preventDefault();
            setTimeout(function() {
              targetEl.scrollIntoView({ behavior: 'smooth', block: 'start' });
            }, 50);
            if (history.pushState) {
              history.pushState(null, '', '#' + targetId);
            }
          }
        }
        // Per tutti gli altri link ordinari, NESSUN preventDefault: navigazione immediata e pulita
      });
    });
  }


  // 2. Accessible Accordion / FAQ
  const accordions = document.querySelectorAll('.accordion');
  accordions.forEach(function(acc) {
    acc.addEventListener('click', function(e) {
      const btn = e.target.closest('.accordion__trigger');
      if (!btn) return;
      const item = btn.closest('.accordion__item');
      if (!item) return;

      const isOpen = item.getAttribute('data-open') === 'true';
      // Close other items in the same accordion
      acc.querySelectorAll('.accordion__item').forEach(function(other) {
        if (other !== item) {
          other.setAttribute('data-open', 'false');
          const t = other.querySelector('.accordion__trigger');
          if (t) t.setAttribute('aria-expanded', 'false');
        }
      });

      item.setAttribute('data-open', isOpen ? 'false' : 'true');
      btn.setAttribute('aria-expanded', isOpen ? 'false' : 'true');
    });
  });

  // 3. Cookieless Event Telemetry (§9.5)
  // Events: form_visto, form_inviato, calendario_aperto, pagamento_completato
  const trackedForms = document.querySelectorAll('form[data-track-form]');
  if ('IntersectionObserver' in window) {
    const formObserver = new IntersectionObserver(function(entries) {
      entries.forEach(function(entry) {
        if (entry.isIntersecting && !entry.target.dataset.seen) {
          entry.target.dataset.seen = 'true';
          recordEvent('form_visto', { form_id: entry.target.id || 'lead_form' });
        }
      });
    }, { threshold: 0.3 });

    trackedForms.forEach(function(f) { formObserver.observe(f); });
  }

  trackedForms.forEach(function(form) {
    form.addEventListener('submit', function() {
      recordEvent('form_inviato', { form_id: form.id || 'lead_form' });
    });
  });

  document.querySelectorAll('[data-track="calendario"]').forEach(function(el) {
    el.addEventListener('click', function() {
      recordEvent('calendario_aperto');
    });
  });

  document.querySelectorAll('[data-track="pagamento"]').forEach(function(el) {
    el.addEventListener('click', function() {
      recordEvent('pagamento_completato');
    });
  });

  function recordEvent(name, meta) {
    // Privacy-preserving: zero cookies, zero PII, anonymous event logging
    if (window.console && console.log) {
      console.log('[NEURALOG Telemetry]', name, meta || {});
    }
  }

  // WebCron Autonomo Silenzioso H24: ogni visita fa avanzare la coda e-mail e carrelli
  if (typeof navigator !== 'undefined') {
    var nlgHeartbeatSent = false;
    var sendNlgHeartbeat = function() {
      if (nlgHeartbeatSent) return;
      nlgHeartbeatSent = true;
      if (navigator.sendBeacon) {
        navigator.sendBeacon('/assets/api/heartbeat-cron.php');
      } else {
        fetch('/assets/api/heartbeat-cron.php', { method: 'POST', keepalive: true }).catch(function(){});
      }
    };
    window.addEventListener('visibilitychange', function() {
      if (document.visibilityState === 'hidden') sendNlgHeartbeat();
    });
    window.addEventListener('pagehide', sendNlgHeartbeat);
    setTimeout(sendNlgHeartbeat, 15000);
  }
})();
</script>
<div id="nlg-sticky-conversion-bar" class="nlg-sticky-bar" style="display: none;">
  <div class="nlg-sticky-inner">
    
    <!-- Info & Scarsità Etica -->
    <div class="nlg-sticky-left">
      <span class="live-pulse" style="width: 8px; height: 8px; background: var(--color-gold, #FFD700); box-shadow: 0 0 6px var(--color-gold, #FFD700);" aria-hidden="true"></span>
      <div class="nlg-sticky-text">
        <strong>COLLAUDO NEURALE IN SEDE / REMOTO:</strong>
        <span class="nlg-sticky-slots">Solo 2 slot disponibili questo mese</span>
        <span class="nlg-sticky-guarantee">· Garanzia Rimborso Integrale 100%</span>
      </div>
    </div>

    <!-- Azioni Rapide Duali -->
    <div class="nlg-sticky-right">
      <a href="/carrello.php?piano=libro" class="nlg-sticky-tripwire-btn" title="Manuale PDF da 533 pagine scaricabile istantaneamente">
        Manuale PDF (9,90 €)
      </a>
      <a href="/contatti.php?piano=collaudo" class="nlg-sticky-primary-btn" data-track="cta-sticky-collaudo">
        Prenota Collaudo (1.500 € + IVA)
      </a>
      <button type="button" class="nlg-sticky-dismiss" onclick="nlgDismissStickyBar()" aria-label="Chiudi barra">&times;</button>
    </div>

  </div>
</div>

<style>
.nlg-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 14, 23, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(217, 181, 76, 0.35);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  z-index: 9998;
  padding: 10px 16px;
  box-sizing: border-box;
  animation: nlgSlideUp 0.35s ease-out forwards;
}

@keyframes nlgSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.nlg-sticky-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.nlg-sticky-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #E2E8F0;
}

.nlg-sticky-slots {
  color: var(--color-gold, #FFD700);
  font-weight: 700;
  margin-left: 4px;
}

.nlg-sticky-guarantee {
  color: #10B981;
  font-weight: 600;
}

.nlg-sticky-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nlg-sticky-tripwire-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #F1F5F9;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.nlg-sticky-tripwire-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

.nlg-sticky-primary-btn {
  background: var(--color-gold, #FFD700);
  color: #000000;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 9px 18px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(217, 181, 76, 0.35);
  transition: transform 0.15s, filter 0.15s;
}

.nlg-sticky-primary-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.nlg-sticky-dismiss {
  background: transparent;
  border: none;
  color: var(--color-text-dim, #64748B);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.nlg-sticky-dismiss:hover {
  color: #FFFFFF;
}

@media (max-width: 820px) {
  .nlg-sticky-guarantee {
    display: none;
  }
  .nlg-sticky-text {
    font-size: 0.74rem;
    line-height: 1.3;
  }
  .nlg-sticky-tripwire-btn {
    display: none; /* Su mobile privilegia la CTA primaria */
  }
  .nlg-sticky-primary-btn {
    font-size: 0.78rem;
    padding: 8px 14px;
  }
}
</style>

<script>
(function() {
  const bar = document.getElementById('nlg-sticky-conversion-bar');
  if (!bar) return;

  // Mostra dopo aver scorso oltre 350px (dopo l'Hero) se non congedata recentemente
  const dismissedKey = 'nlg_sticky_dismissed';
  const lastDismissed = localStorage.getItem(dismissedKey);
  const now = Date.now();

  // Reset dopo 6 ore se congedata
  if (lastDismissed && (now - parseInt(lastDismissed, 10)) < 21600000) {
    return;
  }

  let isShown = false;
  window.addEventListener('scroll', function() {
    if (!isShown && window.scrollY > 350) {
      bar.style.display = 'block';
      isShown = true;
    }
  }, { passive: true });
})();

function nlgDismissStickyBar() {
  const bar = document.getElementById('nlg-sticky-conversion-bar');
  if (bar) bar.style.display = 'none';
  try {
    localStorage.setItem('nlg_sticky_dismissed', String(Date.now()));
  } catch(e) {}
}
</script>
<div id="nlg-exit-modal" class="nlg-exit-modal" aria-hidden="true" role="dialog" aria-labelledby="nlg-exit-title">
  <div class="nlg-exit-overlay" id="nlg-exit-overlay"></div>
  <div class="nlg-exit-dialog">
    <button type="button" class="nlg-exit-close" id="nlg-exit-close" aria-label="Chiudi finestra">&times;</button>
    
    <div id="nlg-exit-form-view">
      <span class="nlg-exit-badge">STRUMENTO OPERATIVO RISERVATO</span>
      <h2 id="nlg-exit-title" class="nlg-exit-heading">Checklist Operativa Audit & Patente a Crediti 2026</h2>
      <p class="nlg-exit-desc">
        Prima di andare, scarica la verifica preventiva dei 30 requisiti vincolanti D.Lgs 81/08 per evitare la decurtazione dei crediti e la sospensione dell'attivita nei cantieri e reparti.
      </p>

      <form id="nlg-exit-form" class="nlg-exit-form">
        <input type="hidden" name="fonte" value="exit_intent_modal">
        <input type="hidden" name="ajax" value="1">
        
        <div class="nlg-exit-field">
          <label for="nlg-exit-nome">Nome e Cognome / Referente</label>
          <input type="text" id="nlg-exit-nome" name="nome" placeholder="es. Ing. Mario Rossi" required>
        </div>

        <div class="nlg-exit-field">
          <label for="nlg-exit-email">Email Aziendale (per invio immediato PDF)</label>
          <input type="email" id="nlg-exit-email" name="email" placeholder="mario.rossi@azienda.it" required>
        </div>

        <div class="nlg-exit-field">
          <label for="nlg-exit-azienda">Ragione Sociale / Cantiere (Opzionale)</label>
          <input type="text" id="nlg-exit-azienda" name="azienda" placeholder="es. Edilizia Moderna S.r.l.">
        </div>

        <button type="submit" id="nlg-exit-submit-btn" class="nlg-exit-btn">
          Scarica Subito la Checklist (PDF Gratuito)
        </button>

        <p id="nlg-exit-err" class="nlg-exit-err" style="display:none;"></p>
      </form>
    </div>

    <div id="nlg-exit-success-view" style="display:none; text-align:center;">
      <span class="nlg-exit-badge" style="color:#10B981; border-color:#10B981; background:rgba(16,185,129,0.12);">DOCUMENTO GENERATO</span>
      <h2 class="nlg-exit-heading" style="color:#FFFFFF;">Checklist Pronta per il Download</h2>
      <p class="nlg-exit-desc">
        Abbiamo anche inviato una copia permanente alla tua email. Puoi scaricare subito il file tramite il pulsante sottostante:
      </p>

      <div style="margin: 24px 0;">
        <a id="nlg-exit-dl-link" href="/download-manuale.php?tipo=checklist" class="nlg-exit-btn" style="display:block; text-decoration:none; text-align:center; background:#10B981; color:#000000;">
          Download Immediato Checklist PDF
        </a>
      </div>

      <button type="button" class="nlg-exit-btn-ghost" id="nlg-exit-finish-btn">
        Chiudi e Continua la Navigazione
      </button>
    </div>
  </div>
</div>

<style>
.nlg-exit-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.nlg-exit-modal.is-active {
  display: flex;
}
.nlg-exit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(8px);
}
.nlg-exit-dialog {
  position: relative;
  background: #0D121F;
  border: 1px solid rgba(217, 181, 76, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(217, 181, 76, 0.15);
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  padding: clamp(24px, 5vw, 36px);
  z-index: 2;
  box-sizing: border-box;
}
.nlg-exit-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}
.nlg-exit-close:hover {
  color: #FFFFFF;
}
.nlg-exit-badge {
  display: inline-block;
  background: rgba(217, 181, 76, 0.12);
  color: #D9B54C;
  border: 1px solid #D9B54C;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.nlg-exit-heading {
  font-size: clamp(1.25rem, 3.5vw, 1.55rem);
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 10px;
  line-height: 1.3;
}
.nlg-exit-desc {
  font-size: 0.88rem;
  color: #94A3B8;
  line-height: 1.55;
  margin: 0 0 20px;
}
.nlg-exit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nlg-exit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.nlg-exit-field label {
  font-size: 12px;
  color: #CBD5E1;
  font-weight: 600;
}
.nlg-exit-field input {
  background: #06090F;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 11px 14px;
  color: #FFFFFF;
  font-size: 14px;
  box-sizing: border-box;
}
.nlg-exit-field input:focus {
  outline: none;
  border-color: #D9B54C;
}
.nlg-exit-btn {
  margin-top: 6px;
  background: #D9B54C;
  color: #000000;
  border: none;
  border-radius: 8px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.nlg-exit-btn:hover {
  background: #E5C365;
}
.nlg-exit-btn-ghost {
  background: transparent;
  color: #94A3B8;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  cursor: pointer;
}
.nlg-exit-btn-ghost:hover {
  color: #FFFFFF;
  border-color: #94A3B8;
}
.nlg-exit-err {
  color: #EF4444;
  font-size: 12px;
  margin-top: 6px;
}
</style>

<script>
(function() {
  'use strict';
  const modal = document.getElementById('nlg-exit-modal');
  if (!modal) return;

  const storageKey = 'nlg_exit_intent_dismissed';
  const hasDismissed = localStorage.getItem(storageKey);
  const now = Date.now();

  // Non mostrare se chiuso o compilato negli ultimi 14 giorni
  if (hasDismissed && (now - parseInt(hasDismissed, 10)) < (14 * 86400 * 1000)) {
    return;
  }

  let triggered = false;

  function showModal() {
    if (triggered) return;
    triggered = true;
    modal.classList.add('is-active');
    modal.setAttribute('aria-hidden', 'false');
  }

  function hideModal() {
    modal.classList.remove('is-active');
    modal.setAttribute('aria-hidden', 'true');
    localStorage.setItem(storageKey, String(Date.now()));
  }

  // 1. Trigger uscita desktop (verso la barra degli indirizzi o tab)
  document.addEventListener('mouseleave', function(e) {
    if (e.clientY <= 15) {
      showModal();
    }
  });

  // 2. Trigger timer su dispositivi mobili / engagement prolungato (45 sec)
  setTimeout(function() {
    if (!triggered && document.visibilityState === 'visible') {
      showModal();
    }
  }, 45000);

  // Chiusura
  const closeBtn = document.getElementById('nlg-exit-close');
  const overlay = document.getElementById('nlg-exit-overlay');
  const finishBtn = document.getElementById('nlg-exit-finish-btn');
  if (closeBtn) closeBtn.addEventListener('click', hideModal);
  if (overlay) overlay.addEventListener('click', hideModal);
  if (finishBtn) finishBtn.addEventListener('click', hideModal);

  document.addEventListener('keydown', function(e) {
    if (e.key === 'Escape' && modal.classList.contains('is-active')) {
      hideModal();
    }
  });

  // Invio Form AJAX
  const form = document.getElementById('nlg-exit-form');
  const errEl = document.getElementById('nlg-exit-err');
  const formView = document.getElementById('nlg-exit-form-view');
  const successView = document.getElementById('nlg-exit-success-view');

  if (form) {
    form.addEventListener('submit', function(e) {
      e.preventDefault();
      const submitBtn = document.getElementById('nlg-exit-submit-btn');
      if (submitBtn) {
        submitBtn.disabled = true;
        submitBtn.innerText = 'Generazione documento in corso...';
      }
      if (errEl) errEl.style.display = 'none';

      const formData = new FormData(form);

      fetch('/assets/api/lead-capture.php', {
        method: 'POST',
        headers: {
          'X-Requested-With': 'XMLHttpRequest',
          'Accept': 'application/json'
        },
        body: formData
      })
      .then(function(res) { return res.json(); })
      .then(function(data) {
        if (data.ok) {
          formView.style.display = 'none';
          successView.style.display = 'block';
          localStorage.setItem(storageKey, String(Date.now()));
        } else {
          if (errEl) {
            errEl.innerText = data.message || 'Errore durante la registrazione. Riprova.';
            errEl.style.display = 'block';
          }
          if (submitBtn) {
            submitBtn.disabled = false;
            submitBtn.innerText = 'Scarica Subito la Checklist (PDF Gratuito)';
          }
        }
      })
      .catch(function(err) {
        if (errEl) {
          errEl.innerText = 'Impossibile completare la richiesta. Verifica la connessione.';
          errEl.style.display = 'block';
        }
        if (submitBtn) {
          submitBtn.disabled = false;
          submitBtn.innerText = 'Scarica Subito la Checklist (PDF Gratuito)';
        }
      });
    });
  }
})();
</script>
</body>
</html>
