/* Landing di Quali — canvas di design "Try 2 · Animations full-bleed", palette Pit Wall. */
:root {
  --tarmac: #0d0e10;
  --carbon: #17191d;
  --kerb: #2a2e35;
  --off: #3a3f47;
  --muted: #8b929c;
  --soft: #b9bec6;
  --text: #eceef0;
  --yellow: #ffd60a;
  --purple: #b26bff;
  --green: #2bd576;
  --red: #ff453a;
  --display: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --body: Saira, 'Arial Narrow', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--tarmac); color: var(--text); font-family: var(--body); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--yellow); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.display { margin: 0; font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; line-height: 0.9; }
.h2 { font-size: clamp(44px, 6vw, 80px); }
.lede { margin: 0; font-size: 19px; line-height: 1.5; color: var(--soft); max-width: 540px; text-wrap: pretty; }
.mono { font-family: var(--mono); }
.y { color: var(--yellow); }
.p { color: var(--purple); }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 24px; max-width: 1200px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand span { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 32px; line-height: 1; padding-right: 4px; }
.nav nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.navlinks { display: flex; gap: 28px; }
.navlinks a { color: var(--soft); text-decoration: none; }
.navlinks a:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px; background: var(--yellow); color: var(--tarmac); font-family: var(--display); font-weight: 800; font-style: italic; font-size: 18px; text-transform: uppercase; text-decoration: none; }
.btn:hover { color: var(--tarmac); filter: brightness(1.08); }

