/* FMstudio, anteprima della nuova homepage.
   Stessi colori e stessa tipografia del sito, look and feel diverso:
   blu "progetto" a griglia, sezioni scure, etichette numerate, angoli vivi e linee da 1px. */
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --blu-700: #093caa;
  --verde-500: #b3de0c;
  --verde-600: #a0c80a;
  --neutri-100: #f8f8f7;
  --neutri-700: #363530;
  --neutri-900: #1c1b18;
  --errore: #b3261e;

  --fs-h1: 52px;
  --fs-h2: 42px;
  --fs-h3: 33px;
  --fs-h4: 26px;
  --fs-large: 20px;
  --fs-body: 18px;
  --fs-small: 16px;
  --fs-xs: 14px;

  --line-light: rgb(248 248 247 / .22);
  --line-blue: rgb(9 60 170 / .25);
  --gutter: 60px;
  --section-y: 120px;
  --nav-h: 64px;
  --ease: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--neutri-100);
  color: var(--neutri-700);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.5;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure, fieldset, legend, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
address { font-style: normal; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h4); line-height: 1.3; }
:focus-visible { outline: 2px solid var(--verde-500); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 12px 16px; background: var(--verde-500); color: var(--neutri-900); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-top: 0; }
.section--light { background: var(--neutri-100); }
.section--blue { background: var(--blu-700); color: var(--neutri-100); }
.section--dark { background: var(--neutri-900); color: var(--neutri-100); }
.section--blue h2, .section--dark h2 { color: var(--neutri-100); }
.section--light h2 { color: var(--neutri-900); }

/* Etichetta numerata delle sezioni */
.index, .eyebrow, .tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
:root { --star: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 10V1M10 10L18.56 7.22M10 10L15.29 17.28M10 10L4.71 17.28M10 10L1.44 7.22%27 stroke=%27black%27 stroke-width=%272.4%27/%3E%3C/svg%3E") center / contain no-repeat; }
/* Segno delle etichette: asterisco a cinque bracci */
.index::before, .eyebrow::before { content: ""; flex: none; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--star); mask: var(--star); }
.section--light .index { color: var(--blu-700); }

.head { display: grid; gap: 24px; max-width: 920px; margin-bottom: 64px; }
.head--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px 80px; max-width: none; align-items: end; }
.head--split > div { display: grid; gap: 24px; }
.head__text { max-width: 560px; }
.section--blue .head__text, .section--dark .head__text { color: rgb(248 248 247 / .85); }

/* Bottoni: il quadrato con la freccia è il segno ricorrente della pagina */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 6px 6px 6px 22px;
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn--green { background: var(--verde-500); color: var(--neutri-900); }
.btn:not(:has(.arrow-box)) { padding-right: 22px; }
.btn--green:hover { background: var(--neutri-100); }
.btn--line { padding-right: 22px; border-color: currentColor; background: none; color: inherit; }
.btn--line:hover { background: var(--neutri-100); color: var(--blu-700); border-color: var(--neutri-100); }
.arrow-box {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--neutri-900);
  color: var(--neutri-100);
  transition: transform .35s var(--ease-out);
}
.btn:hover .arrow-box, .nav__cta:hover .arrow-box { transform: translate(2px, -2px); }

/* Navbar: barra blu fissa, voci raccolte in un riquadro al centro */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
  padding-inline: 24px;
  background: var(--blu-700);
  box-shadow: 0 1px 0 var(--line-light);
  color: var(--neutri-100);
  transition: box-shadow .3s ease, background-color .4s ease, color .4s ease;
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line-light), 0 12px 32px rgb(28 27 24 / .18); }
.nav__logo-svg { display: block; width: 110px; height: auto; transition: color .4s ease; }
.nav__menu { display: contents; }
.nav__links {
  position: absolute;
  left: 50%;
  display: flex;
  border: 1px solid var(--line-light);
  background: rgb(248 248 247 / .06);
  transform: translateX(-50%);
}
.nav__links a { display: block; padding: 10px 18px; font-size: var(--fs-small); transition: background-color .2s ease, box-shadow .4s ease; }
.nav__links li + li a { box-shadow: -1px 0 0 var(--line-light); }
.nav__links a:hover { background: var(--neutri-100); color: var(--blu-700); }
.nav__cta { display: inline-flex; align-items: center; gap: 12px; padding: 4px 4px 4px 16px; background: var(--verde-500); color: var(--neutri-900); font-size: var(--fs-small); font-weight: 600; }
.nav__cta .arrow-box { width: 34px; height: 34px; }
.nav__toggle { display: none; }

/* Hero: blu pieno, senza pattern */
.hero { position: relative; overflow: hidden; padding: calc(var(--nav-h) + 88px) 0 96px; background: var(--blu-700); color: var(--neutri-100); }
.hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 64px; align-items: center; }
.hero__copy { display: grid; gap: 28px; }
.hero h1 { color: var(--neutri-100); font-size: clamp(40px, 4.6vw, 64px); line-height: 1.08; }
.lead { max-width: 560px; color: var(--neutri-100); font-size: var(--fs-large); font-weight: 500; line-height: 1.6; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }


