/* Prima Solar · landing di invito
   Linea grafica: sito Presotto Ennio, sezione Contract (Spectral 700 per i titoli, DM Sans per testi e pulsanti,
   fondo bianco, titoli blu notte). Tutte le misure vivono nei token qui sotto. */

@font-face { font-family: 'Spectral'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/spectral-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 100 1000; font-style: normal; font-display: swap; src: url('fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations'); }

:root {
  /* colore */
  --blu-notte: #04152C;
  --accento: #446FC6;
  --dettaglio: #FC5F28;
  --bianco: #FFFFFF;
  --fondo: #F6F8FB;
  --fondo-accento: #E9EFFA;
  --bordo: #E1E7F0;
  --testo: #334155;
  --testo-tenue: #5A6678;
  --su-scuro: #FFFFFF;
  --su-scuro-tenue: #C4D7F8;

  /* spazio: scala unica a base 4 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px; --s-24: 96px; --s-32: 128px;

  /* misure */
  --contenitore: 1080px;
  --margine: var(--s-6);
  --lettura: 640px;
  --raggio-scheda: 24px;
  --raggio-controllo: 8px;
  --bersaglio: 48px;
  --stacco-sezione: var(--s-16);

  /* tipografia */
  --titoli: 'Spectral', Georgia, 'Times New Roman', serif;
  --testi: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-claim: clamp(2rem, 1.1rem + 4vw, 3.75rem);
  --t-titolo: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
  --t-data: clamp(2.5rem, 13.4vw, 9rem);
  --t-carta: clamp(1.625rem, 1.1rem + 2.2vw, 3rem);
  --peso-pieno: 800;
  --peso-fine: 200;
  --t-intro: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  --t-voce: clamp(1.125rem, 1.05rem + 0.3vw, 1.375rem);
  --t-corpo: 1.0625rem;
  --t-secondario: 0.9375rem;
  --t-etichetta: 0.8125rem;

  --ombra-scheda: 0 1px 2px rgba(4, 21, 44, .04), 0 12px 32px -12px rgba(4, 21, 44, .12);
  --molla: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 768px) {
  :root { --margine: var(--s-12); --stacco-sezione: var(--s-24); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bianco);
  color: var(--testo);
  font-family: var(--testi);
  font-size: var(--t-corpo);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p, h1, h2, h3, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
abbr[title] { text-decoration: none; cursor: help; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--accento); outline-offset: 3px; border-radius: 4px; }
.conferma :focus-visible, .hero :focus-visible { outline-color: var(--bianco); }

/* ——— contenitore unico: testata, sezioni e piede stanno sugli stessi assi ——— */
.testata, main > section, .piede__riga {
  width: min(100% - 2 * var(--margine), var(--contenitore));
  margin-inline: auto;
}
main > section + section { margin-top: var(--stacco-sezione); }
/* sezione a tutta larghezza: lo sfondo arriva ai bordi, il contenuto resta sugli assi del contenitore */
main > section.sezione--piena { width: 100%; }
.solo-lettori { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.salta {
  position: absolute; left: var(--s-4); top: -100px; z-index: 20;
  background: var(--blu-notte); color: var(--bianco);
  padding: var(--s-3) var(--s-4); border-radius: var(--raggio-controllo);
}
.salta:focus { top: var(--s-4); }

/* ——— componenti condivisi ——— */
.etichetta {
  font-family: var(--testi);
  font-size: var(--t-etichetta);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accento);
}
.etichetta--su-scuro { color: var(--su-scuro-tenue); }

.titolo {
  font-family: var(--titoli);
  font-weight: 700;
  font-size: var(--t-titolo);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--blu-notte);
  text-wrap: balance;
}
.titolo--su-scuro { color: var(--su-scuro); }

.collegamento {
  color: var(--accento);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color .2s;
}
.collegamento:hover { color: var(--blu-notte); }

