/*
 * Home pubblica di PMP Tech Factory (public/index.html).
 * Solo HTML e CSS: nessuno script, nessuna risorsa esterna (CSP del sito: tutto da 'self').
 * Animazioni: all'apertura con animazioni a tempo; durante lo scorrimento con le animazioni
 * legate allo scroll del browser (animation-timeline), dentro @supports. Senza supporto, o con
 * «riduci movimento», la pagina resta completa e ferma: lo stato senza animazione è quello finale.
 * Font Geist e Geist Mono (SIL Open Font License 1.1), in public/fonts/.
 */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
}

:root {
  --ink: #0e0f0c;
  --ink-2: #15170f;
  --ink-3: #1d2017;
  --line: rgba(242, 243, 238, 0.09);
  --line-strong: rgba(242, 243, 238, 0.16);
  --text: #f2f3ee;
  --muted: #a4a99b;
  --lime: #c4f23a;
  --lime-deep: #a6d21c;
  --paper: #f3f2ec;
  --paper-2: #e8e6dc;
  --card: #fbfaf6;
  --ink-text: #121410;
  --ink-muted: #5c6253;
  --warn: #f2b53a;
  --bad: #ff6b5b;
  --chamfer: 28px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Scorrimento morbido solo per i clic dentro la pagina (il link cliccato ha il fuoco): aprendo
   un indirizzo con #ancora, per esempio /logistica/#demo, il salto è immediato e preciso. */
@media (prefers-reduced-motion: no-preference) {
  html:focus-within {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

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

.paper :focus-visible,
.cta :focus-visible {
  outline-color: var(--ink);
}

/* Arrivo da un'ancora (#demo, #richiesta…): sotto la barra fissa in alto, non coperto. */
[id] {
  scroll-margin-top: 84px;
}

.wrap {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

/* ---------- Elementi comuni ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ink .eyebrow,
.hero .eyebrow {
  color: var(--muted);
}

.eyebrow.lime,
.ink .eyebrow.lime {
  color: var(--lime);
}

.paper .eyebrow.lime {
  color: var(--ink-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.35s var(--ease),
    background-color 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn .arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

.btn:hover .arrow.down {
  transform: translateY(3px);
}

.btn-lime {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 0 0 0 rgba(196, 242, 58, 0);
}

.btn-lime:hover {
  box-shadow: 0 12px 40px -10px rgba(196, 242, 58, 0.55);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.btn-ink {
  background: var(--ink);
  color: var(--lime);
}

.btn-ink:hover {
  box-shadow: 0 16px 40px -14px rgba(14, 15, 12, 0.7);
}

.btn-small {
  padding: 10px 18px;
  font-size: 14px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--muted);
}

.dot.ok,
.dot.lime {
  background: var(--lime);
}

.dot.warn {
  background: var(--warn);
}

.dot.grey {
  background: #5b6152;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.tag.ok {
  border-color: rgba(196, 242, 58, 0.4);
  color: var(--lime);
}

.tag.warn {
  border-color: rgba(242, 181, 58, 0.45);
  color: var(--warn);
}

.tag.bad {
  border-color: rgba(255, 107, 91, 0.45);
  color: var(--bad);
}

/* ---------- Barra in alto e avanzamento ---------- */

.progress {
  display: none;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding-inline: max(24px, (100% - 1200px) / 2);
  border-bottom: 1px solid var(--line);
  background: rgba(14, 15, 12, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.topbar-logo img {
  width: 172px;
  height: auto;
}

.topbar-nav {
  display: flex;
  gap: 32px;
}

.topbar-nav a {
  position: relative;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.25s;
}

.topbar-nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 -6px;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.topbar-nav a:hover {
  color: var(--text);
}

.topbar-nav a:hover::after {
  transform: none;
}

/* «gratis» nel pulsante della barra: sugli schermi più stretti non c'è spazio accanto a logo e menu. */
@media (max-width: 440px) {
  .topbar-extra {
    display: none;
  }
}

/* ---------- Menu del telefono ---------- */
/* Tendina laterale senza script: il pulsante porta a #menu e :target la apre; una voce, la × o
   un tocco fuori cambiano l'ancora e la chiudono. Sta fuori dalla barra in alto, perché il suo
   backdrop-filter farebbe da riferimento agli elementi fissi al suo interno. */
.menu-toggle,
.drawer {
  display: none;
}

@media (max-width: 980px) {
  .topbar .btn-small {
    margin-left: auto;
  }

  .menu-toggle,
  .drawer-close {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--text);
  }

  .menu-toggle svg,
  .drawer-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }

  .drawer {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
    visibility: hidden;
    transition: visibility 0s 0.4s;
  }

  .drawer:target {
    visibility: visible;
    transition: none;
  }

  .drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 4, 0.62);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
  }

  .drawer-panel {
    position: absolute;
    inset: 0 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: min(340px, 86vw);
    padding: 11px 16px 32px 24px;
    overflow-y: auto;
    border-left: 1px solid var(--line-strong);
    background: var(--ink-2);
    box-shadow: -30px 0 80px -30px rgba(0, 0, 0, 0.8);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
  }

  .drawer:target .drawer-backdrop {
    opacity: 1;
  }

  .drawer:target .drawer-panel {
    transform: none;
  }

  .drawer-close {
    align-self: flex-end;
  }

  .drawer-links {
    display: grid;
    padding-right: 8px;
  }

  .drawer-links a {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.03em;
    text-decoration: none;
  }

  .drawer-links a[aria-current="page"] {
    color: var(--lime);
  }

  .drawer-panel .btn {
    justify-content: center;
    margin-right: 8px;
  }

  /* A tendina aperta la pagina sotto non scorre. */
  html:has(.drawer:target) {
    overflow: hidden;
  }
}

/* ---------- Apertura ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: 136px 0 96px;
  overflow: hidden;
  isolation: isolate;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 62% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 62% 45%, #000 20%, transparent 75%);
}

.hero-glow {
  position: absolute;
  top: 8%;
  right: -10%;
  z-index: -1;
  width: min(900px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 242, 58, 0.16), rgba(196, 242, 58, 0) 62%);
  animation: drift 18s ease-in-out infinite alternate;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 40px;
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--lime);
  animation: ping 2.2s var(--ease) infinite;
}

.hero-title {
  font-size: clamp(42px, 5.3vw, 80px);
  font-weight: 650;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero-title .line {
  display: block;
  padding-bottom: 0.07em;
  overflow: hidden;
}

.hero-title .line > span {
  display: inline-block;
  animation: rise 1.1s var(--ease) both;
}

.hero-title .line:nth-child(2) > span {
  animation-delay: 0.12s;
}

.hero-title .line:nth-child(3) > span {
  animation-delay: 0.24s;
}

.hero-title em {
  color: var(--lime);
  font-style: normal;
}

.hero-lead {
  max-width: 560px;
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  animation: fade-up 1s 0.45s var(--ease) both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
  animation: fade-up 1s 0.6s var(--ease) both;
}

.hero-visual {
  position: relative;
  animation: fade-in 1.4s 0.3s var(--ease) both;
}

.network {
  width: 100%;
  height: auto;
  overflow: visible;
}

.route {
  fill: none;
  stroke: rgba(196, 242, 58, 0.2);
  stroke-width: 1.4;
}

.pulse {
  fill: none;
  stroke: var(--lime);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 5 95;
  stroke-dashoffset: 100;
  animation: travel 3.2s linear infinite;
}

.pulse.p2 { animation-duration: 3.8s; animation-delay: -1.1s; }
.pulse.p3 { animation-duration: 2.6s; animation-delay: -0.4s; }
.pulse.p4 { animation-duration: 4.2s; animation-delay: -2.3s; }
.pulse.p5 { animation-duration: 3s; animation-delay: -1.7s; }
.pulse.p6 { animation-duration: 3.6s; animation-delay: -0.9s; }
.pulse.p7 { animation-duration: 2.9s; animation-delay: -2.6s; }
.pulse.p8 { animation-duration: 4.4s; animation-delay: -1.3s; }
.pulse.p9 { animation-duration: 3.4s; animation-delay: -0.2s; }
.pulse.p10 { animation-duration: 4s; animation-delay: -3.1s; }

.node {
  fill: var(--ink);
  stroke: var(--lime);
  stroke-width: 2;
}

.node.hub {
  fill: var(--lime);
}

.halo {
  fill: var(--lime);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: halo 2.8s var(--ease) infinite;
}

.halo.h2 { animation-delay: 0.7s; }
.halo.h3 { animation-delay: 1.4s; }
.halo.h4 { animation-delay: 2.1s; }

.labels text {
  fill: #868b7b;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.float {
  position: absolute;
  width: 212px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(21, 23, 15, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.7);
  animation:
    fade-up 0.9s var(--ease) both,
    bob 7s ease-in-out infinite;
}

.float-a {
  top: 2%;
  left: -4%;
  animation-delay: 0.9s, 1.8s;
}

.float-b {
  top: 27%;
  right: -8%;
  animation-delay: 1.1s, -2.4s;
}

.float-c {
  bottom: -2%;
  left: -6%;
  animation-delay: 1.3s, -4.6s;
}

.float-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.float-title {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.float-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.float-bar {
  display: block;
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--ink-3);
}

.float-bar i {
  display: block;
  width: 86%;
  height: 100%;
  border-radius: 6px;
  background: var(--lime);
  transform-origin: left;
  animation: fill-x 1.6s 1.6s var(--ease) both;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-cue i {
  width: 1px;
  height: 38px;
  background: linear-gradient(var(--lime), transparent);
  transform-origin: top;
  animation: cue 2.2s var(--ease) infinite;
}

/* ---------- Fascia scorrevole ---------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 10px 0 10px 22px;
  font-size: clamp(16px, 1.7vw, 22px);
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.marquee-track span::after {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--ink);
  clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%);
}

/* ---------- Sezioni ---------- */

.section {
  position: relative;
  padding-block: clamp(96px, 12vw, 168px);
}

.section.compact {
  padding-block: clamp(80px, 9vw, 120px);
}

.paper {
  background: var(--paper);
  color: var(--ink-text);
}

.ink {
  background: var(--ink);
  color: var(--text);
}

.section-head {
  max-width: 860px;
  margin-bottom: clamp(56px, 7vw, 96px);
}

.section-head h2,
.security h2,
.cta h2 {
  font-size: clamp(38px, 5.6vw, 76px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 680px;
  margin-top: 26px;
  font-size: clamp(17px, 1.5vw, 20px);
}

.paper .lead {
  color: var(--ink-muted);
}

.ink .lead {
  color: var(--muted);
}

/* ---------- Servizi ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 28px;
  background: var(--card);
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
  transition:
    background-color 0.45s var(--ease),
    color 0.45s var(--ease),
    transform 0.45s var(--ease);
}

.service:hover {
  background: var(--ink);
  color: var(--text);
  transform: translateY(-6px);
}

.service-num {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.service:hover .service-num {
  color: var(--lime);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: 26px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--lime);
  transition: transform 0.45s var(--ease);
}

.service:hover .service-icon {
  transform: rotate(-8deg) scale(1.06);
}

.service-icon svg,
.sec-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service h3 {
  margin-top: 56px;
  font-size: 22px;
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.service p {
  margin-top: 12px;
  color: var(--ink-muted);
  font-size: 15.5px;
  transition: color 0.45s var(--ease);
}

.service:hover p {
  color: var(--muted);
}

/* ---------- Caso logistica ---------- */

.steps {
  position: relative;
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  min-height: 120vh;
  padding-block: 8vh;
}

.step-copy,
.step-visual {
  position: sticky;
  top: 18vh;
  align-self: start;
}

.step-copy {
  top: 24vh;
  max-width: 460px;
}

.step-num {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.step-num::after {
  content: " / 06";
  color: #5b6152;
}

.step h3 {
  margin-top: 18px;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 640;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.step-copy > p:not(.step-num) {
  margin-top: 20px;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.chips li {
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
}

.step-visual {
  perspective: 1400px;
}

.screen {
  padding: 18px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, #181a12, #121410);
  box-shadow:
    0 50px 90px -40px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.screen-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}

.screen-bar span,
.term-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2c2f25;
}

.screen-bar b,
.term-bar b {
  margin-left: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 01 preventivo */
.quote-route {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  background: var(--ink-3);
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.quote-line {
  position: relative;
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, #3b3f33 0 6px, transparent 6px 12px);
}

.quote-line b {
  position: absolute;
  inset: 0;
  background: var(--lime);
  transform-origin: left;
}

.quote-line::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  transform: translateY(-50%);
}

.quote-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.quote-rows div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.quote-rows dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quote-rows dd {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 600;
}

.quote-total {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 12px;
  padding: 18px;
  border-radius: 14px;
  background: var(--lime);
  color: var(--ink);
}

.quote-total span {
  width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quote-total strong {
  font-size: 40px;
  font-weight: 680;
  letter-spacing: -0.05em;
}

.quote-total em {
  font-style: normal;
  font-weight: 500;
}

/* 02 carico 3D (SVG isometrico) */
.iso {
  width: 100%;
  height: auto;
  max-height: 360px;
  margin-inline: auto;
}

.iso-floor {
  fill: #1f2219;
  stroke: rgba(196, 242, 58, 0.35);
  stroke-width: 1;
}

.iso-wall {
  fill: rgba(196, 242, 58, 0.035);
  stroke: rgba(196, 242, 58, 0.3);
  stroke-width: 1;
}

.iso-edge {
  stroke: rgba(196, 242, 58, 0.55);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.bx .f-top {
  fill: #e9e6da;
}

.bx .f-left {
  fill: #b9b4a3;
}

.bx .f-right {
  fill: #8f8a79;
}

.bx polygon {
  stroke: #15170f;
  stroke-width: 0.8;
  stroke-linejoin: round;
}

.bx-lime .f-top {
  fill: #d8ff62;
}

.bx-lime .f-left {
  fill: var(--lime);
}

.bx-lime .f-right {
  fill: var(--lime-deep);
}

.meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ink-3);
}

.meter span,
.load-note,
.carriers-note {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meter-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #2a2d23;
}

.meter-bar b {
  display: block;
  width: 86%;
  height: 100%;
  border-radius: 8px;
  background: var(--lime);
  transform-origin: left;
}

.meter strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.load-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

/* 03 subvettori */
.carrier-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 64px;
  align-items: center;
  gap: 14px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}

.carrier-list b {
  overflow: hidden;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score {
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--lime) var(--fill), #2a2d23 var(--fill));
}

.score.s5 { --fill: 96%; }
.score.s4 { --fill: 78%; }
.score.s2 { --fill: 38%; }

.carriers-note {
  margin-top: 14px;
}

/* 04 documenti */
.docs {
  position: relative;
  height: 400px;
}

.doc {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(300px, 70%);
  aspect-ratio: 0.78;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, #1d2017, #15170f);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
  translate: -50% -50%;
}

.doc::before {
  content: "";
  position: absolute;
  inset: 96px 22px auto;
  height: 74px;
  background: repeating-linear-gradient(180deg, #2c2f25 0 6px, transparent 6px 16px);
}

.doc-type {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.doc-name {
  margin-top: 6px;
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.doc .tag {
  position: absolute;
  bottom: 22px;
  left: 22px;
}

.doc.d1 { transform: translate(-46%, -6%) rotate(-12deg); }
.doc.d2 { transform: translate(-16%, -10%) rotate(-4deg); }
.doc.d3 { transform: translate(14%, -4%) rotate(5deg); }
.doc.d4 { transform: translate(42%, 6%) rotate(13deg); }

/* 05 pratica */
.stages {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.stages li {
  padding-top: 26px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  position: relative;
}

.stages li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid #3a3e31;
  border-radius: 50%;
  background: var(--ink-2);
  transform: translateX(-50%);
}

.stages li:nth-child(-n + 4)::before {
  border-color: var(--lime);
  background: var(--lime);
}

.stages li.now {
  color: var(--text);
  font-weight: 600;
}

.stages li.now::before {
  box-shadow: 0 0 0 6px rgba(196, 242, 58, 0.18);
}

.stages-bar {
  display: block;
  height: 3px;
  margin: 18px 8% 0;
  border-radius: 3px;
  background: #2a2d23;
}

.stages-bar b {
  display: block;
  width: 60%;
  height: 100%;
  border-radius: 3px;
  background: var(--lime);
  transform-origin: left;
}

.notify {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid rgba(196, 242, 58, 0.3);
  border-radius: 12px;
  background: rgba(196, 242, 58, 0.06);
  font-size: 14.5px;
}

/* 06 cruscotto */
.bars {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  height: 190px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line-strong);
}

.bars i {
  display: block;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #4a4f3e, #2c2f25);
  transform-origin: bottom;
}

.bars i:nth-child(3n) {
  background: linear-gradient(180deg, var(--lime), var(--lime-deep));
}

.bars .b1 { height: 38%; }
.bars .b2 { height: 52%; }
.bars .b3 { height: 46%; }
.bars .b4 { height: 64%; }
.bars .b5 { height: 58%; }
.bars .b6 { height: 76%; }
.bars .b7 { height: 70%; }
.bars .b8 { height: 92%; }

.spark {
  width: 100%;
  height: 70px;
  margin-top: 16px;
}

.spark path {
  fill: none;
  stroke: var(--lime);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.kpi-legend {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.kpi-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footnote {
  margin-top: 32px;
  color: #6c7262;
  font-size: 13px;
}

/* ---------- Automazione ---------- */

.rule {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 56px;
}

.rule-step {
  position: relative;
  padding: 26px 28px 30px;
  background: var(--card);
  border-radius: 18px;
}

.rule-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -18px;
  z-index: 1;
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%) 0 0 / 8px 2px;
  animation: dash-x 0.8s linear infinite;
}

.rule-step:last-child {
  background: var(--ink);
  color: var(--text);
}

.rule-label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rule-step:last-child .rule-label {
  background: var(--lime);
  color: var(--ink);
}

.rule-step p {
  font-size: 21px;
  font-weight: 560;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.auto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
}

.term {
  align-self: start;
  padding: 20px 22px 26px;
  border-radius: 20px;
  background: var(--ink);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13.5px;
  box-shadow: 0 40px 80px -40px rgba(14, 15, 12, 0.6);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.term-lines li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 18px;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

.term-lines time {
  color: #6c7262;
}

.term-lines b {
  font-weight: 700;
  text-align: right;
}

.term-lines .ok { color: var(--lime); }
.term-lines .warn { color: var(--warn); }
.term-lines .bad { color: var(--bad); }

.term-lines li:last-child::after {
  content: "";
  grid-column: 2;
  width: 9px;
  height: 17px;
  margin-top: 10px;
  background: var(--lime);
  animation: blink 1.1s steps(1) infinite;
}

.auto-list {
  display: grid;
  gap: 18px;
}

.auto-list li {
  padding: 24px 26px;
  border-radius: 18px;
  background: var(--card);
}

.auto-list h3 {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.auto-list p {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 15.5px;
}

.callout {
  margin-top: 18px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--ink);
  color: var(--text);
  clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 0 100%);
}

.callout .eyebrow,
.paper .callout .eyebrow.lime {
  margin-bottom: 14px;
  color: var(--lime);
}

.callout-text {
  max-width: 880px;
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

/* ---------- Sicurezza ---------- */

.security {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 48px;
}

.security-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
}

.security-list li {
  padding: 26px;
  background: var(--ink);
}

.sec-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(196, 242, 58, 0.35);
  border-radius: 12px;
  color: var(--lime);
}

.security-list h3 {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.security-list p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Metodo ---------- */

.method {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding-top: 40px;
}

.method::before,
.method::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--paper-2);
}

.method::after {
  background: var(--ink);
  transform-origin: left;
}

.method li {
  position: relative;
}

.method-num {
  position: absolute;
  top: -40px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 11px;
}

.method h3 {
  margin-top: 18px;
  font-size: 24px;
  font-weight: 640;
  letter-spacing: -0.035em;
}

.method p {
  margin-top: 10px;
  color: var(--ink-muted);
}

/* ---------- Contatto ---------- */

.cta {
  padding-block: clamp(96px, 11vw, 150px);
  background: var(--lime);
  color: var(--ink);
  overflow: hidden;
}

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
}

.cta h2 {
  max-width: 900px;
}

.cta p {
  max-width: 560px;
  margin: 24px 0 36px;
  font-size: clamp(17px, 1.5vw, 20px);
}

.badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 220px;
  aspect-ratio: 1;
}

.badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 22s linear infinite;
}

.badge text {
  fill: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.badge img {
  width: 86px;
  height: auto;
}

/* ---------- Piè di pagina ---------- */

.footer {
  padding: 72px 0 36px;
  background: var(--ink);
  color: var(--muted);
  font-size: 14.5px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.footer-brand img {
  width: 172px;
  height: auto;
}

.footer-brand p {
  max-width: 320px;
  margin-top: 18px;
}

.footer-legal {
  font-style: normal;
  line-height: 1.7;
}

.footer-legal strong {
  color: var(--text);
}

.footer-legal a,
.footer-nav a {
  text-decoration-color: rgba(196, 242, 58, 0.5);
  text-underline-offset: 3px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  color: var(--text);
}

.footer-nav a:hover,
.footer-legal a:hover {
  color: var(--lime);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  font-size: 13px;
}

/* ---------- Pagine interne e componenti condivisi (logistica, demo) ---------- */

.topbar-nav a[aria-current="page"] {
  color: var(--text);
}

.topbar-nav a[aria-current="page"]::after {
  transform: none;
}

.hero.page-hero {
  min-height: 88svh;
}

/* Pagina di solo testo (intelligenza artificiale e AI Act): apertura bassa, senza illustrazione. */
.hero.text-hero {
  min-height: 0;
  padding: clamp(120px, 14vw, 176px) 0 clamp(64px, 8vw, 104px);
}

.rules {
  max-width: 860px;
}

/* Testo lungo di una pagina di solo testo (privacy): colonna leggibile, titoletti e paragrafi. */
.legal {
  max-width: 760px;
  margin-top: 32px;
}

.legal h3 {
  margin: 40px 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

.legal h3:first-child {
  margin-top: 0;
}

.legal p {
  font-size: 17px;
  line-height: 1.65;
}

.legal p + p {
  margin-top: 12px;
}

.legal + .points {
  margin-top: 20px;
}

.points + .legal {
  margin-top: 28px;
}

/* Indirizzi da copiare nel testo su fondo chiaro: il colore predefinito (chiaro) non si vedrebbe. */
.paper .legal .selectable {
  color: inherit;
  font-weight: 600;
}

.page-note {
  max-width: 680px;
  margin-top: 40px;
  color: var(--muted);
}

.page-note + .page-note {
  margin-top: 12px;
  font-size: 14px;
}

.page-note a {
  color: var(--text);
  text-decoration-color: rgba(196, 242, 58, 0.5);
  text-underline-offset: 3px;
}

.page-note a:hover {
  color: var(--lime);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.btn-outline {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--lime);
}

.points {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.points li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 17px;
}

.points li::before {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  background: var(--lime);
  clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%);
}

.cta .points li::before,
.paper .points li::before {
  background: var(--ink);
}

/* Indirizzo email in chiaro (non è un link), da selezionare e copiare. Selezione normale del testo:
   «user-select: all» sul telefono impediva di selezionarlo con la pressione lunga. */
.selectable,
.mail-address {
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}

/* Sul fondo lime la selezione lime non si vedrebbe. */
.cta ::selection,
.demo ::selection {
  background: var(--ink);
  color: var(--lime);
}

.cta .contact-card ::selection,
.demo .demo-request ::selection {
  background: var(--lime);
  color: var(--ink);
}

.selectable {
  color: var(--text);
}

.mail-label {
  margin-top: 28px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mail-address {
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.request-box .mail-address {
  color: var(--lime);
}

.mail-buttons {
  margin-top: 22px;
}

.cta p.mail-label {
  margin: 0;
  color: inherit;
  font-size: 11px;
  opacity: 0.7;
}

.cta p.mail-address {
  margin: 6px 0 24px;
  max-width: none;
  font-size: clamp(24px, 2.6vw, 34px);
}

.cta p.mail-plain {
  margin: 22px 0 0;
  font-size: 16px;
}

.cta-ink .selectable {
  color: var(--lime);
  font-weight: 600;
}

/* Immagine di un pixel che conta la visita (GET /gestionale/visita/{pagina}): caricata ma invisibile.
   Non display: none, che in alcuni browser non la scaricherebbe. */
.visit-pixel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Caso cliente: logo di Schiavetta Trasporti, discreto ---------- */
/* In grigio e attenuato sul fondo scuro; a colori al passaggio del mouse. */
.client-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 30px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .client-proof {
  animation: fade-up 1s 0.75s var(--ease) both;
}

.client-proof img {
  width: 200px;
  height: auto;
  filter: grayscale(1) brightness(1.75);
  opacity: 0.72;
  transition:
    filter 0.4s var(--ease),
    opacity 0.4s var(--ease);
}

.client-proof:hover img {
  filter: none;
  opacity: 1;
}

/* ---------- Modulo di contatto (home #contatti e pagina logistica #richiesta) ---------- */
/* Senza script: POST /gestionale/contatto, che riporta alla pagina con #richiesta-inviata; la
   conferma si mostra con :target e il modulo si nasconde. Sempre su un fondo scuro. */
.cta-inner:has(> .contact-card) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
}

.contact-card {
  align-self: start;
  padding: clamp(24px, 3vw, 40px);
  background: var(--ink);
  color: var(--text);
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
}

.contact-card h3 {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 640;
  letter-spacing: -0.04em;
}

.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.form-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-form .optional {
  color: #6c7262;
  letter-spacing: 0.04em;
  text-transform: none;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--ink-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: normal;
  text-transform: none;
}

.contact-form textarea {
  min-height: 112px;
  resize: vertical;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.cta .contact-card :focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
}

.cta .contact-card p,
.contact-form p {
  max-width: none;
  margin: 0;
}

.contact-form .form-privacy {
  color: #8a8f80;
  font-size: 13px;
  line-height: 1.5;
}

.contact-form .btn {
  justify-content: center;
}

/* Campo esca per i programmi automatici: fuori dallo schermo, mai visibile né raggiungibile. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-done {
  display: none;
  scroll-margin-top: 170px;
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid rgba(196, 242, 58, 0.4);
  border-radius: 14px;
  background: rgba(196, 242, 58, 0.08);
}

.form-done:target {
  display: block;
}

.cta .contact-card .form-done p {
  font-size: 15.5px;
}

.contact-card .form-done .form-done-title,
.request-box .form-done .form-done-title {
  margin: 0 0 6px;
  color: var(--lime);
  font-size: 19px;
  font-weight: 640;
}

.request-box .form-done p {
  margin: 0;
  color: var(--text);
}

/* Inviata: resta la conferma, il modulo sparisce (un secondo invio passerebbe dal limite). */
.contact-card:has(.form-done:target) .contact-form,
.request-box:has(.form-done:target) .contact-form {
  display: none;
}

@media (max-width: 980px) {
  .cta-inner:has(> .contact-card) {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .form-pair {
    grid-template-columns: 1fr;
  }
}

/* Anteprima del caso logistica in home */
.teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

.teaser h2 {
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.05em;
}

/* Scadenza di un documento: i passaggi partono da soli, alla persona resta la conferma. */
.chain-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--ink-3);
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.chain-steps {
  position: relative;
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

/* Linea tratteggiata che unisce i passaggi: si vede negli spazi tra le righe. */
.chain-steps::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 20px;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--lime) 0 6px, transparent 6px 12px);
  opacity: 0.6;
}

.chain-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink-2);
  font-size: 15px;
}

.chain-steps li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(196, 242, 58, 0.14);
}