.hero__visual { position: relative; border: 1px solid var(--line-light); background: rgb(248 248 247 / .04); }
.hero__media { position: relative; aspect-ratio: 484 / 640; }
.flow { position: absolute; inset: 0; width: 100%; height: 100%; font-family: inherit; }
.flow__lines path { fill: none; stroke: var(--neutri-100); stroke-width: 1.2; stroke-dasharray: 3 4; animation: flow-dash 1.4s linear infinite; }
.flow__routes path { fill: none; stroke: none; }
.flow__label { fill: var(--neutri-100); font-size: 15px; }
.flow__tile, .flow__dot, .flow__packets rect, .flow__window { fill: var(--neutri-100); }
.flow__rule, .flow__track, .flow__axis { fill: none; stroke: var(--blu-700); stroke-width: .6; opacity: .35; }
.flow__fill { fill: none; stroke: var(--blu-700); stroke-width: 1.4; }
.flow__light { fill: none; stroke: var(--blu-700); stroke-width: .6; }
.flow__knob { fill: var(--blu-700); }
.flow__text { fill: var(--blu-700); font-size: 9px; }
.flow__small { fill: var(--blu-700); font-size: 6.5px; }
.flow__dash { fill: none; stroke: var(--blu-700); stroke-width: .8; stroke-dasharray: 1.5 2; }
.flow__area { fill: var(--blu-700); opacity: .07; }
.flow__curve { fill: none; stroke: var(--blu-700); stroke-width: 1.2; stroke-dasharray: var(--curve-len); stroke-dashoffset: var(--curve-len); animation: flow-draw 2.2s var(--ease) .6s forwards; }
.flow__badge rect { fill: var(--neutri-100); stroke: var(--blu-700); stroke-width: .6; }
.flow__badge, .flow__mark { opacity: 0; animation: flow-in .5s ease 2.6s forwards; }
.flow__packets { opacity: 0; }
.flow.is-running .flow__packets { opacity: 1; }
.flow.is-waiting .flow__curve, .flow.is-waiting .flow__badge, .flow.is-waiting .flow__mark { animation: none; }
@keyframes flow-dash { to { stroke-dashoffset: -7; } }
@keyframes flow-draw { to { stroke-dashoffset: 0; } }
@keyframes flow-in { to { opacity: 1; } }

/* Nastro dei servizi che scorre */

/* Metodo: tre passi affiancati, ognuno con la sua lastra */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--blu-700); }
.step { display: grid; align-content: start; gap: 16px; padding: 32px 32px 8px 0; color: var(--neutri-700); }
.step + .step { padding-left: 32px; border-left: 1px solid var(--line-blue); }
.step__art { display: grid; place-items: center; aspect-ratio: 5 / 3; margin-bottom: 8px; background: var(--blu-700); }
.step__art img { width: 72%; }
.step__num { color: var(--blu-700); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; }
.step h3 { color: var(--neutri-900); }

/* Servizi: righe a tutta larghezza, numerate, con le competenze in chip */
.services { border-top: 1px solid var(--line-light); }
.service {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1.2fr) minmax(0, 1fr) 48px;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--line-light);
  transition: background-color .3s ease, padding .3s var(--ease-out);
}
.service:hover { padding-inline: 20px; background: rgb(248 248 247 / .06); }
.service__icon { display: grid; place-items: center; align-self: center; width: 56px; height: 56px; border: 1px solid var(--line-light); transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.service__main { display: grid; gap: 10px; }
.service__main h3 { font-size: var(--fs-h3); }
.service__main p { color: rgb(248 248 247 / .8); font-size: var(--fs-small); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 5px 10px; border: 1px solid var(--line-light); font-size: var(--fs-xs); }
.chips--blue li { border-color: var(--blu-700); color: var(--blu-700); font-weight: 600; }
.service__go { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line-light); transition: background-color .25s ease, color .25s ease; }
.service__go::after { content: ""; position: absolute; inset: 0; }
.service:hover .service__go { background: var(--verde-500); color: var(--neutri-900); border-color: var(--verde-500); }

/* Come ragioniamo: frase grande che si accende, poi tre principi */
.statement { max-width: 1100px; margin: 32px 0 80px; color: var(--neutri-100); font-size: clamp(30px, 3.6vw, 52px); line-height: 1.2; letter-spacing: -.02em; }
.statement strong { color: var(--verde-500); font-weight: 600; }
.is-revealing .mw { opacity: .2; transition: opacity .25s ease; }
.is-revealing .mw.is-lit { opacity: 1; }

/* Confronto: la colonna FMstudio è l'unica piena */

/* Casi studio */
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }

/* Analisi gratuita: modulo in due passaggi */
.form-wrap { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 80px; align-items: center; }
.form-intro { display: grid; gap: 24px; }
.wizard { display: grid; gap: 20px; padding: 40px; background: var(--neutri-100); color: var(--neutri-700); }
.wizard .btn { justify-self: start; }
.field { display: grid; gap: 8px; color: var(--blu-700); font-size: var(--fs-xs); font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--blu-700);
  border-radius: 0;
  background: #fff;
  color: var(--neutri-900);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 400;
}
.field textarea { resize: vertical; }
.check { display: flex; gap: 12px; font-size: var(--fs-xs); }
.check input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blu-700); }
.trap { position: absolute; left: -9999px; }
.wizard__status { font-size: var(--fs-small); font-weight: 600; color: var(--blu-700); }
.wizard__status:empty { display: none; }
.wizard__status.is-error { color: var(--errore); }

/* Chiusura */
.closing { padding-block: 140px; background: var(--neutri-900); color: var(--neutri-100); }
.closing .wrap { display: grid; gap: 48px; justify-items: start; }
.closing__text { font-size: clamp(40px, 6vw, 96px); font-weight: 400; line-height: 1.02; letter-spacing: -.03em; }
.closing__text span { display: block; color: var(--verde-500); }

