/* =========================================================================
   Intelligenzia Srl — sito istituzionale
   Foglio di stile unico. Nessuna dipendenza esterna (nessun font remoto,
   nessun CDN): il sito non effettua richieste verso terze parti.
   ========================================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* colori istituzionali */
  /* colori ufficiali del marchio Intelligenzia: navy #062346, ciano #00BAFF */
  --navy-900: #04182F;
  --navy-800: #062346;
  --navy-700: #0A3160;
  --brand-600: #0E5C9B;
  --brand-500: #1B7CC4;
  --brand-100: #E4F2FC;
  --accent-600: #00A3E0;
  --accent-500: #00BAFF;
  --accent-100: #DFF5FF;
  --accent-ink: #062346;   /* testo sopra il ciano */
  --accent-text: #0B6B9B;  /* ciano leggibile su fondo chiaro */
  --accent-light: #6FDBFF; /* ciano su fondo navy */
  --teal-600: #0B7C86;
  --teal-100: #DEF3F5;

  --ink: #0E1726;
  --body: #46536B;
  --muted: #65728B;
  --line: #E1E7F0;
  --line-strong: #CBD5E4;
  --bg: #FFFFFF;
  --bg-soft: #F5F7FB;
  --bg-softer: #FAFBFE;

  /* tipografia */
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fs-h1: clamp(2rem, 1.42rem + 2.1vw, 3.1rem);
  --fs-h2: clamp(1.5rem, 1.22rem + 1.15vw, 2.1rem);
  --fs-h3: clamp(1.15rem, 1.02rem + 0.5vw, 1.4rem);
  --fs-lead: clamp(1.02rem, 0.97rem + 0.35vw, 1.2rem);

  /* spazi, raggi, ombre */
  --gutter: 20px;
  --maxw: 1200px;
  --maxw-narrow: 820px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(11, 37, 71, .06), 0 2px 8px rgba(11, 37, 71, .05);
  --shadow-md: 0 6px 18px rgba(11, 37, 71, .09);
  --shadow-lg: 0 18px 44px rgba(11, 37, 71, .16);
  --header-h: 72px;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 700; line-height: 1.18; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--accent-text); text-decoration: underline; }
strong { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 2px; border-radius: 3px; }

/* ---------- 3. Utility di impaginazione ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: var(--maxw-narrow); margin-inline: auto; }
.section { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; }
.section--tight { padding: clamp(2.2rem, 1.6rem + 2vw, 3.2rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy-800); color: #D6E2F2; }
.section--navy h2, .section--navy h3, .section--navy h4 { color: #fff; }
/* senza questa riga lo strong globale (color: var(--ink)) renderebbe il
   grassetto quasi invisibile sul fondo navy */
