/* ═══════════════════════════════════════════════════════════
   DGM Elettronica — design system
   Industriale scuro · verde segnale · rame PCB
   ═══════════════════════════════════════════════════════════ */

:root {
  /* superfici */
  --ink:        #050908;
  --bg:         #080d0b;
  --bg-2:       #0c1310;
  --surface:    #101914;
  --surface-2:  #16211b;
  --line:       rgba(255, 255, 255, .07);
  --line-2:     rgba(255, 255, 255, .13);

  /* accenti */
  --green:      #2fd57f;
  --green-hi:   #63efa4;
  --green-deep: #0f9257;
  --copper:     #d08b4c;

  /* testo */
  --white:      #f1f7f3;
  --text:       #9daea5;
  --muted:      #64766c;

  /* tipografia */
  --ff-display: 'Space Grotesk', system-ui, sans-serif;
  --ff-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* geometria */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;
  --gutter: clamp(15px, 4.5vw, 48px);
  --nav-h: 76px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; }

::selection { background: var(--green); color: var(--ink); }

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

/* ── tipografia ── */
h1, h2, h3, h4, h5 {
  font-family: var(--ff-display);
  color: var(--white);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* Le misure minime valgono sul telefono: tenerle alte era la causa
   principale delle pagine lunghissime. */
h1 { font-size: clamp(1.95rem, 6vw, 5.1rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 3rem); }
h3 { font-size: clamp(1.02rem, 1.9vw, 1.4rem); }
h4 { font-size: .95rem; letter-spacing: -.01em; }

p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.75;
  color: var(--text);
}

/* ── layout ── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 880px; }

.section { padding: clamp(38px, 8vw, 140px) 0; }
.section--tight { padding: clamp(30px, 6vw, 88px) 0; }
.section--alt { background: var(--bg-2); }
.section--ink { background: var(--ink); }

/* ═══════════ ATOMI ═══════════ */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 20px;
}
.kicker::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--green);
  opacity: .55;
}
.kicker--plain::before { display: none; }

.sec-head { max-width: 720px; margin-bottom: clamp(44px, 6vw, 72px); }
.sec-head.is-center { margin-inline: auto; text-align: center; }
.sec-head.is-center .kicker::before { display: none; }
.sec-head p { margin-top: 20px; font-size: 1.05rem; }

.section-divider {
  width: 46px;
  height: 3px;
  margin-top: 26px;
  background: var(--green);
  border-radius: 2px;
}
.sec-head.is-center .section-divider { margin-inline: auto; }

/* bottoni */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: 100px;
  font-family: var(--ff-display);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: all .35s var(--ease);
  /* Senza questo, i <button> prendono lo sfondo chiaro predefinito del
     browser e il testo chiaro sopra diventa illeggibile. */
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }

.btn--primary {
  background: var(--green);
  color: #04231a;
  box-shadow: 0 0 0 0 rgba(47, 213, 127, .45);
}
.btn--primary:hover {
  background: var(--green-hi);
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -10px rgba(47, 213, 127, .6);
}

.btn--ghost {
  border-color: var(--line-2);
  color: var(--white);
  background: rgba(255, 255, 255, .02);
}
.btn--ghost:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-2px);
}

.btn--sm { padding: 11px 20px; font-size: .76rem; }

/* link freccia */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ff-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  transition: gap .3s var(--ease);
}
.arrow-link svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.arrow-link:hover { gap: 15px; }