/* Tablet */
@media (max-width: 1100px) {
  :root { --gutter: 40px; --section-y: 96px; --fs-h2: 36px; }
  .nav__links a { padding-inline: 12px; }
  .hero__inner, .form-wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { max-width: 560px; }
  .service { grid-template-columns: 56px minmax(0, 1fr) 48px; }
  .service .chips { grid-column: 2; }
  .service__go { grid-column: 3; grid-row: 1; }
  .head--split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav__toggle {
    display: grid;
    gap: 7px;
    place-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line-light);
    background: none;
    cursor: pointer;
  }
  .nav__toggle span { display: block; width: 20px; height: 1.5px; background: var(--neutri-100); transition: transform .4s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .nav__menu {
    position: fixed;
    inset: var(--nav-h) 0 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px var(--gutter) 32px;
    background: var(--blu-700);
    visibility: hidden;
    clip-path: inset(0 0 100% 0);
    transition: clip-path .55s var(--ease), visibility 0s .55s;
  }
  .nav__menu.is-open { visibility: visible; clip-path: inset(0); transition-delay: 0s; }
  .nav__links { position: static; flex-direction: column; border: 0; background: none; transform: none; }
  .nav__links a { padding: 18px 0; border-bottom: 1px solid var(--line-light); font-size: 24px; }
  .nav__links li + li a { box-shadow: none; }
  .nav__links a:hover { background: none; color: var(--verde-500); }
  .nav__cta { justify-content: space-between; }
  body.menu-open { overflow: hidden; }
  .steps, .cases { grid-template-columns: 1fr; }
  .cases { gap: 20px; }
  .step, .step + .step { padding: 32px 0 0; border-left: 0; }
  .step + .step { margin-top: 32px; border-top: 1px solid var(--line-blue); }
  /* Su schermi stretti il confronto diventa una scheda per criterio */
}

/* Mobile */
@media (max-width: 640px) {
  :root { --gutter: 20px; --section-y: 72px; --fs-h1: 41px; --fs-h2: 32px; --fs-h3: 26px; --fs-h4: 22px; --fs-large: 18px; --fs-body: 16px; --fs-small: 15px; --nav-h: 58px; }
  .nav { padding-inline: 16px; }
  .nav__logo-svg { width: 94px; }
  .hero { padding: calc(var(--nav-h) + 48px) 0 64px; }
  .hero h1 { font-size: 38px; }
  .hero__actions .btn { width: 100%; justify-content: space-between; }

  .head { margin-bottom: 40px; }
  .service { grid-template-columns: minmax(0, 1fr) 44px; gap: 16px; padding: 24px 0; }
  .service:hover { padding-inline: 0; background: none; }
  .service__icon { grid-column: 1 / -1; width: 48px; height: 48px; }
  .service__main, .service .chips { grid-column: 1; }
  .service__go { grid-column: 2; grid-row: 2; width: 44px; height: 44px; }
  .statement { margin: 24px 0 48px; }
  .wizard { padding: 24px 20px; }
  .wizard .btn { width: 100%; justify-content: space-between; }
  .closing { padding-block: 88px; }
  .closing .btn { width: 100%; justify-content: space-between; }
}

/* Hero: console "dai dati al report" in stile tech, animata da v2.js.
   Fasi cumulative sul contenitore: is-collect, is-analyze, is-insight, is-report */