.chain-steps li.now {
  border-color: transparent;
  background: var(--lime);
  color: var(--ink);
  font-weight: 620;
}

.chain-steps li.now::before {
  background: var(--ink);
  box-shadow: 0 0 0 4px rgba(14, 15, 12, 0.16);
}

.chain-steps li.now .tag {
  border-color: rgba(14, 15, 12, 0.4);
  color: var(--ink);
}

/* Prima e con il portale */
.compare {
  display: grid;
  gap: 14px;
}

.compare li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 24px 28px;
  border-radius: 18px;
  background: var(--card);
}

.compare-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compare-before {
  color: var(--ink-muted);
  font-size: 17px;
}

.compare-after {
  font-size: 18px;
  font-weight: 560;
  letter-spacing: -0.015em;
}

.compare-after .compare-label {
  color: var(--ink-text);
}

.compare-after .compare-label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--lime-deep);
}

.compare-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-size: 18px;
}

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

/* Domande frequenti: <details> nativo, senza script */
.faq {
  display: grid;
  gap: 12px;
  max-width: 880px;
}

.faq details {
  border-radius: 16px;
  background: var(--card);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  cursor: pointer;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
  transition: transform 0.35s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 720px;
  padding: 0 26px 24px;
  color: var(--ink-muted);
}

