/* ============================================================================
   AP H24 SERVICE — SPURGO E DISOSTRUZIONI ROMA · Stile
   Colori del logo: verde petrolio per header e fasce, giallo ocra solo per la
   chiamata. Titoli Montserrat (vicino alle lettere del logo), testi Source Sans 3.
============================================================================ */

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-latin-var.woff2') format('woff2');
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/source-sans-3-latin-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0F2A44;          /* blu notte: testo e fasce scure */
  --ink-2: #3D5468;        /* testo secondario, 7,9:1 sul bianco */
  --ink-3: #56697A;        /* note e didascalie, 5,7:1 sul bianco */
  --teal: #2E8575;         /* verde petrolio del logo */
  --teal-ink: #1F6B5D;     /* verde per testo e bottoni, 6,3:1 sul bianco */
  --teal-deep: #174F45;
  --teal-soft: #8FD8C6;    /* verde chiaro sulle fasce scure */
  --teal-tint: #EAF4F1;
  --gold: #E6AF14;         /* giallo ocra del logo: solo per chiamare */
  --gold-hi: #F2C02F;
  --gold-press: #CF9C0B;
  --line: #D6E0E6;
  --bg: #FFFFFF;
  --bg-2: #F3F6F8;

  --ff-d: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --ff-b: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  --r: 10px;
  --r-lg: 16px;
  --gutter: 16px;
  --header-h: 64px;
  --sec: clamp(56px, 4rem + 4vw, 112px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (min-width: 960px) {
  :root { --gutter: 32px; --header-h: 78px; }
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  scrollbar-color: var(--teal) var(--bg-2);
  accent-color: var(--teal-ink);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-b);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--teal-ink);
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--ff-d);
  color: var(--ink);
  text-wrap: balance;
}

a { color: var(--teal-ink); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }

::selection { background: var(--teal-ink); color: #fff; }

/* anello di focus blu notte sul chiaro; giallo solo sulle fasce scure, dove si vede */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
.topbar :focus-visible,
.sec-ink :focus-visible,
.close :focus-visible,
.foot :focus-visible { outline-color: var(--gold); }

.nowrap { white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* --------------------------------------------------------------- bottoni */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: var(--r);
  font-family: var(--ff-d);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .ico { flex: none; }

.btn-call {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 8px 18px -10px rgba(140, 100, 0, .65);
}
.btn-call:hover { background: var(--gold-hi); }
.btn-call:active { background: var(--gold-press); box-shadow: 0 4px 10px -8px rgba(140, 100, 0, .65); }
.btn-call.is-calling { background: var(--gold-press); }

.btn-xl { min-height: 62px; padding: 0 26px; font-size: 1.25rem; }

/* bottone di chiamata su due righe: chi chiami sopra, il numero grande sotto */
.btn-stack { min-height: 72px; padding: 10px 26px 10px 22px; gap: 14px; justify-content: flex-start; }
.call-txt { display: grid; text-align: left; line-height: 1.1; }
.call-txt small { font-size: .9375rem; font-weight: 600; }
.call-txt b { font-size: 1.6rem; font-weight: 800; letter-spacing: -.015em; }

.btn-teal { background: var(--teal-ink); color: #fff; }
.btn-teal:hover { background: var(--teal-deep); }

.btn-wa {
  padding-inline: 16px;
  background: var(--bg);
  border-color: var(--line);
  color: var(--ink);
  font-size: 1rem;
  white-space: nowrap;
}
.btn-wa:hover { border-color: var(--teal); background: var(--teal-tint); }
.btn-wa-light { border-color: #fff; }
.btn-wa-light:hover { background: #fff; border-color: var(--teal-soft); }
.wa-ico { flex: none; }

/* ---------------------------------------------------------- top bar */

.topbar {
  background: var(--teal-deep);
  color: #E3F2EE;
  font-size: .9375rem;
}
.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
}
.tb-l { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; }
.tb-l b { color: #fff; font-weight: 700; white-space: nowrap; }
.tb-l [data-avail-note] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-sep { opacity: .6; }
.tb-r { display: none; color: #E3F2EE; text-decoration: none; }
.tb-r b { color: #fff; font-weight: 700; }
.tb-r:hover b { text-decoration: underline; text-underline-offset: .18em; }
.dot {
  position: relative;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ADE80;
}
/* l'onda attorno al pallino e i due punti dell'ora che battono i secondi: è operativo adesso */
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #4ADE80;
  opacity: 0;
}
@media (min-width: 760px) { .tb-r { display: inline; } }

/* cambio lingua, come sul sito fabbro n2: due bandiere in fondo alla barra, quella della
   pagina piena e sottolineata, l'altra più spenta */
.tb-end { display: flex; align-items: stretch; align-self: stretch; gap: 18px; flex: none; }
.tb-r { align-self: center; }
.lang-switch { display: flex; align-items: stretch; gap: 2px; margin-right: -4px; }
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding-inline: 4px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  opacity: .6;
  transition: opacity .2s var(--ease), border-color .2s var(--ease);
}
.lang-switch a:hover { opacity: 1; }
.lang-switch a[aria-current="page"] { opacity: 1; border-bottom-color: var(--teal-soft); }
.lang-switch a:focus-visible { outline-offset: -3px; border-radius: 4px; }
.lang-flag {
  display: block;
  width: 24px;
  height: 16px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .3);
  forced-color-adjust: none;
}
.lang-divider { align-self: center; width: 1px; height: 13px; background: rgba(255, 255, 255, .3); }
/* telefoni stretti: resta solo la bandiera della lingua in cui si passa, e l'ora senza "ore",
   così la nota "in tutta Roma" entra ancora nella barra */
@media (max-width: 419px) {
  .lang-switch a[aria-current="page"], .lang-divider { display: none; }
  .tb-ore { display: none; }
  .tb-end { gap: 10px; }
}

/* ------------------------------------------------------------ header */

#ap-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
/* appena la pagina scorre l'header si stacca dal contenuto con un'ombra (main.js) */
#ap-header.is-scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 12px 28px -20px rgba(15, 42, 68, .5);
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  border-radius: var(--r);
}
/* logo orizzontale (strumenti/logo.py): alto 44px sul telefono, 56px da 960px */
.brand-logo { display: block; width: auto; height: 44px; aspect-ratio: 375 / 100; overflow: visible; }

.nav-links { display: none; }
.nav-cta { min-height: 46px; padding: 0 16px; }
.cta-full { display: none; }

@media (max-width: 349px) {
  .brand-logo { height: 38px; }
}

@media (min-width: 960px) {
  .brand-logo { height: 56px; }
  .nav-links {
    display: flex;
    gap: 6px;
  }
  .nav-links a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--ink);
    font-family: var(--ff-d);
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
  }
  .nav-links a:hover { background: var(--teal-tint); color: var(--teal-ink); }
  .nav-cta { min-height: 50px; padding: 0 20px; }
  .cta-full { display: inline; }
  .cta-short { display: none; }
}

/* ---------------------------------------------------------- apertura */

.hero { padding-bottom: 8px; }

.hero-grid { display: grid; }

/* sotto i 960px la foto è quadrata: si vedono Alessio e tutta l'attrezzatura,
   fino alla valigia del monitor */
.hero-media {
  position: relative;
  margin-inline: calc(var(--gutter) * -1);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-2);
}
@media (min-width: 600px) and (max-width: 959px) {
  .hero-media {
    margin: 24px 0 0;
    max-width: 560px;
    border-radius: var(--r-lg);
  }
}
.hero-media img,
.relining-media img,
.come-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media img { object-position: 50% 52%; }

