/* ================================================
   HOME — animazione nell'hero, al posto dell'immagine (02/11/2026)
   ================================================
   Le regole .lp-demo sono copiate da prova-gratuita.html, che tiene i suoi
   stili dentro la pagina: una modifica al disegno va fatta in tutti e due i
   posti. Le regole di impaginazione dell'hero sono in fondo. */

/* ================================================
   INTERFACCIA IN MOVIMENTO (mockup myFlux)
   ================================================
   Tutte le misure sono in em e l'unità di base segue la larghezza del
   riquadro (container query): così il disegno scala intero, senza salti.
   Ogni passaggio cambia solo opacità, colore o trasformazioni: niente
   che sposti il resto della pagina (CLS zero). */
.lp-demo-wrap { container-type: inline-size; width: 100%; max-width: 560px; margin: 0 auto; }
.lp-demo {
  position: relative;
  font-size: 16px;
  font-size: 2.857cqw;            /* 16px quando il riquadro è largo 560px */
  height: 29.5em;
  color: #263b5e;
  -webkit-user-select: none; user-select: none;
}
.lp-demo b { font-weight: 700; }
.lp-demo small { display: block; }

.lp-demo__web, .lp-demo__card, .lp-demo__phone, .lp-demo__export {
  position: absolute;
  border-radius: 1.1em;
  background: #fff;
  box-shadow: 0 1.4em 3em rgba(60, 20, 120, .16), 0 .15em .4em rgba(60, 20, 120, .08);
}
.lp-demo__head {
  display: flex; align-items: center; justify-content: space-between; gap: .6em;
  margin-bottom: .55em;
  font-size: .95em; color: #1e1e2f;
}
.lp-demo__chip {
  padding: .2em .7em; border-radius: 1em;
  background: #f3e8ff; color: #6b1a9e;
  font-size: .7em; font-weight: 700;
}
.lp-demo__muted { color: #62667e; font-weight: 500; font-size: .78em; }
.lp-demo__tag {
  display: inline-block; padding: .25em .65em; border-radius: 1em;
  background: #fff4e0; color: #9a5b00;
  font-size: .64em; font-weight: 700; white-space: nowrap;
}
.lp-demo__tag--ok { background: #e3f6ea; color: #1d7a45; }

/* Pannello web: elenco Presenze */
.lp-demo__web { left: 0; top: 1.4em; width: 18em; padding: 1em 1.1em .7em; }
.lp-demo__rows li {
  display: flex; align-items: center; justify-content: space-between; gap: .5em;
  height: 2.35em; padding: 0 .55em; margin: 0 -.55em;
  border-radius: .6em;
  border-top: 1px solid #f0edf8;
  font-size: .82em;
  transition: background-color .5s ease;
}
.lp-demo__rows li:first-child { border-top: 0; }
.lp-demo__name { font-weight: 600; color: #1e1e2f; white-space: nowrap; }
.lp-demo__state { position: relative; display: inline-flex; align-items: center; gap: .45em; font-variant-numeric: tabular-nums; color: #5a5f75; font-weight: 600; }
.lp-dot { display: inline-block; width: .62em; height: .62em; border-radius: 50%; }
.lp-dot--on { background: #2fbf71; box-shadow: 0 0 0 .2em rgba(47, 191, 113, .18); }
.lp-dot--off { background: #ef4b5f; box-shadow: 0 0 0 .2em rgba(239, 75, 95, .16); }

/* Cartellino */
.lp-demo__card { left: 1.2em; top: 15.2em; width: 17em; padding: .95em 1.05em .6em; }
.lp-demo__days li {
  display: flex; align-items: center; justify-content: space-between; gap: .5em;
  height: 2.45em; padding: 0 .55em; margin: 0 -.55em;
  border-radius: .6em;
  border-top: 1px solid #f0edf8;
  font-size: .8em; font-weight: 600; color: #1e1e2f;
  font-variant-numeric: tabular-nums;
  transition: background-color .5s ease;
}
.lp-demo__days li:first-child { border-top: 0; }
.lp-demo__days li > span:first-child { color: #2563c9; }
.lp-arrow { font-style: normal; font-weight: 800; margin-right: .2em; }
.lp-arrow--in { color: #2fbf71; }
.lp-arrow--out { color: #ef4b5f; margin-left: .45em; }

/* "Prima" e "dopo" di uno stesso valore, sovrapposti nello stesso posto */
.lp-demo__state, .lp-demo__day--today { position: relative; }
.lp-demo__before, .lp-demo__after { display: inline-flex; align-items: center; gap: .45em; transition: opacity .35s ease; }
.lp-demo__before { position: absolute; right: 0; opacity: 0; }
.lp-demo__day--today .lp-demo__before { right: .55em; }

/* Telefono myFlux */
.lp-demo__phone {
  right: .3em; top: 0;
  width: 14.4em; height: 28.6em;
  padding: .55em;
  border-radius: 2.3em;
  background: #eef0fb;
  box-shadow: 0 1.8em 3.6em rgba(60, 20, 120, .22), inset 0 0 0 .12em #fff;
}
.lp-demo__screen {
  position: relative; height: 100%;
  overflow: hidden;
  border-radius: 1.8em;
  background: #f7f8fc;
}
.lp-demo__bar {
  display: flex; align-items: center; gap: .6em;
  height: 3.1em; padding: 0 1.1em;
  background: linear-gradient(90deg, #7450fe, #8b5cf6);
  color: #fff; font-weight: 700; font-size: .9em;
}
.lp-demo__menu { width: 1.05em; height: .75em; border-top: .14em solid #fff; border-bottom: .14em solid #fff; position: relative; }
.lp-demo__menu::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: .14em solid #fff; transform: translateY(-50%); }
.lp-demo__profile {
  display: flex; align-items: center; gap: .8em;
  padding: 1em 1em .4em;
  font-size: .82em; line-height: 1.3; color: #1e1e2f;
}
.lp-demo__profile small { margin-top: .2em; font-size: .78em; color: #5a5f75; }
.lp-demo__avatar {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 2.9em; height: 2.9em; border-radius: 50%;
  background: linear-gradient(135deg, #58b4f7, #5870f7);
  color: #fff; font-weight: 800; font-size: .95em;
}
.lp-demo__clock {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 8.6em; height: 8.6em; margin: .7em auto .6em;
  border-radius: 50%;
  border: .2em solid #b04ae0;
  background: #fff;
  text-align: center;
}
.lp-demo__clock small { font-size: .66em; color: #62667e; font-weight: 600; }
.lp-demo__clock b { font-size: 1.42em; letter-spacing: -.02em; color: #3a3f55; font-variant-numeric: tabular-nums; }
.lp-demo__where { text-align: center; font-size: .74em; color: #1e1e2f; }
.lp-demo__where small { margin-top: .15em; font-size: .86em; color: #5a5f75; }
.lp-demo__btns { position: absolute; left: 1em; right: 1em; bottom: 1.2em; height: 2.7em; }
.lp-demo__btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 1.4em;
  color: #fff; font-weight: 800; font-size: .8em; letter-spacing: .04em;
  transition: opacity .35s ease, transform .2s ease;
}
.lp-demo__btn--in { background: linear-gradient(90deg, #26b36a, #34c77e); box-shadow: 0 .6em 1.2em rgba(38, 179, 106, .35); opacity: 0; }
.lp-demo__btn--out { background: linear-gradient(90deg, #ef4b5f, #ff7a7a); box-shadow: 0 .6em 1.2em rgba(239, 75, 95, .3); }
.lp-demo__toast {
  position: absolute; left: .8em; right: .8em; top: 3.7em; z-index: 2;
  padding: .7em .8em; border-radius: .8em;
  background: #1e1e2f; color: #fff;
  font-size: .66em; font-weight: 700; text-align: center;
  opacity: 0; transform: translateY(-.6em);
  transition: opacity .35s ease, transform .35s ease;
}

/* File paghe pronto */
.lp-demo__export {
  left: 2.4em; bottom: .2em; z-index: 3;
  width: 17.4em; padding: .85em 1.1em;
  background: linear-gradient(110deg, #901ec1, #6b49ee);
  color: #fff;
  transition: opacity .45s ease, transform .45s ease;
}
.lp-demo__export b { display: block; font-size: .86em; }
.lp-demo__export b::before { content: "✓ "; }
.lp-demo__export small { margin-top: .25em; font-size: .64em; opacity: .9; }

/* Passaggi sotto il disegno */
.lp-demo__steps {
  list-style: none;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px;
  margin-top: 18px;
  font-size: .84rem; font-weight: 600; color: #62667e;
}
.lp-demo__steps li { display: inline-flex; align-items: center; gap: 7px; transition: color .3s ease; }
.lp-demo__steps span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #ece6fa; color: #6b1a9e; font-size: .76rem; font-weight: 800;
  transition: background-color .3s ease, color .3s ease;
}
.lp-demo__steps li.is-active { color: #263b5e; }
.lp-demo__steps li.is-active span { background: var(--brand-gradient); color: #fff; }

/* ---- Stati dell'animazione ----
   Senza JavaScript (o con animazioni ridotte) il disegno resta sul
   fotogramma finale: ESCI, Mario presente, cartellino aggiornato, file
   pronto. Con JavaScript la classe is-live riparte dal passo 0. */
.lp-demo.is-live[data-step="0"] .lp-demo__btn--in { opacity: 1; animation: lp-pulse 1.6s ease-out infinite; }
.lp-demo.is-live[data-step="0"] .lp-demo__btn--out { opacity: 0; }
.lp-demo.is-live[data-step="1"] .lp-demo__btn--out { animation: lp-tap .5s ease-out; }
.lp-demo.is-live[data-step="1"] .lp-demo__toast,
.lp-demo.is-live[data-step="2"] .lp-demo__toast { opacity: 1; transform: none; }

.lp-demo.is-live[data-step="0"] .lp-demo__row--mario .lp-demo__after,
.lp-demo.is-live[data-step="1"] .lp-demo__row--mario .lp-demo__after { opacity: 0; }
.lp-demo.is-live[data-step="0"] .lp-demo__row--mario .lp-demo__before,
.lp-demo.is-live[data-step="1"] .lp-demo__row--mario .lp-demo__before { opacity: 1; }
.lp-demo.is-live[data-step="2"] .lp-demo__row--mario { background: #f3edff; }

.lp-demo.is-live[data-step="0"] .lp-demo__day--today .lp-demo__after,
.lp-demo.is-live[data-step="1"] .lp-demo__day--today .lp-demo__after,
.lp-demo.is-live[data-step="2"] .lp-demo__day--today .lp-demo__after { opacity: 0; }
.lp-demo.is-live[data-step="0"] .lp-demo__day--today .lp-demo__before,
.lp-demo.is-live[data-step="1"] .lp-demo__day--today .lp-demo__before,
.lp-demo.is-live[data-step="2"] .lp-demo__day--today .lp-demo__before { opacity: 1; }
.lp-demo.is-live[data-step="3"] .lp-demo__day--today { background: #f3edff; }

.lp-demo.is-live:not([data-step="4"]) .lp-demo__export { opacity: 0; transform: translateY(.8em); }

@keyframes lp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(38, 179, 106, .55); }
  100% { box-shadow: 0 0 0 1em rgba(38, 179, 106, 0); }
}
@keyframes lp-tap {
  0% { transform: scale(.94); }
  100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-demo *, .lp-demo__steps * { transition: none !important; animation: none !important; }
}

/* Disegno stretto (smartphone): telefono a sinistra, pannelli a destra
   sovrapposti, una riga in meno nel cartellino. */
@container (max-width: 480px) {
  .lp-demo { font-size: 3.5cqw; height: 31.5em; }   /* 13px circa a 370px */
  .lp-demo__phone { left: 0; right: auto; }
  .lp-demo__web { left: auto; right: 0; top: 2.6em; width: 14.6em; padding: .85em .9em .55em; z-index: 2; }
  .lp-demo__web .lp-demo__rows li:last-child { display: none; }
  .lp-demo__card { left: auto; right: 0; top: 13.6em; width: 14.6em; padding: .8em .9em .5em; z-index: 2; }
  .lp-demo__card .lp-demo__day--note { display: none; }
  .lp-demo__export { left: auto; right: 0; bottom: 0; width: 16.5em; }
}

/* ---- Impaginazione dell'hero della home ----
   Il riquadro ha container-type: inline-size, quindi non ha larghezza propria:
   senza width: 100% sulla colonna si ridurrebbe a zero. */
@media (min-width: 1025px) {
  .hero__content { flex: 1 1 0; }
}

@media (max-width: 1024px) {
  .hero__visual { flex: none; width: 100%; }
}

/* Smartphone: disegno tra il sottotitolo e il modulo. display: contents porta
   i figli di .hero__content nello stesso flex di .hero__visual, cosi' order
   puo' intercalarli senza duplicare il disegno nell'HTML. */
@media (max-width: 640px) {
  .hero__inner { align-items: stretch; gap: 0; }
  .hero__content { display: contents; }
  .hero__visual { display: block; order: 1; margin: 8px 0 24px; }
  .hero__form { order: 2; }
  .hero__stores { order: 3; }
}
