/* Palette della landing (versione di prova).
   È la palette di marketing della landing principale (landing.css: --navy-deep, --blue, --sky...),
   più chiara e più satura di quella dell'app (DESIGN.md: blu #004aad, sfondo #f0f4fa).
   Ogni colore di questo file passa da qui: per cambiare un tono si cambia una riga.
   Gli stati (attesa, ritiro, consegna, consegnato) usano coppie sfondo/testo con contrasto >= 4,5:1. */
:root {
    --mx-white: #fff;
    --mx-navy: #000034;
    --mx-navy-2: #0a1550;        /* schede e cornici telefono su fondo scuro */
    --mx-navy-3: #16257a;        /* hover delle schede su fondo scuro */
    --mx-navy-end: #083a7d;
    --mx-blue: #1a6bff;
    --mx-blue-ink: #0a4fb3;      /* testo e link su azzurro chiaro */
    --mx-blue-soft: #dbe8ff;
    --mx-sky: #5dbde6;
    --mx-sky-soft: #b6e6fb;
    --mx-green: #5ac19e;
    --mx-paper: #f6f8fc;
    --mx-paper-2: #eaf0fa;
    --mx-paper-3: #eef2fa;       /* filetti tra le righe */
    --mx-wash: #f4f7ff;          /* hover righe */
    --mx-wash-2: #eef4ff;        /* riga selezionata, riquadri informativi */
    --mx-line: #dde4f0;
    --mx-line-strong: #b7c2d8;
    --mx-tab: #dde6f5;           /* schede non selezionate su fondo chiaro */
    --mx-tab-hover: #c9d8f0;
    --mx-track: #cdd8ec;         /* piste di barre e colli non ancora scansionati */
    --mx-ink-1: #2b3552;
    --mx-ink-2: #4b5670;
    --mx-ink-3: #6b7385;         /* segnaposto e note */
    --mx-wait-bg: #fff4e0;   --mx-wait-ink: #7a4600;
    --mx-ready-bg: #ffe9db;  --mx-ready-ink: #8f3a00;
    --mx-ok-bg: #d7f3e8;     --mx-ok-ink: #14633f;  --mx-ok-ink-deep: #0f4f32;  --mx-ok-wash: #e9f7f0;
    --mx-err-bg: #fff1f1;    --mx-err-ink: #8f1f1f;
    --mx-fresh: #fff6cf;         /* lampo sulla riga appena aggiunta */
    --mx-rail: rgba(26, 107, 255, 0.14);        /* binario dei passaggi */
    --mx-focus-ring: rgba(26, 107, 255, 0.18);  /* alone dei campi attivi */
    --mx-shadow: 0 24px 60px rgba(13, 21, 38, 0.14);
    --mx-r-xs: 4px;              /* etichette orario e colli */
    --mx-r-hair: 2px;            /* barre del menu mobile */
    --mx-r-phone: 34px;          /* cornice del telefono: segue la forma del dispositivo, non la scala dell'interfaccia */
    --mx-r-phone-sm: 26px;
}

/* Reset dei <button> delle sezioni interattive.
   Né la landing né Bootstrap tolgono bordo e aspetto di sistema ai pulsanti: senza questo reset
   interruttori e link-pulsante ("Ricomincia") compaiono con il bordo grigio del browser.
   Specificità (1,0,1): ogni regola di classe sotto (es. #live .lv-go, .lv-seg button) la supera. */
#live button, #features.ft button, #preview.pv button, #sectors.sc button {
    border: 0;
    border-radius: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
#live button:disabled, #features.ft button:disabled { cursor: not-allowed; }

/* Sezione "Dall'ordine alla firma" (versione di prova). Tutto è limitato a #how.flow:
   nessuno stile della landing principale viene toccato. */

#how.flow {
    --flow-ink-soft: var(--mx-ink-1);
    --flow-hl: var(--mx-sky-soft);
    --flow-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

#how.flow .flow-head { margin-bottom: clamp(48px, 6vw, 88px); }
#how.flow .flow-intro { max-width: 620px; font-size: 1.1875rem; line-height: 1.6; color: var(--flow-ink-soft); }

/* parole chiave: grassetto con evidenziazione che compare quando la sezione entra */
#how.flow strong { font-weight: 600; color: var(--dark-blue); text-decoration: underline; text-decoration-thickness: 0.34em; text-decoration-skip-ink: none; text-underline-offset: -0.2em; text-decoration-color: var(--flow-hl); transition: text-decoration-color 700ms ease 400ms; }
.flow-js #how.flow [data-flow-reveal]:not(.is-in) strong { text-decoration-color: transparent; }

/* passaggi: testo a sinistra, immagini sempre sulla stessa colonna a destra */
#how.flow .flow-steps { position: relative; display: grid; gap: clamp(64px, 8vw, 120px); padding-left: clamp(32px, 4.4vw, 64px); }
#how.flow .flow-steps::before, #how.flow .flow-steps::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; border-radius: 99px; }
/* binario: il gradiente è fissato sull'intera lunghezza e viene "scoperto" con lo scroll (--p, 0-1).
   All'ultimo passaggio (.is-done, messo da flow.js) i due colori scivolano dal celeste/blu al verde. */