.hero-copy { padding-top: 22px; }

.hero h1 {
  font-size: clamp(2.05rem, 1.25rem + 2.9vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
}
/* "H24" dentro la fascia verde del logo, la stessa che nel tondo porta "DAL 2017" */
.fascia {
  position: relative;
  display: inline-block;
  padding: 0 .14em;
  color: #fff;
  isolation: isolate;
}
.fascia::before {
  content: "";
  position: absolute;
  inset: .08em 0 .02em;
  z-index: -1;
  border-radius: 3px;
  background: var(--teal);
  transform-origin: left center;
}

.lead {
  margin-top: 14px;
  max-width: 34ch;
  color: var(--ink-2);
  font-size: clamp(1.15rem, 1.05rem + .45vw, 1.375rem);
  line-height: 1.45;
}
.lead b { color: var(--ink); font-weight: 700; }

.hero-cta {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.trust {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 1rem;
  text-wrap: balance;
}

.quick { margin-top: 30px; }
.quick-t {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-2);
}
.quick ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.quick a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  height: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
  font-family: var(--ff-d);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.quick a .ico { color: var(--teal-ink); }
.quick a .ico-freccia { color: var(--ink-3); transition: transform .25s var(--ease); }
.quick a:hover { border-color: var(--teal); background: var(--teal-tint); }
.quick a:hover .ico-freccia { transform: translateX(3px); color: var(--teal-ink); }

/* telefono: la freccia lascia spazio al nome del problema, e la prima fila
   di scorciatoie entra nel primo schermo */
@media (max-width: 599px) {
  .hero-cta { margin-top: 18px; }
  .quick { margin-top: 18px; }
  .quick a { grid-template-columns: auto 1fr; padding-inline: 12px 10px; }
  .quick a .ico-freccia { display: none; }
}
@media (max-width: 339px) {
  .quick ul { grid-template-columns: 1fr; }
}

@media (min-width: 600px) {
  .hero-cta { grid-template-columns: auto auto; justify-content: start; align-items: stretch; }
}

@media (min-width: 960px) {
  .hero { padding-block: 48px 72px; }
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 56px;
    align-items: center;
  }
  .hero-copy { order: 1; padding-top: 0; }
  .hero-media img { object-position: 50% 45%; }
  .hero-media {
    order: 2;
    margin-inline: 0;
    aspect-ratio: 4 / 5;
    max-height: 640px;
    border-radius: var(--r-lg);
    box-shadow: 0 30px 60px -36px rgba(15, 42, 68, .55);
  }
  .quick ul { max-width: 560px; }
}

/* ----------------------------------------------------------- sezioni */

.sec { padding-block: var(--sec); }

.sec-head { max-width: 720px; }
.sec h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.sec-head p {
  margin-top: 14px;
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 1.1875rem;
}

