/* ==========================================================================
   BrainPMI — notte e luce
   Il buio è l'azienda di oggi, con la conoscenza sparsa. La luce bianca sono
   i documenti; la luce calda è quella accesa in casa: compare dove BrainPMI
   ha messo ordine, dove c'è una fonte e sul suo cursore.
   ========================================================================== */

@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #04060C;
  --deep: #080B14;
  --panel: #0C101B;
  --panel-2: #111626;
  --star: #EEF2FA;
  --text: rgba(238, 242, 250, .9);
  --muted: rgba(238, 242, 250, .62);
  --dim: rgba(238, 242, 250, .4);
  --faint: rgba(238, 242, 250, .16);
  --line: rgba(238, 242, 250, .09);
  --warm: #FFC35C;
  --warm-2: #FF9F3A;
  --warm-glow: rgba(255, 180, 70, .45);
  --gold: #BB943C;
  --paper: #F4F5F8;          /* i pannelli dei menu: chiari sul buio */
  --paper-ink: #0E1424;
  --paper-muted: #5B6376;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --hdr: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 16px); }
body {
  margin: 0; background: var(--night); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6; font-weight: 380;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--warm); color: var(--night); }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--star); color: var(--night); padding: .6rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Titoli: sottili, luminosi; l'ultima parte resta in penombra ---------- */
.display, .h2 {
  font-weight: 300; color: var(--star); letter-spacing: -.042em; line-height: 1.02; text-wrap: balance;
  text-shadow: 0 0 40px rgba(190, 210, 255, .18);
}
.display { font-size: clamp(2.8rem, 1rem + 5.6vw, 6.4rem); }
.h2 { font-size: clamp(2.2rem, 1rem + 3.4vw, 4.4rem); }
.soft { color: var(--dim); }
.h3 { font-size: clamp(1.4rem, 1rem + .9vw, 1.9rem); font-weight: 400; letter-spacing: -.025em; line-height: 1.15; color: var(--star); }
.lead { color: var(--muted); font-size: clamp(1.02rem, .98rem + .3vw, 1.2rem); line-height: 1.55; max-width: 34em; text-wrap: pretty; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--muted); }
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 12px var(--warm); }

/* sottolineatura disegnata a mano di luce, come "skyrocket" */
.ul { position: relative; white-space: nowrap; }
.ul::after {
  content: ""; position: absolute; left: .02em; right: .02em; bottom: -.04em; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 195, 92, 0), var(--warm) 20%, var(--warm) 80%, rgba(255, 195, 92, 0));
  box-shadow: 0 0 14px var(--warm-glow); transform: scaleX(var(--u, 0)); transform-origin: left; transition: transform 1.2s var(--ease) .5s;
}
.is-ready .ul { --u: 1; }

/* ---------- Pulsanti ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 22px;
  border-radius: 999px; background: var(--star); color: var(--night); font-weight: 500; font-size: .9375rem; white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 0 28px rgba(200, 215, 255, .28);
  transition: box-shadow .3s ease, transform .1s ease-out, background-color .2s ease;
}
.btn:hover { box-shadow: 0 0 0 1px #fff, 0 0 48px rgba(200, 215, 255, .55); }
.btn:active { transform: scale(.97); }
.btn.is-pressed { box-shadow: 0 0 0 1px #fff, 0 0 0 8px rgba(255, 195, 92, .18), 0 0 60px var(--warm-glow); }
.btn-dark { background: rgba(238, 242, 250, .06); color: var(--star); box-shadow: inset 0 0 0 1px var(--faint); }
.btn-dark:hover { background: rgba(238, 242, 250, .1); box-shadow: inset 0 0 0 1px rgba(238, 242, 250, .3); }
.btn-sm { min-height: 36px; padding: 7px 15px; font-size: .875rem; }
.btn-lg { min-height: 56px; padding: 15px 32px; font-size: 1.0625rem; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: flex-end; gap: .06em; color: var(--star); font-size: 1.4rem; font-weight: 500; letter-spacing: -.035em; line-height: .8; }
.logo svg { width: .78em; height: 1.04em; }
.logo b { font-weight: 500; color: var(--gold); }
.logo-dot { fill: var(--warm); }

/* ==========================================================================
   Header e menu
   ========================================================================== */