@property --rail-a { syntax: '<color>'; inherits: false; initial-value: #5dbde6; }
@property --rail-b { syntax: '<color>'; inherits: false; initial-value: #1a6bff; }
#how.flow .flow-steps::before { background: var(--mx-rail); }
#how.flow .flow-steps::after {
    --rail-a: var(--mx-sky);
    --rail-b: var(--blue);
    background: linear-gradient(to bottom, var(--rail-a), var(--rail-b));
    clip-path: inset(0 0 calc((1 - var(--p, 0)) * 100%) 0 round 99px);
    transition: --rail-a 1200ms ease, --rail-b 1200ms ease;
}
#how.flow .flow-steps.is-done::after { --rail-a: #8bdcc0; --rail-b: #38a67f; }
#how.flow .flow-step { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
#how.flow .flow-text { grid-column: 1 / span 5; }
#how.flow .flow-text h3 { font-family: var(--font-2), sans-serif; font-weight: 700; font-size: clamp(1.5rem, 2.1vw, 1.875rem); line-height: 1.14; letter-spacing: -0.03em; margin-bottom: 18px; }
#how.flow .flow-text p { font-size: 1.1875rem; line-height: 1.6; color: var(--flow-ink-soft); max-width: 52ch; }
#how.flow .flow-ui { grid-column: 7 / -1; transition: transform 300ms var(--flow-ease); }
@media (hover: hover) { .flow-js #how.flow .flow-step:hover .flow-ui.is-in { transform: translateY(-6px); } }

/* contenitori delle immagini: tutti larghi quanto la colonna */
#how.flow .flow-video { border-radius: 14px; overflow: hidden; background: var(--mx-white); }
#how.flow .flow-video video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
#how.flow .flow-pic { display: flex; justify-content: center; align-items: flex-start; height: clamp(300px, 30vw, 440px); padding-top: 24px; border-radius: 14px; overflow: hidden; background: var(--navy-mid); }
#how.flow .flow-pic img { width: min(100%, 300px); height: auto; }

/* frammenti di prodotto */
#how.flow .frag { background: var(--mx-white); border: 1px solid var(--mx-line); border-radius: 14px; padding: 22px; color: var(--dark-blue); font-size: 0.9375rem; line-height: 1.45; }
#how.flow .frag-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-family: var(--font-2), sans-serif; font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.01em; }
#how.flow .frag-title small { font-family: var(--font-1), sans-serif; font-weight: 400; font-size: 0.9375rem; color: var(--mx-ink-2); }
#how.flow .f-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--mx-paper-3); }
#how.flow .f-row:first-of-type { border-top: 0; }
#how.flow .f-row b { font-weight: 600; }
#how.flow .f-row > span:not(.time):not(.chip) { color: var(--mx-ink-2); }
#how.flow .chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 0.9375rem; font-weight: 600; white-space: nowrap; }
#how.flow .chip-wait { background: var(--mx-wait-bg); color: var(--mx-wait-ink); }
#how.flow .chip-go { background: var(--mx-blue-soft); color: var(--mx-blue-ink); }
#how.flow .time { display: inline-block; padding: 2px 8px; border-radius: var(--mx-r-xs); background: var(--mx-navy); color: var(--mx-white); font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
#how.flow .time.is-on { background: var(--blue); }
#how.flow .f-code { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--dark-blue) !important; }
#how.flow .f-done { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; padding: 16px; border-radius: 10px; background: var(--mx-green); color: var(--dark-blue); font-weight: 600; font-size: 1.1875rem; }

/* entrata allo scroll: ogni passaggio appare con una dissolvenza non appena arriva in vista
   (titolo, testo e schermata a cascata). Con "riduci movimento" resta la sola dissolvenza, senza spostamenti. */
@media (prefers-reduced-motion: reduce) {
    .flow-js #how.flow [data-flow-reveal] { opacity: 0; transition: opacity 500ms ease; transition-delay: calc(var(--i, 0) * 100ms); }
    .flow-js #how.flow [data-flow-reveal].is-in { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
    .flow-js #how.flow [data-flow-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 900ms ease, transform 1000ms var(--flow-ease); transition-delay: calc(var(--i, 0) * 130ms); }
    .flow-js #how.flow [data-flow-reveal].is-in { opacity: 1; transform: none; }
    .flow-js #how.flow .f-in { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--flow-ease), transform 700ms var(--flow-ease); transition-delay: calc(var(--j, 0) * 90ms + 300ms); }
    .flow-js #how.flow .is-in .f-in { opacity: 1; transform: none; }
}

@media (max-width: 1024px) {
    #how.flow .flow-step { row-gap: 28px; }
    #how.flow .flow-text, #how.flow .flow-ui { grid-column: 1 / -1; }
    #how.flow .flow-pic { height: 340px; }
}
@media (max-width: 640px) {
    #how.flow .flow-steps { padding-left: 28px; }
    #how.flow .flow-text h3 { font-size: 1.5rem; }
}

/* ============================================================
   Sezione "Prova I-Hub dal vivo" (inserisci ordine + assegna spese).
   Tutto limitato a #live: nessuno stile della landing principale viene toccato.
   ============================================================ */
#live.live { background: var(--mx-navy); color: var(--mx-white); --lv-ease: cubic-bezier(0.22, 1, 0.36, 1); }
#live .live-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
#live .live-intro { grid-column: 1 / span 4; position: sticky; top: 110px; }
#live .section-label { color: var(--mx-sky); }
#live h2 { color: var(--mx-white); margin-bottom: 24px; }
#live .live-texts p { max-width: 44ch; font-size: 1.1875rem; line-height: 1.6; color: rgba(255,255,255,0.86); }
#live .live-texts p + p { margin-top: 18px; }
#live .live-texts p.live-hint { color: var(--mx-sky); font-weight: 500; }
#live .live-texts strong { font-weight: 600; color: var(--mx-white); text-decoration: underline; text-decoration-thickness: 0.34em; text-decoration-skip-ink: none; text-underline-offset: -0.2em; text-decoration-color: rgba(93,189,230,0.38); transition: text-decoration-color 700ms ease 400ms; }
.live-js #live .live-texts:not(.is-in) strong { text-decoration-color: transparent; }
#live .live-text[hidden] { display: none; }
#live .live-panel { grid-column: 5 / -1; min-width: 0; }

/* schede */
#live .live-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
#live .live-tabs button { min-height: 56px; padding: 0 26px; border-radius: 8px; background: var(--mx-navy-2); color: var(--mx-white); font-family: var(--font-2), sans-serif; font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.01em; transition: background-color 200ms ease, color 200ms ease, transform 140ms var(--lv-ease); }
#live .live-tabs button[aria-selected="true"] { background: var(--mx-paper); color: var(--dark-blue); }
#live .live-tabs button:active { transform: scale(0.98); }
@media (hover: hover) { #live .live-tabs button[aria-selected="false"]:hover { background: var(--mx-navy-3); } }
#live .live-tabs button:focus-visible { outline: 3px solid var(--mx-sky); outline-offset: 3px; }

/* frammento di prodotto */
#live .live-body { border-radius: 14px; overflow: hidden; background: var(--mx-paper-2); color: var(--dark-blue); font-size: 0.9375rem; line-height: 1.45; }
#live .lv { display: grid; grid-template-columns: 58fr 42fr; min-height: 600px; }
#live .lv[hidden] { display: none; }
#live .lv.is-open { animation: lv-in 480ms var(--lv-ease) both; }
@keyframes lv-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#live .lv-main { padding: 24px; background: var(--mx-paper-2); min-width: 0; }
#live .lv-side { padding: 24px; background: var(--mx-paper); min-width: 0; }
#live .lv-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
#live .lv-title strong { font-family: var(--font-2), sans-serif; font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.01em; color: var(--dark-blue); text-decoration: none; }
#live .lv-title span { color: var(--mx-ink-2); }

/* campi: annullano gli stili generali di label/input/select della pagina */
#live label, #live .lv-label { display: block; margin: 0; font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--dark-blue); }
#live input, #live select { width: 100%; min-height: 46px; padding: 0 12px; background: var(--mx-white); border: 1px solid var(--mx-line-strong); border-radius: 8px; font-family: var(--font-1), sans-serif; font-size: 0.9375rem; color: var(--dark-blue); box-shadow: none; outline: none; transition: border-color 160ms ease, box-shadow 160ms ease; }
#live input:focus, #live select:focus { background: var(--mx-white); border-color: var(--blue); box-shadow: 0 0 0 3px var(--mx-focus-ring); }
#live input[readonly] { background: var(--mx-paper); color: var(--mx-ink-2); }
#live input::placeholder { color: var(--mx-ink-3); }
#live input[type="checkbox"] { width: 18px; min-height: 0; height: 18px; padding: 0; accent-color: var(--blue); }
#live .lv-field { display: grid; gap: 6px; margin-bottom: 14px; }
#live .lv-seg { display: flex; flex-wrap: wrap; gap: 6px; }
#live .lv-seg button { min-height: 44px; padding: 0 16px; border-radius: 8px; background: var(--mx-white); border: 1px solid var(--mx-line-strong); color: var(--dark-blue); font-weight: 600; font-size: 0.9375rem; transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 140ms var(--lv-ease); }
#live .lv-seg button[aria-pressed="true"] { background: var(--mx-navy); border-color: var(--mx-navy); color: var(--mx-white); }
#live .lv-seg button:active { transform: scale(0.97); }
@media (hover: hover) { #live .lv-seg button[aria-pressed="false"]:hover { background: var(--mx-blue-soft); } }

/* azioni e messaggi */
#live .lv-go { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; margin-top: 16px; border-radius: 8px; background: var(--mx-navy); color: var(--mx-white); font-weight: 600; font-size: 1.0625rem; transition: background-color 160ms ease, transform 140ms var(--lv-ease), opacity 160ms ease; }
#live .lv-go:disabled { opacity: 0.45; cursor: not-allowed; }
#live .lv-go:active:not(:disabled) { transform: scale(0.98); }
@media (hover: hover) { #live .lv-go:hover:not(:disabled) { background: var(--blue); } }
#live .lv-info { max-width: none; margin: 14px 0 0; padding: 12px; border-radius: 8px; background: var(--mx-wash-2); color: var(--mx-blue-ink); font-size: 0.9375rem; line-height: 1.45; }
#live .lv-link, #live .lv-reset { display: flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--mx-blue-ink); font-size: 0.9375rem; font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; text-align: left; }
#live .lv-link[hidden], #live .lv-reset[hidden] { display: none; }
#live .lv-link { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; border-radius: 8px; background: var(--blue); color: var(--mx-white); text-decoration: none; }
#live .lv-link[hidden] { display: none; }

/* riepilogo e QR code */
#live .lv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--mx-line); }
#live .lv-sum .lv-row:first-child, #live .lv-codes .lv-codes-title + .lv-row { border-top: 0; }
#live .lv-row span { color: var(--mx-ink-2); }
#live .lv-row b { font-weight: 600; text-align: right; }
#live .lv-codes { margin-top: 18px; }
#live .lv-codes-title { font-size: 0.9375rem; font-weight: 600; margin-bottom: 4px; }
#live .lv-code { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--dark-blue) !important; white-space: nowrap; }
#live .lv-codes .lv-row { gap: 8px; }
#live .lv-codes .lv-chip { padding: 3px 8px; }
#live .lv-chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 0.9375rem; font-weight: 600; white-space: nowrap; }
#live .lv-wait { background: var(--mx-wait-bg); color: var(--mx-wait-ink); }
#live .lv-ok { background: var(--mx-ok-bg); color: var(--mx-ok-ink); }
#live .lv-assigned { background: var(--mx-blue-soft); color: var(--mx-blue-ink); }
#live .lv-row.is-new { animation: lv-pop 600ms var(--lv-ease) both; }
@keyframes lv-pop { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* assegna spese */
#live .lv-rows { background: var(--mx-white); border: 1px solid var(--mx-line); border-radius: 10px; overflow: hidden; }
#live .lv-order { display: grid; grid-template-columns: 22px 58px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 0; padding: 12px 14px; border-top: 1px solid var(--mx-paper-3); font-weight: 400; cursor: pointer; transition: background-color 160ms ease; }
#live .lv-order:first-child { border-top: 0; }
#live .lv-order[hidden] { display: none; }
#live .lv-order.is-sel { background: var(--mx-wash-2); }
#live .lv-order.is-fresh { animation: lv-fresh 2400ms ease both; }
@keyframes lv-fresh { 0%, 60% { background: var(--mx-fresh); } 100% { background: var(--mx-white); } }
@media (hover: hover) { #live .lv-order:hover { background: var(--mx-wash); } }
#live .lv-time { display: inline-block; padding: 2px 8px; border-radius: var(--mx-r-xs); background: var(--mx-navy); color: var(--mx-white); font-size: 0.9375rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
#live .lv-who b { display: block; font-weight: 600; color: var(--dark-blue); }
#live .lv-who span { display: block; color: var(--mx-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#live .lv-empty { max-width: none; padding: 28px 14px; color: var(--mx-ink-2); }
#live .lv-ctl { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
#live .lv-ctl select { width: auto; min-height: 44px; padding: 0 10px; }
#live .lv-switch { position: relative; flex: none; width: 46px; height: 44px; border-radius: 99px; background: none; }
#live .lv-switch::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 28px; border-radius: 99px; background: var(--mx-line-strong); transition: background-color 160ms ease; }
#live .lv-switch::after { content: ''; position: absolute; left: 3px; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: var(--mx-white); transition: transform 200ms var(--lv-ease); }
#live .lv-switch[aria-checked="true"]::before { background: var(--blue); }
#live .lv-switch[aria-checked="true"]::after { transform: translateX(18px); }


/* consegna dal telefono */
#live .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#live .lv-client { display: grid; gap: 2px; margin-bottom: 14px; padding: 14px; border-radius: 10px; background: var(--mx-white); border: 1px solid var(--mx-line); }
#live .lv-client b { font-weight: 600; font-size: 1.0625rem; }
#live .lv-client span { color: var(--mx-ink-2); }
#live .lv-scan { display: flex; gap: 8px; }
#live .lv-scan input { flex: 1; min-width: 0; }
#live .lv-scanbtn { flex: none; min-height: 46px; padding: 0 20px; border-radius: 8px; background: var(--mx-navy); color: var(--mx-white); font-weight: 600; transition: background-color 160ms ease, transform 140ms var(--lv-ease); }
#live .lv-scanbtn:active { transform: scale(0.97); }
@media (hover: hover) { #live .lv-scanbtn:hover { background: var(--blue); } }
#live .lv-hintline { max-width: none; margin: 8px 0 14px; color: var(--mx-ink-2); font-size: 0.9375rem; }
#live .lv-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
#live .lv-bar { flex: 1; height: 10px; border-radius: 99px; background: var(--mx-track); overflow: hidden; }
#live .lv-bar i { display: block; height: 100%; width: 100%; border-radius: 99px; background: var(--mx-green); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 400ms var(--lv-ease); }
#live .lv-progress span { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
#live .lv-subtitle { margin: 18px 0 8px; font-weight: 600; }
#live .lv-subtitle span { margin-left: 6px; color: var(--mx-ink-2); font-weight: 400; }
#live .lv-parcel { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--mx-paper-3); font-variant-numeric: tabular-nums; }
#live .lv-parcel:first-child { border-top: 0; }
#live .lv-parcel b { font-weight: 600; }
#live .lv-parcel span { color: var(--mx-ink-2); }
#live button.lv-parcel { width: 100%; border: 0; border-top: 1px solid var(--mx-paper-3); background: transparent; text-align: left; color: var(--dark-blue); font-size: 0.9375rem; transition: background-color 160ms ease; }
#live button.lv-parcel:first-child { border-top: 0; }
@media (hover: hover) { #live button.lv-parcel:hover { background: var(--mx-wash); } }
#live .lv-parcel.is-fresh { animation: lv-pop 500ms var(--lv-ease) both; }
#live .lv-parcel svg { width: 14px; height: 14px; margin-right: 6px; color: var(--mx-ok-ink); vertical-align: -2px; }
#live .lv-empty-row { padding: 14px; color: var(--mx-ink-2); }
#live .lv-plain { max-width: none; margin: 0 0 14px; color: var(--mx-ink-2); font-size: 0.9375rem; }
#live .lv-green { background: var(--mx-ok-ink); }
@media (hover: hover) { #live .lv-green:hover:not(:disabled) { background: var(--mx-ok-ink-deep); } }
#live .lv-upload { display: grid; gap: 2px; width: 100%; margin-bottom: 14px; padding: 16px; border: 2px dashed var(--mx-line-strong); border-radius: 10px; background: var(--mx-white); color: var(--dark-blue); text-align: center; font-weight: 600; transition: border-color 160ms ease, background-color 160ms ease; }
#live .lv-upload small { font-weight: 400; color: var(--mx-ink-3); }
#live .lv-upload.has-file { border-style: solid; border-color: var(--mx-ok-ink); background: var(--mx-ok-wash); }
@media (hover: hover) { #live .lv-upload:hover { border-color: var(--blue); } }
#live .lv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#live .lv-info.is-error { background: var(--mx-err-bg); color: var(--mx-err-ink); }
#live .lv-info.is-ok { background: var(--mx-ok-bg); color: var(--mx-ok-ink); }

/* entrata allo scroll */
@media (prefers-reduced-motion: no-preference) {
    .live-js #live [data-live-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--lv-ease), transform 900ms var(--lv-ease); transition-delay: calc(var(--i, 0) * 80ms); }
    .live-js #live [data-live-reveal].is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { #live .lv.is-open, #live .lv-row.is-new, #live .lv-order.is-fresh { animation: none; } }

@media (max-width: 1024px) {
    #live .live-intro { grid-column: 1 / -1; position: static; margin-bottom: 40px; }
    #live .live-panel { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    #live .lv { grid-template-columns: 1fr; min-height: 0; }
    #live .live-tabs button { flex: 1 1 auto; padding: 0 14px; font-size: 1.0625rem; }
    #live .lv-order { grid-template-columns: 22px 54px minmax(0, 1fr); }
    #live .lv-order .lv-chip { grid-column: 3; justify-self: end; }
}

/* ============================================================
   Sezione "Progettato per chi lavora davvero" (4 ruoli). Limitata a #preview.pv.
   ============================================================ */
#preview.pv { background: var(--mx-paper); color: var(--dark-blue); --pv-ease: cubic-bezier(0.22, 1, 0.36, 1); }
#preview.pv .pv-head { margin-bottom: 40px; }
#preview.pv .pv-intro { max-width: 620px; font-size: 1.1875rem; line-height: 1.6; color: var(--mx-ink-1); }
#preview.pv strong { font-weight: 600; color: var(--dark-blue); text-decoration: underline; text-decoration-thickness: 0.34em; text-decoration-skip-ink: none; text-underline-offset: -0.2em; text-decoration-color: var(--mx-sky-soft); transition: text-decoration-color 700ms ease 400ms; }
.pv-js #preview.pv [data-pv-reveal]:not(.is-in) strong { text-decoration-color: transparent; }

#preview.pv .pv-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
#preview.pv .pv-tabs button { min-height: 56px; padding: 0 26px; border-radius: 8px; background: var(--mx-tab); color: var(--dark-blue); font-family: var(--font-2), sans-serif; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; transition: background-color 200ms ease, color 200ms ease, transform 140ms var(--pv-ease); }
#preview.pv .pv-tabs button[aria-selected="true"] { background: var(--mx-navy); color: var(--mx-white); }
#preview.pv .pv-tabs button:active { transform: scale(0.98); }
@media (hover: hover) { #preview.pv .pv-tabs button[aria-selected="false"]:hover { background: var(--mx-tab-hover); } }
#preview.pv .pv-tabs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* pannello: testo a sinistra, schermata sempre a destra */
#preview.pv .pv-panel { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
#preview.pv .pv-panel[hidden] { display: none; }
#preview.pv .pv-panel.is-open { animation: pv-in 520ms var(--pv-ease) both; }
@keyframes pv-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#preview.pv .pv-text { grid-column: 1 / span 4; }
#preview.pv .pv-text h3 { font-family: var(--font-2), sans-serif; font-weight: 700; font-size: clamp(1.5rem, 2.1vw, 1.875rem); line-height: 1.14; letter-spacing: -0.03em; color: var(--dark-blue); margin-bottom: 18px; }
#preview.pv .pv-text p { font-size: 1.1875rem; line-height: 1.6; color: var(--mx-ink-1); max-width: 46ch; margin-bottom: 24px; }
#preview.pv .pv-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
#preview.pv .pv-list li { position: relative; padding-left: 26px; font-size: 1.0625rem; line-height: 1.5; color: var(--mx-ink-1); }
#preview.pv .pv-list li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 11px; height: 11px; border-radius: 50%; background: var(--blue); }
#preview.pv .pv-shot { grid-column: 5 / -1; margin: 0; border-radius: 14px; overflow: hidden; background: var(--mx-paper-2); box-shadow: var(--mx-shadow); }
#preview.pv .pv-shot img { display: block; width: 100%; height: auto; }
#preview.pv .pv-phones { grid-column: 5 / -1; display: flex; justify-content: center; gap: 28px; padding: 36px 24px 0; border-radius: 14px; background: var(--mx-tab); overflow: hidden; align-items: flex-start; box-shadow: var(--mx-shadow); }
#preview.pv .pv-phones figure { flex: 0 1 300px; margin: 0; border: 10px solid var(--mx-navy-2); border-bottom: 0; border-radius: var(--mx-r-phone) var(--mx-r-phone) 0 0; overflow: hidden; background: var(--mx-navy-2); }
#preview.pv .pv-phones img { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: no-preference) {
    .pv-js #preview.pv [data-pv-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--pv-ease), transform 900ms var(--pv-ease); transition-delay: calc(var(--i, 0) * 80ms); }
    .pv-js #preview.pv [data-pv-reveal].is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { #preview.pv .pv-panel.is-open { animation: none; } }

@media (max-width: 1024px) {
    #preview.pv .pv-panel { row-gap: 32px; }
    #preview.pv .pv-text, #preview.pv .pv-shot, #preview.pv .pv-phones { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    #preview.pv .pv-tabs button { flex: 1 1 auto; padding: 0 14px; font-size: 1.0625rem; }
    #preview.pv .pv-phones { gap: 14px; padding: 24px 16px 0; }
    #preview.pv .pv-phones figure { border-width: 7px; border-radius: var(--mx-r-phone-sm) var(--mx-r-phone-sm) 0 0; }
}

/* ============================================================
   Sezione "Tutto in un'unica piattaforma" (scheda spesa a sinistra, comandi a destra).
   Limitata a #features.ft. Il fondo della colonna sinistra cambia con lo stato della spesa.
   ============================================================ */
#features.ft { --ft-ease: cubic-bezier(0.22, 1, 0.36, 1); --ft-st: var(--mx-blue); padding: 0; background: var(--mx-paper-2); color: var(--dark-blue); }
#features.ft[data-state="prep"]      { --ft-st: var(--mx-blue); }
#features.ft[data-state="ritiro"]    { --ft-st: var(--mx-sky); }
#features.ft[data-state="consegna"]  { --ft-st: var(--mx-navy-end); }
#features.ft[data-state="consegnato"] { --ft-st: var(--mx-green); }
#features.ft .ft-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-right: 5%; }
#features.ft .ft-stage { grid-column: 1 / span 6; position: sticky; top: 0; height: 100svh; display: flex; align-items: center; justify-content: center; background: var(--ft-st); transition: background-color 700ms var(--ft-ease); }
#features.ft .ft-ticket { width: min(420px, 86%); padding: 26px; border-radius: 14px; background: var(--mx-paper); color: var(--dark-blue); font-size: 0.9375rem; line-height: 1.45; }
#features.ft .ft-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-family: var(--font-2), sans-serif; font-weight: 700; font-size: 1.1875rem; }
#features.ft .ft-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--mx-line); }
#features.ft .ft-row span { color: var(--mx-ink-2); }
#features.ft .ft-row b { font-weight: 600; text-align: right; color: var(--dark-blue); }
#features.ft .ft-val { display: inline-block; transition: transform 240ms var(--ft-ease), opacity 240ms ease; }
#features.ft .ft-val.is-swap { transform: translateY(-6px); opacity: 0; }
#features.ft .ft-chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-family: var(--font-1), sans-serif; font-size: 0.9375rem; font-weight: 600; white-space: nowrap; transition: background-color 300ms ease, color 300ms ease; }
#features.ft .ft-wait { background: var(--mx-wait-bg); color: var(--mx-wait-ink); }
#features.ft .ft-ready { background: var(--mx-ready-bg); color: var(--mx-ready-ink); }
#features.ft .ft-go { background: var(--mx-blue-soft); color: var(--mx-blue-ink); }
#features.ft .ft-ok { background: var(--mx-ok-bg); color: var(--mx-ok-ink); }
#features.ft .ft-parcels { display: inline-flex; gap: 6px; vertical-align: middle; }
#features.ft .ft-parcels i { width: 14px; height: 14px; border-radius: var(--mx-r-xs); background: var(--mx-track); transition: background-color 220ms ease, transform 220ms var(--ft-ease); }
#features.ft .ft-parcels i.is-on { background: var(--blue); transform: scale(1.12); }

#features.ft .ft-col { grid-column: 8 / span 5; padding-block: clamp(72px, 8vw, 120px); }
#features.ft .ft-col h2 { margin-bottom: 16px; }
#features.ft .ft-lead { max-width: 46ch; font-size: 1.1875rem; line-height: 1.6; color: var(--mx-ink-1); margin-bottom: clamp(24px, 3vw, 40px); }
#features.ft .ft-block { display: grid; gap: 14px; min-height: 36svh; align-content: center; padding-block: 18px; }
#features.ft .ft-block h3 { font-family: var(--font-2), sans-serif; font-weight: 700; font-size: clamp(1.5rem, 2.1vw, 1.875rem); line-height: 1.14; letter-spacing: -0.03em; }
#features.ft .ft-block p { max-width: 46ch; font-size: 1.1875rem; line-height: 1.6; color: var(--mx-ink-1); }
#features.ft strong { font-weight: 600; color: var(--dark-blue); text-decoration: underline; text-decoration-thickness: 0.34em; text-decoration-skip-ink: none; text-underline-offset: -0.2em; text-decoration-color: var(--mx-sky-soft); transition: text-decoration-color 700ms ease 400ms; }
.ft-js #features.ft [data-ft-reveal]:not(.is-in) strong { text-decoration-color: transparent; }

#features.ft .ft-seg { display: flex; flex-wrap: wrap; gap: 6px; }
#features.ft .ft-seg button { min-height: 52px; padding: 0 20px; border-radius: 8px; background: var(--mx-white); color: var(--dark-blue); font-weight: 600; font-size: 1.0625rem; transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ft-ease); }
#features.ft .ft-seg button[aria-pressed="true"] { background: var(--mx-navy); color: var(--mx-white); }
#features.ft .ft-seg button:active { transform: scale(0.97); }
@media (hover: hover) { #features.ft .ft-seg button[aria-pressed="false"]:hover { background: var(--mx-sky-soft); } }
#features.ft .ft-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 8px; background: var(--mx-navy); color: var(--mx-white); font-family: var(--font-2), sans-serif; font-weight: 700; font-size: 1.125rem; transition: transform 140ms var(--ft-ease), background-color 180ms ease, opacity 160ms ease; }
#features.ft .ft-btn:disabled { opacity: 0.45; cursor: not-allowed; }
#features.ft .ft-btn:active:not(:disabled) { transform: scale(0.97); }
@media (hover: hover) { #features.ft .ft-btn:hover:not(:disabled) { background: var(--blue); } }
#features.ft .ft-count { margin: 10px 0 0; font-size: 0.9375rem; color: var(--mx-ink-1); }
#features.ft .ft-ctl { display: flex; align-items: center; gap: 14px; font-size: 1.0625rem; }
#features.ft .ft-switch { position: relative; flex: none; width: 56px; height: 44px; border-radius: 99px; background: none; }
#features.ft .ft-switch::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 32px; border-radius: 99px; background: var(--mx-line-strong); transition: background-color 160ms ease; }
#features.ft .ft-switch::after { content: ''; position: absolute; left: 3px; top: 9px; width: 26px; height: 26px; border-radius: 50%; background: var(--mx-white); transition: transform 200ms var(--ft-ease); }
#features.ft .ft-switch[aria-checked="true"]::before { background: var(--blue); }
#features.ft .ft-switch[aria-checked="true"]::after { transform: translateX(24px); }
#features.ft :focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
#features.ft .ft-note { position: relative; display: none; margin: 12px 0 0; padding: 12px 14px 12px 38px; border-radius: 8px; background: var(--mx-white); color: var(--dark-blue); font-size: 0.9375rem; font-weight: 600; }
#features.ft .ft-note::before { content: ''; position: absolute; left: 14px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--ft-st); }

@media (prefers-reduced-motion: no-preference) {
    .ft-js #features.ft [data-ft-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ft-ease), transform 900ms var(--ft-ease); transition-delay: calc(var(--i, 0) * 80ms); }
    .ft-js #features.ft [data-ft-reveal].is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { #features.ft .ft-stage { transition: none; } }

@media (max-width: 1024px) {
    #features.ft .ft-grid { padding-right: 0; }
    #features.ft .ft-stage { grid-column: 1 / -1; position: static; height: auto; padding: 56px 5%; }
    #features.ft .ft-col { grid-column: 1 / -1; padding: 56px 5% 72px; }
    #features.ft .ft-block { min-height: 0; padding-block: 28px; }
    #features.ft .ft-note { display: block; }
}

/* ============================================================
   Sezione "Per chi è I-Hub" (schede dei settori, sfondo chiaro). Limitata a #sectors.sc.
   ============================================================ */
#sectors.sc { background: var(--mx-paper); color: var(--dark-blue); --sc-ease: cubic-bezier(0.22, 1, 0.36, 1); }
#sectors.sc .sc-head { margin-bottom: 48px; }
#sectors.sc .sc-intro { max-width: 620px; font-size: 1.1875rem; line-height: 1.6; color: var(--mx-ink-1); }
#sectors.sc strong { font-weight: 600; color: var(--dark-blue); text-decoration: underline; text-decoration-thickness: 0.34em; text-decoration-skip-ink: none; text-underline-offset: -0.2em; text-decoration-color: var(--mx-sky-soft); transition: text-decoration-color 700ms ease 400ms; }
.sc-js #sectors.sc [data-sc-reveal]:not(.is-in) strong { text-decoration-color: transparent; }
#sectors.sc .sc-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 32px; align-items: start; }
#sectors.sc .sc-tabs { grid-column: 1 / span 4; display: grid; gap: 8px; }
#sectors.sc .sc-tabs button { display: flex; align-items: center; min-height: 72px; padding: 0 24px; border-radius: 8px; background: var(--mx-tab); color: var(--dark-blue); font-family: var(--font-2), sans-serif; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; text-align: left; transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--sc-ease); }
#sectors.sc .sc-tabs button[aria-selected="true"] { background: var(--mx-navy); color: var(--mx-white); }
#sectors.sc .sc-tabs button:active { transform: scale(0.98); }
@media (hover: hover) { #sectors.sc .sc-tabs button[aria-selected="false"]:hover { background: var(--mx-tab-hover); } }
#sectors.sc .sc-tabs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
#sectors.sc .sc-bands { grid-column: 5 / -1; }
#sectors.sc .sc-band { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: clamp(28px, 3.4vw, 48px); border-radius: 14px; background: var(--mx-white); box-shadow: var(--mx-shadow); }
#sectors.sc .sc-band[hidden] { display: none; }
#sectors.sc .sc-band.is-open { animation: sc-in 520ms var(--sc-ease) both; }
@keyframes sc-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#sectors.sc .sc-band h3 { font-family: var(--font-2), sans-serif; font-weight: 700; font-size: clamp(1.5rem, 2.1vw, 1.875rem); line-height: 1.14; letter-spacing: -0.03em; margin-bottom: 16px; }
#sectors.sc .sc-band p { max-width: 46ch; font-size: 1.1875rem; line-height: 1.6; color: var(--mx-ink-1); }
#sectors.sc .sc-band ul { display: grid; gap: 14px; align-content: start; padding: 0; margin: 0; list-style: none; }
#sectors.sc .sc-band li { position: relative; padding-left: 28px; font-size: 1.0625rem; line-height: 1.5; color: var(--mx-ink-1); }
#sectors.sc .sc-band li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); }
@media (prefers-reduced-motion: no-preference) {
    .sc-js #sectors.sc [data-sc-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--sc-ease), transform 900ms var(--sc-ease); transition-delay: calc(var(--i, 0) * 80ms); }
    .sc-js #sectors.sc [data-sc-reveal].is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { #sectors.sc .sc-band.is-open { animation: none; } }
@media (max-width: 1024px) {
    #sectors.sc .sc-tabs { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #sectors.sc .sc-bands { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    #sectors.sc .sc-tabs { grid-template-columns: 1fr; }
    #sectors.sc .sc-band { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================================
   Barra superiore (telefono, email) e navbar con ancore per ogni sezione.
   ============================================================ */
:root { --topbar-h: 36px; }
html { scroll-padding-top: calc(var(--header-h) + var(--topbar-h) + 16px); }
.mix-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 101; height: var(--topbar-h); display: flex; align-items: center; justify-content: flex-end; gap: 28px; padding: 0 5%; background: var(--mx-navy-2); color: rgba(255,255,255,0.88); font-size: 0.875rem; }
.mix-topbar a { display: inline-flex; align-items: center; gap: 8px; height: var(--topbar-h); color: inherit; text-decoration: none; transition: color 0.2s; }
.mix-topbar a:hover { color: var(--mx-sky); }
.mix-topbar a:focus-visible { outline: 3px solid var(--mx-sky); outline-offset: 2px; }
nav { top: var(--topbar-h); }
#hero { padding-top: calc(var(--header-h) + var(--topbar-h) + 56px); }
#live .live-intro { top: calc(var(--header-h) + var(--topbar-h) + 40px); }
/* margin: 0 sul menu: Bootstrap dà alle liste 16px di margine sotto, che lo spostava ~8px sopra il pulsante "Richiedi demo" */
nav .nav-links { gap: 26px; margin: 0 0 0 auto; padding: 0; }
nav .nav-links a { transition: color 0.2s; }
nav .nav-links a[aria-current="true"] { color: var(--mx-white); text-decoration: underline; text-decoration-color: var(--mx-sky); text-decoration-thickness: 3px; text-underline-offset: 8px; }
nav .nav-actions { margin-left: 0; }
.nav-burger { display: none; width: 44px; height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid rgba(255,255,255,0.22); border-radius: 8px; background: transparent; cursor: pointer; }
.nav-burger span { display: block; width: 20px; height: 2px; border-radius: var(--mx-r-hair); background: var(--mx-white); transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 160ms ease; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-burger:focus-visible { outline: 3px solid var(--mx-sky); outline-offset: 2px; }
.nav-panel { position: fixed; z-index: 99; top: calc(var(--topbar-h) + var(--header-h)); left: 0; right: 0; display: grid; padding: 8px 5% 16px; background: var(--mx-navy); }
.nav-panel[hidden] { display: none; }
.nav-panel a { display: flex; align-items: center; min-height: 52px; color: var(--mx-white); font-size: 1.0625rem; font-weight: 500; text-decoration: none; }
.nav-panel a:focus-visible { outline: 3px solid var(--mx-sky); outline-offset: -3px; }

@media (max-width: 1180px) {
    nav .nav-links { display: none; }
    nav .nav-actions { margin-left: auto; }
    .nav-burger { display: inline-flex; }
}
@media (min-width: 1181px) { .nav-panel { display: none !important; } }
@media (pointer: coarse), (max-width: 640px) { :root { --topbar-h: 44px; } }
@media (max-width: 640px) {
    #hero { padding-top: calc(var(--header-h) + var(--topbar-h) + 28px); }
    .mix-topbar { justify-content: space-between; gap: 12px; font-size: 0.8125rem; }
}

/* aree di tocco da 44 px senza spostare il layout */
nav .nav-logo { min-height: 44px; }
.contact-detail a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-by a { display: inline-block; padding: 13px 2px; margin: -13px -2px; }

/* link "Vai al contenuto": appare solo con la tastiera */
.skip-link { position: fixed; z-index: 200; left: 16px; top: -80px; padding: 12px 20px; border-radius: 8px; background: var(--mx-sky); color: var(--mx-navy); font-weight: 700; text-decoration: none; transition: top 160ms ease; }
.skip-link:focus { top: 12px; outline: 3px solid var(--mx-white); outline-offset: 2px; }

#features .ft-sr { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