.faq details a {
  color: var(--ink-text);
  font-weight: 600;
  text-decoration-color: var(--lime-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.faq-section {
  padding-top: 0;
}

/* Demo: sezione lime nella pagina logistica (#demo) */
.demo {
  background: var(--lime);
  color: var(--ink);
}

.demo .eyebrow {
  color: var(--ink);
}

.demo .lead {
  color: #2f3a12;
}

.demo-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

.demo-head .section-head {
  margin-bottom: 0;
}

.demo-sub {
  margin: clamp(64px, 8vw, 104px) 0 24px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.demo .service {
  min-height: 260px;
  background: var(--ink);
  color: var(--text);
}

.demo .service:hover {
  background: var(--ink-3);
}

.demo .service-num {
  color: var(--lime);
}

.demo .service-icon {
  background: var(--lime);
  color: var(--ink);
}

.demo .service p {
  color: var(--muted);
}

.demo .service h3 {
  margin-top: 40px;
}

.demo-visual {
  position: relative;
  max-width: 520px;
  margin-inline: auto;
}

.demo-sticker {
  position: absolute;
  top: -16px;
  right: -10px;
  z-index: 1;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(6deg);
  box-shadow: 0 14px 30px -12px rgba(14, 15, 12, 0.6);
}

.demo-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  margin-top: 18px;
  padding: clamp(28px, 4vw, 52px);
  background: var(--ink);
  color: var(--text);
  clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 0 100%);
}

.demo-request h3 {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 640;
  letter-spacing: -0.04em;
}

.demo-steps {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.demo-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 16px;
}

.demo-steps .method-num {
  position: static;
  background: var(--lime);
  color: var(--ink);
}

.demo-steps h4 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.demo-steps p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 15.5px;
}