.hdr { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--hdr); transition: background-color .4s ease; }
.hdr::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease; background: rgba(4, 6, 12, .62); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.hdr.is-scrolled::before, .hdr.is-open::before { opacity: 1; }
.hdr-in { position: relative; height: 100%; display: flex; align-items: center; gap: 28px; }
.hdr .logo { margin-right: 8px; }
.nav { display: none; align-items: center; gap: 2px; font-size: .9rem; }
.nav-item { position: relative; }
.nav-btn { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 9px; color: rgba(238, 242, 250, .78); transition: background-color .2s ease, color .2s ease; }
.nav-btn:hover, .nav-btn[aria-expanded="true"] { color: var(--star); background: rgba(238, 242, 250, .07); }
.nav-btn .i { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.nav-btn[aria-expanded="true"] .i { transform: rotate(180deg); }
.hdr-cta { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hdr-cta .btn-dark { display: none; }
@media (min-width: 1000px) { .nav { display: flex; } .hdr-cta .btn-dark { display: inline-flex; } }

/* il pannello: chiaro, nasce dal suo pulsante */
.mega {
  position: absolute; top: calc(100% + 10px); left: -8px; z-index: 5; padding: 8px; border-radius: 16px;
  background: var(--paper); color: var(--paper-ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .6);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: 40px 0;
  transition: opacity .18s ease, transform .3s var(--ease), visibility 0s linear .3s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .35s var(--ease), visibility 0s; }
.mega-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 640px; }
.mega-card { display: block; border-radius: 11px; padding: 12px 14px 14px; background: var(--white, #fff); box-shadow: inset 0 0 0 1px rgba(14, 20, 36, .08); transition: box-shadow .2s ease; }
.mega-card:hover { box-shadow: inset 0 0 0 1px rgba(14, 20, 36, .22); }
.mega-card strong { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: .9rem; }
.mega-card strong em { font-style: normal; font-size: .6875rem; padding: 1px 7px; border-radius: 999px; background: var(--paper-ink); color: var(--warm); }
.mega-card span { display: block; color: var(--paper-muted); font-size: .8rem; margin-top: 2px; }
.mega-vis { position: relative; height: 64px; margin: 12px -6px -6px; border-radius: 8px; overflow: hidden; background: radial-gradient(80% 140% at 50% 120%, #1B2440, #05070E 70%); }
.mega-vis.is-light { background: linear-gradient(#fff, #EEF0F5); box-shadow: inset 0 0 0 1px rgba(14, 20, 36, .06); }
.mega-vis svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mega-links { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 8px 6px 4px; }
.mega-links a { padding: 6px 8px; border-radius: 7px; font-size: .84rem; color: #2A3247; }
.mega-links a:hover { background: rgba(14, 20, 36, .06); color: var(--paper-ink); }
.mega-list { display: grid; grid-template-columns: 300px 260px; gap: 8px; }
.mega-list ul { display: grid; gap: 2px; padding: 4px; }
.mega-list li a { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 9px; }
.mega-list li a:hover { background: rgba(14, 20, 36, .06); }
.mega-list li .ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px rgba(14, 20, 36, .1); flex: none; color: var(--paper-ink); }
.mega-list li .ico .i { width: 15px; height: 15px; }
.mega-list li strong { display: block; font-weight: 500; font-size: .875rem; }
.mega-list li span { display: block; font-size: .78rem; color: var(--paper-muted); line-height: 1.4; }
.mega-feature { display: flex; flex-direction: column; border-radius: 11px; padding: 14px; background: #fff; box-shadow: inset 0 0 0 1px rgba(14, 20, 36, .08); }
.mega-feature strong { font-weight: 500; font-size: .9rem; }
.mega-feature > span { font-size: .78rem; color: var(--paper-muted); }
.book { position: relative; align-self: center; width: 132px; height: 170px; margin: 16px 0 4px; border-radius: 4px 8px 8px 4px; transform: perspective(600px) rotateY(-16deg); background: linear-gradient(135deg, #142A5C, #0B1F45 60%, #081733); box-shadow: 10px 14px 30px -8px rgba(11, 31, 69, .6), inset 3px 0 0 rgba(255, 255, 255, .12); color: #fff; padding: 14px 12px; font-size: .7rem; line-height: 1.3; }
.book svg { width: 16px; height: 21px; margin-bottom: 52px; color: #fff; }
.book b { display: block; font-weight: 500; font-size: .82rem; }
.mega-person { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1px rgba(14, 20, 36, .08); width: 420px; }
.mega-person + ul { padding: 6px 0 0; width: 420px; }

.burger { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--faint); }
.burger span, .burger span::before, .burger span::after { display: block; width: 16px; height: 1.5px; background: var(--star); position: relative; transition: transform .3s var(--ease); }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -5px; } .burger span::after { top: 5px; }
.hdr.is-open .burger span { background: transparent; }
@media (min-width: 1000px) { .hdr .burger { display: none; } }
@media (max-width: 999px) { .hdr-in { gap: 12px; } }
@media (max-width: 340px) { .hdr-cta .btn:not(.btn-dark) { display: none; } }
.hdr.is-open .burger span::before { transform: translateY(5px) rotate(45deg); }
.hdr.is-open .burger span::after { transform: translateY(-5px) rotate(-45deg); }
.sheet { position: fixed; inset: var(--hdr) 0 0; z-index: 99; padding: 16px var(--gutter) 32px; overflow-y: auto; background: rgba(4, 6, 12, .96); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s ease, transform .35s var(--ease), visibility 0s linear .35s; }
.hdr.is-open + .sheet { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .35s var(--ease), visibility 0s; }
.sheet details { border-bottom: 1px solid var(--line); }
.sheet summary { list-style: none; display: flex; justify-content: space-between; padding: 18px 0; font-size: 1.25rem; color: var(--star); cursor: pointer; }
.sheet summary::-webkit-details-marker { display: none; }
.sheet details ul { display: grid; gap: 4px; padding-bottom: 16px; }
.sheet details a { display: block; padding: 8px 0; color: var(--muted); }
.sheet > a { display: block; padding: 18px 0; font-size: 1.25rem; color: var(--star); border-bottom: 1px solid var(--line); }
.sheet .btn { width: 100%; margin-top: 24px; padding: 12px 22px; border-bottom: 0; color: var(--night); font-size: 1rem; }

/* ==========================================================================
   I cursori: quello di BrainPMI (luce calda, con l'anello) e quello delle persone
   ========================================================================== */
.cur { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; will-change: transform; }
.cur svg { width: 22px; height: 22px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
.cur-tag { position: absolute; left: 16px; top: 18px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 500; white-space: nowrap; }
.cur-agent svg { fill: var(--warm); stroke: #3A2405; stroke-width: 1.2; }
.cur-agent .cur-tag { background: var(--warm); color: #241603; box-shadow: 0 0 18px var(--warm-glow); }
.cur-ring { position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--warm); opacity: 0; transform: scale(.4); }
.cur-agent.is-click .cur-ring { animation: ring .7s var(--ease); }
.cur-agent::before { content: ""; position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(var(--warm-glow), transparent 65%); }
@keyframes ring { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.8); } }

/* ==========================================================================
   1. Apertura e scena: il buio, la casa, il tunnel, la domanda
   ========================================================================== */
.scene { position: relative; height: 380vh; }   /* era 760vh: la casa arriva con metà dello scorrimento (4/11/2026) */
.scene-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; text-align: center; padding: var(--hdr) var(--gutter) 0; will-change: opacity, transform, filter; }
.hero-copy .lead { margin-top: 26px; max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 34px; }
.hero-cur { z-index: 5; }
.cap { position: absolute; left: 0; right: 0; z-index: 2; text-align: center; padding-inline: var(--gutter); opacity: 0; pointer-events: none; }
.cap-1 { bottom: 10vh; font-size: clamp(1.4rem, 1rem + 1.4vw, 2.4rem); font-weight: 300; letter-spacing: -.03em; color: var(--star); }
.cap-2 { top: 24vh; }
.cap-2 .h2 { font-size: clamp(2rem, 1rem + 3vw, 4rem); }
.prompt {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: min(640px, calc(100vw - 32px)); opacity: 0;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; border-radius: 16px;
  background: rgba(12, 16, 27, .82); box-shadow: inset 0 0 0 1px rgba(238, 242, 250, .12), 0 20px 60px -10px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transform: translate(-50%, -50%);
}
.prompt-av { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(160deg, #2A2210, #120D04); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .4); flex: none; }
.prompt-av svg { width: 11px; height: 15px; color: var(--star); }
.prompt-t { flex: 1; min-width: 0; color: var(--star); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.prompt-t:empty::before { content: "Fate una domanda…"; color: var(--dim); }
.prompt-t.typing::after { content: ""; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--star); animation: blink 1s steps(1) infinite; }
.prompt-go { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(238, 242, 250, .1); flex: none; transition: background-color .3s ease, box-shadow .3s ease; }
.prompt-go svg { width: 15px; height: 15px; fill: none; stroke: var(--star); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.prompt.is-ready .prompt-go { background: var(--warm); box-shadow: 0 0 24px var(--warm-glow); }
.prompt.is-ready .prompt-go svg { stroke: #241603; }
@media (max-width: 640px) { .prompt-t { white-space: normal; line-height: 1.35; font-size: .95rem; } .prompt { align-items: flex-start; } }
.scroll-hint { position: absolute; z-index: 2; bottom: 26px; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; font-size: .78rem; color: var(--dim); }
.scroll-hint span { width: 1px; height: 34px; background: linear-gradient(transparent, var(--star)); animation: hint 2.2s var(--ease) infinite; }
@keyframes hint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ==========================================================================
   Sezioni
   ========================================================================== */
.sec { position: relative; padding-block: clamp(96px, 12vw, 180px); }
.sec-head { display: grid; gap: 24px; margin-bottom: clamp(48px, 6vw, 88px); }
@media (min-width: 960px) { .sec-head.split { grid-template-columns: 1.2fr 1fr; align-items: end; gap: 64px; } }
.sec-head.center { justify-items: center; text-align: center; }

/* entrate: i titoli si accendono, i blocchi salgono (una volta sola) */
.rise { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.rise.in { opacity: 1; transform: none; }

/* ---------- Finestre finte del prodotto ---------- */
.win { position: relative; border-radius: 14px; background: linear-gradient(180deg, #0E1322, #090C16); box-shadow: inset 0 0 0 1px rgba(238, 242, 250, .1), 0 50px 100px -40px rgba(0, 0, 0, .9); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(238, 242, 250, .14); }
.win-path { flex: 1; min-width: 0; height: 22px; display: flex; align-items: center; padding: 0 10px; border-radius: 6px; background: rgba(238, 242, 250, .04); font: .72rem var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; }
.win-body { display: grid; grid-template-columns: 170px 1fr; min-height: 380px; }
.win-side { padding: 14px 10px; border-right: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.win-side p { padding: 0 8px; margin: 4px 0 6px; font-size: .7rem; color: var(--dim); }
.win-side li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; }
.win-side li .i { width: 14px; height: 14px; }
.win-side li.on { background: rgba(238, 242, 250, .07); color: var(--star); }
.win-main { position: relative; padding: 18px 20px 64px; min-width: 0; }
.win-h { font-size: .95rem; color: var(--star); margin-bottom: 14px; }
.win-pill { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%) translateY(8px); display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(12, 16, 27, .9); box-shadow: inset 0 0 0 1px rgba(238, 242, 250, .12); font-size: .78rem; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity .4s ease, transform .6s var(--ease); }
.win-pill b { font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--warm); color: #241603; }
.mode.is-on .win-pill { opacity: 1; transform: translateX(-50%); transition-delay: 2.6s; }

/* pagina di documento dentro la finestra */
.doc { padding: 16px 18px; border-radius: 8px; background: #F7F4EC; color: #3A4050; font-size: .74rem; line-height: 1.55; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8); }
.doc-h { display: flex; justify-content: space-between; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid #E2DCCB; font: .62rem var(--mono); color: #7A7E88; }
.doc b { display: block; font-size: .85rem; font-weight: 600; color: #0E1424; margin-bottom: 6px; }
.doc p + p { margin-top: 6px; }
.hl { padding: 1px 2px; margin: -1px -2px; border-radius: 2px; color: #0E1424; background: linear-gradient(rgba(255, 180, 60, .45), rgba(255, 180, 60, .45)) no-repeat 0 0 / 0% 100%; transition: background-size .9s var(--ease); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl.on { background-size: 100% 100%; }

.tbl { width: 100%; border-collapse: collapse; font-size: .78rem; }
.tbl th { text-align: left; font-weight: 400; color: var(--dim); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tbl td:first-child { font-family: var(--mono); font-size: .72rem; color: var(--text); }
.tbl tr { transition: background-color .4s ease; }
.tbl tr.on { background: rgba(255, 195, 92, .1); box-shadow: inset 2px 0 0 var(--warm); }
.tbl tr.on td { color: var(--star); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: .66rem; background: rgba(238, 242, 250, .08); color: var(--muted); }
.tag.warm { background: rgba(255, 195, 92, .14); color: var(--warm); }

.folders { display: grid; gap: 6px; }
.folders li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: rgba(238, 242, 250, .03); box-shadow: inset 0 0 0 1px var(--line); font-size: .82rem; color: var(--text); transition: opacity .5s ease, filter .5s ease; }
.folders li .i { color: var(--muted); }
.folders li .who { margin-left: auto; display: flex; gap: 4px; }
.folders li.locked { opacity: .35; filter: blur(.4px); }
.folders li.locked .lock { color: var(--warm); }
.tip { position: absolute; z-index: 3; padding: 6px 10px; border-radius: 8px; background: #fff; color: var(--paper-ink); font-size: .74rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(4px); transition: opacity .3s ease, transform .4s var(--ease); white-space: nowrap; pointer-events: none; }
.tip.on { opacity: 1; transform: none; }

/* ==========================================================================
   2. Tre modi: blocchi a sinistra, pannello di BrainPMI a destra
   ========================================================================== */
.modes { display: grid; gap: 32px; }
@media (min-width: 1040px) { .modes { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; } }
.mode-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(48px, 8vw, 120px); min-width: 0; }
.modes > * { min-width: 0; }
.mode { position: relative; padding: 14px; border-radius: 22px; background: rgba(238, 242, 250, .02); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .6s ease, background-color .6s ease; }
.mode.is-on { background: rgba(238, 242, 250, .035); box-shadow: inset 0 0 0 1px rgba(238, 242, 250, .16); }
.mode-txt { padding: 26px 12px 10px; }
.mode-txt .h3 { margin-bottom: 10px; }
.mode-txt p { color: var(--muted); max-width: 34em; }
.mode .win { opacity: .5; transition: opacity .8s ease; }
.mode.is-on .win { opacity: 1; }

.agent { position: sticky; top: calc(var(--hdr) + 24px); }
.agent-tabs { display: flex; gap: 4px; margin-bottom: 10px; font-size: .8rem; }
.agent-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; color: var(--dim); transition: color .2s ease, background-color .2s ease; }
.agent-tabs button span { font-family: var(--mono); font-size: .7rem; }
.agent-tabs button[aria-selected="true"] { color: var(--star); background: rgba(238, 242, 250, .08); box-shadow: inset 0 0 0 1px var(--line); }
.agent-win { display: grid; grid-template-rows: auto 1fr auto; height: min(640px, calc(100vh - var(--hdr) - 90px)); min-height: 480px; border-radius: 16px; background: linear-gradient(180deg, #0F1424, #0A0D18); box-shadow: inset 0 0 0 1px rgba(238, 242, 250, .12), 0 40px 80px -30px rgba(0, 0, 0, .9); overflow: hidden; }
.agent-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: .78rem; }
.agent-bar span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.agent-bar span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 8px var(--warm); }
.agent-chat { display: flex; flex-direction: column; gap: 14px; padding: 16px 14px; overflow: hidden; font-size: .875rem; }
.agent-input { margin: 0 12px 12px; padding: 10px 12px; border-radius: 12px; background: rgba(238, 242, 250, .04); box-shadow: inset 0 0 0 1px var(--line); font-size: .82rem; color: var(--dim); }
.agent-input div { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.agent-input em { font-style: normal; font: .7rem var(--mono); padding: 2px 8px; border-radius: 6px; background: rgba(238, 242, 250, .06); color: var(--muted); }
.agent-input i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--warm); box-shadow: 0 0 14px var(--warm-glow); }
.agent-input i svg { width: 12px; height: 12px; fill: none; stroke: #241603; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.b-q { align-self: flex-end; max-width: 88%; padding: 9px 12px; border-radius: 12px 12px 3px 12px; background: rgba(238, 242, 250, .1); color: var(--star); animation: pop .45s var(--ease) both; }
.b-who { display: flex; align-items: center; gap: 8px; color: var(--star); font-size: .8rem; animation: pop .4s var(--ease) both; }
.b-who i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(160deg, #2A2210, #120D04); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .45); }
.b-who i svg { width: 8px; height: 11px; color: var(--star); }
.b-plan { border-radius: 10px; padding: 8px 10px; background: rgba(238, 242, 250, .03); box-shadow: inset 0 0 0 1px var(--line); animation: pop .4s var(--ease) both; }
.b-plan > p { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
.b-plan > p .spin { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--faint); border-top-color: var(--warm); animation: spin .8s linear infinite; }
.b-plan.done > p .spin { animation: none; border-color: var(--warm); background: var(--warm); box-shadow: 0 0 8px var(--warm-glow); }
.b-plan li { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: .78rem; color: var(--dim); transition: color .3s ease; }
.b-plan li::before { content: ""; width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--faint); flex: none; transition: background-color .3s ease, box-shadow .3s ease; background-position: center; background-repeat: no-repeat; }
.b-plan li.ok { color: var(--text); }
.b-plan li.ok::before { background-color: rgba(255, 195, 92, .16); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .6); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-5' fill='none' stroke='%23FFC35C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.b-plan li.now { color: var(--star); }
.b-a { color: var(--text); line-height: 1.55; }
.b-a.none { color: var(--muted); }
.b-src { display: flex; flex-wrap: wrap; gap: 6px; }
.b-src p { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 8px; font-size: .74rem; color: var(--star); background: rgba(255, 195, 92, .07); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .35); animation: pop .45s var(--ease) both; }
.b-src p::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 8px var(--warm); }
.b-src p span { font: .68rem var(--mono); color: var(--muted); }
.b-src p.none { background: transparent; box-shadow: inset 0 0 0 1px var(--faint); color: var(--muted); }
.b-src p.none::before { background: transparent; box-shadow: inset 0 0 0 1px var(--dim); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 1039px) {
  .agent { position: relative; top: 0; order: -1; }
  .agent-win { height: 440px; min-height: 0; }
}
@media (max-width: 700px) {
  .win-body { grid-template-columns: 1fr; min-height: 0; }
  .win-side { display: none; }
  .win-main { padding: 14px 12px 60px; }
  .tbl th:nth-child(3), .tbl td:nth-child(3) { display: none; }
}

/* ==========================================================================
   3. In casa vostra: tre frasi su un pannello che si accende
   ========================================================================== */
.home-sec { position: relative; height: 380vh; }
.home-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-rows: auto 1fr; align-content: start; padding-top: calc(var(--hdr) + 5vh); overflow: hidden; }
.home-pin::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 96px 96px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 96px 96px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 65%, #000, transparent 75%); mask-image: radial-gradient(60% 60% at 50% 65%, #000, transparent 75%);
}
.home-lines { position: relative; height: clamp(4.5rem, 3rem + 5vw, 8rem); text-align: center; }
.home-lines .h2 { position: absolute; inset: 0; padding-inline: var(--gutter); opacity: 0; transform: translateY(20px); filter: blur(8px); transition: opacity .7s ease, transform .9s var(--ease), filter .7s ease; font-size: clamp(1.9rem, 1rem + 2.8vw, 3.8rem); }
.home-lines .h2.on { opacity: 1; transform: none; filter: none; }
.home-lines .h2.off { opacity: 0; transform: translateY(-20px); filter: blur(8px); }
.console { position: relative; width: min(980px, calc(100% - 2 * var(--gutter))); margin: clamp(24px, 4vh, 48px) auto 0; }
.console .win-body { grid-template-columns: 200px 1fr; min-height: 420px; }
.src-list { display: grid; gap: 8px; }
.src-list li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; background: rgba(238, 242, 250, .03); box-shadow: inset 0 0 0 1px var(--line); font-size: .85rem; }
.src-list li small { margin-left: auto; font: .7rem var(--mono); color: var(--dim); transition: color .4s ease; }
.src-list li .led { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); transition: background-color .4s ease, box-shadow .4s ease; }
.src-list li.on .led { background: var(--warm); box-shadow: 0 0 10px var(--warm); }
.src-list li.on small { color: var(--warm); }
.reading { margin-top: 16px; height: 92px; overflow: hidden; font: .7rem/1.6 var(--mono); color: var(--dim); -webkit-mask-image: linear-gradient(transparent, #000 40%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 40%, #000 70%, transparent); }
.reading div { animation: reading 14s linear infinite; }
@keyframes reading { to { transform: translateY(-50%); } }
.pop-card { position: absolute; z-index: 3; width: 270px; padding: 12px; border-radius: 12px; background: var(--paper); color: var(--paper-ink); box-shadow: 0 30px 60px -10px rgba(0, 0, 0, .8); font-size: .8rem; opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .5s ease, transform .7s var(--ease); }
.pop-card.on { opacity: 1; transform: none; }
.pop-card > strong { display: block; font-weight: 500; margin-bottom: 2px; }
.pop-card > span { display: block; color: var(--paper-muted); font-size: .72rem; margin-bottom: 8px; }
.pop-card ul { display: grid; gap: 2px; }
.pop-card li { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px; border-top: 1px solid rgba(14, 20, 36, .07); }
.sw { position: relative; width: 26px; height: 15px; border-radius: 999px; background: #CDD2DD; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.sw.on { background: var(--paper-ink); }
.sw.on::after { transform: translateX(11px); }
.pop-perm { right: -24px; top: 70px; }
.pop-srv { right: 24px; bottom: 24px; width: auto; display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.pop-srv .gate { display: flex; align-items: center; gap: 6px; font: .7rem var(--mono); color: var(--paper-muted); }
.pop-srv .gate .i { width: 13px; height: 13px; flex: none; color: var(--paper-ink); }
@media (max-width: 760px) {
  .console .win-body { grid-template-columns: 1fr; }
  .pop-perm { right: 8px; top: auto; bottom: 60px; width: 230px; }
}

/* ---------- Strisce di fiducia ---------- */
.trust { display: grid; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); background: rgba(238, 242, 250, .02); }
.trust li { padding: 26px 26px 24px; }
.trust li + li { border-top: 1px solid var(--line); }
.trust strong { display: block; color: var(--star); font-weight: 500; margin-bottom: 4px; }
.trust span { color: var(--muted); font-size: .9rem; }
.trust .ic { display: flex; gap: 8px; margin-bottom: 18px; }
.trust .ic i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--faint); color: var(--star); }
@media (min-width: 900px) { .trust { grid-template-columns: 1.3fr 1fr 1fr; } .trust li + li { border-top: 0; border-left: 1px solid var(--line); } }

/* ==========================================================================
   4. Griglia delle funzioni, con piccole animazioni vere
   ========================================================================== */
.bento { display: grid; gap: 1px; border-radius: 22px; overflow: hidden; background: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.cell { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 340px; padding: 26px; background: var(--night); overflow: hidden; }
.cell p { position: relative; z-index: 1; color: var(--muted); max-width: 30em; }
.cell p strong { color: var(--star); font-weight: 500; }
.vis { position: relative; flex: 1; display: grid; place-items: center; margin-bottom: 22px; min-height: 180px; }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .cell:nth-child(1) { grid-column: span 4; }
  .cell:nth-child(2) { grid-column: span 2; }
  .cell:nth-child(3) { grid-column: span 2; }
  .cell:nth-child(4) { grid-column: span 4; }
  .cell:nth-child(5) { grid-column: span 3; }
  .cell:nth-child(6) { grid-column: span 3; }
}
/* fonti che si collegano al centro */
.v-src { width: 100%; max-width: 520px; height: 200px; }
.v-src .chip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--faint); font-size: .8rem; color: var(--text); }
.v-src .chip .i { width: 14px; height: 14px; color: var(--muted); }
.v-src .hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(160deg, #2A2210, #0E0A04); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .45), 0 0 50px rgba(255, 180, 70, .25); }
.v-src .hub svg { width: 20px; height: 27px; color: var(--star); }
.v-src svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.v-src svg.wires path { fill: none; stroke: var(--faint); stroke-width: 1; }
.v-src svg.wires path.flow { stroke: var(--warm); stroke-dasharray: 4 120; stroke-dashoffset: 124; opacity: 0; }
.in .v-src svg.wires path.flow { opacity: 1; animation: flow 2.6s linear infinite; }
.v-src svg.wires path.flow:nth-of-type(2n) { animation-delay: -1.3s; }
@keyframes flow { to { stroke-dashoffset: 0; } }
/* codici esatti */
.v-code { width: 100%; max-width: 300px; }
.v-code .q { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--faint); font: .82rem var(--mono); color: var(--star); }
.v-code .q .i { width: 14px; height: 14px; color: var(--muted); }
.v-code ul { margin-top: 10px; display: grid; gap: 4px; font: .75rem var(--mono); color: var(--dim); }
.v-code li { padding: 5px 10px; border-radius: 6px; transition: background-color .4s ease, color .4s ease; }
.in .v-code li.m { animation: match 4s var(--ease) infinite; }
@keyframes match { 0%, 25% { background: transparent; color: var(--dim); } 35%, 85% { background: rgba(255, 195, 92, .12); color: var(--warm); } 100% { background: transparent; color: var(--dim); } }
/* scansione letta */
.v-scan { position: relative; width: 170px; height: 210px; border-radius: 4px; background: #D9D4C6; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .8); transform: rotate(-2deg); overflow: hidden; padding: 18px 16px; }
.v-scan i { display: block; height: 5px; margin-bottom: 9px; border-radius: 2px; background: #8F8A7E; opacity: .7; filter: blur(.5px); }
.v-scan i:nth-child(3n) { width: 70%; } .v-scan i:nth-child(4n) { width: 86%; }
.v-scan::after { content: ""; position: absolute; left: 0; right: 0; top: -20%; height: 18%; background: linear-gradient(transparent, rgba(255, 195, 92, .55), transparent); }
.in .v-scan::after { animation: scan 3.2s var(--ease) infinite; }
.in .v-scan i { animation: crisp 3.2s var(--ease) infinite; }
@keyframes scan { to { top: 110%; } }
@keyframes crisp { 0%, 30% { background: #8F8A7E; filter: blur(.5px); } 60%, 100% { background: #2B2E36; filter: none; } }
/* reparti e chiavi */
.v-perm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 540px; }
.v-perm div { padding: 12px 10px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: .74rem; color: var(--muted); }
.v-perm div b { display: block; color: var(--star); font-weight: 500; font-size: .8rem; margin-bottom: 8px; }
.v-perm div span { display: block; height: 5px; margin-top: 5px; border-radius: 3px; background: var(--faint); transition: background-color .5s ease, box-shadow .5s ease; }
.in .v-perm div span.k { background: var(--warm); box-shadow: 0 0 8px var(--warm-glow); }
.v-perm div span.k { transition-delay: calc(var(--d, 0) * 120ms); }
/* senza fonte, nessuna risposta */
.v-gate { display: grid; gap: 10px; width: 100%; max-width: 330px; }
.v-gate div { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: .82rem; }
.v-gate .ok { box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .4); color: var(--star); }
.v-gate .ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 10px var(--warm); }
.v-gate .ko { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(238, 242, 250, .3); }
.in .v-gate .ko { animation: discard 3.6s var(--ease) infinite; }
@keyframes discard { 0%, 40% { opacity: 1; transform: translateZ(var(--z, 0)); } 70%, 100% { opacity: .25; transform: translateX(14px) translateZ(var(--z, 0)); } }
/* il server in azienda */
.v-srv { position: relative; width: 210px; }
.v-srv div { display: flex; align-items: center; gap: 8px; height: 38px; margin-top: 6px; padding: 0 14px; border-radius: 8px; background: linear-gradient(180deg, #141A2C, #0C101C); box-shadow: inset 0 0 0 1px var(--faint); }
.v-srv div i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.v-srv div i:first-child { background: var(--warm); box-shadow: 0 0 8px var(--warm); }
.in .v-srv div i:first-child { animation: led 1.6s steps(2) infinite; }
.v-srv div:nth-child(2) i:first-child { animation-delay: -.4s; } .v-srv div:nth-child(3) i:first-child { animation-delay: -.9s; }
.v-srv div span { margin-left: auto; width: 60px; height: 3px; border-radius: 2px; background: var(--line); }
.v-srv::after { content: ""; position: absolute; inset: -40px; z-index: -1; background: radial-gradient(closest-side, rgba(255, 180, 70, .16), transparent); }
@keyframes led { 50% { opacity: .3; } }

/* ==========================================================================
   5. I dati: il perimetro della casa
   ========================================================================== */
.data { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .data { grid-template-columns: 1fr 1fr; gap: 80px; } }
.data-list { display: grid; gap: 0; margin-top: 40px; }
.data-list li { padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); }
.data-list strong { display: block; color: var(--star); font-weight: 500; margin-bottom: 4px; }
.perim { position: relative; width: 100%; max-width: 520px; margin-inline: auto; }
.perim svg { width: 100%; height: auto; overflow: visible; }
.perim .wall { fill: none; stroke: var(--star); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(190, 210, 255, .45)); stroke-dasharray: 1600; stroke-dashoffset: 1600; transition: stroke-dashoffset 2.4s var(--ease); }
.perim.in .wall { stroke-dashoffset: 0; }
.perim .node rect { fill: var(--panel); stroke: var(--faint); }
.perim .node text { fill: var(--text); font: 13px var(--sans); }
.perim .node .s { fill: var(--dim); font-size: 11px; }
.perim .core rect { fill: #1A160C; stroke: rgba(255, 195, 92, .6); }
.perim .core circle { fill: var(--warm); filter: drop-shadow(0 0 8px var(--warm)); }
.perim .link { fill: none; stroke: var(--faint); stroke-dasharray: 3 4; }
.perim .out { fill: none; stroke: var(--dim); stroke-dasharray: 3 4; }
.perim .gate circle { fill: var(--night); stroke: var(--warm); stroke-width: 1.5; filter: drop-shadow(0 0 8px var(--warm-glow)); }
.perim .gate rect, .perim .gate path { fill: none; stroke: var(--warm); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.perim .out.far { opacity: .45; }
.perim .ext rect { fill: none; stroke: var(--line); stroke-dasharray: 4 4; }
.perim .ext text { fill: var(--dim); font: 12px var(--sans); }
.perim .glow { fill: url(#warmGlow); }

/* ==========================================================================
   6. «Dove l'avevamo scritto?» sopra un campo di puntini
   ========================================================================== */
.field-sec { position: relative; min-height: 100vh; display: grid; place-items: start center; padding-top: clamp(120px, 18vh, 200px); overflow: hidden; text-align: center; }
.field-sec canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.field-sec .wrap { position: relative; z-index: 1; }
.field-sec .lead { margin: 24px auto 0; }

/* ==========================================================================
   7. Chi c'è dietro
   ========================================================================== */
.who { display: grid; gap: 40px; padding: clamp(28px, 4vw, 56px); border-radius: 26px; background: radial-gradient(70% 90% at 0% 100%, rgba(255, 180, 70, .1), transparent 60%), rgba(238, 242, 250, .025); box-shadow: inset 0 0 0 1px var(--line); }
@media (min-width: 960px) { .who { grid-template-columns: 1.25fr 1fr; gap: 72px; align-items: end; } }
.who blockquote { margin: 0; font-size: clamp(1.8rem, 1rem + 2.6vw, 3.4rem); font-weight: 300; letter-spacing: -.035em; line-height: 1.08; color: var(--star); text-wrap: balance; }
.who-sign { display: flex; align-items: center; gap: 14px; margin-top: 32px; }
.mono-av { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(160deg, #1C2440, #0B0F1A); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .45), 0 0 30px rgba(255, 180, 70, .15); color: var(--star); font-weight: 500; letter-spacing: .02em; flex: none; }
.who-sign strong { display: block; color: var(--star); font-weight: 500; }
.who-sign span { color: var(--muted); font-size: .9rem; }
.who-txt p { color: var(--muted); }
.who-txt p + p { margin-top: 14px; }
.who-links { display: grid; gap: 0; margin-top: 28px; }
.who-links a { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); color: var(--text); transition: color .2s ease; }
.who-links a:hover { color: var(--warm); }
.who-links a span { color: var(--dim); }

.compare { margin-top: clamp(56px, 8vw, 96px); display: grid; gap: 1px; border-radius: 18px; overflow: hidden; background: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.compare > div { display: grid; grid-template-columns: 1fr 1fr 1fr; background: var(--night); }
.compare > div > * { padding: 14px 18px; font-size: .9rem; }
.compare .k { color: var(--dim); }
.compare .them { color: var(--muted); }
.compare .us { color: var(--star); box-shadow: inset 1px 0 0 var(--line); background: rgba(255, 195, 92, .035); }
.compare .head > * { font-size: .8rem; color: var(--dim); }
.compare .head .us { color: var(--warm); }
@media (max-width: 640px) { .compare > div { grid-template-columns: 1fr 1fr; } .compare .k { grid-column: 1 / -1; padding-bottom: 0; } .compare .head .k { display: none; } }

/* ==========================================================================
   8. Come si parte: la linea si accende scorrendo
   ========================================================================== */
.steps { position: relative; display: grid; gap: 40px; --p: 0; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--line); }
.steps::after { content: ""; position: absolute; left: 0; top: 7px; height: 1px; width: calc(var(--p) * 100%); background: linear-gradient(90deg, var(--warm), var(--warm-2)); box-shadow: 0 0 12px var(--warm-glow); }
.steps li { position: relative; padding-top: 40px; }
.steps li::before { content: ""; position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--night); box-shadow: inset 0 0 0 1.5px var(--faint); transition: box-shadow .4s ease, background-color .4s ease; }
.steps li.lit::before { background: var(--warm); box-shadow: 0 0 0 4px rgba(255, 195, 92, .15), 0 0 16px var(--warm); }
.steps .n { display: block; font: .75rem var(--mono); color: var(--dim); margin-bottom: 10px; }
.steps h3 { font-weight: 500; font-size: 1.15rem; color: var(--star); margin-bottom: 8px; letter-spacing: -.01em; }
.steps p { color: var(--muted); font-size: .95rem; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
@media (max-width: 899px) { .steps::before, .steps::after { left: 7px; right: auto; top: 0; width: 1px; height: 100%; } .steps::after { height: calc(var(--p) * 100%); width: 1px; } .steps li { padding: 0 0 0 40px; } }

/* ==========================================================================
   9. Domande: una conversazione
   ========================================================================== */
.faq { display: grid; gap: 48px; }
@media (min-width: 960px) { .faq { grid-template-columns: 1fr 1.4fr; gap: 80px; } .faq-head { position: sticky; top: calc(var(--hdr) + 60px); align-self: start; } }
.faq-head .btn { margin-top: 28px; }
.faq-chat { display: grid; gap: 14px; }
.fq, .fa { max-width: 86%; padding: 12px 16px; font-size: .95rem; opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .8s var(--ease); }
.fq { justify-self: end; border-radius: 16px 16px 4px 16px; background: rgba(238, 242, 250, .1); color: var(--star); }
.fa { justify-self: start; border-radius: 16px 16px 16px 4px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); margin-bottom: 18px; transition-delay: .5s; }
.fa strong { color: var(--star); font-weight: 500; }
.in.fq, .in.fa { opacity: 1; transform: none; }

/* ==========================================================================
   10. Chiusura: la casa spunta dal fondo
   ========================================================================== */
.end { position: relative; padding-top: clamp(120px, 16vw, 220px); text-align: center; overflow: hidden; }
.end .lead { margin: 22px auto 36px; }
.end-cta { position: relative; display: inline-block; }
.end-cta .cur { left: calc(100% + 6px); top: 60%; transform: none; animation: hover-cur 3.4s ease-in-out infinite; }
@keyframes hover-cur { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(6px, -6px); } }
.end-house { position: relative; width: min(560px, 80vw); margin: clamp(56px, 8vw, 100px) auto 0; }
.end-house svg { width: 100%; height: auto; overflow: visible; }
.end-house path { fill: none; stroke: var(--star); stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 0 12px rgba(190, 210, 255, .4)); }
.end-house .win-light { fill: var(--warm); filter: drop-shadow(0 0 30px var(--warm)) drop-shadow(0 0 80px var(--warm-2)); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .78; } }

/* ---------- Piè di pagina ---------- */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--line); padding-block: 56px 32px; font-size: .875rem; color: var(--muted); background: var(--night); }
.foot-grid { display: grid; gap: 40px; grid-template-columns: repeat(2, 1fr); }
.foot-brand { grid-column: 1 / -1; }
.foot-brand p { margin-top: 14px; max-width: 22em; }
.foot h4 { margin: 0 0 14px; font-size: .75rem; font-weight: 400; color: var(--dim); }
.foot ul { display: grid; gap: 9px; }
.foot a:hover { color: var(--star); }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } .foot-brand { grid-column: auto; } }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--dim); }
.foot-bottom p { display: inline-flex; align-items: center; gap: 8px; }

/* ==========================================================================
   Pagine interne
   ========================================================================== */
.page-hero { position: relative; padding: calc(var(--hdr) + clamp(72px, 12vw, 160px)) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.page-hero::before { content: ""; position: absolute; left: 50%; top: -30%; width: 120vw; height: 90%; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 50%, rgba(120, 150, 230, .16), transparent 70%); pointer-events: none; }
.page-hero .wrap { position: relative; }
.page-hero .lead { margin-top: 24px; }
.guide { display: grid; gap: 48px; padding-bottom: clamp(96px, 12vw, 160px); }
@media (min-width: 960px) { .guide { grid-template-columns: 240px 1fr; gap: 80px; } }
.toc { display: grid; gap: 2px; align-self: start; font-size: .9rem; }
@media (min-width: 960px) { .toc { position: sticky; top: calc(var(--hdr) + 32px); } }
.toc a { padding: 8px 12px; border-radius: 8px; color: var(--muted); box-shadow: inset 2px 0 0 transparent; transition: color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.toc a:hover { color: var(--star); }
.toc a.on { color: var(--star); background: rgba(238, 242, 250, .05); box-shadow: inset 2px 0 0 var(--warm); }
.chapter { padding: 0 0 56px; margin-bottom: 56px; border-bottom: 1px solid var(--line); }
.chapter:last-child { border-bottom: 0; }
.chapter .n { display: block; font: .75rem var(--mono); color: var(--warm); margin-bottom: 14px; }
.chapter .h3 { margin-bottom: 18px; }
.chapter > p { color: var(--muted); max-width: 40em; }
.chapter > p + p { margin-top: 12px; }
.tips { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 700px) { .tips { grid-template-columns: 1fr 1fr; } }
.tip-card { padding: 18px 20px; border-radius: 14px; background: rgba(238, 242, 250, .025); box-shadow: inset 0 0 0 1px var(--line); }
.tip-card small { display: block; font-size: .75rem; color: var(--dim); margin-bottom: 8px; }
.tip-card p { color: var(--text); }
.tip-card.good small { color: var(--warm); }
.tip-card.good { box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .3); background: rgba(255, 195, 92, .04); }

.form { display: grid; gap: 18px; padding: clamp(24px, 4vw, 44px); border-radius: 22px; background: rgba(238, 242, 250, .025); box-shadow: inset 0 0 0 1px var(--line); }
@media (min-width: 700px) { .form { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
.form label { display: block; font-size: .875rem; color: var(--muted); }
.form label input, .form label select, .form label textarea { display: block; margin-top: 8px; }
.form label b { font-weight: 400; color: var(--warm); }
.form input, .form select, .form textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 0; border-radius: 12px; background: rgba(238, 242, 250, .05); box-shadow: inset 0 0 0 1px var(--faint); color: var(--star); font-size: 1rem; transition: box-shadow .2s ease, background-color .2s ease; }
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--warm), 0 0 0 4px rgba(255, 195, 92, .12); background: rgba(238, 242, 250, .07); }
.form select option { background: var(--panel); }
.form-end { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.form-end p { font-size: .8rem; color: var(--dim); max-width: 32em; }
.form-ok { display: none; padding: 18px 20px; border-radius: 14px; background: rgba(255, 195, 92, .06); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .35); color: var(--star); }
.form-ok.on { display: block; }
.demo-grid { display: grid; gap: 48px; padding-bottom: clamp(96px, 12vw, 160px); }
@media (min-width: 960px) { .demo-grid { grid-template-columns: 1fr 1.5fr; gap: 72px; } }
.demo-steps li { padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); }
.demo-steps strong { display: block; color: var(--star); font-weight: 500; }

/* ---------- Senza movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  .scene, .home-sec { height: auto; }
  .scene-pin { position: relative; height: 100vh; }
  .cap, .prompt, .scroll-hint, .hero-cur { display: none; }
  .home-pin { position: relative; height: auto; padding-bottom: 80px; }
  .home-lines { height: auto; display: grid; gap: 8px; }
  .home-lines .h2 { position: relative; opacity: 1; transform: none; filter: none; }
  .pop-card { opacity: 1; transform: none; }
  .rise, .fq, .fa { opacity: 1; transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Versione 2 dei testi: ognuno porta quello che sa, decisioni e prossimi passi
   ========================================================================== */

.problem { max-width: 760px; margin-inline: auto; }
.problem .h2 { margin-bottom: 32px; }
.problem p { color: var(--muted); font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); line-height: 1.6; text-wrap: pretty; }
.problem p + p { margin-top: 16px; }
.problem .punch { margin-top: 32px; color: var(--warm); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 300; letter-spacing: -.02em; line-height: 1.3; text-shadow: 0 0 30px var(--warm-glow); }

/* il flusso di quello che le persone portano */
.feed { display: grid; gap: 8px; }
.feed li { display: flex; gap: 12px; padding: 11px 12px; border-radius: 10px; background: rgba(238, 242, 250, .03); box-shadow: inset 0 0 0 1px var(--line); font-size: .8rem; color: var(--muted); transition: opacity .6s ease, transform .8s var(--ease), box-shadow .6s ease, background-color .6s ease; }
.feed li b { color: var(--star); font-weight: 500; }
.feed li em { font-style: normal; color: var(--dim); font-size: .72rem; margin-left: 6px; }
.feed li p { margin-top: 2px; color: var(--text); }
.feed .av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; background: rgba(238, 242, 250, .08); box-shadow: inset 0 0 0 1px var(--faint); color: var(--star); font-size: .72rem; font-weight: 500; }
.feed li.new { opacity: 0; transform: translateY(12px); }
.feed li.new.on { opacity: 1; transform: none; background: rgba(255, 195, 92, .06); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .4); }
.feed .filed { display: inline-block; margin-top: 8px; opacity: 0; transform: translateY(4px); transition: opacity .4s ease, transform .5s var(--ease); }
.feed .filed.on { opacity: 1; transform: none; }

/* il progetto: decisioni con il loro perché, e il prossimo passo */
.seg { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 12px; border-radius: 9px; background: rgba(238, 242, 250, .04); box-shadow: inset 0 0 0 1px var(--line); font-size: .74rem; }
.seg span { padding: 3px 10px; border-radius: 6px; color: var(--dim); }
.seg span.on { background: rgba(238, 242, 250, .1); color: var(--star); }
.tbl tr.old td { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(238, 242, 250, .25); }
.tbl td.why { white-space: normal; min-width: 150px; }
.next { margin-top: 12px; padding: 11px 14px; border-radius: 10px; background: rgba(238, 242, 250, .03); box-shadow: inset 0 0 0 1px var(--line); font-size: .8rem; transition: box-shadow .5s ease, background-color .5s ease; }
.next small { display: block; font-size: .7rem; color: var(--dim); margin-bottom: 2px; }
.next b { display: block; font-weight: 500; color: var(--star); }
.next span { color: var(--muted); font-size: .74rem; }
.next.on { background: rgba(255, 195, 92, .07); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .45); }
.next.on small { color: var(--warm); }
.win-side li.lk { opacity: .4; }

