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

:root {
  --floor: #edefec;      /* cemento del pavimento */
  --ink: #1a222c;
  --muted: #56616d;
  --upright: #1e4d8f;    /* montanti blu della scaffalatura */
  --beam: #e5631c;       /* correnti arancioni */
  --safety: #f3c431;     /* segnaletica a pavimento */
  --paper: #ffffff;
  --line: #d4d9d4;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--floor);
}
a { color: var(--upright); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--safety); outline-offset: 3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.logo {
  font-stretch: 125%; font-weight: 800; font-size: 26px; letter-spacing: -.5px;
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.logo-mark { width: 22px; height: 26px; display: inline-block;
  background: linear-gradient(var(--beam) 0 0) 0 30% / 100% 4px no-repeat,
              linear-gradient(var(--beam) 0 0) 0 75% / 100% 4px no-repeat,
              linear-gradient(var(--upright) 0 0) 0 0 / 4px 100% no-repeat,
              linear-gradient(var(--upright) 0 0) 100% 0 / 4px 100% no-repeat; }
.logo small { font-stretch: 100%; font-weight: 500; font-size: 15px; color: var(--muted); letter-spacing: 0; }
.site-header nav { display: flex; gap: 26px; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 500; }
.site-header nav a:hover { color: var(--upright); }

/* ---------- Hero ---------- */
.hero { background: var(--paper); padding-top: 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: end; }
.hero h1 {
  font-stretch: 112%; font-weight: 800; font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.02; letter-spacing: -1.5px; margin: 0 0 24px;
}
.hero-text { padding-bottom: 80px; }
.hero p.lead { font-size: 21px; color: var(--muted); max-width: 34em; margin: 0 0 34px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-block; padding: 14px 24px; font: inherit; font-weight: 650; font-size: 17px;
  text-decoration: none; border-radius: 4px; border: 2px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--upright); border-color: var(--upright); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--floor); }