/* filo: il dettaglio arancio dell'invito, usato dove comincia un blocco importante */
.filo { display: block; width: var(--s-12); height: 3px; border-radius: 3px; background: var(--dettaglio); margin-bottom: var(--s-6); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3);
  min-height: var(--bersaglio);
  padding: var(--s-3) var(--s-6);
  border-radius: var(--raggio-controllo);
  background: var(--blu-notte); color: var(--bianco);
  font: 600 var(--t-corpo)/1.2 var(--testi);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .25s var(--molla), box-shadow .25s var(--molla), background-color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(4, 21, 44, .55); }
.btn:active { transform: translateY(0); }
.btn__freccia { transition: transform .25s var(--molla); }
.btn:hover .btn__freccia { transform: translateX(4px); }
/* su fondo blu notte il pulsante prende il colore dei dettagli, con testo scuro (contrasto 5,9:1) */
.btn--su-scuro { background: var(--dettaglio); color: var(--blu-notte); }
.btn--su-scuro:hover { box-shadow: 0 10px 28px -8px rgba(252, 95, 40, .6); }
.btn--compatto { padding-inline: var(--s-4); font-size: var(--t-secondario); }

/* ——— testata ——— */
.testata { padding-top: var(--s-4); }
@media (min-width: 768px) { .testata { padding-top: var(--s-6); } }
.testata__riga { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.testata__nota { font-size: var(--t-etichetta); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accento); white-space: nowrap; }
.testata__organizzatore {
  margin-top: var(--s-3); padding-block: var(--s-3);
  border-top: 1px solid var(--bordo);
  font-size: var(--t-secondario); color: var(--blu-notte);
}

.marchi { display: flex; align-items: center; gap: var(--s-4); }
.marchi__filetto { width: 1px; height: 36px; background: var(--bordo); }
.marchio { width: auto; }
.marchio--presotto { height: 36px; }
.marchio--primasolar { height: 52px; }
@media (max-width: 599px) { .testata__nota { display: none; } }
@media (min-width: 768px) {
  .marchi { gap: var(--s-6); }
  .marchi__filetto { height: 48px; }
  .marchio--presotto { height: 48px; }
  .marchio--primasolar { height: 68px; }
  .testata__organizzatore { font-size: var(--t-corpo); }
}

/* ——— hero: claim su immagine compatta ——— */
.hero { margin-top: var(--s-2); }
.hero__scheda {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(360px, 46vw, 520px);
  border-radius: var(--raggio-scheda);
  background: var(--blu-notte);
  color: var(--su-scuro);
}
.hero__foto { position: absolute; inset: -8% 0; z-index: -3; width: 100%; height: 116%; object-fit: cover; object-position: 60% 50%; }
.hero__velo {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(4, 21, 44, .15) 0%, rgba(4, 21, 44, .15) 40%, rgba(4, 21, 44, .82) 100%),
    linear-gradient(95deg, rgba(4, 21, 44, .94) 0%, rgba(4, 21, 44, .78) 42%, rgba(4, 21, 44, .28) 100%);
}
.hero__sagoma { position: absolute; z-index: -1; right: -8%; top: 4%; width: 168px; opacity: .32; }
.hero__sagoma svg, .conferma__sagoma svg { width: 100%; height: auto; overflow: visible; }
.hero__testo { padding: var(--s-8) var(--s-6) var(--s-6); max-width: 920px; }
.hero__claim {
  margin-top: var(--s-3);
  font-family: var(--titoli); font-weight: 700;
  font-size: var(--t-claim); line-height: 1.12; letter-spacing: -.01em;
  text-wrap: balance;
}
.parola { display: inline-block; will-change: transform; }
@media (min-width: 1024px) { .riga { display: block; } .hero__claim { text-wrap: nowrap; } }
.hero__chiusa { margin-top: var(--s-4); display: grid; gap: var(--s-6); }
.hero__azione { display: none; }
.hero__sottotitolo { font-size: var(--t-intro); line-height: 1.4; color: var(--su-scuro-tenue); }

