/* Home dinamica. Senza JavaScript, o con "riduci movimento", questa pagina e' ferma e mostra tutto:
   html.motion accende le comparse, html.pin la sezione bloccata (solo schermi larghi). Le classi le mette
   lo script in testa alla pagina, prima del primo disegno. */
.h-hero, .h-pin { background: #0f1114; color: #f1f2f4; }
.h-hero { position: relative; overflow: hidden; min-height: 100dvh; display: grid; align-items: center; padding: 110px 0 70px; }
.h-hero .wrap { position: relative; width: 100%; }
.h-hero h1 { font-size: clamp(44px, 8.4vw, 148px); line-height: .94; letter-spacing: -.04em; max-width: 12ch; }
.h-hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.h-hero h1 .w > span { display: inline-block; }
.h-hero .lead { margin-top: clamp(22px, 2.6vw, 40px); color: #c3c8d0; max-width: 54ch; }
.h-hero .note { color: #8f97a3; }
.h-hero .btn.line { color: #f1f2f4; border-color: #4d535e; }
.h-hero .btn.line:hover { border-color: #cbd0d7; }
.h-ghost { position: absolute; right: -2vw; bottom: -6vw; margin: 0; font-size: clamp(170px, 36vw, 700px); line-height: 1; font-weight: 150; letter-spacing: -.05em; color: rgba(255, 255, 255, .055); white-space: nowrap; pointer-events: none; transition: opacity .5s; }
.h-ghost.out { opacity: 0; }

/* Lo schermo si accende: di base (fermo) una sequenza in colonna */
.h-pin { padding: clamp(40px, 8vw, 110px) 0; }
.h-screen, .h-prog { display: none; }
.h-step + .h-step { margin-top: clamp(56px, 10vw, 130px); }
.h-cap h2 { font-size: clamp(30px, 4.6vw, 68px); line-height: 1; letter-spacing: -.03em; }
.h-cap p { margin-top: 14px; color: #a9b0ba; max-width: 34ch; }
.h-group { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: flex-start; margin-top: 26px; }
.h-ov { max-width: 100%; }
.h-ov img { height: auto; }
.h-pw { width: 100%; }
html:not(.pin) .h-ov { width: auto !important; }
html:not(.pin) .h-ov img { width: auto !important; max-width: 100%; }
html:not(.pin) .h-ov.h-pw, html:not(.pin) .h-ov.h-pw img { width: 100% !important; }

/* Sezione bloccata */
html.pin .h-pin { height: 560vh; padding: 0; }
html.pin .h-sticky { position: sticky; top: 0; height: 100dvh; display: grid; align-items: center; overflow: hidden; }
html.pin .h-stage { width: 100%; display: grid; grid-template-columns: minmax(250px, 25%) minmax(0, 1fr); column-gap: clamp(28px, 4vw, 80px); align-items: center; position: relative; }
html.pin .h-step { display: contents; }
html.pin .h-step + .h-step { margin: 0; }
html.pin .h-cap { grid-column: 1; grid-row: 1; opacity: 0; will-change: opacity, transform; }
html.pin .h-screen, html.pin .h-group { grid-column: 2; grid-row: 1; justify-self: end; width: min(100%, calc((100dvh - 190px) * 16 / 9)); aspect-ratio: 16 / 9; }
html.pin .h-screen { display: block; background: #171a1f; border-radius: 6px; }
html.pin .h-group { display: block; position: relative; margin: 0; container-type: inline-size; pointer-events: none; }
html.pin .h-ov { position: absolute; opacity: 0; will-change: opacity, transform; }
html.pin .h-ov img { max-width: none; }
html.pin .h-ov.h-pw { inset: 0; width: 100% !important; border-radius: 6px; overflow: hidden; }
html.pin .h-ov.h-pw img { width: 100% !important; }
html.pin .h-ov .frames img { transition: none; }
html.pin .h-ov.h-pw .frames img { transition: opacity .45s; }
html.pin .h-prog { display: block; position: absolute; left: var(--gut); right: var(--gut); bottom: calc(-1 * clamp(26px, 5vh, 54px)); height: 2px; background: #262a31; }
html.pin .h-prog i { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

/* Numeri */
.h-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 5vw, 90px); }
.h-nums .num { font-size: clamp(72px, 9.2vw, 168px); white-space: nowrap; line-height: .9; font-weight: 200; letter-spacing: -.04em; }
.h-nums .num small { font-size: .32em; font-weight: 300; color: var(--mute); margin-left: .1em; letter-spacing: 0; }
.h-nums h3 { margin-top: clamp(14px, 1.6vw, 26px); padding-top: clamp(14px, 1.6vw, 26px); border-top: 1px solid var(--line-2); }
.h-nums .txt { margin-top: 8px; }

/* Testata sopra l'apertura scura */
html.js body.home .top { position: fixed; left: 0; right: 0; transition: background-color .3s, border-color .3s; }
html.js body.home .top:not(.solid) { background: transparent; border-bottom-color: transparent; }

/* Comparse (solo con il movimento acceso) */
html.motion .h-hero h1 .w > span { transform: translateY(108%); animation: h-up 1s cubic-bezier(.16, 1, .3, 1) forwards; animation-delay: calc(var(--i) * 85ms + 120ms); }
html.motion .h-hero .lead, html.motion .h-hero .acts, html.motion .h-hero .note { opacity: 0; animation: h-fade .9s cubic-bezier(.16, 1, .3, 1) forwards; animation-delay: .75s; }
html.motion .h-hero .acts { animation-delay: .87s; }
html.motion .h-hero .note { animation-delay: .99s; }
html.motion .h-ghost { opacity: 0; animation: h-ghost 1.6s ease-out .3s forwards; }
html.motion .h-ghost.out { animation: none; opacity: 0; }
html.motion .h-ghost.back { animation: none; opacity: 1; }
@keyframes h-up { to { transform: none; } }
@keyframes h-fade { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes h-ghost { to { opacity: 1; } }
html.motion .rv { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform 1s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--k, 0) * 90ms); }
html.motion .rv.in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .h-nums { grid-template-columns: 1fr; }
  .h-hero { padding-top: 96px; }
  .h-group { justify-content: center; }
  .h-ghost { bottom: 0; }
}

/* ------------------------------------------------------------------ Direzione "Muretto" (scelta da Marco il 23/11)
   I colori e i titoli stanno in fondo a stile.css, per tutte le pagine. Qui solo la home: nero, titoli in Exo 2 corsivo maiuscolo, ambra per l'azione, verde dei tempi, rosso solo per gli allarmi. */
.h-hero, .h-pin { background: #0a0b0d; }
.h-hero { display: block; min-height: 0; padding: 64px 0 0; }
.h-stripbar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.h-strip { display: flex; flex-wrap: wrap; gap: 8px 34px; padding-top: 12px; padding-bottom: 12px; font: 500 12px/1.2 var(--num); letter-spacing: .14em; text-transform: uppercase; color: #858c97; }
.h-strip b { color: var(--ok); font-weight: 600; }
.h-strip .w b { color: var(--go); }
.h-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 414px); gap: clamp(32px, 5vw, 90px); align-items: end; padding-top: clamp(44px, 6.5vw, 104px); padding-bottom: clamp(44px, 5vw, 78px); }
.h-hero h1 { font-size: clamp(46px, 8.8vw, 160px); line-height: .9; letter-spacing: -.035em; max-width: none; }
.h-hero h1 em { font-style: inherit; color: var(--go); }
.h-hero h1 .w { padding-right: .1em; margin-right: -.1em; }
.h-seq { border-left: 1px solid var(--line-2); padding-left: 30px; display: grid; gap: 22px; }
.h-seq li { position: relative; }
.h-seq li::before { content: ""; position: absolute; left: -35px; top: 1px; width: 9px; height: 9px; background: var(--ok); }
.h-seq li.w::before { background: var(--go); }
.h-seq li.r::before { background: var(--red); }
.h-seq small { display: block; font: 500 12px/1 var(--num); letter-spacing: .14em; text-transform: uppercase; color: #858c97; margin-bottom: 10px; }
.h-seq img { width: 100%; max-width: 380px; }
.h-line { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0e1013; }
.h-line .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px 28px; padding-top: 28px; padding-bottom: 28px; }
.h-line img { height: clamp(40px, 4.4vw, 74px); width: auto; max-width: none; flex: none; }
.h-cap h2 { font-size: clamp(28px, 4vw, 60px); }
html.pin .h-prog i { background: var(--go); }
.h-nums .num { color: var(--go); }
.h-sheet { display: grid; grid-template-columns: minmax(260px, 27%) minmax(0, 1fr); gap: clamp(32px, 5vw, 90px); align-items: start; }
.h-sheet header { position: sticky; top: 100px; }
.h-sheet header .txt { margin-top: 16px; }
.h-rows { columns: 2; column-gap: clamp(28px, 4vw, 70px); }
.h-rows li { break-inside: avoid; }
.h-rows a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 13px 8px 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.h-rows a:hover { background: #111317; }
.h-rows .n { font: 500 13px/1 var(--num); color: #858c97; padding-left: 8px; }
.h-rows .nm { font-size: 17px; }
.h-rows .c { font: 600 12px/1 var(--num); letter-spacing: .12em; text-transform: uppercase; color: var(--ok); white-space: nowrap; }
.h-rows .c-strategia { color: var(--go); }
.h-rows .c-vettura, .h-rows .c-altro { color: #9aa1ab; }
html.motion .h-seq li { opacity: 0; animation: h-fade .9s cubic-bezier(.16, 1, .3, 1) forwards; animation-delay: calc(1s + var(--k) * .22s); }
html.done .h-hero h1 .w > span, html.done .h-hero .lead, html.done .h-hero .acts, html.done .h-hero .note, html.done .h-seq li { animation: none; opacity: 1; transform: none; }
@media (max-width: 900px) {
  .h-grid, .h-sheet { grid-template-columns: 1fr; }
  .h-sheet header { position: static; }
}
@media (max-width: 760px) {
  .h-rows { columns: 1; }
  .h-line .wrap { flex-wrap: wrap; justify-content: center; }
  .h-hero { padding-top: 64px; }
}

.h-kick { font: 600 13px/1.2 var(--num); letter-spacing: .16em; text-transform: uppercase; color: var(--go); margin-bottom: 22px; }