/* badge di download */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { height: 56px; min-width: 196px; border-radius: 12px; display: flex; align-items: center; gap: 12px; padding: 0 16px; text-decoration: none; color: var(--text); }
.badge:hover { filter: brightness(1.15); color: var(--text); }
.badge small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.badge strong { display: block; font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.05; }
.badge-web { border: 1px solid var(--yellow); background: var(--tarmac); }
.badge-ios { border: 1px dashed var(--off); background: #000; pointer-events: none; }
.badge-ios.is-live { border: 1px solid var(--kerb); pointer-events: auto; }

/* hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 48px; padding-bottom: 112px; }
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(60px, 9vw, 128px); line-height: 0.86; letter-spacing: -0.01em; }
.hero-art { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; position: relative; min-height: 680px; }
.tilt-card { position: absolute; right: 0; top: 70px; width: 300px; height: 375px; border-radius: 18px; background: var(--carbon); border: 1px solid var(--kerb); padding: 24px; transform: rotate(6deg); display: flex; flex-direction: column; gap: 16px; }
.phone { position: relative; width: 320px; height: 660px; border-radius: 44px; border: 1px solid var(--kerb); background: var(--tarmac); padding: 44px 16px 18px; display: flex; flex-direction: column; gap: 11px; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6); transform: rotate(-3deg); }
.ph-row { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ph-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.ph-bars i { display: block; height: 4px; border-radius: 2px; background: var(--kerb); }
.ph-bars b { display: block; text-align: center; font: 9px var(--mono); color: var(--muted); margin-top: 3px; font-weight: 400; }
.ph-title { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 24px; text-transform: uppercase; }
.track { border-radius: 14px; background-color: var(--carbon); background-image: linear-gradient(#22252b 1px, transparent 1px), linear-gradient(90deg, #22252b 1px, transparent 1px); background-size: 20px 20px; display: flex; align-items: center; justify-content: center; }
.clue { display: flex; gap: 10px; align-items: baseline; background: var(--carbon); border: 1px solid var(--kerb); border-radius: 10px; padding: 9px 11px; font-size: 14px; }
.clue .n { font-family: var(--mono); font-size: 11px; color: var(--yellow); }
.clue .l { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--muted); }
.ph-input { height: 42px; border-radius: 9px; background: #1f2227; border: 1px solid var(--kerb); display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-size: 15px; }
.ph-btns { display: flex; gap: 8px; margin-top: auto; }
.ph-btns span { height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 17px; text-transform: uppercase; }
.sq-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.sq { aspect-ratio: 1; border-radius: 6px; }
.s-p { background: var(--purple); } .s-g { background: var(--green); } .s-y { background: var(--yellow); } .s-o { background: var(--off); }
@media (max-width: 720px) { .tilt-card, .navlinks { display: none; } .hero-art { min-height: 0; } }

/* fascia "lights out" a tutta larghezza */
.band { background: #000; border-top: 1px solid var(--carbon); border-bottom: 1px solid var(--carbon); position: relative; overflow: hidden; }
.band-inner { min-height: 620px; display: grid; place-items: center; }
.lights { grid-area: 1 / 1; display: flex; gap: clamp(10px, 2vw, 28px); padding: clamp(14px, 2vw, 28px); background: var(--tarmac); border-radius: 28px; border: 1px solid var(--kerb); }
.light { width: clamp(44px, 9vw, 120px); aspect-ratio: 1; border-radius: 50%; background: var(--kerb); }
.band-logo { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.band-logo .mark { display: flex; align-items: center; gap: clamp(8px, 2vw, 24px); }
.band-logo .word { font-family: var(--display); font-weight: 800; font-style: italic; font-size: clamp(96px, 20vw, 280px); line-height: 0.8; letter-spacing: -0.02em; padding-right: 0.06em; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
.chip { font-family: var(--mono); font-size: 15px; padding: 6px 14px; border-radius: 6px; background: var(--carbon); }
.chip.on { background: var(--yellow); color: var(--tarmac); font-weight: 600; }
.streak { position: absolute; left: 0; top: 50%; width: 30vw; height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgba(255, 214, 10, 0), var(--yellow)); }

/* sezioni */
.section { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 40px; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.mode { background: var(--carbon); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.mode .art { height: 170px; border-radius: 10px; background: var(--tarmac); display: flex; align-items: center; justify-content: center; padding: 14px; }
.mode h3 { margin: 0; font-family: var(--display); font-weight: 800; font-style: italic; font-size: 28px; text-transform: uppercase; }
.mode p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--soft); }
.pill { font-family: var(--mono); font-size: 12px; border-radius: 6px; padding: 7px 10px; background: var(--kerb); }
.pill.locked { background: none; border: 1px dashed var(--off); color: var(--muted); }

.scoring { background: var(--carbon); }
.points { flex: 1 1 420px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 20px; font-size: 15px; line-height: 1.45; color: var(--soft); }
.points b { display: block; color: var(--text); font-size: 17px; }
.radio-box { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: center; background: var(--tarmac); border-radius: 28px; padding: clamp(24px, 4vw, 56px); }
.radio-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); display: inline-block; }
.wave { display: flex; align-items: center; gap: 6px; height: 64px; }
.wave i { width: 8px; height: 64px; border-radius: 4px; background: var(--yellow); transform-origin: 50% 50%; }
.typed { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; font-family: var(--mono); }
.tower { flex: 1 1 420px; min-width: 0; display: flex; gap: 10px; }
.tower .pos { width: 56px; flex: none; display: flex; flex-direction: column; gap: 10px; }
.tower .pos div { height: 72px; border-radius: 12px; background: var(--kerb); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; font-size: 22px; }
.tower .rows { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.row { height: 72px; border-radius: 12px; background: var(--carbon); display: flex; align-items: center; gap: 12px; padding: 0 18px; }
.row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-weight: 700; font-style: italic; font-size: 28px; text-transform: uppercase; padding-right: 4px; }
.row .t { font-family: var(--mono); font-weight: 600; font-size: 18px; }
.row.you { position: relative; z-index: 2; background: var(--yellow); color: var(--tarmac); }
.row.you .name { font-weight: 800; font-size: 32px; flex: none; }
.row.old { color: var(--muted); }
.pb-tag { font-family: var(--mono); font-weight: 600; font-size: 12px; padding: 4px 8px; border-radius: 5px; background: var(--green); color: var(--tarmac); }
.sectors { flex: 1 1 100%; display: flex; flex-direction: column; gap: 14px; }
.sector-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(6px, 1.4vw, 16px); }
.sector-grid div { display: flex; flex-direction: column; gap: 8px; align-items: center; font: 12px var(--mono); color: var(--muted); }
.sector-grid .sq { width: 100%; border-radius: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font: 12px var(--mono); color: var(--soft); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.share { display: flex; flex-wrap: wrap-reverse; gap: 56px; align-items: center; }
.share-card { width: 100%; max-width: 380px; border-radius: 20px; background: var(--tarmac); border: 1px solid var(--kerb); padding: 28px; display: flex; flex-direction: column; gap: 22px; background-image: linear-gradient(var(--carbon) 1px, transparent 1px), linear-gradient(90deg, var(--carbon) 1px, transparent 1px); background-size: 24px 24px; }

.cta { border-top: 1px solid var(--kerb); }
.cta .wrap { padding-top: 112px; padding-bottom: 112px; display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
.cta h2 { font-size: clamp(64px, 11vw, 160px); line-height: 0.85; }
footer { border-top: 1px solid var(--kerb); }
footer .wrap { padding-top: 32px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; font-size: 14px; color: var(--muted); }
footer a { color: var(--soft); }

/* ── animazioni (dal design; partono solo con la sezione in vista, vedi landing.js) ── */
[data-animate]:not(.in-view) * { animation-play-state: paused !important; }
.l1, .l2, .l3, .l4, .l5 { animation: 5s linear infinite; }
.l1 { animation-name: qL1; } .l2 { animation-name: qL2; } .l3 { animation-name: qL3; } .l4 { animation-name: qL4; } .l5 { animation-name: qL5; }
@keyframes qL1 { 0%, 8% { background: var(--kerb); box-shadow: none; } 8.5%, 44% { background: var(--red); box-shadow: 0 0 60px rgba(255, 69, 58, 0.6); } 44.5%, 100% { background: var(--kerb); box-shadow: none; } }
@keyframes qL2 { 0%, 14% { background: var(--kerb); box-shadow: none; } 14.5%, 44% { background: var(--red); box-shadow: 0 0 60px rgba(255, 69, 58, 0.6); } 44.5%, 100% { background: var(--kerb); box-shadow: none; } }
@keyframes qL3 { 0%, 20% { background: var(--kerb); box-shadow: none; } 20.5%, 44% { background: var(--red); box-shadow: 0 0 60px rgba(255, 69, 58, 0.6); } 44.5%, 100% { background: var(--kerb); box-shadow: none; } }
@keyframes qL4 { 0%, 26% { background: var(--kerb); box-shadow: none; } 26.5%, 44% { background: var(--red); box-shadow: 0 0 60px rgba(255, 69, 58, 0.6); } 44.5%, 100% { background: var(--kerb); box-shadow: none; } }
@keyframes qL5 { 0%, 32% { background: var(--kerb); box-shadow: none; } 32.5%, 44% { background: var(--red); box-shadow: 0 0 60px rgba(255, 69, 58, 0.6); } 44.5%, 100% { background: var(--kerb); box-shadow: none; } }
.lights { animation: qLightsAway 5s infinite cubic-bezier(0.5, 0, 0.2, 1); }
@keyframes qLightsAway { 0%, 46% { opacity: 1; transform: scale(1); } 54%, 100% { opacity: 0; transform: scale(0.92); } }
.band-logo .mark { animation: qLogo 5s infinite cubic-bezier(0.2, 0.9, 0.2, 1); }
@keyframes qLogo { 0%, 50% { opacity: 0; transform: translateX(-120px) skewX(-12deg); } 62%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: translateX(80px); } }
.ring { stroke-dasharray: 164; animation: qRing 5s infinite cubic-bezier(0.6, 0, 0.2, 1); }
@keyframes qRing { 0%, 50% { stroke-dashoffset: 164; } 62%, 100% { stroke-dashoffset: 0; } }
.tail { transform-box: fill-box; transform-origin: 0 0; animation: qTail 5s infinite cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes qTail { 0%, 60% { transform: scale(0); } 66%, 100% { transform: scale(1); } }
.streak { animation: qStreak 5s infinite cubic-bezier(0.5, 0, 0.3, 1); }
@keyframes qStreak { 0%, 50% { opacity: 0; transform: translateX(-30vw); } 53% { opacity: 1; } 64%, 100% { opacity: 0; transform: translateX(110vw); } }
.chips { animation: qSub 5s infinite ease-out; }
@keyframes qSub { 0%, 66% { opacity: 0; transform: translateY(12px); } 72%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }

.dot { animation: bDot 1s infinite steps(2, jump-none); }
@keyframes bDot { to { opacity: 0.2; } }
.wave i { animation: bWave 6s infinite ease-in-out; }
.wave i:nth-child(2) { animation-delay: -0.12s; } .wave i:nth-child(3) { animation-delay: -0.24s; } .wave i:nth-child(4) { animation-delay: -0.36s; }
.wave i:nth-child(5) { animation-delay: -0.48s; } .wave i:nth-child(6) { animation-delay: -0.6s; } .wave i:nth-child(7) { animation-delay: -0.72s; }
@keyframes bWave { 0%, 2% { transform: scaleY(0.15); } 6% { transform: scaleY(1); } 10% { transform: scaleY(0.4); } 14% { transform: scaleY(0.9); } 18% { transform: scaleY(0.3); } 22% { transform: scaleY(1); } 26% { transform: scaleY(0.5); } 30%, 100% { transform: scaleY(0.15); } }
.t1 { animation: bT1 6s infinite; } .t2 { animation: bT2 6s infinite; }
@keyframes bT1 { 0%, 3% { width: 0; animation-timing-function: steps(22, end); } 15%, 100% { width: 22ch; } }
@keyframes bT2 { 0%, 17% { width: 0; animation-timing-function: steps(21, end); } 28%, 100% { width: 21ch; } }
.b-in { animation: bIn 6s infinite cubic-bezier(0.2, 0.9, 0.2, 1); }
@keyframes bIn { 0%, 8% { opacity: 0; transform: translateX(60px); } 14%, 100% { opacity: 1; transform: none; } }
.b-you { animation: bYou 6s infinite cubic-bezier(0.6, 0, 0.2, 1); }
@keyframes bYou { 0%, 8% { opacity: 0; transform: translate(60px, 82px); box-shadow: none; } 14%, 30% { opacity: 1; transform: translate(0, 82px); box-shadow: none; } 40% { transform: translate(0, 0); box-shadow: 0 0 0 6px rgba(255, 214, 10, 0.35); } 48%, 100% { opacity: 1; transform: translate(0, 0); box-shadow: none; } }
.b-pb { animation: bPb 6s infinite cubic-bezier(0.6, 0, 0.2, 1); }
@keyframes bPb { 0%, 8% { opacity: 0; transform: translate(60px, -82px); } 14%, 30% { opacity: 1; transform: translate(0, -82px); } 40%, 100% { opacity: 1; transform: translate(0, 0); } }
.b-tag { animation: bTag 6s infinite cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes bTag { 0%, 38% { opacity: 0; transform: scale(0); } 44%, 100% { opacity: 1; transform: scale(1); } }
.b-late { animation: bLate 6s infinite ease-out; }
@keyframes bLate { 0%, 42% { opacity: 0; transform: translateY(10px); } 50%, 100% { opacity: 1; transform: none; } }
.b-sq { animation: bSq 6s infinite cubic-bezier(0.3, 1.6, 0.5, 1); }
.sector-grid div:nth-child(2) .b-sq { animation-delay: 0.08s; } .sector-grid div:nth-child(3) .b-sq { animation-delay: 0.16s; }
.sector-grid div:nth-child(4) .b-sq { animation-delay: 0.24s; } .sector-grid div:nth-child(5) .b-sq { animation-delay: 0.32s; }
@keyframes bSq { 0%, 46% { opacity: 0; transform: scale(0); } 50%, 100% { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; }
  .lights, .streak { display: none; }
  .ring { stroke-dashoffset: 0; }
  .t1, .t2 { width: auto; }
}

/* ── ritocchi responsive ── */
/* il telefono del mockup è ruotato: su schermi stretti sborderebbe di qualche px */
main { overflow-x: clip; }
.phone { width: min(320px, 88vw); }
/* 5 settori (il design ne aveva 10): senza limite su desktop diventano lastre */
.sector-grid { max-width: 640px; }
@media (max-width: 720px) {
  .band-inner { min-height: 440px; }
  .section { padding-top: 72px; padding-bottom: 72px; }
}