.fatti {
  display: grid; grid-template-columns: 1fr;
  border-top: 1px solid rgba(255, 255, 255, .18);
  background: rgba(4, 21, 44, .42);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.fatti__voce { display: flex; align-items: baseline; gap: var(--s-4); padding: var(--s-3) var(--s-4) var(--s-3) var(--s-6); }
.fatti__voce + .fatti__voce { border-top: 1px solid rgba(255, 255, 255, .12); }
.fatti__chiave { flex: 0 0 56px; font-size: var(--t-etichetta); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--su-scuro-tenue); }
.fatti__valore { font-size: var(--t-corpo); font-weight: 500; line-height: 1.35; }
.fatti__barra { color: var(--dettaglio); padding-inline: 2px; }
@media (min-width: 768px) {
  .hero__sagoma { right: 4%; top: 8%; width: clamp(180px, 24%, 280px); opacity: .8; }
  .hero__testo { padding: var(--s-16) var(--s-12) var(--s-12); }
  .hero__azione { display: block; }
  .fatti__voce { padding-inline: var(--s-12); }
  .fatti__chiave { flex-basis: 80px; }
}
@media (min-width: 1024px) {
  .hero__testo { padding-top: var(--s-12); padding-bottom: var(--s-8); max-width: none; }
  .hero__chiusa { grid-template-columns: 1fr auto; align-items: end; }
  .fatti { grid-template-columns: 4fr 6fr 4fr; }
  .fatti__voce { flex-direction: column; justify-content: center; gap: var(--s-1); padding: var(--s-4) var(--s-8); }
  .fatti__voce:first-child { padding-left: var(--s-12); }
  .fatti__voce + .fatti__voce { border-top: 0; border-left: 1px solid rgba(255, 255, 255, .14); }
  .fatti__chiave { flex: none; }
  .fatti__valore { font-size: 1.125rem; white-space: nowrap; }
}

/* ——— introduzione ——— */
.intro__testo {
  max-width: 24em;
  font-size: var(--t-intro); line-height: 1.5; color: var(--blu-notte);
  text-wrap: pretty;
}
@media (min-width: 768px) { .intro__testo { max-width: 34em; } }

/* ——— quando e dove: la data è il segno più grande della pagina ——— */
.quando__data { margin-top: var(--s-4); display: grid; color: var(--blu-notte); }
.quando__giorno { font-size: var(--t-intro); line-height: 1.3; }
.quando__mese {
  font-family: var(--testi); font-weight: var(--peso-pieno);
  font-size: var(--t-data); line-height: 1; letter-spacing: -.035em;
  white-space: nowrap; font-kerning: none;
  margin-left: -.04em; /* allineamento ottico: l'asta dell'1 parte sul margine */
}
.peso__riga { display: block; contain: layout style; }
.peso__lettera { display: inline-block; }
.peso__spazio { display: inline-block; width: .22em; }
.quando__anno { margin-top: var(--s-2); font-size: var(--t-intro); line-height: 1.3; color: var(--accento); }
.quando__fatti { margin-top: var(--s-8); display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--bordo); }
.quando__voce { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; gap: var(--s-4); padding-block: var(--s-3); border-bottom: 1px solid var(--bordo); }
.quando__ora { font-size: var(--t-corpo); font-weight: 600; color: var(--accento); font-variant-numeric: tabular-nums; }
.quando__nome { font-size: var(--t-corpo); font-weight: 500; color: var(--blu-notte); }
.quando__voce--luogo { grid-template-columns: 1fr; gap: 0; }
.quando__voce--luogo .quando__ora { color: var(--blu-notte); }
.quando__voce--luogo .quando__nome { font-weight: 400; color: var(--testo); }
.quando__accesso { margin-top: var(--s-3); font-size: var(--t-secondario); }
.quando__calendario { display: inline-flex; align-items: center; min-height: var(--bersaglio); margin-top: var(--s-2); font-size: var(--t-secondario); }
@media (min-width: 900px) {
  .quando__fatti { grid-template-columns: 1.4fr 1fr 1fr 1fr; border-top: 0; gap: var(--s-8); }
  .quando__voce { grid-template-columns: 1fr; gap: var(--s-1); padding: var(--s-4) 0 0; border-bottom: 0; border-top: 2px solid var(--blu-notte); }
  .quando__voce:not(.quando__voce--luogo) { border-top-color: var(--accento); }
  .quando__ora { font-size: 1.375rem; }
}