/* bento: la decisione che cambia ma resta nella storia */
.v-dec { position: relative; display: grid; gap: 10px; width: 100%; max-width: 320px; }
.v-dec div { padding: 12px 14px; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: .8rem; color: var(--star); }
.v-dec div small { display: block; font-size: .7rem; color: var(--dim); margin-bottom: 3px; }
.v-dec div span { display: block; margin-top: 4px; color: var(--muted); font-size: .74rem; }
.v-dec .was { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(238, 242, 250, .3); }
.v-dec .now { box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .45), 0 0 30px rgba(255, 180, 70, .1); }
.in .v-dec .now { animation: decide 4.4s var(--ease) infinite; }
@keyframes decide { 0%, 20% { opacity: 0; transform: translateY(10px) translateZ(var(--z, 0)); } 35%, 100% { opacity: 1; transform: translateZ(var(--z, 0)); } }
/* bento: il prossimo passo */
.v-next { display: grid; gap: 6px; width: 100%; max-width: 330px; }
.v-next li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: .8rem; color: var(--dim); }
.v-next li::before { content: ""; width: 14px; height: 14px; border-radius: 4px; flex: none; box-shadow: inset 0 0 0 1px var(--faint); }
.v-next li.ok::before { background: rgba(238, 242, 250, .2); }
.v-next li.go { color: var(--star); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .45); }
.v-next li.go::before { box-shadow: inset 0 0 0 1.5px var(--warm); }
.v-next li.go small { margin-left: auto; font-size: .7rem; color: var(--warm); }
.in .v-next li.go { animation: nudge 2.8s ease-in-out infinite; }
@keyframes nudge { 50% { box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .8), 0 0 24px rgba(255, 180, 70, .2); } }
.v-src .chip .av { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(238, 242, 250, .1); font-size: .64rem; color: var(--star); }
.v-src .chip em { font-style: normal; color: var(--dim); }
.agent-tabs button { padding: 5px 9px; }

