@font-face {
  font-family: "Archivo";
  src: url("font/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --lamiera: #e3e7ea;      /* sfondo: lamiera verniciata chiara */
  --carta: #f4f6f7;        /* superfici */
  --grafite: #1a2128;      /* testo e tratti */
  --acciaio: #56636e;      /* testo secondario */
  --blu: #1b4e9b;          /* blu macchina utensile */
  --blu-scuro: #123a76;
  --ambra: #f0a20b;        /* segnale / dati in viaggio */
  --verde: #2f9d5d;        /* lampada di marcia */
  --linea: #c5ccd2;
  --larghezza: 1160px;
  --margine: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--lamiera);
  color: var(--grafite);
  font-family: "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  font-size: 1.0625rem;
  line-height: 1.55;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blu); outline-offset: 3px; border-radius: 4px; }

/* ---------- testata ---------- */
.testata {
  max-width: var(--larghezza);
  margin: 0 auto;
  padding: 22px var(--margine);
  display: flex; align-items: center; justify-content: space-between;
}
.marchio {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-weight: 800; font-stretch: 125%; font-size: 1.15rem; letter-spacing: -0.01em;
}
.marchio svg { width: 40px; height: 24px; }
.m-nastro { fill: none; stroke: var(--grafite); stroke-width: 2.5; }
.m-rullo { fill: var(--grafite); }
.m-led { fill: var(--ambra); }
.testata { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--lamiera) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: none; padding-left: max(var(--margine), calc((100% - var(--larghezza)) / 2 + var(--margine))); padding-right: max(var(--margine), calc((100% - var(--larghezza)) / 2 + var(--margine))); transition: box-shadow .3s; }
.testata.scorsa { box-shadow: 0 1px 0 var(--linea), 0 10px 30px -20px rgba(26,33,40,.35); }
.menu { display: flex; gap: 28px; margin-left: auto; margin-right: 28px; font-weight: 650; font-stretch: 108%; font-size: .95rem; }
.menu a { text-decoration: none; padding: 6px 0; background: linear-gradient(var(--ambra), var(--ambra)) no-repeat 0 100% / 0 3px; transition: background-size .3s ease; }
.menu a:hover, .menu a:focus-visible { background-size: 100% 3px; }
.giu { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; text-decoration: none; font-weight: 650; color: var(--acciaio); }
.giu svg { width: 34px; height: 34px; padding: 6px; border-radius: 50%; border: 1.5px solid currentColor; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; animation: rimbalza 2.2s ease-in-out infinite; }
.giu:hover { color: var(--grafite); }
@keyframes rimbalza { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.lingua { display: flex; border: 1.5px solid var(--grafite); border-radius: 999px; padding: 3px; }
.lingua button {
  font: inherit; font-size: 0.85rem; font-weight: 700; font-stretch: 110%;
  border: 0; background: none; color: var(--grafite);
  padding: 4px 12px; border-radius: 999px; cursor: pointer;
}
.lingua button[aria-pressed="true"] { background: var(--grafite); color: var(--carta); }

/* ---------- sezioni ---------- */
main > section {
  max-width: var(--larghezza);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 110px) var(--margine);
}
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-stretch: 118%; max-width: 20ch; }
h3 { font-size: 1.25rem; font-stretch: 110%; letter-spacing: -0.01em; }
p { margin: 0; }

