/* ============================================================
   Synapsia — Landing. "Dal segnale alla decisione."
   Brand register: cinematic, premium, alive. Committed dark palette
   (product identity) + Fraunces display / Instrument Sans headings /
   Inter body. Per-section canvas states, sticky choreography, cockpit.
   ============================================================ */
:root {
  --bg: #080c16;
  --bg-2: #06090f;
  --surface: #0e1424;
  --surface-2: #131b2e;
  --line: #1e2942;
  --line-soft: #17203550;
  --title: #eef2fb;
  --body: #c7d0e3;
  --muted: #8b97b4;
  --faint: #56617e;
  --cyan: #34e4f2;
  --green: #22c86e;
  --on-green: #04140b;
  --amber: #f5a524;
  --violet: #8b5cf6;
  --wm-a: #8b5cf6;
  --wm-b: #38bdf8;

  --font-display: "Fraunces", Georgia, serif;
  --font-head: "Instrument Sans", "Inter", ui-sans-serif, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --maxw: 1360px;
  --gutter: clamp(20px, 4vw, 48px);

  --z-field: 0; --z-atmos: 1; --z-content: 2; --z-sticky: 40; --z-header: 60; --z-cta: 55;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; color: var(--title); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; }
::selection { background: color-mix(in srgb, var(--cyan) 30%, transparent); color: var(--title); }

/* ---- type ---- */
.display { font-family: var(--font-display); font-optical-sizing: auto; letter-spacing: -0.02em; font-weight: 480; }
.head { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.02em; line-height: 1.06; font-size: clamp(1.9rem, 3.6vw, 3.1rem); text-wrap: balance; }
h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em; }
.h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 0.98; letter-spacing: -0.025em; text-wrap: balance; }
.cyan { color: var(--cyan); }
.green { color: var(--green); }

/* ---- shell / grid ---- */
.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
section { position: relative; z-index: var(--z-content); }
main, header, footer { position: relative; z-index: var(--z-content); }

