/* Questionario Sonitech: grafica del wizard (soni-tech.com/progetto/) */
:root {
  --bg: #10101d; --ink: #f2f3f8; --ink-2: #a9adc4; --ink-3: #6c7090; --line: rgba(255,255,255,.09);
  --cyan: #00A8DD; --white: #F2F2F5;
  --acc: #3ddc97;                       /* cambia a ogni domanda */
  --ease: cubic-bezier(.77, 0, .18, 1); --ease-out: cubic-bezier(.16, 1, .3, 1);
  --font: "Sora", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body.wz-lock { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: normal; color: var(--acc); }

/* ================= sezione di lancio ================= */
.launch {
  position: relative; min-height: 100dvh; display: flex; align-items: center; gap: 6vw;
  padding: 80px clamp(20px, 7vw, 110px);
  background: radial-gradient(70% 80% at 75% 50%, rgba(61,220,151,.12), transparent 70%), var(--bg);
}
.launch-copy { flex: 1 1 46%; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.eyebrow b { color: var(--acc); font-weight: 500; padding: 3px 8px; border: 1px solid currentColor; border-radius: 6px; }
h1 { font-size: clamp(34px, 4.6vw, 64px); font-weight: 600; letter-spacing: -.035em; line-height: 1.03; text-wrap: balance; }
.lead { margin-top: 22px; max-width: 48ch; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6; color: var(--ink-2); font-weight: 300; }
.cta {
  margin-top: 36px; display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 26px 18px 20px; border-radius: 99px; font-size: 16px; font-weight: 600;
  background: var(--acc); color: #0b1020;
  box-shadow: 0 0 0 0 rgba(61,220,151,.5); animation: cta-pulse 2.6s ease-out infinite;
  transition: transform .3s var(--ease-out);
}
.cta:hover { transform: translateY(-2px); }
.cta:hover .cta-arrow { transform: translateX(4px); }
.cta-arrow { transition: transform .3s var(--ease-out); }
@keyframes cta-pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.45); } 70%, 100% { box-shadow: 0 0 0 18px rgba(61,220,151,0); } }
.cta-sym, .wz-logo {
  position: relative; display: inline-block; width: 26px; height: 26px; border-radius: 9px; border: 4.5px solid #0b1020;
}
.cta-sym::after, .wz-logo::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 4.5px; background: #0b1020; transform: translate(-50%, -50%); }
.meta { margin-top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.launch-visual { flex: 1 1 54%; display: grid; place-items: center; }
.teaser {
  width: min(460px, 100%); aspect-ratio: 1; border-radius: 32px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, rgba(61,220,151,.12), transparent 60%), rgba(255,255,255,.02);
  display: grid; place-items: center; overflow: hidden;
}
.teaser-scene { width: 100%; height: 100%; }
.wz-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.mock-badge { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--ink-3); padding: 7px 12px; border: 1px dashed var(--line); border-radius: 99px; white-space: nowrap; }

/* ================= wizard a tutto schermo ================= */
/* sfondo: il sito resta visibile, scurito e sfocato */
.wz {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 3vh 3vw;
  background: rgba(6, 6, 14, .55);
  -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%);
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.wz.open { opacity: 1; visibility: visible; transition: opacity .45s ease; }
.wz.closing { opacity: 0; visibility: visible; transition: opacity .4s ease; }

/* la finestra: nasce dal pulsante e si apre al centro */
.wz-win {
  position: relative; display: flex; flex-direction: column;
  width: min(1120px, 100%); height: min(720px, 100%);
  border-radius: 28px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: radial-gradient(80% 90% at 25% 45%, color-mix(in srgb, var(--acc) 16%, transparent), transparent 70%), var(--bg);
  box-shadow: 0 50px 120px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.4), 0 0 80px -30px var(--acc);
  transform-origin: var(--ox, 50%) var(--oy, 50%);
  transform: translateY(24px) scale(.92); opacity: 0;
  transition: transform .6s var(--ease-out), opacity .4s ease, background .8s ease, box-shadow .8s ease;
}
.wz.open .wz-win { transform: none; opacity: 1; }
.wz.closing .wz-win { transform: translateY(16px) scale(.95); opacity: 0; transition-duration: .35s; }

.wz-head { display: flex; align-items: center; gap: 14px; padding: 18px clamp(16px, 3vw, 36px); }
.wz-logo { border-color: var(--white); width: 26px; height: 26px; }
.wz-logo::after { background: var(--cyan); }
.wz-title { font-size: 14px; font-weight: 600; white-space: nowrap; }
.wz-segs { list-style: none; flex: 1; display: flex; gap: 6px; max-width: 520px; margin: 0 auto; }
.wz-segs li { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.wz-segs li i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .6s var(--ease-out), background .8s; }
.wz-segs li.done i { width: 100%; }
.wz-sound { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: border-color .3s; }
.wz-sound:hover { border-color: rgba(255,255,255,.35); }
.wz-sound svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wz-sound .mute { display: none; }
.wz-sound.off .wave { display: none; }
.wz-sound.off .mute { display: inline; }
.wz-sound.off svg { stroke: var(--ink-3); }
.wz-close { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); font-size: 15px; transition: border-color .3s; }
.wz-close:hover { border-color: rgba(255,255,255,.35); }