.console {
  --c-line: rgb(248 248 247 / .14);
  --c-muted: rgb(248 248 247 / .62);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: rgb(28 27 24 / .22);
  font-size: 14px;
  transition: opacity .4s ease;
}
.console.is-reset { opacity: .35; }
.c-card { position: relative; overflow: hidden; padding: 16px 18px; border: 1px solid var(--c-line); background: rgb(28 27 24 / .78); }
.c-label { color: var(--c-muted); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.c-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.c-input { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-top: 10px; padding: 0 12px; border: 1px solid rgb(248 248 247 / .2); background: rgb(248 248 247 / .04); font-size: 15px; }
.c-input svg { flex: none; color: var(--c-muted); }
.c-typed { white-space: nowrap; overflow: hidden; }
.c-caret { width: 1.5px; height: 18px; background: var(--verde-500); animation: c-blink 1s steps(1) infinite; }
@keyframes c-blink { 50% { opacity: 0; } }

.c-dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: rgb(248 248 247 / .3); transition: background-color .3s ease; }
.c-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.c-src { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 8px; padding: 12px; border: 1px solid var(--c-line); background: rgb(28 27 24 / .6); }
.c-src__name { overflow: hidden; color: var(--c-muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.c-src__num { grid-column: 1 / -1; margin-top: 6px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.c-src__unit { grid-column: 1 / -1; color: var(--c-muted); font-size: 12px; }
.is-collect .c-src .c-dot { background: var(--verde-500); animation: c-pulse 1.6s ease-in-out infinite; }
.is-collect .c-src:nth-child(2) .c-dot { animation-delay: .25s; }
.is-collect .c-src:nth-child(3) .c-dot { animation-delay: .5s; }
@keyframes c-pulse { 50% { box-shadow: 0 0 0 5px rgb(179 222 12 / 0); opacity: .45; } 0%, 100% { box-shadow: 0 0 0 0 rgb(179 222 12 / .45); } }

.c-wires { display: block; width: 100%; height: 26px; overflow: visible; }
.c-wires path { fill: none; stroke: rgb(248 248 247 / .22); stroke-width: 1; vector-effect: non-scaling-stroke; }
.is-collect .c-wires path { stroke: var(--verde-500); stroke-dasharray: 3 5; animation: c-flow .9s linear infinite; }
@keyframes c-flow { to { stroke-dashoffset: -16; } }

.c-pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border: 1px solid rgb(248 248 247 / .22); color: var(--c-muted); font-size: 12px; white-space: nowrap; }
.is-analyze .c-engine .c-pill { color: var(--neutri-100); }
.is-analyze .c-engine .c-pill .c-dot { background: var(--verde-500); animation: c-pulse 1s ease-in-out infinite; }
.is-insight .c-engine .c-pill { border-color: var(--verde-500); color: var(--verde-500); }
.is-insight .c-engine .c-pill .c-dot { animation: none; }
.c-pill--ok { border-color: rgb(179 222 12 / .6); color: var(--verde-500); }
.c-pill--ok .c-dot { background: var(--verde-500); }
.is-report .c-pill--ok .c-dot { animation: c-pulse 1.4s ease-in-out infinite; }

.c-progress { height: 2px; margin: 14px 0 6px; background: rgb(248 248 247 / .12); }
.c-progress span { display: block; width: 0; height: 100%; background: var(--verde-500); }
.is-analyze .c-progress span { width: 100%; transition: width 1.5s cubic-bezier(.4, 0, .2, 1); }
/* Linea di scansione che attraversa la card durante l'analisi */
.c-engine::after { content: ""; position: absolute; inset: 0 0 auto; height: 40%; background: linear-gradient(to bottom, transparent, rgb(179 222 12 / .12), transparent); opacity: 0; transform: translateY(-100%); }
.is-analyze:not(.is-insight) .c-engine::after { opacity: 1; animation: c-scan 1.5s ease-in-out; }
@keyframes c-scan { to { transform: translateY(260%); } }
.c-insights li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgb(248 248 247 / .08); color: rgb(248 248 247 / .9); opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .5s var(--ease-out); }
.c-insights li:first-child { border-top: 0; }
.is-insight .c-insights li { opacity: 1; transform: none; }
.is-insight .c-insights li:nth-child(2) { transition-delay: .25s; }
.is-insight .c-insights li:nth-child(3) { transition-delay: .5s; }
.c-check { position: relative; flex: none; width: 14px; height: 14px; border: 1px solid var(--verde-500); }
.c-check::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid var(--verde-500); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

.c-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.c-kpi { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--c-line); }
.c-kpi span { color: var(--c-muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-kpi svg { width: 100%; height: 30px; overflow: visible; }
.c-kpi path { fill: none; stroke: var(--verde-500); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-report .c-kpi path { animation: c-draw 1.4s cubic-bezier(.65, 0, .35, 1) forwards; }
.is-report .c-kpi:nth-child(2) path { animation-delay: .15s; }
.is-report .c-kpi:nth-child(3) path { animation-delay: .3s; }
@keyframes c-draw { to { stroke-dashoffset: 0; } }
.c-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding: 0; list-style: none; }
.c-steps li { padding: 4px 10px; border: 1px solid rgb(248 248 247 / .2); color: var(--c-muted); font-size: 12px; transition: border-color .3s ease, color .3s ease, background-color .3s ease; }
.c-steps li + li::before { content: "→"; margin-right: 8px; color: rgb(248 248 247 / .35); }
.c-steps li.is-active { border-color: var(--verde-500); background: rgb(179 222 12 / .1); color: var(--verde-500); }

@media (max-width: 640px) {
  .console { padding: 12px; }
  .c-card { padding: 14px; }
  .c-src { padding: 10px; }
  .c-src__num { font-size: 18px; }
  .c-insights li { font-size: 13px; }
  /* Su mobile la console resta compatta: meno spazi, solo due righe di analisi, niente fila dei passaggi */
  .console { gap: 8px; }
  .c-card { padding: 12px; }
  .c-label { font-size: 10px; }
  .c-input { min-height: 36px; margin-top: 8px; font-size: 14px; }
  .c-sources { gap: 6px; }
  .c-src { padding: 8px 10px; }
  .c-src__num { margin-top: 2px; }
  .c-wires { height: 14px; }
  .c-progress { margin: 10px 0 2px; }
  .c-insights li { padding: 6px 0; font-size: 12.5px; line-height: 1.35; }
  .c-insights li:nth-child(3) { display: none; }
  .c-kpis { margin-top: 10px; gap: 6px; }
  .c-kpi { gap: 4px; padding: 8px; }
  .c-kpi svg { height: 20px; }
  .c-steps { display: none; }
}

/* Metodo su nero: frase grande e sotto tre card animate */
.metodo { overflow: hidden; }
.metodo .wrap { position: relative; }
.metodo__top { max-width: 1100px; margin-bottom: 80px; }
/* Stesso stile della frase grande della sezione scura */
.metodo__statement { color: var(--neutri-100); font-size: clamp(30px, 3.6vw, 52px); font-weight: 400; line-height: 1.2; letter-spacing: -.02em; }
.metodo__statement strong { color: var(--verde-500); font-weight: 600; }


.mcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mcard { display: grid; grid-template-rows: auto auto 1fr; align-content: start; gap: 14px; padding: 28px; border: 1px solid var(--line-light); background: rgb(248 248 247 / .03); }
.mcard__icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-light); background: rgb(248 248 247 / .06); color: var(--verde-500); }
.mcard__visual { height: 200px; margin-bottom: 12px; border: 1px solid rgb(248 248 247 / .1); background: rgb(248 248 247 / .03); }
.mcard__visual svg { display: block; width: 100%; height: 100%; padding: 20px; }
.mcard__num { color: rgb(248 248 247 / .6); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; }
.mcard h3 { color: var(--neutri-100); }
.mcard p { color: rgb(248 248 247 / .8); font-size: var(--fs-small); }

/* 01 Osservare: mappa di calore che respira e il percorso di un utente */
.mv-frame { fill: none; stroke: rgb(248 248 247 / .35); stroke-width: 1; }
.mv-line { fill: none; stroke: rgb(248 248 247 / .3); stroke-width: 4; }
.mv-block { fill: rgb(248 248 247 / .08); stroke: rgb(248 248 247 / .3); }
.mv-heat { fill: var(--verde-500); opacity: .18; transform-box: fill-box; transform-origin: center; animation: mv-breathe 2.8s ease-in-out infinite; }
.mv-heat--2 { animation-delay: .6s; }
.mv-heat--3 { animation-delay: 1.2s; }
@keyframes mv-breathe { 50% { opacity: .42; transform: scale(1.18); } }
.mv-path { fill: none; stroke: var(--neutri-100); stroke-width: 1.2; stroke-dasharray: 3 4; animation: mv-dash 1.2s linear infinite; }
@keyframes mv-dash { to { stroke-dashoffset: -14; } }
.mv-cursor path { fill: var(--neutri-100); stroke: var(--blu-700); stroke-width: .8; }
.mv-cursor { offset-path: path("M40 120C80 110 120 70 200 58S236 100 230 112"); offset-rotate: 0deg; animation: mv-move 5s var(--ease) infinite; }
@keyframes mv-move { 0% { offset-distance: 0%; } 45%, 55% { offset-distance: 62%; } 100% { offset-distance: 100%; } }