/* ——— programma: un mazzo di carte, una per intervento ———
   Senza movimento (o senza JavaScript) è un elenco ordinato di carte; con il movimento la sezione si ferma
   e le carte entrano una sull'altra mentre si scorre. */
.programma__quadro {
  width: min(100% - 2 * var(--margine), var(--contenitore)); margin-inline: auto;
  display: grid; gap: var(--s-6);
}
.programma__testa { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: var(--s-4); }
.programma__conta, .programma__tacche { display: none; }
.mazzo { display: grid; gap: var(--s-3); }
.carta {
  --carta-fondo: var(--blu-notte); --carta-testo: var(--su-scuro); --carta-tenue: var(--su-scuro-tenue);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s-6);
  padding: var(--s-6);
  border-radius: var(--raggio-scheda);
  background: var(--carta-fondo); color: var(--carta-testo);
}
/* la sequenza dei colori si ripete: funziona con qualunque numero di interventi */
.carta:nth-child(5n + 2) { --carta-fondo: var(--accento); --carta-tenue: var(--bianco); }
.carta:nth-child(5n + 3) { --carta-fondo: var(--fondo-accento); --carta-testo: var(--blu-notte); --carta-tenue: var(--testo); }
.carta:nth-child(5n + 4) { --carta-fondo: var(--dettaglio); --carta-testo: var(--blu-notte); --carta-tenue: var(--blu-notte); }
.carta:nth-child(5n + 5) { background: radial-gradient(120% 140% at 100% 0%, #123A78 0%, var(--blu-notte) 60%); }
/* tre raggi in alto a destra: richiamano il segno di Prima Solar e bilanciano il numero */
.carta::after {
  content: ''; position: absolute; top: var(--s-6); right: var(--s-6);
  width: 56px; height: 40px; opacity: .22; pointer-events: none;
  background: repeating-linear-gradient(to bottom, currentColor 0 4px, transparent 4px 14px);
  border-radius: 4px; transform: rotate(-38deg); transform-origin: center;
  display: none;
}
.is-mazzo .carta::after { display: block; }
@media (min-width: 768px) { .carta::after { top: var(--s-12); right: var(--s-12); width: 96px; height: 60px; background: repeating-linear-gradient(to bottom, currentColor 0 6px, transparent 6px 22px); } }
.carta__numero { font-size: 2.5rem; font-weight: 300; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; opacity: .9; }
.carta__titolo { font-family: var(--titoli); font-weight: 700; font-size: var(--t-voce); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.carta__chi { margin-top: var(--s-1); font-size: var(--t-secondario); line-height: 1.4; color: var(--carta-tenue); }
.carta__punto { padding-inline: 2px; opacity: .7; }

/* mazzo in movimento */
.programma.is-mazzo { overflow: clip; }
/* sul telefono in basso resta libero lo spazio della barra di conferma */
.is-mazzo .programma__quadro { height: 100vh; height: 100svh; grid-template-rows: auto minmax(0, 1fr); padding-block: var(--s-6) var(--s-24); }
@media (min-width: 768px) { .is-mazzo .programma__quadro { padding-block: var(--s-8); } }
.is-mazzo .programma__conta { display: flex; align-items: baseline; gap: var(--s-2); color: var(--blu-notte); font-variant-numeric: tabular-nums; }
.is-mazzo .programma__attuale { font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.is-mazzo .programma__totale { font-size: var(--t-corpo); font-weight: 500; color: var(--testo-tenue); }
.is-mazzo .programma__tacche { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s-2); width: 100%; }
.is-mazzo .programma__tacche span { height: 3px; border-radius: 3px; background: var(--bordo); transition: background-color .4s; }
.is-mazzo .programma__tacche span.is-fatta { background: var(--accento); }
.is-mazzo .mazzo { position: relative; display: block; perspective: 1200px; }
.is-mazzo .carta {
  position: absolute; top: 54%; left: 50%;
  width: 100%; height: min(100% - var(--s-16), 440px);
  grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: stretch; gap: var(--s-4);
  padding: var(--s-6);
  will-change: transform;
  box-shadow: 0 24px 48px -24px rgba(4, 21, 44, .45);
}
.is-mazzo .carta__numero { font-size: clamp(3rem, 2rem + 5vw, 6rem); }
.is-mazzo .carta__corpo { align-self: end; }
.is-mazzo .carta__titolo { font-size: var(--t-carta); }
.is-mazzo .carta__chi { margin-top: var(--s-2); font-size: var(--t-corpo); }
@media (min-width: 768px) {
  .is-mazzo .carta { padding: var(--s-12); }
  .is-mazzo .carta__chi { font-size: var(--t-intro); }
}
@media (min-width: 1024px) {
  .is-mazzo .programma__quadro { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); grid-template-rows: minmax(0, 1fr); gap: var(--s-16); padding-block: var(--s-12); }
  .is-mazzo .programma__testa { flex-direction: column; align-items: flex-start; justify-content: center; flex-wrap: nowrap; gap: var(--s-6); }
  .is-mazzo .programma__attuale { font-size: 6rem; }
  .is-mazzo .carta { top: 52%; height: min(100% - var(--s-24), 480px); }
}

/* ——— il tema: grafica interattiva ——— */
.tema__testa { display: grid; gap: var(--s-3); }
.tema__scheda {
  margin-top: var(--s-8);
  border: 1px solid var(--bordo); border-radius: var(--raggio-scheda);
  background: var(--fondo);
  overflow: hidden;
}
.tema__scena { position: relative; isolation: isolate; padding-top: var(--s-4); background: linear-gradient(180deg, var(--fondo-accento) 0%, var(--fondo) 72%); }
.tema__buio { position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 120% at 50% 0%, #123A78 0%, var(--blu-notte) 62%); opacity: 0; }
.tema__nodi { position: relative; height: 64px; }
.tema__nodo { position: absolute; top: var(--s-2); transform: translateX(-50%); text-align: center; white-space: nowrap; font-size: var(--t-secondario); font-weight: 600; line-height: 1.3; color: var(--blu-notte); transition: color .5s; }
.tema__nodo span { display: block; font-size: var(--t-etichetta); font-weight: 400; color: var(--testo-tenue); transition: color .5s; }
/* le percentuali seguono i centri dei tre nodi nel disegno (242, 480, 722 su una larghezza 90–870) */
.tema__nodo--fotovoltaico { left: 19.5%; }
.tema__nodo--accumulo { left: 50%; }
.tema__nodo--impresa { left: 81%; }
@media (min-width: 768px) { .tema__nodi { height: 88px; } .tema__nodo { top: var(--s-3); font-size: 1.125rem; } .tema__nodo span { font-size: var(--t-secondario); } }
.tema__scena { overflow: hidden; }
.tema__svg { width: 100%; height: auto; }
/* telefono: il disegno si allarga del 15% oltre i bordi (si perdono solo i capi dell'arco) per avere icone leggibili;
   le etichette seguono lo stesso ingrandimento attorno al centro */
@media (max-width: 599px) {
  .tema__svg { width: 115%; max-width: none; margin-left: -7.5%; }
  .tema__nodo { font-size: var(--t-etichetta); }
  .tema__nodo--fotovoltaico { left: 15%; }
  .tema__nodo--impresa { left: 85.6%; }
}
.tema__comandi { display: grid; gap: var(--s-4); padding: var(--s-6); border-top: 1px solid var(--bordo); background: var(--bianco); }
.tema__guida { display: grid; gap: var(--s-3); }
.tema__frase { min-height: 4.4em; font-size: var(--t-voce); font-weight: 500; line-height: 1.45; color: var(--blu-notte); max-width: var(--lettura); }
.tema__indizio { font-size: var(--t-secondario); color: var(--testo-tenue); }
@media (min-width: 768px) { .tema__comandi { padding: var(--s-8) var(--s-12); } }
@media (min-width: 1024px) { .tema__comandi { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-16); align-items: start; } .tema__frase { min-height: 0; } }

.s-stelle { fill: var(--bianco); opacity: 0; }
.s-arco { fill: none; stroke: var(--accento); stroke-width: 1.5; stroke-dasharray: 2 8; stroke-linecap: round; opacity: .55; }
.s-sole { fill: var(--dettaglio); }
.s-suolo { stroke: var(--bordo); stroke-width: 2; stroke-linecap: round; transition: stroke .5s; }
.s-contorno, .s-pannello { fill: var(--bianco); stroke: var(--blu-notte); stroke-width: 2.5; stroke-linejoin: round; transition: fill .5s, stroke .5s; }
.s-pannello { fill: var(--accento); }
.s-griglia { fill: none; stroke: var(--bianco); stroke-width: 1.5; opacity: .85; }
.s-tratto { fill: none; stroke: var(--blu-notte); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .5s; }
.s-carica { fill: var(--accento); transform-box: fill-box; transform-origin: bottom; transform: scaleY(.6); opacity: .9; }
.s-saetta { fill: var(--bianco); stroke: var(--blu-notte); stroke-width: 1.5; stroke-linejoin: round; }
.s-finestre rect { fill: var(--fondo-accento); transition: fill .5s; }
.s-finestre.is-accese rect { fill: var(--dettaglio); }
.s-flusso { fill: none; stroke: var(--dettaglio); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 2 14; opacity: 0; }
.s-flusso--accumulo { stroke: var(--accento); }
/* sera: il suolo e i tratti si leggono sul blu notte */
.tema__scena.is-sera .s-suolo { stroke: rgba(196, 215, 248, .4); }
.tema__scena.is-sera .s-tratto { stroke: var(--su-scuro-tenue); }
.tema__scena.is-sera .s-contorno, .tema__scena.is-sera .s-pannello { stroke: var(--su-scuro-tenue); }
.tema__scena.is-sera .s-contorno { fill: #0B2242; }
.tema__scena.is-sera .tema__nodo { color: var(--bianco); }
.tema__scena.is-sera .tema__nodo span { color: var(--su-scuro-tenue); }

.cursore { display: grid; gap: var(--s-2); max-width: var(--lettura); }
.cursore__nome { font-size: var(--t-etichetta); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accento); }
.cursore__barra {
  --v: 50%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: var(--bersaglio); margin: 0;
  background: transparent; cursor: pointer; touch-action: pan-y;
}
.cursore__barra:focus-visible { outline: none; }
.cursore__barra:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(68, 111, 198, .35), 0 4px 12px -2px rgba(4, 21, 44, .3); border-color: var(--blu-notte); }
.cursore__barra:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(68, 111, 198, .35); border-color: var(--blu-notte); }
.cursore__barra::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accento) var(--v), var(--bordo) var(--v)); }
.cursore__barra::-moz-range-track { height: 6px; border-radius: 6px; background: var(--bordo); }
.cursore__barra::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accento); }
.cursore__barra::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; margin-top: -11px; border-radius: 50%;
  background: var(--bianco); border: 2px solid var(--accento);
  box-shadow: 0 4px 12px -2px rgba(4, 21, 44, .3);
  transition: transform .2s var(--molla);
}
.cursore__barra::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--bianco); border: 2px solid var(--accento); box-shadow: 0 4px 12px -2px rgba(4, 21, 44, .3); }
.cursore__barra:active::-webkit-slider-thumb { transform: scale(1.12); }
.cursore__tacche { display: flex; justify-content: space-between; font-size: var(--t-secondario); color: var(--testo-tenue); }
.cursore__tacche span { transition: color .3s; }
.cursore__tacche .is-attiva { color: var(--blu-notte); font-weight: 600; }

