/* THE AI LAB — la home visiva (cantiere home, 05/10/2026). Telefono prima di tutto (390 px), poi lo schermo largo.
   Otto sezioni, ognuna al massimo un'altezza di schermo sul telefono; ogni sezione ha un'immagine o un movimento.
   Sopra tokens.css e sito.css (stesso vestito: grafite, viola, ambra, vetro). Si animano SOLO transform, opacity (e il tratto degli SVG piccoli);
   prefers-reduced-motion: tutto fermo, le cose già finite. Nessuna libreria. docs/home.md. */

.home { overflow-x: clip; }
.h-solo-lettori { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- testata: trasparente sulla foto, di vetro dopo la prima schermata ---------------------------------- */
.home .testata { position: fixed; left: 0; right: 0; top: 0; background: linear-gradient(180deg, rgba(14, 11, 20, .8), rgba(14, 11, 20, 0)); background-origin: border-box; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background-color .3s ease, border-color .3s ease; }
.home .testata.scorsa { background: rgba(14, 11, 20, .88); border-bottom-color: rgba(42, 34, 56, .7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* --- sezioni -------------------------------------------------------------------------------------------- */
.h-sez, .h-apertura { scroll-margin-top: 4rem; }
.h-sez { position: relative; padding: clamp(2.4rem, 6svh, 3.4rem) 0; isolation: isolate; overflow-x: clip; }
.h-testa-sez { margin-bottom: 1.15rem; }
.h-testa-sez h2 { font-size: clamp(1.9rem, 8.4vw, 3.1rem); letter-spacing: -.045em; line-height: 1.03; margin: 0; text-wrap: balance; }
.h-testa-sez p { color: var(--testo-2); font-size: 1.1rem; margin: .65rem 0 0; max-width: 34rem; }
.h-testa-sez .etichetta { margin-bottom: .65rem; }
.h-azioni { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.25rem 0 0; }
.h-azioni .bottone { flex: 1 1 auto; }

/* la Testa di vetro: gli occhi si spostano (--ox, --oy li scrive sito-home.js) sopra il battito delle palpebre */
.h-testa .sguardo { transform: translate(var(--ox, 0px), var(--oy, 0px)); transition: transform .2s ease-out; }

/* --- 1. apertura ---------------------------------------------------------------------------------------- */
.h-apertura { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; padding: 6rem 0 5rem; background: var(--fondo); }
.h-apertura-foto, .h-apertura-foto img { position: absolute; inset: 0; width: 100%; height: 100%; }
.h-apertura-foto { z-index: -3; }
.h-apertura-foto img { object-fit: cover; object-position: 50% 30%; transform-origin: 60% 38%; animation: h-ken 28s ease-in-out infinite alternate; will-change: transform; }
@keyframes h-ken { from { transform: scale(1.02) translate3d(0, var(--h-py, 0px), 0); } to { transform: scale(1.12) translate3d(-1.5%, calc(var(--h-py, 0px) - 1%), 0); } }
.h-velo { position: absolute; inset: 0; z-index: -2; background:
  linear-gradient(180deg, rgba(14, 11, 20, .72) 0, rgba(14, 11, 20, .08) 22%, rgba(14, 11, 20, .22) 42%, rgba(14, 11, 20, .86) 72%, #0E0B14 100%),
  radial-gradient(90% 55% at 18% 0%, rgba(139, 92, 246, .32), transparent 70%); }
.h-luci { position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: screen; overflow: hidden; }
.h-luci i { position: absolute; border-radius: 50%; will-change: transform; }
.h-luci .l1 { width: 90vmax; height: 90vmax; left: -45vmax; top: -40vmax; background: radial-gradient(circle, rgba(139, 92, 246, .5), transparent 62%); animation: h-deriva 19s ease-in-out infinite alternate; }
.h-luci .l2 { width: 80vmax; height: 80vmax; right: -48vmax; bottom: -30vmax; background: radial-gradient(circle, rgba(245, 165, 36, .42), transparent 62%); animation: h-deriva 23s ease-in-out infinite alternate-reverse; }
@keyframes h-deriva { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(6vmax, 4vmax, 0) scale(1.18); } }
.h-apertura.fuori .h-apertura-foto img, .h-apertura.fuori .h-luci i, .h-apertura.fuori .h-mouse i { animation-play-state: paused; }
.h-apertura-corpo { position: relative; }
.h-testa-apertura { width: 60px; height: 60px; margin-bottom: .9rem; filter: drop-shadow(0 0 20px rgba(139, 92, 246, .6)); }
.h-ap-etichetta { margin-bottom: .7rem; text-shadow: 0 1px 12px rgba(14, 11, 20, .9); }
.h-apertura h1 { font-size: clamp(2.05rem, 8.9vw, 4.8rem); line-height: 1; letter-spacing: -.05em; margin: 0 0 1.4rem; text-shadow: 0 2px 24px rgba(14, 11, 20, .75); }
.h-riga { display: block; opacity: 0; transform: translateY(.45em); animation: h-sale .85s var(--curva) forwards; animation-delay: calc(.12s + var(--i) * .15s); }
.h-riga:last-child { background: linear-gradient(90deg, #F5A524, #FFD27A); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 14px rgba(14, 11, 20, .6)); }
/* tedesco: le frasi sono più lunghe, il titolo un filo più piccolo */
:lang(de) .h-apertura h1 { font-size: clamp(1.8rem, 7.6vw, 4.2rem); }
@keyframes h-sale { to { opacity: 1; transform: none; } }
.h-apertura .h-azioni { margin: 0 0 1.05rem; }
.h-btn-audit { flex: 1.7 1 12rem !important; box-shadow: 0 0 28px rgba(245, 165, 36, .35); }
.h-btn-vetro { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.h-dove { display: flex; align-items: center; gap: .5rem; color: var(--testo-2); font-size: .92rem; margin: 0; text-shadow: 0 1px 10px rgba(14, 11, 20, .9); }
.h-dove svg { width: 1.05rem; height: 1.05rem; flex: none; color: var(--ambra); }
.h-scorri { position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .35rem .8rem; color: var(--grigio); font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; }
.h-scorri:hover { text-decoration: none; color: #fff; }
.h-mouse { position: relative; width: 18px; height: 28px; border: 1.6px solid rgba(255, 255, 255, .55); border-radius: 10px; }
.h-mouse i { position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--ambra); animation: h-rotella 1.9s ease-in-out infinite; }
@keyframes h-rotella { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

/* --- 2. come funziona ----------------------------------------------------------------------------------- */
.h-passi-sez { background: linear-gradient(180deg, #0E0B14, #130e22 50%, #0E0B14); }
.h-trama { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(139, 92, 246, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(139, 92, 246, .08) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(75% 65% at 50% 45%, #000, transparent 100%); mask-image: radial-gradient(75% 65% at 50% 45%, #000, transparent 100%); }
.h-passi { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; position: relative; }
.h-passi::before, .h-passi::after { content: ""; position: absolute; left: 49px; top: 40px; bottom: 40px; width: 2px; border-radius: 2px; }
.h-passi::before { background: linear-gradient(180deg, rgba(139, 92, 246, .8), rgba(245, 165, 36, .8)); opacity: .3; }
.h-passi::after { background: linear-gradient(180deg, transparent, #F5A524 60%, #fff); transform-origin: top; transform: scaleY(0); animation: h-traccia 3.8s var(--curva) infinite; filter: drop-shadow(0 0 6px rgba(245, 165, 36, .8)); }
@keyframes h-traccia { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.h-passo { position: relative; z-index: 1; display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: center; padding: .75rem 1rem .75rem .8rem; border-radius: 22px; background: linear-gradient(160deg, rgba(139, 92, 246, .16), rgba(27, 22, 38, .78) 62%); border: 1px solid rgba(139, 92, 246, .3); box-shadow: var(--ombra-profonda); }
.h-passo-ico { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: #130e22; border: 1px solid rgba(139, 92, 246, .4); box-shadow: inset 0 0 24px rgba(139, 92, 246, .28), 0 0 22px rgba(139, 92, 246, .22); }
.h-ico { width: 44px; height: 44px; overflow: visible; }
.h-passo-testo { position: relative; min-width: 0; }
.h-passo-n { position: absolute; right: -.1rem; top: -.45rem; font-size: 2.6rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: rgba(245, 165, 36, .16); }
.h-passo h3 { font-size: 1.3rem; margin: 0 0 .2rem; }
.h-passo p { margin: 0; color: var(--testo-2); font-size: 1rem; line-height: 1.4; }

/* icone animate (ferme finché la carta non è in vista) */
.rivela:not(.visibile) .h-ico *, .rivela:not(.visibile) .h-arte * { animation-play-state: paused; }
.h-ico .b { transform-box: fill-box; transform-origin: center bottom; animation: h-eq 1.25s ease-in-out infinite; animation-delay: calc(var(--k) * -.17s); }
@keyframes h-eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.h-ico-piano .b { animation: h-cresce 3s var(--curva) infinite; animation-delay: calc(var(--k) * .18s); }
@keyframes h-cresce { 0% { transform: scaleY(0); } 34%, 84% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.h-ico-piano .spunta { stroke-dasharray: 22; stroke-dashoffset: 22; animation: h-spunta 3s ease infinite .7s; }
@keyframes h-spunta { 0% { stroke-dashoffset: 22; } 30%, 84% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 22; } }
.h-ico-capisce .centro, .h-ico-capisce .nodo, .h-ico-consulting .stella { transform-box: fill-box; transform-origin: center; animation: h-batte 2.2s ease-in-out infinite; }
.h-ico-capisce .n2 { animation-delay: .35s; } .h-ico-capisce .n3 { animation-delay: .7s; } .h-ico-capisce .n4 { animation-delay: 1.05s; }
@keyframes h-batte { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.22); } }
.h-ico-capisce .onda-nodo { transform-box: fill-box; transform-origin: center; animation: h-onda 2.4s ease-out infinite; }
@keyframes h-onda { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2); opacity: 0; } }
.h-ico-consulting .rotta { animation: h-flusso 1.5s linear infinite; }
@keyframes h-flusso { to { stroke-dashoffset: -14; } }
.h-ico-automation .giro { transform-box: fill-box; transform-origin: center; animation: h-gira 9s linear infinite; }
@keyframes h-gira { to { transform: rotate(360deg); } }
.h-ico-agents .punto { transform-box: fill-box; transform-origin: center; animation: h-digita 1.5s ease-in-out infinite; animation-delay: calc(var(--k) * .2s); }
@keyframes h-digita { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
.h-ico-software .cursore, .h-arte-crypto .cursore { animation: h-lampeggia 1.1s steps(2, start) infinite; }
@keyframes h-lampeggia { 50% { opacity: 0; } }

/* --- 3. la Macchina ------------------------------------------------------------------------------------- */
.h-macchina { background: radial-gradient(90% 46% at 50% 34%, rgba(139, 92, 246, .2), transparent 72%); }
.h-macchina-griglia { display: grid; gap: 0; }
.h-palco { position: relative; margin: 2.3rem 0 0; padding: 0 0 2.6rem; }
.h-palco-luce { position: absolute; left: -12%; right: -12%; top: 0; bottom: 0; background: radial-gradient(50% 50% at 50% 48%, rgba(139, 92, 246, .42), transparent 70%); pointer-events: none; z-index: -1; }
.h-monitor { position: relative; z-index: 1; margin: 0; display: flex; flex-direction: column; align-items: center; }
.h-monitor-cornice { width: 100%; padding: 3% 3% 4.4%; border-radius: clamp(10px, 3vw, 18px); background: linear-gradient(145deg, #2c2541, #17122a 55%, #0f0b1c); border: 1px solid rgba(183, 155, 255, .3); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 30px 60px -22px rgba(0, 0, 0, .85), 0 0 70px -10px rgba(139, 92, 246, .5); }
.h-schermo { position: relative; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: #0E0B14; }
.h-scena { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.05); transition: opacity .9s ease, transform 6s ease-out; }
.h-scena.attiva { opacity: 1; transform: scale(1); }
.h-riflesso { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, .1), transparent 36%, transparent 72%, rgba(255, 255, 255, .04)); }
.h-monitor-collo { width: 15%; height: clamp(14px, 4.6vw, 34px); background: linear-gradient(90deg, #1a1430, #2c2541 50%, #1a1430); clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); }
.h-monitor-base { width: 34%; height: 8px; border-radius: 50% / 100%; background: linear-gradient(180deg, #2c2541, #120d1f); box-shadow: 0 14px 26px rgba(0, 0, 0, .65), 0 0 44px rgba(139, 92, 246, .35); }
.h-vetrina-mon { position: absolute; right: -2%; bottom: 0; z-index: 2; width: 27%; margin: 0; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.h-vetrina-cornice { padding: 5% 5% 6%; border-radius: 12px; background: linear-gradient(145deg, #2c2541, #120d1f); border: 1px solid rgba(183, 155, 255, .34); box-shadow: 0 22px 40px -10px rgba(0, 0, 0, .85), 0 0 44px -6px rgba(245, 165, 36, .38); }
.h-vetrina-cornice img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 5px; }
.h-vetrina-mon figcaption { display: flex; justify-content: flex-end; white-space: nowrap; margin-top: .45rem; font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ambra); }
.h-testa-palco { position: absolute; z-index: 0; left: 7%; top: -34px; width: 62px; height: 62px; filter: drop-shadow(0 0 16px rgba(139, 92, 246, .6)); }
.h-m-comandi { margin-top: .6rem; }
.h-chip-riga { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.h-chip { position: relative; overflow: hidden; min-height: 3rem; padding: .55rem .35rem .7rem; border-radius: 14px; border: 1px solid rgba(139, 92, 246, .32); background: rgba(27, 22, 38, .65); color: var(--testo-2); font: inherit; font-weight: 800; font-size: .92rem; cursor: pointer; transition: color .25s, border-color .25s, background-color .25s; }
.h-chip.attivo { color: #fff; border-color: rgba(245, 165, 36, .65); background: rgba(245, 165, 36, .1); }
.h-chip i { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--viola), var(--ambra)); transform: scaleX(0); transform-origin: left; }
.h-chip.attivo i { animation: h-progresso var(--durata, 4.2s) linear forwards; }
.h-chip-riga.ferma .h-chip.attivo i { animation: none; transform: scaleX(1); }
@keyframes h-progresso { to { transform: scaleX(1); } }
.h-didascalia { min-height: 1.55em; margin: .9rem 0 0; text-align: center; color: #fff; font-size: 1.08rem; font-weight: 600; }
.h-m-comandi .h-azioni { margin-top: .95rem; }
.h-m-comandi .h-azioni .bottone { font-size: .98rem; padding: .65rem 1rem; min-height: 3rem; }
.h-m-comandi .h-azioni .bottone.ambra { flex: 1.5 1 11rem; }

/* --- 4. il negozio -------------------------------------------------------------------------------------- */
.h-negozio { padding-bottom: 2.6rem; }
.h-striscia-quadro { position: relative; }
.h-striscia { list-style: none; margin: 0; padding: .3rem 16px .9rem; display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; cursor: grab; outline-offset: -2px; }
.h-striscia::-webkit-scrollbar { display: none; }
.h-striscia::after { content: ""; flex: 0 0 4px; }
.h-striscia.trascina { cursor: grabbing; scroll-snap-type: none; }
.h-foto { flex: 0 0 auto; position: relative; margin: 0; height: min(50svh, 420px); aspect-ratio: var(--r); max-width: calc(100vw - 2.4rem); border-radius: 22px; overflow: hidden; scroll-snap-align: start; border: 1px solid rgba(139, 92, 246, .32); box-shadow: var(--ombra-profonda); background: var(--pannello); user-select: none; -webkit-user-select: none; }
.h-foto picture, .h-foto img { display: block; width: 100%; height: 100%; }
.h-foto img { object-fit: cover; transition: transform 1.2s var(--curva); pointer-events: none; }
.h-foto:hover img { transform: scale(1.04); }
.h-foto span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.6rem 1rem .85rem; font-weight: 800; font-size: .98rem; background: linear-gradient(180deg, transparent, rgba(14, 11, 20, .88)); }
.h-striscia-pie { display: flex; justify-content: space-between; align-items: center; min-height: 1.4rem; }
.h-punti { display: inline-flex; gap: .4rem; }
.h-punti i { width: .5rem; height: .5rem; border-radius: 99px; background: rgba(255, 255, 255, .22); transition: width .3s var(--curva), background-color .3s; }
.h-punti i.attivo { width: 1.5rem; background: var(--ambra); }
.h-striscia.accenno .h-foto { animation: h-accenno 1.3s var(--curva) .4s both; }
@keyframes h-accenno { 0%, 100% { transform: translateX(0); } 38% { transform: translateX(-38px); } }
.h-frecce { display: none; gap: .5rem; }
.h-frecce button { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid rgba(139, 92, 246, .4); background: rgba(27, 22, 38, .75); color: #fff; cursor: pointer; display: grid; place-items: center; }
.h-frecce button:hover { border-color: var(--ambra); }
.h-frecce svg { width: 18px; height: 18px; }

/* --- 5. cosa facciamo ----------------------------------------------------------------------------------- */
.h-tessere { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.h-tessere > li { display: flex; }
.h-tessera { position: relative; display: flex; flex-direction: column; gap: .35rem; width: 100%; padding: 1rem .95rem 2.7rem; border-radius: 22px; color: var(--testo); text-decoration: none; overflow: hidden; background: linear-gradient(165deg, rgba(139, 92, 246, .18), rgba(27, 22, 38, .75) 62%); border: 1px solid rgba(139, 92, 246, .32); transition: transform .25s var(--curva), border-color .25s; }
.h-tessera:hover { text-decoration: none; transform: translateY(-3px); border-color: rgba(245, 165, 36, .6); }
.h-tessera::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(200px circle at var(--mx, 85%) var(--my, 0%), rgba(245, 165, 36, .22), transparent 70%); opacity: 0; transition: opacity .3s; }
.h-tessera:hover::before, .h-tessera:focus-visible::before { opacity: 1; }
.h-tess-ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: #130e22; border: 1px solid rgba(139, 92, 246, .38); margin-bottom: .45rem; box-shadow: inset 0 0 16px rgba(139, 92, 246, .25); }
.h-tess-ico .h-ico { width: 30px; height: 30px; }
.h-tessera h3 { font-size: 1.08rem; margin: 0; }
.h-tessera p { margin: 0; color: var(--testo-2); font-size: .92rem; line-height: 1.4; }
.h-freccia { position: absolute; right: .9rem; bottom: .85rem; width: 22px; height: 22px; color: var(--ambra); transition: transform .25s var(--curva); }
.h-tessera:hover .h-freccia { transform: translateX(5px); }

/* --- 6. numeri ------------------------------------------------------------------------------------------ */
.h-numeri-sez { background: radial-gradient(80% 50% at 80% 40%, rgba(245, 165, 36, .08), transparent 70%); }
.h-numeri { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.h-numero { position: relative; display: grid; grid-template-columns: minmax(6.2rem, auto) 1fr; gap: .4rem 1.1rem; align-items: center; padding: .8rem 1.1rem 1.2rem; border-radius: 22px; overflow: hidden; background: linear-gradient(150deg, rgba(245, 165, 36, .1), rgba(27, 22, 38, .75) 56%); border: 1px solid rgba(245, 165, 36, .26); }
.h-num-val { display: flex; align-items: baseline; gap: .25rem; font-variant-numeric: tabular-nums; }
.h-num-val b { font-size: 3.4rem; font-weight: 800; letter-spacing: -.055em; line-height: 1; background: linear-gradient(180deg, #fff 20%, #FFD27A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-num-val i { font-style: normal; font-size: 1.35rem; font-weight: 800; color: var(--ambra); }
.h-num-testo p { margin: 0 0 .4rem; font-size: 1.02rem; line-height: 1.3; }
.h-stima { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: var(--ambra); border: 1px dashed rgba(245, 165, 36, .6); border-radius: 999px; padding: .12rem .6rem; }
.h-num-barra { position: absolute; left: 1.1rem; right: 1.1rem; bottom: .55rem; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.h-num-barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--viola), var(--ambra)); transform: scaleX(0); transform-origin: left; transition: transform 1.5s var(--curva) .2s; }
.h-numero.visibile .h-num-barra i { transform: scaleX(var(--v)); }
.h-nota { color: var(--grigio); font-size: .92rem; margin: 1rem 0 0; text-align: center; }

/* --- 7. Araldo e Crypto ATM ----------------------------------------------------------------------------- */
.h-altri-sez { padding-top: 1rem; }
.h-altri { display: grid; gap: .9rem; }
.h-altro { display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; color: var(--testo); text-decoration: none; background: linear-gradient(165deg, rgba(27, 22, 38, .92), rgba(14, 11, 20, .92)); border: 1px solid rgba(139, 92, 246, .32); transition: transform .25s var(--curva), border-color .25s; }
.h-altro:hover { text-decoration: none; transform: translateY(-3px); border-color: rgba(245, 165, 36, .6); }
.h-altro-arte { padding: .5rem 0 0; background: radial-gradient(70% 90% at 50% 45%, rgba(139, 92, 246, .24), transparent 75%); }
.h-arte { display: block; width: 100%; height: min(40vw, 176px); }
.h-altro-testo { padding: .3rem 1.15rem 1.15rem; }
.h-altro-testo h3 { font-size: 1.45rem; margin: 0 0 .25rem; }
.h-altro-testo p { margin: 0 0 .7rem; color: var(--testo-2); }
.h-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; color: var(--ambra); }
.h-link svg { width: 18px; height: 18px; transition: transform .25s var(--curva); }
.h-altro:hover .h-link svg { transform: translateX(5px); }
.h-arte-araldo .post { transform-box: fill-box; animation: h-post 7.5s ease-in-out infinite; animation-delay: calc(var(--k) * 1.6s); }
@keyframes h-post { 0% { opacity: 0; transform: translateY(12px); } 9%, 50% { opacity: 1; transform: none; } 64%, 100% { opacity: 0; transform: translateX(48px); } }
.h-arte-araldo .approva { transform-box: fill-box; transform-origin: center; animation: h-premi 3.2s ease-in-out infinite; }
@keyframes h-premi { 0%, 55%, 100% { transform: scale(1); } 68% { transform: scale(.93); } 80% { transform: scale(1.05); } }
.h-arte-araldo .chip { animation: h-fluttua 4.6s ease-in-out infinite; }
.h-arte-araldo .chip-b { animation-delay: -2.2s; }
@keyframes h-fluttua { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.h-arte-araldo .barra { transform-box: fill-box; transform-origin: center bottom; animation: h-cresce 3.2s var(--curva) infinite; animation-delay: calc(var(--k) * .2s); }
.h-arte-crypto .moneta { transform-box: fill-box; transform-origin: center; animation: h-moneta 3.6s ease-in-out infinite; }
@keyframes h-moneta { 0%, 100% { transform: scaleX(1) translateY(0); } 25% { transform: scaleX(.2) translateY(-7px); } 50% { transform: scaleX(1) translateY(-10px); } 75% { transform: scaleX(.2) translateY(-4px); } }
.h-arte-crypto .fessura { animation: h-respira 2.2s ease-in-out infinite; }
@keyframes h-respira { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.h-arte-crypto .s { transform-box: fill-box; transform-origin: center; animation: h-scintilla 2.6s ease-in-out infinite; }
.h-arte-crypto .s2 { animation-delay: .8s; } .h-arte-crypto .s3 { animation-delay: 1.6s; }
@keyframes h-scintilla { 0%, 100% { transform: scale(.3); opacity: 0; } 50% { transform: scale(1); opacity: 1; } }

/* --- 8. chiusura ---------------------------------------------------------------------------------------- */
.h-chiusura { overflow: hidden; padding-bottom: 2.4rem; background: var(--fondo); }
.h-chiusura-foto { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 36%; }
.h-velo-chiusura { z-index: -1; background: linear-gradient(180deg, #0E0B14 0, rgba(14, 11, 20, .6) 28%, rgba(14, 11, 20, .82) 62%, rgba(14, 11, 20, .97) 100%), radial-gradient(70% 40% at 80% 20%, rgba(139, 92, 246, .3), transparent 70%); }
.h-chiusura .h-testa-sez { margin-bottom: 1.1rem; }
.h-testa-chiusura { width: 58px; height: 58px; margin-bottom: .7rem; filter: drop-shadow(0 0 18px rgba(139, 92, 246, .6)); }
.h-negozio-carta { display: grid; border-radius: 24px; overflow: hidden; background: rgba(21, 17, 32, .84); border: 1px solid rgba(139, 92, 246, .38); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--ombra-profonda); }
.h-mappa-svg { display: block; width: 100%; height: auto; }
.h-info { padding: 1rem 1.15rem 1.15rem; }
.h-indirizzo { display: grid; gap: .1rem; margin: 0 0 .55rem; }
.h-indirizzo strong { font-size: 1.08rem; }
.h-indirizzo span { color: var(--grigio); font-size: .92rem; }
.h-orari { margin: 0 0 .55rem; color: var(--testo-2); }
.h-aperto { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-weight: 800; font-size: .92rem; }
.h-aperto[hidden] { display: none; }
.h-aperto i { width: .65rem; height: .65rem; border-radius: 50%; background: #34D399; animation: h-ping 2.2s ease-out infinite; }
.h-aperto.chiuso i { background: #F87171; animation: none; }
@keyframes h-ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .65); } 80%, 100% { box-shadow: 0 0 0 .6rem rgba(52, 211, 153, 0); } }
.h-chiusura .h-azioni .bottone { flex: 1 1 8rem; }
.h-btn-maps { flex: 1 1 100% !important; gap: .45rem; }
.h-btn-maps svg { width: 1.05rem; height: 1.05rem; color: var(--ambra); flex: none; }
.h-mappa-lago { font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; fill: #9a8fe0; }
.h-mappa-via { font-size: 8px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; fill: #9A94AB; }
.h-mappa-pin { font-size: 9px; font-weight: 800; fill: #fff; font-family: var(--carattere); }
.h-mappa-svg .pin .onda1, .h-mappa-svg .pin .onda2 { transform-box: fill-box; transform-origin: center; animation: h-onda 2.6s ease-out infinite; }
.h-mappa-svg .pin .onda2 { animation-delay: 1.3s; }
.h-mappa-svg .pin > path { transform-box: fill-box; transform-origin: center bottom; animation: h-salta 2.6s ease-in-out infinite; }
@keyframes h-salta { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.h-mappa-svg .onda-lago { animation: h-lago 9s ease-in-out infinite alternate; }
@keyframes h-lago { from { transform: translateX(-6px); } to { transform: translateX(8px); } }

/* --- la barra dei pollici -------------------------------------------------------------------------------- */
.h-barra { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 45; display: flex; gap: .5rem; padding: .42rem; border-radius: 999px; background: rgba(14, 11, 20, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(139, 92, 246, .38); box-shadow: 0 14px 40px rgba(0, 0, 0, .55), 0 0 26px rgba(139, 92, 246, .25); transform: translateY(170%); transition: transform .45s var(--curva); pointer-events: none; }
.h-barra.visibile { transform: none; pointer-events: auto; }
.h-barra .bottone { min-height: 2.85rem; padding: .5rem .6rem; font-size: .95rem; flex: 1 1 0; white-space: nowrap; }
.h-barra .ambra { flex: 1.6 1 0; }
body:has(.cookie-banner.visibile) .h-barra { display: none; }
.home .pie { padding-bottom: 6rem; margin-top: 0; }
@media (max-width: 719px) {
  .home .pie { padding: 1.8rem 0 5.8rem; font-size: .9rem; }
  .home .pie-griglia { grid-template-columns: 1fr 1fr; gap: 1.1rem 1rem; }
  .home .pie-griglia > div:first-child, .home .pie-griglia > div:nth-child(3) { grid-column: 1 / -1; }
  .home .pie-griglia > div:nth-child(3) ul { columns: 2; column-gap: 1rem; }
  .home .pie-griglia > div:nth-child(3) li { break-inside: avoid; }
  .home .pie li { margin: .2rem 0; }
  .home .pie .fine { margin-top: 1.2rem; }
}

/* --- schermi larghi -------------------------------------------------------------------------------------- */
@media (min-width: 720px) {
  .h-sez { padding: 5.5rem 0; }
  .h-apertura { padding: 7rem 0 5.5rem; }
  .h-apertura-foto img { object-position: 50% 45%; }
  .h-velo { background:
    linear-gradient(90deg, rgba(14, 11, 20, .82) 0, rgba(14, 11, 20, .5) 38%, rgba(14, 11, 20, .05) 70%),
    linear-gradient(180deg, rgba(14, 11, 20, .6) 0, rgba(14, 11, 20, 0) 22%, rgba(14, 11, 20, .1) 60%, #0E0B14 100%); }
  .h-apertura-corpo { max-width: 1180px; }
  .h-apertura h1 { font-size: clamp(3rem, 5.2vw, 5rem); max-width: 56rem; }
  .h-apertura-corpo > * { max-width: 38rem; }
  .h-apertura-corpo > h1 { max-width: 56rem; }
  .h-btn-audit { flex: 0 0 auto !important; }
  .h-azioni .bottone { flex: 0 1 auto; }
  .h-chiusura .h-azioni .bottone, .h-btn-maps { flex: 0 1 auto !important; }
  .h-passi { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
  .h-passi::before, .h-passi::after { left: 11%; right: 11%; top: 59px; bottom: auto; width: auto; height: 2px; }
  .h-passi::after { background: linear-gradient(90deg, transparent, #F5A524 60%, #fff); transform-origin: left; transform: scaleX(0); animation-name: h-traccia-x; }
  @keyframes h-traccia-x { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
  .h-passo { grid-template-columns: 1fr; gap: 1rem; align-items: start; padding: 1.3rem 1.3rem 1.5rem; }
  .h-passo-n { font-size: 3.4rem; right: .2rem; top: -3.8rem; }
  .h-passo-testo { margin-top: .2rem; }
  .h-foto { height: min(56svh, 480px); max-width: none; }
  .h-striscia { padding-left: max(16px, calc((100vw - 1180px) / 2 + 16px)); scroll-padding-inline: max(16px, calc((100vw - 1180px) / 2 + 16px)); }
  .h-frecce { display: inline-flex; }
  .h-tessere { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .h-tessera { padding: 1.3rem 1.15rem 3rem; }
  .h-numeri { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .h-numero { grid-template-columns: 1fr; padding: 1.5rem 1.4rem 1.8rem; }
  .h-num-val b { font-size: 5rem; }
  .h-num-barra { left: 1.4rem; right: 1.4rem; bottom: .9rem; }
  .h-altri { grid-template-columns: 1fr 1fr; gap: 1.1rem; }
  .h-arte { height: 220px; }
}
@media (min-width: 900px) {
  .h-macchina-griglia { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "testa palco" "comandi palco"; column-gap: 3.5rem; align-items: center; }
  .h-m-testa { grid-area: testa; align-self: end; margin-bottom: 1.4rem; }
  .h-palco { grid-area: palco; margin-top: 2rem; }
  .h-m-comandi { grid-area: comandi; align-self: start; }
  .h-chip-riga { grid-template-columns: 1fr; gap: .55rem; }
  .h-chip { text-align: left; padding: .8rem 1rem .9rem; min-height: 3.2rem; }
  .h-didascalia { text-align: left; }
  .h-barra { display: none; }
  .home .pie { padding-bottom: 2rem; }
  .h-chiusura-corpo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "testa carta" "azioni carta"; column-gap: 3.5rem; align-items: center; }
  .h-chiusura-corpo > .h-testa-sez { grid-area: testa; align-self: end; }
  .h-chiusura-corpo > .h-negozio-carta { grid-area: carta; }
  .h-chiusura-corpo > .h-azioni { grid-area: azioni; align-self: start; }
}

/* --- movimento ridotto: tutto fermo, le cose già finite ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .home *, .home *::before, .home *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .h-riga { opacity: 1; transform: none; }
  .h-scena { transform: none; }
  .h-num-barra i { transform: scaleX(var(--v)); }
  .h-chip.attivo i { transform: scaleX(1); }
  .h-ico-piano .spunta { stroke-dashoffset: 0; }
  .h-passi::after { display: none; }
  .h-barra { transition: none; }
}

/* --- 1b. apertura «classica» (il fondatore preferiva la hero di prima: domanda grande + mascotte, niente foto) ---------- */
.h-apertura.h-apertura-classica { min-height: 0; display: block; align-items: initial; padding: 6.5rem 0 3rem; background: var(--fondo); }
.h-apertura-classica .hero-griglia { position: relative; z-index: 1; }
.h-apertura-classica h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -.045em; margin: .6rem 0 1rem; }
.h-apertura-classica .sotto { max-width: 34rem; }
.h-apertura-classica .h-dove { margin-top: 1rem; }
.h-apertura-classica .hero-mascotte { margin-top: 1.5rem; }
@media (min-width: 900px) { .h-apertura-classica .hero-griglia { grid-template-columns: 1.15fr .85fr; } .h-apertura-classica .hero-mascotte { margin-top: 0; } }
.h-apertura-classica .mascotte.h-testa { display: none; } /* nella hero classica c'è già la mascotte grande: niente doppione in alto */
