/* PROVA (ramo prova-metro), idee prese da getartcraft.com:
   - barrette di testa delle sezioni («01 / VANTAGGI ……… CONNETTI IL TUO NETWORK»)
   - prima/dopo con la linea da trascinare (dalla scheda in PDF al dato in SYD)
   Script: modules/prova-extra.js */
.barra-sez { margin: -48px auto 40px; }
.barra-sez .riga { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-text-subtle); }
.barra-sez .riga::after { content: ""; order: 2; flex: 1; border-bottom: 1px dotted var(--c-line-strong); transform: translateY(-3px); }
.barra-sez .n { order: 1; color: var(--c-text); }
.barra-sez .dx { order: 3; color: var(--c-sky); text-align: right; }
.section.benefits .barra-sez .riga, .section.network .barra-sez .riga { border-color: rgba(201, 216, 245, .35); color: var(--c-sky-on-blue); }
.section.benefits .barra-sez .dx, .section.network .barra-sez .dx { color: var(--c-text); }

/* La finestra «Avvia un pilota»: la frase in alto diventa una barretta come quelle delle sezioni */
p.choose-subtitle.choose-subtitle { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 880px; margin: 4px auto 0; padding: 10px 0;
  border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); text-align: left;
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; color: var(--c-text); }
p.choose-subtitle.choose-subtitle::before { content: ''; order: 2; flex: 1; border-bottom: 1px dotted var(--c-line-strong); transform: translateY(-3px); }
p.choose-subtitle.choose-subtitle::after { content: '5 percorsi'; order: 3; color: var(--c-sky); }
html[lang='en'] p.choose-subtitle.choose-subtitle::after { content: '5 paths'; }
@media (max-width: 760px) { p.choose-subtitle.choose-subtitle { font-size: 10px; letter-spacing: .1em; padding: 7px 0; gap: 8px; } }