/* ---------------------------------------------------------- servizi */

.services {
  display: grid;
  margin-top: 36px;
  column-gap: 56px;
}
.service {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
/* icona a due toni nel suo riquadro velo di menta, come in "Come lavoro" */
.service-ico, .fact-ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r);
  background: var(--teal-tint);
  color: var(--teal-ink);
}
.service h3, .facts h3 { padding-top: 2px; }
.service h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.service p { margin-top: 6px; color: var(--ink-2); max-width: 60ch; }
.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 700;
}
.more .ico { transition: transform .25s var(--ease); }
.more:hover .ico { transform: translateX(3px); }
/* sotto un servizio, i link alle pagine "Che problema hai?" */
.service .more-links,
.more-links { display: flex; flex-wrap: wrap; column-gap: 22px; row-gap: 2px; margin-top: 10px; }
.more-links .more { margin-top: 0; }

@media (min-width: 760px) {
  .services { grid-template-columns: 1fr 1fr; }
}

.no {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  margin-top: 36px;
  padding: 24px;
  border: 1px solid #CFE3DD;
  border-radius: var(--r-lg);
  background: #F2F8F6;
}
.no-ico { color: var(--ink); }
.no h3 { font-size: 1.25rem; font-weight: 800; }
.no p { margin-top: 6px; color: var(--ink-2); max-width: 70ch; }
.no b { color: var(--ink); }

@media (min-width: 960px) {
  .no { padding: 28px 32px; align-items: center; }
}

/* ---------------------------------------------------------- relining */

.sec-ink { background: var(--teal-deep); color: rgba(255, 255, 255, .86); }
.sec-ink h2, .sec-ink h3 { color: #fff; }

.relining { display: grid; gap: 40px; }
.relining-copy > p { margin-top: 14px; max-width: 58ch; font-size: 1.1875rem; }

.steps {
  display: grid;
  gap: 22px;
  margin-block: 34px;
  counter-reset: step;
}
.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding-top: 20px;
}
/* sopra ogni passo un tratto di tubo: scorrendo si riempie di verde un passo dopo l'altro,
   come la guaina che entra */
.steps li::before,
.steps li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .14);
}
.steps li::after {
  background: var(--teal-soft);
  transform-origin: left center;
}
.step-n {
  font-family: var(--ff-d);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--teal-soft);
}
.steps h3 { font-size: 1.125rem; font-weight: 700; }
.steps p { margin-top: 4px; font-size: 1.0625rem; }

.relining-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r-lg);
}
.relining-media img { object-position: 50% 40%; }

@media (max-width: 959px) {
  .relining-media { aspect-ratio: 1 / 1; }
  .relining-media img { object-position: 50% 48%; }
}

@media (min-width: 760px) {
  .steps { grid-template-columns: 1fr 1fr; column-gap: 32px; }
}
@media (min-width: 960px) {
  .relining {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 64px;
    align-items: center;
  }
}

/* ------------------------------------------------------- come lavoro */

.come { display: grid; gap: 36px; }
.come-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--ink);
}
.come-media img { object-position: 40% 60%; }