.request-box > p:not(.mail-note, .mail-label, .mail-address) {
  margin-top: 16px;
  color: var(--muted);
}

.request-box strong {
  color: var(--text);
}

.request-box .points {
  margin: 22px 0 32px;
}

.mail-note {
  margin-top: 16px;
  color: #6c7262;
  font-size: 13.5px;
}

.cta .actions {
  margin-top: 0;
}

/* Contatto finale scuro (pagina logistica: la sezione lime è già la demo) */
.cta.cta-ink {
  background: var(--ink);
  color: var(--text);
}

.cta-ink p {
  color: var(--muted);
}

.cta-ink .badge text {
  fill: var(--lime);
}

@media (max-width: 1100px) {
  .services.three,
  .auto-list.auto-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .teaser {
    grid-template-columns: 1fr;
  }

  .compare li {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .compare-arrow {
    width: 36px;
    height: 36px;
    transform: rotate(90deg);
  }

  .demo-head,
  .demo-request {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .services.three,
  .auto-list.auto-grid-3 {
    grid-template-columns: 1fr;
  }

  .services.three .service {
    min-height: 0;
  }

  .actions .btn {
    width: 100%;
    justify-content: center;
  }

  .demo-sticker {
    right: 0;
  }

  .demo .service {
    min-height: 0;
  }

  .faq summary {
    font-size: 17px;
  }
}

/* ---------- Animazioni a tempo ---------- */

@keyframes rise {
  from { transform: translateY(105%); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes drift {
  to { transform: translate(-6%, 8%) scale(1.12); }
}

@keyframes ping {
  from { opacity: 0.8; transform: scale(1); }
  to { opacity: 0; transform: scale(3.2); }
}

@keyframes halo {
  from { opacity: 0.55; transform: scale(1); }
  to { opacity: 0; transform: scale(4); }
}

@keyframes travel {
  to { stroke-dashoffset: 0; }
}

@keyframes bob {
  50% { translate: 0 -10px; }
}

@keyframes fill-x {
  from { transform: scaleX(0); }
}

@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes dash-x {
  to { background-position: 8px 0; }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Animazioni legate allo scorrimento ---------- */

@keyframes reveal {
  from { opacity: 0; transform: translateY(48px); filter: blur(6px); }
}

@keyframes topbar-in {
  from { background-color: rgba(14, 15, 12, 0); border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@keyframes grow-x {
  from { transform: scaleX(0); }
}

@keyframes grow-y {
  from { transform: scaleY(0); }
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(70px) rotateX(14deg) scale(0.94); }
}

@keyframes screen-out {
  to { opacity: 0.25; transform: translateY(-30px) scale(0.96); }
}

@keyframes drop {
  from { opacity: 0; transform: translateY(-90px); }
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(40px); }
}

@keyframes fan {
  from { transform: translate(0, 0) rotate(0deg); }
}

@keyframes draw {
  from { stroke-dashoffset: 100; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.85); }
}

@keyframes line-in {
  from { opacity: 0; transform: translateY(10px); }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress {
      position: fixed;
      inset: 0 0 auto;
      z-index: 60;
      display: block;
      height: 2px;
      background: var(--lime);
      transform-origin: left;
      animation: grow-x linear both;
      animation-timeline: scroll(root);
    }

    .topbar {
      animation: topbar-in linear both;
      animation-timeline: scroll(root);
      animation-range: 0 160px;
    }

    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 28%;
    }

    .services .service:nth-child(2),
    .security-list li:nth-child(2),
    .method li:nth-child(2),
    .rule-step:nth-child(2),
    .auto-list li:nth-child(2) {
      animation-range: entry 5% cover 31%;
    }

    .services .service:nth-child(3),
    .security-list li:nth-child(3),
    .method li:nth-child(3),
    .rule-step:nth-child(3),
    .auto-list li:nth-child(3) {
      animation-range: entry 10% cover 34%;
    }

    .services .service:nth-child(4),
    .security-list li:nth-child(4),
    .method li:nth-child(4),
    .auto-list li:nth-child(4) {
      animation-range: entry 15% cover 37%;
    }

    /* Rimorchio, preventivo, documenti…: ogni passo guida la sua schermata. */
    .step,
    .teaser {
      view-timeline: --step block;
    }

    .step-copy {
      animation: reveal linear both;
      animation-timeline: --step;
      animation-range: entry 0% entry 45%;
    }

    .step-visual > * {
      animation:
        screen-in linear both,
        screen-out linear forwards;
      animation-timeline: --step, --step;
      animation-range:
        entry 0% entry 70%,
        exit 20% exit 75%;
    }

    .quote-line b {
      animation: grow-x linear both;
      animation-timeline: --step;
      animation-range: entry 55% contain 10%;
    }

    .quote-rows div {
      animation: pop linear both;
      animation-timeline: --step;
      animation-range: entry 60% contain 12%;
    }

    .quote-rows div:nth-child(2) { animation-range: entry 65% contain 15%; }
    .quote-rows div:nth-child(3) { animation-range: entry 70% contain 18%; }
    .quote-rows div:nth-child(4) { animation-range: entry 75% contain 21%; }

    .quote-total {
      animation: pop linear both;
      animation-timeline: --step;
      animation-range: contain 12% contain 26%;
    }

    .bx {
      animation: drop linear both;
      animation-timeline: --step;
      animation-range: entry 60% contain 4%;
    }

    .bx-2 { animation-range: entry 64% contain 6%; }
    .bx-3 { animation-range: entry 68% contain 8%; }
    .bx-4 { animation-range: entry 72% contain 10%; }
    .bx-5 { animation-range: entry 76% contain 12%; }
    .bx-6 { animation-range: entry 80% contain 14%; }
    .bx-7 { animation-range: entry 84% contain 16%; }
    .bx-8 { animation-range: entry 88% contain 18%; }
    .bx-9 { animation-range: entry 92% contain 20%; }
    .bx-10 { animation-range: entry 96% contain 22%; }
    .bx-11 { animation-range: contain 2% contain 24%; }
    .bx-12 { animation-range: contain 6% contain 26%; }
    .bx-13 { animation-range: contain 10% contain 30%; }

    .meter-bar b,
    .stages-bar b {
      animation: grow-x linear both;
      animation-timeline: --step;
      animation-range: entry 70% contain 30%;
    }

    .carrier-list li {
      animation: slide-in linear both;
      animation-timeline: --step;
      animation-range: entry 60% contain 6%;
    }

    .carrier-list li:nth-child(2) { animation-range: entry 66% contain 10%; }
    .carrier-list li:nth-child(3) { animation-range: entry 72% contain 14%; }
    .carrier-list li:nth-child(4) { animation-range: entry 78% contain 18%; }

    /* Scadenza in home: un passaggio dopo l'altro, fino alla conferma. */
    .chain-steps li {
      animation: slide-in linear both;
      animation-timeline: --step;
      animation-range: entry 55% contain 4%;
    }

    .chain-steps li:nth-child(2) { animation-range: entry 62% contain 8%; }
    .chain-steps li:nth-child(3) { animation-range: entry 69% contain 12%; }
    .chain-steps li:nth-child(4) { animation-range: entry 76% contain 16%; }
    .chain-steps li:nth-child(5) { animation-range: entry 83% contain 20%; }

    .doc {
      animation: fan linear both;
      animation-timeline: --step;
      animation-range: entry 65% contain 25%;
    }

    .bars i {
      animation: grow-y linear both;
      animation-timeline: --step;
      animation-range: entry 60% contain 10%;
    }

    .bars i:nth-child(2) { animation-range: entry 63% contain 12%; }
    .bars i:nth-child(3) { animation-range: entry 66% contain 14%; }
    .bars i:nth-child(4) { animation-range: entry 69% contain 16%; }
    .bars i:nth-child(5) { animation-range: entry 72% contain 18%; }
    .bars i:nth-child(6) { animation-range: entry 75% contain 20%; }
    .bars i:nth-child(7) { animation-range: entry 78% contain 22%; }
    .bars i:nth-child(8) { animation-range: entry 81% contain 24%; }

    .spark path {
      animation: draw linear both;
      animation-timeline: --step;
      animation-range: entry 70% contain 30%;
    }

    /* Registro delle automazioni: una riga alla volta mentre scorre. */
    .term {
      view-timeline: --term block;
    }

    .term-lines li {
      animation: line-in linear both;
      animation-timeline: --term;
      animation-range: entry 40% entry 55%;
    }

    .term-lines li:nth-child(2) { animation-range: entry 55% entry 70%; }
    .term-lines li:nth-child(3) { animation-range: entry 70% entry 85%; }
    .term-lines li:nth-child(4) { animation-range: entry 85% entry 100%; }
    .term-lines li:nth-child(5) { animation-range: entry 100% cover 55%; }
    .term-lines li:nth-child(6) { animation-range: cover 55% cover 65%; }

    /* Metodo: la linea si riempie mentre la sezione scorre. */
    .method {
      view-timeline: --method block;
    }

    .method::after {
      animation: grow-x linear both;
      animation-timeline: --method;
      animation-range: entry 40% cover 60%;
    }
  }
}

/* ---------- Schermi stretti ---------- */

@media (max-width: 1100px) {
  .topbar-nav {
    gap: 22px;
  }

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

  .service {
    min-height: 300px;
  }
}

@media (max-width: 980px) {
  .topbar-nav {
    display: none;
  }

  .hero {
    padding-top: 120px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .hero-visual {
    width: min(560px, 100%);
    margin-inline: auto;
  }

  .float-a {
    left: 0;
  }

  .float-b {
    right: 0;
  }

  .scroll-cue {
    display: none;
  }

  .step {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: 0;
    padding-block: 56px;
  }

  .step-copy,
  .step-visual {
    position: static;
  }

  .step-copy {
    max-width: none;
  }

  .rule,
  .auto-grid,
  .security,
  .cta-inner {
    grid-template-columns: 1fr;
  }

  .rule-step:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -18px;
    left: 40px;
    width: 2px;
    height: 18px;
    background: linear-gradient(180deg, var(--ink) 50%, transparent 50%) 0 0 / 2px 8px;
    animation-name: dash-y;
  }

  .method {
    grid-template-columns: 1fr 1fr;
    row-gap: 72px;
  }

  .method::before,
  .method::after {
    display: none;
  }

  .method-num {
    top: -40px;
  }

  .badge {
    width: 180px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@keyframes dash-y {
  to { background-position: 0 8px; }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .topbar {
    height: 64px;
    padding-inline: 16px;
  }

  .topbar {
    gap: 12px;
  }

  .topbar-logo img {
    width: 128px;
  }

  .topbar .btn-small {
    padding: 9px 14px;
    font-size: 13px;
  }

  .topbar .btn-small .arrow {
    display: none;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .float {
    width: 176px;
    padding: 10px 12px;
  }

  .float-title {
    font-size: 14px;
  }

  .float-meta {
    font-size: 12px;
  }

  .float-b,
  .float-c {
    display: none;
  }

  .services,
  .security-list,
  .method {
    grid-template-columns: 1fr;
  }

  .service {
    min-height: 0;
  }

  .service h3 {
    margin-top: 28px;
  }

  .quote-total strong {
    font-size: 32px;
  }

  .carrier-list li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .carrier-list .score {
    display: none;
  }

  .docs {
    height: 330px;
    overflow-x: clip;
  }

  .doc {
    width: 58%;
  }

  .doc.d1 { transform: translate(-58%, -8%) rotate(-10deg); }
  .doc.d2 { transform: translate(-24%, -10%) rotate(-3deg); }
  .doc.d3 { transform: translate(10%, -5%) rotate(4deg); }
  .doc.d4 { transform: translate(36%, 4%) rotate(10deg); }

  /* Fasi della pratica: su schermi stretti solo l'etichetta della fase attuale. */
  .stages li {
    font-size: 0;
  }

  .stages li.now {
    font-size: 11px;
    white-space: nowrap;
  }

  .term {
    font-size: 12px;
  }

  .term-lines li {
    grid-template-columns: 44px minmax(0, 1fr) 14px;
    gap: 10px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* «Riduci movimento»: niente animazioni a tempo; quelle legate allo scroll sono già escluse. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