/* 02 Costruire: gli interventi si mettono in fila per priorità */
.mv-list { display: grid; align-content: center; gap: 12px; height: 100%; padding: 16px; font-size: 12px; }
.mv-list li { display: grid; grid-template-columns: 1fr 70px auto; align-items: center; gap: 10px; color: rgb(248 248 247 / .85); opacity: 0; animation: mv-row 6s var(--ease-out) infinite; }
.mv-list li:nth-child(2) { animation-delay: .5s; }
.mv-list li:nth-child(3) { animation-delay: 1s; }
@keyframes mv-row { 0% { opacity: 0; transform: translateY(8px); } 10%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.mv-list i { display: block; height: 4px; background: rgb(248 248 247 / .14); }
.mv-list b { display: block; height: 100%; background: var(--verde-500); transform-origin: left; transform: scaleX(0); animation: mv-grow 6s var(--ease) infinite; }
.mv-list li:nth-child(1) b { --to: 1; }
.mv-list li:nth-child(2) b { --to: .65; animation-delay: .5s; }
.mv-list li:nth-child(3) b { --to: .5; animation-delay: 1s; }
@keyframes mv-grow { 0%, 12% { transform: scaleX(0); } 35%, 88% { transform: scaleX(var(--to)); } 100% { transform: scaleX(0); } }
.mv-list em { padding: 2px 8px; border: 1px solid rgb(248 248 247 / .3); font-style: normal; font-size: 11px; }
.mv-list li:first-child em { border-color: var(--verde-500); color: var(--verde-500); }

/* 03 Misurare: la linea di oggi si traccia sopra quella di prima */
.mv-axis, .mv-before { fill: none; stroke: rgb(248 248 247 / .3); stroke-width: 1; }
.mv-before { stroke-dasharray: 3 4; }
.mv-after { fill: none; stroke: var(--verde-500); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: mv-trace 5s var(--ease) infinite; }
@keyframes mv-trace { 0% { stroke-dashoffset: 1; opacity: 1; } 45%, 86% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.mv-dot { fill: var(--verde-500); opacity: 0; animation: mv-pop 5s ease infinite; }
.mv-tag { opacity: 0; animation: mv-pop 5s ease infinite; }
.mv-tag rect { fill: none; stroke: var(--verde-500); }
.mv-tag text { fill: var(--verde-500); font-size: 11px; font-weight: 600; }
@keyframes mv-pop { 0%, 44% { opacity: 0; } 50%, 86% { opacity: 1; } 100% { opacity: 0; } }
.mv-legend { fill: rgb(248 248 247 / .55); font-size: 10px; }
.mv-legend--after { fill: var(--verde-500); }

@media (max-width: 1100px) {
  .mcards { grid-template-columns: 1fr; }
  .mcard { grid-template-rows: auto; }
  .mcard__visual { height: 180px; }
  .mcard__visual { grid-column: 1 / -1; }
  .mcard__num, .mcard h3, .mcard p { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .metodo__top { margin-bottom: 48px; }
  .mcard { padding: 20px; }
}

/* Cambio colore tra sezioni: il colore di sopra scende nella sezione nuova come una fila di barre
   e si ritira a gradini mentre si scorre, come un grafico che si svuota. Le crea v2.js */
.closing, .footer { position: relative; }
.seam {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  display: flex;
  height: min(var(--section-y), 112px);
  pointer-events: none;
}
.seam i {
  flex: 1;
  background: var(--seam-color);
  transform-origin: top;
  transform: scaleY(var(--s, 1));
}
.seam i + i { box-shadow: -1px 0 0 var(--seam-color); }
.footer > .seam { height: 64px; }

/* Servizi su sfondo chiaro */
.section--light .services, .section--light .service, .section--light .chips li, .section--light .service__go { border-color: rgb(28 27 24 / .16); }
.section--light .service:hover { background: rgb(9 60 170 / .05); }
.section--light .service__icon { border-color: rgb(28 27 24 / .16); color: var(--blu-700); }
.section--light .service__main h3 { color: var(--neutri-900); }
.section--light .service__main p, .section--light .head__text { color: rgb(28 27 24 / .75); }
.section--light .chips li { color: var(--neutri-900); }
.section--light .service__go { color: var(--blu-700); }
.section--light .service:hover .service__go { color: var(--neutri-900); border-color: var(--verde-500); }
.section--light .service .chips li, .section--light .case .chips li { border-color: var(--blu-700); color: var(--blu-700); }

/* Navbar dello stesso colore della sezione che le sta sotto: is-dark e is-light da v2.js, blu di base */
.nav.is-dark { background: var(--neutri-900); }
.nav.is-light { --nav-line: rgb(28 27 24 / .14); background: var(--neutri-100); color: var(--neutri-900); box-shadow: 0 1px 0 var(--nav-line); }
.nav.is-light.is-scrolled { box-shadow: 0 1px 0 var(--nav-line), 0 12px 32px rgb(28 27 24 / .08); }
.nav.is-light .nav__logo-svg { color: var(--blu-700); }
.nav.is-light .nav__links { border-color: var(--nav-line); background: rgb(28 27 24 / .03); }
.nav.is-light .nav__links li + li a { box-shadow: -1px 0 0 var(--nav-line); }
.nav.is-light .nav__links a:hover { background: var(--blu-700); color: var(--neutri-100); }
.nav.is-light .nav__toggle { border-color: var(--nav-line); }
.nav.is-light .nav__toggle span { background: var(--neutri-900); }
.nav__links { transition: background-color .4s ease, border-color .4s ease; }
/* Le voci non animano il colore per conto loro: lo ereditano dalla barra, così al cambio di sezione cambiano tutte insieme. Solo l'hover anima il colore */
.nav__links a:hover, .nav__drop-btn:hover, .nav__drop-btn[aria-expanded="true"] { transition: background-color .2s ease, color .2s ease, box-shadow .4s ease; }

/* Come ragioniamo: le card del perché noi, con animazioni nello stesso linguaggio di Metodo */
.mv-line--thin { stroke-width: 3; }
/* 1. Decisioni (il primo rect è la cornice): le colonne salgono una dopo l'altra, poi si segna quella che spiega il problema */
.mw-bar { fill: rgb(248 248 247 / .06); stroke: rgb(248 248 247 / .4); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); animation: mw-rise 6s var(--ease) infinite; }
.mw-bar:nth-of-type(3) { animation-delay: .15s; }
.mw-bar:nth-of-type(4) { animation-delay: .3s; }
.mw-bar:nth-of-type(5) { animation-delay: .45s; }
.mw-bar:nth-of-type(6) { animation-delay: .6s; }
@keyframes mw-rise { 0%, 4% { transform: scaleY(0); } 22%, 90% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.mw-bar--key { animation-name: mw-rise, mw-key; }
@keyframes mw-key { 0%, 38% { fill: rgb(248 248 247 / .06); stroke: rgb(248 248 247 / .4); } 46%, 90% { fill: rgb(179 222 12 / .25); stroke: var(--verde-500); } 100% { fill: rgb(248 248 247 / .06); stroke: rgb(248 248 247 / .4); } }
.mw-flag { opacity: 0; animation: mw-flag 6s ease infinite; }
.mw-flag path, .mw-flag rect { fill: none; stroke: var(--verde-500); }
.mw-flag text { fill: var(--verde-500); font-size: 10px; font-weight: 600; }
@keyframes mw-flag { 0%, 44% { opacity: 0; transform: translateY(4px); } 52%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* 2. Su misura: i riquadri si compongono uno alla volta attorno a chi usa il sito */
.mw-tile { opacity: 0; animation: mw-tile 6s var(--ease-out) infinite; }
.mw-tile--1 { animation-delay: .5s; }
.mw-tile--3 { animation-delay: 1s; }
.mw-tile--4 { animation-delay: 1.5s; }
@keyframes mw-tile { 0% { opacity: 0; transform: translateY(6px); } 10%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.mw-tile--2 .mv-frame { stroke: var(--verde-500); }
.mw-user { fill: none; stroke: var(--verde-500); stroke-width: 1.5; }
.mw-trend { fill: none; stroke: var(--verde-500); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; animation: mw-trace 6s var(--ease) infinite 1.5s; }
@keyframes mw-trace { 0%, 8% { stroke-dashoffset: 1; } 32%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }

/* 3. Risultati: la linea avanza, i punti di controllo si accendono e l'ultimo mostra il risultato */
.mw-trend--long { stroke-width: 2; animation: mw-trace-long 6s var(--ease) infinite; }
@keyframes mw-trace-long { 0%, 4% { stroke-dashoffset: 1; opacity: 1; } 50%, 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.mw-point { fill: var(--neutri-900); stroke: var(--verde-500); opacity: 0; animation: mw-point 6s ease infinite; }
.mw-point--1 { animation-delay: .6s; }
.mw-point--2 { animation-delay: 1.3s; }
.mw-point--3 { animation-delay: 2s; }
.mw-point--4 { animation-delay: 2.7s; }
@keyframes mw-point { 0% { opacity: 0; } 6%, 78% { opacity: 1; } 90%, 100% { opacity: 0; } }
.mw-flag--end { animation-name: mw-flag-end; }
@keyframes mw-flag-end { 0%, 52% { opacity: 0; transform: translateY(4px); } 58%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Come ragioniamo: invito all'analisi sotto le card */
.why__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line-light); }
.why__cta p { color: var(--neutri-100); font-size: var(--fs-h4); font-weight: 500; letter-spacing: -.02em; }
.form-intro .head__text strong { color: var(--neutri-100); font-weight: 600; }
.wizard .btn { margin-top: 4px; }
@media (max-width: 640px) {
  .why__cta { margin-top: 32px; }
  .why__cta .btn { width: 100%; justify-content: space-between; }
}

/* Card animate su mobile: carosello con frecce, come nella homepage attuale */
.slider-nav { display: none; }
@media (max-width: 640px) {
  .mcards.slider {
    grid-auto-flow: column;
    grid-auto-columns: calc(100% - 22px);
    grid-template-columns: none;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .slider::-webkit-scrollbar { display: none; }
  .slider > * { scroll-snap-align: start; }
  .slider-nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
  .slider-nav__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--neutri-100);
    background: var(--neutri-100);
    color: var(--neutri-900);
    cursor: pointer;
  }
  .slider-nav__btn:disabled { background: transparent; color: var(--neutri-100); cursor: default; }
}

/* Casi studio: card a linea come i Servizi. In alto il sito del cliente in una finestra del browser disegnata a linee sul blu */
.case { display: grid; grid-template-rows: auto 1fr; border: 1px solid rgb(28 27 24 / .16); background: var(--neutri-100); transition: border-color .3s ease; }
.case:hover { border-color: var(--blu-700); }
.case__media { position: relative; display: grid; align-items: end; padding: 40px 40px 0; overflow: hidden; background: var(--blu-700); }
.case__window { border: 1px solid rgb(248 248 247 / .5); border-bottom: 0; background: var(--blu-700); transition: transform .6s var(--ease-out); }
.case__bar { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-bottom: 1px solid rgb(248 248 247 / .5); }
.case__bar i { width: 6px; height: 6px; border: 1px solid rgb(248 248 247 / .6); border-radius: 50%; }
.case__bar span { width: 38%; height: 8px; margin-left: 10px; border: 1px solid rgb(248 248 247 / .35); }
.case__screen { overflow: hidden; background: var(--neutri-100); }
.case__screen img { display: block; width: 100%; height: auto; } /* screenshot intero, senza ritagli */
.case:hover .case__window { transform: translateY(-6px); }
.case__body { display: grid; align-content: start; gap: 14px; padding: 28px; }
.case__body h3 { color: var(--neutri-900); }
.case__body p { color: rgb(28 27 24 / .75); font-size: var(--fs-small); }
.case__body .chips { margin-top: 6px; }
@media (max-width: 640px) {
  .case__media { padding: 24px 16px 0; }
  .case__body { padding: 20px; }
}

/* Footer identico alla homepage attuale (regole prese da style.css) */
:root { --stroke: 0 0 0 1px var(--blu-700) inset; --stroke-bottom: 0 -1px 0 var(--blu-700) inset; }
.container { width: 100%; max-width: 1320px; margin-inline: auto; }

.footer { padding: 80px var(--gutter); background: var(--blu-700); color: var(--neutri-100); font-size: var(--fs-small); }
.footer :focus-visible { outline-color: var(--verde-500); }
.footer__inner { display: flex; flex-direction: column; gap: 48px; }
.footer__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
.footer__logo { flex: 0 1 511px; min-width: 0; }
.footer__info { display: flex; flex-direction: column; gap: 24px; flex: none; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 32px; font-weight: 600; }
.footer__nav a:hover, .footer__legal a:hover { text-decoration: underline; }
.footer__rule { height: 1px; background: var(--neutri-100); }
.footer__details { display: flex; flex-direction: column; gap: 8px; }
.footer__details > div { display: flex; flex-direction: column; gap: 4px; }
.footer__details a { text-decoration: underline; }
.footer__bottom { display: flex; flex-direction: column; gap: 32px; }
.footer__divider { width: 100%; height: 1px; margin-bottom: -1px; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; line-height: 21px; }
.footer__legal ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }

@media (max-width: 1040px) {
  .footer__top { flex-direction: column; align-items: stretch; }
  .footer__logo { flex: none; width: min(511px, 100%); }
  .footer__info { flex: 1; }
}
@media (max-width: 640px) {
  .footer { padding-block: 60px; --gutter: 16px; }
  .footer__nav { font-size: 16px; }
}

/* FAQ: testo e gruppi della homepage, a linee come Servizi e Casi studio */
.qa { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 80px; align-items: start; }
.qa__side { display: grid; gap: 24px; position: sticky; top: calc(var(--nav-h) + 40px); }
.qa__side a { color: var(--blu-700); text-decoration: underline; text-underline-offset: 3px; }
.qa__groups { display: grid; gap: 48px; }
.qa__topic { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--blu-700); color: var(--blu-700); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.qa__list details { border-bottom: 1px solid rgb(28 27 24 / .16); }
.qa__list summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; cursor: pointer; list-style: none; }
.qa__list summary::-webkit-details-marker { display: none; }
.qa__list summary h3 { color: var(--neutri-900); font-size: var(--fs-large); font-weight: 600; line-height: 1.4; letter-spacing: -.01em; transition: color .2s ease; }
.qa__list summary:hover h3 { color: var(--blu-700); }
/* Riquadro dell'icona come nei Servizi; il + ruota in x quando la risposta è aperta */
.qa__icon { position: relative; flex: none; width: 40px; height: 40px; border: 1px solid rgb(28 27 24 / .16); }
.qa__icon::before, .qa__icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 1.5px; background: var(--blu-700); transform: translate(-50%, -50%); transition: transform .3s var(--ease-out); }
.qa__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.qa__list details[open] .qa__icon::before { transform: translate(-50%, -50%) rotate(45deg); }
.qa__list details[open] .qa__icon::after { transform: translate(-50%, -50%) rotate(135deg); }
.qa__list details p { max-width: 640px; padding: 0 64px 24px 0; color: rgb(28 27 24 / .75); font-size: var(--fs-small); }
.qa__list details::details-content { block-size: 0; overflow: hidden; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
.qa__list details[open]::details-content { block-size: auto; }
@media (max-width: 900px) {
  .qa { grid-template-columns: 1fr; gap: 40px; }
  .qa__side { position: static; }
}
@media (max-width: 640px) {
  .qa__groups { gap: 36px; }
  .qa__list summary { gap: 16px; padding: 18px 0; }
  .qa__list summary h3 { font-size: 17px; }
  .qa__icon { width: 36px; height: 36px; }
  .qa__list details p { padding-right: 0; }
}

/* Servizi su mobile: bottone freccia pieno blu con icona bianca (sul telefono non c'è hover) */
@media (max-width: 640px) {
  .section--light .service .service__go { border-color: var(--blu-700); background: var(--blu-700); color: var(--neutri-100); }
}

/* Navbar: voce Servizi con sottomenu. Su desktop un pannello sotto la barra (intro blu + 4 servizi), su mobile un elenco che si apre nel menu */
.nav__drop-btn { display: flex; align-items: center; gap: 6px; padding: 10px 18px; border: 0; background: none; color: inherit; font: inherit; font-size: var(--fs-small); cursor: pointer; transition: background-color .2s ease, box-shadow .4s ease; }
.nav__drop-btn svg { transition: transform .3s var(--ease-out); }
.nav__drop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__links li + li .nav__drop-btn { box-shadow: -1px 0 0 var(--line-light); }
.nav__drop-btn:hover, .nav__drop-btn[aria-expanded="true"] { background: var(--neutri-100); color: var(--blu-700); }
.nav.is-light .nav__links li + li .nav__drop-btn { box-shadow: -1px 0 0 var(--nav-line); }
.nav.is-light .nav__drop-btn:hover, .nav.is-light .nav__drop-btn[aria-expanded="true"] { background: var(--blu-700); color: var(--neutri-100); }
.nav__sub { display: none; }

/* Il pannello prende i colori della navbar: blu di base, nero sulle sezioni scure, chiaro sulle sezioni chiare */
.mega {
  --mega-bg: var(--blu-700);
  --mega-fg: var(--neutri-100);
  --mega-muted: rgb(248 248 247 / .75);
  --mega-line: var(--line-light);
  --mega-hover: rgb(248 248 247 / .08);
  --mega-intro-bg: rgb(28 27 24 / .2);
  --mega-intro-fg: var(--neutri-100);
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 2fr);
  width: min(820px, calc(100% - 48px));
  border: 1px solid var(--mega-line);
  background: var(--mega-bg);
  color: var(--mega-fg);
  box-shadow: 0 20px 40px rgb(28 27 24 / .2);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity .25s ease, transform .35s var(--ease-out), visibility 0s .35s, background-color .4s ease, color .4s ease, border-color .4s ease;
}
.nav.is-dark .mega { --mega-bg: var(--neutri-900); --mega-intro-bg: rgb(248 248 247 / .05); }
.nav.is-light .mega {
  --mega-bg: var(--neutri-100);
  --mega-fg: var(--blu-700);
  --mega-muted: rgb(9 60 170 / .75);
  --mega-line: rgb(28 27 24 / .12);
  --mega-hover: rgb(9 60 170 / .05);
  --mega-intro-bg: var(--blu-700);
}
.mega.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.mega__intro { display: grid; align-content: start; gap: 10px; padding: 20px; background: var(--mega-intro-bg); color: var(--mega-intro-fg); transition: background-color .4s ease; }
.mega__title { font-size: var(--fs-body); font-weight: 600; letter-spacing: -.01em; }
.mega__intro p:not(.mega__title) { color: rgb(248 248 247 / .8); font-size: var(--fs-xs); line-height: 1.5; }
.mega__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mega__list li:nth-child(odd) { border-right: 1px solid var(--mega-line); }
.mega__list li:nth-child(-n + 2) { border-bottom: 1px solid var(--mega-line); }
.mega__item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; height: 100%; padding: 18px 20px; transition: background-color .2s ease; }
.mega__item:hover { background: var(--mega-hover); }
.mega__text { display: grid; gap: 4px; }
.mega__text b { font-size: var(--fs-small); font-weight: 600; letter-spacing: -.01em; }
.mega__text small { color: var(--mega-muted); font-size: var(--fs-xs); line-height: 1.45; }
.mega__icon { flex: none; width: 22px; height: 22px; transition: transform .3s var(--ease-out); }
.mega__item:hover .mega__icon { transform: translateY(-2px); }

