/* PienoZero. Direzione: "vestito da cartello prezzi del distributore". Barlow Condensed + Barlow. */
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(/font/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(/font/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(/font/barlow-latin-500-normal.woff2) format("woff2"); }
:root {
  --bg: #0b0b0c;              /* notte di città */
  --surface: #1a1b1d;
  --ink: #f4f4f1;
  --muted: #9c9d99;
  --accent: #c6ff1a;          /* verde acido: elettrico, giovane */
  --accent-ink: #0b0b0c;
  --field-1: #ecebe6;  --field-1-ink: #0b0b0c;
  --field-2: #24262a;  --field-2-ink: #f4f4f1;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-sub: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem);

  --m: clamp(16px, 2.2vw, 32px);           /* margini esterni */
  --gap-sezione: clamp(120px, 14vw, 200px);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --testo: "Barlow", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.5 var(--testo); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 0.9; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.salta { position: absolute; left: -9999px; }
.salta:focus { left: var(--m); top: 8px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; }

/* Bottoni: piatti, angoli vivi, un solo colore */
.bottone { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; background: var(--accent); color: var(--accent-ink); border: 0; font: 500 var(--step-body) var(--testo); text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), background-color .15s; }
.bottone:hover { background: var(--ink); }
.bottone:active { transform: scale(.97); }
.bottone-piccolo { min-height: 44px; padding: 0 16px; font-size: var(--step-small); }
.bottone-chiaro { background: var(--surface); color: var(--ink); }
.bottone-chiaro:hover { background: var(--field-1); color: var(--field-1-ink); }
.link { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* Barra */
.barra { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px var(--m); }
.marchio { font: 700 var(--step-lead)/1 var(--display); letter-spacing: -0.01em; text-decoration: none; text-transform: uppercase; }
.barra nav { display: flex; gap: 28px; }
.barra nav a { text-decoration: none; font-size: var(--step-small); }
.barra nav a:hover { color: var(--accent); }

/* Hero: titolo gridato, foto che sale */
.hero { position: relative; min-height: calc(100svh - 84px); display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto 1fr auto; column-gap: 16px; padding: 0 var(--m); overflow: hidden; }
.hero-titolo { grid-column: 1 / -1; grid-row: 1; z-index: 2; margin-top: max(24px, 5svh); text-align: center; text-transform: uppercase; font-size: clamp(76px, 11.4vw, 184px); line-height: 0.86; }
.riga { display: block; overflow: hidden; padding-bottom: 0.04em; }
.riga > span { display: inline-block; }
.hero-foto { grid-column: 5 / 9; grid-row: 2 / 3; margin: -1.2vw 0 0; position: relative; z-index: 1; overflow: hidden; align-self: start; }
.hero-foto img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 100%; transform-origin: 50% 100%; animation: deriva 24s ease-in-out infinite alternate; }
@keyframes deriva { from { transform: scale(1.04); } to { transform: scale(1.14) translateY(-2%); } }
.hero-testo { grid-column: 1 / 5; grid-row: 3; align-self: end; max-width: 330px; margin-bottom: 32px; display: grid; gap: 20px; justify-items: start; }
.hero-cartello { grid-column: 9 / -1; grid-row: 3; align-self: end; justify-self: end; margin-bottom: 32px; text-align: right; display: grid; gap: 4px; }
.cartello-voce { font-size: var(--step-body); }
.cartello-cifra { font: 700 clamp(56px, 6vw, 96px)/0.9 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.cartello-fonte { font-size: var(--step-small); color: var(--muted); }

/* Quanto spendi: due cifre a confronto */
.spesa { padding: var(--gap-sezione) var(--m) 0; }
.spesa-testa { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; }
.spesa-testa h2 { grid-column: 1 / 6; font-size: var(--step-head); text-transform: uppercase; }
.spesa-intro { grid-column: 7 / -1; display: grid; gap: 28px; }
.comandi { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; align-items: end; margin-top: 40px; }
.cursore { display: grid; gap: 10px; font-weight: 500; }
.cursore output { color: var(--accent); font: 700 1.6em/1 var(--display); }
input[type=range] { width: 100%; height: 44px; accent-color: var(--accent); }
.scelta { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.scelta legend { padding: 0; margin-bottom: 8px; font-weight: 500; }
.scelta label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.scelta input { accent-color: var(--accent); width: 20px; height: 20px; }
.specimeni { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; margin-top: 12vh; }
.specimen { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.specimen-nome { font-size: var(--step-body); margin-top: 12px; }
.specimen-cifra { font: 700 clamp(180px, 27vw, 460px)/0.8 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; transition: opacity .2s; }
.specimen-inverso .specimen-cifra { color: var(--accent); }
.spesa-esito { margin-top: 32px; font: 700 var(--step-lead)/1.2 var(--testo); }
.spesa-nota { margin-top: 8px; font-size: var(--step-small); color: var(--muted); max-width: 60ch; }

/* Listino: il foglio stampato sopra la coda in auto */
.listino { position: relative; margin-top: var(--gap-sezione); padding: 120px var(--m); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; }
.listino-fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.foglio { position: relative; grid-column: 7 / -1; justify-self: center; width: min(640px, 100%); background: var(--field-1); color: var(--field-1-ink); padding: 72px 64px 64px; text-align: center;
  }
.foglio h2 { font-size: var(--step-sub); text-transform: uppercase; }
.foglio-nota { margin-top: 10px; font-size: var(--step-small); }
.gruppo { margin-top: 56px; }
.gruppo h3 { font-size: var(--step-lead); text-transform: uppercase; margin-bottom: 18px; }
.gruppo ul { list-style: none; margin: 0 auto; padding: 0; max-width: 500px; display: grid; gap: 8px; }
.voce { width: 100%; display: grid; grid-template-columns: 120px 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 16px; text-align: left; background: none; border: 0; padding: 10px 12px; margin: 0 -12px; width: calc(100% + 24px); color: inherit; font: inherit; cursor: pointer; transition: background-color .15s, transform .15s var(--ease); }
.voce:hover, .voce:focus-visible { background: var(--accent); }
.voce:active { transform: scale(.98); }
.voce-nome { font-weight: 500; font-size: var(--step-body); align-self: end; }
.voce-prezzo { font: 700 var(--step-lead)/1 var(--display); font-variant-numeric: tabular-nums; align-self: end; }
.voce-foto { grid-row: 1 / 3; width: 120px; height: 80px; object-fit: contain; }
.voce-dati { grid-column: 2 / -1; font-size: var(--step-small); align-self: start; }
.foglio-chiusa { margin-top: 56px; font-size: var(--step-body); }

/* Perché: fogli colorati che si impilano */
.perche { padding: var(--gap-sezione) var(--m) 0; }
.perche > h2 { font-size: var(--step-head); text-transform: uppercase; margin-bottom: 48px; }
.scheda { position: sticky; height: 60svh; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: 72px minmax(0, 1fr); column-gap: 16px; padding: 0 var(--m) var(--m); margin: 0 calc(-1 * var(--m)); }
.scheda h3 { grid-column: 1 / 7; grid-row: 1; align-self: center; font-size: var(--step-sub); text-transform: uppercase; }
.scheda p { grid-column: 1 / 6; grid-row: 2; align-self: end; max-width: 40ch; margin-bottom: 40px; }
.scheda img { grid-column: 7 / -1; grid-row: 2; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.scheda-1 { top: 0; background: var(--field-1); color: var(--field-1-ink); }
.scheda-2 { top: 72px; background: var(--accent); color: var(--accent-ink); }
.scheda-3 { top: 144px; background: var(--field-2); color: var(--field-2-ink); }

/* Domande: una banda per domanda */
.domande { margin-top: var(--gap-sezione); }
.banda { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; padding: 56px var(--m); background: var(--bg); }
.banda-alt { background: var(--surface); }
.banda h3 { grid-column: 1 / 6; font-size: var(--step-sub); line-height: 1; }
.banda p { grid-column: 7 / -1; max-width: 60ch; }
.banda-titolo { min-height: 40svh; align-items: end; background: var(--field-2); color: var(--field-2-ink); }
.banda-titolo h2 { grid-column: 1 / -1; font-size: clamp(64px, 9vw, 150px); text-transform: uppercase; }

/* Invito: la parola è il bottone */
.invito { position: relative; display: block; min-height: max(60svh, 44vw); background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 32px var(--m) 24px; overflow: hidden; transition: background-color .12s, color .12s; }
.invito:hover, .invito:focus-visible { background: var(--ink); color: var(--bg); }
.invito-frase { display: inline; font: 700 var(--step-sub)/1 var(--display); text-transform: uppercase; }
.invito-freccia { display: inline-block; vertical-align: middle; margin-left: 12px; width: 40px; height: 40px; transition: transform .2s var(--ease); }
.invito:hover .invito-freccia { transform: translate(6px, -6px); }
.invito-parola { position: absolute; left: var(--m); right: var(--m); bottom: 24px; font: 700 clamp(96px, 36vw, 720px)/0.8 var(--display); text-transform: uppercase; letter-spacing: -0.03em; }

/* Piede: il contatto è il titolo */
.piede { min-height: 72svh; display: grid; grid-template-rows: auto 1fr auto auto; gap: 32px; padding: 40px var(--m) 24px; background: var(--field-2); color: var(--field-2-ink); }
.piede-note { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; font-size: var(--step-small); }
.piede-note p:nth-child(1) { grid-column: 1 / 4; }
.piede-note p:nth-child(2) { grid-column: 4 / 8; }
.piede-note a[href="#titolo"] { grid-column: 12; justify-self: end; }
.piede-contatto { grid-row: 3; font: 700 clamp(48px, 10.5vw, 200px)/0.9 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.piede-contatto:hover { color: var(--accent); }
.piede-meta { grid-row: 4; display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 16px; font-size: var(--step-small); }
.piede-meta .crediti { color: var(--muted); max-width: 75ch; }
.piede-meta p:last-child { text-align: right; }
[data-da-completare] { background: var(--accent); color: var(--accent-ink); padding: 0 4px; }

/* Modulo */
.modulo { width: min(560px, calc(100vw - 20px)); max-height: calc(100svh - 20px); border: 0; padding: 0; background: var(--field-1); color: var(--field-1-ink); box-shadow: 0 24px 60px rgba(0,0,0,.5); /* taste-skill-ignore: dialogo, sta sopra la pagina */ }
.modulo::backdrop { background: rgba(10,10,10,.7); }
.modulo-passo { display: grid; gap: 16px; padding: 28px; }
.modulo-passo[hidden] { display: none; }
.modulo .scelta label { display: flex; font-weight: 400; }
.modulo-testa { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.modulo h2 { font-size: var(--step-sub); text-transform: uppercase; }
.chiudi { width: 44px; height: 44px; border: 0; background: none; font-size: 32px; line-height: 1; cursor: pointer; color: inherit; }
.modulo label { display: grid; gap: 6px; font-weight: 500; }
.modulo input:not([type=radio]):not([type=checkbox]), .modulo select { width: 100%; min-height: 48px; padding: 0 12px; border: 2px solid #9c9d99; background: #fff; color: var(--accent-ink); font: inherit; border-radius: 0; }
.modulo .spunta { display: flex; gap: 10px; align-items: start; font-weight: 400; font-size: var(--step-small); }
.modulo .spunta input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent-ink); }
.modulo .scelta-quando { flex-direction: column; gap: 0; }
.modulo .scelta input { accent-color: var(--accent-ink); }
.facoltativo { font-weight: 400 !important; }
.errore { background: var(--accent-ink); color: var(--accent); padding: 10px 12px; }
.prezzi { gap: 8px; }
.prezzi button { min-height: 44px; padding: 0 14px; border: 2px solid var(--accent-ink); background: none; font: 500 var(--step-body) var(--testo); cursor: pointer; }
.prezzi button:hover, .prezzi button[aria-pressed=true] { background: var(--accent-ink); color: var(--accent); }
.condividi { display: flex; gap: 8px; }
.condividi input { flex: 1; }

/* Cookie */
.cookie { position: relative; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px; background: var(--surface); color: var(--ink); font-size: var(--step-small); }
.cookie[hidden] { display: none; }
.senza-js { padding: 16px var(--m); background: var(--accent); color: var(--accent-ink); }

/* Entrate: visibili senza script, animate solo se lo script parte */
.js .entra { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--ritardo, 0ms); }
.js .entra.vista { opacity: 1; transform: none; }
.js .riga > span { transform: translateY(105%); animation: sale .9s var(--ease) forwards; }
.js .riga:nth-child(2) > span { animation-delay: .11s; }
@keyframes sale { to { transform: none; } }

@media (max-width: 1023px) {
  .barra nav, .barra .bottone { display: none; }
  .spesa-testa h2, .spesa-intro { grid-column: 1 / -1; }
  .spesa-intro { margin-top: 24px; }
  .foglio { grid-column: 1 / -1; }
  .banda h3, .banda p { grid-column: 1 / -1; }
  .banda p { margin-top: 16px; }
}
@media (max-width: 767px) {
  .voce { grid-template-columns: 84px 1fr auto; }
  .voce-foto { width: 84px; height: 56px; }
  .comandi { grid-template-columns: 1fr; }
  .hero { grid-template-rows: auto auto auto auto; min-height: auto; padding-bottom: 32px; }
  .hero-titolo { font-size: 12.4vw; margin-top: 8px; text-align: left; }
  .cartello-cifra { font-size: 48px; }
  .barra { padding-block: 14px; }
  .hero-foto { grid-column: 1 / -1; grid-row: 2; height: auto; margin-top: 16px; }
  .hero-foto img { aspect-ratio: 16 / 9; min-height: 0; }
  .hero-testo { grid-column: 1 / -1; grid-row: 4; max-width: none; margin: 20px 0 0; gap: 16px; }
  .hero-cartello { grid-column: 1 / -1; grid-row: 3; justify-self: start; text-align: left; margin: 20px 0 0; }
  .specimeni { grid-template-columns: 1fr; row-gap: 16px; margin-top: 48px; }
  .specimen { padding: 16px; margin: 0 calc(-1 * var(--m)); }
  .specimen-cifra { font-size: 42vw; }
  .specimen-inverso { background: var(--accent); color: var(--accent-ink); }
  .specimen-inverso .specimen-cifra { color: var(--accent-ink); }
  .listino { padding: 64px 10px; }
  .foglio { padding: 48px 28px; }
  .scheda { top: 0; height: auto; grid-template-columns: 1fr; grid-template-rows: auto auto auto; min-height: 70svh; padding: 0; margin: 0 calc(-1 * var(--m)); }
  .scheda-2 { top: 52px; } .scheda-3 { top: 104px; }
  .scheda h3 { grid-column: 1; min-height: 52px; display: flex; align-items: center; padding: 0 20px; font-size: var(--step-lead); }
  .scheda img { grid-column: 1; grid-row: 2; aspect-ratio: 4 / 3; height: auto; }
  .scheda p { grid-column: 1; grid-row: 3; padding: 20px; margin: 0; }
  .banda { padding: 32px 20px; }
  .banda h3 { font-size: 22px; }
  .banda-titolo { min-height: 30svh; }
  .banda-titolo h2 { font-size: 15vw; }
  .invito { min-height: 46svh; }
  .invito-frase { font-size: 17px; }
  .invito-freccia { width: 28px; height: 28px; }
  .invito-parola { font-size: 24vw; }
  .piede-note { grid-template-columns: 1fr; gap: 12px; }
  .piede-note > * { grid-column: 1 !important; justify-self: start !important; }
  .piede-contatto { font-size: 12.5vw; }
  .piede-meta { grid-template-columns: 1fr; }
  .piede-meta p:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-foto img { animation: none; }
  .js .entra { transform: none; transition: opacity .3s; }
  .js .riga > span { animation: none; transform: none; }
}
