/* ==========================================================================
   D.AMA Impianti S.r.l. — foglio di stile del sito
   Nessuno stile inline nell'HTML: tutto passa da qui (serve alla CSP).
   ========================================================================== */

/* ---------- Font (ospitati sul sito, licenza SIL OFL) ---------- */
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../fonts/barlow-semi-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../fonts/barlow-semi-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Font di riserva con le misure di Barlow ----------
   Finché Barlow non è scaricato si vede Arial (Windows, Mac, iPhone) o Roboto (Android),
   ridimensionati per occupare lo stesso spazio: così il testo non va a capo in modo diverso
   e la pagina non "salta" quando arriva il font vero (audit M2).
   Valori calcolati con audit/metriche-font.mjs. */
@font-face {
  font-family: "Barlow riserva A";
  src: local("Arial"), local("ArialMT");
  font-weight: 400;
  size-adjust: 96.03%;
  ascent-override: 104.14%;
  descent-override: 20.83%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Barlow riserva R";
  src: local("Roboto"), local("Roboto-Regular");
  font-weight: 400;
  size-adjust: 96.06%;
  ascent-override: 104.1%;
  descent-override: 20.82%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Barlow riserva A";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600;
  size-adjust: 90.93%;
  ascent-override: 109.97%;
  descent-override: 21.99%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Barlow riserva R";
  src: local("Roboto Bold"), local("Roboto-Bold");
  font-weight: 600;
  size-adjust: 95.81%;
  ascent-override: 104.37%;
  descent-override: 20.87%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Barlow SC riserva A";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600;
  size-adjust: 82.47%;
  ascent-override: 121.25%;
  descent-override: 24.25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Barlow SC riserva R";
  src: local("Roboto Bold"), local("Roboto-Bold");
  font-weight: 600;
  size-adjust: 86.9%;
  ascent-override: 115.07%;
  descent-override: 23.01%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Barlow SC riserva A";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 700;
  size-adjust: 83.79%;
  ascent-override: 119.34%;
  descent-override: 23.87%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Barlow SC riserva R";
  src: local("Roboto Bold"), local("Roboto-Bold");
  font-weight: 700;
  size-adjust: 88.29%;
  ascent-override: 113.26%;
  descent-override: 22.65%;
  line-gap-override: 0%;
}

/* ---------- Variabili ---------- */
:root {
  /* colori del logo */
  --blu: #14599b;
  --blu-scuro: #0f4a82;
  --azzurro: #299ad9;
  --azzurro-luce: #7cc7f2;
  --azzurro-tenue: #eaf5fc;
  --notte: #0b2e59;
  --notte-profondo: #071f3d;

  /* testo e superfici */
  --inchiostro: #16243a;
  --testo-2: #45556b;
  --testo-3: #637287;
  --linea: #d9e2ec;
  --linea-tenue: #e8eef5;
  --sfondo: #ffffff;
  --sfondo-alt: #f3f7fb;

  /* settori */
  --gas: #8f5200;
  --gas-tenue: #fdf0dc;
  --gas-segno: #e8961e;
  --acqua: #0b5f95;
  --acqua-tenue: #e3f2fc;
  --acqua-segno: #299ad9;

  /* D.Ama Planner (blu dell'app) */
  --planner: #1d4ed8;
  --planner-scuro: #1e3a8a;

  --font-testo: "Barlow", "Barlow riserva A", "Barlow riserva R", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  --font-titoli: "Barlow Semi Condensed", "Barlow SC riserva A", "Barlow SC riserva R", "Barlow", system-ui,
    -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --ombra-1: 0 1px 2px rgba(11, 46, 89, 0.06), 0 6px 18px rgba(11, 46, 89, 0.06);
  --ombra-2: 0 18px 50px rgba(11, 46, 89, 0.14);
  --ombra-3: 0 30px 80px rgba(4, 18, 40, 0.35);

  --contenitore: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --sezione: clamp(64px, 9vw, 120px);
  --alt-header: 84px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--alt-header) + 16px);
}

body {
  margin: 0;
  background: var(--sfondo);
  color: var(--inchiostro);
  font-family: var(--font-testo);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.menu-aperto {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--blu);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blu-scuro);
}

/* il numero di telefono non va mai a capo a metà (audit B2) */
a[href^="tel:"] {
  white-space: nowrap;
}

/* Area di tocco più grande per link piccoli: un rettangolo invisibile intorno al link,
   senza cambiare l'aspetto. Le misure sono scelte per non sovrapporsi ai link vicini. (audit M5) */
.footer a,
.briciole a,
.recapito .link-freccia,
.chip {
  position: relative;
}

.footer a::after,
.briciole a::after,
.recapito .link-freccia::after,
.chip::after {
  content: "";
  position: absolute;
}

.footer a::after {
  inset: -5px -4px;
}

.briciole a::after {
  inset: -10px -4px;
}

.recapito .link-freccia::after {
  inset: -10px -6px;
}

.chip::after {
  inset: -4px;
}

:focus-visible {
  outline: 3px solid var(--azzurro);
  outline-offset: 3px;
  border-radius: 4px;
}

p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-titoli);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--notte);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.55rem + 3.9vw, 4.4rem);
}

h2 {
  font-size: clamp(2rem, 1.45rem + 2.2vw, 3rem);
}

h3 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
}

.icona {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icona--piccola {
  width: 18px;
  height: 18px;
}

.icona--grande {
  width: 30px;
  height: 30px;
}

.visivamente-nascosto {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.salta {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-s);
  background: var(--notte);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.salta:focus {
  top: 12px;
  color: #fff;
}

/* ---------- Layout ---------- */
.contenitore {
  width: 100%;
  max-width: calc(var(--contenitore) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sezione {
  padding-block: var(--sezione);
}

.sezione--alt {
  background: var(--sfondo-alt);
}

.sezione--scura {
  position: relative;
  overflow: hidden;
  background: var(--notte);
  color: #d6e4f3;
}

.sezione--scura h2,
.sezione--scura h3 {
  color: #fff;
}

.intestazione {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.intestazione--centro {
  margin-inline: auto;
  text-align: center;
}

.intestazione > p:not(.occhiello) {
  margin-top: 18px;
  color: var(--testo-2);
  font-size: 1.125rem;
}

.sezione--scura .intestazione > p:not(.occhiello) {
  color: #b9cde3;
}

.occhiello {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-titoli);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blu);
}

.occhiello::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--azzurro);
}

.sezione--scura .occhiello,
.hero .occhiello,
.banda-planner .occhiello {
  color: var(--azzurro-luce);
}

.lead {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--testo-2);
}