/* ---- atmosphere ---- */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--z-field); pointer-events: none; }
.grain, .vignette { position: fixed; inset: 0; z-index: var(--z-atmos); pointer-events: none; }
.grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px; opacity: 0.045; mix-blend-mode: overlay;
}
.vignette { background: radial-gradient(130% 100% at 50% 6%, transparent 44%, #04060ccc 100%); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: none; cursor: pointer; font-family: var(--font-body); font-weight: 600; white-space: nowrap; border-radius: 12px; transition: transform 0.24s var(--ease-out), box-shadow 0.24s var(--ease-out), background 0.2s, border-color 0.2s; }
.btn-green { position: relative; overflow: hidden; background: var(--green); color: var(--on-green); height: 52px; padding: 0 26px; font-size: 1rem; box-shadow: 0 12px 40px #22c86e40; will-change: transform; }
.btn-green:hover { box-shadow: 0 16px 50px #22c86e5c; transform: translateY(-1px); }
@property --sheen { syntax: "<length-percentage>"; inherits: false; initial-value: -60%; }
.btn-green::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent, #ffffff33 8%, transparent 16%); background-size: 250% 100%; background-position: var(--sheen) 0; pointer-events: none; animation: sheen 5.5s var(--ease-io) infinite; }
@keyframes sheen { 0% { --sheen: -60%; } 13% { --sheen: 160%; } 100% { --sheen: 160%; } }
.btn-sm { height: 40px; padding: 0 16px; font-size: 0.88rem; border-radius: 10px; background: #ffffff08; color: var(--title); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.btn-sm:hover { border-color: color-mix(in srgb, var(--cyan) 55%, var(--line)); background: #ffffff12; }

/* ---- header ---- */
header { position: sticky; top: 0; z-index: var(--z-header); transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
header.scrolled { background: #080c16bf; backdrop-filter: saturate(140%) blur(12px); border-bottom-color: var(--line-soft); }
.hbar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: block; flex-shrink: 0; width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 3px 12px #38bdf82e); }
.brand-text { display: flex; flex-direction: column; gap: 4px; }
.wordmark { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; line-height: 1; letter-spacing: -0.01em; background: linear-gradient(92deg, var(--wm-a), var(--wm-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-pill { align-self: flex-start; font-family: var(--font-body); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: #ffffff0a; border: 1px solid var(--line-soft); border-radius: 999px; padding: 2px 8px; }
.header-progress { height: 1px; width: 0; background: linear-gradient(90deg, var(--violet), var(--cyan)); box-shadow: 0 0 8px #34e4f280; }

/* ---- reveal ---- */
.reveal { transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.js .reveal { opacity: 0; transform: translateY(20px); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.09s; }
.reveal.d2 { transition-delay: 0.18s; }
.reveal.d3 { transition-delay: 0.27s; }

/* line-mask hero headline */
.mask { display: block; overflow: hidden; padding-bottom: 0.09em; }
.mask > span { display: block; }
.js .mask > span { transform: translateY(110%); }
.js .reveal-lines .mask > span { animation: riseMask 0.85s var(--ease-out) both; }
.js .reveal-lines .mask:nth-child(2) > span { animation-delay: 0.11s; }
@keyframes riseMask { to { transform: translateY(0); } }

.live-dot { position: relative; display: inline-flex; height: 7px; width: 7px; flex-shrink: 0; }
.live-dot i { position: absolute; inset: 0; border-radius: 999px; background: var(--cyan); }
.live-dot i:first-child { animation: livePulse 1.9s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 0; transform: scale(2.4); } }

/* ============ HERO ============ */
.hero { min-height: 100svh; display: flex; align-items: center; padding: clamp(6rem, 12vh, 9rem) 0 clamp(3rem, 6vh, 5rem); }
.hero-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.hero-copy { grid-column: span 12; }
.hero-stage { grid-column: span 12; position: relative; }
@media (min-width: 940px) {
  .hero-copy { grid-column: span 5; }
  .hero-stage { grid-column: span 7; }
}
.hero-intro { color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.22rem); max-width: 34ch; }
.hero .h1 { margin-top: 1.3rem; }
.hero-sub { margin-top: 1.5rem; color: var(--body); max-width: 46ch; font-size: clamp(1rem, 1.2vw, 1.1rem); }
.hero-cta-row { margin-top: 2.2rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.95rem; }
.hero-micro { font-size: 0.9rem; color: var(--muted); max-width: 40ch; }
.cta-pulse { position: relative; }

.scroll-hint { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); width: 22px; height: 34px; border: 1px solid var(--line); border-radius: 12px; display: none; }
@media (min-width: 940px) { .scroll-hint { display: block; } }
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); animation: scrollDot 1.8s var(--ease-io) infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 70% { opacity: 1; transform: translateY(10px); } 100% { opacity: 0; transform: translateY(12px); } }

/* ---- cockpit ---- */
.hero-stage { max-width: 660px; margin-inline: auto; width: 100%; }
@media (min-width: 940px) { .hero-stage { margin-right: 0; } }
.stage-depth { position: absolute; inset: 0; border-radius: 26px; border: 1px solid var(--line-soft); background: linear-gradient(180deg, #0d1524 0%, transparent 100%); }
.stage-depth.d1 { transform: translate(14px, 20px) scale(0.985); opacity: 0.5; background: linear-gradient(180deg, #0c1220, transparent); border-color: #1a233855; }
.stage-depth.d2 { transform: translate(28px, 40px) scale(0.97); opacity: 0.28; }
.cockpit { position: relative; border-radius: 24px; background: linear-gradient(180deg, var(--surface), #0b1120); border: 1px solid var(--line); box-shadow: 0 44px 100px #02040abf, 0 2px 0 #ffffff0a inset; padding: 18px; transform-style: preserve-3d; will-change: transform; transition: transform 0.3s var(--ease-out); }
.ck-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ck-live { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 500; color: var(--title); }
.ck-channel { font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; transition: color 0.4s, border-color 0.4s; }
.ck-thread { display: flex; flex-direction: column; gap: 10px; }
.ck-msg { position: relative; border-radius: 14px; padding: 10px 13px; font-size: 0.9rem; line-height: 1.45; max-width: 92%; }
.ck-lead { align-self: flex-start; background: var(--surface-2); border-top-left-radius: 5px; }
.ck-syn { align-self: flex-end; background: color-mix(in srgb, var(--cyan) 12%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--cyan) 24%, transparent); border-top-right-radius: 5px; }
.ck-role { display: block; font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.ck-role.syn { color: var(--cyan); }
.ck-text { position: relative; color: var(--body); }
.ck-syn .ck-text { color: var(--title); }
.ck-sweep { position: absolute; inset: -2px -6px; border-radius: 8px; background: linear-gradient(90deg, transparent, #34e4f238, transparent); opacity: 0; pointer-events: none; }
.ck-sweep.go { animation: ckSweep 0.75s var(--ease-io); }
@keyframes ckSweep { 0% { opacity: 0; transform: translateX(-42%); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(46%); } }
.ck-detect, .ck-read, .ck-lever { border: 1px solid var(--line-soft); border-radius: 12px; padding: 11px 13px; background: #0a0f1c66; }
.ck-detect-label { display: block; font-size: 0.62rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ck-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sig { font-size: 0.76rem; padding: 3px 9px; border-radius: 7px; background: #34e4f214; border: 1px solid #34e4f233; color: #bfeef5; transition: transform 0.3s var(--ease-out), background 0.3s; }
.ck-interp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ck-interp { font-size: 0.82rem; color: var(--muted); padding: 5px 9px; border-radius: 8px; border: 1px solid transparent; display: flex; align-items: center; gap: 8px; transition: all 0.35s var(--ease-out); }
.ck-interp::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--faint); flex-shrink: 0; transition: background 0.35s, box-shadow 0.35s; }
.ck-interp.is-active { color: var(--title); background: #34e4f210; border-color: #34e4f233; }
.ck-interp.is-active::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.ck-lever { display: flex; flex-direction: column; gap: 6px; }
.ck-lever-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.82rem; }
.ck-lever-row .k { color: var(--muted); }
.ck-lever-row .v { color: var(--title); font-weight: 500; }
.ck-meters { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.mtr-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 0.78rem; }
.mtr-row b { color: var(--body); font-weight: 500; }
.mtr-row .val { color: var(--muted); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.track { height: 6px; border-radius: 999px; background: #1a2338; overflow: hidden; }
.fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #1c8fa0, var(--cyan)); transition: width 1s var(--ease-out); }
.fill.amber { background: linear-gradient(90deg, #7a5313, var(--amber)); }
.ck-next { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; border-radius: 12px; padding: 11px 13px; background: color-mix(in srgb, var(--green) 11%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--green) 26%, transparent); }
.ck-next-state { font-size: 0.85rem; color: var(--title); }
.ck-next-state .ck-role { display: inline; margin-right: 6px; }
.ck-next-hand { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--green); font-weight: 600; }

/* live-loop states (only when JS drives it) */
.cockpit.is-live [data-step] { opacity: 0.32; transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out); }
.cockpit.is-live [data-step].lit { opacity: 1; }
.cockpit.is-live .ck-interp { opacity: 0.4; }
.cockpit.is-live [data-step].lit .ck-interp { opacity: 1; }

/* ============ PROBLEMA ============ */
.problem { padding: clamp(5rem, 12vh, 8rem) 0; }
.problem-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.4rem, 5vw, 4rem); }
@media (min-width: 900px) { .problem-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.problem-left { position: static; }
@media (min-width: 900px) { .problem-left { position: sticky; top: 128px; } }
.problem-lede { margin-top: 1.5rem; color: var(--body); max-width: 44ch; font-size: clamp(1rem, 1.2vw, 1.1rem); }
.problem-punch { margin-top: 2rem; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.2; letter-spacing: -0.01em; color: var(--body); }
.problem-punch .cyan { color: var(--cyan); }
.problem-right { min-height: 60vh; }
.queue { border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, var(--surface), #0a0f1d); padding: 16px; box-shadow: 0 30px 70px #02040a80; }
.q-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.q-title { font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.q-count { font-size: 0.82rem; font-variant-numeric: tabular-nums; color: var(--amber); font-weight: 600; }
.q-list { display: flex; flex-direction: column; gap: 8px; min-height: 320px; }
.q-item { border: 1px solid var(--line-soft); border-radius: 11px; padding: 9px 12px; background: var(--surface-2); opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), filter 0.6s, background 0.6s; }
.q-item.show { opacity: 1; transform: none; }
.q-item.cold { opacity: 0.4; filter: saturate(0.5); background: #0d1524; }
.q-item.colder { opacity: 0.22; filter: saturate(0.3); }
.q-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.q-name { font-size: 0.82rem; color: var(--title); font-weight: 500; }
.q-meta { font-size: 0.68rem; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.q-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.q-item.cold .q-dot { background: var(--amber); box-shadow: none; }
.q-item.colder .q-dot { background: var(--faint); }
.q-text { font-size: 0.82rem; color: var(--body); }

/* ============ COME FUNZIONA (pinned) ============ */
.how { position: relative; }
.how-track { position: relative; }
@media (min-width: 900px) { .how-track { height: 360vh; } }
.how-stage { display: flex; align-items: center; padding: clamp(4rem, 9vh, 7rem) 0; min-height: 100svh; }
@media (min-width: 900px) { .how-stage { position: sticky; top: 0; height: 100svh; padding: 0; overflow: hidden; } }
.how-stage-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; width: 100%; }
@media (min-width: 900px) { .how-stage-grid { grid-template-columns: 1fr 1fr; } }
.how-steps { list-style: none; margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0; display: flex; flex-direction: column; gap: clamp(1.4rem, 3vw, 2.2rem); }
.how-step { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; transition: opacity 0.5s var(--ease-out); }
@media (min-width: 900px) { .how-step { opacity: 0.32; } .how-step.is-active { opacity: 1; } }
.how-n { font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; color: var(--cyan); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: #0a0f1c; transition: border-color 0.5s, box-shadow 0.5s, background 0.5s; }
.how-step.is-active .how-n { border-color: var(--cyan); box-shadow: 0 0 0 4px #34e4f21a, 0 0 18px #34e4f24d; }
.how-step h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); margin-bottom: 0.3rem; }
.how-step p { font-size: 0.96rem; color: var(--body); max-width: 44ch; }
.how-core-wrap { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin-inline: auto; }
.how-core-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.how-core-label { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); transition: color 0.4s; }
/* mobile: connect the 4 steps with a line that draws + reveal one at a time */
@media (max-width: 899px) {
  .how-steps { position: relative; }
  .how-spine, .how-spine-fill { position: absolute; left: 17px; margin-left: -1px; width: 2px; border-radius: 2px; }
  .how-spine { background: var(--line); }
  .how-spine-fill { height: 0; background: linear-gradient(180deg, var(--cyan), #38bdf8); box-shadow: 0 0 8px #34e4f299; transition: height 0.7s var(--ease-out); }
  .how-step { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
  .how-step.seen { opacity: 1; transform: none; }
  .how-step .how-n { position: relative; z-index: 1; background: var(--bg); }
  .how-step.seen .how-n { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 0 4px #34e4f21a, 0 0 16px #34e4f24d; }
}

/* ============ PSICOLOGIA ============ */
.psy { padding: clamp(5rem, 12vh, 8.5rem) 0; }
.psy-lede { margin-top: 1.4rem; color: var(--body); max-width: 54ch; font-size: clamp(1rem, 1.2vw, 1.12rem); }
.psy-lab { margin-top: clamp(2.6rem, 5vw, 4rem); display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 4vw, 3rem); align-items: center; }
@media (min-width: 860px) { .psy-lab { grid-template-columns: 1.05fr 0.95fr; } }
.psy-orbit { position: relative; width: 100%; max-width: 440px; margin-inline: auto; }
@media (min-width: 600px) { .psy-orbit { aspect-ratio: 1; } }
@media (max-width: 599px) { .psy-orbit { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; } }
.psy-nodes { display: contents; }
@media (max-width: 599px) { .psy-nodes { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; } }
.psy-center { display: grid; place-items: center; text-align: center; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #16203a, #0a0f1d); border: 1px solid var(--line); box-shadow: 0 0 40px #34e4f21f, inset 0 0 30px #0006; }
@media (min-width: 600px) { .psy-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46%; height: 46%; z-index: 2; } }
@media (max-width: 599px) { .psy-center { flex: none; width: min(210px, 56vw); height: min(210px, 56vw); } }
.psy-quote { font-family: var(--font-display); font-size: clamp(1.1rem, 5vw, 1.4rem); color: var(--title); padding: 0 8%; }
.psy-node { border: 1px solid var(--line); background: #0c1220; color: var(--muted); border-radius: 999px; padding: 7px 14px; font-size: 0.76rem; cursor: pointer; white-space: nowrap; transition: color 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s; }
@media (min-width: 600px) {
  .psy-node { position: absolute; top: var(--t); left: var(--l); transform: translate(-50%, -50%); }
  .psy-node[data-p="0"] { --l: 50%; --t: 7%; }
  .psy-node[data-p="1"] { --l: 87%; --t: 40%; }
  .psy-node[data-p="2"] { --l: 73%; --t: 88%; }
  .psy-node[data-p="3"] { --l: 27%; --t: 88%; }
  .psy-node[data-p="4"] { --l: 13%; --t: 40%; }
}
.psy-node:hover { color: var(--body); border-color: color-mix(in srgb, var(--cyan) 45%, var(--line)); }
.psy-node.is-active { color: var(--on-green); background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 22px #34e4f26e; font-weight: 600; }
.psy-readout { border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.4rem, 3vw, 2rem); background: linear-gradient(180deg, var(--surface), #0a0f1d); min-height: 190px; }
.psy-tag { display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: 0.92rem; color: var(--cyan); letter-spacing: 0.02em; margin-bottom: 0.9rem; }
.psy-q { font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.55rem); line-height: 1.32; color: var(--title); font-weight: 460; }
.psy-note { display: block; margin-top: 1.1rem; font-size: 0.78rem; color: var(--muted); }

/* ============ PER CHI ============ */
.who { padding: clamp(5rem, 11vh, 8rem) 0; }
.who-wrap { max-width: 880px; margin-inline: auto; }
.who-head { text-align: center; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.who-lede { margin: 1.4rem auto 0; color: var(--body); max-width: 56ch; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.who-acc { border-top: 1px solid var(--line-soft); }
.wa { border-bottom: 1px solid var(--line-soft); }
.wa-head { width: 100%; display: flex; align-items: center; gap: 15px; background: none; border: none; text-align: left; cursor: pointer; color: var(--muted); padding: clamp(0.95rem, 2vw, 1.35rem) 4px; transition: color 0.3s var(--ease-out); }
.wa-head:hover { color: var(--body); }
.wa.open .wa-head { color: var(--title); }
.wa-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); flex-shrink: 0; transition: background 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s; }
.wa.open .wa-dot { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.wa-title { flex: 1; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.3rem, 3vw, 2rem); letter-spacing: -0.015em; line-height: 1.15; }
.wa-ic { position: relative; width: 20px; height: 20px; flex-shrink: 0; }
.wa-ic::before, .wa-ic::after { content: ""; position: absolute; background: var(--cyan); border-radius: 2px; transition: transform 0.35s var(--ease-out), opacity 0.3s; }
.wa-ic::before { top: 9px; left: 1px; right: 1px; height: 2px; }
.wa-ic::after { left: 9px; top: 1px; bottom: 1px; width: 2px; }
.wa.open .wa-ic::after { transform: rotate(90deg); opacity: 0; }
.wa-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease-out); }
.wa.open .wa-body { grid-template-rows: 1fr; }
.wa-body-in { overflow: hidden; }
.wa-panel { padding: 0 8px clamp(1.3rem, 2.6vw, 1.9rem) 24px; max-width: 64ch; }
.wa-panel > * { opacity: 0; transform: translateY(6px); transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out); }
.wa.open .wa-panel > * { opacity: 1; transform: none; }
.wa.open .wa-panel > :nth-child(2) { transition-delay: 0.05s; }
.wa.open .wa-panel > :nth-child(3) { transition-delay: 0.1s; }
.wa-tag { display: block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.wa-emph { font-family: var(--font-display); font-weight: 480; font-size: clamp(1.2rem, 2.3vw, 1.65rem); line-height: 1.16; letter-spacing: -0.015em; color: var(--title); margin: 0.55rem 0 0.7rem; }
.wa-text { color: var(--body); font-size: clamp(1rem, 1.3vw, 1.1rem); line-height: 1.55; }

/* ============ RISULTATO ============ */
.result { padding: clamp(5rem, 12vh, 8rem) 0; }
.result-head { max-width: 42ch; }
.result-lede { margin-top: 1.5rem; color: var(--body); max-width: 54ch; font-size: clamp(1rem, 1.3vw, 1.14rem); }
.shift { margin-top: clamp(2.6rem, 5vw, 4.2rem); display: grid; grid-template-columns: 1fr 2px 1fr; gap: clamp(1.4rem, 4vw, 3.4rem); align-items: center; }
.shift-cap { display: block; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.2rem; }
.shift-old { text-align: right; }
.shift-old .frag { font-size: clamp(0.95rem, 1.5vw, 1.08rem); color: var(--muted); line-height: 1.4; margin: 0 0 0.95rem; }
.js .shift .frag { opacity: 0; transform: translateX(-10px); }
.shift.in .frag { animation: fragIn 0.7s var(--ease-out) both; }
.shift.in .frag:nth-child(3) { animation-delay: 0.06s; } .shift.in .frag:nth-child(4) { animation-delay: 0.12s; } .shift.in .frag:nth-child(5) { animation-delay: 0.18s; }
@keyframes fragIn { to { opacity: 0.48; transform: none; } }
.shift-spine { position: relative; align-self: stretch; justify-self: center; width: 2px; min-height: 260px; }
.spine-line { position: absolute; inset: 0; border-radius: 2px; background: linear-gradient(180deg, transparent, var(--line) 8%, #34e4f259 50%, var(--line) 92%, transparent); transform: scaleY(0); transform-origin: top; transition: transform 1.1s var(--ease-out); }
.shift.in .spine-line { transform: scaleY(1); }
.spine-flow { position: absolute; left: 50%; top: -8%; width: 6px; height: 22px; margin-left: -3px; border-radius: 4px; background: linear-gradient(180deg, transparent, var(--cyan)); box-shadow: 0 0 14px 2px #34e4f2aa; opacity: 0; }
.shift.in .spine-flow { animation: flowDown 2.8s var(--ease-io) 1.1s infinite; }
@keyframes flowDown { 0% { top: -8%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.shift-new { display: flex; flex-direction: column; }
.out { position: relative; display: flex; align-items: center; gap: 13px; padding: clamp(0.5rem, 1.2vw, 0.8rem) 0; font-size: clamp(0.98rem, 1.6vw, 1.14rem); color: var(--body); }
.out b { color: var(--title); font-weight: 600; }
.out-node { position: relative; width: 9px; height: 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); flex-shrink: 0; transition: background 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.5s; }
.out-node::before { content: ""; position: absolute; right: 100%; top: 50%; width: clamp(0.9rem, 4vw, 3.4rem); height: 1px; background: linear-gradient(90deg, transparent, #34e4f24d); transform: scaleX(0); transform-origin: right; transition: transform 0.6s var(--ease-out); }
.shift.in .out-node { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px #34e4f2; }
.shift.in .out-node::before { transform: scaleX(1); }
.out-human b { color: var(--green); }
.shift.in .out-human .out-node { background: var(--green); border-color: var(--green); box-shadow: 0 0 12px #22c86e; }
.shift.in .out-human .out-node::before { background: linear-gradient(90deg, transparent, #22c86e5c); }
.js .shift .out { opacity: 0; transform: translateX(10px); }
.shift.in .out { animation: outIn 0.65s var(--ease-out) both; }
.shift.in .out:nth-child(3) { animation-delay: 0.13s; } .shift.in .out:nth-child(4) { animation-delay: 0.26s; } .shift.in .out:nth-child(5) { animation-delay: 0.39s; } .shift.in .out:nth-child(6) { animation-delay: 0.52s; }
@keyframes outIn { to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .shift { grid-template-columns: 1fr; gap: 2rem; }
  .shift-spine { display: none; }
  .shift-old { text-align: left; }
  .out-node::before { display: none; }
}

/* ============ PERSONALIZZAZIONE ============ */
.perso { position: relative; min-height: 205svh; }
@media (max-width: 899px) { .perso { min-height: 0; padding: clamp(5rem, 12vh, 7rem) 0; } }
.perso-canvas-wrap { position: sticky; top: 0; height: 100svh; }
@media (max-width: 899px) { .perso-canvas-wrap { position: relative; height: 74vh; margin-bottom: 1.5rem; } }
.perso-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.perso-content { position: sticky; top: 0; min-height: 100svh; margin-top: -100svh; display: flex; flex-direction: column; justify-content: flex-start; padding-top: clamp(4rem, 13vh, 8rem); text-align: center; pointer-events: none; }
@media (max-width: 899px) { .perso-content { position: relative; min-height: 0; margin-top: 0; text-align: left; } }
.perso-h { font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.1; max-width: 20ch; margin-inline: auto; }
@media (max-width: 899px) { .perso-h { margin-inline: 0; } }
.perso-copy { margin: 1.6rem auto 0; color: var(--body); max-width: 52ch; font-size: clamp(1rem, 1.3vw, 1.14rem); }
@media (max-width: 899px) { .perso-copy { margin-inline: 0; } }
.perso-ingest { margin: 2rem auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
@media (max-width: 899px) { .perso-ingest { justify-content: flex-start; } }
.ing { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; padding: 8px 14px 8px 11px; border-radius: 12px; border: 1px solid var(--line); color: var(--muted); background: #0a0f1ccc; transition: color 0.4s, border-color 0.4s, box-shadow 0.4s, background 0.4s; }
.ing-i { width: 15px; height: 15px; opacity: 0.6; transition: opacity 0.4s, color 0.4s; }
.ing.on { color: var(--title); border-color: color-mix(in srgb, var(--cyan) 50%, var(--line)); box-shadow: 0 0 20px #34e4f22e; background: #0d1526; }
.ing.on .ing-i { opacity: 1; color: var(--cyan); }
.ing.on::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, #34e4f233 50%, transparent 70%); transform: translateX(-120%); animation: ingSweep 0.9s var(--ease-io); }
@keyframes ingSweep { to { transform: translateX(120%); } }
/* --- living "ingestion" scanner: sweeps the 5 signals, each feeds the DNA --- */
.perso-ingest .ing { animation: ingBreath 4.2s ease-in-out infinite; }
.perso-ingest .ing:nth-child(2) { animation-delay: 0.5s; }
.perso-ingest .ing:nth-child(3) { animation-delay: 1s; }
.perso-ingest .ing:nth-child(4) { animation-delay: 1.5s; }
.perso-ingest .ing:nth-child(5) { animation-delay: 2s; }
@keyframes ingBreath { 0%, 100% { box-shadow: 0 0 0 #34e4f200; } 50% { box-shadow: 0 0 12px #34e4f21f; } }
.ing.active { color: var(--title); border-color: color-mix(in srgb, var(--cyan) 70%, var(--line)); background: #0e1830; box-shadow: 0 0 26px #34e4f24d, inset 0 0 12px #34e4f214; transform: translateY(-3px); animation: none; }
.ing.active .ing-i { color: var(--cyan); opacity: 1; animation: glyphPulse 0.7s var(--ease-out); }
@keyframes glyphPulse { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
.ing.active::before { content: ""; position: absolute; left: 13px; top: 4px; width: 6px; height: 6px; margin-left: -3px; border-radius: 999px; background: radial-gradient(circle, #d7fbff, #34e4f2 40%, transparent 72%); pointer-events: none; animation: ingRise 1.05s var(--ease-out) forwards; }
@keyframes ingRise { 0% { opacity: 0; transform: translateY(2px) scale(0.5); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-46px) scale(1.15); } }
.ing.active::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 32%, #34e4f240 50%, transparent 68%); transform: translateX(-120%); animation: ingSweep 0.85s var(--ease-io); }

/* ============ FAQ ============ */
.faq-sec { padding: clamp(5rem, 12vh, 8rem) 0; }
.faq-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 860px) { .faq-grid { grid-template-columns: 0.7fr 1.3fr; align-items: start; } }
.faq { max-width: 820px; }
.acc { border-top: 1px solid var(--line); }
.acc:last-child { border-bottom: 1px solid var(--line); }
.acc-btn { width: 100%; background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 4px; text-align: left; font-family: var(--font-head); font-size: clamp(1rem, 1.7vw, 1.16rem); font-weight: 500; color: var(--title); }
.acc-btn .ic { flex-shrink: 0; width: 22px; height: 22px; position: relative; }
.acc-btn .ic::before, .acc-btn .ic::after { content: ""; position: absolute; background: var(--cyan); border-radius: 2px; transition: transform 0.3s var(--ease-out), opacity 0.3s; }
.acc-btn .ic::before { top: 10px; left: 2px; right: 2px; height: 2px; }
.acc-btn .ic::after { left: 10px; top: 2px; bottom: 2px; width: 2px; }
.acc[open] .acc-btn .ic::after { transform: rotate(90deg); opacity: 0; }
.acc-panel { overflow: hidden; }
.acc-panel-in { padding: 0 4px 22px; color: var(--body); max-width: 64ch; }

/* ============ FORM ============ */
.form-section { padding: clamp(5rem, 12vh, 8rem) 0 clamp(6rem, 12vh, 9rem); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.6rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 940px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-h { font-size: clamp(1.9rem, 3.8vw, 3.1rem); line-height: 1.05; }
.form-intro-sub { margin-top: 1.4rem; color: var(--body); max-width: 42ch; font-size: clamp(1rem, 1.2vw, 1.1rem); }
.config-nodes { position: relative; margin-top: 2.4rem; display: flex; flex-direction: column; gap: 12px; max-width: 240px; }
.config-nodes::before { content: ""; position: absolute; left: 6px; top: 15px; bottom: 15px; width: 1.5px; background: linear-gradient(180deg, var(--violet), var(--cyan)); transform: scaleY(0); transform-origin: top; box-shadow: 0 0 10px #34e4f24d; transition: transform 0.7s var(--ease-out); }
.config-nodes.c1::before { transform: scaleY(0.26); }
.config-nodes.c-all::before { transform: scaleY(1); }
.cfg { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 11px; font-size: 0.9rem; color: var(--muted); transition: color 0.4s; }
.cfg i { width: 13px; height: 13px; border-radius: 999px; border: 1px solid var(--line); background: #0a0f1c; flex-shrink: 0; transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; }
.cfg.on { color: var(--title); }
.cfg.on i { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px #34e4f27a; }

.form-card { max-width: 560px; width: 100%; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), #0a1020); box-shadow: 0 50px 110px #02040a, 0 0 0 1px #34e4f210, 0 0 80px #34e4f214; padding: clamp(1.6rem, 3.5vw, 2.4rem); }
@media (min-width: 940px) { .form-card { margin-left: auto; } }
.form-status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.76rem; letter-spacing: 0.03em; color: var(--muted); border: 1px solid var(--line-soft); border-radius: 999px; padding: 5px 12px; margin-bottom: 1.4rem; transition: color 0.3s, border-color 0.3s; }
.form-status.active { color: var(--cyan); border-color: #34e4f238; }
form { display: flex; flex-direction: column; gap: 1.05rem; }
.f-field label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.f-field input[type="text"], .f-field input[type="tel"] { width: 100%; height: 52px; border-radius: 12px; border: 1px solid var(--line); background: #0a0f1d; color: var(--title); padding: 0 15px; font-family: var(--font-body); font-size: 16px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.f-field input::placeholder { color: var(--faint); }
.f-field input:focus { border-color: color-mix(in srgb, var(--cyan) 60%, transparent); box-shadow: 0 0 0 3px #34e4f226; }
.f-field.err input { border-color: color-mix(in srgb, #ff6b6b 60%, transparent); }
.f-err { display: none; color: #ff9a9a; font-size: 0.8rem; margin-top: 6px; }
.f-field.err .f-err { display: block; }
.hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; pointer-events: none; }
.consent { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent .box { flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: #0a0f1d; display: grid; place-items: center; margin-top: 1px; transition: background 0.2s, border-color 0.2s; }
.consent .box svg { opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.15s; }
.consent input:checked + .box { background: var(--green); border-color: var(--green); }
.consent input:checked + .box svg { opacity: 1; transform: none; }
.consent input:focus-visible + .box { box-shadow: 0 0 0 3px #34e4f240; }
.consent span { font-size: 0.86rem; color: var(--body); line-height: 1.45; }
.consent a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.consent.err .box { border-color: #ff6b6b; }
.f-submit { margin-top: 0.4rem; width: 100%; }
.f-submit[disabled] { opacity: 0.7; cursor: default; }
.spin { width: 18px; height: 18px; border-radius: 999px; border: 2px solid #04140b55; border-top-color: var(--on-green); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-micro { margin-top: 1rem; text-align: center; font-size: 0.84rem; color: var(--muted); }
.form-fail { display: none; margin-top: 1rem; text-align: center; color: #ff9a9a; font-size: 0.88rem; }

.success { display: none; text-align: center; padding: clamp(1rem, 3vw, 2rem) 0; }
.success.show { display: block; }
.success-anim { position: relative; height: 84px; margin: 0 auto 1.4rem; width: 220px; }
.snode { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 999px; background: var(--green); box-shadow: 0 0 16px #22c86e; transform: translateY(-50%); }
.snode.l { left: 40px; } .snode.r { right: 40px; }
.sline { position: absolute; top: 50%; left: 56px; right: 56px; height: 2px; transform: translateY(-50%); background: var(--green); transform-origin: center; }
.success.show .snode.l { animation: nodeL 0.9s var(--ease-out) both; }
.success.show .snode.r { animation: nodeR 0.9s var(--ease-out) both; }
.success.show .sline { animation: lineGrow 0.6s var(--ease-out) 0.55s both; }
@keyframes nodeL { from { left: 8px; opacity: 0; } to { left: 40px; opacity: 1; } }
@keyframes nodeR { from { right: 8px; opacity: 0; } to { right: 40px; opacity: 1; } }
@keyframes lineGrow { from { transform: translateY(-50%) scaleX(0); } to { transform: translateY(-50%) scaleX(1); } }
.success h2 { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.success p { margin: 1rem auto 0; max-width: 44ch; color: var(--body); }

/* ============ FOOTER + STICKY ============ */
footer { border-top: 1px solid var(--line); padding: clamp(2.6rem, 5vw, 3.6rem) 0; }
.foot { display: flex; flex-direction: column; gap: 4px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand .brand-mark { width: 30px; height: 30px; }
.foot .wordmark { font-size: 1.2rem; }
.foot-sub { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.foot-legal { margin-top: 1.2rem; display: flex; gap: 20px; }
.foot-legal a { color: var(--muted); font-size: 0.85rem; }
.foot-legal a:hover { color: var(--body); }

.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-cta); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #080c16e6; backdrop-filter: blur(10px); border-top: 1px solid var(--line); transform: translateY(120%); transition: transform 0.35s var(--ease-out); }
.sticky-cta.show { transform: none; }
.sticky-cta .btn { width: 100%; }
@media (min-width: 768px) { .sticky-cta { display: none; } }

/* ---- mobile header ---- */
@media (max-width: 600px) {
  .hbar .brand-pill { display: none; }
  .wordmark { font-size: 1.32rem; }
  .brand-mark { width: 36px; height: 36px; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-lines .mask > span { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; }
  .mask > span { transform: none !important; }
  .live-dot i:first-child, .scroll-hint span { animation: none !important; }
  .cockpit.is-live [data-step] { opacity: 1 !important; }
  .how-step { opacity: 1 !important; }
  .q-item { opacity: 1 !important; transform: none !important; }
  .shift .frag { opacity: 0.5 !important; transform: none !important; animation: none !important; }
  .shift .out { opacity: 1 !important; transform: none !important; animation: none !important; }
  .spine-flow, .btn-green::after, .perso-ingest .ing { animation: none !important; }
}