.facts { display: grid; gap: 22px; margin-top: 28px; }
.facts li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
}
.facts h3 { font-size: 1.1875rem; font-weight: 700; }
.facts p { margin-top: 4px; color: var(--ink-2); }
.clients {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

@media (max-width: 959px) {
  .come-media { aspect-ratio: 4 / 3; }
}
@media (min-width: 960px) {
  .come {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 64px;
    align-items: center;
  }
}

/* -------------------------------------------------------------- zone */

.sec-tint { background: var(--teal-tint); }

.h-ico { display: flex; align-items: center; gap: 10px; }
.h-ico .ico { flex: none; color: var(--teal-ink); }
.sec-head .zones-note { margin-top: 12px; color: var(--ink-2); font-size: 1rem; }

/* mappa dei 15 municipi (strumenti/mappa.py, confini di OpenStreetMap): passando sopra o
   toccando un municipio, il riquadro accanto mostra i suoi quartieri */
.zone { display: grid; gap: 24px; }
.zone-map { margin: 0; }
.mappa { display: block; width: 100%; max-width: 600px; height: auto; margin-inline: auto; }
.m-mun path {
  fill: #fff;
  stroke: #BCDAD2;
  stroke-width: 1.3;
  stroke-linejoin: round;
  cursor: pointer;
  outline: none;
  transition: fill .2s var(--ease);
}
.m-mun path:hover, .m-mun path.is-on { fill: #CDE7E0; }
.m-sel { fill: none; stroke: var(--teal-ink); stroke-width: 2.6; stroke-linejoin: round; pointer-events: none; }
.m-bordo { fill: none; stroke: var(--teal-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.m-fiume { fill: none; stroke: #8CCBC4; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.m-fiume-sm { stroke-width: 2.6; }
.m-flusso { display: none; }
.m-gra { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-opacity: .7; pointer-events: none; }
.m-gra-t, .m-fiume-t, .m-mare { pointer-events: none; font-family: var(--ff-b); }
.m-gra-t { fill: var(--ink-2); font-family: var(--ff-d); font-size: 11px; font-weight: 800; letter-spacing: .1em; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.m-fiume-t { fill: #2F7469; font-size: 12px; font-weight: 600; font-style: italic; }
.m-mare { fill: #2F7469; font-size: 13px; font-weight: 600; font-style: italic; letter-spacing: .12em; }
.m-etichette { pointer-events: none; }
.m-etichette text {
  fill: var(--ink);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
}
.m-etichette text.is-on { stroke: #CDE7E0; }
.m-num { font-family: var(--ff-d); font-size: 15px; font-weight: 800; }
.m-nome { font-family: var(--ff-b); font-size: 11.5px; font-weight: 600; fill: var(--ink-2); }

.zone-info {
  min-height: 132px;
  padding: 18px 20px;
  border: 1px solid #CFE3DD;
  border-radius: var(--r-lg);
  background: #fff;
}
.zi-hint { display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
.zi-hint .ico { flex: none; color: var(--teal-ink); }
.zi-hint .su-touch { display: none; }
@media (hover: none) {
  .zi-hint .su-mouse { display: none; }
  .zi-hint .su-touch { display: inline; }
}
.zi-t { font-family: var(--ff-d); font-size: 1.125rem; font-weight: 800; line-height: 1.3; }
.zi-t span { color: var(--teal-ink); }
.zi-q { margin-top: 6px; color: var(--ink-2); }

@media (max-width: 599px) {
  /* sul telefono la mappa è piccola: restano i numeri, i nomi li dà il riquadro */
  .m-nome { display: none; }
  .m-num { font-size: 22px; }
  .m-etichette text { stroke-width: 4px; }
  .m-gra-t, .m-fiume-t { font-size: 17px; }
  .m-mare { display: none; }
}

@media (min-width: 960px) {
  .zone {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    grid-template-areas: "copy map" "info map";
    grid-template-rows: auto 1fr;
    column-gap: 48px;
    row-gap: 24px;
    align-items: start;
  }
  .zone-copy { grid-area: copy; }
  .zone-map { grid-area: map; }
  .zone-info { grid-area: info; }
}

/* ----------------------------------------------------------- domande */

.faq { max-width: 880px; margin-top: 28px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-family: var(--ff-d);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--teal-ink); }
.faq-sign {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
}
.faq-sign::before,
.faq-sign::after {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s var(--ease);
}
.faq-sign::after { transform: rotate(90deg); }
.faq details[open] .faq-sign::after { transform: rotate(0deg); }
.faq details p { padding-bottom: 22px; max-width: 66ch; color: var(--ink-2); }
.faq details p b { color: var(--ink); }

/* ---------------------------------------------------------- chiusura */

.close {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: var(--sec);
  background: var(--teal-ink);
  color: #E6F4F0;
}
.close-in { max-width: 860px; text-align: center; }
.close h2 {
  color: #fff;
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.025em;
}
.close p { margin: 14px auto 0; max-width: 52ch; font-size: 1.1875rem; }
.close-cta {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
@media (min-width: 600px) {
  .close-cta { grid-template-columns: auto auto; justify-content: center; }
}

/* ------------------------------------------------------------ footer */

.foot {
  background: var(--ink);
  color: rgba(255, 255, 255, .8);
  font-size: 1rem;
}
.foot-in {
  display: grid;
  gap: 36px;
  padding-block: 56px 40px;
}
.foot-brand { display: inline-block; border-radius: var(--r); }
.foot-brand img { display: block; width: auto; height: 60px; }
.foot-main p { margin-top: 18px; max-width: 36ch; text-wrap: pretty; }

.foot-t {
  margin-bottom: 14px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}
.foot-col ul { display: grid; gap: 10px; }
.foot-col a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.foot-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-facts li { padding-left: 16px; position: relative; }
.foot-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-soft);
}

.foot-contact { display: grid; gap: 14px; align-content: start; justify-items: start; }
.foot-contact .foot-t { margin-bottom: 0; }
.foot .foot-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--ff-d);
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -.01em;
  text-decoration: none;
}
.foot-phone .ico { color: var(--gold); }
.foot .foot-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .9375rem;
  color: rgba(255, 255, 255, .7);
}
.foot-legal { display: flex; flex-wrap: wrap; column-gap: 8px; row-gap: 2px; }
.foot-legal span + span::before { content: "·"; margin-right: 8px; }
.foot-legal a { color: inherit; text-underline-offset: 3px; }
@media (max-width: 599px) {
  /* sul telefono una voce per riga, senza il punto che resterebbe a inizio riga */
  .foot-legal { flex-direction: column; }
  .foot-legal span + span::before { content: none; }
}
.credit { position: relative; display: inline-block; border-radius: 6px; isolation: isolate; }
.credit img { display: block; width: 150px; height: auto; }
/* fascio di luce sul credito EIR Studio: quando il logo arriva sullo schermo una banda di luce
   lo attraversa, le lettere diventano bianche al passaggio e il logo si accende d'azzurro;
   poi ripassa ogni 6s finché resta in vista (main.js mette .is-lit) */
.credit::before,
.credit::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
}
/* la banda: obliqua, sfumata, più alta del logo e senza bordi netti */
.credit::before {
  top: -45%;
  bottom: -45%;
  left: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(0, 217, 255, .32) 35%, rgba(255, 255, 255, .85) 50%, rgba(0, 217, 255, .32) 65%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  filter: blur(5px);
  transform: translateX(-150%) skewX(-18deg);
}
/* la luce sulle lettere: lo stesso logo fa da maschera */
.credit::after {
  inset: 0;
  background: linear-gradient(100deg, transparent 42%, #fff 50%, transparent 58%) 120% 0 / 300% 100% no-repeat;
  -webkit-mask: url(/assets/img/made-by-eir-studio.svg) 0 0 / 100% 100% no-repeat;
  mask: url(/assets/img/made-by-eir-studio.svg) 0 0 / 100% 100% no-repeat;
}

/* cinque blocchi: marchio, servizi, "cosa fare se…", orari e zona, contatti.
   Da 960px il marchio sta su una riga sua sopra le quattro colonne, da 1200px in fila con loro */
@media (min-width: 760px) {
  .foot-in { grid-template-columns: 1fr 1fr; column-gap: 56px; }
}
@media (min-width: 960px) {
  .foot-in { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 40px; }
  .foot-main { grid-column: 1 / -1; display: flex; align-items: center; gap: 36px; }
  .foot-main p { margin-top: 0; max-width: 46ch; }
}
@media (min-width: 1200px) {
  .foot-in { grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); }
  .foot-main { grid-column: auto; display: block; }
  .foot-main p { margin-top: 18px; max-width: 30ch; }
  .foot .foot-phone { font-size: 1.375rem; }
}

/* ---------------------------------- chiamata: avviso e bottone fisso */

.call-toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 70;
  /* con left: 50% la larghezza si fermerebbe a metà schermo: max-content la libera */
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 14px 32px -14px rgba(15, 42, 68, .7);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .25s var(--ease), transform .35s var(--ease);
}
.call-toast.show { opacity: 1; transform: translate(-50%, 0); }
.call-toast b { color: var(--gold); }

/* barra di chiamata (solo telefono e tablet): il numero resta sempre leggibile */
.callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px -16px rgba(15, 42, 68, .45);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .4s var(--ease), visibility 0s linear .4s;
}
.callbar.show {
  transform: none;
  visibility: visible;
  transition: transform .4s var(--ease), visibility 0s;
}
.callbar-call {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  border-radius: var(--r);
  background: var(--gold);
  color: var(--ink);
  font-family: var(--ff-d);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}
.callbar-call b { font-weight: 800; }
.callbar-call:active { background: var(--gold-press); }
.callbar-call.is-calling { background: var(--gold-press); }
.callbar-wa {
  display: grid;
  place-items: center;
  width: 54px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
}

@media (max-width: 959px) {
  .call-toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
  /* spazio in fondo: la barra non copre mai la P.IVA */
  .foot-bottom { padding-bottom: calc(28px + 76px + env(safe-area-inset-bottom)); }
}
@media (min-width: 960px) {
  .callbar { display: none; }
}

/* ---------------------------------------------------- banner cookie
   main.js lo mostra finché non c'è una scelta e la ricorda per 6 mesi. Rifiuta e Accetta
   hanno lo stesso peso, come chiede il Garante; la X chiude senza accettare. */

.cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 65;
  padding: 20px 20px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: 0 24px 48px -20px rgba(15, 42, 68, .45);
  transition: opacity .25s var(--ease), transform .25s var(--ease), bottom .4s var(--ease);
}
.cookie[hidden] { display: none; }
.cookie.is-chiuso { opacity: 0; transform: translateY(12px); }
.cookie-t { padding-right: 40px; font-size: 1.125rem; font-weight: 800; line-height: 1.3; }
.cookie p { margin-top: 6px; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.cookie-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cookie-cta .btn { min-height: 48px; padding-inline: 14px; font-size: 1rem; }
.btn-line { background: var(--bg); border-color: var(--teal-ink); color: var(--teal-ink); }
.btn-line:hover { background: var(--teal-tint); }
.cookie-more {
  display: block;
  margin: 8px auto 0;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--teal-ink);
  font: inherit;
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .18em;
  cursor: pointer;
}
.cookie-x {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
}
.cookie-x:hover { background: var(--bg-2); color: var(--ink); }
@media (min-width: 600px) {
  .cookie { left: 24px; right: auto; bottom: 24px; width: 400px; }
}
/* sul telefono, quando sale la barra di chiamata il riquadro le fa spazio */
@media (max-width: 959px) {
  .callbar.show ~ .cookie { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

/* ---------------------------------------- pagine "Che problema hai?"
   Una per scorciatoia (WC, lavandino, colonna, pozzetto): arrivo e chiamata, cosa fare
   mentre arrivo, perché succede, come lo risolvo, gli altri problemi. */

.pb-hero { padding-block: 18px 48px; }
.pb-hero-grid { display: grid; gap: 32px; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; color: var(--ink-3); font-size: .9375rem; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .7; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--teal-ink); text-decoration: underline; }

.pb-hero h1 { margin-top: 14px; font-size: clamp(1.95rem, 1.3rem + 2.3vw, 3.1rem); }
.pb-hero .lead { max-width: 46ch; }

/* dalla chiamata all'intervento: tre tappe su un tubo verticale, l'arrivo in grande */
.arrivo {
  padding: 24px 22px 26px;
  border: 1px solid #CFE3DD;
  border-radius: var(--r-lg);
  background: var(--teal-tint);
}
.arrivo-t { color: var(--teal-ink); font-size: 1.0625rem; font-weight: 800; }
.arrivo ol { display: grid; gap: 20px; margin-top: 18px; }
.arrivo li { position: relative; display: grid; gap: 2px; padding-left: 38px; }
.arrivo li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 3px solid var(--teal);
  border-radius: 50%;
  background: var(--teal-tint);
}
.arrivo li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 12px;
  width: 3px;
  height: calc(100% + 20px);
  border-radius: 3px;
  background: var(--teal);
  transform-origin: top center;
}
.arrivo li b { color: var(--teal-ink); font-family: var(--ff-d); font-size: 1rem; font-weight: 800; }
.arrivo li span { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.45; }
.arrivo .arrivo-ora b { color: var(--ink); font-size: 1.625rem; line-height: 1.15; letter-spacing: -.02em; }
.arrivo .arrivo-ora::before { top: 7px; background: var(--teal); }

