/* =========================================================
   Vendar — foglio di stile (redesign 2026)
   Concetto: "tavola tecnica" — linee di quota, assi, ingranaggio.
   ========================================================= */

/* ---------- Font (ospitati in locale, licenza SIL OFL) ---------- */
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* ---------- Token ---------- */
:root {
  --ink: #0e1446;        /* inchiostro: sezioni scure */
  --ink-2: #18206a;      /* pannelli su scuro */
  --ink-3: #090d30;      /* footer */
  --blue: #1a96cb;       /* blu Vendar (logo) */
  --blue-lt: #6cc4ea;
  --indigo: #2a1b9c;     /* contorno del logo */
  --orange: #ff6b35;     /* un solo accento caldo */
  --orange-dk: #e9541d;
  --paper: #f3f6fa;
  --white: #ffffff;
  --text: #121a33;
  --muted: #4b5878;
  --line: rgba(14, 20, 70, .14);
  --line-dk: rgba(255, 255, 255, .14);

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 40px);
  --sec: clamp(64px, 9vw, 120px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 56px); -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; color: var(--text); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-underline-offset: .18em; }
a:hover { color: var(--blue); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; margin: 0; letter-spacing: -.005em; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h3 { font-size: 1.45rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--blue); color: #fff; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { left: 8px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.legal .linklike { color: var(--indigo); }
[hidden] { display: none !important; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 26px; border: 2px solid transparent; border-radius: 2px;
  font-family: var(--body); font-weight: 600; font-size: 1rem; line-height: 1.1; text-decoration: none;
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--orange); color: #fff; }
.btn--accent:hover { background: var(--orange-dk); color: #fff; }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--indigo); color: #fff; }
.btn--line-light { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--line-light:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .95rem; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(14,20,70,.06); }
.header__bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.header__logo img { width: 156px; height: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a:not(.btn), .nav__drop > button {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  font: 500 1rem/1 var(--body); color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer;
  position: relative;
}
.nav > a:not(.btn)::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav > a:not(.btn):hover::after, .nav > a[aria-current]::after { transform: scaleX(1); }
.nav > a:not(.btn):hover, .nav__drop > button:hover { color: var(--indigo); }
.nav__cta { margin-left: 12px; min-height: 46px; }
.nav__drop { position: relative; }
.nav__drop svg { transition: transform .2s; }
.nav__drop.open svg { transform: rotate(180deg); }
.nav__menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 320px; padding: 8px;
  background: var(--white); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(14,20,70,.12);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .18s, visibility .18s;
}
.nav__drop.open .nav__menu { opacity: 1; visibility: visible; transform: none; }
.nav__menu a { display: block; padding: 12px 14px; color: var(--text); text-decoration: none; border-left: 2px solid transparent; }
.nav__menu a:hover { background: var(--paper); border-left-color: var(--blue); color: var(--ink); }
.burger { display: none; width: 48px; height: 48px; border: 0; background: none; cursor: pointer; position: relative; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 12px; width: 24px; height: 2px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; content: ""; }
.burger span { top: 23px; }
.burger span::before { left: 0; top: -7px; }
.burger span::after { left: 0; top: 7px; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { transform: translateY(7px) rotate(45deg); }
.menu-open .burger span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gut) 32px; background: var(--white); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .25s var(--ease), visibility .2s;
  }
  .menu-open .nav { visibility: visible; opacity: 1; transform: none; }
  .menu-open { overflow: hidden; }
  .nav > a:not(.btn), .nav__drop > button { height: auto; padding: 18px 0; width: 100%; justify-content: space-between; font-size: 1.35rem; font-family: var(--display); font-weight: 700; border-bottom: 1px solid var(--line); }
  .nav > a:not(.btn)::after { display: none; }
  .nav__menu { position: static; min-width: 0; box-shadow: none; border: 0; padding: 0 0 8px; display: none; opacity: 1; visibility: visible; transform: none; }
  .nav__drop.open .nav__menu { display: block; }
  .nav__menu a { padding: 12px 0 12px 16px; }
  .nav__cta { margin: 24px 0 0; }
}

