/* 2G Sistemi · Modello B «immersivo»: una scena di luce a tutta pagina, testi su vetro appena accennato.
   Tema scuro principale (notte blu 2G profonda), tema chiaro = la stessa scena di giorno.
   Solo i colori del marchio: blu 2G (#234F7E) per la struttura, verde 2G (#60BF57) per la vita e i segnali. */
@font-face { font-family: Inter; src: url(../fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Sora; src: url(../fonts/sora.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: dark;
  --pillola: linear-gradient(90deg, #234F7E 0%, #2C6DA0 45%, #3E9A34 100%);
  --blu: #234F7E; --verde2g: #60BF57;
  --fondo: #0A1D36; --fondo-rgb: 10, 29, 54;
  --testo: #F0F5FB; --tenue: #B3C4DA; --tenue2: #8399B5;
  --verde: #6CC760; --verde-t: #8FDD82;
  --caldo: #2C6DAD; --caldo-t: #A9CDF2; --caldo-scuro: #FFFFFF; --caldo-alone: rgba(60, 130, 200, .42);
  --bottone-caldo: linear-gradient(135deg, #3478BD, #1E5893);
  --rosso: #F07B72;
  --vetro: linear-gradient(160deg, rgba(16, 46, 84, .74), rgba(10, 29, 54, .62));
  --vetro-forte: rgba(10, 29, 54, .9);
  --bordo: rgba(150, 190, 240, .16); --bordo-forte: rgba(150, 190, 240, .3);
  --fascia: linear-gradient(100deg, #234F7E, #1E5893);
  --fascia-vetro: linear-gradient(100deg, rgba(35, 79, 126, .78), rgba(30, 88, 147, .7));
  --fascia-bordo: rgba(140, 190, 240, .4);
  --titolo-caldo: linear-gradient(95deg, #C2EEB8, #7FD173 70%);
  --mini-a: #FFFFFF; --mini-ok: #8FE07F;
  --ombra: 0 30px 80px -30px rgba(2, 10, 24, .6);
}
:root[data-theme="light"] {
  color-scheme: light;
  --fondo: #EEF3F8; --fondo-rgb: 238, 243, 248;
  --testo: #0B1A30; --tenue: #3E4E66; --tenue2: #5A6A82;
  --verde: #2F8F3A; --verde-t: #23762E;
  --caldo: #234F7E; --caldo-t: #234F7E; --caldo-scuro: #FFFFFF; --caldo-alone: rgba(35, 79, 126, .32);
  --bottone-caldo: linear-gradient(135deg, #1E5893, #234F7E);
  --rosso: #B4302A;
  --vetro: linear-gradient(160deg, rgba(255, 255, 255, .84), rgba(246, 249, 252, .7));
  --vetro-forte: rgba(255, 255, 255, .92);
  --bordo: rgba(35, 79, 126, .13); --bordo-forte: rgba(35, 79, 126, .26);
  --fascia: linear-gradient(100deg, #234F7E, #1E5893);
  --fascia-bordo: rgba(35, 79, 126, .5);
  --titolo-caldo: linear-gradient(95deg, #3E9A34, #2F7D27 70%);
  --ombra: 0 30px 70px -34px rgba(35, 79, 126, .32);
}
/* dentro le parti dell'assistenza (blu 2G pieno) il testo è bianco e gli accenti verdi */
.fascia, .carta-calda {
  --testo: #FFFFFF; --tenue: #D5E3F3; --tenue2: #B7CBE2; --caldo-t: #B5F0A8; --fascia-bordo: rgba(255, 255, 255, .38);
  --bottone-caldo: #FFFFFF; --caldo-scuro: #234F7E; color: #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.fermo { scroll-behavior: auto; }
body { margin: 0; background: var(--fondo); color: var(--testo); font: 400 17px/1.6 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: Sora, Inter, sans-serif; margin: 0; letter-spacing: -.025em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--caldo); outline-offset: 3px; border-radius: 6px; }
.salta { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--caldo); color: var(--caldo-scuro); font-weight: 650; }
.salta:focus { top: 12px; }

/* ---- la scena ---- */
.scena { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: none; }
html.gl .scena { display: block; }
.scena-ferma { position: fixed; inset: 0; z-index: 0; background: #050A14 url(../img/scena-scura.jpg) 70% 40% / cover no-repeat; }
html.gl .scena-ferma { display: none; }
:root[data-theme="light"] .scena-ferma { background: #EEF2F6 url(../img/scena-chiara.jpg) 70% 40% / cover no-repeat; }
.velo { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 70% 45%, transparent 55%, rgba(var(--fondo-rgb), .55)); }

/* ---- barra in alto: come il sito di oggi, trasparente sulla scena con il logo originale; scorrendo diventa vetro scuro ---- */
.barra { position: fixed; inset: 0 0 auto; z-index: 30; background: linear-gradient(rgba(10, 29, 54, .28), rgba(10, 29, 54, 0)); border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s; --testo: #F0F5FB; --tenue: #D3DEEC; color: #F0F5FB; }
html.scorsa .barra { background: rgba(10, 29, 54, .72); border-bottom-color: rgba(150, 190, 240, .14); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { html.scorsa .barra { background: rgba(10, 29, 54, .94); } }
:root[data-theme="light"] .barra { background: linear-gradient(rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); --testo: #0B1A30; --tenue: #234F7E; color: #0B1A30; }
:root[data-theme="light"] html.scorsa .barra, html.scorsa:root[data-theme="light"] .barra { background: rgba(255, 255, 255, .86); border-bottom-color: rgba(35, 79, 126, .14); }
.barra-g { display: flex; align-items: center; gap: 22px; height: 106px; padding: 0 max(24px, 5.2vw); max-width: 1600px; margin: 0 auto; }
/* il logo originale, intero, in una targhetta bianca a pillola: stesso margine sinistro dei contenuti a ogni larghezza */
.marchio { display: inline-flex; flex: none; align-items: center; background: #FFFFFF; border-radius: 999px; padding: 7px 20px 7px 12px; box-shadow: 0 6px 22px -12px rgba(2, 10, 24, .55); }
.marchio img { height: 76px; width: auto; }
@media (min-width: 2000px) { .barra-g { height: 120px; } .marchio img { height: 88px; } }
.menu { display: flex; gap: 26px; margin-right: auto; margin-left: 18px; font-size: .96rem; }
.menu a { color: var(--tenue); font-weight: 500; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--testo); border-bottom-color: #60BF57; }
.barra-azioni { display: flex; align-items: center; gap: 10px; }
.barra .btn.vetro { background: rgba(255, 255, 255, .06); color: var(--testo); border-color: rgba(200, 220, 245, .35); }
.barra .stato { color: var(--tenue); }
.barra .stato.aperto .stato-t b { color: #8FDD82; }
:root[data-theme="light"] .barra .stato.aperto .stato-t b { color: #2F7D27; }
.tema { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(200, 220, 245, .35); background: transparent; color: var(--testo); cursor: pointer; display: grid; place-items: center; }
.tema-i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset -5px -3px 0 0 var(--testo); }
:root[data-theme="light"] .tema-i { box-shadow: none; background: #60BF57; outline: 2px dotted #60BF57; outline-offset: 2px; }

/* ---- caricamento: è l'inizio della scena; i testi entrano quando l'esagono si apre ---- */
.tappe { transition: opacity .7s ease .1s; }
html.carica .barra { opacity: 0; transform: translateY(-36px); pointer-events: none; }
html.carica .eroe-testo { opacity: 0; transform: translateX(-80px); }
html.carica .fascia { opacity: 0; transform: translateY(60px); pointer-events: none; }
html.carica .tappe, html.carica .tasti-tel, html.carica .filo-titolo { opacity: 0; pointer-events: none; }
html.carica main > section:not(.eroe) { visibility: hidden; }
/* l'interfaccia entra dai bordi verso il centro, con lo stesso respiro del corridoio, e si ferma insieme */
html.entrata .barra, html.entrata .eroe-testo, html.entrata .fascia { transition: opacity 1.3s ease, transform 1.5s cubic-bezier(.16, .8, .24, 1); }

/* ---- PC e telefono: l'assistenza remota serve a chi è al computer; sul telefono si chiama ---- */
.solo-tel { display: none !important; }
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .solo-pc { display: none !important; }
  .btn.solo-tel { display: inline-flex !important; }
  p.solo-tel, svg.solo-tel { display: block !important; }
}
.nota-tel { color: var(--tenue); font-size: .86rem; margin-top: 4px; }
.mini .m-cornetta { stroke: var(--mini-a); fill: none; }
.mini .m-onda { stroke: var(--mini-ok); opacity: 0; animation: onda 2.4s ease-out infinite; }
.mini .m-onda.o2 { animation-delay: .4s; }
@keyframes onda { 0% { opacity: 0; } 25% { opacity: 1; } 70%, 100% { opacity: 0; } }
.mini-tel .m-ok { animation: ok 7.5s infinite; }


/* ---- la targhetta del logo è viva: vetro bianco lattiginoso, bordo blu→verde, un riflesso lento, i nodi che respirano ---- */
.barra .marchio { position: relative; overflow: visible; border: 1.5px solid transparent;
  background: radial-gradient(120% 140% at 50% 50%, #FFFFFF 55%, #EEF5FC 100%) padding-box, linear-gradient(90deg, rgba(35, 79, 126, .9), rgba(96, 191, 87, .9)) border-box;
  box-shadow: 0 6px 22px -12px rgba(2, 10, 24, .55), inset 0 0 14px rgba(200, 225, 250, .55); transition: transform .4s ease, opacity .6s ease, box-shadow .6s; transform-origin: left center; }
.barra .marchio::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .0) 40%, rgba(190, 225, 255, .55) 50%, rgba(255, 255, 255, 0) 60%, transparent 65%) no-repeat;
  background-size: 250% 100%; background-position: 160% 0; animation: riflesso 9s ease-in-out 2.5s infinite; mix-blend-mode: multiply; opacity: .55; }
@keyframes riflesso { 0% { background-position: 160% 0; } 14%, 100% { background-position: -60% 0; } }
html.scorsa .barra .marchio { transform: scale(.78); }
html.scorsa .barra-g { height: 78px; }
.barra-g { transition: height .35s ease; }
.logo-box { position: relative; display: block; }
.logo-box img { position: relative; z-index: 1; }
.nodo-luce { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0, rgba(140, 235, 130, .55) 45%, rgba(140, 235, 130, 0) 70%); opacity: .35; animation: respiro 3.6s ease-in-out infinite; }
.nodo-luce.n0 { left: 14.5%; top: 17%; animation-delay: 0.0s; }
.nodo-luce.n1 { left: 21.5%; top: 34%; animation-delay: 0.9s; }
.nodo-luce.n2 { left: 4.6%; top: 63%; animation-delay: 1.8s; }
.nodo-luce.n3 { left: 23%; top: 66%; animation-delay: 2.7s; }
@keyframes respiro { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: .85; transform: scale(1.25); } }
.filo-logo { position: absolute; height: 1.5px; width: 0; border-radius: 2px; transform-origin: 0 50%; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(160, 240, 150, .95), rgba(120, 210, 120, .5) 60%, rgba(120, 210, 120, 0)); box-shadow: 0 0 6px rgba(143, 224, 127, .6);
  transition: width .8s ease, opacity .8s ease; }
.filo-logo.f0 { left: 14.5%; top: 17%; transform: rotate(-112deg); }
.filo-logo.f1 { left: 21.5%; top: 34%; transform: rotate(-150deg); }
.filo-logo.f2 { left: 4.6%; top: 63%; transform: rotate(150deg); }
.filo-logo.f3 { left: 23%; top: 66%; transform: rotate(100deg); }
.barra .marchio.fili-on .filo-logo, .barra .marchio:focus-visible .filo-logo { width: 90px; opacity: .9; transition: width .6s ease, opacity .25s; }
.barra .marchio.fili-on .filo-logo.f1 { width: 140px; transition-delay: .06s; }
.barra .marchio.fili-on .filo-logo.f2 { transition-delay: .12s; }
.barra .marchio.fili-on .filo-logo.f3 { width: 120px; transition-delay: .18s; }
/* sul telefono niente fili al passaggio */
@media (max-width: 760px) { .filo-logo { display: none; } }
/* l'arrivo: durante il caricamento la targhetta è spenta; il marchio di luce vola qui e diventa il logo vero */
html.carica .barra .marchio, html.attesa-logo .barra .marchio { box-shadow: none; background: transparent; border-color: transparent; }
html.carica .barra .marchio img, html.attesa-logo .barra .marchio img, html.carica .nodo-luce, html.attesa-logo .nodo-luce { opacity: 0; }
.barra .marchio img { transition: opacity .7s ease; }
.volo-logo { position: fixed; z-index: 40; left: 0; top: 0; pointer-events: none; overflow: visible; }
.volo-logo * { fill: none; stroke: #9FD0FF; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1.5 4.5; }
.volo-logo .vn { fill: #9BEA8C; stroke: none; }
.volo-logo .vl { stroke: #9BEA8C; stroke-dasharray: 1.5 3.5; }

/* ---- il logo della barra fatto di particelle (con WebGL): niente pillola, il logo-immagine resta solo come riserva ---- */
html.logo-di-luce .barra .marchio { background: none; border-color: transparent; box-shadow: none; padding: 0; }
html.logo-di-luce .barra .marchio::after, html.logo-di-luce .nodo-luce, html.logo-di-luce .filo-logo { display: none; }
html.logo-di-luce .barra .marchio img { opacity: 0 !important; }
.logo-particelle { position: absolute; left: -26px; top: -26px; width: calc(100% + 52px); height: calc(100% + 52px); z-index: 2; pointer-events: none; }
.logo-particelle.in-volo { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 45; }
html.carica .logo-particelle:not(.in-volo) { opacity: 0; }

/* ---- bottoni ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent;
  font: 600 1rem/1.1 Inter, sans-serif; text-decoration: none; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s, border-color .18s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn.piccolo { min-height: 40px; padding: 0 16px; font-size: .92rem; border-radius: 12px; }
.btn.caldo { background: var(--pillola); color: #FFFFFF; border-radius: 999px; box-shadow: 0 10px 34px -12px var(--caldo-alone); }
.btn.caldo:hover { box-shadow: 0 14px 40px -10px var(--caldo-alone); }
.btn.chiaro { background: var(--pillola); color: #FFFFFF; border-radius: 999px; box-shadow: 0 10px 30px -12px rgba(96, 191, 87, .45); }
.btn.vetro, .btn.vetro-caldo { border-radius: 999px; }
.btn.vetro { background: rgba(255, 255, 255, .04); border-color: var(--bordo-forte); color: var(--testo); }
.btn.vetro:hover { border-color: var(--verde); }
.btn.vetro-caldo { background: transparent; border-color: var(--fascia-bordo); color: var(--caldo-t); }
.btn.vetro-caldo:hover { border-color: var(--caldo); }
.link-caldo { color: var(--caldo-t); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--fascia-bordo); }
.link-caldo small { font-weight: 400; color: var(--tenue); margin-left: 4px; }
.link-caldo:hover { border-color: var(--caldo); }

/* ---- stato dell'orario ---- */
.stato { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--tenue); }
.spia { width: 9px; height: 9px; border-radius: 50%; background: var(--tenue2); flex: none; }
.stato.aperto .spia { background: var(--verde); box-shadow: 0 0 0 4px rgba(107, 214, 106, .18); animation: spia 2.4s ease-in-out infinite; }
.stato.chiuso .spia { background: var(--caldo); }
.stato.chiuso .spia { background: var(--tenue2); }
.stato.aperto .stato-t b { color: var(--verde-t); }
.stato.chiuso .stato-t b { color: var(--caldo-t); }
.stato.chiuso .stato-t b { color: var(--testo); }
@keyframes spia { 50% { box-shadow: 0 0 0 7px rgba(107, 214, 106, 0); } }

/* ---- capitoli ---- */
main { position: relative; z-index: 1; }
.capitolo { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px max(24px, 5.2vw) 90px; max-width: 1600px; margin: 0 auto; }
.capitolo::before { content: ""; position: absolute; inset: 0 auto 0 calc(50% - 50vw); width: 100vw; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--fondo-rgb), .9) 0%, rgba(var(--fondo-rgb), .62) 34%, rgba(var(--fondo-rgb), 0) 60%); }
.vetro-pannello, .carta, .anello-testa { position: relative; max-width: 560px; padding: 34px 38px; border-radius: 24px; background: var(--vetro); border: 1px solid var(--bordo); box-shadow: var(--ombra); }
.vetro-pannello.largo { max-width: 660px; }
.numero { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tenue); margin-bottom: 14px; }
.numero b { color: var(--verde-t); font-weight: 650; }
.capitolo h2 { font-size: clamp(2rem, 3.4vw, 3.1rem); line-height: 1.06; font-weight: 600; }
.frase { font: 500 clamp(1.25rem, 1.9vw, 1.6rem)/1.3 Sora, sans-serif; margin-top: 14px; color: var(--verde-t); letter-spacing: -.01em; }
.righe { color: var(--tenue); margin-top: 16px; font-size: 1.04rem; }

/* ---- prima schermata ---- */
.eroe { flex-direction: column; align-items: flex-start; justify-content: center; padding-top: 90px; padding-bottom: 170px; }
.eroe::before { background: linear-gradient(90deg, rgba(var(--fondo-rgb), .88) 0%, rgba(var(--fondo-rgb), .55) 36%, rgba(var(--fondo-rgb), 0) 58%); }
.eroe-testo { max-width: 780px; }
.occhiello { color: var(--tenue); font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.occhiello::before { content: ""; width: 34px; height: 2px; background: var(--verde); border-radius: 2px; box-shadow: 0 0 12px var(--verde); }
h1 { font-size: clamp(2.4rem, min(5.5vw, 9.6vh), 5.6rem); line-height: 1.02; font-weight: 600; letter-spacing: -.04em; }
h1 span { background: var(--titolo-caldo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sottotitolo { font: 500 clamp(1.1rem, 1.5vw, 1.35rem)/1.35 Sora, sans-serif; color: var(--verde-t); margin-top: 18px; max-width: 34ch; }
.guida { font-size: clamp(1.08rem, 1.45vw, 1.3rem); color: var(--tenue); max-width: 40ch; margin-top: 22px; }
.azioni { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* fascia dell'assistenza, sempre nella prima schermata */
.fascia { position: absolute; left: max(24px, 5.2vw); right: max(24px, 5.2vw); bottom: 26px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  padding: 14px 18px 14px 16px; border-radius: 22px; background: var(--fascia-vetro); border: 1px solid var(--fascia-bordo); box-shadow: 0 24px 70px -30px var(--caldo-alone);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
/* appena si lascia la prima schermata la fascia scivola giù e sfuma; torna solo in cima */
.fascia { transition: opacity .45s ease, transform .45s ease, visibility .45s; }
html.js .fascia.via { opacity: 0; transform: translateY(28px); visibility: hidden; pointer-events: none; }
.fascia-titolo { font: 600 1.08rem/1.3 Sora, sans-serif; color: var(--testo); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.fasi { display: inline-grid; font: 400 .98rem Inter, sans-serif; color: var(--caldo-t); }
.fascia .btn.caldo, .carta-calda .btn.caldo { background: var(--pillola); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .45); box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .45); }
.fascia .btn.vetro-caldo, .carta-calda .btn.vetro-caldo { color: #FFFFFF; }
.fascia .link-caldo, .carta-calda .link-caldo { color: #FFFFFF; }
.fascia .stato.aperto .stato-t b, .carta-calda .stato.aperto .stato-t b { color: var(--caldo-t); }
.fascia .stato.aperto .spia, .carta-calda .stato.aperto .spia { background: #8FE07F; }
.fasi span { grid-area: 1 / 1; opacity: 0; animation: fase 7.5s infinite; }
.fasi span:nth-child(1) { animation-name: fase1; }
.fasi span:nth-child(2) { animation-name: fase2; }
.fasi span:nth-child(3) { animation-name: fase3; }
@keyframes fase1 { 0%, 26% { opacity: 1; } 30%, 100% { opacity: 0; } }
@keyframes fase2 { 0%, 28% { opacity: 0; } 32%, 62% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes fase3 { 0%, 64% { opacity: 0; } 68%, 96% { opacity: 1; } 100% { opacity: 0; } }
.fasi span::before { content: "→ "; }
.fascia .stato { margin-top: 6px; }
.fascia-azioni { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.fascia-azioni .link-caldo { margin-left: 8px; }

/* la piccola scena: richiesta che parte, tecnico che si collega, problema risolto */
.mini { width: 150px; height: 58px; flex: none; overflow: visible; }
.mini.grande { width: 100%; max-width: 330px; height: auto; margin: 18px 0 6px; }
.mini * { fill: none; stroke: var(--caldo-t); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini .m-schermo { stroke: var(--testo); opacity: .9; }
.mini .m-piede { stroke: var(--testo); opacity: .5; }
.mini .m-filo { stroke-dasharray: 3 5; opacity: .5; animation: filo 7.5s infinite; }
.mini .m-richiesta { fill: var(--mini-a); stroke: none; animation: richiesta 7.5s infinite; }
.mini .m-tecnico, .mini .m-spalle, .mini .m-cuffia { stroke: var(--mini-a); }
.mini .m-tecnico { animation: tecnico 7.5s infinite; }
.mini .m-cursore { fill: var(--mini-a); stroke: none; opacity: 0; animation: cursore 7.5s infinite; }
.mini .m-ok { stroke: var(--mini-ok); stroke-width: 3; stroke-dasharray: 32; stroke-dashoffset: 32; animation: ok 7.5s infinite; }
@keyframes richiesta { 0% { transform: translateX(0); opacity: 0; } 4% { opacity: 1; } 24% { transform: translateX(50px); opacity: 1; } 28%, 100% { transform: translateX(50px); opacity: 0; } }
@keyframes filo { 0%, 26% { opacity: .45; stroke: var(--caldo-t); } 30%, 62% { opacity: 1; stroke: var(--mini-a); stroke-dasharray: 60 0; } 70%, 100% { opacity: .45; } }
@keyframes tecnico { 0%, 24% { fill: transparent; } 30%, 90% { fill: var(--mini-a); } 100% { fill: transparent; } }
@keyframes cursore { 0%, 32% { opacity: 0; transform: translate(14px, 8px); } 38% { opacity: 1; transform: translate(10px, 6px); } 58% { opacity: 1; transform: translate(0, 0); } 64%, 100% { opacity: 0; transform: translate(0, 0); } }
@keyframes ok { 0%, 64% { stroke-dashoffset: 32; opacity: 1; } 74%, 94% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }

/* ---- anello dei sette servizi ---- */
.anello { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 30px; }
.anello-testa { max-width: 520px; }
.anello-riga { position: relative; width: 100%; display: flex; align-items: center; gap: 10px; }
.schede { list-style: none; margin: 0; padding: 10px calc(50% - 190px) 18px; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.schede::-webkit-scrollbar { display: none; }
.scheda { flex: 0 0 380px; scroll-snap-align: center; padding: 20px 24px; border-radius: 20px; background: var(--vetro); border: 1px solid var(--bordo); transition: border-color .3s, transform .3s, opacity .3s; opacity: .62; }
.scheda.attiva { opacity: 1; border-color: var(--bordo-forte); transform: translateY(-4px); }
.scheda.calda.attiva { border-color: var(--fascia-bordo); }
.scheda .n { font: 600 .82rem Sora, sans-serif; color: var(--verde-t); letter-spacing: .1em; }
.scheda h3 { font-size: 1.32rem; margin: 6px 0 8px; font-weight: 600; }
.scheda .frase-p { color: var(--testo); font-weight: 600; margin-bottom: 6px; }
.scheda p:not(.frase-p) { color: var(--tenue); font-size: .93rem; line-height: 1.5; }
.freccia { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--bordo-forte); background: var(--vetro-forte); color: var(--testo); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.freccia:hover { border-color: var(--verde); }
.anello::before { background: linear-gradient(rgba(var(--fondo-rgb), .0) 50%, rgba(var(--fondo-rgb), .7) 100%), linear-gradient(90deg, rgba(var(--fondo-rgb), .85) 0%, rgba(var(--fondo-rgb), 0) 46%); }

/* ---- E se si rompe? ---- */
.scelte { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.scelte button { text-align: left; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--bordo-forte); background: rgba(255, 255, 255, .03); color: var(--testo); font: 600 1rem/1.25 Inter, sans-serif; cursor: pointer; min-height: 48px; }
.scelte button small { display: block; font-weight: 400; font-size: .86rem; color: var(--tenue); margin-top: 3px; }
.scelte button[aria-selected="true"] { border-color: var(--verde); background: rgba(107, 214, 106, .1); box-shadow: inset 0 0 0 1px var(--verde); }
.scelte button:hover { border-color: var(--verde); }
.guasto { margin-top: 24px; }
.guasto h3 { font-size: 1.3rem; margin-bottom: 12px; }
.fase { margin-top: 12px; }
.etichetta { display: inline-block; font: 650 .78rem Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
.senza .etichetta { color: var(--rosso); background: rgba(150, 150, 160, .14); }
.con .etichetta { color: var(--verde-t); background: rgba(107, 214, 106, .12); }
.fase ol { margin: 0; padding-left: 1.2em; color: var(--tenue); }
.fase li { margin: 4px 0; }
.esito { margin-top: 18px; padding: 18px 20px; border-radius: 16px; border-left: 3px solid var(--verde); background: rgba(107, 214, 106, .07); }
.problema { color: var(--tenue); font-size: .98rem; }
.problema::first-line { color: var(--tenue); }
.soluzione { font: 600 clamp(1.25rem, 1.9vw, 1.6rem)/1.3 Sora, sans-serif; color: var(--testo); margin-top: 8px; letter-spacing: -.01em; }
.riguarda-r { display: none; margin-top: 16px; }
.riguarda { background: none; border: 0; padding: 8px 0; color: var(--verde-t); font: 600 .98rem Inter, sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* con JavaScript: un guasto alla volta, raccontato a tempi */
html.js .guasto[hidden] { display: none; }
html.js .riguarda-r { display: block; }
.fase-ora { font: 600 .8rem Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; margin-top: 22px; color: var(--tenue); min-height: 1.2em; }
.racconto .guasto { min-height: 230px; }
.racconto .guasto h3, .racconto .guasto .etichetta { display: none; }
.racconto .guasto .fase, .racconto .guasto .esito { display: none; }
.racconto .guasto .fase li { display: none; }
.racconto .guasto .fase li.vista { display: list-item; color: var(--tenue2); }
.racconto .guasto .fase li.ora { color: var(--testo); font: 500 1.28rem/1.35 Sora, sans-serif; margin-top: 10px; animation: entra .6s ease-out; }
.racconto .guasto[data-stato="senza"] .senza, .racconto .guasto[data-stato="riavvolgi"] .senza { display: block; }
.racconto .guasto[data-stato="riavvolgi"] .senza { opacity: .4; filter: blur(1px); transition: opacity .6s; }
.racconto .guasto[data-stato="con"] .con { display: block; }
.racconto .guasto[data-stato="fine"] .esito { display: block; animation: entra .8s ease-out; }
.racconto .guasto[data-stato="fine"] .soluzione { font-size: clamp(1.4rem, 2.2vw, 1.95rem); }
.racconto .guasto[data-stato="tutto"] .fase, .racconto .guasto[data-stato="tutto"] .esito { display: block; }
.racconto .guasto[data-stato="tutto"] .fase li { display: list-item; }
.racconto .guasto[data-stato="tutto"] .etichetta { display: inline-block; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }
.fase-ora.senza-t { color: var(--rosso); }
.fase-ora.con-t { color: var(--verde-t); }

/* ---- assistenza ---- */
.assistenza .due { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; width: 100%; max-width: 1080px; align-items: start; }
.carta { max-width: none; }
.carta-calda { background: var(--fascia); border-color: var(--fascia-bordo); box-shadow: 0 30px 90px -36px var(--caldo-alone); }
.caldo-t { color: var(--caldo-t); }
.stato.grande-s { font-size: 1.05rem; margin-top: 16px; color: var(--testo); }
.nota-orario { color: var(--tenue); font-size: .95rem; margin-top: 8px; }
.carta .azioni { margin-top: 20px; }
.carta p:last-child { margin-top: 16px; }
.assistenza::before { background: radial-gradient(70% 80% at 30% 50%, rgba(var(--fondo-rgb), .78), rgba(var(--fondo-rgb), 0) 80%); }

/* ---- come lavoriamo ---- */
.passi { list-style: none; counter-reset: p; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.passi li { counter-increment: p; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--bordo); background: rgba(255, 255, 255, .025); }
.passi li { transition: border-color .3s, background .3s; cursor: default; }
.passi li.acceso { border-color: var(--verde); background: rgba(108, 199, 96, .1); }
.passi li::before { content: "0" counter(p); display: block; font: 700 .85rem Sora, sans-serif; color: var(--verde-t); margin-bottom: 4px; }
.passi b { display: block; font-family: Sora, sans-serif; font-weight: 600; }
.passi span { color: var(--tenue); font-size: .94rem; }
.fatti { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--tenue); font-size: .94rem; }
.fatti b { color: var(--testo); font-family: Sora, sans-serif; font-weight: 600; }

/* ---- contatti ---- */
.enorme { font-size: clamp(3rem, 7vw, 6.2rem) !important; letter-spacing: -.045em; }
.recapiti { display: grid; gap: 12px; margin-top: 26px; }
.recapiti a { display: block; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--bordo); background: rgba(255, 255, 255, .03); text-decoration: none; transition: border-color .2s, transform .2s; }
.recapiti a:hover { border-color: var(--verde); transform: translateX(4px); }
.recapiti a.caldo-r { border-color: var(--fascia-bordo); }
.recapiti a.caldo-r { border-color: var(--fascia-bordo); background: var(--fascia); }
.recapiti a.caldo-r b { color: var(--caldo-t); }
.recapiti small { display: block; color: var(--tenue); font-size: .85rem; }
.recapiti b { font: 600 1.15rem Sora, sans-serif; }

/* ---- piè di pagina: dello stesso tipo della barra in alto, vetro scuro sopra la scena, con lo stesso logo di particelle ---- */
.piede { position: relative; z-index: 1; border-top: 1px solid rgba(150, 190, 240, .16); background: rgba(10, 29, 54, .72); color: #D3DEEC; font-size: .92rem;
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .piede { background: rgba(10, 29, 54, .94); } }
.piede-g { max-width: 1600px; margin: 0 auto; padding: 26px max(24px, 5.2vw) 30px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px 44px; align-items: center; }
.piede .marchio img { height: 64px; width: auto; }
.piede .marchio { position: relative; }
html.logo-di-luce .piede .marchio { background: none; box-shadow: none; padding: 0; }
html.logo-di-luce .piede .marchio img { opacity: 0 !important; }
.piede-dati p, .piede-link p { margin: 2px 0; line-height: 1.5; }
.piede-dati b { color: #FFFFFF; font-weight: 600; }
.piede-link { text-align: right; }
.piede-link .stato { justify-content: flex-end; color: #D3DEEC; }
.piede a { color: #FFFFFF; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .3); }
.piede a:hover { border-bottom-color: #60BF57; }
.piede .marchio { border-bottom: 0; }
:root[data-theme="light"] .piede { background: rgba(255, 255, 255, .8); border-top-color: rgba(35, 79, 126, .14); color: #3E4E66; }
:root[data-theme="light"] .piede-dati b, :root[data-theme="light"] .piede a { color: #0B1A30; }
:root[data-theme="light"] .piede a { border-bottom-color: rgba(35, 79, 126, .3); }
:root[data-theme="light"] .piede-link .stato { color: #3E4E66; }
@media (max-width: 760px) {
  .piede-g { grid-template-columns: 1fr; gap: 14px; padding: 22px 16px 24px; }
  .piede-link { text-align: left; }
  .piede-link .stato { justify-content: flex-start; }
  .piede .marchio img { height: 52px; }
}
.piccolo { font-size: .86rem; }
.tasti-tel { display: none; }


/* ---- il titolo che l'onda di luce illumina (senza JavaScript resta del suo colore) ---- */
h1 { background: linear-gradient(100deg, var(--testo) 0 38%, var(--titolo-luce) 50%, var(--testo) 62% 100%); background-size: 260% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; }
h1.acceso { animation: illumina 1.5s cubic-bezier(.3, .1, .3, 1) both; }
@keyframes illumina { from { background-position: 100% 0; } to { background-position: 0 0; } }
:root { --titolo-luce: #FFFFFF; }
:root[data-theme="light"] { --titolo-luce: #3E86D6; }

/* ---- barra delle tappe: a che servizio sei e salto a uno qualsiasi ---- */
.tappe { position: fixed; right: max(14px, 1.4vw); top: 50%; transform: translateY(-50%); z-index: 20; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.tappe.vista { opacity: 1; visibility: visible; }
.tappe-t { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tenue); text-align: right; margin-bottom: 8px; }
.tappe-n { color: var(--testo); font-weight: 650; margin-left: 4px; letter-spacing: .04em; }
.tappe ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tappe a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 30px; text-decoration: none; color: var(--tenue); font-size: .86rem; }
.tappe .nome { opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s; white-space: nowrap; background: rgba(var(--fondo-rgb), .82); padding: 2px 9px; border-radius: 8px; }
.tappe a:hover .nome, .tappe a:focus-visible .nome, .tappe a.attiva .nome { opacity: 1; transform: none; }
.tappe a.attiva { color: var(--testo); font-weight: 600; }
.tappe .tacca { flex: none; width: 16px; height: 2px; border-radius: 2px; background: var(--bordo-forte); transition: width .25s, background .25s; }
.tappe a.attiva .tacca { width: 32px; background: var(--verde); box-shadow: 0 0 10px var(--verde); }
html:not(.js) .tappe { display: none; }

/* ---- il filo di luce dal nome del servizio alla sua forma nella scena ---- */
.filo-titolo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.ft-linea { fill: none; stroke: var(--verde-t); stroke-width: 1.4; stroke-linecap: round; filter: drop-shadow(0 0 3px var(--verde)); }
.ft-inizio { fill: var(--verde-t); }
.ft-fine { fill: none; stroke: var(--verde-t); stroke-width: 2; }
.ft-fine2 { fill: none; stroke: var(--verde); stroke-width: 1; opacity: .5; transform-box: fill-box; transform-origin: center; animation: anello-fine 2.2s ease-out infinite; }
@keyframes anello-fine { from { transform: scale(.5); opacity: .7; } to { transform: scale(1.4); opacity: 0; } }
.servizio { min-height: 92vh; min-height: 92svh; }

/* ---- schermi medi ---- */
@media (max-width: 1240px) {
  .menu { gap: 18px; }
  .tel-barra { display: none; }
  .fascia { grid-template-columns: auto 1fr; }
  .fascia-azioni { grid-column: 1 / -1; justify-content: flex-start; }
  .eroe { padding-bottom: 230px; }
}
@media (max-width: 1000px) {
  .menu, .stato-barra { display: none; }
  .barra-azioni { margin-left: auto; }
  .assistenza .due { grid-template-columns: 1fr; }
}

/* ---- telefono: la scena in alto, i testi sotto ---- */
@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 64px; }
  .barra-g { height: 82px; gap: 10px; }
  html.scorsa .barra-g { height: 64px; }
  .barra .marchio img { height: 58px; }
  .barra .marchio { padding: 5px 14px 5px 9px; }
  .barra-g { padding: 0 16px; }
  .barra .btn.caldo { display: none; }
  .capitolo { padding: 46vh 16px 40px; padding-top: 46svh; align-items: flex-end; min-height: 100svh; }
  .capitolo::before { background: linear-gradient(rgba(var(--fondo-rgb), 0) 26%, rgba(var(--fondo-rgb), .78) 46%, rgba(var(--fondo-rgb), .92) 70%); }
  .vetro-pannello, .carta, .anello-testa { padding: 22px 20px; border-radius: 20px; }
  .eroe { padding: 0 16px 14px; justify-content: flex-end; min-height: calc(100svh - 64px); }
  .eroe::before { background: linear-gradient(rgba(var(--fondo-rgb), 0) 20%, rgba(var(--fondo-rgb), .7) 40%, rgba(var(--fondo-rgb), .9) 62%); }
  .occhiello { font-size: .8rem; margin-bottom: 10px; }
  h1 { font-size: clamp(2rem, 9.4vw, 2.5rem); }
  .sottotitolo { font: 500 clamp(1.1rem, 1.5vw, 1.35rem)/1.35 Sora, sans-serif; color: var(--verde-t); margin-top: 18px; max-width: 34ch; }
.guida { font-size: 1rem; margin-top: 12px; }
  .eroe .azioni { display: none; }
  .fascia { position: static; margin-top: 18px; grid-template-columns: 1fr; gap: 10px; padding: 14px; width: 100%; }
  .fascia .mini { display: none; }
  .fascia-titolo { font-size: 1rem; }
  .fascia-azioni { justify-content: stretch; display: grid; grid-template-columns: 1fr; gap: 8px; }
  .fascia-azioni .btn { padding: 0 10px; }
  .fascia-azioni .btn.vetro-caldo { display: none; }
  .fascia .stato-lungo { display: none; }
  .occhiello { letter-spacing: 0; }
  .occhiello::before { display: none; }
  .fascia-azioni .link-caldo { grid-column: 1 / -1; margin: 2px 0 0; justify-self: start; }
  .capitolo h2 { font-size: 1.85rem; }
  .righe { font-size: .98rem; }
  .anello { padding-top: 40svh; justify-content: flex-end; }
  .anello-riga { margin: 0 -16px; width: calc(100% + 32px); }
  .freccia { display: none; }
  .schede { padding: 8px 9vw 14px; gap: 12px; -webkit-mask-image: none; mask-image: none; }
  .scheda { flex-basis: 82vw; padding: 20px; }
  .scelte { grid-template-columns: 1fr; }
  .scelte button small { display: none; }
  .scelte button { min-height: 44px; padding: 10px 14px; }
  .guasti { padding-top: 34svh; }
  .racconto .guasto { min-height: 210px; }
  .passi { grid-template-columns: 1fr; }
  .tasti-tel { display: grid; grid-template-columns: 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: rgba(var(--fondo-rgb), .72); border-top: 1px solid var(--bordo); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    transform: translateY(110%); transition: transform .4s ease; }
  /* i tasti fissi compaiono solo dopo che la striscia dell'assistenza è uscita, e mai accanto all'assistenza completa */
  html.fascia-via .tasti-tel { transform: none; }
  html.zona-assistenza .tasti-tel { transform: translateY(110%); }
  html:not(.js) .tasti-tel { transform: none; }
  .tasti-tel .btn { min-height: 44px; font-size: .95rem; border-radius: 12px; }
  .tasti-tel .btn.vetro-caldo { background: var(--vetro-forte); border-color: var(--bordo-forte); color: var(--testo); }
  .enorme { font-size: 3.2rem !important; }
  .tappe { top: 82px; left: 0; right: 0; transform: none; background: rgba(var(--fondo-rgb), .92); border-bottom: 1px solid var(--bordo); display: flex; align-items: center; gap: 8px; padding: 0 0 0 14px; }
  .tappe-t { margin: 0; flex: none; font-size: .68rem; }
  .tappe ol { display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; padding: 6px 12px 6px 4px; }
  .tappe ol::-webkit-scrollbar { display: none; }
  .tappe .tacca { display: none; }
  .tappe a { min-height: 34px; }
  .tappe .nome { opacity: 1; transform: none; background: none; border: 1px solid var(--bordo); padding: 5px 10px; border-radius: 99px; font-size: .8rem; }
  .tappe a.attiva .nome { border-color: var(--verde); color: var(--testo); box-shadow: inset 0 0 0 1px var(--verde); }
}

/* ---- movimento ridotto: tutto fermo e completo ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fasi span:nth-child(3) { opacity: 1; }
  .mini .m-ok { stroke-dashoffset: 0; }
  .mini .m-cursore { opacity: 1; }
  .mini .m-richiesta { opacity: 0; }
  .fasi { display: inline; } .fasi span { opacity: 1; }
}