@media (min-width: 960px) {
  .pb-hero { padding-block: 32px 88px; }
  .pb-hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 64px; align-items: center; }
  .arrivo { padding: 30px 30px 32px; }
}


/* perché succede: voci con filetto, in due colonne, sul velo di menta; sotto, il segnale
   che il blocco è più giù, con il link alla pagina di quel problema */
.cause { display: grid; margin-top: 26px; column-gap: 56px; }
.cause li { padding-block: 18px; border-top: 1px solid #CFE3DD; }
.cause h3 { font-size: 1.1875rem; font-weight: 700; line-height: 1.3; }
.cause p { margin-top: 4px; max-width: 60ch; color: var(--ink-2); }
@media (min-width: 760px) {
  .cause { grid-template-columns: 1fr 1fr; }
}

.nota {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px solid #CFE3DD;
  border-radius: var(--r-lg);
  background: var(--bg);
}
.nota p { max-width: 70ch; color: var(--ink-2); }
.nota .more { margin-top: 8px; }
@media (min-width: 960px) {
  .nota { padding: 24px 28px; align-items: center; }
}

/* come lo risolvo: sulla fascia verde petrolio, con una foto vera */
.pb-come-copy > p { margin-top: 14px; max-width: 58ch; font-size: 1.1875rem; }
.pb-come-copy > .more-links { margin-top: 22px; font-size: 1.0625rem; }
.sec-ink .more { color: var(--teal-soft); }
.sec-ink .no h3 { color: var(--ink); }
.pb-come-copy .no { margin-top: 30px; }

/* gli altri problemi: le stesse scorciatoie dell'apertura */
.pb-altri { padding-block: clamp(48px, 3rem + 2vw, 80px); }
.pb-altri h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.pb-altri .quick { margin-top: 0; }
.pb-altri .quick ul { grid-template-columns: 1fr; margin-top: 18px; }
.pb-altri .quick a { grid-template-columns: auto 1fr auto; }
.pb-altri .quick a .ico-freccia { display: block; }
.altri-note { margin-top: 18px; color: var(--ink-3); font-size: 1rem; }
.altri-note a { font-weight: 700; }
@media (min-width: 760px) {
  .pb-altri .quick ul { grid-template-columns: repeat(3, 1fr); max-width: none; }
}

/* ------------------------------------------------------------- 404 */

.notfound { padding-block: var(--sec); }
.notfound h1 { font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.75rem); font-weight: 800; letter-spacing: -.025em; }
.notfound p { margin-top: 14px; max-width: 52ch; color: var(--ink-2); }
.notfound .hero-cta { margin-top: 26px; }