/* ---------- Pulsanti ---------- */
.pulsanti {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-titoli);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn .icona {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.btn:hover .icona--freccia {
  transform: translateX(3px);
}

.btn--primario {
  background: var(--blu);
  color: #fff;
  box-shadow: 0 8px 22px rgba(20, 89, 155, 0.28);
}

.btn--primario:hover {
  background: var(--blu-scuro);
  color: #fff;
  transform: translateY(-1px);
}

.btn--secondario {
  border-color: var(--linea);
  background: #fff;
  color: var(--notte);
}

.btn--secondario:hover {
  border-color: var(--blu);
  color: var(--blu);
}

.btn--chiaro {
  background: #fff;
  color: var(--notte);
}

.btn--chiaro:hover {
  background: var(--azzurro-tenue);
  color: var(--notte);
  transform: translateY(-1px);
}

.btn--contorno-chiaro {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn--contorno-chiaro:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn--piccolo {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 1rem;
}

.link-freccia {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
}

.link-freccia .icona {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.link-freccia:hover .icona {
  transform: translateX(3px);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

@supports (backdrop-filter: blur(10px)) {
  .header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(160%) blur(14px);
  }
}

.header.scrollato {
  border-color: var(--linea-tenue);
  box-shadow: 0 6px 24px rgba(11, 46, 89, 0.08);
}

.header__barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--alt-header);
}

.header__logo {
  display: block;
  flex: none;
  border-radius: 6px;
}

/* logo ufficiale (ellisse con la scritta) */
.header__logo img {
  width: auto;
  height: 64px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__lista {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  position: relative;
  display: block;
  padding: 10px 9px;
  border-radius: 8px;
  color: var(--notte);
  font-family: var(--font-titoli);
  font-size: 1.04rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--azzurro);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav__link:hover {
  color: var(--blu);
}

.nav__link:hover::after,
.nav__link.attivo::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__link[aria-current="page"],
.nav__link.attivo {
  color: var(--blu);
}

.nav__riservata {
  flex: none;
}

.menu-pulsante {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: #fff;
  color: var(--notte);
  cursor: pointer;
}

.menu-pulsante .icona-chiudi {
  display: none;
}

.menu-pulsante[aria-expanded="true"] .icona-apri {
  display: none;
}

.menu-pulsante[aria-expanded="true"] .icona-chiudi {
  display: block;
}

@media (max-width: 1200px) {
  :root {
    --alt-header: 68px;
  }

  .header__logo img {
    height: 52px;
  }

  .menu-pulsante {
    display: inline-flex;
  }

  /* Pannello a tutto schermo sotto l'header. "absolute" e non "fixed": il backdrop-filter
     dell'header fa da riferimento anche agli elementi fixed, e il pannello restava alto 65px
     (audit C1). Qui 100% = altezza dell'header. */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - 100%);
    height: calc(100dvh - 100%);
    z-index: 49;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 24px var(--gutter) 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-top: 1px solid var(--linea-tenue);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .nav.aperto {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav__lista {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__link {
    padding: 15px 4px;
    border-bottom: 1px solid var(--linea-tenue);
    border-radius: 0;
    font-size: 1.3rem;
  }

  .nav__link::after {
    display: none;
  }

  .nav__riservata {
    align-self: flex-start;
  }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 85% 20%, rgba(41, 154, 217, 0.22), transparent 60%),
    linear-gradient(160deg, #0d3566 0%, var(--notte) 45%, var(--notte-profondo) 100%);
  color: #d6e4f3;
}

/* griglia "da tavola tecnica" */
.hero::before,
.pagina-hero--scura::before,
.banda-planner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.hero__swoosh {
  position: absolute;
  top: -18%;
  right: -14%;
  width: min(1100px, 95vw);
  opacity: 0.55;
  pointer-events: none;
}

.hero__griglia {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(120px, 14vw, 168px);
}

.hero h1 {
  color: #fff;
}

.hero h1 .evidenza {
  color: var(--azzurro-luce);
}

.hero__slogan {
  margin-top: 16px;
  font-family: var(--font-titoli);
  font-size: 1.2rem;
  font-weight: 600;
  font-style: italic;
  color: var(--azzurro-luce);
}

.hero .lead {
  margin-top: 22px;
  max-width: 600px;
  color: #c3d5ea;
}

.hero .pulsanti {
  margin-top: 34px;
}

.hero__utenti {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 30px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, 0.05);
  color: #d6e4f3;
  text-decoration: none;
  line-height: 1.45;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hero__utenti:hover {
  border-color: rgba(124, 199, 242, 0.55);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.hero__utenti .icona {
  margin-top: 1px;
  color: var(--azzurro-luce);
}

.hero__utenti strong {
  display: block;
  color: #fff;
}

.hero__visuale {
  position: relative;
}

/* tavola tecnica (illustrazione: contatori + telecontrollo) */
.tavola {
  position: relative;
  border: 1px solid rgba(124, 199, 242, 0.28);
  border-radius: var(--r-l);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: var(--ombra-3);
  overflow: hidden;
  /* le animazioni del disegno ridisegnano solo il disegno, non lo sfondo dell'hero (audit A3) */
  contain: layout paint;
}

.tavola svg {
  width: 100%;
  height: auto;
  will-change: transform;
}

.tavola__cartiglio {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid rgba(124, 199, 242, 0.22);
  font-family: var(--font-titoli);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9fbfdd;
}

.disegno-tratto {
  fill: none;
  stroke: #e9f3fc;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.disegno-tratto--sottile {
  stroke-width: 1.2;
  stroke: #9fc3e4;
}

.disegno-riempito {
  fill: rgba(124, 199, 242, 0.12);
}

.disegno-accento {
  fill: none;
  stroke: var(--azzurro-luce);
  stroke-width: 2;
  stroke-linecap: round;
}

.disegno-punto {
  fill: var(--azzurro-luce);
}

.disegno-gas {
  fill: #f2b14c;
}

.disegno-testo {
  fill: #9fc3e4;
  font-family: var(--font-titoli);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.disegno-quota {
  fill: none;
  stroke: #6f97bf;
  stroke-width: 1;
}

.flusso {
  fill: none;
  stroke: var(--azzurro-luce);
  stroke-width: 1.6;
  stroke-dasharray: 5 7;
  stroke-linecap: round;
}

.onda {
  fill: none;
  stroke: var(--azzurro-luce);
  stroke-width: 2;
  stroke-linecap: round;
}

.hero__etichetta {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--notte);
  box-shadow: var(--ombra-2);
  font-family: var(--font-titoli);
  font-weight: 600;
  line-height: 1.2;
}

.hero__etichetta small {
  display: block;
  font-family: var(--font-testo);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--testo-3);
}

.hero__etichetta .icona {
  color: var(--blu);
}

.hero__etichetta--alto {
  top: -20px;
  right: -18px;
}

.hero__etichetta--basso {
  bottom: -24px;
  left: -26px;
}

@media (max-width: 980px) {
  .hero__griglia {
    grid-template-columns: 1fr;
  }

  .hero__visuale {
    max-width: 560px;
  }

  .hero__etichetta--alto {
    right: 12px;
  }

  .hero__etichetta--basso {
    left: 12px;
  }
}

@media (max-width: 560px) {
  .hero__etichetta {
    display: none;
  }
}

/* ---------- Numeri ---------- */
.numeri {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * clamp(72px, 9vw, 96px));
}

.numeri__griglia {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--r-l);
  background: #fff;
  box-shadow: var(--ombra-2);
  overflow: hidden;
}

.numero {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: clamp(22px, 3vw, 34px) clamp(18px, 2.4vw, 32px);
}

.numero dd {
  margin: 0;
}

.numero + .numero {
  border-left: 1px solid var(--linea-tenue);
}

.numero__valore {
  display: block;
  font-family: var(--font-titoli);
  font-size: clamp(2.5rem, 1.9rem + 2vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--notte);
  font-variant-numeric: tabular-nums;
}

.numero__valore .unita {
  color: var(--azzurro);
}

.numero__etichetta {
  display: block;
  margin-top: 10px;
  color: var(--testo-2);
  font-size: 0.98rem;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .numeri__griglia {
    grid-template-columns: repeat(2, 1fr);
  }

  .numero:nth-child(3) {
    border-left: 0;
  }

  .numero:nth-child(n + 3) {
    border-top: 1px solid var(--linea-tenue);
  }
}

/* ---------- Chi siamo ---------- */
.chi-siamo__griglia {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

.chi-siamo__testo .lead {
  margin-top: 22px;
}

.chi-siamo__testo p + p {
  margin-top: 18px;
}

.intestazione--centro .occhiello,
.occhiello--centro {
  margin-inline: auto;
}

.chi-siamo__testo p {
  color: var(--testo-2);
}

.citazione {
  position: relative;
  margin-top: 32px;
  padding: 24px 26px 24px 30px;
  border-left: 4px solid var(--azzurro);
  border-radius: 0 var(--r-m) var(--r-m) 0;
  background: var(--azzurro-tenue);
}

.citazione p {
  font-family: var(--font-titoli);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--notte);
}

.citazione footer {
  margin-top: 8px;
  color: var(--testo-2);
  font-size: 0.95rem;
}

.valori {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.valore {
  padding: 24px 22px;
  border: 1px solid var(--linea-tenue);
  border-radius: var(--r-m);
  background: #fff;
  box-shadow: var(--ombra-1);
}

.valore__icona,
.scheda__icona {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--azzurro-tenue);
  color: var(--blu);
}

.valore h3 {
  font-size: 1.2rem;
}

.valore p {
  margin-top: 8px;
  color: var(--testo-2);
  font-size: 0.98rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .chi-siamo__griglia {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .valori {
    grid-template-columns: 1fr;
  }
}

/* certificazione ISO 9001 */
.certificazione {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: start;
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--linea-tenue);
  border-radius: var(--r-l);
  background: linear-gradient(135deg, #fff 40%, var(--azzurro-tenue));
  box-shadow: var(--ombra-1);
}

.certificazione__marchio {
  display: grid;
  place-content: center;
  width: 132px;
  aspect-ratio: 1;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--notte);
  box-shadow: 0 0 0 3px var(--azzurro), var(--ombra-2);
  color: #fff;
  font-family: var(--font-titoli);
  line-height: 1;
  text-align: center;
}

.certificazione__iso {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--azzurro-luce);
}