/* placeholder immagine */
.ph {
  aspect-ratio: var(--ph-ratio, 4/3);
  width: 100%;
  display: grid;
  place-content: center;
  gap: 14px;
  justify-items: center;
  padding: 24px;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.014) 0 12px, transparent 12px 24px),
    linear-gradient(150deg, var(--surface-2), var(--bg-2));
  border: 1px dashed rgba(47, 213, 127, .22);
  border-radius: var(--r-lg);
}
.ph-mark { width: 42px; height: 42px; stroke: var(--green); fill: none; stroke-width: 1.3; opacity: .5; }
.ph-txt strong {
  display: block;
  font-family: var(--ff-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.ph-txt code {
  font-size: .68rem;
  font-family: ui-monospace, monospace;
  color: rgba(47, 213, 127, .55);
  letter-spacing: .02em;
}

/* trama circuito */
.circuitry {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 40%, #000 20%, transparent 78%);
}

/* ═══════════ TOP BAR ═══════════ */
.topbar {
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: .76rem;
  color: var(--muted);
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 38px;
}
.topbar-group { display: flex; align-items: center; gap: 26px; }
.topbar span, .topbar a { display: inline-flex; align-items: center; gap: 8px; transition: color .25s; }
.topbar a:hover { color: var(--green); }
.topbar svg { width: 13px; height: 13px; stroke: var(--green); fill: none; stroke-width: 1.8; opacity: .75; }
@media (max-width: 900px) { .topbar { display: none; } }

/* ═══════════ NAV ═══════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 960; /* sopra il menu mobile: il tasto di chiusura deve restare cliccabile */
  background: rgba(8, 13, 11, .78);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--line);
  transition: background .3s, border-color .3s;
}
.nav.is-stuck { background: rgba(5, 9, 8, .94); border-bottom-color: var(--line-2); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  height: var(--nav-h);
}

.brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand img { height: 56px; width: auto; }
@media (max-width: 560px) { .brand img { height: 46px; } }
.brand-fallback { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--ff-display);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.03em;
  line-height: 1;
}
.brand-name em { color: var(--green); font-style: normal; }
.brand-sub {
  font-size: .56rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  padding: 9px 15px;
  font-family: var(--ff-display);
  font-size: .84rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--r-sm);
  transition: color .25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 2px;
  height: 1.5px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--white); }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-tel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}
.nav-tel-ico {
  width: 34px; height: 34px;
  display: grid; place-content: center;
  border-radius: 50%;
  background: rgba(47, 213, 127, .1);
  border: 1px solid rgba(47, 213, 127, .22);
}
.nav-tel-ico svg { width: 15px; height: 15px; stroke: var(--green); fill: none; stroke-width: 2; }
.nav-tel b {
  display: block;
  font-family: var(--ff-display);
  font-size: .84rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.25;
}
.nav-tel small { font-size: .66rem; color: var(--muted); }

.burger {
  display: none;
  width: 44px; height: 44px;
  place-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  cursor: pointer;
}
.burger span {
  display: block;
  width: 19px; height: 1.6px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .35s var(--ease), opacity .2s;
}
.burger.is-open span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav-links, .nav-tel { display: none; }
  .burger { display: grid; }
}

/* menu mobile */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: var(--ink);
  padding: calc(var(--nav-h) + 28px) var(--gutter) 40px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a.m-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--ff-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -.02em;
}
.mobile-menu a.m-link span { font-size: .7rem; color: var(--muted); letter-spacing: .16em; }
.mobile-menu a.m-link.is-active { color: var(--green); }
.mobile-foot { margin-top: 34px; display: grid; gap: 14px; }
.mobile-foot .btn { width: 100%; }
.mobile-foot .m-meta { font-size: .82rem; color: var(--muted); line-height: 1.8; }

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 120% 80% at 15% 0%, #0e1a14 0%, var(--bg) 55%);
  padding: clamp(72px, 10vw, 130px) 0 0;
}
.hero-glow {
  position: absolute;
  width: 720px; height: 720px;
  top: -280px; right: -180px;
  background: radial-gradient(circle, rgba(47, 213, 127, .12), transparent 66%);
  filter: blur(30px);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: clamp(40px, 5vw, 76px);
  align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

/* titolo più contenuto: il testo istituzionale è lungo e a scala piena
   spingerebbe fuori schermo descrizione e pulsanti */
.hero h1 {
  font-size: clamp(1.62rem, 4.2vw, 3.4rem);
  line-height: 1.14;
  margin-bottom: 24px;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--green);
}
@media (max-width: 980px) { .hero h1 { max-width: none; } }
.hero-desc {
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
  line-height: 1.75;
  max-width: 52ch;
  margin-bottom: 38px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }

.hero-visual { position: relative; }
.hero-visual .ph, .hero-visual img {
  border-radius: var(--r-xl);
  aspect-ratio: 4/5;
  object-fit: cover;
}
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  background: linear-gradient(200deg, rgba(47, 213, 127, .07), transparent 45%);
  pointer-events: none;
}
.hero-tag {
  position: absolute;
  left: -22px; bottom: 34px;
  z-index: 3;
  padding: 18px 26px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--green);
  border-radius: var(--r-md);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .9);
}
.hero-tag b {
  display: block;
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.hero-tag small {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
}
@media (max-width: 980px) { .hero-tag { left: 16px; } }

/* strip statistiche */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  margin-top: clamp(56px, 8vw, 96px);
}
.stat-strip .stat {
  padding: 34px 30px;
  border-right: 1px solid var(--line);
}
.stat-strip .stat:first-child { padding-left: 0; }
.stat-strip .stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--ff-display);
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat-num i { font-style: normal; color: var(--green); }
.stat-lab {
  margin-top: 11px;
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 860px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip .stat { padding: 26px 20px; border-bottom: 1px solid var(--line); }
  .stat-strip .stat:nth-child(2n) { border-right: 0; }
  .stat-strip .stat:nth-child(odd) { padding-left: 0; }
}

/* ═══════════ PAGE HERO (pagine interne) ═══════════ */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 120px) 0 clamp(52px, 7vw, 84px);
  background: radial-gradient(ellipse 100% 70% at 20% 0%, #0e1a14, var(--bg) 60%);
  border-bottom: 1px solid var(--line);
}
.page-hero .container { position: relative; z-index: 2; max-width: 900px; }
.page-hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); margin-bottom: 22px; }
.page-hero p { font-size: clamp(1rem, 1.6vw, 1.16rem); max-width: 60ch; }

.crumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  font-size: .76rem;
  color: var(--muted);
}
.crumbs a:hover { color: var(--green); }
.crumbs span { opacity: .4; }

/* ═══════════ CARD ═══════════ */
.grid { display: grid; gap: 22px; }
/* Impedisce che un contenuto largo (tabella, grafico) allarghi la colonna
   e con essa tutta la pagina, invece di restare dentro il proprio riquadro. */
.grid > *, .split > * { min-width: 0; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

.card {
  position: relative;
  padding: 36px 32px 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .45s var(--ease), border-color .45s, background .45s;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.card:hover::before { transform: scaleX(1); }

.card-ico {
  width: 50px; height: 50px;
  display: grid; place-content: center;
  margin-bottom: 24px;
  border-radius: var(--r-md);
  background: rgba(47, 213, 127, .08);
  border: 1px solid rgba(47, 213, 127, .18);
  transition: background .4s, border-color .4s;
}
.card-ico svg { width: 23px; height: 23px; stroke: var(--green); fill: none; stroke-width: 1.6; }
.card:hover .card-ico { background: rgba(47, 213, 127, .15); border-color: rgba(47, 213, 127, .38); }

.card h3 { margin-bottom: 13px; }
.card p { font-size: .93rem; line-height: 1.72; }
.card .arrow-link { margin-top: 22px; }

.card-num {
  position: absolute;
  top: 22px; right: 26px;
  font-family: var(--ff-display);
  font-size: 3.4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .035);
  line-height: 1;
  letter-spacing: -.04em;
}

/* card compatta (settori) */
.chip-card {
  padding: 28px 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .35s, transform .35s var(--ease), background .35s;
}
.chip-card:hover { border-color: rgba(47, 213, 127, .35); transform: translateY(-4px); background: var(--surface); }
.chip-card svg { width: 26px; height: 26px; stroke: var(--green); fill: none; stroke-width: 1.5; margin-bottom: 18px; }
.chip-card h4 { margin-bottom: 9px; }
.chip-card p { font-size: .87rem; line-height: 1.68; color: var(--muted); }

/* ═══════════ SPLIT (testo + immagine) ═══════════ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(38px, 6vw, 84px);
  align-items: center;
}
.split--reverse .split-media { order: -1; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }
}

.split-media { position: relative; }
.split-media img, .split-media .ph { border-radius: var(--r-lg); aspect-ratio: 4/3; object-fit: cover; }
.split-media::after {
  content: '';
  position: absolute;
  right: -14px; bottom: -14px;
  width: 46%; height: 46%;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  border-radius: 0 0 var(--r-lg) 0;
  opacity: .35;
  pointer-events: none;
}
.split-body h2 { margin-bottom: 22px; }
.split-body p + p { margin-top: 17px; }
.split-body .btn-row { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 13px; }

/* elenco spuntato */
.checks { margin-top: 32px; display: grid; gap: 19px; }
.check { display: flex; gap: 15px; align-items: flex-start; }
.check-ico {
  width: 26px; height: 26px;
  flex-shrink: 0;
  display: grid; place-content: center;
  border-radius: 50%;
  background: rgba(47, 213, 127, .1);
  border: 1px solid rgba(47, 213, 127, .25);
  margin-top: 2px;
}
.check-ico svg { width: 12px; height: 12px; stroke: var(--green); fill: none; stroke-width: 2.6; }
.check h4 { color: var(--white); margin-bottom: 4px; }
.check p { font-size: .89rem; line-height: 1.65; color: var(--muted); }

/* ═══════════ BANDA NUMERI ═══════════ */
.band {
  position: relative;
  overflow: hidden;
  padding: clamp(58px, 7vw, 88px) 0;
  background: var(--ink);
  border-block: 1px solid var(--line);
}
.band .container { position: relative; z-index: 2; }
.band-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 40px; text-align: center; }