/* ==========================================================================
   Cursore del reparto: chi usa BrainPMI in azienda
   ========================================================================== */
.cur-tag { display: inline-flex; align-items: center; gap: 6px; }
.cur-logo { display: grid; place-items: center; width: 15px; height: 15px; margin-left: -3px; border-radius: 5px; background: #241603; }
.cur-logo svg { width: 6px; height: 8px; color: var(--star); filter: none; }

/* ==========================================================================
   Profondità: la griglia delle funzioni e le risposte brevi, viste di lato
   ========================================================================== */
.vis { perspective: 1000px; }
.vis > * {
  transform: rotateX(var(--rx, 16deg)) rotateY(var(--ry, -12deg));
  transform-style: preserve-3d; transition: transform .7s var(--ease);
}
.v-src .chip { transform: translateZ(26px); box-shadow: inset 0 0 0 1px var(--faint), 0 18px 28px -14px rgba(0, 0, 0, .9); }
.v-src .hub { transform: translate(-50%, -50%) translateZ(46px); }
.v-gate div, .v-dec div, .v-next li, .v-perm div { box-shadow: inset 0 0 0 1px var(--line), 0 16px 26px -14px rgba(0, 0, 0, .9); }
.v-gate .ok { --z: 28px; transform: translateZ(28px); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .4), 0 20px 30px -14px rgba(0, 0, 0, .9); }
.v-dec .now { --z: 30px; transform: translateZ(30px); box-shadow: inset 0 0 0 1px rgba(255, 195, 92, .45), 0 0 30px rgba(255, 180, 70, .1), 0 22px 32px -14px rgba(0, 0, 0, .9); }
.v-next li.go { transform: translateZ(26px); }
.v-perm div:nth-child(1) { transform: translateZ(30px); }
.v-perm div:nth-child(2) { transform: translateZ(20px); }
.v-perm div:nth-child(3) { transform: translateZ(10px); }
.v-srv div:nth-child(1) { transform: translateZ(36px); }
.v-srv div:nth-child(2) { transform: translateZ(18px); }