/* ---------- Ingranaggio (motivo tecnico) ---------- */
.gear { width: 100%; height: auto; overflow: visible; }
.gear__rot { transform-origin: 0 0; transform: rotate(var(--rot, 0deg)); }
.gear__outline, .gear__inner, .gear__hub { fill: none; stroke: var(--blue); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.gear__inner { stroke: rgba(108,196,234,.55); }
.gear__hub { stroke: var(--orange); stroke-width: 2; }
.gear__dash { fill: none; stroke: rgba(108,196,234,.35); stroke-width: 1; stroke-dasharray: 2 7; vector-effect: non-scaling-stroke; }
.gear__axis line { stroke: rgba(255,255,255,.28); stroke-width: 1; stroke-dasharray: 14 4 2 4; vector-effect: non-scaling-stroke; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.hero__grid {
  position: absolute; inset: 0; z-index: -1; opacity: .55;
  background-image:
    linear-gradient(rgba(108,196,234,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,196,234,.08) 1px, transparent 1px),
    linear-gradient(rgba(108,196,234,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,196,234,.04) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 70% 40%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 80% 90% at 70% 40%, #000 30%, transparent 85%);
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero__kicker { font-weight: 500; color: var(--blue-lt); margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.hero__kicker::before { content: ""; width: 28px; height: 2px; background: var(--orange); }
.hero__title { font-size: clamp(3rem, 8.2vw, 6.6rem); line-height: .92; font-weight: 800; letter-spacing: -.012em; margin-bottom: 28px; }
.hero__title span { display: block; }
.hero__lead { max-width: 54ch; color: rgba(255,255,255,.78); font-size: 1.125rem; margin-bottom: 32px; }
.hero__lead strong { color: #fff; font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__art { position: relative; justify-self: end; width: min(100%, 470px); }
.hero__index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hero__index a { border-top: 1px solid var(--line-dk); }
.hero__index a { display: flex; flex-direction: column; gap: 4px; padding: 22px 20px 26px 0; color: #fff; text-decoration: none; position: relative; }
.hero__index a + a { padding-left: 20px; border-left: 1px solid var(--line-dk); }
.hero__index a::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.hero__index a:hover::before, .hero__index a:focus-visible::before { transform: scaleX(1); }
.hero__index-name { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.1; }
.hero__index-meta { color: rgba(255,255,255,.6); font-size: .95rem; }

/* Sequenza d'ingresso (unico momento animato al caricamento) */
.js .hero__title span, .js .hero__lead, .js .hero__actions, .js .hero__kicker { opacity: 0; transform: translateY(18px); }
.js .gear__outline { stroke-dasharray: 2600; stroke-dashoffset: 2600; }
.js .gear__inner, .js .gear__hub, .js .gear__dash, .js .gear__axis { opacity: 0; }
.is-ready .hero__kicker, .is-ready .hero__title span, .is-ready .hero__lead, .is-ready .hero__actions { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.is-ready .hero__title span:nth-child(1) { transition-delay: .08s; }
.is-ready .hero__title span:nth-child(2) { transition-delay: .18s; }
.is-ready .hero__title span:nth-child(3) { transition-delay: .28s; }
.is-ready .hero__lead { transition-delay: .4s; }
.is-ready .hero__actions { transition-delay: .5s; }
.is-ready .gear__outline { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s cubic-bezier(.6,.05,.3,1) .2s; }
.is-ready .gear__inner, .is-ready .gear__hub, .is-ready .gear__dash, .is-ready .gear__axis { opacity: 1; transition: opacity .8s ease 1.1s; }

/* ---------- Intro ---------- */
.intro { padding: var(--sec) 0; background: var(--white); }
.intro__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.intro__title { font-size: clamp(2.4rem, 5vw, 4rem); color: var(--ink); position: relative; padding-top: 22px; }
.intro__title::before { content: ""; position: absolute; top: 0; left: 0; width: 56px; height: 3px; background: var(--orange); }
.intro__text { columns: 2 28ch; column-gap: 40px; color: var(--muted); }
.intro__text p { break-inside: avoid; }

/* ---------- Sotto-menu di pagina ---------- */
.subnav { position: sticky; top: var(--header-h); z-index: 40; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.subnav__inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav a { flex: none; padding: 14px 14px 12px; color: var(--muted); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a.is-active { color: var(--ink); border-bottom-color: var(--orange); }

/* ---------- Settori ---------- */
.sector { padding: var(--sec) 0; background: var(--white); }
.sector--paper { background: var(--paper); }
.sector__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.sector__grid--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.sector__head { margin-bottom: 28px; }
.sector__head h2 { color: var(--ink); max-width: 16ch; margin-bottom: 18px; }
.sector__brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; color: var(--muted); margin: 0; padding-top: 14px; position: relative; }
/* linea di quota: tratto con terminali */
.sector__brand::before { content: ""; position: absolute; top: 0; left: 0; width: min(100%, 420px); height: 9px; border-left: 1px solid var(--blue); border-right: 1px solid var(--blue); background: linear-gradient(var(--blue), var(--blue)) center / 100% 1px no-repeat; }
.sector__brand strong { font-family: var(--display); font-size: 1.35rem; font-weight: 700; color: var(--indigo); letter-spacing: .02em; }
.sector__lead { font-size: 1.15rem; max-width: 62ch; }
.sector__lead strong { font-weight: 600; color: var(--ink); }
.sub { font-size: 1.5rem; color: var(--ink); margin: 40px 0 16px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.ticks li { padding: 11px 0 11px 26px; border-bottom: 1px solid var(--line); position: relative; line-height: 1.35; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 12px; height: 1px; background: var(--blue); box-shadow: 0 -4px 0 -0px transparent; }
.ticks li::after { content: ""; position: absolute; left: 2px; top: calc(1.05em - 4px); width: 1px; height: 9px; background: var(--blue); }
.offer { margin: 0; display: grid; gap: 0; }
.offer > div { display: grid; grid-template-columns: minmax(0, 15ch) minmax(0, 1fr); gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.offer > div:last-child { border-bottom: 1px solid var(--line); }
.offer dt { font-weight: 600; color: var(--ink); }
.offer dd { margin: 0; color: var(--muted); }
.sector__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.sector__photo { margin: 0; position: sticky; top: calc(var(--header-h) + 72px); background: #1d1d1f; }
.sector__photo img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.plate { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; background: var(--ink); color: #fff; }
.plate div { padding: 18px 20px 20px; }
.plate div + div { border-left: 1px solid var(--line-dk); }
.plate b { display: block; font-family: var(--display); font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 800; line-height: 1; margin-bottom: 6px; }
.plate div:first-child b { color: var(--orange); }
.plate span { font-size: .9rem; color: rgba(255,255,255,.72); line-height: 1.35; display: block; }

/* documenti PDF */
.docs { margin-top: 40px; }
.docs__title { font-size: 1.15rem; font-family: var(--body); font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.docs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.docs a { display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; transition: border-color .2s, background .2s; }
.docs a span { font-size: .72rem; font-weight: 600; color: var(--orange-dk); border: 1px solid currentColor; padding: 1px 5px; border-radius: 2px; }
.docs a:hover { border-color: var(--ink); }

/* specifiche Dimac */
.specs { display: grid; gap: 40px; padding-top: 8px; }
.spec__val { font-family: var(--display); font-weight: 800; font-size: clamp(4.2rem, 9vw, 7.5rem); line-height: .85; color: var(--ink); margin: 0 0 14px; letter-spacing: -.02em; }
.spec__val small { font-size: .32em; font-weight: 700; color: var(--blue); margin-left: .25em; letter-spacing: 0; }
.spec__label { color: var(--muted); max-width: 32ch; margin: 12px 0 0; }
.dim { position: relative; height: 11px; width: 100%; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) center / 100% 1px no-repeat; }
.dim::before, .dim::after { content: ""; position: absolute; top: 2px; width: 0; height: 0; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; }
.dim::before { left: 0; border-right: 9px solid var(--ink); }
.dim::after { right: 0; border-left: 9px solid var(--ink); }
.dim--short { width: 55%; }

/* M³ */
.m3 { background: var(--ink); color: #fff; padding: clamp(28px, 4vw, 44px); position: sticky; top: calc(var(--header-h) + 72px); }
.m3__label { color: var(--blue-lt); font-weight: 500; margin-bottom: 10px; }
.m3__title { font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: .95; margin-bottom: 18px; }
.m3 > p:not(.m3__label):not(.m3__title) { color: rgba(255,255,255,.75); }
.m3 .docs__title { color: #fff; }
.m3 .docs a { background: transparent; color: #fff; border-color: var(--line-dk); }
.m3 .docs a:hover { border-color: #fff; }
.m3 .docs a span { color: var(--orange); }

/* carosello */
.carousel { margin-top: clamp(48px, 6vw, 80px); }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.carousel__track.is-dragging img { pointer-events: none; }
.slide { margin: 0; scroll-snap-align: start; }
.slide__open { display: block; width: 100%; padding: 0; border: 0; background: var(--paper); cursor: zoom-in; overflow: hidden; }
.slide__open img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s var(--ease); }
.slide__open:hover img { transform: scale(1.03); }
.slide__open { background: #fff; }
.slide__open img[src*="MonoLine"], .slide__open img[src*="HSG-600-ED"] { object-fit: contain; padding: 10px; }
.slide figcaption { padding: 10px 0 0; font-size: .95rem; color: var(--muted); }
.carousel.is-static .carousel__nav { display: none; }
.carousel.is-static .carousel__track { cursor: auto; }
.carousel__nav { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.carousel__nav button { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer; transition: background .2s, color .2s; }
.carousel__nav button:hover { background: var(--ink); color: #fff; }
.carousel__progress { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.carousel__progress span { position: absolute; inset: 0 auto 0 0; width: 30%; background: var(--orange); transition: transform .2s linear, width .2s; }

.lightbox { padding: 0; border: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 90vh; overflow: visible; }
.lightbox::backdrop { background: rgba(9,13,48,.88); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; background: #fff; }
.lightbox__cap { color: #fff; text-align: center; margin: 12px 0 0; }
.lightbox__close { position: absolute; top: -48px; right: 0; width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 2rem; cursor: pointer; }

/* ---------- Calcolatore ROI ---------- */
.roi { padding: var(--sec) 0; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.roi::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(108,196,234,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(108,196,234,.06) 1px, transparent 1px);
  background-size: 40px 40px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.roi .wrap { position: relative; }
.roi__head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.roi__head h2 { font-size: clamp(2.6rem, 6vw, 4.8rem); margin-bottom: 18px; }
.roi__head p { color: rgba(255,255,255,.7); max-width: 58ch; margin: 0; }
.roi__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }

.rfield { margin: 0 0 30px; padding: 0; border: 0; min-width: 0; }
.rfield__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.rfield label, .rfield legend { color: rgba(255,255,255,.82); font-weight: 500; }
.rfield legend { margin-bottom: 12px; padding: 0; }
.rfield__num { display: inline-flex; align-items: baseline; gap: 6px; border-bottom: 1px solid var(--line-dk); }
.rfield__num:focus-within { border-bottom-color: var(--blue-lt); }
.rfield__num input { width: 5.5ch; background: transparent; border: 0; color: #fff; text-align: right; font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.1; padding: 0; -moz-appearance: textfield; appearance: textfield; }
.rfield__num input::-webkit-outer-spin-button, .rfield__num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rfield__num input:focus { outline: none; }
.rfield__num i { font-style: normal; color: rgba(255,255,255,.55); font-size: .9rem; min-width: 3.4em; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --p: 10%; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--blue) var(--p), rgba(255,255,255,.18) var(--p)); }
input[type="range"]::-moz-range-track { height: 3px; background: rgba(255,255,255,.18); }
input[type="range"]::-moz-range-progress { height: 3px; background: var(--blue); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9.5px; border-radius: 50%; background: #fff; border: 5px solid var(--blue); transition: transform .15s; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 5px solid var(--blue); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: 2px solid var(--blue-lt); outline-offset: 2px; }

.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: flex; align-items: center; min-height: 48px; padding: 8px 14px; border: 1px solid var(--line-dk); color: rgba(255,255,255,.82); cursor: pointer; transition: border-color .2s, background .2s, color .2s; line-height: 1.2; }
.seg input:checked + span { border-color: var(--blue); background: rgba(26,150,203,.18); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--blue-lt); outline-offset: 2px; }
.seg span:hover { border-color: rgba(255,255,255,.5); }

.roi__out { background: var(--ink-2); border-top: 3px solid var(--orange); padding: clamp(24px, 4vw, 40px); position: sticky; top: calc(var(--header-h) + 72px); }
.roi__label { color: rgba(255,255,255,.7); margin-bottom: 4px; }
.roi__total { font-family: var(--display); font-weight: 800; font-size: clamp(3.4rem, 8vw, 6rem); line-height: 1; color: var(--orange); margin: 0 0 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.payback { margin-bottom: 22px; }
.payback__row { display: flex; justify-content: space-between; margin-bottom: 10px; color: rgba(255,255,255,.75); }
.payback__row strong { color: #fff; font-weight: 600; }
.payback__scale { position: relative; height: 6px; background: rgba(255,255,255,.1); margin-bottom: 26px; }
.payback__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--blue); transition: width .5s var(--ease); }
.payback__tick { position: absolute; top: 12px; transform: translateX(-100%); font-size: .78rem; color: rgba(255,255,255,.5); padding-right: 2px; white-space: nowrap; }
.payback__tick::before { content: ""; position: absolute; right: 0; top: -12px; width: 1px; height: 8px; background: rgba(255,255,255,.35); }
.roi__rows { margin: 0 0 26px; }
.roi__rows div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-dk); }
.roi__rows dt { color: rgba(255,255,255,.72); }
.roi__rows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.roi__rows .neg dd { color: rgba(255,255,255,.6); }

/* ---------- Partner ---------- */
.partners { padding: var(--sec) 0; background: var(--white); }
.partners h2 { color: var(--ink); }
.partners__sub { color: var(--muted); margin: 12px 0 40px; }
.partners__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.partners__list li + li { border-left: 1px solid var(--line); }
.partners__list a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 28px 24px 32px; color: var(--text); text-decoration: none; transition: background .2s; }
.partners__list li:first-child a { padding-left: 0; }
.partners__list a:hover { background: var(--paper); }
.partners__list li:first-child a:hover { padding-left: 0; }
.partners__list b { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; color: var(--ink); letter-spacing: .01em; }
.partners__list span { color: var(--muted); }
.partners__list em { font-style: normal; font-weight: 600; color: var(--orange-dk); margin-top: 12px; }

/* ---------- CTA ---------- */
.cta { background: var(--ink); color: #fff; padding: var(--sec) 0; position: relative; overflow: hidden; }
.cta__inner > * { max-width: 880px; }
.cta h2 { font-size: clamp(3rem, 8vw, 6.4rem); line-height: .92; margin-bottom: 24px; }
.cta p { color: rgba(255,255,255,.72); max-width: 56ch; font-size: 1.125rem; margin-bottom: 32px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink-3); color: rgba(255,255,255,.7); padding: 64px 0 28px; font-size: .98rem; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer__brand img { width: 64px; margin-bottom: 16px; }
.footer__brand p { max-width: 34ch; }
.footer__brand strong { color: #fff; font-family: var(--display); font-size: 1.4rem; font-weight: 700; }
.footer__title { font-family: var(--body); font-size: .95rem; font-weight: 600; color: #fff; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a, .footer .linklike { color: rgba(255,255,255,.7); text-decoration: none; }
.footer a:hover, .footer .linklike:hover { color: #fff; text-decoration: underline; }
.footer__legal { background: linear-gradient(var(--line-dk), var(--line-dk)) center top / calc(100% - 2 * var(--gut)) 1px no-repeat; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 22px; font-size: .88rem; color: rgba(255,255,255,.5); }

/* ---------- Testata pagine interne ---------- */
.phead { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.phead__inner { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(48px, 6vw, 80px); position: relative; z-index: 1; }
.phead h1 { font-size: clamp(3.2rem, 9vw, 6.8rem); line-height: .9; margin-bottom: 18px; }
.phead p { color: rgba(255,255,255,.72); max-width: 54ch; font-size: 1.125rem; margin: 0; }
.phead__art { position: absolute; right: -90px; top: 50%; width: 440px; transform: translateY(-50%); opacity: .7; }
.js .phead .gear__outline { stroke-dasharray: none; stroke-dashoffset: 0; }
.js .phead .gear__inner, .js .phead .gear__hub, .js .phead .gear__dash, .js .phead .gear__axis { opacity: 1; }

/* ---------- Chi siamo ---------- */
.about { padding: var(--sec) 0; }
.about__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); }
.about__text h2 { color: var(--ink); margin-bottom: 24px; }
.about__lead { font-size: 1.2rem; color: var(--text); }
.about__text p:not(.about__lead) { color: var(--muted); }
.bars { display: grid; gap: 22px; padding-top: 12px; }
.bar__head { display: flex; justify-content: space-between; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.bar__track { height: 4px; background: var(--paper); }
.bar__fill { height: 100%; width: var(--w); background: var(--blue); transform-origin: left; }
.js .bar__fill { transform: scaleX(0); transition: transform 1.1s var(--ease); }
.js .bar.visible .bar__fill { transform: scaleX(1); }
.bar:nth-child(2) .bar__fill { transition-delay: .1s; }
.bar:nth-child(3) .bar__fill { transition-delay: .2s; }
.bar:nth-child(4) .bar__fill { transition-delay: .3s; }
.meters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(48px, 7vw, 88px); background: linear-gradient(var(--ink), var(--ink)) center top / calc(100% - 2 * var(--gut)) 2px no-repeat; }
.meter { padding: 24px 20px 0 0; }
.meter + .meter { padding-left: 20px; border-left: 1px solid var(--line); }
.meter__val { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 7vw, 5.2rem); line-height: .9; color: var(--ink); margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.meter__label { color: var(--muted); margin: 0; }
.method { padding: var(--sec) 0; background: var(--paper); }
.method h2 { color: var(--ink); margin-bottom: 40px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps li { counter-increment: s; padding: 28px 28px 8px 0; border-top: 2px solid var(--ink); position: relative; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps li::before { content: counter(s); display: block; font-family: var(--display); font-weight: 800; font-size: 3.4rem; line-height: 1; color: var(--blue); margin-bottom: 14px; }
.steps h3 { color: var(--ink); margin-bottom: 10px; }
.steps p { color: var(--muted); }

/* ---------- Contatti ---------- */
.contact { padding: var(--sec) 0; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.info { margin: 0 0 32px; border-top: 2px solid var(--ink); }
.info > div { display: grid; grid-template-columns: 9ch minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info dt { color: var(--muted); }
.info dd { margin: 0; font-weight: 500; color: var(--ink); }
.info a { color: var(--ink); }
.map { position: relative; aspect-ratio: 4 / 3; background: var(--paper); border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; border: 0; display: none; }
.map.is-loaded iframe { display: block; }
.map.is-loaded .map__gate { display: none; }
.map__gate { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; padding: 24px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; background-color: var(--paper); }
.map__gate p { margin: 0; max-width: 32ch; color: var(--muted); background: var(--paper); }
.map__gate a { font-size: .95rem; background: var(--paper); }
.contact__form h2 { color: var(--ink); margin-bottom: 24px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
abbr[title] { text-decoration: none; color: var(--orange-dk); }
.field input, .field textarea { width: 100%; padding: 13px 14px; font: inherit; color: var(--text); background: var(--white); border: 1px solid rgba(14,20,70,.28); border-radius: 2px; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,150,203,.2); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #c62828; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 24px; color: var(--muted); font-size: .98rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; margin-bottom: 20px; border-left: 3px solid; }
.alert--ok { background: #e8f6ee; border-color: #2e7d4f; color: #1d4d31; }
.alert--err { background: #fdecea; border-color: #c62828; color: #7a1c1c; }

/* ---------- Pagine legali ---------- */
.legal { padding: var(--sec) 0; }
.legal__inner { max-width: 760px; }
.legal h2 { font-size: 1.8rem; color: var(--ink); margin: 40px 0 12px; }
.legal h2:first-child { margin-top: 0; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .6em; }
.legal__date { color: var(--muted); margin-top: 40px; }
.table-wrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--ink); }

/* ---------- 404 ---------- */
.nf { background: var(--ink); color: #fff; padding: clamp(72px, 12vw, 160px) 0; }
.nf__code { font-family: var(--display); font-weight: 800; font-size: clamp(6rem, 22vw, 14rem); line-height: .8; color: transparent; -webkit-text-stroke: 2px var(--blue); margin: 0 0 24px; }
.nf h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 16px; }
.nf p:not(.nf__code) { color: rgba(255,255,255,.72); margin-bottom: 32px; }

/* ---------- Banner cookie ---------- */
.cc { position: fixed; z-index: 90; left: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px)); background: var(--white); color: var(--text); border-top: 3px solid var(--blue); box-shadow: 0 20px 60px rgba(9,13,48,.35); padding: 22px 22px 20px; transform: translateY(16px); opacity: 0; transition: transform .35s var(--ease), opacity .35s; }
.cc.is-open { transform: none; opacity: 1; }
.cc__title { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1.05; margin: 0 0 8px; color: var(--ink); }
.cc__text { font-size: .96rem; color: var(--muted); margin-bottom: 16px; }
.cc__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc__btns .btn { min-height: 46px; padding: 0 12px; font-size: .95rem; }
.cc__btns .cc__more { grid-column: 1 / -1; }
.cc__close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; }
.cc__prefs { border-top: 1px solid var(--line); margin: 4px 0 16px; }
.cc__cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cc__cat strong { color: var(--ink); }
.cc__cat p { grid-column: 1; margin: 0; font-size: .9rem; color: var(--muted); }
.cc__cat .switch { grid-row: 1 / span 2; grid-column: 2; }
.switch { position: relative; width: 48px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 14px; background: #c3c9d6; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { background: var(--ink); opacity: .45; }
.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.cc-fab {
  position: fixed; z-index: 80; left: 16px; bottom: 16px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  background: var(--ink); color: #fff; border: 2px solid rgba(255,255,255,.3); box-shadow: 0 8px 24px rgba(9,13,48,.3);
  opacity: 0; visibility: hidden; transform: scale(.7);
  transition: opacity .25s, transform .25s var(--ease), visibility .25s, background-color .2s;
}
.cc-fab.is-visible { opacity: 1; visibility: visible; transform: none; }
.cc-fab:hover { background: var(--blue); }
@media (max-width: 560px) {
  .cc-fab { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: 42px; height: 42px; }
  .cc { left: 0; right: 0; bottom: 0; width: 100%; max-height: 85vh; overflow-y: auto; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__art { position: absolute; right: -190px; top: -40px; width: 400px; opacity: .3; z-index: -1; }
  .intro__inner, .sector__grid, .sector__grid--rev, .roi__grid, .about__grid, .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .intro__text { columns: auto; }
  .sector__photo, .m3, .roi__out { position: static; }
  .sector__photo img { aspect-ratio: 4 / 3; object-position: center 25%; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .dim--short { width: 100%; }
  .carousel__track { grid-auto-columns: calc((100% - 16px) / 2); }
  .phead__art { width: 300px; right: -170px; top: 0; transform: none; opacity: .3; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  body { font-size: 1rem; }
  .header__logo img { width: 132px; }
  .hero__index { grid-template-columns: minmax(0, 1fr); }
  .hero__index a { padding: 16px 0; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
  .hero__index a + a { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-dk); }
  .hero__index-name { font-size: 1.25rem; }
  .hero__index-meta { font-size: .88rem; text-align: right; }
  .hero__actions .btn, .cta__actions .btn { flex: 1 1 100%; }
  .ticks { grid-template-columns: minmax(0, 1fr); }
  .offer > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .plate { position: static; }
  .seg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .carousel__track { grid-auto-columns: 82%; }
  .partners__list { grid-template-columns: minmax(0, 1fr); }
  .partners__list li + li { border-left: 0; border-top: 1px solid var(--line); }
  .partners__list a { padding: 22px 0; }
  .meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meter:nth-child(3) { padding-left: 0; border-left: 0; }
  .meter:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 20px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li + li { padding-left: 0; border-left: 0; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__grid > div:last-child { grid-column: 1 / -1; }
  .info > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rfield__num input { font-size: 1.5rem; }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .js .hero__title span, .js .hero__lead, .js .hero__actions, .js .hero__kicker { opacity: 1; transform: none; }
  .js .gear__outline { stroke-dasharray: none; stroke-dashoffset: 0; }
  .js .gear__inner, .js .gear__hub, .js .gear__dash, .js .gear__axis { opacity: 1; }
}