@media (max-width: 900px) {
  .mega { display: none; }
  .nav__drop-btn { justify-content: space-between; width: 100%; padding: 18px 0; border-bottom: 1px solid var(--line-light); font-size: 24px; }
  .nav__drop-btn svg { width: 18px; height: 18px; }
  .nav__links li + li .nav__drop-btn, .nav.is-light .nav__links li + li .nav__drop-btn { box-shadow: none; }
  .nav__drop-btn:hover, .nav__drop-btn[aria-expanded="true"], .nav.is-light .nav__drop-btn:hover, .nav.is-light .nav__drop-btn[aria-expanded="true"] { background: none; color: var(--verde-500); }
  .nav__drop.is-open .nav__sub { display: grid; }
  .nav__links .nav__sub a { padding: 14px 0 14px 16px; border-bottom: 1px solid var(--line-light); font-size: 18px; }
}

/* Menu mobile: icone dei servizi e colore che segue la sezione, come la navbar */
@media (max-width: 900px) {
  .nav__menu { transition: clip-path .55s var(--ease), visibility 0s .55s, background-color .4s ease, color .4s ease; }
  .nav__menu.is-open { transition: clip-path .55s var(--ease), visibility 0s, background-color .4s ease, color .4s ease; }
  .nav__links .nav__sub a { display: flex; align-items: center; gap: 14px; }
  .nav__sub-icon { flex: none; color: var(--neutri-100); } /* bianche sul blu, verdi sul nero, blu sul chiaro */
  .nav.is-dark .nav__sub-icon { color: var(--verde-500); }
  .nav.is-dark .nav__menu { background: var(--neutri-900); }
  .nav.is-light .nav__menu { background: var(--neutri-100); color: var(--neutri-900); }
  .nav.is-light .nav__links { border: 0; background: none; }
  .nav.is-light .nav__links li + li a { box-shadow: none; }
  .nav.is-light .nav__links a, .nav.is-light .nav__drop-btn { border-bottom-color: var(--nav-line); }
  .nav.is-light .nav__links a:hover, .nav.is-light .nav__drop-btn:hover, .nav.is-light .nav__drop-btn[aria-expanded="true"] { background: none; color: var(--blu-700); }
  .nav.is-light .nav__sub-icon { color: var(--blu-700); }
}

/* Menu mobile: niente cambio di colore al tocco (verde su blu non è leggibile), cambia solo la freccia */
@media (max-width: 900px) {
  .nav__links a:hover,
  .nav__drop-btn:hover,
  .nav__drop-btn[aria-expanded="true"],
  .nav.is-light .nav__links a:hover,
  .nav.is-light .nav__drop-btn:hover,
  .nav.is-light .nav__drop-btn[aria-expanded="true"] { background: none; color: inherit; }
}