.faq { perspective: 1600px; }
.faq-chat { transform: rotateY(13deg) rotateX(2deg); transform-origin: left center; transform-style: preserve-3d; }
.fq { transform: translateY(14px) translateZ(36px); box-shadow: 0 22px 34px -18px rgba(0, 0, 0, .9); }
.fa { box-shadow: inset 0 0 0 1px var(--line), 0 26px 40px -20px rgba(0, 0, 0, .95); }
.in.fq { transform: translateZ(36px); }
.in.fa { transform: translateZ(0); }
@media (max-width: 760px) {
  .vis > * { --rx: 12deg; --ry: -8deg; }
  .faq-chat { transform: rotateY(8deg); }
}

/* ==========================================================================
   Il logo che accompagna chi scorre, disegnando ghirigori
   ========================================================================== */
.doodle { position: fixed; inset: 0; z-index: 60; width: 100%; height: 100%; pointer-events: none; }
.doodle-logo { position: fixed; left: 0; top: 0; z-index: 61; width: 22px; height: 29px; margin: -15px 0 0 -11px; pointer-events: none; opacity: 0; will-change: transform, opacity; }
.doodle-logo svg { display: block; width: 100%; height: 100%; color: var(--star); filter: drop-shadow(0 0 1px rgba(4, 6, 12, .9)) drop-shadow(0 0 10px rgba(255, 190, 90, .7)); }