/* ═══════════ PROCESSO ═══════════ */
.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.flow-step {
  position: relative;
  padding: 38px 28px 34px;
  background: var(--bg-2);
  transition: background .4s;
}
.flow-step:hover { background: var(--surface); }
.flow-num {
  font-family: var(--ff-display);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--green);
  margin-bottom: 18px;
}
.flow-step h4 { margin-bottom: 10px; }
.flow-step p { font-size: .87rem; line-height: 1.68; color: var(--muted); }

/* ═══════════ NAV REPARTI ═══════════ */
.dept-nav {
  position: sticky;
  top: var(--nav-h);
  z-index: 700;
  background: rgba(8, 13, 11, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.dept-nav-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 12px 0;
}
.dept-nav-inner::-webkit-scrollbar { display: none; }
.dept-nav a {
  flex-shrink: 0;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--ff-display);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: all .3s;
}
.dept-nav a:hover, .dept-nav a.is-active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(47, 213, 127, .07);
}

.dept {
  padding: clamp(64px, 8vw, 104px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 78px); /* nav + barra reparti */
}
.dept--alt { background: var(--bg-2); }

.dept-tag {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 7px 15px 7px 9px;
  margin-bottom: 22px;
  background: rgba(47, 213, 127, .07);
  border: 1px solid rgba(47, 213, 127, .2);
  border-radius: 100px;
}
.dept-tag b {
  display: grid; place-content: center;
  width: 25px; height: 25px;
  border-radius: 50%;
  background: var(--green);
  color: #04231a;
  font-family: var(--ff-display);
  font-size: .72rem;
  font-weight: 700;
}
.dept-tag span {
  font-family: var(--ff-display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
}

/* specifiche tecniche */
.specs {
  margin-top: 30px;
  border-top: 1px solid var(--line);
}
.spec {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: .89rem;
}
.spec dt { color: var(--muted); }
.spec dd { color: var(--white); font-family: var(--ff-display); font-weight: 500; text-align: right; }

/* ═══════════ CTA ═══════════ */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(62px, 8vw, 104px) 0;
  background: linear-gradient(120deg, #0b1a13, var(--ink) 62%);
  border-top: 1px solid rgba(47, 213, 127, .18);
}
.cta::before {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  top: -50%; left: 8%;
  background: radial-gradient(circle, rgba(47, 213, 127, .13), transparent 65%);
  pointer-events: none;
}
.cta .container { position: relative; z-index: 2; }
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta h2 { margin-bottom: 12px; }
.cta p { font-size: 1.04rem; }
.cta-actions { display: flex; gap: 13px; flex-wrap: wrap; }

/* ═══════════ CONTATTI ═══════════ */
.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(34px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-list { margin-top: 34px; display: grid; gap: 4px; }
.contact-row {
  display: flex;
  gap: 17px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row-ico {
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: grid; place-content: center;
  border-radius: var(--r-md);
  background: rgba(47, 213, 127, .08);
  border: 1px solid rgba(47, 213, 127, .18);
}
.contact-row-ico svg { width: 16px; height: 16px; stroke: var(--green); fill: none; stroke-width: 1.8; }
.contact-row-lab {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.contact-row-val { color: var(--white); font-size: .96rem; line-height: 1.6; }
.contact-row-val a:hover { color: var(--green); }

.map {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  filter: invert(1) hue-rotate(180deg) grayscale(.55) brightness(.82) contrast(1.05);
  transition: filter .5s;
}
.map:hover { filter: invert(1) hue-rotate(180deg) grayscale(.25) brightness(.95) contrast(1.05); }
.map iframe { display: block; width: 100%; height: 260px; border: 0; }

/* form */
.form-panel {
  padding: clamp(28px, 4vw, 46px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 9px;
  font-family: var(--ff-display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: .95rem;
  transition: border-color .3s, background .3s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364766c' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 16px; padding-right: 42px; }
.field select option { background: var(--surface); color: var(--white); }
.field input::placeholder, .field textarea::placeholder { color: #4a5a52; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  background: var(--bg-2);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #e05252; }

.form-note { margin-top: 16px; font-size: .78rem; color: var(--muted); line-height: 1.7; text-align: center; }
.form-note a { color: var(--green); }

.form-msg {
  display: none;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: .9rem;
}
.form-msg.is-ok { display: block; background: rgba(47, 213, 127, .09); border: 1px solid rgba(47, 213, 127, .3); color: var(--green-hi); }
.form-msg.is-err { display: block; background: rgba(224, 82, 82, .09); border: 1px solid rgba(224, 82, 82, .3); color: #f08a8a; }

.hp { position: absolute; left: -9999px; opacity: 0; }

/* ═══════════ TESTO LEGALE ═══════════ */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.5rem; margin: 46px 0 16px; }
.prose h3 { font-size: 1.1rem; margin: 30px 0 12px; }
.prose p, .prose li { font-size: .96rem; line-height: 1.8; }
.prose p + p { margin-top: 14px; }
.prose ul { margin: 14px 0 14px 4px; display: grid; gap: 9px; }
.prose li { position: relative; padding-left: 22px; }
.prose li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.prose a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--white); }

/* ═══════════ FOOTER ═══════════ */
.footer { background: var(--ink); border-top: 1px solid var(--line); padding-top: clamp(56px, 7vw, 84px); }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 44px;
  padding-bottom: 52px;
}
@media (max-width: 980px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

.footer-brand img { height: 64px; margin-bottom: 22px; }
.footer-brand p { font-size: .9rem; line-height: 1.75; max-width: 34ch; margin-bottom: 20px; }
.footer-meta { font-size: .78rem; color: var(--muted); line-height: 1.8; }

.footer h5 {
  font-family: var(--ff-display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
}
.footer-col ul { display: grid; gap: 11px; }
.footer-col a, .footer-col li { font-size: .89rem; color: var(--text); transition: color .25s; }
.footer-col a:hover { color: var(--green); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.65; }
.footer-contact svg { width: 14px; height: 14px; stroke: var(--green); fill: none; stroke-width: 1.8; flex-shrink: 0; margin-top: 4px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted);
}
.footer-bottom nav { display: flex; gap: 22px; }
.footer-bottom a:hover { color: var(--green); }

/* ═══════════ COOKIE ═══════════ */
.cookie {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 1000;
  width: min(660px, calc(100vw - 32px));
  transform: translate(-50%, 130%);
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .95);
  transition: transform .55s var(--ease);
}
.cookie.is-visible { transform: translate(-50%, 0); }
.cookie p { flex: 1 1 260px; font-size: .85rem; line-height: 1.65; }
.cookie p a { color: var(--green); }
.cookie-actions { display: flex; gap: 10px; }

/* ═══════════ SCROLL TOP ═══════════ */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 800;
  width: 46px; height: 46px;
  display: grid; place-content: center;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .4s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--green); background: var(--surface-2); }
.to-top svg { width: 17px; height: 17px; stroke: var(--green); fill: none; stroke-width: 2; }

/* ═══════════ REVEAL ═══════════ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .09s; }
.reveal[data-delay="2"] { transition-delay: .18s; }
.reveal[data-delay="3"] { transition-delay: .27s; }
.reveal[data-delay="4"] { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ═══════════ UTILITY ═══════════ */
.text-center { text-align: center; }
.mt-xl { margin-top: clamp(26px, 4vw, 64px); }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1200;
  padding: 12px 20px;
  background: var(--green);
  color: var(--ink);
  border-radius: var(--r-md);
  font-weight: 600;
}
.skip-link:focus { left: 12px; }


/* ═══════════════════════════════════════════════════════════
   TABLET — da 1080px in giù
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  :root { --nav-h: 66px; }

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

  .card       { padding: 26px 22px 24px; }
  .card-ico   { width: 42px; height: 42px; margin-bottom: 16px; }
  .card-ico svg { width: 20px; height: 20px; }
  .card-num   { font-size: 2.4rem; top: 16px; right: 18px; }

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

  .hero-visual .ph, .hero-visual img { aspect-ratio: 16/10; }
}

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


/* ═══════════════════════════════════════════════════════════
   TELEFONO — da 720px in giù
   Due colonne anche qui: in una sola la pagina diventava
   interminabile. Testo e spaziature scendono di conseguenza.
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 720px) {

  body { font-size: 15px; line-height: 1.62; }

  /* ── griglie ── */
  .grid           { gap: 10px; }
  .grid--2,
  .grid--3,
  .grid--4        { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow           { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* ── schede più compatte: due per riga richiedono meno respiro ── */
  .card           { padding: 16px 14px 15px; border-radius: var(--r-md); }
  .card h3        { font-size: .96rem; margin-bottom: 7px; line-height: 1.25; }
  .card p         { font-size: .8rem; line-height: 1.55; }
  .card-ico       { width: 34px; height: 34px; margin-bottom: 12px; border-radius: 7px; }
  .card-ico svg   { width: 17px; height: 17px; }
  .card-num       { font-size: 1.5rem; top: 10px; right: 12px; }
  .card .arrow-link { margin-top: 12px; font-size: .68rem; }
  .card .arrow-link svg { width: 12px; height: 12px; }

  .chip-card      { padding: 16px 14px; }
  .chip-card svg  { width: 21px; height: 21px; margin-bottom: 11px; }
  .chip-card h4   { font-size: .89rem; margin-bottom: 6px; }
  .chip-card p    { font-size: .78rem; line-height: 1.5; }

  .flow-step      { padding: 18px 15px; }
  .flow-num       { font-size: .62rem; margin-bottom: 9px; }
  .flow-step h4   { font-size: .88rem; }
  .flow-step p    { font-size: .77rem; line-height: 1.5; }

  /* ── intestazioni di sezione ── */
  .sec-head       { margin-bottom: 24px; }
  .sec-head p     { font-size: .9rem; margin-top: 11px; }
  .kicker         { font-size: .62rem; margin-bottom: 12px; letter-spacing: .16em; }
  .kicker::before { width: 16px; }
  .section-divider { margin-top: 16px; width: 34px; height: 2px; }

  /* ── hero ── */
  .hero           { padding-top: 30px; }
  .hero-grid      { gap: 24px; }
  .hero h1        { font-size: clamp(1.62rem, 7.2vw, 2.35rem); max-width: none; margin-bottom: 15px; }
  .hero-desc      { font-size: .92rem; margin-bottom: 22px; }
  .hero-actions   { gap: 9px; margin-bottom: 30px; }
  .hero-visual .ph, .hero-visual img { aspect-ratio: 16/11; border-radius: var(--r-lg); }
  .hero-tag       { left: 12px; bottom: 12px; padding: 10px 15px; }
  .hero-tag b     { font-size: 1.1rem; }
  .hero-tag small { font-size: .58rem; }

  .stat-strip     { margin-top: 26px; }
  .stat-strip .stat { padding: 16px 12px; }
  .stat-num       { font-size: 1.5rem; }
  .stat-lab       { font-size: .62rem; margin-top: 6px; letter-spacing: .08em; }

  /* ── pagine interne ── */
  .page-hero      { padding: 30px 0 26px; }
  .page-hero h1   { font-size: clamp(1.6rem, 7vw, 2.2rem); margin-bottom: 12px; }
  .page-hero p    { font-size: .9rem; }
  .crumbs         { margin-top: 16px; font-size: .7rem; }

  /* ── testo + immagine ── */
  .split          { gap: 24px; }
  .split-media img, .split-media .ph { aspect-ratio: 16/10; }
  .split-media::after { display: none; }
  .split-body h2  { margin-bottom: 13px; }
  .split-body p   { font-size: .9rem; }
  .split-body p + p { margin-top: 11px; }
  .split-body .btn-row { margin-top: 22px; gap: 9px; }

  .checks         { margin-top: 20px; gap: 13px; }
  .check-ico      { width: 21px; height: 21px; }
  .check-ico svg  { width: 10px; height: 10px; }
  .check h4       { font-size: .87rem; }
  .check p        { font-size: .78rem; line-height: 1.5; }

  /* ── reparti ── */
  .dept           { padding: 34px 0; scroll-margin-top: calc(var(--nav-h) + 62px); }
  .dept-tag       { margin-bottom: 14px; padding: 5px 12px 5px 6px; }
  .dept-tag b     { width: 20px; height: 20px; font-size: .62rem; }
  .dept-tag span  { font-size: .62rem; }
  .dept-nav-inner { padding: 8px 0; }
  .dept-nav a     { padding: 7px 13px; font-size: .72rem; }
  .specs          { margin-top: 20px; }
  .spec           { padding: 9px 0; font-size: .78rem; gap: 12px; }

  /* ── pulsanti ── */
  .btn            { padding: 12px 18px; font-size: .74rem; gap: 7px; }
  .btn svg        { width: 14px; height: 14px; }
  .btn--sm        { padding: 9px 15px; font-size: .68rem; }

  /* ── banda numeri e chiamata all'azione ── */
  .band           { padding: 34px 0; }
  .band-grid      { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .cta            { padding: 34px 0; }
  .cta-inner      { gap: 20px; }
  .cta p          { font-size: .9rem; }
  .cta-actions    { gap: 9px; }

  /* ── contatti ── */
  .contact-grid   { gap: 26px; }
  .contact-row    { padding: 13px 0; gap: 13px; }
  .contact-row-ico { width: 32px; height: 32px; }
  .contact-row-ico svg { width: 14px; height: 14px; }
  .contact-row-val { font-size: .87rem; }
  .contact-row-lab { font-size: .6rem; margin-bottom: 3px; }
  .map iframe     { height: 190px; }
  .form-panel     { padding: 18px 16px; }
  .field          { margin-bottom: 13px; }
  .field label    { font-size: .66rem; margin-bottom: 6px; }
  .field input, .field select, .field textarea { padding: 11px 13px; font-size: .9rem; }
  .field textarea { min-height: 110px; }

  /* ── testi legali ── */
  .prose h2       { font-size: 1.16rem; margin: 28px 0 11px; }
  .prose h3       { font-size: 1rem; margin: 20px 0 9px; }
  .prose p, .prose li { font-size: .87rem; line-height: 1.68; }

  /* ── piè di pagina ── */
  .footer         { padding-top: 34px; }
  .footer-top     { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding-bottom: 26px; }
  .footer-brand   { grid-column: 1 / -1; }
  .footer-brand img { height: 48px; margin-bottom: 13px; }
  .footer-brand p { font-size: .82rem; margin-bottom: 13px; }
  .footer h5      { font-size: .66rem; margin-bottom: 13px; }
  .footer-col ul  { gap: 8px; }
  .footer-col a, .footer-col li { font-size: .8rem; }
  .footer-bottom  { padding: 16px 0; font-size: .72rem; }

  /* ── varie ── */
  .cookie         { padding: 15px 16px; gap: 13px; bottom: 12px; }
  .cookie p       { font-size: .77rem; flex-basis: 100%; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
  .to-top         { right: 14px; bottom: 14px; width: 40px; height: 40px; }
  .reveal         { transform: translateY(14px); transition-duration: .5s; }
}

/* ── schermi molto stretti: si torna a colonna singola ── */
@media (max-width: 400px) {
  .grid--2 { grid-template-columns: 1fr; }
  .split-body .btn-row .btn, .cta-actions .btn, .hero-actions .btn { width: 100%; }
}