/* ---------- apertura ---------- */
.apertura {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding-top: clamp(24px, 5vw, 56px) !important;
}
.sottotitolo { color: var(--blu); font-weight: 700; font-stretch: 105%; margin-bottom: 18px; }
h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  font-stretch: 125%;
  font-weight: 850;
  line-height: 0.96;
  letter-spacing: -0.035em;
  max-width: 13ch;
  animation: allarga 1.6s cubic-bezier(.2,.7,.1,1) both;
}
@keyframes allarga {
  from { font-stretch: 62%; letter-spacing: 0; opacity: 0.2; }
  to   { font-stretch: 125%; letter-spacing: -0.035em; opacity: 1; }
}
.intro { margin-top: 26px; max-width: 46ch; color: var(--acciaio); font-size: 1.15rem; }
.azioni { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.pulsante {
  display: inline-flex; align-items: center;
  padding: 14px 24px; border-radius: 999px;
  background: var(--blu); color: #fff; text-decoration: none;
  font-weight: 700; font-stretch: 108%;
  transition: background .2s;
}
.pulsante:hover { background: var(--blu-scuro); }
.pulsante.secondario { background: transparent; color: var(--grafite); box-shadow: inset 0 0 0 1.5px var(--grafite); }
.pulsante.secondario:hover { background: var(--grafite); color: var(--carta); }
.pulsante span { margin-right: .3em; }

/* schema animato */
.schema { margin: 0; }
.schema-svg { width: 100%; height: auto; display: block; overflow: visible; }
.s-pavimento { stroke: var(--linea); stroke-width: 2; }
.s-corpo { fill: var(--carta); stroke: var(--grafite); stroke-width: 3; }
.s-nastro { fill: none; stroke: var(--grafite); stroke-width: 8; }
.s-nastro-moto { fill: none; stroke: var(--lamiera); stroke-width: 3; stroke-dasharray: 6 14; animation: scorri 0.9s linear infinite; }
@keyframes scorri { to { stroke-dashoffset: -40; } }
.s-rullo { fill: var(--lamiera); stroke: var(--grafite); stroke-width: 3; }
.s-perno { fill: var(--grafite); }
.s-tappeto { fill: var(--acciaio); }
.s-quadro { fill: var(--grafite); }
.s-lampada-verde { fill: var(--verde); }
.s-lampada-ambra { fill: var(--ambra); animation: lampeggia 2.4s steps(1) infinite; }
@keyframes lampeggia { 50% { opacity: 0.25; } }
.s-display { fill: #8fd3a8; }
.s-pezzo { fill: #c9a16b; stroke: #8a6a3d; stroke-width: 1.5; animation: avanza 6s linear infinite; }
.s-pezzo.p2 { animation-delay: -2s; }
.s-pezzo.p3 { animation-delay: -4s; }
@keyframes avanza {
  0%   { transform: translateX(-30px); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateX(300px); opacity: 0; }
}
.s-cavo { fill: none; stroke: var(--grafite); stroke-width: 3; stroke-linejoin: round; }
.s-tunnel { fill: none; stroke: var(--blu); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
.s-impulso { fill: var(--ambra); }
.s-pc { fill: var(--grafite); }
.s-fessura { fill: var(--acciaio); }
.s-led { fill: var(--verde); animation: lampeggia 1.2s steps(1) infinite; }
.s-finestra { fill: var(--carta); stroke: var(--grafite); stroke-width: 3; }
.s-barra { stroke: var(--grafite); stroke-width: 2; }
.s-punto { fill: var(--acciaio); }
.s-barra-g { fill: var(--blu); transform-box: fill-box; transform-origin: bottom; animation: cresci 4.8s ease-in-out infinite; }
.g2 { animation-delay: .2s; } .g3 { animation-delay: .4s; } .g4 { animation-delay: .6s; } .g5 { animation-delay: .8s; } .g6 { animation-delay: 1s; fill: var(--ambra); }
@keyframes cresci { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
.s-didascalia { font: 600 13px "Archivo", sans-serif; font-stretch: 110%; fill: var(--acciaio); text-anchor: middle; }

/* ---------- come funziona ---------- */
.passi {
  list-style: none; padding: 0; margin: 48px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px);
  counter-reset: passo;
}
.passi li { counter-increment: passo; position: relative; padding-top: 28px; border-top: 3px solid var(--grafite); }
.passi li::before {
  content: counter(passo);
  position: absolute; top: -17px; left: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ambra); color: var(--grafite);
  font-weight: 800; font-size: 0.95rem;
}
.icona { width: 56px; height: 56px; margin: 8px 0 16px; fill: none; stroke: var(--blu); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.icona .pieno { fill: var(--ambra); stroke: none; }
.passi p { margin-top: 10px; color: var(--acciaio); max-width: 36ch; }

/* ---------- vista ---------- */
.vista {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
.elenco { list-style: none; padding: 0; margin: 30px 0 0; }
.elenco li { padding: 14px 0 14px 34px; border-bottom: 1.5px solid var(--linea); position: relative; }
.elenco li::before {
  content: ""; position: absolute; left: 4px; top: 21px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--verde);
  box-shadow: 0 0 0 4px rgba(47, 157, 93, .18);
}
.pannello {
  background: var(--grafite); color: var(--carta);
  border-radius: 22px; padding: 22px;
  box-shadow: 0 30px 60px -30px rgba(18, 58, 118, .55);
  transform: rotate(-1.2deg);
}
.pannello-testa { display: flex; align-items: center; gap: 10px; font-weight: 700; font-stretch: 110%; }
.pannello-ora { margin-left: auto; color: #9aa7b2; font-variant-numeric: tabular-nums; }
.lampada { width: 12px; height: 12px; border-radius: 50%; }
.lampada.verde { background: #4cd486; box-shadow: 0 0 12px #4cd486; animation: lampeggia 2s steps(1) infinite; }
.pannello-dati { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.pannello-dati div { background: #26303a; border-radius: 12px; padding: 12px 14px; }
.pannello-dati span { display: block; color: #9aa7b2; font-size: .85rem; }
.pannello-dati b { font-size: 1.7rem; font-stretch: 115%; font-weight: 800; font-variant-numeric: tabular-nums; }
.pannello-dati small { font-size: .9rem; color: #9aa7b2; }
.pannello-grafico { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 16px; padding: 0 4px; }
.pannello-grafico i { flex: 1; background: var(--blu); border-radius: 3px 3px 0 0; }
/* altezze fisse (niente stili in linea: CSP) */
.pannello-grafico i:nth-child(1) { height: 30%; }
.pannello-grafico i:nth-child(2) { height: 55%; }
.pannello-grafico i:nth-child(3) { height: 42%; }
.pannello-grafico i:nth-child(4) { height: 70%; }
.pannello-grafico i:nth-child(5) { height: 64%; }
.pannello-grafico i:nth-child(6) { height: 88%; }
.pannello-grafico i:nth-child(7) { height: 76%; }
.pannello-grafico i:nth-child(8) { height: 50%; }
.pannello-grafico i:nth-child(9) { height: 92%; }
.pannello-grafico i:nth-child(10) { height: 81%; }
.pannello-grafico i:nth-child(11) { height: 60%; }
.pannello-grafico i:nth-child(12) { height: 97%; }
.pannello-grafico i:last-child { background: var(--ambra); }

/* ---------- industria 4.0 ---------- */
.quattro {
  max-width: none !important;
  background: var(--blu); color: #fff;
  padding-left: max(var(--margine), calc((100% - var(--larghezza)) / 2 + var(--margine))) !important;
  padding-right: max(var(--margine), calc((100% - var(--larghezza)) / 2 + var(--margine))) !important;
}
.quattro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center; overflow: hidden; }
.quattro h2 { max-width: 18ch; }
.quattro-cifra {
  font-size: clamp(7rem, 19vw, 17rem); font-weight: 900; font-stretch: 125%;
  line-height: .8; letter-spacing: -0.05em; text-align: right;
  color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.55);
}
.quattro p { margin-top: 24px; max-width: 58ch; font-size: 1.2rem; }
.quattro .nota { font-size: 1rem; color: #c9d7ee; }

/* ---------- sicurezza ---------- */
.garanzie { margin: 44px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(32px, 6vw, 80px); }
.garanzie dt { font-weight: 800; font-stretch: 112%; font-size: 1.2rem; padding-left: 18px; border-left: 4px solid var(--ambra); }
.garanzie dd { margin: 8px 0 0; padding-left: 22px; color: var(--acciaio); max-width: 42ch; }

/* ---------- contatti ---------- */
.contatti { border-top: 3px solid var(--grafite); }
.contatti p { margin-top: 18px; max-width: 50ch; color: var(--acciaio); font-size: 1.15rem; }
.recapiti { margin-top: 34px; display: flex; flex-direction: column; gap: 6px; }
.recapiti a {
  font-size: clamp(1.5rem, 4.6vw, 3rem); font-weight: 800; font-stretch: 120%;
  letter-spacing: -0.02em; text-decoration: none; width: fit-content;
  background: linear-gradient(var(--ambra), var(--ambra)) no-repeat 0 92% / 0 6px;
  transition: background-size .35s ease;
}
.recapiti a:hover, .recapiti a:focus-visible { background-size: 100% 6px; }

/* ---------- piede ---------- */
.piede {
  background: var(--grafite); color: #b7c1ca;
  padding: 36px var(--margine);
  font-size: .95rem;
}
.piede p { max-width: var(--larghezza); margin: 0 auto; padding: 2px 0; }
.piede b { color: #fff; font-stretch: 120%; margin-right: .4em; }

/* ---------- telefono ---------- */
@media (max-width: 820px) {
  .menu { display: none; }
  .lingua { margin-left: auto; }
  .apertura, .vista, .quattro { grid-template-columns: minmax(0, 1fr); }
  .quattro-cifra { text-align: left; font-size: 6.5rem; }
  .schema { order: 2; }
  .passi { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .garanzie { grid-template-columns: minmax(0, 1fr); }
  .pannello { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .s-impulso { display: none; }
}
