/* ==========================================================================
   Cercatoriacqua.it — foglio di stile
   Design tokens + componenti. Mobile-first, nessuna dipendenza esterna.
   ========================================================================== */

:root {
  --navy: #0b2545;
  --navy-2: #123a63;
  --blue: #2a7fc9;
  --sky: #3fa9f5;
  --sky-soft: #d6ebfb;
  --ice: #eaf3fb;
  --paper: #f5f8fc;
  --white: #ffffff;
  --ink: #16283a;
  --muted: #5a6b7c;
  --line: #dde6ef;
  --amber: #d97706;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, .06), 0 2px 8px rgba(11, 37, 69, .06);
  --shadow: 0 10px 30px rgba(11, 37, 69, .10);
  --shadow-lg: 0 24px 60px rgba(11, 37, 69, .18);
  --maxw: 1160px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--navy); margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--paper { background: var(--paper); }
.section--ice { background: var(--ice); }
.section--navy { background: var(--navy); color: #cfe0f0; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { max-width: 720px; margin: 0 auto clamp(28px, 4vw, 44px); text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section--navy .section-head p { color: #a9c2da; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; font-weight: 700; color: var(--blue); margin-bottom: .7rem;
}
.section--navy .eyebrow { color: var(--sky); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  background: var(--blue); color: #fff; font-weight: 700; font-size: .98rem;
  padding: .8em 1.5em; border-radius: 999px; border: 2px solid var(--blue);
  cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--light { background: #fff; color: var(--navy); border-color: #fff; }
.btn--light:hover { background: var(--sky); color: var(--navy); border-color: var(--sky); }
.btn--lg { font-size: 1.05rem; padding: .95em 1.9em; }
.btn--sm { padding: .55em 1.1em; font-size: .9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: var(--navy); font-size: 1.12rem; font-weight: 800; }
.brand-text small { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--navy); font-weight: 600; font-size: .96rem;
  padding: .5em .8em; border-radius: 8px;
}
.site-nav a:hover { background: var(--ice); text-decoration: none; }
.site-nav a.active { color: var(--blue); }
.site-nav a.btn.active { color: #fff; }
.site-nav .btn { margin-left: 6px; color: #fff; }
/* Il pulsante della nav resta scuro in hover: la regola generica
   .site-nav a:hover (sfondo chiaro) ha qui la precedenza. */
.site-nav a.btn:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 10px; color: var(--navy);
}
.nav-toggle:hover { background: var(--ice); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 80% -10%, #1d5488 0%, var(--navy) 55%, #081a33 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(63,169,245,.18), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(42,127,201,.22), transparent 45%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding-block: clamp(56px, 9vw, 110px) clamp(48px, 7vw, 84px); display: grid; gap: 40px; align-items: center; }
.hero h1 { color: #fff; }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #bcd4ea; max-width: 34ch; }

/* Intro della hero: ogni parola scende dall'alto, si ingrandisce appena e torna
   alla dimensione corretta mentre entra la parola successiva. Lo spezzamento in
   <span> avviene in main.js: senza JavaScript il testo resta intero e visibile. */
.hero-word {
  display: inline-block;
  transform-origin: 50% 65%;
  animation: hero-word-in .68s cubic-bezier(.22, .8, .3, 1) both;
  animation-delay: var(--word-delay, 0ms);
}
@keyframes hero-word-in {
  0%   { opacity: 0; transform: translate3d(0, -.75em, 0) scale(1); }
  38%  { opacity: 1; transform: translate3d(0, 0, 0) scale(1.09); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
/* Badge, pulsante ed elenco entrano in coda alla cascata delle parole. */
@keyframes hero-intro-fade {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
.hero-badge { animation: hero-intro-fade .5s ease-out both; }
.hero-actions { animation: hero-intro-fade .55s ease-out both; animation-delay: 1.5s; }
.hero-points { animation: hero-intro-fade .55s ease-out both; animation-delay: 1.65s; }

/* Bagliore sul bordo del pulsante della hero: a cascata conclusa un segmento
   luminoso compie un giro completo, una sola volta. La classe .btn--glow viene
   aggiunta da main.js quando l'ultima parola ha finito la sua animazione. */
@property --btn-glow-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.hero-actions .btn { position: relative; }
.hero-actions .btn::after {
  content: "";
  position: absolute;
  inset: -3px;
  padding: 3px;
  border-radius: inherit;
  background: conic-gradient(from var(--btn-glow-angle),
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0) 240deg,
    rgba(125, 215, 255, .25) 280deg,
    rgba(150, 230, 255, .6) 315deg,
    rgba(200, 244, 255, .9) 340deg,
    rgba(245, 253, 255, 1) 355deg,
    #fff 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 4px rgba(200, 242, 255, .9)) drop-shadow(0 0 10px rgba(90, 195, 255, .55));
  opacity: 0;
  pointer-events: none;
}
.btn--glow::after {
  animation: btn-glow-lap 1.5s linear forwards;
}
@keyframes btn-glow-lap {
  0%   { --btn-glow-angle: 0deg; opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { --btn-glow-angle: 360deg; opacity: 0; }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5em; font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--sky);
  background: rgba(63,169,245,.12); border: 1px solid rgba(63,169,245,.35);
  padding: .45em 1em; border-radius: 999px; margin-bottom: 1.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 14px 26px; margin-top: 30px; }
.hero-points li { list-style: none; display: flex; align-items: center; gap: .55em; color: #dbe9f6; font-weight: 600; font-size: .95rem; }
.hero-points svg { width: 20px; height: 20px; flex: none; }
.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-lg); padding: 28px; backdrop-filter: blur(6px);
}
.hero-card h3 { color: #fff; font-size: 1.1rem; margin-bottom: 1rem; }
.hero-card ul { list-style: none; padding: 0; margin: 0; }
.hero-card li { display: flex; align-items: flex-start; gap: .7em; padding: .55em 0; color: #d5e5f3; border-bottom: 1px solid rgba(255,255,255,.09); }
.hero-card li:last-child { border-bottom: 0; }
.hero-card li svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--sky); }

/* Colonna destra della hero: due panel impilati */
.hero-aside { display: grid; gap: 18px; align-content: start; }
.hero-card--promo {
  background: linear-gradient(140deg, rgba(63,169,245,.22), rgba(11,37,69,.30));
  border: 1px solid rgba(63,169,245,.5);
  padding: 22px 24px;
}
.hero-card--promo .eyebrow { color: var(--sky); margin-bottom: .25rem; }
.hero-card--promo h3 { margin-bottom: .45rem; }
.hero-card--promo p { color: #cfe0f0; font-size: .95rem; margin-bottom: .9rem; }

/* Locandina nella colonna destra della hero */
.hero-poster {
  margin: 0; padding: 12px; border-radius: var(--radius-lg);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(6px); box-shadow: var(--shadow-lg);
}
.hero-poster img { width: 100%; height: auto; border-radius: 12px; }

/* I due panel della hero, riutilizzati su sfondo chiaro */
.hero-card--light {
  background: #fff; border-color: var(--line); box-shadow: var(--shadow-sm);
  backdrop-filter: none;
}
.hero-card--light h3 { color: var(--navy); }
.hero-card--light li { color: var(--muted); border-bottom-color: var(--line); }
.hero-card--light li svg { color: var(--blue); }
.hero-card--light.hero-card--promo {
  background: linear-gradient(140deg, var(--ice), #fff);
  border-color: var(--sky-soft);
}
.hero-card--light .eyebrow { color: var(--blue); }
.hero-card--light.hero-card--promo p { color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--sky), var(--blue)); color: #fff; margin-bottom: 16px;
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .98rem; margin-bottom: 0; }

.method-card { display: flex; flex-direction: column; }
.method-card .tag { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: .35rem; }
.method-card p { flex-grow: 1; }
.method-card .use { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .9rem; }
.method-card .use strong { color: var(--navy); }

/* ---------- Feature / split ---------- */
.split { display: grid; gap: 40px; align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; height: auto; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 8px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.stat strong { display: block; font-size: 1.6rem; color: var(--blue); line-height: 1.1; }
.stat span { font-size: .88rem; color: var(--muted); }

/* ---------- Gallerie per tecnica: sul campo / risultati ---------- */
.tech-gallery + .tech-gallery { margin-top: clamp(44px, 6vw, 72px); }
.tech-gallery__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 24px; margin-bottom: 16px;
}
.tech-gallery__intro { max-width: 640px; }
.tech-gallery__intro h3 {
  display: flex; align-items: center; gap: .6em;
  font-size: 1.2rem; margin-bottom: 0;
}
.tech-gallery__intro h3::before {
  content: ""; flex: none; width: 28px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--sky), var(--blue));
}

.view-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px; border-radius: 999px;
  background: var(--ice); border: 1px solid var(--line);
}
.view-toggle__btn {
  display: inline-flex; align-items: center; gap: .45em;
  border: 0; background: transparent; color: var(--navy);
  font: inherit; font-size: .88rem; font-weight: 700; line-height: 1;
  padding: .6em 1.05em; border-radius: 999px; cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.view-toggle__btn svg { width: 15px; height: 15px; }
.view-toggle__btn:hover { color: var(--blue); }
.view-toggle__btn.is-active {
  background: linear-gradient(140deg, var(--sky), var(--blue));
  color: #fff; box-shadow: 0 4px 12px rgba(42, 127, 201, .28);
}

/* clip, non hidden: il viewport non deve diventare un contenitore
   scorrevole, altrimenti il binario puo' slittare fuori registro. */
.tech-gallery__viewport { position: relative; overflow: hidden; overflow: clip; }
.tech-gallery__track {
  display: flex; width: 200%;
  transition: transform .55s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}
.tech-gallery[data-view="risultati"] .tech-gallery__track { transform: translateX(-50%); }
.tech-gallery__pane { flex: 0 0 50%; display: flex; align-items: center; min-width: 0; }

.tech-gallery__strip {
  display: flex; align-items: flex-start; gap: 16px;
  width: 100%;
  padding: 6px 0 16px;
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.tech-gallery__strip::-webkit-scrollbar { display: none; }

.tech-gallery__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  display: none; place-items: center;
  background: rgba(255, 255, 255, .94); color: var(--navy);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease;
}
.tech-gallery.has-overflow .tech-gallery__arrow { display: grid; }
.tech-gallery__arrow:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.tech-gallery__arrow:disabled { opacity: 0; pointer-events: none; }
.tech-gallery__arrow svg { width: 20px; height: 20px; }
.tech-gallery__arrow--prev { left: 10px; }
.tech-gallery__arrow--next { right: 10px; }

.tech-card {
  flex: 0 0 calc(50% - 8px);
  margin: 0; padding: 10px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tech-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tech-card__media {
  display: block; overflow: hidden; border-radius: 10px;
  background: #fff; border: 1px solid var(--line);
}
.tech-card__media img {
  width: 100%; height: auto; aspect-ratio: 16 / 10;
  object-fit: contain; background: #fff; border-radius: 10px;
}
.tech-card__media--photo img { object-fit: cover; background: var(--ice); }
/* Le foto si avvicinano appena al passaggio del mouse: segnala che si aprono
   nel lightbox. Solo su dispositivi con puntatore fine, per non lasciare lo
   zoom "appiccicato" dopo un tap. */
@media (hover: hover) and (pointer: fine) {
  .tech-card__media--photo img { transition: transform .35s cubic-bezier(.22, .8, .3, 1); }
  .tech-card:hover .tech-card__media--photo img,
  .tech-card:focus-within .tech-card__media--photo img { transform: scale(1.035); }
}
.tech-card figcaption {
  margin-top: 10px; padding-bottom: 4px; text-align: center;
  font-size: .88rem; line-height: 1.4; color: var(--muted);
}
.tech-card figcaption strong { display: block; color: var(--navy); font-size: .95rem; }

@media (max-width: 639px) {
  .tech-gallery__head { align-items: flex-start; }
  .tech-card { flex-basis: 88%; }
  .tech-gallery__arrow { width: 38px; height: 38px; }
}

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { position: relative; padding-left: 68px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; color: #fff;
  background: linear-gradient(140deg, var(--sky), var(--blue));
}
.step h3 { margin-bottom: .3rem; }
.step p { color: var(--muted); margin-bottom: 0; }

/* ---------- Timeline iter ---------- */
/* Testo introduttivo sopra la lista numerata, allineato alla colonna dell'iter */
.iter-intro { max-width: 920px; margin: 0 auto clamp(26px, 3.5vw, 40px); }
.iter-intro p:last-child { margin-bottom: 0; }
.iter { position: relative; display: grid; gap: 18px; max-width: 920px; margin: 0 auto; }
/* Filo conduttore tra le fasi: la linea passa dietro le schede e resta visibile
   nei margini tra un passo e l'altro. Si disegna una volta quando l'iter entra
   in vista (classe .is-drawn da main.js); senza JavaScript resta nascosta. */
.iter::before {
  content: "";
  position: absolute;
  left: 44px; /* centro dei badge numerati: 22px + 46px / 2 */
  top: 45px;
  bottom: 45px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, rgba(63, 169, 245, .55), rgba(63, 169, 245, .25));
  transform: scaleY(0);
  transform-origin: 50% 0;
  pointer-events: none;
}
.iter.is-drawn::before { animation: iter-line-draw .8s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes iter-line-draw {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
.iter-item {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px 24px 88px; box-shadow: var(--shadow-sm);
}
.iter-item .num {
  position: absolute; left: 22px; top: 22px; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; color: #fff;
  background: linear-gradient(140deg, var(--sky), var(--blue));
}
/* La ricerca idrica: unico servizio offerto, messa in evidenza */
.iter-item.is-service {
  background: linear-gradient(140deg, var(--navy), #1d5488);
  color: #d5e5f3; border-color: transparent; box-shadow: var(--shadow-lg);
  padding: 30px 32px 30px 92px;
}
.iter-item.is-service::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  border: 2px solid var(--sky); pointer-events: none; opacity: .55;
}
.iter-item.is-service h3 { color: #fff; }
.iter-item.is-service p { color: #cfe0f0; }
.iter-item.is-service strong { color: #fff; }
.iter-item.is-service .num { background: #fff; color: var(--navy); }
.iter-item.is-service .badge-service {
  background: rgba(63,169,245,.22); color: #fff; border: 1px solid rgba(63,169,245,.55);
  font-size: .84rem; padding: .4em 1em;
}
.iter-item .service-flag {
  display: inline-block; background: var(--sky); color: var(--navy); font-weight: 800;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .3em .8em; border-radius: var(--radius); margin-bottom: .7rem;
}
.iter-item h3 { margin-bottom: .35rem; }
.iter-item p { color: var(--muted); margin-bottom: .7rem; }
.iter-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .86rem; }
.iter-meta span { display: inline-flex; align-items: center; gap: .4em; color: var(--muted); }
.iter-meta svg { width: 16px; height: 16px; color: var(--muted); }
/* Etichette di testo ("a cura di...", "la nostra specializzazione"): raggio
   contenuto al posto della pillola. Su una riga l'altezza limita comunque il
   raggio a metà, quindi il risultato resta identico; quando il testo va su
   due o più righe (schermi stretti) la pillola diventava un semicerchio ai
   lati e i bordi sembravano troppo arrotondati. */
.badge-service {
  display: inline-flex; align-items: flex-start; gap: .45em; background: var(--sky-soft);
  color: var(--navy); font-weight: 700; font-size: .78rem; padding: .32em .85em; border-radius: var(--radius);
}
/* Icona allineata alla prima riga: se l'etichetta va su più righe resta
   accanto al testo invece di finire al centro del riquadro. */
.badge-service svg { width: 16px; height: 16px; color: var(--blue); flex: none; margin-top: .18em; }
.badge-other {
  display: inline-flex; align-items: center; gap: .45em; background: #eef1f4;
  color: var(--muted); font-weight: 700; font-size: .78rem; padding: .32em .85em; border-radius: var(--radius);
}

/* Elenco delle tecniche geofisiche nella card della specializzazione */
.tech-list {
  list-style: none; padding: 0; margin: 4px 0 18px;
  display: grid; gap: 8px 22px;
}
.tech-list li {
  display: flex; align-items: baseline; gap: .55em;
  color: #dbe9f6; font-weight: 600; font-size: .95rem;
}
.tech-list li::before { content: "\2713"; color: var(--sky); font-weight: 800; flex: none; }

/* ---------- FAQ ---------- */
.faq { max-width: 840px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2px 22px; box-shadow: var(--shadow-sm);
}
.faq summary {
  font-weight: 700; color: var(--navy); cursor: pointer; padding: 18px 0;
  list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--blue); line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }
/* La risposta entra con un piccolo scorrimento; l'altezza resta quella nativa
   di <details>, quindi nessun ricalcolo del layout. */
.faq details[open] > p { animation: faq-answer-in .18s ease-out both; }
@keyframes faq-answer-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Callout servizio ---------- */
.aside-service {
  background: linear-gradient(140deg, var(--navy), #1d5488); color: #d5e5f3;
  border-radius: var(--radius-lg); padding: 28px;
}
.aside-service h3 { color: #fff; }
.aside-service ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.aside-service li { display: flex; gap: .7em; padding: .5em 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.aside-service li:last-child { border-bottom: 0; }
.aside-service li svg { width: 20px; height: 20px; flex: none; color: var(--sky); margin-top: 3px; }

/* ---------- Tags / applications ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: .55em; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: .7em 1.25em;
  font-weight: 600; color: var(--navy); box-shadow: var(--shadow-sm);
}
.chip svg { width: 20px; height: 20px; color: var(--blue); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy); color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--paper); }
tbody tr { transition: background-color .15s ease; }
/* Riga in lettura: fondo azzurro tenue e campione colore in evidenza, solo
   dove c'è un vero hover. */
@media (hover: hover) {
  tbody tr:hover { background: var(--ice); }
  tbody tr:hover .swatch { transform: scale(1.3); }
}
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: middle; transition: transform .15s ease; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--blue), var(--navy));
  color: #fff; border-radius: var(--radius-lg); padding: clamp(30px, 5vw, 52px);
  display: grid; gap: 24px; align-items: center; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #d5e5f3; margin-bottom: 0; }
.cta-band .btn--light { margin: 0 auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 30px; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.contact-card h3 { margin-bottom: .2rem; }
.contact-card .role { color: var(--blue); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }

/* Email principale: pannello in evidenza sopra le schede dei professionisti */
.contact-card--primary {
  background: linear-gradient(140deg, var(--navy), #1d5488);
  border-color: var(--navy);
  box-shadow: 0 10px 26px rgba(11, 37, 69, .18);
  margin-bottom: 30px;
}
.contact-card--primary .role { color: var(--sky); }
.contact-card--primary h2 {
  color: #fff; font-size: clamp(1.3rem, 3vw, 1.7rem);
  margin-bottom: .5rem; overflow-wrap: anywhere;
}
.contact-card--primary p { color: #bcd4ea; max-width: none; }
.contact-card--primary .contact-primary__mail { margin: 1.1rem 0 0; }

/* Panel "Aree di attività": colore distinto dagli altri */
.contact-card--area {
  background: linear-gradient(140deg, var(--ice), var(--sky-soft));
  border-color: var(--sky);
  box-shadow: 0 10px 26px rgba(42, 127, 201, .14);
}
.contact-card--area .role { color: var(--navy); }
.contact-card--area .contact-list svg { color: var(--blue); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; align-items: center; gap: .7em; padding: .45em 0; color: var(--muted); }
.contact-list a { color: var(--navy); font-weight: 600; }
.contact-list svg { width: 20px; height: 20px; color: var(--blue); flex: none; }

/* ---------- Footer ---------- */
.site-footer { background: #081a33; color: #9db4ca; padding: 56px 0 26px; }
.footer-grid { display: grid; gap: 34px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.site-footer a { color: #cfe0f0; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: .22em 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 34px; padding-top: 20px; font-size: .86rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer-bottom p { margin: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(120deg, var(--navy), #1d5488); color: #fff; padding: clamp(46px, 7vw, 78px) 0; }
.page-hero h1 { color: #fff; margin-bottom: .3rem; }
.page-hero p { color: #bcd4ea; max-width: 60ch; margin: 0; }
.breadcrumb { font-size: .85rem; color: #8fb0cd; margin-bottom: 1rem; }
.breadcrumb a { color: #bcd4ea; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.note {
  background: var(--sky-soft); border-left: 5px solid var(--blue);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.4rem 0;
}
.note strong { color: var(--navy); }
.disclaimer { font-size: .9rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 1rem; margin-top: 1.6rem; }

/* "Costruire un pozzo": iter e FAQ occupano lo stesso container della home,
   senza i restringimenti interni che avevano (920px e 840px). */
.page-uniform .iter,
.page-uniform .faq { max-width: none; }

/* ---------- Navigazione flottante tra sezioni ---------- */
.float-nav {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: flex; flex-direction: column; gap: 10px;
}
.float-nav__btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  box-shadow: var(--shadow); cursor: pointer;
  display: grid; place-items: center;
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.float-nav__btn svg { width: 22px; height: 22px; }
.float-nav__btn:hover:not(:disabled) { background: var(--blue); color: #fff; border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.float-nav__btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 640px) {
  .float-nav { right: 12px; bottom: 12px; gap: 8px; }
  .float-nav__btn { width: 44px; height: 44px; }
}

/* Offset per le ancore: tiene conto dell'header sticky */
.hero, .page-hero, .section { scroll-margin-top: calc(var(--header-h, 71px) + 16px); }

/* ---------- Lightbox per immagini ingrandibili ---------- */
[data-zoom] { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 26, 51, .92);
  display: grid; place-items: center; padding: 24px;
  animation: lightbox-in .2s ease;
}
.lightbox__img {
  max-width: min(100%, 900px); max-height: calc(100dvh - 180px);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  background: #fff;
}
.lightbox__close,
.lightbox__nav {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4); background: rgba(8, 26, 51, .45); color: #fff;
  cursor: pointer; display: grid; place-items: center;
}
.lightbox__close { top: 14px; right: 14px; font-size: 1.7rem; line-height: 1; }
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .18); }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 2.1rem; line-height: 1; padding-bottom: 4px; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__meta {
  position: absolute; bottom: 36px; left: 0; right: 0; padding: 0 70px;
  text-align: center; color: #fff;
}
.lightbox__counter {
  display: inline-block; font-size: .8rem; font-weight: 700; color: var(--sky);
  background: rgba(255, 255, 255, .12); border-radius: 999px;
  padding: .15em .8em; margin-bottom: .4rem;
}
.lightbox__hint {
  position: absolute; bottom: 12px; left: 0; right: 0; text-align: center;
  color: #a9c2da; font-size: .78rem; margin: 0;
}
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lightbox { animation: none; } }

/* ---------- Cookie banner (Garante Prov. 231/2021) ---------- */
.rda-cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  max-width: 720px; margin: 0 auto;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 20px 22px 18px;
  font-size: .92rem;
}
.rda-cookie-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: 0; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--muted);
  width: 36px; height: 36px; border-radius: 8px;
}
.rda-cookie-close:hover { background: var(--ice); color: var(--navy); }
.rda-cookie-text { padding-right: 28px; margin-bottom: 14px; }
.rda-cookie-text a { font-weight: 600; }
.rda-cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rda-cookie-actions .rda-link {
  background: none; border: 0; cursor: pointer; padding: .4em .2em;
  color: var(--navy); font-weight: 700; font-size: .9rem; text-decoration: underline;
}
.rda-cookie-prefs {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
  display: grid; gap: 8px;
}
.rda-cookie-prefs[hidden] { display: none; }
.rda-pref { display: flex; gap: .6em; align-items: flex-start; font-size: .9rem; }
.rda-pref input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--blue); }
.footer-consent-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: #cfe0f0; font: inherit; font-size: inherit;
}
.footer-consent-btn:hover { color: #fff; text-decoration: underline; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.lead { font-size: 1.12rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .tech-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse .split-media { order: 2; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 26px 30px; }
  .cta-band { grid-template-columns: 1.5fr auto; text-align: left; }
  .cta-band .btn--light { margin: 0; }
}

@media (max-width: 859px) {
  .nav-toggle { display: grid; place-items: center; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px; box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .7em .8em; }
  .site-nav .btn { margin-left: 0; }
}

@media (max-width: 560px) {
  .lightbox { padding: 16px; }
  .lightbox__nav { width: 42px; height: 42px; font-size: 1.8rem; }
  .lightbox__nav--prev { left: 4px; }
  .lightbox__nav--next { right: 4px; }
  .lightbox__meta { padding: 0 46px; bottom: 40px; }
  .lightbox__img { max-height: calc(100dvh - 190px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .hero-word, .hero-badge, .hero-actions, .hero-points { animation: none !important; }
  .btn--glow::after { animation: none !important; }
  .iter.is-drawn::before { animation: none !important; transform: none; }
  .faq details[open] > p { animation: none !important; }
  .tech-card:hover .tech-card__media--photo img,
  .tech-card:focus-within .tech-card__media--photo img { transform: none; }
  tbody tr:hover .swatch { transform: none; }
}