/* Terminale RF disegnato */
.terminal { justify-self: center; width: 300px; position: relative; margin-bottom: -2px; }
.device {
  background: #2b3542; border-radius: 34px 34px 0 0; padding: 26px 22px 60px;
  box-shadow: inset 0 -6px 0 #222a35, inset 0 2px 0 #3c4858;
}
.device::before { /* finestra scanner */
  content: ""; display: block; width: 90px; height: 10px; margin: 0 auto 18px;
  background: #11161d; border-radius: 6px; box-shadow: inset 0 0 0 2px #e23b2e33;
}
.screen { background: #f4f7fb; border-radius: 6px; overflow: hidden; font-size: 13px; line-height: 1.35;
  border: 3px solid #11161d; position: relative; }
.screen-bar { background: var(--upright); color: #fff; padding: 7px 10px; font-weight: 650; display: flex; justify-content: space-between; }
.screen-bar span:last-child { font-weight: 400; opacity: .8; }
.screen-body { padding: 10px 10px 12px; }
.field { margin-bottom: 8px; }
.field label { display: block; color: #5d6876; font-size: 11px; }
.field div { background: #fff; border: 1px solid #c7cfd8; padding: 3px 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.field.active div { border-color: var(--beam); box-shadow: 0 0 0 2px #e5631c40; }
.screen-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 10px 10px; }
.screen-keys span { background: #dfe5ec; text-align: center; padding: 4px; border-radius: 3px; font-weight: 600; font-size: 12px; }
.screen-keys span:last-child { background: var(--upright); color: #fff; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 20px; }
.keypad i { height: 20px; background: #3c4858; border-radius: 5px; box-shadow: 0 2px 0 #1b222b; }
.keypad i.trigger { grid-column: 2; background: var(--safety); }

.laser { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #e23b2e;
  box-shadow: 0 0 8px 2px #e23b2e88; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .laser { animation: scan 1.6s ease-in-out .6s 1 both; }
  @keyframes scan { 0% { opacity: 0; top: 10%; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; top: 90%; } }
}

/* Corrente della scaffalatura come divisore */
.beam { height: 22px; background: var(--beam); position: relative;
  background-image: radial-gradient(circle, #b84a10 3px, transparent 3.5px);
  background-size: 48px 22px; background-position: 12px center; }

/* ---------- Sezioni ---------- */
section { padding: 96px 0; }
section h2 { font-stretch: 112%; font-weight: 800; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -.8px; margin: 0 0 20px; }
.intro { font-size: 20px; color: var(--muted); max-width: 36em; margin: 0 0 56px; }

.services { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 3px solid var(--ink); }
.service { padding: 34px 40px 10px 0; }
.service + .service { padding-left: 40px; border-left: 1px solid var(--line); }
.service h3 { font-size: 23px; font-weight: 700; margin: 0 0 12px; }
.service p { margin: 0 0 14px; }
.service ul { margin: 0; padding-left: 20px; }
.service li { margin-bottom: 6px; }

/* RF Kiosk Browser */
.product { background: var(--upright); color: #fff; }
.product a { color: #fff; }
.product .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.product h2 { margin-bottom: 14px; }
.product .lead { font-size: 20px; opacity: .88; margin: 0 0 32px; }
.product .btn-primary { background: var(--safety); border-color: var(--safety); color: var(--ink); }
.product .btn-primary:hover { background: #fff; border-color: #fff; }
.product .btn-ghost { color: #fff; border-color: #ffffff88; }
.product .btn-ghost:hover { background: #ffffff1a; }
.features { list-style: none; margin: 0; padding: 0; border-top: 1px solid #ffffff40; }
.features li { padding: 18px 0; border-bottom: 1px solid #ffffff40; }
.features strong { display: block; font-size: 19px; }
.features span { opacity: .82; }
.price { margin-top: 26px; font-size: 16px; opacity: .85; }

/* Dati societari come etichetta pallet */
.company .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.label {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 3px;
  box-shadow: 8px 8px 0 var(--safety); font-size: 16px; max-width: 520px;
}
.label-row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--ink); }
.label-cell { padding: 10px 14px; }
.label-cell + .label-cell { border-left: 1px solid var(--ink); }
.label-cell.full { grid-column: 1 / -1; }
.label-cell small { display: block; font-size: 12px; color: var(--muted); }
.label-cell b { font-weight: 650; font-variant-numeric: tabular-nums; }
.label-name { font-stretch: 125%; font-weight: 800; font-size: 28px; padding: 14px; border-bottom: 2px solid var(--ink); letter-spacing: -.5px; }
.label-code { padding: 14px 14px 10px; text-align: center; }
.barcode { width: 100%; height: 64px; display: block; fill: var(--ink); }
.label-code div { font-variant-numeric: tabular-nums; letter-spacing: 3px; font-size: 14px; margin-top: 6px; }

/* Contatti */
.contact { background: var(--ink); color: #fff; }
.contact a { color: #fff; }
.contact .intro { color: #b9c2cc; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 3px solid var(--safety); padding-top: 28px; }
.contact-grid small { display: block; color: #b9c2cc; font-size: 15px; margin-bottom: 4px; }
.contact-grid a, .contact-grid span.v { font-size: 22px; font-weight: 650; word-break: break-word; }

/* Footer */
.site-footer { background: var(--ink); color: #8e99a5; font-size: 14px; padding: 0 0 40px; }
.site-footer .wrap { border-top: 1px solid #ffffff22; padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: #b9c2cc; margin-left: 18px; }
.site-footer a:first-child { margin-left: 0; }

/* Pagine legali */
.legal { background: var(--paper); padding: 64px 0 88px; }
.legal h1 { font-stretch: 112%; font-weight: 800; font-size: clamp(32px, 4vw, 46px); line-height: 1.08; letter-spacing: -1px; margin: 0 0 8px; }
.legal .updated { color: var(--muted); margin: 0 0 36px; }
.legal h2 { font-size: 22px; font-weight: 700; margin: 40px 0 10px; }
.legal p { margin: 0 0 14px; }

/* Segnaposto da completare prima della pubblicazione */
.todo { background: #fff0a6; color: var(--ink); padding: 0 4px; border-radius: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .product .wrap, .company .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-text { padding-bottom: 0; }
  .terminal { width: 260px; }
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 28px 0 8px; border-left: 0; }
  .service + .service { border-top: 1px solid var(--line); }
  .contact-grid { grid-template-columns: 1fr; gap: 22px; }
  section { padding: 72px 0; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .site-header nav { gap: 16px; }
  .site-header nav a { font-size: 15px; }
  .logo small { display: none; }
  .hero { padding-top: 48px; }
  .label-row { grid-template-columns: 1fr; }
  .label-cell + .label-cell { border-left: 0; border-top: 1px solid var(--ink); }
}

/* ---------- Aggiunte v3 ---------- */
.services.three { grid-template-columns: repeat(3, 1fr); }
.services.three .service { padding-right: 32px; }
.services.three .service + .service { padding-left: 32px; }

.products { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.products li { display: grid; grid-template-columns: 260px 1fr auto; gap: 32px; align-items: baseline;
  padding: 28px 0; border-bottom: 1px solid var(--line); }
.products h3 { font-size: 23px; margin: 0; }
.products p { margin: 0; color: var(--muted); }
.products .tag { font-size: 15px; color: var(--muted); }
.products a.more { font-weight: 650; white-space: nowrap; }

.contact-grid.two { grid-template-columns: repeat(2, 1fr); }

.page-hero { background: var(--paper); padding: 64px 0 56px; }
.page-hero .crumb { font-size: 15px; margin: 0 0 18px; }
.page-hero .crumb a { color: var(--muted); }
.page-hero h1 { font-stretch: 112%; font-weight: 800; font-size: clamp(38px, 5vw, 60px); line-height: 1.04; letter-spacing: -1.4px; margin: 0 0 20px; }
.page-hero .lead { font-size: 21px; color: var(--muted); max-width: 34em; margin: 0 0 30px; }
.page-hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: end; }
.page-hero .terminal { margin-bottom: -58px; }

@media (max-width: 900px) {
  .services.three { grid-template-columns: 1fr; }
  .services.three .service, .services.three .service + .service { padding: 28px 0 8px; }
  .products li { grid-template-columns: 1fr; gap: 8px; }
  .contact-grid.two { grid-template-columns: 1fr; }
  .page-hero .wrap { grid-template-columns: 1fr; }
  .page-hero .terminal { margin-bottom: -58px; }
}

/* ---------- v4: marketing ---------- */
.proof { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 40px 0 0; padding: 0; list-style: none; font-size: 16px; color: var(--muted); }
.proof b { color: var(--ink); font-weight: 700; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: s; border-top: 3px solid var(--ink); }
.steps li { padding: 30px 32px 6px 0; counter-increment: s; }
.steps li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--safety); font-weight: 800; font-size: 18px; margin-bottom: 16px; }
.steps h3 { font-size: 21px; margin: 0 0 8px; }
.steps p { margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 3px solid var(--ink); }
.feature { padding: 32px 40px 32px 0; border-bottom: 1px solid var(--line); }
.feature:nth-child(even) { padding-left: 40px; padding-right: 0; border-left: 1px solid var(--line); }
.feature h3 { font-size: 22px; margin: 0 0 10px; }
.feature p { margin: 0 0 10px; }
.feature ul { margin: 0; padding-left: 20px; }
.feature li { margin-bottom: 4px; }

.big-claim { font-stretch: 112%; font-weight: 800; font-size: clamp(26px, 3vw, 36px); line-height: 1.15; letter-spacing: -.6px; max-width: 26em; margin: 0; }

/* tastiera funzioni nel terminale */
.fkeys { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 0 8px 8px; }
.fkeys span { background: #dfe5ec; text-align: center; padding: 3px 0; border-radius: 3px; font-weight: 650; font-size: 10.5px; }
.fkeys span.x { background: var(--safety); }
.fkeys span.ok { background: var(--upright); color: #fff; grid-column: span 2; }
.scan-chip { display: inline-block; background: #e8f1e5; color: #2c6b2a; border-radius: 3px; padding: 0 5px; font-size: 10.5px; font-weight: 650; margin-left: 4px; }

.trademark { font-size: 14px; color: var(--muted); margin-top: 40px; }

@media (max-width: 900px) {
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 26px 0 6px; border-left: 0; }
  .feature, .feature:nth-child(even) { padding: 26px 0; border-left: 0; }
}