/* ---------------------------------------------------------- movimento
   Tesi: lo scarico torna a scorrere. Le cose arrivano come l'acqua che riparte in un tubo,
   da sinistra e rallentando: la fascia del logo si apre, "H24" entra nella fascia, la foto sale
   come il livello dell'acqua, le icone si disegnano come un progetto idraulico, la mappa si
   riempie dal centro e il Tevere scorre. Tutto una volta sola; i movimenti continui (il pallino
   "operativo", il telefono che squilla, il Tevere, i cerchi della chiusura) si fermano fuori
   schermo. Le classi .anima, .is-in e .is-visible le mette main.js: senza JavaScript la pagina
   resta ferma e completa. Con "riduci movimento" non si muove niente (vedi in fondo). */

@keyframes entra { from { opacity: 0; transform: translateY(16px); } }
@keyframes a-fuoco { from { opacity: 0; transform: translateY(.25em); filter: blur(8px); } }
@keyframes apre-fascia { from { transform: scaleX(0); } }
@keyframes apre-tubo { from { transform: scaleY(0); } }
@keyframes testo-in-fascia { from { color: var(--ink); } }
@keyframes sale-acqua { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes assesta { from { transform: scale(1.08); } }
@keyframes valvola { from { opacity: 0; transform: rotate(-90deg) scale(.7); } }
@keyframes scritta { from { opacity: 0; clip-path: inset(0 100% 0 0); } }
@keyframes disegna { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@keyframes compare { from { opacity: 0; } }
@keyframes squilla {
  0%, 24%, 100% { transform: none; }
  3%, 9%, 15% { transform: rotate(-14deg); }
  6%, 12%, 18% { transform: rotate(12deg); }
}
@keyframes impulso { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(2.8); } }
@keyframes tic { 50% { opacity: .2; } }
@keyframes scorre { to { stroke-dashoffset: -26; } }
@keyframes cerchio {
  from { opacity: .55; transform: translate(-50%, -50%) scale(.15); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

@media (prefers-reduced-motion: no-preference) {

  /* --- arrivo: logo, titolo, foto (si vede tutto entro un secondo) */
  .brand-logo .logo-simbolo { transform-box: fill-box; transform-origin: center; animation: valvola .8s var(--ease) both; }
  .brand-logo .logo-fascia { transform-box: fill-box; transform-origin: left center; animation: apre-fascia .7s .25s var(--ease) both; }
  .brand-logo .logo-riga { animation: scritta .6s var(--ease) both; }
  .brand-logo .logo-sopra { animation-delay: .4s; }
  .brand-logo .logo-dal { animation-delay: .5s; }
  .brand-logo .logo-sotto { animation-delay: .6s; }

  .hero h1 { animation: a-fuoco .8s .1s var(--ease) both; }
  .hero .fascia { animation: testo-in-fascia .3s 1s both; }
  .hero .fascia::before { animation: apre-fascia .6s .6s var(--ease) both; }
  .hero .lead { animation: entra .7s .25s var(--ease) both; }
  .hero-cta { animation: entra .7s .35s var(--ease) both; }
  .hero .trust { animation: entra .7s .45s var(--ease) both; }
  .hero .quick-t { animation: entra .7s .5s var(--ease) both; }
  .hero .quick li { animation: entra .6s calc(.55s + var(--n, 0) * 60ms) var(--ease) both; }
  .quick li:nth-child(2) { --n: 1; }
  .quick li:nth-child(3) { --n: 2; }
  .quick li:nth-child(4) { --n: 3; }
  .hero .quick .ico [pathLength] { animation: disegna .9s calc(.75s + var(--n, 0) * 60ms) var(--ease) backwards; }
  .hero .quick .ico [stroke="none"] { animation: compare .5s calc(1.2s + var(--n, 0) * 60ms) both; }

  /* pagine dei problemi: il percorso entra per primo, poi il tubo dell'arrivo si riempie
     dall'alto, una tappa dopo l'altra, come l'acqua che riparte */
  .crumbs { animation: entra .6s var(--ease) both; }
  .arrivo { animation: entra .8s .4s var(--ease) both; }
  .arrivo li { animation: entra .6s calc(.7s + var(--n, 0) * .4s) var(--ease) both; }
  .arrivo li:nth-child(2) { --n: 1; }
  .arrivo li:nth-child(3) { --n: 2; }
  .arrivo li:not(:last-child)::after { animation: apre-tubo .5s calc(.95s + var(--n, 0) * .4s) var(--ease) both; }
  .arrivo li::before { animation: compare .3s calc(.75s + var(--n, 0) * .4s) both; }

  /* cookie: sale dal basso quando compare (backwards: alla chiusura conta la transizione) */
  .cookie { animation: entra .6s var(--ease) backwards; }
  /* foto d'apertura: un velo del colore del fondo si ritira verso l'alto, come l'acqua che sale */
  .hero-media::after,
  .anima [data-rivela="foto"]::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--velo, var(--bg));
    transform-origin: top center;
    pointer-events: none;
  }
  .hero-media::after { animation: sale-acqua 1.1s .05s var(--ease) both; }
  .hero-media img { animation: assesta 1.4s .05s var(--ease) both; }

  /* --- scorrendo: ogni blocco entra una volta, i gruppi uno dopo l'altro (--ritardo da main.js) */
  .anima [data-rivela] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease), transform .8s var(--ease);
    transition-delay: var(--ritardo, 0s);
  }
  .anima [data-rivela].is-in { opacity: 1; transform: none; }

  /* foto: salgono dal basso come l'acqua, senza spostarsi */
  .anima [data-rivela="foto"] { opacity: 1; transform: none; }
  .anima .sec-ink [data-rivela="foto"] { --velo: var(--teal-deep); }
  .anima [data-rivela="foto"]::after { transition: transform 1.1s var(--ease); }
  .anima [data-rivela="foto"].is-in::after { transform: scaleY(0); }
  .anima [data-rivela="foto"] img { transform: scale(1.08); transition: transform 1.4s var(--ease); }
  .anima [data-rivela="foto"].is-in img { transform: none; }

  /* icone dei servizi e di "Come lavoro": si disegnano, poi si riempiono */
  .anima .service-ico, .anima .fact-ico { transition: transform .6s calc(var(--ritardo, 0s) + .1s) var(--ease); }
  .anima :not(.is-in) > .service-ico, .anima :not(.is-in) > .fact-ico { transform: scale(.6); }
  .anima :not(.is-in) > .service-ico [pathLength], .anima :not(.is-in) > .fact-ico [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .anima .is-in > .service-ico [pathLength], .anima .is-in > .fact-ico [pathLength] { animation: disegna 1s calc(var(--ritardo, 0s) + .2s) var(--ease) backwards; }
  .anima :not(.is-in) > .service-ico [stroke="none"], .anima :not(.is-in) > .fact-ico [stroke="none"] { opacity: 0; }
  .anima .is-in > .service-ico [stroke="none"], .anima .is-in > .fact-ico [stroke="none"] { transition: opacity .6s calc(var(--ritardo, 0s) + .8s); }

  /* relining: i tratti di tubo si riempiono un passo dopo l'altro */
  .anima .steps li::after { transition: transform 1s calc(var(--ritardo, 0s) + .15s) var(--ease); }
  .anima .steps li:not(.is-in)::after { transform: scaleX(0); }

  /* mappa: i municipi compaiono dal centro verso fuori, poi i fiumi si disegnano e il GRA si chiude */
  .anima .zone-map .m-mun path {
    transform-box: fill-box;
    transform-origin: center;
    transition: fill .2s var(--ease), opacity .5s calc(var(--i) * 60ms) var(--ease), transform .8s calc(var(--i) * 60ms) var(--ease);
  }
  .anima .zone-map:not(.is-in) .m-mun path { opacity: 0; transform: scale(.85); }
  .anima .zone-map .m-etichette text { transition: opacity .5s calc(var(--i) * 60ms + .3s); }
  .anima .zone-map:not(.is-in) .m-etichette text { opacity: 0; }
  .anima .zone-map:not(.is-in) .m-fiume { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .anima .zone-map.is-in .m-fiume { animation: disegna 1.8s .6s var(--ease) backwards; }
  .anima .zone-map :is(.m-gra, .m-gra-t, .m-bordo) { transition: opacity .9s 1s var(--ease); }
  .anima .zone-map:not(.is-in) :is(.m-gra, .m-gra-t, .m-bordo) { opacity: 0; }

  /* il Tevere scorre: piccoli riflessi che vanno verso il mare, solo con la mappa in vista */
  .m-flusso {
    display: inline;
    fill: none;
    stroke: #fff;
    stroke-opacity: .8;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-dasharray: 2 24;
    pointer-events: none;
    animation: scorre 2.4s linear infinite paused;
  }
  .anima .zone-map .m-flusso { transition: opacity .6s 2.2s; }
  .anima .zone-map:not(.is-in) .m-flusso { opacity: 0; }
  .zone-map.is-visible .m-flusso { animation-play-state: running; }

  /* domande: si aprono e chiudono scorrendo, dove il browser lo sa fare */
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    .faq details::details-content {
      height: 0;
      overflow: clip;
      transition: height .4s var(--ease), content-visibility .4s allow-discrete;
    }
    .faq details[open]::details-content { height: auto; }
  }

  /* --- vivo: si muove solo ciò che è in vista */
  .dot::after { animation: impulso 2s ease-out infinite paused; }
  .tic { animation: tic 1s steps(1) infinite paused; }
  .topbar.is-visible .dot::after, .topbar.is-visible .tic { animation-play-state: running; }

  /* il telefono del bottone squilla ogni qualche secondo finché il bottone è in vista */
  .btn-call .ico-phone, .callbar-call .ico-phone { transform-origin: 50% 50%; }
  [data-squilla].is-visible .btn-call .ico-phone { animation: squilla 4.5s 1.6s var(--ease) infinite; }
  .callbar.show .callbar-call .ico-phone { animation: squilla 4.5s .5s var(--ease) 1; }

  /* chiusura: cerchi d'acqua che si allargano dietro il titolo, come una goccia */
  .close::before,
  .close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: -1;
    width: min(760px, 120vw);
    aspect-ratio: 1;
    border: 1.5px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: cerchio 7s cubic-bezier(.2, .6, .35, 1) infinite paused;
  }
  .close::after { animation-delay: 3.5s; }
  .close.is-visible::before, .close.is-visible::after { animation-play-state: running; }

  /* credito EIR Studio: il fascio parte appena il logo è in vista, poi ogni 6s */
  .credit.is-lit::before { animation: eir-fascio 6s .3s cubic-bezier(.45, 0, .25, 1) infinite; }
  .credit.is-lit::after { animation: eir-riflesso 6s .3s cubic-bezier(.45, 0, .25, 1) infinite; }
  .credit.is-lit img { animation: eir-acceso 6s .3s var(--ease) infinite; }
}

@keyframes eir-fascio {
  0% { opacity: 0; transform: translateX(-150%) skewX(-18deg); }
  4%, 22% { opacity: 1; }
  28%, 100% { opacity: 0; transform: translateX(340%) skewX(-18deg); }
}
@keyframes eir-riflesso {
  0% { opacity: 1; background-position: 120% 0; }
  28% { opacity: 1; background-position: -20% 0; }
  29%, 100% { opacity: 0; background-position: -20% 0; }
}
@keyframes eir-acceso {
  0%, 30%, 100% { filter: none; }
  14% { filter: brightness(1.2) drop-shadow(0 0 10px rgba(0, 217, 255, .75)); }
}


/* ------------------------------------------------- movimento ridotto */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