/* ——— conferma: la scheda si apre fino ai bordi mentre si arriva ——— */
.conferma__scheda {
  --apertura: 0; /* 0 = scheda sugli assi del contenitore, 1 = a tutta larghezza */
  --lato: max(var(--margine), calc((100% - var(--contenitore)) / 2));
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: var(--s-12);
  clip-path: inset(0 calc((1 - var(--apertura)) * var(--lato)) round calc((1 - var(--apertura)) * var(--raggio-scheda)));
  background: var(--blu-notte);
  color: var(--su-scuro);
}
.conferma__foto { position: absolute; inset: -6% 0; z-index: -3; width: 100%; height: 112%; object-fit: cover; object-position: 60% 40%; }
.conferma__velo {
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg, rgba(4, 21, 44, .96) 0%, rgba(4, 21, 44, .9) 45%, rgba(4, 21, 44, .62) 100%);
}
.conferma__sagoma { position: absolute; z-index: -1; right: max(var(--margine), calc((100% - var(--contenitore)) / 2)); top: 50%; width: clamp(180px, 24%, 280px); transform: translateY(-50%); opacity: .14; }
@media (min-width: 768px) { .conferma__sagoma { opacity: .3; } .conferma__scheda { padding-block: var(--s-24); } }
/* il contenuto resta sugli assi del contenitore, con il rientro della scheda */
.conferma__dentro { width: min(100% - 2 * var(--margine), var(--contenitore)); margin-inline: auto; padding-inline: var(--s-6); }
@media (min-width: 768px) { .conferma__dentro { padding-inline: var(--s-16); } }
.conferma__testo { margin-top: var(--s-3); max-width: 30em; font-size: var(--t-intro); line-height: 1.45; }
.conferma__azioni { margin-top: var(--s-8); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-8); }
.stato { margin-top: var(--s-4); display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-secondario); font-weight: 500; color: var(--su-scuro-tenue); }
.stato__punto { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .2); }
.recapito { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.recapito__indirizzo { display: inline-flex; flex-wrap: wrap; align-items: center; min-height: var(--bersaglio); font-size: var(--t-corpo); font-weight: 500; color: var(--su-scuro); text-underline-offset: 4px; overflow-wrap: anywhere; }
.recapito__copia {
  min-height: var(--bersaglio); padding: var(--s-2) var(--s-4);
  border: 1px solid rgba(196, 215, 248, .45); border-radius: var(--raggio-controllo);
  background: rgba(255, 255, 255, .06); color: var(--su-scuro);
  font: 500 var(--t-secondario)/1.2 var(--testi); cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.recapito__copia:hover { background: rgba(255, 255, 255, .14); border-color: var(--su-scuro-tenue); }
@media (max-width: 479px) { .conferma__azioni .btn { width: 100%; } }

/* ——— piede ——— */
.piede { border-top: 1px solid var(--bordo); }
.piede__riga { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-6); padding-block: var(--s-8); }
.piede__testo { font-size: var(--t-secondario); color: var(--testo-tenue); }
.piede .collegamento { display: inline-flex; align-items: center; min-height: var(--bersaglio); }
.marchi--piede .marchio--presotto { height: 32px; }
.marchi--piede .marchio--primasolar { height: 48px; }
.marchi--piede .marchi__filetto { height: 32px; }

/* ——— barra di conferma (telefono): l'azione resta sotto il pollice ——— */
.barra-conferma {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-3) var(--margine) calc(var(--s-3) + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid var(--bordo);
  transform: translateY(110%); transition: transform .45s var(--molla);
}
.barra-conferma.is-visibile { transform: translateY(0); }
.barra-conferma__testo { font-size: var(--t-etichetta); line-height: 1.35; color: var(--testo-tenue); }
.barra-conferma__testo strong { font-size: .875rem; color: var(--blu-notte); font-weight: 600; }
.barra-conferma[hidden] { display: none; }
@media (min-width: 768px) { .barra-conferma { display: none; } }

/* ——— movimento ——— */
.js [data-rivela], .js [data-entra], .js .parola { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rivela], .js [data-entra], .js .parola { opacity: 1; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .barra-conferma, .tema, .salta { display: none !important; }
  .js [data-rivela], .js [data-entra], .js .parola { opacity: 1 !important; transform: none !important; }
}