.section--navy strong { color: inherit; }
.center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent-500); color: var(--accent-ink); padding: .7rem 1.1rem; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- 4. Blocchi testuali ricorrenti ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-text); margin: 0 0 .9rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent-500); display: inline-block; }
.section--navy .eyebrow { color: var(--accent-light); }
.section--navy .eyebrow::before { background: var(--accent-light); }
.lead { font-size: var(--fs-lead); color: var(--body); }
.section--navy .lead { color: #C6D6EC; }
.section-head { max-width: 760px; margin-bottom: clamp(1.8rem, 1.2rem + 1.5vw, 2.8rem); }
.section-head.center { margin-inline: auto; }
.section-head p:last-child { margin-bottom: 0; }

/* ---------- 5. Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-weight: 600; line-height: 1.2; text-align: center;
  padding: .85rem 1.5rem; border-radius: var(--r-sm); border: 2px solid transparent;
  cursor: pointer; transition: background-color .18s, color .18s, border-color .18s, transform .18s, box-shadow .18s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--accent-500); border-color: var(--accent-500); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-600); border-color: var(--accent-600); color: var(--accent-ink); }
.btn--brand { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn--brand:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn--outline { border-color: var(--line-strong); color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--brand-600); color: var(--brand-600); }
.btn--light { background: #fff; border-color: #fff; color: var(--navy-800); }
.btn--light:hover { background: #EAF1FB; border-color: #EAF1FB; color: var(--navy-800); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, .1); color: #fff; }
.btn--sm { padding: .6rem 1.05rem; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.link-arrow::after { content: "→"; transition: transform .18s; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- 6. Barra superiore ---------- */
.topbar { background: var(--navy-900); color: #A9BEDA; font-size: .85rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; }
.topbar a { color: #D7E3F4; }
.topbar a:hover { color: #fff; text-decoration: none; }
.topbar__claim { display: flex; align-items: center; gap: .5rem; }
.topbar__claim b { color: #fff; font-weight: 600; }
.topbar__links { display: flex; align-items: center; gap: 1.3rem; }
.topbar__links span { color: #45618A; }
@media (max-width: 900px) { .topbar__claim { display: none; } .topbar .container { justify-content: center; } }
@media (max-width: 620px) {
  .topbar__links { gap: .9rem; font-size: .8rem; }
  /* su schermi stretti il numero resta nel menu e nel footer: qui toglie spazio */
  .topbar__tel, .topbar__sep { display: none; }
}

/* selettore di lingua: sigle a due lettere nella barra superiore */
.lang-switch { display: flex; align-items: center; gap: .15rem; }
.lang-switch a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .4rem;
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: #A9BEDA;
}
.lang-switch .flag {
  width: 18px;
  height: 13px;
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .3);
  opacity: .8;
  transition: opacity .15s;
}
.lang-switch a:hover { color: #fff; background: rgba(255, 255, 255, .12); text-decoration: none; }
.lang-switch a:hover .flag { opacity: 1; }
.lang-switch a[aria-current] { color: var(--accent-light); background: rgba(255, 255, 255, .1); }
.lang-switch a[aria-current] .flag { opacity: 1; box-shadow: 0 0 0 1px rgba(255, 255, 255, .55); }
/* su schermi stretti restano le sole bandiere: la sigla toglierebbe spazio */
@media (max-width: 620px) {
  .lang-switch a { gap: 0; padding: .18rem .2rem; }
  .lang-switch a span { display: none; }
}

/* ---------- 7. Header e navigazione ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 100; background: #fff;
  border-bottom: 1px solid var(--line); transition: box-shadow .2s;
}
.site-header.is-stuck { box-shadow: var(--shadow-md); }
.site-header .container { display: flex; align-items: center; gap: 1.2rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 32px; width: auto; }
.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .7rem .8rem; border-radius: var(--r-sm);
  color: var(--ink); font-weight: 600; font-size: .96rem; background: none; border: 0; font-family: inherit; cursor: pointer;
}
.nav__link:hover { color: var(--brand-600); background: var(--bg-soft); text-decoration: none; }
.nav__link[aria-current="page"] { color: var(--brand-600); box-shadow: inset 0 -3px 0 var(--accent-500); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.nav__link .chev { width: 10px; height: 10px; transition: transform .18s; }
.nav__item--mega { position: relative; }
.nav__link[aria-expanded="true"] { color: var(--brand-600); background: var(--bg-soft); }
.nav__link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.header-actions { display: flex; align-items: center; gap: .6rem; flex: none; }

/* mega menu (desktop)
   I pannelli si agganciano all'header (non alla voce), così restano sempre
   dentro lo schermo. Soluzioni: largo e centrato, 4 colonne.
   Azienda: più stretto, allineato al bordo destro del contenitore. */
@media (min-width: 1024px) {
  .nav__item--mega { position: static; }
}
.mega {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  width: min(1160px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100vh - var(--header-h) - 3.5rem);
  max-height: calc(100dvh - var(--header-h) - 3.5rem);
  overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: var(--shadow-lg); padding: 1.4rem 1.6rem 1.1rem; display: none; z-index: 110;
}
#mega-3 > .mega {
  left: auto; transform: none; width: min(840px, calc(100vw - 2 * var(--gutter)));
  right: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
}
.nav__item--mega.is-open .mega { display: block; }
.mega__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem 1.6rem; }
#mega-3 .mega__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mega__col h4 {
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 .45rem; padding: 0 .55rem .45rem; border-bottom: 1px solid var(--line);
}
.mega__list + h4 { margin-top: 1.1rem; }
.mega__list { list-style: none; margin: 0; padding: 0; }
.mega__list li { margin: 0; }
.mega__list a {
  display: block; padding: .38rem .55rem; border-radius: var(--r-sm);
  color: var(--ink); font-weight: 600; font-size: .92rem; line-height: 1.3;
}
.mega__list a span { display: block; font-weight: 400; font-size: .8rem; line-height: 1.35; color: var(--muted); margin-top: .1rem; }
.mega__list a:hover, .mega__list a:focus-visible { background: var(--brand-100); color: var(--brand-600); text-decoration: none; }
.mega__foot {
  margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .6rem 1rem; justify-content: space-between; align-items: center; font-size: .9rem;
}
/* schermi bassi (portatili 13"): ancora più compatto */
@media (min-width: 1024px) and (max-height: 820px) {
  .mega { padding-top: 1.1rem; }
  .mega__list a { padding-block: .28rem; }
  .mega__list + h4 { margin-top: .8rem; }
}
/* desktop stretti: 4 colonne più vicine */
@media (min-width: 1024px) and (max-width: 1199px) {
  .mega { padding-inline: 1.1rem; }
  .mega__grid { gap: 1rem 1rem; }
}

/* toggle mobile */
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: #fff; cursor: pointer; padding: 0; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 50%; width: 20px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s;
}
.nav-toggle span { top: 50%; transform: translate(-50%, -50%); }
.nav-toggle span::before { content: ""; transform: translateX(-50%) translateY(-6px); }
.nav-toggle span::after { content: ""; transform: translateX(-50%) translateY(6px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateX(-50%) rotate(-45deg); }

@media (max-width: 1023px) {
  .nav-toggle { display: block; }
  .header-actions { display: none; }
  .nav {
    position: fixed; inset: calc(var(--header-h) + 40px) 0 0 0; background: #fff;
    overflow-y: auto; padding: 1rem var(--gutter) 3rem; margin: 0;
    transform: translateX(100%); transition: transform .22s ease; visibility: hidden;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { border-bottom: 1px solid var(--line); }
  .nav__link { width: 100%; justify-content: space-between; padding: 1rem .2rem; font-size: 1.05rem; border-radius: 0; }
  .nav__link[aria-current="page"] { box-shadow: none; }
  .mega, #mega-3 > .mega {
    position: static; transform: none; width: auto; max-height: none; overflow: visible;
    border: 0; box-shadow: none; padding: 0 0 1rem; border-radius: 0;
  }
  .mega__grid, #mega-3 .mega__grid { grid-template-columns: 1fr; gap: 1rem; }
  .mega__foot { margin-top: .8rem; }
  .nav__cta { display: flex; gap: .7rem; flex-wrap: wrap; padding: 1.4rem .2rem 0; }
  .nav__cta .btn { flex: 1 1 auto; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .mega__grid, #mega-3 .mega__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.4rem; }
}
@media (min-width: 1024px) { .nav__cta { display: none; } }

/* ---------- 8. Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #D9E4F4;
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 58%, #0A3A6B 100%);
}
/* fotografia istituzionale */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("../img/hero-robot.jpg");
  background-size: cover; background-position: 74% center;
}
/* velo navy che garantisce la leggibilità del testo, più la trama tecnica */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(100deg, rgba(4, 24, 47, .97) 0%, rgba(4, 24, 47, .9) 32%, rgba(6, 35, 70, .6) 60%, rgba(6, 35, 70, .22) 100%),
    url("../img/pattern-grid.svg");
  background-size: cover, 520px;
}
@media (max-width: 900px) {
  .hero::before { background-image: url("../img/hero-robot-sm.jpg"); background-position: 66% center; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(4, 24, 47, .93) 0%, rgba(4, 24, 47, .9) 55%, rgba(6, 35, 70, .86) 100%),
      url("../img/pattern-grid.svg");
    background-size: cover, 420px;
  }
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; padding: clamp(3rem, 2rem + 5vw, 6rem) 0; }
/* variante a colonna singola: lascia respirare la fotografia sulla destra */
.hero__inner--single { grid-template-columns: minmax(0, 640px); }
@media (min-width: 901px) { .hero__inner--single { padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem); } }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--accent-light); }
.hero__lead { font-size: var(--fs-lead); color: #C6D6EC; max-width: 44ch; }
.hero__badges { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.hero__badges li {
  font-size: .85rem; font-weight: 600; color: #DCE8F8; margin: 0;
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .07);
  border-radius: 999px; padding: .35rem .85rem;
}
.hero__card {
  background: rgba(255, 255, 255, .97); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: clamp(1.4rem, 1rem + 1.2vw, 2rem); color: var(--body);
}
.hero__card h2 { font-size: 1.2rem; }
.hero__card ul { list-style: none; padding: 0; margin: 0; }
.hero__card li { display: flex; gap: .7rem; padding: .65rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.hero__card li:last-child { border-bottom: 0; }
.hero__card li b { display: block; color: var(--ink); }
.hero__card li small { color: var(--muted); }
.hero__card .tick { flex: none; width: 22px; height: 22px; margin-top: .15rem; color: var(--teal-600); }
@media (max-width: 900px) { .hero__inner { grid-template-columns: 1fr; } }

/* hero interno di pagina */
.page-hero {
  color: #CFDDF0; padding: clamp(2.2rem, 1.6rem + 3vw, 4rem) 0 clamp(2.4rem, 1.8rem + 3vw, 4rem);
  background: linear-gradient(150deg, var(--navy-900) 0%, var(--navy-800) 60%, #14406F 100%);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background-image: url("../img/hero-robot-sm.jpg");
  background-size: cover; background-position: 72% center;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(100deg, rgba(4, 24, 47, .92) 0%, rgba(4, 24, 47, .8) 38%, rgba(6, 35, 70, .45) 100%),
    url("../img/pattern-grid.svg");
  background-size: cover, 460px;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; max-width: 22ch; }
.page-hero p { color: #C6D6EC; font-size: var(--fs-lead); max-width: 62ch; margin-bottom: 0; }
.page-hero--sub h1 { max-width: 30ch; }

/* breadcrumb */
.breadcrumb { font-size: .86rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0 0 1.1rem; padding: 0; }
.breadcrumb li { margin: 0; color: #9DB4D4; }
.breadcrumb li + li::before { content: "/"; margin-right: .45rem; color: #61799C; }
.breadcrumb a { color: #CFDDF0; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb [aria-current] { color: #fff; font-weight: 600; }

/* ---------- 9. Griglie e card ---------- */
.grid { display: grid; gap: 1.2rem; }
/* evita che un contenuto largo (tabelle, parole lunghe) allarghi la colonna oltre lo schermo */
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(1.6rem, 1rem + 2.5vw, 3rem); align-items: start; }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .grid--sidebar { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1.5rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--body); }
.card p:last-of-type { margin-bottom: 1rem; }
.card > :last-child { margin-top: auto; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card__icon {
  width: 46px; height: 46px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--brand-100); color: var(--brand-600); margin-bottom: 1rem;
}
.card__icon svg { width: 24px; height: 24px; }
.card__icon--accent { background: var(--accent-100); color: var(--accent-text); }
.card__icon--teal { background: var(--teal-100); color: var(--teal-600); }
.card__tag { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.card ul { padding-left: 1.1em; }
.card ul li { font-size: .95rem; }

.tile-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.tile-list li { display: flex; gap: .7rem; margin: 0; }
.tile-list .tick { flex: none; width: 20px; height: 20px; margin-top: .25rem; color: var(--teal-600); }
.section--navy .tile-list .tick { color: var(--accent-light); }

/* numeri */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.stat { border-left: 3px solid var(--accent-500); padding-left: 1.1rem; }
.stat b { display: block; font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); line-height: 1.05; color: var(--ink); letter-spacing: -.02em; }
.section--navy .stat b { color: #fff; }
.stat span { font-size: .93rem; color: var(--muted); }
.section--navy .stat span { color: #A9C0DD; }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* settori */
.sector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.sector {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 190px; padding: 1.3rem; border-radius: var(--r-md); overflow: hidden;
  color: #fff; background: linear-gradient(160deg, var(--navy-700), var(--brand-600));
  border: 1px solid rgba(255, 255, 255, .12);
}
.sector:nth-child(2n) { background: linear-gradient(160deg, var(--navy-800), var(--teal-600)); }
.sector:nth-child(3n) { background: linear-gradient(160deg, var(--navy-900), #1E5F9E); }
.sector:hover { text-decoration: none; color: #fff; }
.sector::before {
  content: ""; position: absolute; inset: 0; background-image: url("../img/pattern-grid.svg");
  background-size: 300px; opacity: .45; transition: opacity .2s;
}
.sector:hover::before { opacity: .75; }
.sector h3 { color: #fff; position: relative; margin-bottom: .3rem; font-size: 1.15rem; }
.sector p { position: relative; color: rgba(255, 255, 255, .88); font-size: .92rem; margin: 0; }
.sector__icon { position: relative; width: 34px; height: 34px; margin-bottom: auto; color: rgba(255, 255, 255, .9); }
@media (max-width: 1000px) { .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .sector-grid { grid-template-columns: 1fr; } }

/* ---------- 10. Fasce, processo, timeline, FAQ ---------- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.8rem, 1rem + 3vw, 3.5rem); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(1.3rem, 1rem + 1vw, 2rem); box-shadow: var(--shadow-sm); }
.panel--soft { background: var(--bg-soft); box-shadow: none; }
.panel--accent { border-left: 4px solid var(--accent-500); }
.panel--glass { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); box-shadow: none; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.4rem; margin: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-800); color: #fff; font-weight: 700; font-size: .95rem;
}
.steps li b { display: block; color: var(--ink); margin-bottom: .15rem; }
.section--navy .steps li::before { background: var(--accent-500); color: var(--accent-ink); }
.section--navy .steps li b { color: #fff; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 1.6rem; border-left: 2px solid var(--line-strong); }
.timeline li { position: relative; margin: 0 0 1.6rem; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.6rem - 7px); top: .45rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent-500); border: 2px solid #fff;
}
.timeline b { display: block; color: var(--ink); }
.timeline time { font-size: .82rem; font-weight: 700; letter-spacing: .08em; color: var(--brand-600); text-transform: uppercase; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-weight: 600; color: var(--ink); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--brand-600); line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 2.5rem 1.2rem 0; }
.faq details > div p:last-child { margin-bottom: 0; }

/* fascia partner / loghi */
.logo-row { display: flex; flex-wrap: wrap; gap: 1rem 2.2rem; align-items: center; justify-content: center; }
.logo-chip {
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff;
  padding: .7rem 1.2rem; font-weight: 700; color: var(--navy-700); font-size: .95rem; letter-spacing: .02em;
}

/* Targhetta "Partner Zucchetti".
   Il logo è usato esattamente come fornito da Zucchetti: file originale, proporzioni
   e margini invariati. Il riquadro bianco serve solo a garantirgli un fondo neutro
   nelle sezioni scure, come prevedono le regole d'uso dei marchi. */
.partner-badge { display: inline-flex; align-items: center; justify-content: center; }
.partner-badge img { width: 230px; height: auto; display: block; }
.partner-badge--sm img { width: 180px; }
.partner-badge--lg img { width: 320px; }
/* solo sul footer scuro il logo viene appoggiato su un fondo bianco */
.site-footer .partner-badge {
  background: #fff; border-radius: var(--r-md); padding: 0;
  box-shadow: var(--shadow-sm); margin-top: 1.2rem; overflow: hidden;
}
.site-footer .partner-badge img { width: 270px; }
@media (max-width: 560px) {
  .partner-badge img { width: 190px; }
  .partner-badge--lg img { width: 240px; }
}

/* ---------- Clienti ---------- */
/* Flex invece di grid: quando l'ultima riga è incompleta le schede
   restano centrate invece di accostarsi a sinistra. */
.client-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.client-card { flex: 0 1 calc((100% - 4rem) / 5); }
.client-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  min-height: 118px; padding: 1.1rem .9rem; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
/* I loghi clienti sono esportati su una tela uniforme 300x116 px (vedi
   assets/img/clienti/): basta una sola misura e risultano tutti allineati. */
.client-card img { width: 150px; max-width: 100%; height: auto; }
.client-card b { color: var(--navy-800); font-size: .97rem; line-height: 1.3; font-weight: 700; }
.client-card small { color: var(--muted); font-size: .8rem; }
@media (max-width: 1100px) { .client-card { flex-basis: calc((100% - 3rem) / 4); } }
@media (max-width: 860px)  { .client-card { flex-basis: calc((100% - 2rem) / 3); } }
@media (max-width: 560px)  { .client-card { flex-basis: calc((100% - 1rem) / 2); } }

/* CTA finale */
.cta-band {
  background: linear-gradient(120deg, var(--navy-800), var(--brand-600));
  color: #fff; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; opacity: .4;
  background-image: url("../img/pattern-grid.svg"); background-size: 420px;
}
.cta-band .container { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.5fr) auto; gap: 1.6rem; align-items: center; padding-block: clamp(2.2rem, 1.6rem + 2.5vw, 3.4rem); }
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { color: #D4E2F5; margin: 0; }
@media (max-width: 820px) { .cta-band .container { grid-template-columns: 1fr; } }

/* ---------- 11. News ---------- */
.news-card { padding: 0; overflow: hidden; }
.news-card__media { height: 8px; background: linear-gradient(90deg, var(--accent-500), var(--brand-500)); }
.news-card__body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.news-card time { font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.news-card h3 { font-size: 1.08rem; margin: .4rem 0 .5rem; }

/* ---------- 12. Contenuti lunghi ---------- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.2rem; font-size: 1.45rem; }
.prose h3 { margin-top: 1.7rem; font-size: 1.12rem; }
.prose ul { padding-left: 1.3em; }
.prose table { margin: 1.2rem 0 1.8rem; font-size: .94rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .7rem .8rem; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); color: var(--ink); }
.toc { background: var(--bg-soft); border-radius: var(--r-md); padding: 1.2rem 1.4rem; }
.toc ul { margin: 0; padding-left: 1.1em; }
@media (max-width: 700px) {
  /* le tabelle delle pagine legali scorrono orizzontalmente invece di allargare la pagina */
  .prose table { display: block; width: 100%; overflow-x: auto; }
}

/* ---------- 13. Form ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; color: var(--ink); font-size: .93rem; }
.field .req { color: var(--accent-text); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: #fff; padding: .7rem .8rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-500); outline: none; box-shadow: 0 0 0 3px rgba(28, 111, 208, .18); }
.field textarea { min-height: 140px; resize: vertical; }
.field small { color: var(--muted); font-size: .84rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.check input { width: 18px; height: 18px; flex: none; margin-top: .2rem; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .86rem; color: var(--muted); }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }

.contact-box { display: grid; gap: 1rem; }
.contact-box a { font-weight: 600; }
.contact-item { display: flex; gap: .8rem; }
.contact-item svg { width: 22px; height: 22px; flex: none; color: var(--brand-600); margin-top: .2rem; }
.contact-item b { display: block; color: var(--ink); }

/* ---------- 14. Footer ---------- */
.site-footer { background: var(--navy-900); color: #9FB6D4; font-size: .93rem; padding-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: #C9D9EE; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding-bottom: 2.4rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .55rem; }
.footer-brand > img { height: 34px; width: auto; margin-bottom: 1rem; }
.footer-brand p { max-width: 34ch; }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.2rem 0 2rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; font-size: .85rem; color: #8299BA;
}
.footer-legal ul { display: flex; flex-wrap: wrap; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }
.social { display: flex; gap: .6rem; margin-top: 1rem; }
.social a { width: 38px; height: 38px; border-radius: var(--r-sm); border: 1px solid rgba(255, 255, 255, .2); display: grid; place-items: center; }
.social svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 15. Animazioni ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Zone servite (SEO locale, nov. 2026) */
.footer-zones { font-size: .88rem; line-height: 1.8; color: #9FB3CC; margin: 0 0 1.6rem; }

/* Pagina "I nostri partner" */
.partner-logo { height: 84px; display: flex; align-items: center; justify-content: flex-start; margin-bottom: 1rem; }
.partner-logo img { max-height: 64px; max-width: 220px; width: auto; height: auto; object-fit: contain; }
.partner-logo__name { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; color: #0B2547; padding: .55rem 1rem; border: 1px solid #D9E1EC; border-radius: 10px; background: #F6F8FB; }
.partner-card__us { margin-bottom: 0; padding-top: .8rem; border-top: 1px solid #E6EBF2; }

/* ---- Menu "Divisione Energy" (20/11/2026) ---- */
.nav__energy { display: inline-flex; align-items: center; gap: .35rem; }
.nav__energy .bolt { width: 15px; height: 15px; color: #1FAE6E; flex: none; }
#mega-energy > .mega {
  left: auto; transform: none; width: min(840px, calc(100vw - 2 * var(--gutter)));
  right: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
}
#mega-energy .mega__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1024px) and (max-width: 1239px) {
  .nav__list { gap: 0; }
  .nav__link { padding-inline: .55rem; font-size: .93rem; }
}
@media (min-width: 1024px) and (max-width: 1119px) {
  .site-header .container { gap: .8rem; }
  .header-actions .btn { padding-inline: .8rem; }
}
@media (max-width: 1023px) {
  #mega-energy > .mega {
    position: static; transform: none; width: auto; max-height: none; overflow: visible;
    border: 0; box-shadow: none; padding: 0 0 1rem; border-radius: 0;
  }
  #mega-energy .mega__grid { grid-template-columns: 1fr; gap: 1rem; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  #mega-energy .mega__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.4rem; }
}