.certificazione__numero {
  font-size: 2.5rem;
  font-weight: 700;
}

.certificazione__anno {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #b9cde3;
}

.certificazione .occhiello {
  margin-bottom: 8px;
}

.certificazione h3 {
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
}

.certificazione__testo > p:not(.occhiello) {
  margin-top: 10px;
  color: var(--testo-2);
}

.certificazione__dati {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 24px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--linea);
}

.certificazione__dati dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--testo-3);
}

.certificazione__dati dd {
  margin: 2px 0 0;
  font-weight: 600;
  color: var(--notte);
}

.certificazione__testo > .certificazione__nota {
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--testo-3);
}

@media (max-width: 760px) {
  .certificazione {
    grid-template-columns: 1fr;
  }

  .certificazione__marchio {
    width: 108px;
  }

  .certificazione__numero {
    font-size: 2.1rem;
  }

  .certificazione__dati {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* linea del tempo */
.storia {
  margin-top: clamp(56px, 7vw, 88px);
}

.storia h3 {
  margin-bottom: 28px;
  font-size: 1.6rem;
}

.storia__lista {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.storia__lista::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--azzurro), var(--blu));
}

.tappa {
  position: relative;
  padding-top: 34px;
}

.tappa::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 16px;
  height: 16px;
  border: 3px solid var(--azzurro);
  border-radius: 50%;
  background: #fff;
}

.tappa:last-child::before {
  border-color: var(--blu);
  background: var(--blu);
}

.tappa__anno {
  display: block;
  font-family: var(--font-titoli);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: var(--blu);
}

.tappa h4 {
  margin-top: 8px;
  color: var(--notte);
}

.tappa p {
  margin-top: 6px;
  color: var(--testo-2);
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 1000px) {
  /* "ol." serve a battere "ol[class] { padding: 0 }": senza, il rientro spariva e la linea
     passava sopra il testo (audit A2) */
  ol.storia__lista {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-left: 34px;
  }

  .storia__lista::before {
    top: 0;
    bottom: 0;
    left: 7px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--azzurro), var(--blu));
  }

  .tappa {
    padding-top: 0;
  }

  .tappa::before {
    left: -34px;
    top: 4px;
  }
}

/* ---------- Schede (servizi, funzioni, posizioni) ---------- */
.griglia-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.griglia-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.griglia-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1000px) {
  .griglia-3,
  .griglia-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .griglia-2,
  .griglia-3,
  .griglia-4 {
    grid-template-columns: 1fr;
  }
}

.scheda {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--linea-tenue);
  border-radius: var(--r-l);
  background: #fff;
  box-shadow: var(--ombra-1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* solo con mouse: sui touch screen l'effetto resterebbe "appiccicato" dopo un tocco (audit B1) */
@media (hover: hover) {
  .scheda:hover {
    transform: translateY(-3px);
    border-color: #cfe2f2;
    box-shadow: var(--ombra-2);
  }
}

.scheda h3 {
  font-size: 1.45rem;
}

.scheda > p {
  margin-top: 10px;
  color: var(--testo-2);
}

.scheda .scheda__icona {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.scheda--servizio {
  overflow: hidden;
}

.scheda--servizio::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blu), var(--azzurro));
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (hover: hover) {
  .scheda--servizio:hover::after {
    opacity: 1;
  }
}

.elenco-spunte {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.elenco-spunte li {
  position: relative;
  padding-left: 30px;
  color: var(--inchiostro);
  line-height: 1.5;
}

.elenco-spunte li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--azzurro-tenue)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314599b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E")
    center / 13px no-repeat;
}

.sezione--scura .elenco-spunte li,
.banda-planner .elenco-spunte li {
  color: #dbe7f5;
}