/* ==========================================================================
   Aggiunte per la pubblicazione (4/11/2026): modulo che invia, pagine legali
   ========================================================================== */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-check { display: flex !important; gap: 12px; align-items: flex-start; font-size: .875rem; color: var(--muted); }
.form .form-check input { flex: none; width: 20px; min-height: 20px; height: 20px; margin: 2px 0 0; padding: 0; accent-color: var(--warm); box-shadow: none; }
.form-err { display: none; padding: 18px 20px; border-radius: 14px; background: rgba(255, 110, 90, .07); box-shadow: inset 0 0 0 1px rgba(255, 120, 100, .4); color: var(--star); }
.form-err.on { display: block; }
.form-err a { color: var(--warm); }
.form input:disabled, .form select:disabled, .form textarea:disabled { opacity: .55; }
.foot-legal a { color: var(--muted); }
.foot-legal a:hover { color: var(--star); }

.legal { padding-bottom: clamp(96px, 12vw, 160px); }
.legal-body { max-width: 760px; }
.legal-body .updated { margin-top: 18px; font-size: .875rem; color: var(--dim); }
.legal-body section { margin-top: 40px; }
.legal-body h2 { font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em; color: var(--star); }
.legal-body p { margin-top: 12px; color: var(--muted); line-height: 1.7; }
.legal-body strong { color: var(--star); font-weight: 500; }
.legal-body a { color: var(--star); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.legal-body a:hover { text-decoration-color: var(--warm); }