.wz-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 48px); padding: 4px clamp(16px, 3vw, 40px) 0; align-items: center; }
.wz-visual {
  position: relative; height: min(100%, 620px); max-height: 100%; max-width: 100%; aspect-ratio: 1; justify-self: center;
  border-radius: 36px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--acc) 18%, transparent), transparent 62%), rgba(255,255,255,.02);
  transition: background .8s ease; overflow: hidden;
}
.wz-scene { position: absolute; inset: 6%; }
.wz-scene svg, .teaser-scene svg { width: 100%; height: 100%; display: block; overflow: visible; }
.wz-scene .scene { animation: scene-in .8s var(--ease-out) both; }
@keyframes scene-in { from { opacity: 0; transform: scale(.94); } }

.wz-panel { min-width: 0; max-height: 100%; overflow-y: auto; padding: 10px 4px 20px; scrollbar-width: thin; }
.wz-count { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--acc); transition: color .8s; }
.wz-q { margin-top: 14px; font-size: clamp(26px, 2.8vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1.12; min-height: 2.3em; }
.wz-cursor {
  position: relative; display: inline-block; box-sizing: border-box;
  width: .64em; height: .64em; margin-left: .12em; vertical-align: -.03em;
  border: .11em solid var(--white); border-radius: .22em; animation: blink 1.05s steps(1) infinite;
}
.wz-cursor::after { content: ""; position: absolute; left: 50%; top: 50%; width: .24em; height: .11em; background: var(--cyan); transform: translate(-50%, -50%); box-shadow: 0 0 .35em rgba(0,168,221,.8); }
.wz-cursor.typing { animation: none; }
/* domanda mostrata subito (clic durante la scrittura): da sfocata a nitida */
.wz-typed.svela { display: inline-block; animation: wz-svela .45s var(--ease-out, ease-out) both; }
@keyframes wz-svela { from { opacity: .2; filter: blur(8px); transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .wz-typed.svela { animation: none; } }
@keyframes blink { 50% { opacity: 0; } }
.wz-hint { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--ink-2); font-weight: 300; min-height: 1.5em; }

/* risposte che compaiono dopo la domanda */
.wz-answers { margin-top: 22px; }
.wr { opacity: 0; transform: translateY(14px); pointer-events: none; }
.wz-answers.in .wr { opacity: 1; transform: none; pointer-events: auto; transition: opacity .5s ease calc(var(--i) * 70ms), transform .6s var(--ease-out) calc(var(--i) * 70ms), border-color .25s, background .25s; }
.wz-answers.settled .wr { transition-delay: 0s; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 15px 16px; border-radius: 16px;
  font-size: 15px; line-height: 1.3; border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.opt:hover { border-color: color-mix(in srgb, var(--acc) 55%, transparent); }
.opt.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 13%, transparent); }
.chk { flex: none; width: 20px; height: 20px; border-radius: 7px; border: 1.5px solid rgba(255,255,255,.3); display: grid; place-items: center; transition: .25s; }
.radio .chk { border-radius: 50%; }
.opt.on .chk { background: var(--acc); border-color: var(--acc); }
.opt.on .chk::after { content: ""; width: 8px; height: 4px; border: 2px solid #0b1020; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.field { display: block; margin-top: 12px; }
.field span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.field .field-hint { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.field .field-hint span { display: inline; margin: 0; font-size: inherit; color: inherit; }
.field .field-hint b { color: var(--acc); font-weight: 600; }
.field .field-hint svg { flex: none; width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.inp {
  width: 100%; padding: 14px 16px; border-radius: 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: rgba(255,255,255,.04); border: 1px solid var(--line); outline: none; transition: border-color .25s;
}
.inp:focus { border-color: var(--acc); }
textarea.inp { min-height: 150px; resize: none; line-height: 1.5; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.privacy { display: flex; gap: 12px; margin-top: 16px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.privacy input { flex: none; width: 18px; height: 18px; accent-color: var(--acc); margin-top: 2px; }
.review > div { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.review dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.review dd { font-size: 14px; line-height: 1.45; word-break: break-word; }
.review button { font-size: 12px; color: var(--acc); }
.wz-error { margin-top: 12px; font-size: 13px; color: #ff8a80; }

.wz-nav { display: flex; justify-content: space-between; gap: 12px; padding: 14px clamp(16px, 3vw, 40px) 22px; }
.wz-btn { padding: 15px 28px; border-radius: 99px; font-weight: 600; font-size: 15px; transition: opacity .3s, transform .3s var(--ease-out), background .8s; }
.wz-btn.ghost { border: 1px solid var(--line); }
.wz-btn.primary { background: var(--acc); color: #0b1020; }
.wz-btn:disabled { opacity: .3; cursor: not-allowed; }
.wz-btn:not(:disabled):hover { transform: translateY(-2px); }

/* ================= elementi comuni delle scene SVG ================= */
.s-line { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1.5; }
.s-flow { fill: none; stroke: var(--acc); stroke-width: 2; stroke-dasharray: 4 9; animation: flow 1s linear infinite; opacity: 0; transition: opacity .5s; }
.on > .s-flow, .s-flow.on { opacity: 1; }
@keyframes flow { to { stroke-dashoffset: -13; } }
.s-ring { fill: none; stroke: var(--white); }
.s-bar { fill: var(--cyan); }
.s-ic { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s; }
.s-txt { font-family: var(--font); fill: var(--ink-2); font-size: 12px; transition: fill .4s; }
.s-mono { font-family: var(--mono); fill: var(--ink-3); font-size: 10px; letter-spacing: .08em; }
.s-big { font-family: var(--font); font-weight: 600; fill: var(--ink); }
.pulse-c { animation: pulse-c 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse-c { 50% { transform: scale(1.06); filter: drop-shadow(0 0 12px var(--acc)); } }

/* 1 · settori in orbita */
.orbit { transform-origin: 200px 200px; animation: spin 70s linear infinite; }
.orbit .counter { transform-box: fill-box; transform-origin: center; animation: spin 70s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.node circle { fill: #1a1c30; stroke: rgba(255,255,255,.14); stroke-width: 1.2; transition: fill .4s, stroke .4s, r .4s; }
.node.hov circle { stroke: var(--acc); }
.node.sel circle { fill: var(--acc); stroke: var(--acc); r: 36; }
.node.sel .s-ic { stroke: #0b1020; }
.spoke.sel { stroke: var(--acc); stroke-opacity: .7; }

/* 2 · persone */
.person { fill: rgba(255,255,255,.12); transition: fill .35s; }
.people.idle .person { animation: breathe 3s ease-in-out infinite; animation-delay: calc(var(--d) * 40ms); }
@keyframes breathe { 50% { fill: rgba(255,255,255,.28); } }
.person.lit { fill: var(--acc); transition-delay: calc(var(--d) * 14ms); }

/* 3 · hub delle aree */
.sat rect { fill: #1a1c30; stroke: rgba(255,255,255,.14); transition: fill .4s, stroke .4s; }
.sat.sel rect { fill: color-mix(in srgb, var(--acc) 22%, #1a1c30); stroke: var(--acc); }
.sat.sel .s-txt, .sat.hov .s-txt { fill: var(--ink); }
.sat.hov rect { stroke: var(--acc); }

/* 4 · finestre degli strumenti */
.win { transition: filter .4s; }
.win .float { animation: bob 5s ease-in-out infinite; animation-delay: calc(var(--d) * -.8s); }
@keyframes bob { 50% { transform: translateY(-7px); } }
.win rect.frame { fill: #1a1c30; stroke: rgba(255,255,255,.14); transition: stroke .4s; }
.win.sel rect.frame, .win.hov rect.frame { stroke: var(--acc); }
.win.sel { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--acc) 55%, transparent)); }
.win .mini { fill: rgba(255,255,255,.18); }
.win.sel .mini { fill: var(--acc); }

/* 6 · tempo */
.star { fill: rgba(255,255,255,.5); animation: star-move var(--sp, 9s) linear infinite; animation-delay: calc(var(--d) * -1s); }
@keyframes star-move { from { transform: translateX(420px); } to { transform: translateX(-40px); } }
.marker { transition: transform 1s var(--ease); }
.mile circle { fill: #1a1c30; stroke: rgba(255,255,255,.25); transition: fill .4s, stroke .4s; }
.mile.sel circle { fill: var(--acc); stroke: var(--acc); }
.mile.sel .s-txt { fill: var(--ink); }
.flame { fill: var(--cyan); opacity: 0; transition: opacity .4s; transform-box: fill-box; transform-origin: right center; }
.fast .flame { opacity: .9; animation: flame .18s ease-in-out infinite alternate; }
@keyframes flame { to { transform: scaleX(1.5); } }

/* 7 · contatto */
.chan circle { fill: #1a1c30; stroke: rgba(255,255,255,.14); transition: fill .4s, stroke .4s; }
.chan.sel circle { fill: var(--acc); stroke: var(--acc); }
.chan.sel .s-ic { stroke: #0b1020; }
.card-name { font-size: 22px; }

/* riepilogo e grazie */
.chk-row circle { fill: none; stroke: var(--acc); stroke-width: 2; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s var(--ease-out) forwards; animation-delay: calc(var(--d) * .18s + .3s); }
.chk-row path { fill: none; stroke: var(--acc); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 20; stroke-dashoffset: 20; animation: draw .35s var(--ease-out) forwards; animation-delay: calc(var(--d) * .18s + .6s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.burst { fill: var(--acc); transform-box: fill-box; transform-origin: center; animation: burst 1.6s var(--ease-out) forwards; }
@keyframes burst { from { opacity: 1; transform: translate(0, 0) scale(1); } to { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.3); } }

/* ================= mobile ================= */
@media (max-width: 860px) {
  .launch { flex-direction: column; justify-content: center; gap: 28px; padding: 70px 22px 60px; text-align: left; }
  .launch-copy { flex: none; }
  .launch-visual { flex: none; width: 100%; }
  .teaser { width: min(300px, 80vw); }
  .cta { width: 100%; justify-content: center; }

  .wz { padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom)); }
  .wz-win { border-radius: 22px; height: 100%; }
  .wz-head { padding: 12px 14px; gap: 10px; }
  .wz-title { display: none; }
  .wz-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 10px; padding: 0 16px; align-items: start; }
  .wz-visual { height: min(34dvh, 300px); width: 100%; aspect-ratio: auto; border-radius: 24px; }
  .wz-scene { inset: 4% 10%; }
  .wz-panel { padding-top: 4px; }
  .wz-q { font-size: 24px; min-height: 2.3em; margin-top: 8px; }
  .wz-hint { font-size: 14px; margin-top: 6px; }
  .wz-answers { margin-top: 14px; }
  .opts { gap: 8px; }
  .opt { padding: 12px 11px; font-size: 13.5px; gap: 9px; border-radius: 13px; }
  .chk { width: 17px; height: 17px; }
  .grid2 { grid-template-columns: 1fr; }
  .review > div { grid-template-columns: 1fr auto; gap: 2px 10px; }
  .review dt { grid-column: 1 / -1; }
  .wz-nav { padding: 12px 14px 14px; }
  .wz-btn { padding: 13px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; }
}

/* ---------- Cursore: l'agente di CREALO (la O del logo) che fa le domande ----------
   parla = la barretta si muove come una bocca mentre la domanda si scrive; legge = scorre come uno sguardo; salta = reazione a una scelta */
.wz-parla { display: flex; align-items: flex-start; gap: 18px; margin-top: 14px; }
.wz-parla .wz-q { margin-top: 0; flex: 1; min-width: 0; }
.wz-cursore { position: relative; flex: none; width: 58px; height: 65px; margin-top: 2px; filter: drop-shadow(0 0 14px rgba(0,168,221,.45)); animation: cu-galleggia 3.2s ease-in-out infinite; }
.wz-cursore img { position: absolute; display: block; }
.wz-cursore .cu-ring { inset: 0; width: 100%; height: 100%; }
.wz-cursore .cu-bar { left: 30.45%; top: 43.48%; width: 38.72%; height: 20.07%; transform-origin: center; }
.wz-cursore.parla .cu-bar { animation: cu-bocca .16s ease-in-out infinite alternate; }
.wz-cursore.legge .cu-bar { animation: cu-legge 1.3s ease-in-out infinite; }
.wz-cursore.salta { animation: cu-salta .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes cu-galleggia { 50% { transform: translateY(-5px) rotate(-3deg); } }
@keyframes cu-bocca { from { transform: scaleY(1); } to { transform: scaleY(1.9) scaleX(.9); } }
@keyframes cu-legge { 0%, 100% { transform: translateX(-20%) scaleY(.8); } 50% { transform: translateX(20%) scaleY(.8); } }
@keyframes cu-salta { 40% { transform: translateY(-14px) scale(1.1) rotate(-8deg); } }
.wz-parla .wz-cursor { display: none; }   /* il piccolo cursore a fine riga ora è Cursore accanto alla domanda */
.site-big { font-size: 22px !important; height: 62px; }
.senza-sito { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; padding: 12px 18px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.22); background: rgba(255,255,255,.03); color: var(--ink-2, #b6bacf); font: inherit; font-size: 14.5px; cursor: pointer; }
.senza-sito:hover { border-color: var(--acc); color: var(--ink, #fff); }
.senza-sito svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) { .wz-parla { gap: 12px; margin-top: 8px; } .wz-cursore { width: 42px; height: 47px; } .site-big { font-size: 18px !important; height: 54px; } }
@media (prefers-reduced-motion: reduce) { .wz-cursore, .wz-cursore .cu-bar { animation: none !important; } }
.wz .note a { color: var(--acc); }