/* Scena automatica: palco fisso mentre la sezione scorre (3 schermate di corsa) */
.sc { position: relative; height: 330vh; background: var(--c-bg); }
.sc-palco { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.sc-testi { position: absolute; left: 0; right: 0; top: 48px; height: 120px; z-index: 5; pointer-events: none; }
.sc-frase, .sc-sotto { position: absolute; left: 0; right: 0; top: 0; margin: 0 auto; max-width: 820px; padding: 0 16px; text-align: center; text-wrap: balance; }
.sc-frase { font-family: var(--font-heading); font-weight: 600; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.1; color: var(--c-text); opacity: 0; text-shadow: 0 2px 18px rgba(10, 18, 40, .8); }
.sc-frase:first-child { opacity: 1; }
.sc-sotto { font-family: var(--font-heading); font-weight: 500; font-size: clamp(22px, 2.8vw, 34px); line-height: 1.25; color: var(--c-sky); opacity: 0; }
.sc-fili { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.sc-fili path { fill: none; stroke: var(--c-coral); stroke-width: 1.5; }
.sc-fili circle { opacity: 0; }
.sc-fili .va { fill: var(--c-coral); }
.sc-fili .torna { fill: var(--c-sky); }
.sc-id { display: flex; align-items: center; gap: 10px; padding: 8px 18px; border-bottom: 1px solid var(--c-line); min-height: 34px; font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 12px; color: var(--c-coral); overflow: hidden; white-space: nowrap; }
.sc-id .id { overflow: hidden; text-overflow: ellipsis; }
.sc-id .id::after { content: "▍"; margin-left: 1px; animation: sc-cursore 1s steps(1) infinite; }
.sc-id.scritto .id::after { content: ""; }
@keyframes sc-cursore { 50% { opacity: 0; } }
.sc-brev { position: absolute; left: 50%; z-index: 3; opacity: 0; white-space: nowrap; padding: 10px 20px; border: 1px solid var(--c-yellow); border-radius: 999px; background: rgba(246, 209, 27, .08);
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--c-yellow); box-shadow: 0 0 24px rgba(246, 209, 27, .18); }
.sc-mazzo { position: absolute; left: 50%; top: 56%; width: min(400px, calc(100% - 48px)); translate: -50% -50%; z-index: 2; opacity: 0; }
.sc-scheda { position: absolute; left: 0; top: 0; width: 100%; background: var(--c-card); border: 1px solid var(--c-line-strong); border-radius: 6px; box-shadow: 0 20px 60px rgba(5, 12, 30, .45); transform-origin: 50% 50%; }
.sc-scheda .testa { padding: 14px 18px; border-bottom: 1px solid var(--c-line); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.sc-scheda .testa b { font-family: var(--font-heading); font-size: 18px; font-weight: 600; color: var(--c-text); }
.sc-scheda .testa span { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 11px; color: var(--c-sky); letter-spacing: .08em; }
.sc-scheda .riga { display: grid; grid-template-columns: 38% 1fr; gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--c-line); opacity: 0; font-size: 14px; }
.sc-scheda .riga .k { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-subtle); padding-top: 2px; }
.sc-scheda .riga .v { color: var(--c-text); min-width: 0; }
.sc-scheda .riga.arrivata .v { animation: sc-lampo .6s ease-out; }
@keyframes sc-lampo { from { color: var(--c-coral); } to { color: var(--c-text); } }
.sc-scheda .stato { padding: 10px 18px; color: var(--c-success); font-size: 14px; font-weight: 500; opacity: 0; }
.sc-carta { position: absolute; left: 0; top: 0; z-index: 4; white-space: nowrap; font-size: 13px; padding: 7px 11px; border-radius: 4px; will-change: transform, opacity;
  box-shadow: 0 8px 24px rgba(5, 12, 30, .4); pointer-events: none; background: #FFFFFF; color: #2A2F3A; border: 1px solid #D5D9E2; opacity: 0; transform-origin: 0 50%; }
.sc-carta b { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .04em; color: #fff; padding: 2px 5px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; font-family: var(--font-family); }
.sc-carta.f-pdf b { background: #D9534F; }
.sc-carta.f-xls b { background: #1E7A45; }
.sc-carta.f-csv b { background: #4C7A3A; }
.sc-carta.f-doc b { background: #2B5DB8; }
.sc-carta.f-jpg b { background: #8A5CC2; }
.sc-carta.f-xml b { background: #C77D1A; }
.sc-carta.f-txt b { background: #6B7280; }
.sc-carta.f-mail { background: #F4F6FA; }
.sc-carta.f-mail b { background: #3B4F80; }
.sc-carta.f-wa { background: #DCF8C6; border-color: #B8E3A0; border-radius: 12px 12px 12px 2px; }
.sc-carta.f-wa b { background: #25A35A; }
.sc-carta.f-fax { background: #ECEAE4; font-family: 'Courier New', monospace; }
.sc-carta.f-fax b { background: #55524A; }
.sc-carta.f-tel { background: #FFF1F1; color: #8A2B2B; border-color: #F2C9C9; }
.sc-carta.f-tel b { background: #ED6666; }
.sc-nodo { position: absolute; z-index: 2; translate: -50% -50%; padding: 8px 14px; border: 1px solid var(--c-line-strong); background: var(--c-bg); color: var(--c-text-muted);
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: 0; white-space: nowrap; }
.sc-nodo.acceso { border-color: var(--c-coral); color: var(--c-text); box-shadow: 0 0 0 4px rgba(237, 102, 102, .15); }
.sc-nodo.n1 { left: 14%; top: 42%; }
.sc-nodo.n2 { left: 86%; top: 42%; }
.sc-nodo.n3 { left: 14%; top: 80%; }
.sc-nodo.n4 { left: 86%; top: 80%; }
.sc-nodo.n5 { left: 38%; top: 92%; }
.sc-nodo.n6 { left: 62%; top: 92%; min-width: 150px; text-align: center; border-style: dashed; }
.sc-esempio { position: absolute; left: 16px; bottom: 16px; z-index: 3; font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-text-subtle); }
@media (prefers-reduced-motion: reduce) { .sc { height: auto; } .sc-palco { position: relative; height: 760px; } }

/* Il prodotto fisico: niente rettangolo, solo il disegno a filo, il telefono che lo tocca e il supporto che cambia */
.sc-nodo.sc-fisico { border: 0; background: transparent; box-shadow: none; padding: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sc-nodo.sc-fisico.acceso { box-shadow: none; }
.sc-fisico .oggetto { width: 128px; height: 106px; overflow: visible; }
.sc-fisico .oggetto path, .sc-fisico .oggetto rect { fill: none; stroke: var(--c-sky); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.sc-fisico .oggetto g.p0, .sc-fisico .oggetto g.p1, .sc-fisico .oggetto g.p2 { opacity: 0; transition: opacity .4s; }
.sc-fisico[data-s="0"] .oggetto g.p0, .sc-fisico[data-s="1"] .oggetto g.p1, .sc-fisico[data-s="2"] .oggetto g.p2, .sc-fisico:not([data-s]) .oggetto g.p0 { opacity: 1; }
.sc-fisico .oggetto .tel rect, .sc-fisico .oggetto .tel path { stroke: var(--c-text); }
.sc-fisico .oggetto .tocco { fill: none; stroke: var(--c-coral); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.sc-palco.rete .sc-fisico .tel { animation: sc-tocca 2.4s ease-in-out infinite; }
.sc-palco.rete .sc-fisico .tocco { animation: sc-onda 2.4s ease-out infinite; }
@keyframes sc-tocca { 0%, 100% { transform: translate(10px, -8px); } 40%, 55% { transform: translate(-6px, 6px); } }
@keyframes sc-onda { 0%, 40% { opacity: 0; transform: scale(.4); } 48% { opacity: 1; } 75%, 100% { opacity: 0; transform: scale(2.6); } }
.sc-fisico .supporto { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-text-muted); }
.sc-nodo.n6.sc-fisico { top: 87%; }

/* Schermi bassi (portatili): schede più compatte, frasi più su, così niente si sovrappone */
@media (min-width: 761px) and (max-height: 780px) {
  .sc-testi { top: 20px; }
  .sc-frase { font-size: clamp(26px, 3.2vw, 40px); }
  .sc-sotto { font-size: clamp(20px, 2.2vw, 26px); }
  .sc-mazzo { top: 57%; width: min(370px, calc(100% - 48px)); }
  .sc-scheda .testa { padding: 9px 16px; }
  .sc-scheda .riga { padding: 5px 16px; font-size: 13px; }
  .sc-id { min-height: 26px; padding: 5px 16px; }
  .sc-scheda .stato { padding: 6px 16px; }
  .sc-brev { font-size: 12px; padding: 7px 16px; }
  .sc-nodo.n1, .sc-nodo.n2 { top: 36%; }
  .sc-nodo.n3, .sc-nodo.n4 { top: 76%; }
  .sc-nodo.n5 { top: 94%; }
  .sc-nodo.n6.sc-fisico { top: 91%; left: 66%; }
  .sc-fisico .oggetto { width: 72px; height: 60px; }
}

@media (max-width: 760px) {
  .barra-sez { margin: -40px auto 28px; }
  .barra-sez .riga { font-size: 10px; letter-spacing: .1em; gap: 8px; }
  .barra-sez .dx { display: none; }
  .sc-mazzo { top: 57%; width: calc(100% - 56px); }
  .sc-scheda .riga { grid-template-columns: 44% 1fr; gap: 8px; padding: 4px 12px; font-size: 12px; }
  .sc-scheda .riga .k { font-size: 9px; letter-spacing: .04em; }
  .sc-scheda .testa { padding: 10px 12px; }
  .sc-scheda .testa b { font-size: 16px; }
  .sc-scheda .stato { padding: 8px 12px; font-size: 12px; }
  .sc-frase { font-size: 26px; }
  .sc-sotto { font-size: 19px; }
  .sc-carta { font-size: 11px; padding: 6px 9px; }
  .sc-carta b { font-size: 8px; margin-right: 4px; }
  .sc-nodo { font-size: 9px; padding: 5px 8px; letter-spacing: .06em; }
  .sc-nodo.n1 { left: 17%; top: 26%; }
  .sc-nodo.n2 { left: 50%; top: 26%; }
  .sc-nodo.n6 { left: 83%; top: 19%; }
  .sc-nodo.n5 { left: 83%; top: 26%; }
  .sc-nodo.n6, .sc-nodo.n6.sc-fisico { left: 50%; top: 90%; max-width: none; }
  .sc-fisico .oggetto { width: 58px; height: 48px; }
  .sc-fisico .supporto { font-size: 8px; letter-spacing: .06em; }
  .sc-nodo.n3 { left: 17%; top: 92%; }
  .sc-nodo.n4 { left: 83%; top: 92%; }
  .sc-nodo { max-width: 31%; white-space: normal; text-align: center; line-height: 1.2; }
  .sc-nodo { padding: 4px 6px; }
  .sc-esempio { display: none; }
  .sc-id { padding: 5px 12px; font-size: 10px; min-height: 26px; gap: 8px; }
  .sc-nodo.n6 { min-width: 0; }
  .sc-brev { font-size: 10px; letter-spacing: .08em; padding: 7px 12px; }
  .sc-testi { top: 60px; }
}