.sezione--scura .elenco-spunte li::before,
.banda-planner .elenco-spunte li::before {
  background-color: rgba(124, 199, 242, 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237cc7f2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E");
}

/* ---------- Committenti ---------- */
.committenti__gruppo + .committenti__gruppo {
  margin-top: 40px;
}

.committenti__titolo {
  margin-bottom: 16px;
  font-family: var(--font-titoli);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--testo-3);
}

.nomi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.nome {
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 14px 20px;
  border: 1px solid var(--linea-tenue);
  border-radius: var(--r-m);
  background: #fff;
  font-family: var(--font-titoli);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--notte);
}

.nome small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-testo);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--testo-3);
}

.nome--partner {
  background: var(--sfondo-alt);
}

@media (max-width: 560px) {
  .nomi {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .nome {
    min-height: 64px;
    padding: 12px 14px;
    font-size: 1.02rem;
  }
}

/* ---------- Lavori e mappa ---------- */
.filtri {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.filtro {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: #fff;
  color: var(--notte);
  font-family: var(--font-titoli);
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filtro:hover {
  border-color: var(--blu);
}

.filtro[aria-pressed="true"] {
  border-color: var(--notte);
  background: var(--notte);
  color: #fff;
}

.filtro__conta {
  min-width: 26px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--sfondo-alt);
  color: var(--testo-2);
  font-size: 0.86rem;
  text-align: center;
}

.filtro[aria-pressed="true"] .filtro__conta {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.segno {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.segno--gas {
  background: var(--gas-segno);
}

.segno--acqua {
  background: var(--acqua-segno);
}

.filtri__stato {
  margin-left: auto;
  color: var(--testo-3);
  font-size: 0.95rem;
}

.lavori__griglia {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.territorio {
  position: sticky;
  top: calc(var(--alt-header) + 20px);
  padding: 22px;
  border: 1px solid var(--linea-tenue);
  border-radius: var(--r-l);
  background: #fff;
  box-shadow: var(--ombra-1);
}

.mappa-italia {
  width: 100%;
  max-width: 440px;
  height: auto;
  margin-inline: auto;
}

.regione {
  fill: #e6edf5;
  stroke: #fff;
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.regione.attiva {
  fill: #9ccfee;
  cursor: pointer;
  transition: fill 0.2s ease;
}

.regione.attiva:hover,
.regione.attiva:focus-visible {
  fill: var(--azzurro);
  outline: none;
}

.regione.attiva.selezionata {
  fill: var(--blu);
}

.mappa-sede-alone {
  fill: rgba(232, 150, 30, 0.25);
}

.mappa-sede-punto {
  fill: var(--gas-segno);
  stroke: #fff;
  stroke-width: 2;
}

.mappa-sede text {
  fill: var(--notte);
  font-family: var(--font-titoli);
  font-size: 19px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.legenda {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 10px;
  color: var(--testo-2);
  font-size: 0.9rem;
}

.legenda span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legenda i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legenda .l-attiva {
  background: #9ccfee;
}

.legenda .l-sede {
  border-radius: 50%;
  background: var(--gas-segno);
}

.legenda .l-altre {
  background: #e6edf5;
}

.regioni-chip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip {
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: #fff;
  color: var(--notte);
  font-family: var(--font-titoli);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  border-color: var(--blu);
}

.chip[aria-pressed="true"] {
  border-color: var(--blu);
  background: var(--blu);
  color: #fff;
}

.pannello-regione {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--r-m);
  background: var(--sfondo-alt);
}

.pannello-regione h3 {
  font-size: 1.25rem;
}

.pannello-regione p {
  margin-top: 6px;
  color: var(--testo-2);
  font-size: 0.97rem;
  line-height: 1.55;
}

.pannello-regione ul {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-left: 18px;
  color: var(--inchiostro);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* senza JavaScript noscript.css le mostra tutte */
.regione-info:not(.mostrata) {
  display: none;
}

.lavori__lista {
  display: grid;
  gap: 14px;
}

.lavoro {
  padding: 20px 22px;
  border: 1px solid var(--linea-tenue);
  border-left: 4px solid var(--acqua-segno);
  border-radius: var(--r-m);
  background: #fff;
  box-shadow: var(--ombra-1);
}

.lavoro[data-settore="gas"] {
  border-left-color: var(--gas-segno);
}

.lavoro[hidden] {
  display: none;
}

.lavoro__testa {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.etichetta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-titoli);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.etichetta .icona {
  width: 15px;
  height: 15px;
}

.etichetta--gas {
  background: var(--gas-tenue);
  color: var(--gas);
}

.etichetta--acqua {
  background: var(--acqua-tenue);
  color: var(--acqua);
}

.lavoro__periodo {
  font-family: var(--font-titoli);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--notte);
  font-variant-numeric: tabular-nums;
}

.lavoro h3 {
  margin-top: 12px;
  font-family: var(--font-testo);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--inchiostro);
}

.lavoro__dati {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--linea);
}

.lavoro__dati dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--testo-3);
}

.lavoro__dati dd {
  margin: 2px 0 0;
  color: var(--inchiostro);
  font-size: 0.95rem;
  line-height: 1.4;
}

.lavori__altri {
  width: 100%;
  margin-top: 16px;
}

.lavoro:focus {
  outline: none;
}

.lavoro:focus-visible {
  outline: 3px solid var(--azzurro);
}

.lavori__vuoto {
  padding: 28px;
  border: 1px dashed var(--linea);
  border-radius: var(--r-m);
  color: var(--testo-2);
  text-align: center;
}

@media (max-width: 1000px) {
  .lavori__griglia {
    grid-template-columns: 1fr;
  }

  .territorio {
    position: static;
  }

  .mappa-italia {
    max-width: 360px;
  }
}

@media (max-width: 420px) {
  .filtri {
    gap: 8px;
  }

  .filtro {
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.98rem;
  }
}

@media (max-width: 560px) {
  .lavoro__dati {
    grid-template-columns: 1fr 1fr;
  }

  .lavoro__dati div:last-child {
    grid-column: 1 / -1;
  }

  .filtri__stato {
    width: 100%;
    margin-left: 0;
  }
}

/* ---------- Mezzi ---------- */
.mezzi__griglia {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.mezzo {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  gap: 4px 18px;
  padding: 24px;
  border: 1px solid rgba(124, 199, 242, 0.2);
  border-radius: var(--r-l);
  background: rgba(255, 255, 255, 0.04);
}

.mezzo__conta {
  grid-row: span 2;
  font-family: var(--font-titoli);
  font-size: 3rem;
  font-weight: 700;
  line-height: 0.9;
  color: var(--azzurro-luce);
}

.mezzo h3 {
  align-self: end;
  font-size: 1.25rem;
}

.mezzo p {
  color: #b9cde3;
  font-size: 0.95rem;
  line-height: 1.5;
}

.mezzo ul {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 14px 0 0;
  list-style: none;
  border-top: 1px solid rgba(124, 199, 242, 0.16);
  color: #dbe7f5;
  font-size: 0.93rem;
}

.mezzo li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.mezzo li span {
  color: #8fb1d3;
  font-variant-numeric: tabular-nums;
}

.mezzi__nota {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  color: #b9cde3;
}

.mezzi__nota .icona {
  color: var(--azzurro-luce);
}

@media (max-width: 1000px) {
  .mezzi__griglia {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .mezzi__griglia {
    grid-template-columns: 1fr;
  }
}

.swoosh-sfondo {
  position: absolute;
  right: -260px;
  bottom: -220px;
  width: 760px;
  opacity: 0.18;
  pointer-events: none;
}

/* ---------- Banda Planner (home) ---------- */
.banda-planner {
  position: relative;
  overflow: hidden;
  border-radius: clamp(20px, 3vw, 32px);
  background: radial-gradient(700px 400px at 90% 0%, rgba(124, 199, 242, 0.25), transparent 60%),
    linear-gradient(135deg, var(--planner) 0%, var(--planner-scuro) 55%, var(--notte-profondo) 100%);
  color: #dbe7f5;
}

.banda-planner__griglia {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(32px, 5vw, 64px);
}

.banda-planner h2 {
  color: #fff;
}

.banda-planner__testo > p:not(.occhiello) {
  margin-top: 18px;
  color: #c9d8f1;
}

.banda-planner .elenco-spunte {
  margin-top: 24px;
}

.banda-planner .pulsanti {
  margin-top: 30px;
}

.marchio-planner {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.marchio-planner img {
  width: auto;
  height: 58px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3));
}

.marchio-planner span {
  font-family: var(--font-titoli);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

@media (max-width: 900px) {
  .banda-planner__griglia {
    grid-template-columns: 1fr;
  }
}

/* ---------- Bande di rimando ---------- */
.rimandi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.rimando {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(26px, 3.5vw, 40px);
  border-radius: var(--r-l);
  background: var(--sfondo-alt);
  border: 1px solid var(--linea-tenue);
}

.rimando--utenti {
  background: linear-gradient(135deg, #fff8ec, #fdf0dc);
  border-color: #f6e2c2;
}

.rimando__icona {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: #fff;
  color: var(--blu);
  box-shadow: var(--ombra-1);
}

.rimando--utenti .rimando__icona {
  color: var(--gas);
}

.rimando h2 {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
}

.rimando p {
  margin-top: 12px;
  color: var(--testo-2);
}

.rimando .btn {
  margin-top: 24px;
}

@media (max-width: 800px) {
  .rimandi {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contatti ---------- */
.contatti__griglia {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.recapiti {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.recapito {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--linea-tenue);
  border-radius: var(--r-m);
  background: #fff;
  box-shadow: var(--ombra-1);
}

.recapito__icona {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--azzurro-tenue);
  color: var(--blu);
}

.recapito h3 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--testo-3);
}

.recapito p,
.recapito a {
  overflow-wrap: break-word;
}

.recapito p {
  margin-top: 2px;
  font-weight: 600;
  line-height: 1.45;
}

.recapito a {
  color: var(--notte);
  text-decoration: none;
}

.recapito a:hover {
  color: var(--blu);
  text-decoration: underline;
}

/* telefono, PEC ed e-mail: si tocca tutta la scheda, non solo la riga di testo (audit M5) */
.recapito a[href^="tel:"]::after,
.recapito a[href^="mailto:"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.recapito .link-freccia {
  margin-top: 6px;
  color: var(--blu);
  font-size: 0.95rem;
}

.recapito--largo {
  grid-column: 1 / -1;
}

.riquadro-scuro {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--r-l);
  background: linear-gradient(160deg, #0d3566, var(--notte-profondo));
  color: #c3d5ea;
}

.riquadro-scuro h3 {
  font-size: 1.7rem;
  color: #fff;
}

.riquadro-scuro p {
  margin-top: 12px;
}

.riquadro-scuro .pulsanti {
  margin-top: 26px;
}

.dati-societari {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 18px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(124, 199, 242, 0.2);
  font-size: 0.92rem;
}

.dati-societari dt {
  color: #8fb1d3;
}

.dati-societari dd {
  margin: 0;
  color: #e3edf8;
  overflow-wrap: break-word;
}

@media (max-width: 900px) {
  .contatti__griglia {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .recapiti {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  overflow: hidden;
  background: var(--notte-profondo);
  color: #a9c0d9;
  font-size: 0.97rem;
}

.footer__griglia {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
  padding-block: clamp(48px, 7vw, 80px) 40px;
}

/* nel footer scuro il logo sta su un riquadro bianco, con i suoi colori originali */
.footer__logo {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 16px;
  background: #fff;
}

.footer__logo img {
  width: 150px;
  height: auto;
}

.footer__marchio p {
  max-width: 320px;
  margin-top: 18px;
  line-height: 1.6;
}

.footer__slogan {
  font-family: var(--font-titoli);
  font-style: italic;
  font-weight: 600;
  color: var(--azzurro-luce);
}

.footer__marchio .footer__certificazione {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-weight: 600;
}

.footer__certificazione .icona {
  width: 18px;
  height: 18px;
  color: var(--azzurro-luce);
}

.footer h2 {
  margin-bottom: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer a {
  color: #d3e1f0;
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer__contatti li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.45;
}

.footer__contatti .icona {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--azzurro-luce);
}

.footer__fondo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 28px;
  padding-block: 24px 32px;
  border-top: 1px solid rgba(124, 199, 242, 0.14);
  font-size: 0.86rem;
  line-height: 1.6;
  color: #86a2c0;
}

.footer__legale {
  max-width: 820px;
}

.footer__link-legali {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 1000px) {
  .footer__griglia {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__marchio {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .footer__griglia {
    gap: 32px 20px;
  }

  .footer__griglia > :last-child {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Pagine interne
   ========================================================================== */
.pagina-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 8vw, 104px) clamp(48px, 7vw, 88px);
  background: linear-gradient(180deg, var(--sfondo-alt), #fff);
}

.pagina-hero .lead {
  max-width: 720px;
  margin-top: 22px;
}

.pagina-hero .pulsanti {
  margin-top: 32px;
}

.pagina-hero--scura {
  background: radial-gradient(900px 500px at 85% 10%, rgba(124, 199, 242, 0.22), transparent 60%),
    linear-gradient(150deg, var(--planner) 0%, var(--planner-scuro) 50%, var(--notte-profondo) 100%);
  color: #c9d8f1;
}

.pagina-hero--scura h1 {
  color: #fff;
}

.pagina-hero--scura .lead {
  color: #c9d8f1;
}

.pagina-hero--scura .occhiello {
  color: var(--azzurro-luce);
}

.pagina-hero__griglia {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

@media (max-width: 980px) {
  .pagina-hero__griglia {
    grid-template-columns: 1fr;
  }
}

.briciole {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 0.92rem;
  color: var(--testo-3);
}

.briciole a {
  color: inherit;
}

.pagina-hero--scura .briciole {
  color: #9fb9de;
}

/* testo lungo: la colonna resta allineata a sinistra come il titolo della pagina */
.prosa > * {
  max-width: 760px;
}

.prosa h2 {
  margin-top: 48px;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
}

.prosa h3 {
  margin-top: 28px;
  font-size: 1.25rem;
}

.prosa p,
.prosa ul,
.prosa ol {
  margin-top: 14px;
  color: var(--testo-2);
}

.prosa ul,
.prosa ol {
  padding-left: 22px;
}

.prosa li + li {
  margin-top: 6px;
}

.prosa .aggiornamento {
  margin-top: 40px;
  font-size: 0.92rem;
  color: var(--testo-3);
}

.prosa .nota {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: var(--r-m);
  background: var(--gas-tenue);
  color: var(--gas);
}

/* ---------- Planner: illustrazioni dei dispositivi ---------- */
.dispositivi {
  position: relative;
  min-height: 470px;
}

.schermo {
  position: relative;
  width: 92%;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ombra-3);
  overflow: hidden;
}

.schermo__barra {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #eef2f7;
  border-bottom: 1px solid #dde4ee;
}

.schermo__barra i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c9d3df;
}

.schermo__indirizzo {
  flex: 1;
  margin-left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  color: #6b7a90;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schermo__corpo {
  display: grid;
  grid-template-columns: 38% 62%;
  min-height: 300px;
}

.schermo__lista {
  padding: 14px;
  border-right: 1px solid #e3e9f1;
  background: #f8fafc;
}

.schermo__titolo {
  margin-bottom: 10px;
  font-family: var(--font-titoli);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1e3a8a;
}

.tappa-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #334155;
  font-size: 0.78rem;
  line-height: 1.25;
}

.tappa-mini + .tappa-mini {
  margin-top: 4px;
}

.tappa-mini b {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--planner);
  color: #fff;
  font-size: 0.7rem;
}

.tappa-mini--fatta b {
  background: #16a34a;
}

.tappa-mini--attiva {
  background: #e0e9ff;
}

.schermo__mappa {
  position: relative;
  background: #eef3f8;
}

.schermo__mappa svg {
  width: 100%;
  height: 100%;
}

.mm-strada {
  fill: none;
  stroke: #fff;
  stroke-width: 7;
  stroke-linecap: round;
}

.mm-strada--piccola {
  stroke-width: 4;
}

.mm-isolato {
  fill: #e1e9f2;
}

.mm-verde {
  fill: #d7ecd9;
}

.mm-percorso {
  fill: none;
  stroke: var(--planner);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mm-percorso-fatto {
  fill: none;
  stroke: #16a34a;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mm-pin {
  fill: var(--planner);
  stroke: #fff;
  stroke-width: 2;
}

.mm-pin--fatto {
  fill: #16a34a;
}

.mm-pin-testo {
  fill: #fff;
  font-family: var(--font-testo);
  font-size: 9px;
  font-weight: 600;
}

.telefono {
  position: absolute;
  right: -20px;
  bottom: -18px;
  width: 200px;
  padding: 10px;
  border-radius: 30px;
  background: #0f172a;
  box-shadow: var(--ombra-3);
}

.telefono__schermo {
  overflow: hidden;
  border-radius: 22px;
  background: #f8fafc;
}

.telefono__stato {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px 6px;
  font-size: 0.66rem;
  font-weight: 600;
  color: #334155;
}

.telefono__offline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
}

.telefono__offline .icona {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.telefono__intestazione {
  padding: 8px 14px 10px;
  background: var(--planner);
  color: #fff;
}

.telefono__intestazione small {
  display: block;
  color: #bfd0ff;
  font-size: 0.66rem;
}

.telefono__intestazione strong {
  display: block;
  font-family: var(--font-titoli);
  font-size: 1rem;
  line-height: 1.2;
}

.telefono__corpo {
  padding: 10px 12px 14px;
  font-size: 0.72rem;
  color: #334155;
}

.telefono__riga {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #e2e8f0;
}

.telefono__riga span:first-child {
  color: #64748b;
}

.telefono__foto {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.telefono__foto span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 6px;
  background: #dbe4f0;
  color: #64748b;
}

.telefono__foto span:first-child {
  background: #c7f0d2;
  color: #15803d;
}

.telefono__foto .icona {
  width: 15px;
  height: 15px;
}

.telefono__esiti {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.telefono__esiti span {
  padding: 6px 0;
  border-radius: 7px;
  font-size: 0.62rem;
  font-weight: 600;
  text-align: center;
}

.esito-pos {
  background: #16a34a;
  color: #fff;
}

.esito-neg {
  background: #fee2e2;
  color: #b91c1c;
}

.esito-par {
  background: #fef3c7;
  color: #92400e;
}

.foto-timbro {
  position: absolute;
  left: 28px;
  bottom: -6px;
  width: 190px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ombra-2);
}

.foto-timbro__immagine {
  display: grid;
  place-items: center;
  height: 110px;
  background: linear-gradient(135deg, #dfe8f2, #c8d6e6);
}

.foto-timbro__immagine svg {
  width: 70px;
  height: 70px;
}

.foto-timbro__dati {
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.64rem;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .dispositivi {
    min-height: 0;
    padding-bottom: 250px;
  }

  .schermo {
    width: 100%;
  }

  .schermo__corpo {
    grid-template-columns: 1fr;
  }

  .schermo__lista {
    display: none;
  }

  .schermo__mappa {
    height: 220px;
  }

  .telefono {
    right: 6px;
    bottom: 0;
    width: 190px;
  }

  .foto-timbro {
    left: 6px;
    bottom: 40px;
    width: 160px;
  }

  /* pagina Planner: telefono e foto col timbro affiancati, senza che il telefono copra il
     timbro (audit M6). Il riquadro della home, senza timbro, resta com'è. */
  .pagina-hero .telefono {
    right: 0;
    width: 188px;
  }

  .pagina-hero .foto-timbro {
    left: 0;
    width: 140px;
  }

  .pagina-hero .foto-timbro__dati {
    font-size: 0.58rem;
  }
}

/* ---------- Planner: sezioni ---------- */
.problemi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.problema {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid #f3d5d5;
  border-radius: var(--r-m);
  background: #fff;
}

.problema .icona {
  margin-top: 1px;
  padding: 3px;
  border-radius: 50%;
  background: #fde8e8;
  color: #b91c1c;
}

.problema p {
  color: var(--inchiostro);
  line-height: 1.45;
}

.soluzione {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 22px 26px;
  border-radius: var(--r-m);
  background: linear-gradient(90deg, #e0e9ff, #eaf5fc);
  color: var(--planner-scuro);
  font-family: var(--font-titoli);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

.soluzione .icona {
  flex: none;
  width: 34px;
  height: 34px;
  color: var(--planner);
}

@media (max-width: 900px) {
  .problemi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .problemi {
    grid-template-columns: 1fr;
  }
}

.passi {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  counter-reset: passo;
}

.passo {
  position: relative;
  padding: 26px 22px 24px;
  border-radius: var(--r-l);
  background: #fff;
  border: 1px solid var(--linea-tenue);
  box-shadow: var(--ombra-1);
}

.passo__numero {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--planner);
  color: #fff;
  font-family: var(--font-titoli);
  font-size: 1.3rem;
  font-weight: 700;
}

.passo:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 47px;
  right: -18px;
  width: 18px;
  height: 2px;
  background: #b8c8f0;
}

.passo h3 {
  font-size: 1.2rem;
}

.passo p {
  margin-top: 8px;
  color: var(--testo-2);
  font-size: 0.96rem;
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .passi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .passo::after {
    display: none;
  }
}

@media (max-width: 600px) {
  .passi {
    grid-template-columns: 1fr;
  }
}

.scheda--funzione .scheda__icona {
  background: #e0e9ff;
  color: var(--planner);
}

.scheda--funzione h3 {
  font-size: 1.25rem;
}

.scheda--funzione > p {
  font-size: 0.98rem;
}

.vantaggi .scheda {
  border-top: 4px solid var(--planner);
}

.nato-sul-campo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.nato-sul-campo img {
  width: clamp(120px, 16vw, 180px);
  height: auto;
}

.nato-sul-campo blockquote p {
  font-family: var(--font-titoli);
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.nato-sul-campo blockquote footer {
  margin-top: 16px;
  color: #b9cde3;
}

@media (max-width: 700px) {
  .nato-sul-campo {
    grid-template-columns: 1fr;
  }
}

.faq {
  display: grid;
  gap: 12px;
  max-width: 860px;
}

.faq details {
  border: 1px solid var(--linea-tenue);
  border-radius: var(--r-m);
  background: #fff;
  box-shadow: var(--ombra-1);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-titoli);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--notte);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--blu);
  border-bottom: 2px solid var(--blu);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(225deg) translate(-3px, -3px);
}

.faq details p {
  padding: 0 22px 20px;
  color: var(--testo-2);
}

.cta-finale {
  text-align: center;
}

.cta-finale h2 {
  max-width: 760px;
  margin-inline: auto;
}

.cta-finale .lead {
  max-width: 640px;
  margin: 16px auto 0;
}

.cta-finale .pulsanti {
  justify-content: center;
  margin-top: 30px;
}

/* ---------- Richiesta demo: modulo ---------- */
.richiesta {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.richiesta__intro .lead {
  margin-top: 18px;
}

.richiesta__intro .elenco-spunte {
  margin-top: 22px;
}

.richiesta__intro .btn {
  margin-top: 22px;
}

.modulo,
.modulo-grazie {
  padding: clamp(22px, 3.5vw, 36px);
  border: 1px solid var(--linea-tenue);
  border-radius: var(--r-l);
  background: #fff;
  box-shadow: var(--ombra-2);
}

.modulo__titolo {
  margin-bottom: 20px;
  font-size: 1.45rem;
}

.modulo__griglia {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.campo--largo {
  grid-column: 1 / -1;
}

.campo label {
  font-family: var(--font-titoli);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--notte);
}

.campo .campo__facoltativo {
  font-family: var(--font-testo);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--testo-3);
}

/* 16px (1rem) almeno: sotto questa misura iPhone fa lo zoom quando si tocca il campo */
.campo input,
.campo select,
.campo textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #c3d0de;
  border-radius: 10px;
  background-color: #fff;
  color: var(--inchiostro);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.campo textarea {
  min-height: 120px;
  resize: vertical;
}

.campo select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314599b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 18px;
}

.campo input::placeholder,
.campo textarea::placeholder {
  color: #8494a7;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  border-color: var(--azzurro);
  outline: none;
  box-shadow: 0 0 0 3px rgba(41, 154, 217, 0.28);
}

.campo [aria-invalid="true"] {
  border-color: #b91c1c;
  background-color: #fffafa;
}

.campo [aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.2);
}

.campo .campo__errore {
  color: #b91c1c;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

/* campo trappola per lo spam: fuori dallo schermo, non solo nascosto */
.modulo__trappola {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.modulo > .modulo__privacy {
  margin-top: 18px;
  color: var(--testo-3);
  font-size: 0.95rem;
}

.modulo__invia {
  margin-top: 18px;
}

.modulo__invia[disabled] {
  cursor: progress;
  opacity: 0.75;
}

.modulo > .modulo__esito:empty {
  display: none;
}

.modulo > .modulo__esito {
  margin-top: 14px;
  font-weight: 600;
  color: var(--notte);
}

.modulo > .modulo__esito--errore {
  padding: 12px 14px;
  border-radius: var(--r-s);
  background: #fef2f2;
  color: #991b1b;
}

.modulo-grazie {
  text-align: center;
}

.modulo-grazie:focus {
  outline: none;
}

.modulo-grazie__icona {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
}

.modulo-grazie h3 {
  font-size: 1.6rem;
}

.modulo-grazie p {
  margin-top: 10px;
  color: var(--testo-2);
}

.modulo-grazie__email {
  color: var(--notte);
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .richiesta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .modulo__griglia {
    grid-template-columns: 1fr;
  }

  .modulo__invia {
    width: 100%;
  }
}

/* ---------- Pagina utenti ---------- */
.percorso-utente {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.fase {
  position: relative;
  padding: 22px 20px;
  border-radius: var(--r-m);
  background: #fff;
  border: 1px solid var(--linea-tenue);
  box-shadow: var(--ombra-1);
}

.fase__icona {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--azzurro-tenue);
  color: var(--blu);
}

.fase small {
  font-family: var(--font-titoli);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--testo-3);
}

.fase h2 {
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
}

.fase p {
  margin-top: 6px;
  color: var(--testo-2);
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .percorso-utente {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .percorso-utente {
    grid-template-columns: 1fr;
  }
}

.blocco-info {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--linea-tenue);
  border-radius: var(--r-l);
  background: #fff;
  box-shadow: var(--ombra-1);
}

.blocco-info + .blocco-info {
  margin-top: 18px;
}

.blocco-info h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
}

.blocco-info p,
.blocco-info ul {
  margin-top: 10px;
  color: var(--testo-2);
}

.blocco-info ul {
  padding-left: 20px;
}

.blocco-info li + li {
  margin-top: 6px;
}

.blocco-info--avviso {
  border-color: #f6d9a8;
  background: linear-gradient(135deg, #fffaf0, #fdf0dc);
}

.blocco-info--avviso .scheda__icona {
  background: #fff;
  color: var(--gas);
}

@media (max-width: 560px) {
  .blocco-info {
    grid-template-columns: 1fr;
  }
}

.prosa-larga > * {
  max-width: 940px;
}

.blocco-info .importante {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--r-m);
  background: #fff;
  border: 1px solid #f1c27d;
  color: var(--inchiostro);
  font-weight: 600;
}

.importante .icona {
  color: var(--gas);
}

/* ---------- Pagina lavora con noi ---------- */
.posizioni {
  display: grid;
  gap: 18px;
}

.posizione {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 32px;
  align-items: start;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--linea-tenue);
  border-radius: var(--r-l);
  background: #fff;
  box-shadow: var(--ombra-1);
}

.posizione__testa {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.posizione h3 {
  font-size: 1.5rem;
}

.posizione p {
  margin-top: 8px;
  color: var(--testo-2);
}

.posizione .elenco-spunte {
  margin-top: 14px;
}

.posizione .btn {
  align-self: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--sfondo-alt);
  color: var(--testo-2);
  font-size: 0.86rem;
  font-weight: 600;
}

.tag .icona {
  width: 15px;
  height: 15px;
}

.candidatura {
  margin-top: 40px;
}

.candidatura__nota {
  font-size: 0.9rem;
  color: #9fb9de;
}

.riquadro-scuro .candidatura__nota {
  margin-top: 20px;
}

.candidatura__nota a {
  color: #fff;
}

@media (max-width: 760px) {
  .posizione {
    grid-template-columns: 1fr;
  }

  .posizione .btn {
    justify-self: start;
  }
}

/* ---------- 404 ---------- */
.pagina-404 {
  display: grid;
  place-items: center;
  min-height: 60vh;
  text-align: center;
}

.pagina-404__codice {
  font-family: var(--font-titoli);
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--azzurro);
}

.pagina-404 p {
  max-width: 520px;
  margin: 14px auto 0;
  color: var(--testo-2);
}

.pagina-404 .pulsanti {
  justify-content: center;
  margin-top: 28px;
}

/* ==========================================================================
   Foto dei lavori: copertine in home, galleria, foto ingrandita
   ========================================================================== */
.intestazione--riga {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  max-width: none;
}

.intestazione--riga > div {
  max-width: 720px;
}

.intestazione--riga > div > p:not(.occhiello) {
  margin-top: 18px;
  font-size: 1.125rem;
  color: var(--testo-2);
}

.sezione--scura .intestazione--riga > div > p:not(.occhiello) {
  color: #b9cde3;
}

.tessere-foto {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tessera-foto {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-l);
  background: var(--notte-profondo);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.tessera-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tessera-foto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 31, 61, 0) 45%, rgba(7, 31, 61, 0.9) 100%);
}

.tessera-foto__testo {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.tessera-foto__testo strong {
  font-family: var(--font-titoli);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.tessera-foto__testo small {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.86rem;
  font-weight: 600;
}

.tessera-foto:hover,
.tessera-foto:focus-visible {
  color: #fff;
}

.tessera-foto:focus-visible img {
  transform: scale(1.05);
}

@media (hover: hover) {
  .tessera-foto:hover img {
    transform: scale(1.05);
  }
}

@media (max-width: 900px) {
  .tessere-foto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .tessere-foto {
    gap: 10px;
  }

  .tessera-foto {
    border-radius: var(--r-m);
  }

  .tessera-foto::after {
    background: linear-gradient(180deg, rgba(7, 31, 61, 0) 15%, rgba(7, 31, 61, 0.92) 100%);
  }

  .tessera-foto__testo {
    left: 12px;
    right: 12px;
    bottom: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .tessera-foto__testo strong {
    font-size: 1.05rem;
  }

  .tessera-foto__testo small {
    font-size: 0.76rem;
  }
}

/* galleria */
.galleria {
  padding-top: clamp(32px, 4vw, 48px);
}

.gruppo-foto + .gruppo-foto {
  margin-top: clamp(48px, 6vw, 72px);
}

.gruppo-foto[hidden] {
  display: none;
}

.gruppo-foto__testa {
  max-width: 760px;
  margin-bottom: 22px;
}

.gruppo-foto__testa h2 {
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
}

.gruppo-foto__testa p {
  margin-top: 8px;
  color: var(--testo-2);
}

.griglia-foto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 22px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foto {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-m);
  background: var(--sfondo-alt);
  box-shadow: var(--ombra-1);
}

.foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.foto:focus-visible img {
  transform: scale(1.04);
}

@media (hover: hover) {
  .foto:hover img {
    transform: scale(1.04);
  }
}

.foto__didascalia {
  margin-top: 10px;
  color: var(--testo-2);
  font-size: 0.95rem;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .griglia-foto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }

  .foto__didascalia {
    font-size: 0.86rem;
  }
}

/* foto ingrandita */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(4, 14, 30, 0.96);
  color: #e6eef8;
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(4, 14, 30, 0.7);
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox__figura {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 160px);
  margin: 0;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox__didascalia {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  max-width: 760px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.45;
}

.lightbox__conta {
  color: #8fb1d3;
  font-variant-numeric: tabular-nums;
}

.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__chiudi {
  top: 18px;
  right: 18px;
}

.lightbox__prec,
.lightbox__succ {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__prec {
  left: 24px;
}

.lightbox__prec .icona {
  transform: rotate(180deg);
}

.lightbox__succ {
  right: 24px;
}

@media (max-width: 700px) {
  .lightbox__figura {
    max-width: calc(100vw - 24px);
  }

  .lightbox__img {
    max-height: calc(100dvh - 200px);
  }

  .lightbox__prec,
  .lightbox__succ {
    top: auto;
    bottom: 22px;
    transform: none;
  }

  .lightbox__prec {
    left: calc(50% - 64px);
  }

  .lightbox__succ {
    right: calc(50% - 64px);
  }
}

body.lightbox-aperta {
  overflow: hidden;
}

/* ==========================================================================
   Animazioni (solo se l'utente non ha chiesto di ridurle)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .rivela {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .rivela.visibile {
    opacity: 1;
    transform: none;
  }

  .flusso {
    animation: scorri 1.6s linear infinite;
  }

  .onda {
    animation: pulsa 2.4s ease-in-out infinite;
  }

  .onda--2 {
    animation-delay: 0.4s;
  }

  .mappa-sede-alone {
    animation: alone 2.6s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
  }

  /* Animazioni SVG infinite: il browser le ricalcola a ogni fotogramma (stile e layout), anche
     fuori schermo. Con JavaScript girano solo mentre il disegno è visibile (main.js aggiunge
     "in-vista"); senza JavaScript girano sempre, come prima. (audit A3) */
  .js .flusso,
  .js .onda,
  .js .mappa-sede-alone {
    animation-play-state: paused;
  }

  .js .in-vista .flusso,
  .js .in-vista .onda,
  .js .in-vista .mappa-sede-alone {
    animation-play-state: running;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@keyframes scorri {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes pulsa {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

@keyframes alone {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.35;
  }
}

/* ---------- Stampa ---------- */
@media print {
  .header,
  .footer,
  .hero__visuale,
  .filtri,
  .territorio {
    display: none !important;
  }

  .hero,
  .sezione--scura,
  .banda-planner {
    background: #fff !important;
    color: #000 !important;
  }

  .rivela {
    opacity: 1 !important;
    transform: none !important;
  }
}
