/* ==========================================================================
   ALVEARE v40 — IL FILM A SCORRIMENTO
   Stesso linguaggio del video: sala color bosco, luce miele, profondità 3D.
   Parte A: pagina normale impilata (senza JS, con "riduci movimento", con GSAP bloccato).
   Parte B: html.anim = sei scene fissate guidate dallo scorrimento (anim.js).
   ========================================================================== */
:root {
  --notte: #06140F;
  --nav: 73px;
  --s: .75;
  --esa: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  --sfondo-film: radial-gradient(120% 90% at 50% 45%, #123B2C 0%, #0C261D 45%, #06140F 100%), #06140F;
}

/* ---------- A. TIPOGRAFIA DELLE SCENE (comune) ---------- */
.film { background: var(--notte); color: var(--crema); }
.scena { position: relative; background: var(--sfondo-film); color: var(--crema); isolation: isolate; }
.scena::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("img/hex.svg") 0 0 / 120px 208px; opacity: .55;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent);
  mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent);
}
.scena .kick, .nota-schermate {
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--miele);
  font-size: .8rem; margin: 0;
}
.scena .h { font-weight: 800; line-height: .94; letter-spacing: -.04em; color: var(--crema); margin: 0; text-wrap: balance; font-size: clamp(2.4rem, 7vw, 4.6rem); }
.scena .h .ln { display: block; }
.scena .sub { font-weight: 400; line-height: 1.3; color: rgba(244, 242, 236, .78); margin: 0; font-size: clamp(1.05rem, 2.2vw, 1.4rem); max-width: 30em; }
.miele { color: var(--miele); }

