/* ==========================================================================
       1. DESIGN TOKENS — SWISS EDITORIAL OS (SPIGOLI VIVI, PALETTE CONTROLLATA)
       ========================================================================== */
    :root,
    [data-theme="light"] {
      --bg-page: #F5F3EE;          /* Bianco Calce architettonico */
      --bg-surface: #FFFFFF;       /* Superficie finestra */
      --bg-subtle: #EAE6DD;        /* Tufo grigio caldo per barre OS e hover */
      --bg-invert: #0B1320;        /* Blu Carbone profondo */
      --ink: #0B1320;              /* Testo primario */
      --ink-muted: #526077;        /* Grigio Piperno per metadati */
      --line: #CFCBC0;             /* Linee strutturali a vista (1px) */
      --line-strong: #0B1320;      /* Linee di sezione primarie (2px) */

      /* Accenti usati con disciplina chirurgica (10% della UI) */
      --azzurro: #0088CC;          /* Azzurro Partenope editoriale */
      --azzurro-bright: #29B6F6;
      --giallo: #FFB703;           /* Giallo Sole (LED / Highlight) */
      --corallo: #FF4D38;          /* Rosso Corallo (Picco termico Heatmap) */
      --basilico: #10B981;         /* Verde Basilico (Stato attivo / OK) */

      /* Scala Termica Heatmap (#per-chi) */
      --heat-5: #E63946;           /* Massima intensità: Product */
      --heat-4: #F77F00;           /* Alta intensità: Tech */
      --heat-3: #FCBF49;           /* Media intensità: Startup */
      --heat-2: #F4A261;           /* Media intensità: Founder */
      --heat-1: #FFD6C9;           /* Intensità calda: Business */

      --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
      --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
      --font-mono: "JetBrains Mono", monospace;
    }

    [data-theme="dark"] {
      --bg-page: #090E17;          /* Blu Abisso */
      --bg-surface: #111A2B;       /* Superficie finestra scura */
      --bg-subtle: #19253B;        /* Barra finestra OS */
      --bg-invert: #F5F3EE;        /* Calce su blocchi invertiti */
      --ink: #F5F3EE;              /* Testo primario chiaro */
      --ink-muted: #94A3B8;        /* Grigio Piperno chiaro */
      --line: #223049;             /* Linee strutturali scure */
      --line-strong: #F5F3EE;      /* Linee di sezione primarie */

      --azzurro: #38BDF8;
    }

    /* ==========================================================================
       2. RESET & GRIGLIA ARCHITETTONICA A SPIGOLO VIVO (RADIUS = 0)
       ========================================================================== */
    * {
      box-sizing: border-box;
      border-radius: 0 !important; /* Blocchi netti rigorosi */
    }
    html {
      scroll-behavior: smooth;
      scroll-padding-top: 76px;
      overflow-x: hidden;
    }
    body {
      margin: 0;
      background-color: var(--bg-page);
      color: var(--ink);
      font-family: var(--font-sans);
      font-size: 17px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
      transition: background-color 0.18s ease, color 0.18s ease;
    }

    a { color: inherit; }
    img, svg { display: block; max-width: 100%; }
    h1, h2, h3, p { margin-top: 0; }
    h1, h2, h3 {
      font-family: var(--font-display);
      line-height: 0.98;
      letter-spacing: -0.04em;
      overflow-wrap: break-word;
    }

    /* Contenitore con guide verticali strutturali a vista */
    .wrap {
      width: min(1240px, calc(100% - 32px));
      margin: 0 auto;
      position: relative;
    }

    section { scroll-margin-top: 76px; }

    /* ==========================================================================
       3. FINESTRE STILE MAC OS / WORKSTATION TECNICA
       ========================================================================== */
    .os-window {
      border: 1px solid var(--line-strong);
      background: var(--bg-surface);
      display: flex;
      flex-direction: column;
    }
    .os-titlebar {
      height: 36px;
      padding: 0 14px;
      background: var(--bg-subtle);
      border-bottom: 1px solid var(--line-strong);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      font-family: var(--font-mono);
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--ink-muted);
      user-select: none;
    }
    .os-dots {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }
    .os-dots span {
      width: 10px;
      height: 10px;
      border: 1px solid var(--line-strong);
      display: inline-block;
      background: transparent;
      transition: background-color 0.15s ease;
    }
    .os-window:hover .os-dots span:nth-child(1) { background: var(--corallo); }
    .os-window:hover .os-dots span:nth-child(2) { background: var(--giallo); }
    .os-window:hover .os-dots span:nth-child(3) { background: var(--basilico); }

    .os-path {
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: var(--ink);
    }
    /* ==========================================================================
       4. SEPARATORE DI SEZIONE MONUMENTALE (TIPOGRAFIA PURA)
       ========================================================================== */
    .section-divider {
      border-top: 2px solid var(--line-strong);
      background: var(--bg-page);
      padding: clamp(28px, 4.5vw, 52px) 0 clamp(16px, 2.4vw, 28px);
    }
    .divider-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
      gap: 24px 48px;
      align-items: end;
    }
    .divider-title {
      font-size: clamp(2.8rem, 7.4vw, 6.2rem);
      font-weight: 800;
      line-height: 0.92;
      letter-spacing: -0.05em;
      text-transform: uppercase;
      margin: 0;
    }
    .divider-desc {
      margin: 0;
      font-size: 1rem;
      color: var(--ink-muted);
      font-weight: 500;
      max-width: 440px;
      border-left: 2px solid var(--azzurro);
      padding-left: 16px;
    }

    /* ==========================================================================
       5. BOTTONI E MICRO-FEEDBACK TATTILE / APTICO
       ========================================================================== */
    .button,
    [data-haptic] {
      -webkit-tap-highlight-color: transparent;
    }
    .button {
      min-height: 50px;
      padding: 13px 24px;
      border: 1px solid var(--line-strong);
      background: var(--bg-surface);
      color: var(--ink);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      text-decoration: none;
      font-family: var(--font-mono);
      font-weight: 700;
      font-size: 0.82rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      cursor: pointer;
      user-select: none;
      position: relative;
      transition: background-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
    }
    .button:hover {
      background: var(--bg-subtle);
    }
    .button:active,
    .haptic-pulse {
      transform: scale(0.98);
    }
    .button-primary {
      background: var(--ink);
      color: var(--bg-page);
      border-color: var(--ink);
    }
    .button-primary:hover {
      background: var(--azzurro);
      border-color: var(--azzurro);
      color: #FFFFFF;
    }

    /* ==========================================================================
       6. HEADER STICKY MINIMALE & SWITCH TEMA
       ========================================================================== */
    .site-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 60;
      background: var(--bg-page);
      border-bottom: 1px solid var(--line-strong);
    }
    main { padding-top: 64px; }
    .nav {
      display: flex;
      align-items: stretch;
      justify-content: space-between;
      min-height: 64px;
    }
    .brand {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      padding-right: 24px;
      border-right: 1px solid var(--line);
      text-decoration: none;
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 1.05rem;
      letter-spacing: -0.03em;
    }
    .brand-mark {
      width: 32px;
      height: 32px;
      background: var(--ink);
      color: var(--bg-page);
      display: grid;
      place-items: center;
      font-family: var(--font-mono);
      font-size: 0.76rem;
      font-weight: 800;
    }
    .nav-links {
      display: flex;
      align-items: center;
      gap: 22px;
      font-family: var(--font-mono);
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .nav-links a {
      text-decoration: none;
      color: var(--ink-muted);
      padding: 6px 2px;
      border-bottom: 2px solid transparent;
      transition: color 0.15s ease, border-color 0.15s ease;
    }
    .nav-links a:hover {
      color: var(--ink);
      border-bottom-color: var(--azzurro);
    }
    .nav-links a.nav-cta {
      color: var(--bg-page);
      background: var(--ink);
      padding: 9px 14px;
      border: 1px solid var(--ink);
    }
    .nav-links a.nav-cta:hover {
      background: var(--azzurro);
      border-color: var(--azzurro);
      color: #FFFFFF;
    }

    .nav-controls {
      display: flex;
      align-items: center;
      gap: 8px;
      padding-left: 20px;
      border-left: 1px solid var(--line);
    }
    .theme-switch {
      height: 38px;
      padding: 0 12px;
      border: 1px solid var(--line-strong);
      background: var(--bg-surface);
      color: var(--ink);
      font-family: var(--font-mono);
      font-size: 0.72rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    .theme-switch:hover {
      background: var(--bg-subtle);
    }
    .theme-indicator {
      width: 8px;
      height: 8px;
      background: var(--giallo);
      border: 1px solid var(--ink);
    }
    [data-theme="dark"] .theme-indicator {
      background: var(--azzurro);
    }

    .menu-toggle {
      display: none;
      width: 38px;
      height: 38px;
      border: 1px solid var(--line-strong);
      background: var(--bg-surface);
      color: var(--ink);
      font-family: var(--font-mono);
      font-size: 1rem;
      cursor: pointer;
    }

    /* ==========================================================================
       7. HERO EDITORIALE + FINESTRA MAC OS
       ========================================================================== */
    .hero {
      padding: clamp(64px, 10vw, 124px) 0;
      border-bottom: 1px solid var(--line-strong);
    }
    .hero h1 {
      max-width: 1180px;
      font-size: clamp(3.6rem, 11vw, 9.2rem);
      font-weight: 800;
      line-height: 0.88;
      letter-spacing: -0.06em;
      margin-bottom: 0;
      text-transform: uppercase;
    }
    .hero h1 .accent {
      position: relative;
      display: inline-block;
      isolation: isolate;
      color: #0B1320;
      text-decoration: none;
    }
    .hero h1 .accent::before {
      content: "";
      position: absolute;
      left: -0.04em;
      right: -0.04em;
      top: 0.16em;
      bottom: 0.04em;
      z-index: -1;
      background: linear-gradient(90deg, var(--azzurro) 0%, var(--azzurro-bright) 50%, var(--azzurro) 100%);
      clip-path: polygon(0 10%, 100% 0, 99% 88%, 1% 100%);
      transform: rotate(-0.7deg) scaleX(0);
      transform-origin: left center;
      animation: highlight-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
    }
    @keyframes highlight-in {
      to { transform: rotate(-0.7deg) scaleX(1); }
    }
    [data-theme="dark"] .hero h1 .accent { color: var(--ink); }
    [data-theme="dark"] .hero h1 .accent::before {
      background: linear-gradient(90deg, #005A8C 0%, #006A9E 50%, #005A8C 100%);
    }

    .hero-lead {
      font-size: clamp(1.12rem, 1.6vw, 1.35rem);
      color: var(--ink-muted);
      max-width: 720px;
      margin: 42px 0 34px;
      font-weight: 500;
    }
    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
    }
    .hero-next {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
      max-width: 760px;
      margin: 0 0 26px;
      padding: 14px 18px;
      background: var(--bg-subtle);
      color: var(--ink);
      border: 1px solid var(--line-strong);
      border-left: 4px solid var(--azzurro);
      font-family: var(--font-mono);
      font-size: 0.78rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .hero-next-head {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px 14px;
      width: 100%;
    }
    .hero-next-status {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--ink);
    }
    .hero-next-dot {
      width: 8px;
      height: 8px;
      flex: 0 0 auto;
      background: var(--basilico);
      animation: status-pulse 2.8s ease-out infinite;
    }
    @keyframes status-pulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.35); }
      50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
    }
    .hero-next-label { color: var(--ink-muted); }
    .hero-next-date { font-size: 0.95rem; color: var(--ink); }
    .hero-next-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-left: auto;
      padding-bottom: 1px;
      color: var(--ink);
      text-decoration: none;
      border-bottom: 1px solid var(--azzurro);
      font-size: 0.7rem;
    }
    .hero-next-link .arrow { color: var(--azzurro); font-size: 0.9em; }
    .hero-next-link:hover { border-bottom-color: var(--ink); }
    .hero-next-link:hover .arrow { color: var(--ink); }
    .hero-next-track {
      position: relative;
      width: 100%;
      height: 8px;
      overflow: hidden;
      background: var(--bg-page);
      border: 1px solid var(--line-strong);
    }
    .hero-next-fill {
      position: absolute;
      inset: 0 auto 0 0;
      width: 0;
      background: linear-gradient(90deg, var(--azzurro) 0%, var(--azzurro-bright) 50%, var(--azzurro) 100%);
      background-size: 240% 100%;
      transition: width 2.4s cubic-bezier(0.22, 1, 0.36, 1);
      animation: progress-color 4.5s ease-in-out infinite alternate;
    }
    .hero-next-fill::before {
      content: "";
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      width: 2px;
      z-index: 1;
      background: var(--ink);
    }
    .hero-next-fill::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, 0.22) 6px 12px);
      animation: progress-stripes 1.4s linear infinite;
    }
    @keyframes progress-color {
      from { background-position: 0% 50%; }
      to { background-position: 100% 50%; }
    }
    @keyframes progress-stripes {
      from { background-position: 0 0; }
      to { background-position: 17px 0; }
    }
    @media (prefers-reduced-motion: reduce) {
      .hero h1 .accent::before {
        animation: none;
        transform: rotate(-0.7deg);
      }
      .hero-next-dot { animation: none; }
      .hero-next-fill { transition: none; animation: none; }
      .hero-next-fill::after { animation: none; }
    }

    /* ==========================================================================
       7B. REVEAL / LAZY LOAD ON SCROLL
       ========================================================================== */
    html.js-reveal .reveal-item {
      opacity: 0;
      transform: translateY(26px);
      filter: blur(8px);
      transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
        filter 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
      will-change: opacity, transform, filter;
    }
    html.js-reveal .reveal-item.is-revealed {
      opacity: 1;
      transform: none;
      filter: none;
      will-change: auto;
    }
    @media (prefers-reduced-motion: reduce) {
      html.js-reveal .reveal-item {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
      }
    }

    /* ==========================================================================
       8. MARQUEE TIPOGRAFICO SOTTILE
       ========================================================================== */
    .marquee {
      border-bottom: 1px solid var(--line-strong);
      overflow: hidden;
      background: var(--bg-subtle);
      color: var(--ink);
    }
    .marquee-track {
      display: flex;
      width: max-content;
      animation: marquee 120s linear infinite;
    }
    .marquee span {
      padding: 11px 28px;
      font-family: var(--font-mono);
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      white-space: nowrap;
      border-right: 1px solid var(--line);
    }
    @keyframes marquee { to { transform: translateX(-50%); } }

    /* ==========================================================================
       9. SEZIONE COMMUNITY — GRIGLIA A LINEE CONDIVISE (COLLAPSED BORDERS)
       ========================================================================== */
    .section-body {
      padding: clamp(24px, 3.5vw, 48px) 0 clamp(44px, 6vw, 80px);
    }
    .stats {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      border: 1px solid var(--line-strong);
      background: var(--bg-surface);
    }
    .stat {
      padding: 28px 24px;
      border-right: 1px solid var(--line);
      min-height: 190px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .stat:last-child { border-right: 0; }
    .stat-value {
      font-family: var(--font-display);
      font-size: clamp(3.2rem, 6vw, 5.4rem);
      font-weight: 800;
      letter-spacing: -0.06em;
      line-height: 0.9;
      font-variant-numeric: tabular-nums;
      margin: 18px 0 10px;
    }
    .stat-label {
      font-size: 0.88rem;
      color: var(--ink-muted);
      font-weight: 600;
    }

    /* ==========================================================================
       10. MOSAICO FOTO E CITAZIONI EDITORIALI
       ========================================================================== */
    .mosaic-grid {
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      grid-auto-rows: clamp(70px, 7.5vw, 90px);
      border: 1px solid var(--line-strong);
      background: var(--line-strong);
      gap: 1px;
    }
    .mosaic-tile {
      position: relative;
      margin: 0;
      overflow: hidden;
      background: var(--bg-surface);
      display: flex;
      align-items: flex-end;
      padding: 18px;
    }
    .mosaic-tile::before {
      content: "";
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(to right, var(--line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--line) 1px, transparent 1px);
      background-size: 24px 24px;
      opacity: 0.35;
    }
    .mosaic-tile img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1.04);
      transform-origin: center;
      transition: opacity 0.8s ease;
      animation: kenburns var(--kb-duration, 16s) cubic-bezier(0.34, 1.25, 0.64, 1) infinite alternate;
      backface-visibility: hidden;
      will-change: transform, opacity;
    }
    .mosaic-tile:nth-child(1) img { --kb-duration: 15s; --kb-x: -2.5%; --kb-y: -1.2%; }
    .mosaic-tile:nth-child(2) img { --kb-duration: 18s; --kb-x: 2%; --kb-y: -1.8%; }
    .mosaic-tile:nth-child(4) img { --kb-duration: 14s; --kb-x: -1.8%; --kb-y: 1.8%; }
    .mosaic-tile:nth-child(5) img { --kb-duration: 17s; --kb-x: 2.2%; --kb-y: 1.2%; }
    .mosaic-tile:nth-child(7) img { --kb-duration: 19s; --kb-x: -1.4%; --kb-y: -2%; }
    @keyframes kenburns {
      from { transform: translate3d(0, 0, 0) scale(1.04); }
      to { transform: translate3d(var(--kb-x, -2%), var(--kb-y, -1.5%), 0) scale(1.12); }
    }
    @media (prefers-reduced-motion: reduce) {
      .mosaic-tile img {
        animation: none;
        transform: none;
      }
    }
    .mosaic-tile:nth-child(1) { grid-column: 1 / 6; grid-row: 1 / 5; }
    .mosaic-tile:nth-child(2) { grid-column: 6 / 10; grid-row: 1 / 4; }
    .mosaic-tile:nth-child(3) { grid-column: 10 / 13; grid-row: 1 / 5; }
    .mosaic-tile:nth-child(4) { grid-column: 6 / 10; grid-row: 4 / 7; }
    .mosaic-tile:nth-child(5) { grid-column: 1 / 4; grid-row: 5 / 10; }
    .mosaic-tile:nth-child(6) { grid-column: 4 / 9; grid-row: 7 / 10; }
    .mosaic-tile:nth-child(7) { grid-column: 9 / 13; grid-row: 5 / 10; }

    .mosaic-tile.mosaic-quote {
      background: var(--bg-invert);
      color: var(--bg-page);
      padding: clamp(20px, 2.5vw, 32px);
      align-items: flex-start;
      flex-direction: column;
      justify-content: center;
    }
    .mosaic-tile.mosaic-quote::before { display: none; }
    .mosaic-quote p {
      margin: 0;
      font-family: var(--font-display);
      font-size: clamp(1.05rem, 1.4vw, 1.32rem);
      font-weight: 700;
      line-height: 1.25;
      letter-spacing: -0.02em;
    }
    /* ==========================================================================
       11. EVENTI E ARCHIVIO IN FINESTRA OS
       ========================================================================== */
    #galleria { padding-bottom: clamp(44px, 6vw, 80px); }
    .section-rule-dark { height: 2px; background: var(--line-strong); }
    .ios-haptic-trigger {
      position: fixed;
      left: 8px;
      bottom: 8px;
      width: 44px;
      height: 44px;
      opacity: 0.001;
      overflow: visible;
      pointer-events: none;
    }
    .cta-mail { width: 100%; }
    .cta-message {
      min-height: 20px;
      margin: 10px 0 0;
      color: var(--basilico);
      font-family: var(--font-mono);
      font-size: 0.72rem;
      line-height: 1.5;
    }
    .cta-message.error { color: var(--corallo); }
    .honeypot {
      position: absolute;
      left: -9999px;
      width: 1px;
      height: 1px;
      overflow: hidden;
      opacity: 0;
    }
    .footer-brand { color: var(--ink); }
    .event-card-upcoming {
      display: block;
      width: 100%;
      padding: clamp(24px, 3.5vw, 38px);
      background: var(--bg-surface);
      border: 0;
      border-bottom: 1px solid var(--line-strong);
      color: var(--ink);
      text-align: left;
      font: inherit;
      cursor: pointer;
      transition: background-color 0.15s ease;
    }
    .event-card-upcoming:hover {
      background: var(--bg-subtle);
    }
    .event-badge-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      margin-bottom: 14px;
      font-family: var(--font-mono);
      font-size: 0.74rem;
      font-weight: 700;
      text-transform: uppercase;
    }
    .status-pill {
      padding: 3px 8px;
      background: var(--azzurro);
      color: #FFFFFF;
    }
    .event-title {
      display: block;
      font-family: var(--font-display);
      font-size: clamp(1.6rem, 3.2vw, 2.5rem);
      font-weight: 800;
      letter-spacing: -0.035em;
      margin-bottom: 8px;
    }
    .event-summary {
      display: block;
      color: var(--ink-muted);
      font-size: 0.96rem;
      max-width: 580px;
    }

    .past-event {
      display: grid;
      grid-template-columns: 150px minmax(0, 1fr) auto auto;
      gap: 18px;
      align-items: center;
      width: 100%;
      padding: 18px 24px;
      border: 0;
      border-bottom: 1px solid var(--line);
      background: var(--bg-surface);
      color: var(--ink);
      font: inherit;
      text-align: left;
      cursor: pointer;
      transition: background-color 0.12s ease, padding-left 0.12s ease;
    }
    .past-event:last-child { border-bottom: 0; }
    .past-event:hover {
      background: var(--bg-subtle);
      padding-left: 30px;
    }
    .past-event-date {
      font-family: var(--font-mono);
      font-size: 0.74rem;
      font-weight: 700;
      color: var(--ink-muted);
      text-transform: uppercase;
    }
    .past-event-title {
      font-family: var(--font-display);
      font-size: 1.08rem;
      font-weight: 700;
    }
    .past-event-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .speaker-chip {
      font-family: var(--font-mono);
      font-size: 0.68rem;
      font-weight: 700;
      padding: 3px 8px;
      border: 1px solid var(--line-strong);
      background: var(--bg-page);
      color: var(--ink);
      text-transform: uppercase;
    }
    .event-type {
      font-family: var(--font-mono);
      font-size: 0.68rem;
      font-weight: 700;
      padding: 3px 8px;
      border: 1px solid var(--corallo);
      color: var(--corallo);
      text-transform: uppercase;
    }
    .past-event-open {
      font-family: var(--font-mono);
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--azzurro);
      text-transform: uppercase;
    }

    /* ==========================================================================
       12. HEATMAP TERMICA REALE (#per-chi)
       ========================================================================== */
    .interest-heatmap {
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      grid-auto-rows: minmax(185px, auto);
      background: var(--line-strong);
      gap: 1px;
    }
    .interest-block {
      position: relative;
      padding: 26px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      overflow: hidden;
      color: #0B1320;
      isolation: isolate;
    }
    /* Griglia millimetrica interna ad ogni cella termica */
    .interest-block::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
      background-size: 28px 28px;
    }
    /* Fluido termico reattivo al puntatore (desktop) */
    .interest-block::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      background:
        radial-gradient(360px circle at var(--hx, 50%) var(--hy, 50%), rgba(41, 182, 246, 0.75), transparent 60%),
        radial-gradient(300px circle at var(--hx2, 50%) var(--hy2, 50%), rgba(255, 214, 110, 0.85), transparent 64%),
        radial-gradient(240px circle at var(--hx3, 50%) var(--hy3, 50%), rgba(255, 77, 56, 0.75), transparent 68%),
        radial-gradient(190px circle at var(--hx4, 50%) var(--hy4, 50%), rgba(255, 77, 56, 0.4), transparent 72%);
      opacity: 0;
      mix-blend-mode: color;
      transition: opacity 0.4s ease;
    }
    .interest-heatmap.is-hovering .interest-block::after { opacity: 1; }
    .interest-heatmap.is-hovering .interest-block[data-heat="98"]::after { opacity: 0.85; }
    .interest-block h3,
    .interest-block p {
      transform: translate3d(var(--text-x, 0px), var(--text-y, 0px), 0);
      transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
      will-change: transform;
    }
    .interest-block h3 {
      font-size: clamp(1.5rem, 2.4vw, 2.2rem);
      margin: 22px 0 8px;
      text-transform: uppercase;
    }
    .interest-block p {
      margin: 0;
      font-size: 0.92rem;
      line-height: 1.5;
      opacity: 0.92;
      max-width: 420px;
    }

    /* Gradiente di vicinanza/calore dei 5 blocchi */
    .interest-block[data-heat="98"] {
      grid-column: span 7;
      grid-row: span 2;
      background: linear-gradient(135deg, #D62828 0%, var(--heat-5) 52%, var(--heat-4) 100%);
      color: #FFFFFF;
    }
    .interest-block[data-heat="98"] h3 {
      font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    }
    .interest-block[data-heat="88"] {
      grid-column: span 5;
      background: linear-gradient(135deg, var(--heat-4) 0%, var(--heat-3) 100%);
    }
    .interest-block[data-heat="76"] {
      grid-column: span 5;
      background: linear-gradient(135deg, var(--heat-3) 0%, #FFD166 100%);
    }
    .interest-block[data-heat="68"] {
      grid-column: span 6;
      background: linear-gradient(135deg, var(--heat-2) 0%, #E76F51 100%);
    }
    .interest-block[data-heat="56"] {
      grid-column: span 6;
      background: linear-gradient(135deg, var(--heat-1) 0%, #FFB4A2 100%);
    }
    html.js-heatmap .interest-heatmap {
      clip-path: circle(0% at 50% 50%);
      transition: clip-path 1.4s cubic-bezier(0.22, 1, 0.36, 1);
    }
    html.js-heatmap .interest-heatmap.is-heat-filled {
      clip-path: circle(150% at 50% 50%);
    }
    @media (prefers-reduced-motion: reduce) {
      html.js-heatmap .interest-heatmap {
        clip-path: none;
        transition: none;
      }
      .interest-block h3,
      .interest-block p {
        transform: none;
        transition: none;
      }
    }
    /* ==========================================================================
       13. MANIFESTO, VALORI, FORMATO, PRODOTTO, FUTURO (GRIGLIE EDITORIALI)
       ========================================================================== */
    .manifesto-box {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      border: 1px solid var(--line-strong);
      background: var(--bg-surface);
    }
    .manifesto-left {
      padding: clamp(28px, 4vw, 48px);
      border-right: 1px solid var(--line-strong);
      background: var(--bg-invert);
      color: var(--bg-page);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .manifesto-file {
      font-family: var(--font-mono);
      font-size: 0.74rem;
      opacity: 0.72;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }
    .manifesto-title {
      margin: auto 0 0;
      font-size: clamp(2.4rem, 4.2vw, 4.4rem);
      text-transform: uppercase;
      color: var(--bg-page);
    }
    .manifesto-title .hash { color: var(--azzurro-bright); }
    .manifesto-right {
      padding: clamp(28px, 4vw, 48px);
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 18px;
      min-height: 360px;
      font-family: var(--font-mono);
      font-size: 0.9rem;
      line-height: 1.75;
    }
    .manifesto-right p { margin: 0; min-height: 1.75em; }
    .type-cursor {
      display: inline-block;
      width: 0.58em;
      height: 1.05em;
      margin-left: 2px;
      background: var(--azzurro-bright);
      vertical-align: -0.15em;
      animation: cursorBlink 0.9s steps(1) infinite;
    }
    @keyframes cursorBlink { 50% { opacity: 0; } }

    /* Format Step editoriali */
    .format-steps {
      border: 1px solid var(--line-strong);
      background: var(--bg-surface);
    }
    .format-step {
      display: grid;
      grid-template-columns: 90px minmax(200px, 0.8fr) minmax(0, 1.2fr);
      gap: 24px;
      align-items: baseline;
      padding: 26px 28px;
      border-bottom: 1px solid var(--line);
      transition: background-color 0.15s ease;
    }
    .format-step:last-child { border-bottom: 0; }
    .format-step-num {
      font-family: var(--font-mono);
      font-size: 0.82rem;
      font-weight: 800;
      color: var(--azzurro);
    }
    .format-step h3 {
      margin: 0;
      font-size: 1.35rem;
      text-transform: uppercase;
    }
    .format-step p {
      margin: 0;
      color: var(--ink-muted);
      font-size: 0.96rem;
    }

    /* ==========================================================================
       14. CTA FINALE IN FINESTRA TERMINALE / INVITO
       ========================================================================== */
    .cta-body {
      padding: clamp(28px, 5vw, 56px);
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
      gap: 40px;
      align-items: center;
    }
    .cta-body h2 {
      font-size: clamp(2rem, 4.2vw, 3.4rem);
      text-transform: uppercase;
      margin-bottom: 14px;
    }
    .cta-body p {
      color: var(--ink-muted);
      margin: 0;
      max-width: 540px;
    }
    .cta-form-wrap {
      border: 1px solid var(--line-strong);
      padding: 24px;
      background: var(--bg-page);
    }
    .cta-form-label {
      display: block;
      font-family: var(--font-mono);
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      margin-bottom: 10px;
      color: var(--ink-muted);
    }
    .cta-form {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
    }
    .cta-input {
      width: 100%;
      height: 50px;
      padding: 0 14px;
      border: 1px solid var(--line-strong);
      background: var(--bg-surface);
      color: var(--ink);
      font-family: var(--font-mono);
      font-size: 0.84rem;
      outline: none;
    }
    .cta-input:focus { border-color: var(--azzurro); }
    .cta-input:disabled { opacity: 0.6; cursor: wait; }
    .cta-submit { width: 100%; }
    .cta-spinner {
      display: none;
      width: 14px;
      height: 14px;
      border: 2px solid currentColor;
      border-right-color: transparent;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }
    .cta-submit.loading .cta-submit-text { display: none; }
    .cta-submit.loading .cta-spinner { display: inline-block; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ==========================================================================
       15. MODALE EVENTO STILE FINESTRA MAC OS
       ========================================================================== */
    .event-modal {
      width: min(680px, calc(100vw - 28px));
      padding: 0;
      color: var(--ink);
      background: var(--bg-surface);
      border: 1px solid var(--line-strong);
      box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    }
    .event-modal::backdrop {
      background: rgba(9, 14, 23, 0.72);
      backdrop-filter: blur(3px);
    }
    .event-modal-inner {
      padding: clamp(24px, 4vw, 38px);
    }
    .event-modal-close {
      border: 1px solid var(--line-strong);
      background: var(--bg-surface);
      color: var(--ink);
      height: 26px;
      padding: 0 10px;
      font-family: var(--font-mono);
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      white-space: nowrap;
      line-height: 1;
    }
    .event-modal-close:hover {
      background: var(--corallo);
      color: #FFFFFF;
    }
    .event-modal-date {
      margin: 0 0 8px;
      font-family: var(--font-mono);
      font-size: 0.74rem;
      font-weight: 700;
      text-transform: uppercase;
      color: var(--azzurro);
    }
    .event-modal h2 {
      font-size: clamp(1.7rem, 3.8vw, 2.5rem);
      margin-bottom: 16px;
      text-transform: uppercase;
    }
    .event-modal-description {
      color: var(--ink-muted);
      font-size: 1rem;
    }
    .event-modal-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 22px 0 0;
    }
    .event-modal-meta span {
      padding: 4px 10px;
      border: 1px solid var(--line-strong);
      font-family: var(--font-mono);
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      background: var(--bg-page);
    }
    .event-modal-meta .event-type {
      padding: 3px 8px;
      border-color: var(--corallo);
      background: transparent;
      color: var(--corallo);
      font-size: 0.68rem;
    }
    .event-modal-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 28px;
    }
    .event-modal-actions .button[aria-disabled="true"] {
      opacity: 0.45;
      pointer-events: none;
    }

    /* ==========================================================================
       16. FOOTER
       ========================================================================== */
    .site-footer {
      border-top: 2px solid var(--line-strong);
      padding: 28px 0 40px;
      font-family: var(--font-mono);
      font-size: 0.74rem;
      color: var(--ink-muted);
    }
    .footer-grid {
      display: flex;
      justify-content: space-between;
      gap: 24px;
      flex-wrap: wrap;
    }

    /* ==========================================================================
       17. RESPONSIVE & MOBILE
       ========================================================================== */
    @media (max-width: 1020px) {
      .nav-links {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--bg-surface);
        border-bottom: 2px solid var(--line-strong);
      }
      .nav-links.open { display: flex; }
      .nav-links a {
        padding: 14px 20px;
        border-bottom: 1px solid var(--line);
      }
      .menu-toggle { display: inline-grid; place-items: center; }
    }

    @media (max-width: 920px) {
      .divider-grid,
      .manifesto-box,
      .cta-body {
        grid-template-columns: 1fr;
      }
      .manifesto-left {
        border-right: 0;
        border-bottom: 1px solid var(--line-strong);
      }
      .manifesto-right { min-height: 420px; }
      .stats { grid-template-columns: 1fr; }
      .stat { border-right: 0; border-bottom: 1px solid var(--line); }
      .stat:last-child { border-bottom: 0; }

      .interest-block[data-heat="98"],
      .interest-block[data-heat="88"],
      .interest-block[data-heat="76"],
      .interest-block[data-heat="68"],
      .interest-block[data-heat="56"] {
        grid-column: span 6;
        grid-row: auto;
      }
      .interest-block[data-heat="98"] {
        grid-column: span 12;
      }
      .format-step {
        grid-template-columns: 50px 1fr;
      }
      .format-step p {
        grid-column: 2;
      }
    }

    @media (max-width: 680px) {
      .interest-block[data-heat="88"],
      .interest-block[data-heat="76"],
      .interest-block[data-heat="68"],
      .interest-block[data-heat="56"] {
        grid-column: span 12;
      }
      .mosaic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 130px;
      }
      .mosaic-tile:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
      .mosaic-tile:nth-child(2) { grid-column: 1 / 2; grid-row: 3 / 5; }
      .mosaic-tile:nth-child(3) { grid-column: 2 / 3; grid-row: 3 / 5; }
      .mosaic-tile:nth-child(4) { grid-column: 1 / 3; grid-row: 5 / 7; }
      .mosaic-tile:nth-child(5) { grid-column: 1 / 2; grid-row: 7 / 9; }
      .mosaic-tile:nth-child(6) { grid-column: 2 / 3; grid-row: 7 / 9; }
      .mosaic-tile:nth-child(7) { grid-column: 1 / 3; grid-row: 9 / 11; }

      .hero h1 { font-size: clamp(2.7rem, 13vw, 4.6rem); }
      .hero-lead { margin-top: 30px; }
      .hero-next {
        gap: 9px;
        padding: 12px;
        font-size: 0.66rem;
      }
      .hero-next-head { gap: 6px 10px; }
      .hero-next-date { font-size: 0.74rem; }
      .hero-next-link { margin-left: 0; }
      .past-event {
        grid-template-columns: 1fr auto;
        gap: 6px 12px;
        padding: 16px;
      }
      .past-event-date { grid-column: 1 / -1; }
      .past-event-title { grid-column: 1 / -1; }
      .past-event-tags { grid-column: 1; }
      .past-event-open { grid-column: 2; align-self: end; }
    }

    @media (min-width: 521px) and (max-width: 680px) {
      .mosaic-grid { grid-auto-rows: clamp(130px, 25vw, 171px); }
    }
    @media (max-width: 520px) {
      .divider-grid > * { min-width: 0; }
      .divider-title {
        font-size: clamp(2rem, 11vw, 2.8rem);
        overflow-wrap: anywhere;
      }
      .divider-desc {
        font-size: 0.95rem;
        padding-left: 12px;
      }
    }

    /* ==========================================================================
       18. CONSENSO PRIVACY NEL FORM
       ========================================================================== */
    .cta-consent {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr);
      gap: 10px;
      align-items: start;
      font-family: var(--font-sans);
      font-size: 0.78rem;
      line-height: 1.45;
      color: var(--ink-muted);
      cursor: pointer;
    }
    .cta-consent input[type="checkbox"] {
      appearance: none;
      -webkit-appearance: none;
      width: 18px;
      height: 18px;
      margin: 1px 0 0;
      border: 1px solid var(--line-strong);
      background: var(--bg-surface);
      display: grid;
      place-items: center;
      cursor: pointer;
      flex: 0 0 auto;
    }
    .cta-consent input[type="checkbox"]::after {
      content: "";
      width: 10px;
      height: 10px;
      background: var(--azzurro);
      transform: scale(0);
      transition: transform 0.15s ease;
    }
    .cta-consent input[type="checkbox"]:checked::after { transform: scale(1); }
    .cta-consent input[type="checkbox"]:focus-visible {
      outline: 2px solid var(--azzurro);
      outline-offset: 2px;
    }
    .cta-consent a {
      color: var(--ink);
      text-decoration: underline;
      text-decoration-color: var(--azzurro);
      text-underline-offset: 3px;
    }
    .cta-consent a:hover { color: var(--azzurro); }

    .footer-links {
      display: flex;
      flex-wrap: wrap;
      gap: 18px;
      align-items: center;
    }
    .footer-links a {
      color: var(--ink-muted);
      text-decoration: none;
    }
    .footer-links a:hover { color: var(--ink); }

    /* ==========================================================================
       19. PAGINA PRIVACY POLICY
       ========================================================================== */
    .privacy-page { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 100px); }
    .privacy-head { max-width: 880px; margin-bottom: clamp(28px, 4vw, 48px); }
    .privacy-kicker {
      margin: 0 0 12px;
      font-family: var(--font-mono);
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--azzurro);
    }
    .privacy-head h1 {
      font-size: clamp(2.6rem, 7vw, 5.4rem);
      line-height: 0.95;
      text-transform: uppercase;
      margin: 0 0 18px;
    }
    .privacy-updated {
      margin: 0 0 18px;
      font-family: var(--font-mono);
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--ink-muted);
    }
    .privacy-lead {
      margin: 0;
      max-width: 760px;
      font-size: 1.05rem;
      color: var(--ink-muted);
    }
    .privacy-window { margin-bottom: 24px; }
    .privacy-content {
      padding: clamp(24px, 4vw, 48px);
      max-width: 900px;
    }
    .privacy-content h2 {
      font-size: clamp(1.3rem, 2.2vw, 1.8rem);
      margin: 32px 0 12px;
      text-transform: uppercase;
    }
    .privacy-content h2:first-child { margin-top: 0; }
    .privacy-content p,
    .privacy-content li {
      color: var(--ink-muted);
      font-size: 1rem;
      line-height: 1.75;
    }
    .privacy-content p { margin: 0 0 14px; }
    .privacy-content ul { margin: 0 0 18px; padding-left: 22px; }
    .privacy-content li { margin-bottom: 8px; }
    .privacy-content a {
      color: var(--ink);
      text-decoration: underline;
      text-decoration-color: var(--azzurro);
      text-underline-offset: 3px;
    }
    .privacy-content a:hover { color: var(--azzurro); }
    .privacy-content strong { color: var(--ink); }
    .privacy-back { align-self: center; }
    @media (max-width: 680px) {
      .privacy-head h1 { font-size: clamp(2.2rem, 12vw, 3.4rem); }
      .privacy-content { padding: 20px; }
      .privacy-back { padding: 10px 14px; font-size: 0.68rem; }
    }
    @media (max-width: 380px) {
      .privacy-page .brand > span:last-child { display: none; }
      .privacy-page .brand { padding-right: 12px; }
    }
