/* We Are People — deck "I nostri servizi": slide nuove (servizi, approfondimenti, portfolio, app ricostruite). */

/* ───────── Hero ───────── */
.hero-svc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(22px, 4vh, 36px); pointer-events: auto; }
.hero-svc li { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); background: rgba(10, 10, 11, .55); font-size: 14px; color: var(--muted); cursor: pointer; transition: border-color .3s, color .3s, background .3s; }
.hero-svc li span { font-family: var(--mono); font-size: 10.5px; color: var(--red); }
.hero-svc li:hover { border-color: var(--red); color: var(--fg); background: var(--red-soft); }
.s-hero .hint { margin-top: clamp(20px, 4vh, 40px); }

/* ───────── Servizi ───────── */
.svc { display: grid; grid-template-columns: minmax(220px, 3fr) minmax(0, 8fr); gap: 1px; margin-top: clamp(20px, 4vh, 40px); background: var(--line); border: 1px solid var(--line); }
.svc-tabs { display: flex; flex-direction: column; background: var(--bg); }
.svc-tabs button { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: clamp(12px, 2vh, 20px) clamp(16px, 1.6vw, 24px); text-align: left; border-bottom: 1px solid var(--line); overflow: hidden; transition: background .4s; }
.svc-tabs button:last-child { border-bottom: 0; }
.svc-tabs .mono { font-size: 10px; color: var(--dim); transition: color .4s; }
.svc-tabs b { font-family: var(--serif); font-weight: 500; font-size: clamp(21px, 1.8vw, 28px); line-height: 1.05; color: var(--muted); transition: color .4s; }
.svc-tabs i { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--red); }
.svc-tabs button:hover { background: #111113; }
.svc-tabs button.on { background: #141416; }
.svc-tabs button.on b { color: var(--fg); }
.svc-tabs button.on .mono { color: var(--red); }
.svc-tabs button.on i { animation: svcbar var(--dur, 9s) linear forwards; }
.svc.pinned .svc-tabs button.on i { animation: none; width: 100%; }
@keyframes svcbar { to { width: 100%; } }
.svc-panes { position: relative; background: var(--bg); min-height: clamp(330px, 46vh, 440px); }
.svc-pane { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(18px, 2.6vw, 40px); padding: clamp(18px, 2.4vw, 34px); opacity: 0; visibility: hidden; transition: opacity .45s, visibility 0s .45s; }
.svc-pane.on { opacity: 1; visibility: visible; transition: opacity .6s .1s, visibility 0s; }
.svc-vis { position: relative; min-height: 0; border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; background: #0e0e10; overflow: hidden; }
.qa { display: flex; flex-direction: column; justify-content: center; gap: clamp(10px, 2vh, 18px); }
.qa li { position: relative; padding-left: 26px; }
.qa li::before { content: "?"; position: absolute; left: 0; top: -2px; font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1; color: var(--red); }
.qa.num { counter-reset: q; }
.qa.num li::before { counter-increment: q; content: counter(q); font-family: var(--mono); font-style: normal; font-size: 13px; top: 3px; }
.qq { font-size: clamp(15px, 1.15vw, 18px); line-height: 1.4; color: var(--fg); font-weight: 500; opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .6s var(--ease); }
.qa-r { margin-top: 4px; font-size: clamp(14px, 1.02vw, 16px); line-height: 1.5; color: var(--muted); opacity: 0; transform: translateY(6px); transition: opacity .5s .35s, transform .6s var(--ease) .35s; }
.qa li.in .qq, .qa li.in .qa-r { opacity: 1; transform: none; }

/* vis: codice → app */
.vc-code { position: absolute; left: 0; top: 0; bottom: 0; width: 56%; padding: 16px; background: linear-gradient(90deg, #0b0b0d, #0e0e10); }
.vc-code pre { font-family: var(--mono); font-size: clamp(9.5px, .72vw, 11px); line-height: 1.7; color: var(--dim); white-space: pre-wrap; }
.vc-code pre b { color: var(--red); font-weight: 400; }
.vc-code pre u { text-decoration: none; color: var(--fg); }
.vc-code pre::after { content: ""; display: inline-block; width: 6px; height: 12px; background: var(--red); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.vc-app { position: absolute; right: 7%; top: 50%; width: 38%; aspect-ratio: 9 / 17; transform: translateY(-50%); display: flex; flex-direction: column; gap: 7px; padding: 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; background: #141417; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.vc-app > * { opacity: 0; transform: scale(.9); transition: opacity .4s, transform .5s var(--ease); }
.vc-app > .in { opacity: 1; transform: none; }
.vc-top { display: flex; gap: 4px; }
.vc-top i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.vc-hero { height: 30%; border-radius: 8px; background: linear-gradient(135deg, var(--red-bg), #7a1d14); }
.vc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.vc-row span { height: 22px; border-radius: 5px; background: rgba(255, 255, 255, .08); }
.vc-list { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.vc-list span { height: 13px; border-radius: 4px; background: rgba(255, 255, 255, .06); }
.vc-list span:nth-child(2) { width: 80%; } .vc-list span:nth-child(3) { width: 62%; }
.vc-btn { padding: 7px; border-radius: 6px; background: #fff; color: #0a0a0b; font-size: 10px; font-weight: 600; text-align: center; }

/* vis: AI */
.va-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 16px 0; }
.va-flow li { position: relative; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; transition: border-color .4s, background .4s; }
.va-flow li small { display: block; margin-top: 2px; font-size: 10px; color: var(--dim); }
.va-flow li.on { border-color: var(--red); background: var(--red-soft); }
.va-flow li + li::before { content: "→"; position: absolute; left: -9px; top: 50%; transform: translate(-50%, -50%); font-size: 10px; color: var(--dim); }
.va-flow .ai b { color: var(--red); }
.va-card { margin: 14px 16px 16px; padding: 14px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; background: #141417; }
.va-card .mono { font-size: 9.5px; color: var(--red); }
.va-txt { min-height: 6.2em; margin-top: 8px; font-size: clamp(12px, .9vw, 13.5px); line-height: 1.55; color: var(--fg); }
.va-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 22px; }
.va-tags span { font-family: var(--mono); font-size: 9.5px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); animation: pop .4s var(--ease) both; }
.va-tags span.ok { border-color: rgba(34, 197, 94, .5); color: #4ade80; }

/* vis: dati */
.vd-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vd-cap { position: absolute; left: 14px; right: 14px; bottom: 10px; display: flex; justify-content: space-between; font-size: 9.5px; color: var(--dim); }
.vd-cap span:last-child { color: var(--red); opacity: 0; transition: opacity .6s; }
.vd-cap.done span:last-child { opacity: 1; }

/* vis: controllo di gestione (waterfall) */
.vg-wf { position: absolute; left: 16px; right: 16px; top: 20px; bottom: 46px; display: flex; gap: 10px; }
.vg-wf div { position: relative; flex: 1; }
.vg-wf div::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: calc(var(--b) * 1%); height: 0; background: rgba(244, 244, 242, .85); transition: height .8s var(--ease); }
.vg-wf .neg::before { background: var(--red); }
.vg-wf .pos::before { background: rgba(244, 244, 242, .5); }
.vg-wf .res::before { background: #4ade80; }
.vg-wf.go div::before { height: calc(var(--h) * 1%); }
.vg-wf div:nth-child(2)::before { transition-delay: .35s; } .vg-wf div:nth-child(3)::before { transition-delay: .7s; } .vg-wf div:nth-child(4)::before { transition-delay: 1.05s; } .vg-wf div:nth-child(5)::before { transition-delay: 1.4s; }
.vg-wf em { position: absolute; left: -6px; right: -6px; bottom: -22px; text-align: center; font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--dim); white-space: nowrap; }
.vg-wf .neg em { color: var(--red); }
.vg-cap { position: absolute; left: 16px; bottom: 6px; font-size: 9.5px; color: var(--dim); }

/* ───────── Approfondimenti ───────── */
.deep-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); align-items: end; }
.deep-head .lead { margin-top: 0; font-size: clamp(14.5px, min(1.1vw, 2.1vh), 17.5px); }
.s-deep .title { font-size: clamp(36px, min(4.4vw, 8vh), 72px); }
.xp { display: grid; grid-template-columns: minmax(200px, 3fr) minmax(0, 8fr); gap: 1px; margin-top: clamp(18px, 3.6vh, 36px); background: var(--line); border: 1px solid var(--line); }
.xp-tabs { display: flex; flex-direction: column; background: var(--bg); }
.xp-tabs button { position: relative; flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px clamp(14px, 1.4vw, 20px); text-align: left; font-size: clamp(13px, .98vw, 15px); color: var(--muted); border-bottom: 1px solid rgba(255, 255, 255, .06); transition: background .3s, color .3s; }
.xp-tabs button:last-child { border-bottom: 0; }
.xp-tabs button span { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.xp-tabs button::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--red); transform: scaleY(0); transition: transform .4s var(--ease); }
.xp-tabs button:hover { background: #111113; color: var(--fg); }
.xp-tabs button.on { background: #141416; color: var(--fg); }
.xp-tabs button.on span { color: var(--red); }
.xp-tabs button.on::after { transform: none; }
.xp-body { position: relative; background: var(--bg); min-height: clamp(300px, 44vh, 420px); }
.xp-pane { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(18px, 2.4vw, 36px); padding: clamp(16px, 2.2vw, 30px); opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.xp-pane.on { opacity: 1; visibility: visible; transition: opacity .55s .08s, visibility 0s; }
.xp-vis { position: relative; min-height: 0; border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; background: #0e0e10; overflow: hidden; }
.xp-txt { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.xp-txt h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.3vw, 36px); line-height: 1.02; }
.xp-txt p { font-size: clamp(13.5px, 1vw, 15.5px); line-height: 1.6; color: var(--muted); }
.xp-txt b { color: var(--fg); font-weight: 500; }
.xp-hint { font-size: 10px !important; color: var(--dim) !important; }

/* device morph */
.vis-device { display: grid; place-items: center; }
.dv { width: 34%; aspect-ratio: 9 / 18; padding: 8px; border: 2px solid rgba(255, 255, 255, .22); border-radius: 22px; background: #151518; transition: width 1s var(--ease), aspect-ratio 1s var(--ease), border-radius 1s var(--ease); }
.vis-device.desk .dv { width: 80%; aspect-ratio: 16 / 10; border-radius: 10px; }
.dv-scr { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 6px; overflow: hidden; border-radius: 14px; transition: border-radius 1s; }
.vis-device.desk .dv-scr { flex-direction: row; border-radius: 4px; }
.dv-nav { display: flex; gap: 6px; align-items: center; padding: 4px; border-radius: 6px; background: rgba(255, 255, 255, .04); transition: all 1s var(--ease); }
.dv-nav i { width: 14px; height: 14px; flex: none; border-radius: 4px; background: var(--red-bg); }
.dv-nav span { height: 6px; flex: 1; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.vis-device.desk .dv-nav { flex-direction: column; align-items: stretch; width: 22%; padding: 8px; }
.vis-device.desk .dv-nav span { flex: none; }
.dv-main { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dv-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.dv-kpi span { height: 26px; border-radius: 5px; background: rgba(255, 255, 255, .07); }
.dv-chart { flex: 1; display: flex; align-items: flex-end; gap: 4px; padding: 6px; border-radius: 6px; background: rgba(255, 255, 255, .03); }
.dv-chart i { flex: 1; height: calc(var(--h) * 1%); border-radius: 2px; background: linear-gradient(to top, rgba(230, 60, 46, .3), var(--red)); }
.dv-rows { display: flex; flex-direction: column; gap: 4px; }
.dv-rows span { height: 9px; border-radius: 3px; background: rgba(255, 255, 255, .06); }
.dv-lbl { position: absolute; left: 14px; bottom: 10px; display: flex; gap: 14px; font-size: 10px; color: var(--dim); }
.dv-lbl .m { color: var(--red); }
.vis-device.desk .dv-lbl .m { color: var(--dim); }
.vis-device.desk .dv-lbl .d { color: var(--red); }

/* obsoleto vs nuovo */
.cmp { position: absolute; inset: 0; cursor: ew-resize; touch-action: none; --x: 50%; }
.cmp-new, .cmp-old { position: absolute; inset: 0; padding: 18px; }
.cmp-new { display: flex; flex-direction: column; justify-content: center; gap: 14px; background: #121215; }
.nw-h { display: flex; justify-content: space-between; align-items: baseline; }
.nw-h b { font-size: 16px; font-weight: 600; }
.nw-h span { font-size: 11px; color: var(--dim); }
.nw-f { display: grid; gap: 8px; }
.nw-f label { display: flex; justify-content: space-between; padding: 11px 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; font-size: 11px; color: var(--dim); }
.nw-f label span { color: var(--fg); font-size: 12.5px; }
.nw-p { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); }
.nw-p i { display: block; width: 66%; height: 100%; border-radius: 2px; background: var(--red); }
.nw-b { align-self: flex-end; padding: 10px 16px; border-radius: 8px; background: var(--red-bg); color: #fff; font-size: 12px; font-weight: 500; }
.cmp-old { clip-path: inset(0 calc(100% - var(--x)) 0 0); background: #c0c0c0; color: #000; font-family: 'MS Sans Serif', Tahoma, Verdana, sans-serif; font-size: 10.5px; padding: 0; display: flex; flex-direction: column; }
.ol-t { padding: 4px 8px; background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font-weight: 700; font-size: 10.5px; }
.ol-m { padding: 3px 8px; border-bottom: 1px solid #808080; word-spacing: 6px; }
.ol-g { flex: 1; display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 6px 8px; padding: 12px 10px; }
.ol-g i { height: 17px; background: #fff; border: 2px inset #808080; }
.ol-b { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; border-top: 1px solid #808080; }
.ol-b span { padding: 3px 7px; border: 2px outset #e0e0e0; background: #c0c0c0; }
.cmp-h { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .5); }
.cmp-h span { position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.cmp-h span::before { content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center; color: #0a0a0b; font-size: 13px; font-weight: 600; letter-spacing: 2px; }
.cmp-lbl { position: absolute; left: 10px; right: 10px; top: auto; bottom: 8px; display: flex; justify-content: space-between; font-size: 9.5px; pointer-events: none; }
.cmp-lbl span { padding: 3px 7px; background: rgba(10, 10, 11, .8); color: var(--fg); }

/* operativo → gestionale */
.vis-og { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 8px; padding: 16px; }
.og-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.og-col > .mono { font-size: 9.5px; color: var(--red); }
.og-tasks { display: flex; flex-direction: column; gap: 6px; }
.og-tasks li { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 6px; font-size: 11px; color: var(--muted); animation: pop .4s var(--ease) both; transition: opacity .4s, border-color .4s; }
.og-tasks li i { width: 12px; height: 12px; flex: none; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .3); transition: background .3s, border-color .3s; }
.og-tasks li.done { opacity: .5; }
.og-tasks li.done i { background: var(--red); border-color: var(--red); }
.og-pipe { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.og-pipe i { position: relative; height: 1px; background: rgba(255, 255, 255, .12); overflow: visible; }
.og-pipe i::after { content: ""; position: absolute; top: -3px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: ogflow 1.6s linear infinite; }
.og-pipe i:nth-child(2)::after { animation-delay: .5s; } .og-pipe i:nth-child(3)::after { animation-delay: 1s; }
@keyframes ogflow { from { left: 0; opacity: 0; } 20% { opacity: 1; } to { left: calc(100% - 7px); opacity: 0; } }
.og-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.og-kpi div { padding: 8px 9px; border-radius: 6px; background: #16161a; }
.og-kpi small { display: block; font-size: 9.5px; color: var(--dim); }
.og-kpi b { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.og-bars { flex: 1; min-height: 60px; display: flex; align-items: flex-end; gap: 4px; padding: 8px; border-radius: 6px; background: #16161a; }
.og-bars i { flex: 1; height: var(--h, 6%); border-radius: 2px 2px 0 0; background: linear-gradient(to top, rgba(230, 60, 46, .3), var(--red)); transition: height .6s var(--ease); }

/* struttura (stack) */
.vis-stack { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 18px 18px 18px 70px; }
.st-l { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: #141417; transition: border-color .4s, background .4s; }
.st-l b { font-size: 14px; font-weight: 500; }
.st-l small { font-size: 11px; color: var(--dim); }
.st-l.hot { border-color: var(--red); background: rgba(230, 60, 46, .1); }
.st-fe { margin: 0 14%; }
.st-be { margin: 0 7%; }
.st-db { flex-wrap: wrap; }
.st-tbl { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; width: 100%; margin-top: 8px; }
.st-tbl i { height: 7px; border-radius: 2px; background: rgba(255, 255, 255, .08); transition: background .3s; }
.st-tbl i.on { background: var(--red); }
.st-wire { position: absolute; left: 34px; top: 18px; bottom: 18px; width: 1px; background: rgba(255, 255, 255, .14); }
.st-wire i { position: absolute; left: -4px; width: 9px; height: 9px; border-radius: 50%; }
.st-wire .dn { background: var(--red); animation: stdn 2.4s var(--ease) infinite; }
.st-wire .up { background: #fff; animation: stup 2.4s var(--ease) infinite 1.2s; opacity: 0; }
@keyframes stdn { 0% { top: 0; opacity: 1; } 45% { top: calc(100% - 9px); opacity: 1; } 50%, 100% { top: calc(100% - 9px); opacity: 0; } }
@keyframes stup { 0% { top: calc(100% - 9px); opacity: 1; } 45% { top: 0; opacity: 1; } 50%, 100% { top: 0; opacity: 0; } }

/* UI/UX */
.vis-ui { display: grid; place-items: center; }
.ui-card { width: min(78%, 300px); display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px dashed rgba(255, 255, 255, .25); border-radius: 0; background: transparent; transition: all .8s var(--ease); }
.ui-a { height: 70px; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 6px, transparent 6px 12px); border: 1px dashed rgba(255, 255, 255, .2); transition: all .8s var(--ease); }
.ui-t b, .ui-t small { display: block; font-size: 0; height: 10px; width: 60%; background: rgba(255, 255, 255, .15); transition: all .8s var(--ease); }
.ui-t small { width: 40%; margin-top: 6px; height: 7px; }
.ui-s { display: flex; gap: 6px; }
.ui-s span { flex: 1; height: 26px; font-size: 0; border: 1px dashed rgba(255, 255, 255, .2); display: grid; place-items: center; transition: all .8s var(--ease); }
.ui-b { height: 30px; font-size: 0; border: 1px dashed rgba(255, 255, 255, .25); display: grid; place-items: center; transition: all .8s var(--ease); }
.vis-ui.pro .ui-card { border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; background: #151518; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.vis-ui.pro .ui-a { border: 0; border-radius: 10px; background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, .25), transparent 40%), linear-gradient(135deg, var(--red-bg), #4b1610); }
.vis-ui.pro .ui-t b { font-size: 15px; height: auto; width: auto; background: none; font-weight: 600; }
.vis-ui.pro .ui-t small { font-size: 11px; height: auto; width: auto; background: none; color: var(--dim); margin-top: 2px; }
.vis-ui.pro .ui-s span { font-size: 10.5px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; color: var(--muted); }
.vis-ui.pro .ui-s span.on { background: var(--fg); color: #0a0a0b; border-color: var(--fg); }
.vis-ui.pro .ui-b { font-size: 12px; font-weight: 600; border: 0; border-radius: 10px; background: var(--red-bg); color: #fff; }
.ui-meta { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; gap: 12px; font-size: 9.5px; color: var(--dim); }
.ui-meta .ui-clicks { margin-left: auto; }
.ui-meta .ui-clicks b { color: var(--fg); font-weight: 500; }
.ui-m1 { color: var(--red); }
.vis-ui.pro .ui-m1 { color: var(--dim); }
.vis-ui.pro .ui-m2 { color: var(--red); }

/* 3D CSS: palazzo */
.vis-3d { cursor: grab; touch-action: none; perspective: 900px; }
.b3-scene { position: absolute; left: 50%; top: 52%; width: 0; height: 0; transform-style: preserve-3d; }
.b3 { position: absolute; transform-style: preserve-3d; transform: rotateX(var(--rx, 58deg)) rotateZ(var(--rz, 40deg)); }
.b3-f { position: absolute; left: -80px; top: -60px; width: 160px; height: 120px; transform-style: preserve-3d; transform: translateZ(calc(var(--i) * var(--gap, 28px))); border: 1px solid rgba(244, 244, 242, .55); background: rgba(20, 20, 24, .78); transition: transform .9s var(--ease); background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 20px 20px; }
.b3-f::before { content: ""; position: absolute; left: 12px; top: 14px; width: 50px; height: 40px; border: 1px solid rgba(230, 60, 46, .8); background: rgba(230, 60, 46, .18); }
.b3-f::after { content: ""; position: absolute; right: 16px; bottom: 16px; width: 60px; height: 30px; border: 1px solid rgba(244, 244, 242, .3); }
.b3-f:nth-child(1) { --i: 0; } .b3-f:nth-child(2) { --i: 1; } .b3-f:nth-child(3) { --i: 2; } .b3-f:nth-child(4) { --i: 3; }
.b3-f:nth-child(4) { border-color: var(--red); }
.vis-3d.open .b3-f { --gap: 54px; }
.b3-lbl { position: absolute; left: 12px; bottom: 10px; font-size: 9.5px; color: var(--dim); }

/* ───────── AI ───────── */
.aic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: clamp(18px, 3.6vh, 36px); background: var(--line); border: 1px solid var(--line); }
.ai-card { display: flex; flex-direction: column; gap: 8px; padding: clamp(14px, 1.6vw, 22px); background: var(--bg); }
.ai-card > .mono { font-size: 10px; color: var(--red); margin-top: 6px; }
.ai-card h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.02; }
.ai-card > p { font-size: clamp(12.5px, .92vw, 14.5px); line-height: 1.55; color: var(--muted); }
.ai-card .ex { margin-top: auto; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .07); color: var(--fg); }
.ai-card .ex b { display: block; margin-bottom: 2px; font-family: var(--mono); font-weight: 400; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.ai-demo { position: relative; height: clamp(120px, 19vh, 180px); border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; background: #0e0e10; overflow: hidden; }
.ai-gen { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.g-q { align-self: flex-end; max-width: 88%; padding: 7px 10px; border-radius: 10px 10px 2px 10px; background: rgba(255, 255, 255, .08); font-size: 11.5px; line-height: 1.4; }
.g-q > span:first-child { display: none; }
.g-q:empty, .g-a:empty { display: none; }
.g-a { max-width: 92%; padding: 7px 10px; border-radius: 10px 10px 10px 2px; background: rgba(230, 60, 46, .12); border: 1px solid rgba(230, 60, 46, .3); font-size: 11.5px; line-height: 1.45; }
.g-src { font-family: var(--mono); font-size: 9.5px; color: var(--dim); }
.g-src b { color: var(--red); font-weight: 400; }
.ai-ml canvas { width: 100%; height: 100%; display: block; }
.ml-tag { position: absolute; right: 10px; top: 8px; font-size: 9.5px; color: var(--red); opacity: 0; transition: opacity .5s; }
.ml-tag.on { opacity: 1; }
.cv-grid { position: absolute; inset: 12px; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(3, 1fr); gap: 6px; }
.cv-grid span { position: relative; border-radius: 6px; background: radial-gradient(circle at 50% 50%, #3a3a40 0 28%, #232328 29% 36%, #18181c 37%); transition: outline-color .3s; outline: 1.5px solid transparent; outline-offset: 1px; }
.cv-grid span.bad { background: radial-gradient(circle at 46% 54%, #3a3a40 0 22%, #232328 23% 36%, #18181c 37%); }
.cv-grid span.bad::after { content: ""; position: absolute; left: 30%; top: 36%; width: 40%; height: 2px; background: #8a8a90; transform: rotate(-28deg); }
.cv-grid span.ok { outline-color: rgba(74, 222, 128, .55); }
.cv-grid span.ko { outline-color: var(--red); background-color: rgba(230, 60, 46, .2); animation: anom 1.2s ease-in-out infinite; }
.cv-scan { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--red); box-shadow: 0 0 18px 4px rgba(230, 60, 46, .45); opacity: 0; }
.cv-scan.go { animation: cvscan 2.4s linear forwards; }
@keyframes cvscan { 0% { left: 0; opacity: 1; } 95% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.cv-out { position: absolute; right: 10px; bottom: 8px; padding: 4px 7px; background: var(--red-bg); color: #fff; font-size: 9.5px; opacity: 0; transition: opacity .4s; }
.cv-out.on { opacity: 1; }

/* ───────── Portfolio ───────── */
.s-work .lead { margin-top: 12px; }
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: clamp(18px, 3.6vh, 36px); background: var(--line); border: 1px solid var(--line); }
.works li { position: relative; display: flex; flex-direction: column; gap: 8px; padding: clamp(16px, 1.8vw, 24px); background: var(--bg); cursor: pointer; overflow: hidden; transition: background .4s; }
.works li::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--red); transition: width .6s var(--ease); }
.works li::after { content: "→"; position: absolute; right: 20px; top: 18px; font-family: var(--mono); color: var(--dim); transition: transform .4s var(--ease), color .3s; }
.works li:hover { background: #141416; }
.works li:hover::before { width: 100%; }
.works li:hover::after { color: var(--red); transform: translateX(4px); }
.works .mono { font-size: 10px; color: var(--dim); }
.works li:hover .mono { color: var(--red); }
.works h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.02; }
.works p { font-size: clamp(12.5px, .92vw, 14px); line-height: 1.5; color: var(--muted); }
.wk-i { position: relative; display: block; height: clamp(44px, 7vh, 64px); margin-bottom: 4px; }
.wk-twin i { position: absolute; bottom: 0; width: 8px; border: 1px solid rgba(244, 244, 242, .6); border-bottom: 0; }
.wk-twin i:nth-child(1) { left: 6px; height: 60%; } .wk-twin i:nth-child(2) { left: 30px; height: 100%; border-color: var(--red); } .wk-twin i:nth-child(3) { left: 54px; height: 75%; }
.wk-twin::after { content: ""; position: absolute; left: 0; bottom: 30%; width: 72px; height: 2px; background: rgba(244, 244, 242, .6); }
.wk-twin i:nth-child(2)::after { content: ""; position: absolute; left: 50%; top: -6px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--red); animation: blink 1.4s infinite; }
.wk-ops { display: grid; grid-template-columns: repeat(4, 14px); gap: 4px; align-content: end; }
.wk-ops i { height: 14px; border-radius: 3px; background: rgba(255, 255, 255, .14); }
.wk-ops i:nth-child(3) { background: var(--red); }
.wk-rag i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: rgba(244, 244, 242, .6); }
.wk-rag i:nth-child(1) { left: 4px; top: 30%; } .wk-rag i:nth-child(2) { left: 22px; top: 10%; } .wk-rag i:nth-child(3) { left: 40px; top: 55%; background: var(--red); box-shadow: 0 0 0 5px var(--red-soft); } .wk-rag i:nth-child(4) { left: 60px; top: 22%; } .wk-rag i:nth-child(5) { left: 74px; top: 70%; }
.wk-mob i, .wk-tee i { position: absolute; left: 4px; bottom: 0; width: 30px; height: 100%; border: 1.5px solid rgba(244, 244, 242, .6); border-radius: 7px; }
.wk-mob i::after { content: ""; position: absolute; left: 4px; right: 4px; top: 6px; height: 34%; border-radius: 3px; background: var(--red-bg); }
.wk-tee i { width: 52px; border: 0; background: rgba(244, 244, 242, .75); clip-path: polygon(30% 0, 70% 0, 100% 22%, 86% 40%, 78% 34%, 78% 100%, 22% 100%, 22% 34%, 14% 40%, 0 22%); }
.wk-tee i::after { content: ""; position: absolute; left: 56%; top: 30%; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.wk-cdg { display: flex; align-items: flex-end; gap: 5px; }
.wk-cdg i { width: 12px; background: rgba(244, 244, 242, .6); }
.wk-cdg i:nth-child(1) { height: 100%; } .wk-cdg i:nth-child(2) { height: 60%; background: var(--red); } .wk-cdg i:nth-child(3) { height: 40%; } .wk-cdg i:nth-child(4) { height: 22%; background: #4ade80; }

/* ───────── Telefoni ricostruiti ───────── */
.grid-phone { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.grid-phone .title { font-size: clamp(36px, min(4vw, 7.5vh), 68px); }
.phone-wrap { position: relative; display: grid; place-items: center; }
.phone { position: relative; width: clamp(272px, min(23vw, 39vh), 330px); aspect-ratio: 9 / 19.2; padding: 10px; border-radius: 46px; background: #050506; border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 40px 120px rgba(0, 0, 0, .7), 0 0 90px rgba(230, 60, 46, .08), inset 0 0 0 2px #1b1b1f; user-select: none; }
.ph-notch { position: absolute; left: 50%; top: 18px; z-index: 6; width: 30%; height: 22px; margin-left: -15%; border-radius: 12px; background: #000; }
.ph-screen { position: relative; width: 100%; height: 100%; overflow: hidden; overflow: clip; border-radius: 37px; background: #0c0c0e; font-size: 12px; }
.ph-toast { position: absolute; left: 50%; bottom: -14px; transform: translate(-50%, 10px); max-width: 92%; padding: 9px 14px; border-radius: 8px; background: #fff; color: #0a0a0b; font-size: 12px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .35s, transform .4s var(--ease); pointer-events: none; z-index: 8; }
.ph-toast.show { opacity: 1; transform: translate(-50%, 0); }
.ph-toast b { color: var(--red); }
.mtab { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px 16px; border-top: 1px solid rgba(255, 255, 255, .07); background: rgba(12, 12, 14, .94); backdrop-filter: blur(8px); }
.mtab button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 9.5px; color: var(--dim); transition: color .3s; }
.mtab button i { font-style: normal; font-size: 15px; line-height: 1; }
.mtab button.on { color: #ff6a2b; }
.ctab { grid-template-columns: repeat(3, 1fr); }
.ctab button.on { color: var(--fg); }
.ctab button.on i { color: #a78bfa; }
.mh-sec { display: flex; justify-content: space-between; margin: 14px 0 8px; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.mh-sec span { color: #ff6a2b; letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 10.5px; }

/* app monitoraggio */
.mon .mv { position: absolute; inset: 0; padding: 42px 14px 70px; overflow: hidden; opacity: 0; visibility: hidden; transform: translateX(14px); transition: opacity .3s, transform .4s var(--ease), visibility 0s .4s; }
.mon .mv[data-mv=build], .mon .mv[data-mv=alerts] { overflow-y: auto; scrollbar-width: none; }
.mon .mv::-webkit-scrollbar { display: none; }
.mon .mv.on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s, transform .45s var(--ease), visibility 0s; }
.mh { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.mh b { font-size: 16px; font-weight: 600; }
.mh-logo { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: #ff5a1f; color: #fff; font-size: 13px; }
.mh-av { margin-left: auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #7c3aed, #ff5a1f); font-size: 9.5px; font-weight: 600; }
.mh-tag { margin-left: auto; padding: 2px 8px; border-radius: 10px; background: rgba(255, 255, 255, .08); font-size: 11px; }
.mh-tag.red { background: rgba(239, 68, 68, .2); color: #f87171; }
.mon-hero { padding: 14px; border-radius: 16px; background: radial-gradient(circle at 80% 0, rgba(255, 255, 255, .18), transparent 50%), linear-gradient(140deg, #ff5a1f, #b8320a); box-shadow: 0 14px 40px rgba(255, 90, 31, .25); }
.mon-hero .mono { font-size: 9px; letter-spacing: .08em; text-transform: none; color: rgba(255, 255, 255, .85); }
.mon-hero h5 { margin-top: 6px; font-size: 24px; font-weight: 700; line-height: 1; }
.mon-hero p { font-size: 11px; color: rgba(255, 255, 255, .85); margin-top: 3px; }
.mon-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.mon-stats div { padding: 7px 4px; border-radius: 9px; background: rgba(255, 255, 255, .16); text-align: center; }
.mon-stats b { display: block; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mon-stats small { font-size: 8px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.mon-qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mon-qa button { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); }
.mon-qa i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--c); color: #fff; font-style: normal; font-size: 17px; transition: transform .25s var(--ease); }
.mon-qa button:active i, .mon-qa button.tap i { transform: scale(.88); }
.mon-al { display: flex; flex-direction: column; gap: 6px; }
.mon-al li { display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; align-items: center; padding: 9px 10px; border-radius: 12px; background: #16161a; border: 1px solid rgba(255, 255, 255, .05); animation: pop .4s var(--ease) both; transition: opacity .4s, transform .4s; }
.mon-al li i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 12px; background: rgba(234, 179, 8, .15); color: #eab308; }
.mon-al li.r i { background: rgba(239, 68, 68, .15); color: #ef4444; }
.mon-al li.b i { background: rgba(59, 130, 246, .15); color: #3b82f6; }
.mon-al b { display: block; font-size: 11.5px; font-weight: 600; }
.mon-al small { font-size: 10px; color: var(--dim); }
.mon-al time { font-size: 9.5px; color: var(--dim); }
.mon-al.full li { grid-template-columns: 28px 1fr auto; }
.mon-al .fix { padding: 4px 8px; border-radius: 7px; background: rgba(255, 255, 255, .08); font-size: 10px; }
.mon-al li.gone { opacity: 0; transform: translateX(30px); }
.mon-bl { display: flex; flex-direction: column; gap: 8px; }
.mon-bl li { position: relative; padding: 12px; border-radius: 14px; overflow: hidden; background: #16161a; border: 1px solid rgba(255, 255, 255, .05); animation: pop .4s var(--ease) both; }
.mon-bl li::before { display: none; content: ""; position: absolute; right: -10px; top: -10px; width: 90px; height: 90px; opacity: .25; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 2px, transparent 2px 9px), linear-gradient(transparent 0, transparent 100%); clip-path: polygon(30% 100%, 30% 20%, 60% 0, 60% 100%, 70% 100%, 70% 40%, 100% 40%, 100% 100%); }
.mon-bl b { font-size: 12.5px; font-weight: 600; }
.mon-bl small { display: block; margin-top: 2px; font-size: 10px; color: var(--dim); }
.mon-bl .st { display: flex; gap: 10px; margin-top: 8px; font-size: 10px; color: var(--muted); }
.mon-bl .st i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #22c55e; }
.mon-bl .st i.w { background: #eab308; }
.mon-bl .lvl { display: block; height: 3px; margin-top: 8px; border-radius: 2px; background: rgba(255, 255, 255, .07); }
.mon-bl .lvl i { display: block; height: 100%; border-radius: 2px; background: #ff5a1f; width: var(--w); }
.ar-cam { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #2a2a30, #0c0c0e 75%); }
.ar-grid { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; transform: perspective(300px) rotateX(62deg); background-image: linear-gradient(rgba(255, 106, 43, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 106, 43, .35) 1px, transparent 1px); background-size: 28px 28px; animation: argrid 4s linear infinite; }
@keyframes argrid { to { background-position: 0 28px; } }
.ar-pipe { position: absolute; height: 14px; border-radius: 7px; background: linear-gradient(#5b5b63, #2b2b31); }
.ar-pipe.p1 { left: -10%; right: 20%; top: 30%; }
.ar-pipe.p2 { left: 55%; top: 30%; width: 14px; height: 40%; background: linear-gradient(90deg, #5b5b63, #2b2b31); }
.ar-box { position: absolute; left: 12%; top: 46%; width: 44%; height: 22%; border-radius: 6px; background: linear-gradient(#45454c, #26262b); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.ar-tag { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -100%) scale(.6); padding: 5px 8px; border-radius: 8px; background: rgba(12, 12, 14, .85); border: 1px solid rgba(255, 106, 43, .7); font-size: 9.5px; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity .4s, transform .5s var(--ease); }
.ar-tag b { display: block; font-size: 12px; color: #fff; }
.ar-tag::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 1px; height: 12px; background: rgba(255, 106, 43, .7); }
.ar-tag.warn { border-color: #ef4444; }
.ar-tag.warn b { color: #f87171; }
.mv.on .ar-tag { opacity: 1; transform: translate(-50%, -100%); }
.mv.on .ar-tag:nth-of-type(1) { transition-delay: .5s; } .mv.on .ar-tag:nth-of-type(2) { transition-delay: .9s; } .mv.on .ar-tag:nth-of-type(3) { transition-delay: 1.3s; }
.ar-ret { position: absolute; left: 50%; top: 45%; width: 70px; height: 70px; margin: -35px; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 12px; animation: arret 2.4s ease-in-out infinite; }
@keyframes arret { 50% { transform: scale(1.18); opacity: .5; } }
.ar-cap { position: absolute; left: 0; right: 0; bottom: 74px; text-align: center; font-size: 9px; color: rgba(255, 255, 255, .7); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 10px 16px 24px; border-radius: 22px 22px 0 0; background: #18181c; border-top: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 -20px 50px rgba(0, 0, 0, .6); transform: translateY(105%); transition: transform .5s var(--ease); }
.sheet.on { transform: none; }
.sh-grab { width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: rgba(255, 255, 255, .2); cursor: pointer; }
.sh-body h6 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.sh-body h6 i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-style: normal; font-size: 13px; color: #fff; }
.sh-body p { margin-top: 4px; font-size: 10.5px; color: var(--dim); }
.sh-big { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.sh-big b { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-big small { font-size: 11px; color: var(--dim); }
.sh-body canvas { width: 100%; height: 70px; display: block; margin-top: 8px; }
.sh-ctl { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.sh-ctl button { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .08); font-size: 16px; }
.sh-ctl .range { flex: 1; --p: 50%; background: linear-gradient(to right, #ff5a1f var(--p), rgba(255, 255, 255, .12) var(--p)); }
.sh-ctl .range::-webkit-slider-thumb { border-color: #ff5a1f; }
.sh-chk { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.sh-chk li { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, .04); font-size: 11px; }
.sh-chk li span { color: #4ade80; }
.sh-chk li span.w { color: #eab308; }

/* app controllo di gestione */
.cdg .ph-screen { background: #0b0b0f; }
.ch { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 40px 14px 10px; background: linear-gradient(#0b0b0f 70%, rgba(11, 11, 15, 0)); }
.ch b { font-size: 13.5px; font-weight: 600; }
.ch-per { padding: 4px 9px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); font-size: 9.5px; color: var(--muted); }
.cv { position: absolute; inset: 0; padding: 78px 12px 74px; overflow-y: auto; scrollbar-width: none; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s, transform .4s var(--ease), visibility 0s .4s; }
.cv::-webkit-scrollbar { display: none; }
.cv.on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s, transform .45s var(--ease), visibility 0s; }
.cv h5 { font-size: 17px; font-weight: 600; margin-top: 4px; }
.cv-sub { margin: 3px 0 10px; font-size: 10.5px; line-height: 1.45; color: var(--dim); }
.seg3 { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 20px; background: rgba(255, 255, 255, .06); margin-bottom: 10px; }
.seg3 button { position: relative; z-index: 1; padding: 6px 0; font-size: 11px; color: var(--muted); transition: color .3s; }
.seg3 button.on { color: #0a0a0b; font-weight: 600; }
.seg3 i { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) / 3); border-radius: 17px; background: #fff; transform: translateX(calc(var(--k, 0) * 100%)); transition: transform .45s var(--ease); }
.ce-h { display: grid; grid-template-columns: 1fr 78px 44px; padding: 6px 8px; font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.ce-h span:not(:first-child) { text-align: right; }
.ce li { display: grid; grid-template-columns: 1fr 78px 44px; gap: 0 4px; padding: 9px 8px; border-top: 1px solid rgba(255, 255, 255, .06); cursor: pointer; }
.ce li .n { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.ce li .n i { width: 6px; height: 6px; border-radius: 2px; background: #a78bfa; flex: none; }
.ce li .n i.y { background: #eab308; }
.ce li .v { text-align: right; font-family: var(--mono); font-size: 10.5px; font-variant-numeric: tabular-nums; transition: color .4s; }
.ce li .p { text-align: right; font-family: var(--mono); font-size: 9px; color: var(--dim); }
.ce li small { grid-column: 1 / 4; max-height: 0; overflow: hidden; font-size: 9.5px; line-height: 1.4; color: var(--dim); transition: max-height .4s var(--ease), margin .4s; }
.ce li.open small, .ce li.m small { max-height: 60px; margin-top: 3px; }
.ce li small u { text-decoration: none; color: #a78bfa; }
.ce li.m { background: rgba(124, 58, 237, .12); }
.ce li.m .n { color: #c4b5fd; font-weight: 600; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; }
.ce li.m .v { color: #4ade80; font-weight: 500; }
.ce li .v.cost { color: var(--muted); }
.ce li .n { min-width: 0; }
.cash-fl .r small { color: var(--dim); font-size: 9.5px; }
.ce li .v.flash { animation: flash .8s; }
@keyframes flash { 30% { color: #fff; text-shadow: 0 0 12px rgba(255, 255, 255, .6); } }
.ce li .adj { display: block; font-size: 8.5px; color: #eab308; }
.cash-hero { padding: 14px; border-radius: 16px; border: 1px solid rgba(45, 212, 191, .25); background: radial-gradient(circle at 50% 0, rgba(45, 212, 191, .16), transparent 70%), #0f1414; }
.cash-hero .mono { font-size: 8.5px; color: #5eead4; }
.cash-n { display: block; margin-top: 6px; font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cash-chips { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cash-chips .up { padding: 3px 7px; border-radius: 8px; background: rgba(74, 222, 128, .14); color: #4ade80; font-family: var(--mono); font-size: 9.5px; }
.cash-chips small { font-size: 9.5px; color: var(--dim); }
.cash-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.cash-kpi div { padding: 8px; border-radius: 10px; background: rgba(0, 0, 0, .35); }
.cash-kpi b { display: block; font-family: var(--mono); font-size: 12.5px; font-weight: 500; }
.cash-kpi small { font-size: 8.5px; color: var(--dim); }
.red { color: #f87171; } .grn { color: #4ade80; }
.cash-fl { display: flex; flex-direction: column; gap: 4px; }
.cash-fl li { padding: 9px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.cash-fl li.tot { background: rgba(255, 255, 255, .06); }
.cash-fl .r { display: flex; justify-content: space-between; font-size: 11px; }
.cash-fl .r b { font-family: var(--mono); font-weight: 500; font-size: 10.5px; }
.cash-fl .t { height: 5px; margin-top: 6px; border-radius: 3px; background: rgba(255, 255, 255, .05); }
.cash-fl .t i { display: block; height: 100%; width: 0; border-radius: 3px; transition: width 1s var(--ease); }
.cv.in .cash-fl .t i { width: var(--w); }
.sp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .03); }
.sp-c { text-align: center; }
.sp-c small { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: #a78bfa; }
.sp-c[data-s=p] small { color: #eab308; }
.sp-c > b { display: block; margin: 2px 0 8px; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.sp-bar { height: 150px; display: flex; flex-direction: column-reverse; gap: 2px; }
.sp-bar i { display: block; height: 0; border-radius: 3px; background: var(--c); transition: height .9s var(--ease); cursor: pointer; }
.sp-bar i.hl { outline: 2px solid #fff; outline-offset: -2px; }
.cv.in .sp-bar i { height: var(--h); }
.sp-ok { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; font-size: 10px; color: var(--muted); }
.sp-ok i { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }
.sp-list li { display: grid; grid-template-columns: 4px 1fr auto; gap: 10px; align-items: center; padding: 9px 4px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 11.5px; cursor: pointer; transition: background .3s; }
.sp-list li i { height: 22px; border-radius: 2px; background: var(--c); }
.sp-list li small { display: block; font-size: 9.5px; color: var(--dim); }
.sp-list li b { font-family: var(--mono); font-size: 10.5px; font-weight: 500; }
.sp-list li.hl { background: rgba(255, 255, 255, .05); }

/* ───────── Configuratore 3D ───────── */
.s-tee .twin-ui { grid-template-columns: minmax(0, 1fr) 320px; }
.tee-panel { background: #0f0f11; position: relative; z-index: 3; }
.tee-sec { padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.tee-sec small { display: block; margin-bottom: 8px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.sw { display: flex; gap: 8px; }
.sw button { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); transition: transform .25s var(--ease), box-shadow .25s; }
.sw button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); transform: scale(1.06); }
.patches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.patches button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px 7px; border-radius: 6px; border: 1px solid var(--line); background: #141417; font-size: 10.5px; color: var(--muted); transition: border-color .25s, background .25s, color .25s; }
.patches button img { width: 30px; height: 30px; display: block; }
.patches button.on { color: var(--fg); }
.ph-screen button:focus, .ph-screen button:focus-visible { outline: none; }
.mon-more { margin-top: 10px; text-align: center; font-size: 10.5px; color: var(--dim); }
.patches button.on { border-color: rgba(244, 244, 242, .6); background: #1c1c20; }
.tee-buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tee-buy small { display: block; font-size: 10px; color: var(--dim); }
.tee-buy b { font-family: var(--mono); font-size: 18px; font-weight: 500; }
.tee-cart { padding: 10px 14px; background: var(--red-bg); color: #fff; font-size: 12.5px; font-weight: 500; transition: background .3s; }
.tee-cart:hover { background: var(--red-bg-h); }
.s-tee::after { background: linear-gradient(90deg, rgba(10, 10, 11, .9) 0%, rgba(10, 10, 11, .5) 28%, rgba(10, 10, 11, 0) 46%); }

/* ───────── Close ───────── */
.s-close .kicker { margin-bottom: 14px; }
.contacts .mono { font-size: 10.5px; }

/* ───────── Responsive ───────── */
@media (max-height: 820px) and (min-width: 981px) {
  .qq { font-size: 15px; } .qa-r { font-size: 13.5px; }
  .xp-txt p { font-size: 13.5px; }
  .ai-card > p { font-size: 12.5px; line-height: 1.45; }
  .works p { display: none; }
}
@media (max-width: 1180px) and (min-width: 981px) {
  .svc-pane { grid-template-columns: 1fr; grid-template-rows: 150px 1fr; }
  .xp-pane { grid-template-columns: 1fr; grid-template-rows: 170px 1fr; }
}
@media (max-width: 980px) {
  .hero-svc li { font-size: 13px; padding: 8px 11px; }
  .svc, .xp { grid-template-columns: 1fr; }
  .svc-tabs, .xp-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .svc-tabs::-webkit-scrollbar, .xp-tabs::-webkit-scrollbar { display: none; }
  .svc-tabs button { flex: none; width: 46%; border-bottom: 0; border-right: 1px solid var(--line); }
  .svc-tabs b { font-size: 19px; }
  .xp-tabs button { flex: none; white-space: nowrap; border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, .06); }
  .xp-tabs button::after { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 2px; transform: scaleX(0); }
  .xp-tabs button.on::after { transform: none; }
  .svc-panes, .xp-body { min-height: 0; display: grid; }
  .svc-pane, .xp-pane { position: relative; inset: auto; grid-area: 1 / 1; grid-template-columns: 1fr; grid-template-rows: 190px auto; }
  .deep-head { grid-template-columns: 1fr; gap: 12px; }
  .aic, .works { grid-template-columns: 1fr; }
  .ai-card .ex { margin-top: 4px; }
  .works li { padding: 16px; }
  .wk-i { display: none; }
  .grid-phone { grid-template-columns: 1fr; }
  .phone { width: min(300px, 82vw); }
  .phone-wrap { padding-bottom: 20px; }
  .s-tee .twin-ui { grid-template-columns: 1fr; }
  .s-tee::after { background: none; }
}
@media (max-width: 560px) {
  .svc-tabs button { width: 62%; }
  .vis-og { grid-template-columns: 1fr 24px 1fr; padding: 10px; }
}


/* ───────── Mobile: la demo prima del testo, niente spazi vuoti ───────── */
@media (max-width: 980px) {
  .svc-pane:not(.on), .xp-pane:not(.on) { display: none; }
  .svc-pane, .xp-pane { grid-template-rows: 200px auto; gap: 16px; padding: 16px; }
  .svc { margin-top: 18px; }

  /* case study con app/telefono: titolo → demo → problema/soluzione/risultato */
  .grid-phone, .grid-app { gap: 0; }
  .grid-phone > div:first-child, .grid-app > div:first-child { display: contents; }
  .grid-phone > div > .kicker, .grid-app > div > .kicker { order: 1; }
  .grid-phone > div > .title, .grid-app > div > .title { order: 2; }
  .grid-phone > .phone-wrap, .grid-app > .app { order: 3; margin: 26px 0 8px; }
  .grid-phone > div > .psr, .grid-app > div > .psr { order: 4; margin-top: 18px; }
  .grid-phone > div > .fine, .grid-app > div > .fine { order: 5; }
  .grid-phone .swipe-hint, .grid-app .swipe-hint { order: 6; }
  .phone { width: min(290px, 76vw, calc((100svh - 170px) / 2.13)); }
  .ph-toast { white-space: normal; text-align: center; width: max-content; max-width: 86vw; }

  /* slide 3D: titolo → modello → pannello → testo */
  .s-3d .twin-head { display: contents; }
  .s-3d .twin-head > * { margin-left: var(--pad); margin-right: var(--pad); max-width: none; }
  .s-3d .twin-head > .kicker { order: 1; margin-top: calc(var(--pad) + 24px); }
  .s-3d .twin-head > .title { order: 2; }
  .s-3d .twin-head > .seg { order: 3; align-self: flex-start; margin-top: 16px; }
  .s-3d .twin-stage { order: 4; }
  .s-3d .twin-panel { order: 5; }
  .s-3d .twin-head > .lead, .s-3d .twin-head > .psr { order: 6; margin-top: 26px; }
  .s-3d .twin-bottom { order: 7; padding-top: 18px !important; }
  .s-3d .swipe-hint { order: 8; margin-top: -100px; }
  .s-tee .twin-stage { height: 54vh; min-height: 340px; }
  .s-rag .twin-stage { height: 44vh; min-height: 280px; }

  /* configuratore compatto */
  .tee-sec { padding: 10px 14px; }
  .tee-sec small { margin-bottom: 6px; }
  .patches { grid-template-columns: repeat(6, 1fr); }
  .patches button { font-size: 0; gap: 0; padding: 6px 2px; }
  .patches button img { width: 26px; height: 26px; }
  .tee-buy { padding: 10px 14px; }

  /* AI: carosello orizzontale */
  .aic { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: none; border: 0; margin: 20px calc(-1 * var(--pad)) 0; padding: 0 var(--pad) 4px; }
  .aic::-webkit-scrollbar { display: none; }
  .ai-card { flex: 0 0 86%; scroll-snap-align: center; border: 1px solid var(--line); }

  /* portfolio: griglia 2×3 compatta */
  .works { grid-template-columns: 1fr 1fr; }
  .works li { padding: 14px 12px; gap: 6px; }
  .works p { display: none; }
  .works h3 { font-size: 19px; }
  .works li::after { right: 10px; top: 12px; font-size: 11px; }
  .wk-i { display: block; height: 32px; margin-bottom: 2px; transform: scale(.75); transform-origin: left bottom; }
}


/* ───────── Barre orizzontali: si vede che scorrono ───────── */
.hs-arrow { display: none; }
@media (max-width: 980px) {
  .svc-tabs, .xp-tabs, .aic { --fl: 0px; --fr: 0px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); transition: --fl .3s, --fr .3s; }
  .hs-l { --fl: 44px; }
  .hs-r { --fr: 56px; }
  .hs-arrow { position: absolute; z-index: 4; display: flex; align-items: center; width: 44px; padding: 0 6px; pointer-events: none; opacity: 0; transition: opacity .3s; }
  .hs-arrow.r { right: 0; justify-content: flex-end; }
  .hs-arrow.l { left: 0; justify-content: flex-start; }
  .hs-arrow.on { opacity: 1; pointer-events: auto; }
  .hs-arrow span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 10, 11, .85); border: 1px solid rgba(255, 255, 255, .25); color: var(--fg); font-size: 13px; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
  .hs-arrow.r.on span { animation: hsnudge 1.6s ease-in-out infinite; }
  .s-ai .wrap { position: relative; }
  .aic-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
  .aic-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); transition: width .3s, background .3s; }
  .aic-dots i.on { width: 18px; background: var(--red); }
}
.aic-dots:not(:empty) { display: none; }
@media (max-width: 980px) { .aic-dots:not(:empty) { display: flex; } }
@keyframes hsnudge { 50% { transform: translateX(3px); } }
@property --fl { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --fr { syntax: '<length>'; inherits: false; initial-value: 0px; }


/* ───────── HubWater ───────── */
.hw .ph-screen { background: #071016; }
.hv { position: absolute; inset: 0; padding: 42px 14px 74px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; opacity: 0; visibility: hidden; transform: translateX(14px); transition: opacity .3s, transform .4s var(--ease), visibility 0s .4s; }
.hv.on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s, transform .45s var(--ease), visibility 0s; }
.hh { display: flex; align-items: center; justify-content: space-between; }
.hh b { font-size: 17px; font-weight: 600; }
.hh-tag { padding: 3px 9px; border-radius: 10px; background: rgba(56, 189, 248, .14); color: #7dd3fc; font-size: 10px; }
.hh-tag.nfc { font-family: var(--mono); letter-spacing: .1em; }
.htab { grid-template-columns: repeat(3, 1fr); background: rgba(7, 16, 22, .94); }
.htab button.on { color: #38bdf8; }
.hw-map { position: relative; flex: 1; min-height: 0; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 30% 20%, #0f2633, #0a1820 70%); border: 1px solid rgba(56, 189, 248, .14); }
.hw-map .road { position: absolute; background: rgba(148, 197, 220, .12); }
.hw-map .r1 { left: -10%; right: -10%; top: 40%; height: 7px; transform: rotate(-12deg); }
.hw-map .r2 { top: -10%; bottom: -10%; left: 40%; width: 6px; transform: rotate(8deg); }
.hw-map .r3 { left: 10%; right: -10%; top: 74%; height: 4px; transform: rotate(18deg); }
.hw-map .park { position: absolute; left: 62%; top: 8%; width: 30%; height: 22%; border-radius: 10px; background: rgba(34, 197, 94, .1); }
.hw-map .me { position: absolute; left: 40%; top: 46%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(255, 255, 255, .18); }
.hw-map .pin { position: absolute; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 0 4px rgba(56, 189, 248, .18); animation: pop .5s var(--ease) both; transition: transform .4s var(--ease), box-shadow .4s; }
.hw-map .pin.near { background: #22d3ee; }
.hw-map .pin.near.pick { transform: scale(1.6); box-shadow: 0 0 0 8px rgba(34, 211, 238, .25); }
.hw-near { padding: 12px; border-radius: 14px; background: #0e1d26; border: 1px solid rgba(56, 189, 248, .16); display: grid; gap: 2px; }
.hw-near .mono { font-size: 8.5px; color: #7dd3fc; }
.hw-near b { font-size: 13px; font-weight: 600; }
.hw-near small { font-size: 10px; color: var(--dim); }
.hw-go { margin-top: 8px; padding: 9px; border-radius: 10px; background: #0ea5e9; color: #fff; font-size: 12px; font-weight: 600; }
.hw-nfc { position: relative; height: 112px; display: grid; place-items: center; border-radius: 16px; background: #0e1d26; border: 1px solid rgba(56, 189, 248, .14); cursor: pointer; overflow: hidden; }
.hw-bottle { position: relative; width: 26px; height: 66px; border-radius: 8px 8px 6px 6px; border: 2px solid #cbd5e1; overflow: hidden; transform: translateY(-8px); transition: transform .8s var(--ease); }
.hw-bottle::before { content: ""; position: absolute; left: 6px; right: 6px; top: -2px; height: 6px; background: #cbd5e1; border-radius: 2px; }
.hw-bottle i { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(#38bdf8, #0284c7); transition: height .8s var(--ease); }
.hw-nfc .w { position: absolute; left: 50%; top: 44%; width: 40px; height: 40px; margin: -20px; border-radius: 50%; border: 1.5px solid #38bdf8; opacity: 0; }
.hw-nfc.tap .hw-bottle { transform: translateY(4px) scale(.94); }
.hw-nfc.tap .w { animation: nfcw 1.2s ease-out infinite; }
.hw-nfc.tap .w2 { animation-delay: .3s; } .hw-nfc.tap .w3 { animation-delay: .6s; }
@keyframes nfcw { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(2.4); } }
.hw-nfc-t { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--dim); }
.hw-nfc.ok { border-color: rgba(34, 197, 94, .4); }
.hw-nfc.ok .hw-nfc-t { color: #4ade80; }
.hw-ring { position: relative; width: 134px; height: 134px; margin: 2px auto 0; }
.hw-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hw-ring circle { fill: none; stroke-width: 10; }
.hw-ring .bg { stroke: rgba(255, 255, 255, .07); }
.hw-ring .fg { stroke: #38bdf8; stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.hw-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.hw-ring b { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hw-ring small { font-size: 10px; color: var(--dim); }
.hw-sub { text-align: center; font-size: 9.5px; color: var(--dim); }
.hw-refill { padding: 10px; border-radius: 12px; background: rgba(56, 189, 248, .14); border: 1px solid rgba(56, 189, 248, .35); color: #7dd3fc; font-size: 12px; font-weight: 600; }
.hw-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hw-kpi div { padding: 12px 10px; border-radius: 14px; background: linear-gradient(150deg, #0c4a6e, #082f49); }
.hw-kpi b { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hw-kpi small { font-size: 9.5px; line-height: 1.3; color: #bae6fd; }
.hw-bars { flex: 1; min-height: 0; display: flex; align-items: flex-end; gap: 6px; padding: 10px; border-radius: 14px; background: #0e1d26; }
.hw-bars div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.hw-bars span { width: 100%; height: 0; border-radius: 4px 4px 0 0; background: linear-gradient(to top, rgba(56, 189, 248, .3), #38bdf8); transition: height 1s var(--ease); transition-delay: calc(var(--i) * 80ms); }
.hw-bars.in span { height: var(--h); }
.hw-bars em { font-style: normal; font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
.hw-bars small { font-size: 9px; color: var(--dim); }
.hw-report { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; border-radius: 12px; background: #0e1d26; border: 1px solid rgba(56, 189, 248, .2); font-size: 11px; color: var(--muted); }
.hw-report b { color: #38bdf8; font-family: var(--mono); font-size: 10.5px; font-weight: 500; }
.s-hw .ph-toast b { color: #0284c7; }
.wk-hw i { position: absolute; left: 6px; bottom: 0; width: 22px; height: 100%; border: 1.5px solid rgba(244, 244, 242, .6); border-radius: 6px 6px 5px 5px; overflow: hidden; }
.wk-hw i::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: #38bdf8; }
.wk-hw i::before { content: ""; position: absolute; left: 4px; right: 4px; top: -1px; height: 4px; background: rgba(244, 244, 242, .6); }

/* portfolio a 7: il primo occupa due colonne */
.works { grid-template-columns: repeat(4, 1fr); }
.works li.wide { grid-column: span 2; }
@media (max-width: 1180px) and (min-width: 981px) { .works p { display: none; } }
@media (max-width: 980px) { .works { grid-template-columns: 1fr 1fr; } }