/* ---------- A. PAGINA IMPILATA (base) ---------- */
.scena { padding: 72px 0 80px; overflow: hidden; }
.scena + .scena { border-top: 1px solid rgba(244, 242, 236, .06); }
.stage { position: static; }
.safe {
  position: relative; max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center;
}
@media (min-width: 900px) {
  .safe { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
  .safe > .t-wrap, .safe > .t-blocco, .safe > .chaos-wrap, .safe > .ctas, .safe > .cards, .safe > .chat, .safe > .pills, .safe > .nota-schermate { grid-column: 1; }
  .safe > .phone-w, .safe > .favo-box, .safe > .laptop-w { grid-column: 2; grid-row: 1 / span 4; }
  .safe > .frags { grid-column: 1 / -1; }
}
.t-wrap, .t-blocco { display: grid; gap: 20px; }
.chaos-wrap { margin: 0; display: grid; gap: 6px; font-weight: 800; letter-spacing: -.045em; line-height: 1; font-size: clamp(2.2rem, 6.5vw, 4.4rem); text-wrap: balance; }
.chaos-t { display: block; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 28px; border-radius: 999px;
  font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; transition: transform 160ms var(--ease-out), box-shadow 180ms ease, background-color 180ms ease;
}
.cta:active { transform: scale(.97); }
.cta-pri { background: linear-gradient(135deg, var(--miele-l, #F7BC3F), var(--miele)); color: var(--bosco-deep); box-shadow: 0 18px 40px -14px rgba(232, 162, 27, .45); }
.cta-sec { color: var(--crema); border: 1.5px solid rgba(244, 242, 236, .45); background: rgba(244, 242, 236, .04); }
.cta:focus-visible { outline: 3px solid #F7BC3F; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .cta-sec:hover { background: rgba(244, 242, 236, .14); } .cta-pri:hover { transform: translateY(-1px); } }

/* telefono (misure in cqw: segue la larghezza del contenitore) */
.phone-w { container-type: inline-size; width: min(300px, 74vw); justify-self: center; }
.phone {
  position: relative; width: 100%; aspect-ratio: 448 / 784; border-radius: 14.7cqw; padding: 3.1cqw;
  background: linear-gradient(145deg, #1d2b25, #07110d);
  box-shadow: 0 0 0 .45cqw #2c3d35 inset, 0 5cqw 10cqw rgba(0, 0, 0, .5), 0 0 0 .2cqw rgba(255, 255, 255, .04);
}
.phone .scr { position: relative; width: 100%; height: 100%; border-radius: 12cqw; overflow: hidden; background: #fff; }
.phone .scr img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone .notch { position: absolute; top: 5.8cqw; left: 50%; width: 26.8cqw; height: 7.1cqw; margin-left: -13.4cqw; border-radius: 4.5cqw; background: #07110d; z-index: 3; }
.phone .glare { position: absolute; inset: 3.1cqw; border-radius: 12cqw; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, .18), transparent 35%, transparent 70%, rgba(255, 255, 255, .06)); }
.sovr { opacity: 1; }
.scr .sovr, .view .sovr { display: none; }   /* a pagina impilata resta la schermata principale: le altre sono nella galleria «Guarda l’app» */

/* finestra computer */
.laptop-w { container-type: inline-size; width: 100%; max-width: 640px; justify-self: center; }
.laptop { border-radius: 1.8cqw; overflow: hidden; background: #fff; box-shadow: 0 8cqw 16cqw rgba(0, 0, 0, .6), 0 0 0 .1cqw rgba(255, 255, 255, .08); transform-style: preserve-3d; }
.laptop .bar { height: 4.2cqw; background: #EDEAE2; display: flex; align-items: center; gap: .9cqw; padding: 0 1.8cqw; }
.laptop .bar i { width: 1.3cqw; height: 1.3cqw; border-radius: 50%; background: #D7D2C6; }
.laptop .bar .addr { margin-left: 1.8cqw; flex: 1; height: 2.6cqw; border-radius: .8cqw; background: #fff; font-family: var(--font-mono); font-size: 1.5cqw; color: var(--ink-3); display: flex; align-items: center; padding: 0 1.4cqw; overflow: hidden; white-space: nowrap; }
.laptop .view { position: relative; aspect-ratio: 1000 / 625; }
.laptop .view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }

/* card, frammenti, favo, pillole, chat (stili del video) */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--carta); color: var(--ink); border-radius: 26px; padding: 18px 20px; display: flex; gap: 16px; align-items: center;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .45), 0 2px 0 rgba(255, 255, 255, .6) inset;
}
.card .ic { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; }
.card small { display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.card strong { display: block; font-size: 1.15rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.card.stop { background: var(--stop-bg); } .card.stop small { color: var(--stop); } .card.ok small { color: var(--ok); }

.frags { display: flex; flex-wrap: wrap; gap: 14px; }
.frag { font-family: var(--font); white-space: normal; }
.bub { background: #E7F7DC; color: #16301F; border-radius: 26px 26px 26px 6px; padding: 16px 22px; font-size: 1.05rem; font-weight: 500; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); }
.bub small { display: block; font-family: var(--font-mono); font-size: .7rem; opacity: .6; margin-bottom: 4px; }
.call { background: #1F2A25; color: #F4F2EC; border: 1px solid #33463D; border-radius: 22px; padding: 14px 20px; font-size: 1rem; display: flex; gap: 12px; align-items: center; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.call i { width: 36px; height: 36px; border-radius: 50%; background: #C8433B; display: grid; place-items: center; font-style: normal; font-size: 1rem; flex: none; }
.file { background: #fff; color: #1D6F42; border-radius: 14px; padding: 14px 18px; font-size: .95rem; font-weight: 700; display: flex; gap: 10px; align-items: center; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); }
.file b { background: #1D6F42; color: #fff; border-radius: 6px; padding: 3px 8px; font-size: .75rem; font-family: var(--font-mono); }
.voice { background: #E7F7DC; color: #16301F; border-radius: 30px; padding: 14px 22px; font-size: .95rem; display: flex; gap: 12px; align-items: center; font-family: var(--font-mono); box-shadow: 0 30px 60px rgba(0, 0, 0, .45); }
.voice span { display: inline-block; width: 120px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #2F7D4F 35%, #9DBFA9 35%); }
.sticky { background: #F7D774; color: #3A2E05; padding: 18px 20px; font-size: 1.05rem; font-weight: 700; max-width: 240px; line-height: 1.15; transform: rotate(-3deg); box-shadow: 0 30px 50px rgba(0, 0, 0, .45); }
.seed { display: none; }

.favo-box { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 480px; justify-self: center; }
.cell {
  width: 110px; height: 127px; clip-path: var(--esa); display: grid; place-items: center; text-align: center;
  font-family: var(--font-mono); font-weight: 500; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
}
.c-m { background: linear-gradient(135deg, var(--miele-l, #F7BC3F), var(--miele)); color: var(--bosco-deep); }
.c-b { background: linear-gradient(135deg, var(--bosco-3), var(--bosco-2)); color: var(--crema); }
.c-c { background: var(--crema); color: var(--bosco); }
.c-0 { background: linear-gradient(160deg, #FFFFFF, var(--crema)); }
.c-0 img { width: 76px; height: 76px; }

.chat { background: #fff; color: var(--ink); border-radius: 30px 30px 8px 30px; padding: 18px 22px 20px; font-size: 1.05rem; line-height: 1.3; font-weight: 500; box-shadow: 0 40px 90px rgba(0, 0, 0, .5); max-width: 460px; }
.chat small { display: block; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.caret { display: none; }

.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: flex; align-items: center; gap: 12px; background: rgba(244, 242, 236, .08); border: 1px solid rgba(244, 242, 236, .16); color: var(--crema);
  border-radius: 999px; padding: 12px 22px; font-size: 1rem; font-weight: 500;
}
.pill .dot { width: 12px; height: 12px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 5px rgba(74, 222, 128, .18); flex: none; }
.pill.stop { background: var(--stop-bg); color: var(--stop); border-color: transparent; font-weight: 700; }
.pill.stop .dot { background: var(--stop); box-shadow: 0 0 0 5px rgba(158, 42, 36, .18); }
.nota-schermate { font-size: .72rem; letter-spacing: .12em; color: #8FB0A1; }

/* ---------- SCENA 7: NUMERI (non fissata) ---------- */
.numeri { background: var(--sfondo-film); color: var(--crema); padding: 96px 0 88px; position: relative; isolation: isolate; border-top: 0; }
.numeri::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: url("img/hex.svg") 0 0 / 120px 208px; opacity: .5; -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); }
.numeri .numeri-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.numeri .numero { display: grid; gap: 10px; align-content: start; padding: 0; border: 0; background: none; text-align: left; }
.numeri .numero-val { display: block; font-weight: 800; letter-spacing: -.05em; line-height: .9; font-size: clamp(5.5rem, 15vw, 11rem); color: var(--miele); font-variant-numeric: tabular-nums; }
.numeri .numero-unit { font-size: .26em; letter-spacing: -.02em; color: var(--crema); font-weight: 700; }
.numeri .numero-txt { font-family: var(--font-mono); font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; color: #BFD3C8; max-width: 17em; line-height: 1.5; }
.numeri .numeri-nota { margin: 40px 0 0; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em; color: #8FB0A1; }
.numeri .hero-pills { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.numeri .hero-pills li { position: relative; padding-left: 22px; color: #BFD3C8; font-size: 1rem; }
.numeri .hero-pills li::before { content: ""; position: absolute; left: 0; top: .35em; width: 11px; height: 12px; background: var(--miele); clip-path: var(--esa); }
@media (max-width: 760px) {
  .numeri { padding: 72px 0 64px; }
  .numeri .numeri-list { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .numeri .numero-val { font-size: clamp(5.5rem, 30vw, 8.5rem); }
}

/* ---------- RISTILE DELLE SEZIONI SOTTO ---------- */
.section-video { padding-top: 96px; background: var(--sfondo-film); }
.giornata { background: var(--bosco-deep); color: var(--crema); }
.giornata .section-title { color: var(--crema); }
.giornata .section-pretitle { color: var(--miele); }
.giornata .section-desc { color: #BFD3C8; }
.giornata .momenti { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; margin-top: 12px; position: relative; }
.giornata .momento { display: block; padding: 28px 0 0; border: 0 !important; position: relative; }
.giornata .momento::before { content: ""; position: absolute; left: 0; right: -28px; top: 0; width: auto; bottom: auto; height: 2px; background: rgba(244, 242, 236, .14); }
.giornata .momento:last-child::before { right: 0; }
.giornata .momento::after { content: ""; position: absolute; left: 0; top: -9px; margin: 0; width: 18px; height: 20px; background: var(--miele); clip-path: var(--esa); }
.giornata .momento-ora { margin: 0 0 14px; }
.giornata .momento-ora time { color: var(--crema) !important; font-size: clamp(2.4rem, 4.2vw, 3.6rem); }
.giornata .momento:nth-child(3) .momento-ora time { color: var(--miele) !important; }
.giornata .momento-ora span { color: #8FB0A1; }
.giornata .momento-testo h3 { color: var(--crema); font-size: clamp(1.3rem, 2vw, 1.7rem); }
.giornata .momento-testo p { color: #BFD3C8; font-size: 1rem; }
@media (max-width: 900px) {
  .giornata .momenti { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-left: 30px; }
  .giornata .momento::before { left: -22px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .giornata .momento:last-child::before { bottom: 50%; }
  .giornata .momento::after { left: -31px; top: 34px; }
  .giornata .momento { padding: 24px 0 14px; }
}
.section-assistente { background: var(--bosco-deep); color: var(--crema); }
.section-assistente .section-title { color: var(--crema); }
.section-assistente .section-pretitle { color: var(--miele); }
.section-assistente .section-desc { color: #BFD3C8; }
.section-title { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -.04em; }
#guarda-app { background: var(--bosco-deep); color: var(--crema); }
#guarda-app .section-title { color: var(--crema); }
#guarda-app .section-pretitle { color: var(--miele); }
#guarda-app .section-desc { color: #BFD3C8; }
#guarda-app .app-caption { color: #BFD3C8; }

/* ---------- B. IL FILM FISSATO (html.anim) ---------- */
html.anim { scroll-behavior: auto; }
html.anim .film {
  position: relative; height: calc(100vh - var(--nav)); height: calc(100lvh - var(--nav)); overflow: hidden; background: var(--sfondo-film);
}
html.anim .scena { position: absolute; inset: 0; padding: 0; border: 0 !important; visibility: hidden; background: none; overflow: visible; }
html.anim #apertura { visibility: visible; }
/* le schermate delle scene 4-6 si scaricano solo quando si inizia a scorrere: fuori dalla zona del caricamento pigro */
html.anim:not(.pronto) #programma, html.anim:not(.pronto) #rapportino, html.anim:not(.pronto) #ufficio { transform: translateY(1500vh); }
html.anim .scena::before { content: none; }
html.anim .film::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: url("img/hex.svg") 0 0 / 120px 208px; opacity: .55;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent); mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent);
}
html.anim .film::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: radial-gradient(90% 90% at 50% 50%, transparent 60%, rgba(3, 10, 7, .55) 100%);
}
html.anim .scena { z-index: 1; }
html.anim .stage {
  position: absolute; left: 0; top: 0; width: calc(100% / var(--s)); height: calc((100vh - var(--nav)) / var(--s)); height: calc((100svh - var(--nav)) / var(--s));
  transform: scale(var(--s)); transform-origin: 0 0;
}
html.anim .safe {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1040px; margin: -520px 0 0 -960px; padding: 0; display: block;
  perspective: 2200px; transform-style: preserve-3d; max-width: none;
}
html.anim .safe > *, html.anim .cards > *, html.anim .frags > *, html.anim .pills > *, html.anim .favo-box > * { grid-column: auto; grid-row: auto; }
html.anim .cards, html.anim .frags, html.anim .favo-box, html.anim .pills { display: block; position: absolute; inset: 0; margin: 0; padding: 0; max-width: none; width: auto; height: auto; pointer-events: none; perspective: 2200px; transform-style: preserve-3d; list-style: none; }
html.anim .cards > *, html.anim .frags > *, html.anim .favo-box > *, html.anim .pills > * { pointer-events: none; }

/* tipografia a misura del video (px del palco 1920 x 1040) */
html.anim .scena .kick { font-size: 26px; }
html.anim .scena .h { font-size: 112px; }
html.anim .scena .sub { font-size: 36px; max-width: 700px; }
html.anim .nota-schermate { position: absolute; left: 140px; bottom: 50px; font-size: 20px; }

/* scena 1 */
html.anim .t-wrap { position: absolute; left: calc(50% - 400px); top: calc(50% - 90px); width: 800px; margin: 0; text-align: center; display: block; transform-origin: 50% 50%; }
html.anim .t-wrap .kick { margin-bottom: 26px; font-size: 20px; letter-spacing: .15em; white-space: nowrap; }
html.anim .h-apertura { font-size: 96px; letter-spacing: -.045em; text-align: center; }
html.anim .h-apertura .wd { display: inline-block; }
html.anim #ph1 { --pw: 470px; left: calc(50% + 508px); top: 50%; }
html.anim .ctas { position: absolute; left: calc(50% - 432px); top: calc(50% + 200px); display: flex; flex-wrap: nowrap; gap: 20px; justify-content: center; width: max-content; }
html.anim .cta { font-size: 30px; padding: 22px 44px; min-height: calc(46px / var(--s)); line-height: 1.2; }

/* oggetti: telefono e finestra */
html.anim .phone-w {
  --pw: 448px; position: absolute; width: var(--pw); margin: 0; left: 50%; top: 50%; opacity: 0;
  margin-left: calc(var(--pw) / -2); margin-top: calc(var(--pw) * -.875); justify-self: auto;
}
html.anim .scr .sovr { display: block; opacity: 0; }
html.anim .view .sovr { display: block; opacity: 0; }
html.anim .laptop-w { position: absolute; width: 1000px; max-width: none; left: calc(50% + 310px - 500px); top: calc(50% + 163px - 333px); opacity: 0; }
html.anim .laptop .bar { height: 42px; padding: 0 18px; gap: 9px; }

/* scena 2: caos */
html.anim .chaos-wrap { position: absolute; inset: 0; display: block; margin: 0; font-size: 168px; }
html.anim .chaos-t { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 80px; opacity: 0; }
html.anim .frag { position: absolute; left: 50%; top: 50%; opacity: 0; white-space: nowrap; }
html.anim .bub { padding: 20px 28px; font-size: 30px; border-radius: 26px 26px 26px 6px; }
html.anim .bub small { font-size: 17px; margin-bottom: 6px; }
html.anim .call { padding: 18px 26px; font-size: 28px; gap: 16px; }
html.anim .call i { width: 44px; height: 44px; font-size: 22px; }
html.anim .file { padding: 18px 24px; font-size: 26px; gap: 14px; }
html.anim .file b { font-size: 20px; padding: 4px 10px; }
html.anim .voice { padding: 18px 28px; font-size: 26px; gap: 16px; }
html.anim .voice span { width: 220px; height: 6px; }
html.anim .sticky { padding: 26px 28px; font-size: 30px; width: 300px; max-width: none; white-space: normal; transform: none; }
html.anim .seed { display: block; position: absolute; left: 50%; top: 50%; width: 220px; height: 254px; margin: -127px 0 0 -110px; background: linear-gradient(135deg, var(--miele-l, #F7BC3F), var(--miele)); clip-path: var(--esa); opacity: 0; }

/* scena 3: favo */
html.anim .t-blocco { position: absolute; left: 140px; top: 50%; transform: translateY(-50%); display: grid; gap: 30px; width: 940px; }
html.anim .h-favo { font-size: 112px; }
html.anim #t3 { left: 0; top: 70px; transform: none; width: 1920px; text-align: center; justify-items: center; gap: 24px; }
html.anim #t3 .h { font-size: 100px; }
html.anim #t3 .sub { margin-inline: auto; }
html.anim .favo-box { --f: .72; --fx: 0px; --fy: 280px; inset: auto; left: calc(50% + var(--fx)); top: calc(50% + var(--fy)); width: 0; height: 0; }
html.anim .cell {
  position: absolute; left: 0; top: 0; width: calc(220px * var(--f)); height: calc(254px * var(--f)); margin: calc(-127px * var(--f)) 0 0 calc(-110px * var(--f));
  font-size: calc(22px * var(--f)); opacity: 0;
}
html.anim .c-0 img { width: calc(168px * var(--f)); height: calc(168px * var(--f)); }

/* scena 4: programma */
html.anim #t4 { top: 50%; }
html.anim #ph3 { left: calc(50% + 220px); top: 50%; }
html.anim .card { position: absolute; left: 50%; top: 50%; width: 420px; padding: 24px 26px; gap: 20px; opacity: 0; transform-origin: 50% 50%; }
html.anim .card .ic { width: 72px; height: 72px; border-radius: 20px; font-size: 28px; }
html.anim .card small { font-size: 18px; }
html.anim .card strong { font-size: 30px; }
html.anim #cA { margin: -60px 0 0 calc(640px - 210px); top: calc(50% - 230px); }
html.anim #cB { margin: -60px 0 0 calc(640px - 210px); top: calc(50% - 10px); }
html.anim #cC { margin: -60px 0 0 calc(10px - 210px); top: calc(50% + 340px); }

/* scena 5: rapportino */
html.anim #ph4 { left: calc(50% + 164px); top: 50%; }
html.anim .chat { position: absolute; left: calc(50% + 330px); top: calc(50% + 195px); width: 560px; max-width: none; margin: 0 0 0 -280px; padding: 26px 30px 28px; font-size: 30px; opacity: 0; transform-origin: 50% 50%; }
html.anim .chat small { font-size: 18px; margin-bottom: 10px; }
html.anim .caret { display: inline-block; width: 3px; height: 32px; background: var(--miele); vertical-align: -5px; margin-left: 2px; }
html.anim #cD { margin: -60px 0 0 calc(640px - 210px); top: calc(50% - 180px); }
html.anim #cE { margin: -60px 0 0 calc(640px - 210px); top: calc(50% - 10px); }

/* scena 6: ufficio */
html.anim #t6 { top: 150px; transform: none; }
html.anim .h-uff { font-size: 104px; }
html.anim .pill { position: absolute; left: 140px; padding: 18px 30px; font-size: 30px; gap: 16px; opacity: 0; width: max-content; }
html.anim .pill .dot { width: 16px; height: 16px; box-shadow: 0 0 0 6px rgba(74, 222, 128, .18); }
html.anim .pill.stop .dot { box-shadow: 0 0 0 6px rgba(158, 42, 36, .18); }
html.anim #p1 { top: calc(50% + 22px - 42px); }
html.anim #p2 { top: calc(50% + 142px - 42px); }
html.anim #p3 { top: calc(50% + 262px - 42px); }
html.anim #t4 .h, html.anim #t5 .h { font-size: 112px; }
html.anim #t5 .h { font-size: 108px; }

/* computer: i gruppi testo + oggetto hanno gli stessi margini a sinistra e a destra */
@media (min-aspect-ratio: 1000001/1000000) {
  html.anim #programma .safe { margin-left: -992px; }
  html.anim #rapportino .safe { margin-left: -998px; }
  html.anim #ufficio .safe { margin-left: -975px; }
}

/* ---------- B. VERTICALE (palco 1080 x 1900, come il 9:16 del video) ---------- */
@media (max-aspect-ratio: 1/1) {
  html.anim .safe { width: 1080px; height: 1900px; margin: -950px 0 0 -540px; }
  html.anim .scena .kick { font-size: 38px; letter-spacing: .16em; }
  html.anim .scena .sub { font-size: 50px; max-width: 920px; }
  html.anim .scena .h { font-size: 130px; }
  html.anim .nota-schermate { left: 0; right: 0; text-align: center; bottom: 60px; font-size: 30px; }
  /* 1 */
  html.anim .t-wrap { left: 50%; top: calc(50% - 690px); width: 960px; }
  html.anim .h-apertura { max-width: 720px; margin-left: auto; margin-right: auto; }
  html.anim .t-wrap .kick { font-size: 34px; margin-bottom: 30px; white-space: normal; letter-spacing: .16em; }
  html.anim .h-apertura { font-size: 108px; }
  html.anim #ph1 { --pw: 540px; left: 50%; top: calc(50% + 120px); }
  html.anim .ctas { left: 50%; top: calc(50% + 650px); flex-direction: column; gap: 24px; width: 640px; }
  html.anim .cta { font-size: 46px; padding: 34px 40px; width: 100%; min-height: calc(46px / var(--s)); }
  /* 2 */
  html.anim .chaos-wrap { font-size: 128px; }
  html.anim .bub { padding: 30px 40px; font-size: 44px; border-radius: 36px 36px 36px 8px; }
  html.anim .bub small { font-size: 26px; }
  html.anim .call { padding: 26px 36px; font-size: 40px; }
  html.anim .call i { width: 60px; height: 60px; font-size: 30px; }
  html.anim .file { padding: 26px 34px; font-size: 38px; }
  html.anim .file b { font-size: 28px; }
  html.anim .voice { padding: 26px 38px; font-size: 38px; }
  html.anim .voice span { width: 280px; }
  html.anim .sticky { padding: 32px 36px; font-size: 42px; width: 420px; }
  /* blocchi titolo in alto */
  html.anim .t-blocco { left: 80px; top: 70px; transform: none; width: 920px; gap: 36px; text-align: center; justify-items: center; }
  html.anim .scena .h, html.anim .scena .kick { text-align: center; }
  html.anim .scena .kick { padding-left: .16em; }
  html.anim .scena .sub { margin-inline: auto; text-align: center; }
  html.anim #t4, html.anim #t6 { top: 70px; }
  html.anim .h-favo { font-size: 108px; }
  html.anim #t4 .h { font-size: 124px; }
  html.anim #t5 .h { font-size: 120px; }
  html.anim .h-uff { font-size: 124px; }
  /* 3 */
  html.anim #t3 { left: 80px; top: 70px; width: 920px; }
  html.anim #t3 .h { font-size: 108px; }
  html.anim .favo-box { --f: 1.45; --fx: 0px; --fy: 330px; }
  html.anim .cell { font-size: 32px; }
  /* 4 */
  html.anim #ph3 { --pw: 500px; left: 50%; top: calc(50% + 150px); }
  html.anim .card { width: 560px; padding: 32px 34px; gap: 26px; }
  html.anim .card .ic { width: 90px; height: 90px; border-radius: 24px; font-size: 36px; }
  html.anim .card small { font-size: 28px; }
  html.anim .card strong { font-size: 44px; }
  html.anim #cA { margin: -90px 0 0 calc(215px - 280px); top: calc(50% - 250px); }
  html.anim #cB { margin: -90px 0 0 calc(-215px - 280px); top: calc(50% + 120px); }
  html.anim #cC { margin: -90px 0 0 -280px; top: calc(50% + 640px); }
  /* 5 */
  html.anim #ph4 { --pw: 420px; left: 50%; top: calc(50% + 235px); }
  html.anim .chat { left: 50%; top: calc(50% + 520px); width: 740px; margin: 0 0 0 -370px; padding: 36px 40px 40px; font-size: 42px; border-radius: 40px 40px 10px 40px; }
  html.anim .chat small { font-size: 26px; }
  html.anim .caret { height: 44px; vertical-align: -7px; }
  html.anim #cD, html.anim #cE { width: 480px; padding: 28px 28px; gap: 20px; }
  html.anim #cD .ic, html.anim #cE .ic { width: 76px; height: 76px; font-size: 32px; }
  html.anim #cD small, html.anim #cE small { font-size: 26px; }
  html.anim #cD strong, html.anim #cE strong { font-size: 40px; }
  html.anim #cD { margin: -90px 0 0 calc(-245px - 240px); top: calc(50% + 810px); }
  html.anim #cE { margin: -90px 0 0 calc(245px - 240px); top: calc(50% + 810px); }
  /* 6 */
  html.anim .laptop-w { left: calc(50% - 500px); top: calc(50% - 60px - 333px); }
  html.anim .pill { left: 0; right: 0; margin-inline: auto; padding: 26px 44px; font-size: 42px; gap: 22px; }
  html.anim .pill .dot { width: 22px; height: 22px; }
  html.anim #p1 { top: calc(50% + 400px - 50px); }
  html.anim #p2 { top: calc(50% + 550px - 50px); }
  html.anim #p3 { top: calc(50% + 700px - 50px); }
}

html.anim .film > .flash { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: radial-gradient(60% 60% at 50% 50%, rgba(247, 188, 63, .9), rgba(232, 162, 27, .25) 45%, transparent 75%); }
/* ---------- fine ---------- */
@media (prefers-reduced-motion: reduce) {
  html.anim .film { height: auto; }
}

/* assistente su fondo bosco: schede bianche come le card del video */
.section-assistente .funzione-card { background: var(--carta); border-color: transparent; color: var(--ink); }
.section-assistente .funzione-card:hover { background: var(--carta); }

/* i titoli ruotati in ingresso non devono mai creare scorrimento orizzontale */
main > section { overflow-x: clip; }


/* ==========================================================================
   NAVBAR SOPRA LE SEZIONI SCURE: bosco traslucido, testi chiari (la classe la mette script.js)
   ========================================================================== */
.navbar.nav-scuro, .navbar.scrolled.nav-scuro {
  background-color: rgba(12, 38, 29, .8);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgba(244, 242, 236, .14); box-shadow: none;
}
.navbar.nav-scuro .brand-title { color: var(--crema); }
.navbar.nav-scuro .brand-payoff { color: #C7D8CE; }
.navbar.nav-scuro .brand-icon { background: var(--crema); border-radius: 11px; padding: 3px; box-sizing: border-box; }
.navbar.nav-scuro .btn-accedi { color: var(--crema); border-color: rgba(244, 242, 236, .6); }
.navbar.nav-scuro .btn-primary { background-color: var(--miele); color: #1A1303; box-shadow: none; }
.navbar.nav-scuro .nav-toggle span { background-color: var(--crema); }
@media (min-width: 993px) {
  .navbar.nav-scuro .nav-link { color: #DCE6DF; }
  .navbar.nav-scuro .nav-link.active { color: #fff; }
  .navbar.nav-scuro .nav-link.active::after { background-color: var(--miele); }
}
@media (hover: hover) and (pointer: fine) {
  .navbar.nav-scuro .btn-accedi:hover { background: var(--crema); color: var(--bosco); }
  .navbar.nav-scuro .btn-primary:hover { background-color: var(--miele-light, #F7BC3F); }
}
@media (min-width: 993px) and (hover: hover) and (pointer: fine) {
  .navbar.nav-scuro .nav-link:hover { color: #fff; }
}


/* ==========================================================================
   FLUIDITÀ: livelli GPU solo per la scena in corso (la classe "vivo" la mette la timeline), ombre statiche più leggere su telefono
   ========================================================================== */
html.anim .vivo .frag, html.anim .vivo .card, html.anim .vivo .phone-w, html.anim .vivo .laptop-w, html.anim .vivo .cell, html.anim .vivo .chat,
html.anim .vivo .pill, html.anim .vivo .t-wrap, html.anim .vivo .t-blocco .kick, html.anim .vivo .t-blocco .ln, html.anim .vivo .t-blocco .sub,
html.anim .vivo .chaos-t, html.anim .vivo .ctas, html.anim .vivo .seed { will-change: transform, opacity; }
@media (hover: none), (max-width: 1024px) {
  html.anim .card, html.anim .bub, html.anim .call, html.anim .file, html.anim .voice, html.anim .sticky { box-shadow: 0 10px 22px rgba(0, 0, 0, .32); }
  html.anim .chat { box-shadow: 0 12px 26px rgba(0, 0, 0, .35); }
  html.anim .phone { box-shadow: 0 0 0 .45cqw #2c3d35 inset, 0 2cqw 4cqw rgba(0, 0, 0, .4); }
  html.anim .laptop { box-shadow: 0 2cqw 5cqw rgba(0, 0, 0, .45), 0 0 0 .1cqw rgba(255, 255, 255, .08); }
  html.anim .cta-pri { box-shadow: 0 8px 16px -8px rgba(232, 162, 27, .4); }
}

/* ==========================================================================
   CENTRATURA: numeri, e su telefono kicker, titoli, sottotitoli e pulsanti di ogni sezione
   ========================================================================== */
.numeri .numeri-list { justify-items: center; }
.numeri .numero { text-align: center; justify-items: center; }
.numeri .numero-txt { margin-inline: auto; }
.numeri .numeri-nota { text-align: center; }
.numeri .hero-pills { justify-content: center; }
@media (max-width: 900px) {
  .scena .t-wrap, .scena .t-blocco { text-align: center; justify-items: center; }
  .scena .h, .scena .kick, .scena .sub { text-align: center; margin-inline: auto; }
  .scena .ctas { justify-content: center; }
  .scena .pills { justify-content: center; }
  .scena .nota-schermate { text-align: center; }
  .section-header, .section-title, .section-pretitle, .section-desc { text-align: center; margin-inline: auto; }
}

/* telefono: anche i blocchi titolo dentro i riquadri (marchio, contatti) hanno kicker, titolo e testo centrati */
@media (max-width: 760px) {
  .whitelabel-content > .badge-tag, .whitelabel-content > h2, .whitelabel-content > .lead { text-align: center; margin-inline: auto; }
  .whitelabel-content > .badge-tag { display: table; }
  .contatti-info > .section-pretitle, .contatti-info > h3, .contatti-info > p { text-align: center; }
  .giornata .section-header, .section-assistente .section-header { text-align: center; }
}

/* anello di focus chiaro sulla barra scura */
.navbar.nav-scuro a:focus-visible, .navbar.nav-scuro button:focus-visible { outline-color: #F7BC3F; }
@media (max-width: 992px) { .navbar.nav-scuro .nav-links a:focus-visible { outline-color: var(--bosco); } }

/* Telefoni stretti (sotto 360 px, es. anteprima dentro un'app): la barra resta tutta nello schermo */
@media (max-width: 359px) {
  .navbar .brand-info { display: none; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-primary { padding-left: 12px; padding-right: 12px; }
}
html.anim .t-wrap .kick { text-wrap: balance; }
