/* Col Cuore v7 — la graffa cambia gusto e la pagina cambia colore. Carattere del marchio: Inter (come nel PDF). */
:root {
  --rosa: #E6AFB7;
  --bordeaux: #651D36;
  --crema: #FCF7F1;
  --antracite: #272024;
  --cioccolato: #3A1D14;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --g: clamp(16px, 4vw, 56px);
  --esce: cubic-bezier(.4, 0, .2, 1);
  --fondo: #E6AFB7;
  --inchiostro: #651D36;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--crema); color: var(--bordeaux); font-family: var(--sans); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ol, dl, dd, figure { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
h1, h2, .gusto-prezzo, .piede p, .firma-risposta, .marchio { font-family: "Bricolage Grotesque", var(--sans); }
h1, h2 { font-weight: 800; font-variation-settings: "wdth" 88, "opsz" 96; letter-spacing: -.035em; line-height: .88; }
/* le lettere che lievitano: ogni carattere ha il suo peso e la sua larghezza */
.parola { display: inline-block; white-space: nowrap; }
.parola { overflow: clip; padding: .08em .14em .12em .04em; margin: -.08em -.14em -.12em -.04em; vertical-align: top; }
.c { display: inline-block; transform-origin: 50% 100%; will-change: transform; }

.bozza { position: fixed; z-index: 60; bottom: 12px; left: 12px; padding: 6px 10px; border-radius: 4px; background: var(--antracite); color: var(--crema); font-size: 11px; }
.todo { font-style: italic; opacity: .8; }
.todo::before { content: "TODO · "; font-style: normal; font-weight: 700; font-size: .72em; letter-spacing: .08em; }

.bottone { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1.5px solid var(--b-pieno); background: var(--b-pieno); color: var(--b-testo); font-weight: 700; font-size: 16px; cursor: pointer; transition: transform .35s var(--esce), background .35s, color .35s; }
.bottone--vuoto { background: transparent; color: var(--b-pieno); }
.bottone:hover { transform: translateY(-2px); }

/* Testata: prende l'inchiostro del gusto */
.testa { position: fixed; z-index: 50; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 16px var(--g); color: var(--bordeaux); pointer-events: none; }
.testa a { pointer-events: auto; }
.marchio { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 850; letter-spacing: -.01em; font-size: 15px; }
.marchio svg { width: 22px; height: 24px; }
.pillola { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid currentColor; font-weight: 700; font-size: 13px; }

/* ===== IL PALCO ===== senza JS: i gusti uno sotto l'altro */
.palco-scena { position: relative; background: var(--fondo); color: inherit; }
.gusti { display: grid; gap: 24px; padding: 100px var(--g) 60px; }
.gusto-foto img:not(:first-child) { display: none; }
.gusto { padding: 24px 0; }
.gusto-n { font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.gusto-nome { font-size: clamp(56px, 9.4vw, 156px); margin: 10px 0 18px; }
.gusto-desc { max-width: 30ch; font-size: clamp(17px, 1.5vw, 21px); font-weight: 500; }
.gusto-prezzo { margin-top: 18px; font-size: 28px; font-weight: 850; letter-spacing: -.02em; }
.gusto-prezzo span { display: block; font-size: 15px; font-weight: 500; font-style: italic; letter-spacing: 0; }
.gusto-prezzo.todo { font-size: 16px; font-weight: 600; }
.velo { display: none; }
.apertura-testo { padding: 110px var(--g) 0; }

.film-on .palco { height: 640vh; }
.film-on .palco-scena { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip; }
.film-on .gusti { position: absolute; inset: 0; padding: 0; display: block; }
.film-on .gusto-foto { position: absolute; z-index: 2; left: 50%; top: 64px; width: min(92vw, 50svh); aspect-ratio: 1; translate: -50% 0; }
.gusto-giro { position: relative; width: 100%; height: 100%; }
.film-on .gusto-foto { perspective: 1200px; }
.film-on .gusto-foto img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }

.film-on .gusto-foto img { -webkit-mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); will-change: transform, opacity; }

.film-on .gusto-testi { position: absolute; left: var(--g); right: var(--g); bottom: 6svh; }
.film-on .gusto { position: absolute; left: 0; right: 0; bottom: 0; padding: 0; visibility: hidden; }
.film-on .gusto.is-on { visibility: visible; }
.film-on .gusto-nome { font-size: clamp(48px, 14vw, 156px); margin: 6px 0 10px; }
@media (min-width: 900px) {
  .film-on .gusto-foto { left: auto; right: 2vw; top: 50%; width: min(88vh, 54vw); translate: 0 -50%; }
  .film-on .gusto-testi { right: auto; width: 44vw; bottom: 50%; transform: translateY(50%); }
  .film-on .gusto { bottom: auto; top: 50%; transform: translateY(-50%); }
  .film-on .gusto-nome { font-size: clamp(64px, 9.4vw, 156px); }
}

.film-on .velo { display: block; position: absolute; inset: 0; z-index: 5; color: var(--bordeaux); }
.velo-svg { width: 100%; height: 100%; display: block; }
.velo-fondo { fill: var(--crema); }
.film-on .apertura-testo { display: block; position: absolute; z-index: 6; left: var(--g); bottom: 7svh; color: var(--bordeaux); }
.apertura-testo h1 { font-size: clamp(44px, 7.4vw, 120px); }
.apertura-testo p { margin-top: 14px; font-weight: 500; }

/* ===== ZUCCHERO ===== */
.zucchero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: clip; background: #2C201F; color: var(--crema); }
.zucchero-foto, .zucchero-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.zucchero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(44,32,31,0) 45%, rgba(44,32,31,.75)); }
.zucchero-tela { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.zucchero-testo { position: relative; z-index: 3; padding: 0 var(--g) 9svh; }
.zucchero h2 { font-size: clamp(48px, 9vw, 150px); font-style: italic; }
.zucchero-testo p { max-width: 40ch; margin-top: 20px; font-weight: 500; opacity: .85; }

/* ===== FIRMA ===== */
.firma { display: grid; gap: 40px; padding: clamp(100px, 13vw, 170px) var(--g); background: var(--bordeaux); color: var(--crema); }
.firma h2 { font-size: clamp(60px, 10vw, 168px); }
.firma-testo > p:not(.firma-risposta) { max-width: 38ch; margin-top: 26px; font-size: 18px; font-weight: 500; opacity: .9; }
.firma-bottoni { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.firma { --b-pieno: var(--crema); --b-testo: var(--bordeaux); }
.firma .bottone[aria-pressed="true"] { background: var(--rosa); border-color: var(--rosa); color: var(--bordeaux); }
.firma-risposta { min-height: 2.4em; margin-top: 22px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.firma-foto { position: relative; max-width: 640px; border-radius: 18px; overflow: clip; }
.firma-foto img { width: 100%; transition: transform 1.2s var(--esce); }
.firma[data-scelta="col"] .firma-foto img { transform: scale(1.04); }
.firma-cioccolato { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--cioccolato); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 3px rgba(40,10,5,.4)); }
.firma-cioccolato use { stroke-dasharray: 470; stroke-dashoffset: 470; opacity: 0; transition: stroke-dashoffset 1.3s var(--esce) .2s, opacity .2s .2s; }
.firma[data-scelta="col"] .firma-cioccolato use { stroke-dashoffset: 0; opacity: 1; }
@media (min-width: 900px) { .firma { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 6vw; } }

/* ===== CUORICINI ===== */
.cuoricini { display: grid; gap: 30px; padding: clamp(100px, 13vw, 170px) var(--g) clamp(60px, 8vw, 120px); background: var(--crema); color: var(--bordeaux); }
.cuoricini h2 { font-size: clamp(60px, 10vw, 168px); }
.cuoricini-testo > p:first-of-type { max-width: 36ch; margin-top: 24px; font-size: 18px; font-weight: 500; }
.quanti { display: flex; gap: 10px; margin-top: 28px; }
.cuoricini { --b-pieno: var(--bordeaux); --b-testo: var(--crema); }
.cuoricini-nota { margin-top: 26px; font-weight: 800; letter-spacing: -.01em; }
.cuoricini-nota span { display: block; font-weight: 500; opacity: .7; }
.cuoricini { position: relative; isolation: isolate; }
.secchiello { position: absolute; inset: 0; z-index: 0; }
.cuoricini-testo { position: relative; z-index: 1; pointer-events: none; }
.cuoricini-testo button { pointer-events: auto; }
.secchiello-tela { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.cuoricini { min-height: 100svh; padding-bottom: min(70svh, 560px); }
@media (min-width: 900px) { .cuoricini { display: flex; align-items: center; padding-bottom: clamp(60px, 8vw, 120px); } .cuoricini-testo { max-width: 46%; } }

/* ===== DOVE ===== */
.dove { display: grid; background: var(--antracite); color: var(--crema); }
.dove-foto { width: 100%; height: 100%; max-height: 100vh; object-fit: cover; }
.dove-testo { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(64px, 9vw, 130px) var(--g); }
.dove h2 { font-size: clamp(44px, 6vw, 96px); }
.dove-testo > p { max-width: 40ch; font-size: 18px; opacity: .85; }
.dati { display: grid; gap: 18px; margin-top: 14px; padding-top: 22px; border-top: 1px solid rgba(252,247,241,.2); }
.dati dt { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rosa); }
@media (min-width: 900px) { .dove { grid-template-columns: 42% 1fr; } .dati { grid-template-columns: repeat(3, 1fr); } }

.piede { display: flex; flex-direction: column; align-items: center; gap: 26px; padding: clamp(90px, 12vw, 160px) var(--g) 90px; text-align: center; background: var(--rosa); color: var(--bordeaux); }
.piede-cuore { width: 64px; height: 72px; }
.piede p { max-width: 26ch; font-size: clamp(24px, 3vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.piede .piede-firma { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  .bottone, .firma-foto img, .firma-cioccolato use, .testa { transition: none; }
}

/* v8 — la crema che cola: il colore nuovo scende dall'alto con le gocce */
.colata, .briciole, .indice { display: none; }
.film-on .colata { display: none; position: absolute; left: 0; right: 0; top: 0; height: 100%; z-index: 0; pointer-events: none; transform: translateY(-130%); }
.colata-corpo { position: absolute; inset: 0; background: var(--nuovo); }
.colata-gocce { position: absolute; left: 0; top: calc(100% - 1px); width: 100%; height: 26vh; fill: var(--nuovo); transform-origin: 50% 0; }
.film-on .briciole { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.film-on .gusto-testi { z-index: 3; }

/* l'indice dei gusti */
.film-on .indice { display: flex; position: absolute; z-index: 4; left: 50%; translate: -50% 0; bottom: 14px; gap: 6px; transition: opacity .4s; }
.indice button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.indice button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; transition: background .3s, transform .4s var(--esce); }
.indice button[aria-current="true"]::before { background: currentColor; transform: scale(1.35); }
.indice span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 899px) { .film-on .gusto-testi { bottom: calc(6svh + 40px); } }
@media (min-width: 900px) {
  .film-on .indice { left: var(--g); translate: none; bottom: 5svh; flex-direction: row; gap: 22px; }
  .indice button { width: auto; height: 44px; grid-auto-flow: column; gap: 10px; font-weight: 700; font-size: 13px; letter-spacing: .02em; opacity: .55; transition: opacity .3s; }
  .indice button[aria-current="true"], .indice button:hover { opacity: 1; }
  .indice span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

/* telefono in orizzontale: si usa la scena a due colonne, il nome non copre la graffa */
@media (max-width: 899px) and (orientation: landscape) and (max-height: 520px) {
  .film-on .gusto-foto { left: auto; right: 3vw; top: 50%; width: min(80svh, 46vw); translate: 0 -50%; }
  .film-on .gusto-testi { right: auto; width: 48vw; bottom: 50%; transform: translateY(50%); }
  .film-on .gusto { bottom: auto; top: 50%; transform: translateY(-50%); }
  .film-on .gusto-nome { font-size: min(9vw, 15svh); }
  .film-on .gusto-desc { font-size: 14px; }
  .film-on .indice { bottom: 4px; }
}

/* le creme: si sceglie la siringa */
.creme-titolo { margin-top: 26px; font-weight: 700; }
.creme { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.crema { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 8px; border-radius: 999px; border: 1.5px solid rgba(101,29,54,.25); background: transparent; color: var(--bordeaux); font-weight: 700; font-size: 14px; cursor: pointer; transition: border-color .25s, transform .3s var(--esce), background .25s; }
.crema i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), inset -3px -4px 0 rgba(0,0,0,.08); }
.crema:hover { transform: translateY(-2px); border-color: var(--bordeaux); }
.crema[aria-pressed="true"] { border-color: var(--bordeaux); background: rgba(101,29,54,.08); }
.creme-conto { min-height: 1.5em; margin-top: 12px; font-weight: 800; }
.con-siringa .secchiello-tela { cursor: url(../img/siringa.svg) 4 28, copy; }

/* v9 — Col cuore o senza: scena fissa, il cuore scende */
.firma-palco { display: contents; }
.firma-foto { overflow: visible; }
.firma-foto img { border-radius: 18px; }
.firma-ombra { display: none; }
.film-on .firma { display: block; height: 240vh; padding: 0; overflow: clip; }
.film-on .firma-palco { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; gap: 28px; align-content: center; padding: 80px var(--g) 40px; }
.film-on .firma-cioccolato use { stroke-dasharray: none; stroke-dashoffset: 0; opacity: 1; transition: none; }
.film-on .firma-cioccolato { transform-origin: 50% 40%; will-change: transform; }
.film-on .firma[data-scelta="senza"] .firma-cioccolato { visibility: hidden; }
.film-on .firma-ombra { display: block; position: absolute; left: 50%; top: 43%; width: 22%; height: 7%; margin-left: -11%; border-radius: 50%; background: radial-gradient(closest-side, rgba(60,20,10,.35), transparent); pointer-events: none; }
.film-on .firma[data-scelta="senza"] .firma-ombra { visibility: hidden; }
.film-on .firma-foto { max-width: min(560px, 46svh); justify-self: center; width: 100%; }
@media (max-width: 899px) { .film-on .firma h2 { font-size: clamp(48px, 13vw, 90px); } .film-on .firma-testo > p:not(.firma-risposta) { margin-top: 14px; font-size: 16px; } .film-on .firma-bottoni { margin-top: 18px; } .film-on .firma-foto { max-width: 38svh; } }
@media (min-width: 900px) { .film-on .firma-palco { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 6vw; } .film-on .firma-foto { max-width: min(600px, 74svh); justify-self: end; } }

/* v9 — Dove: la saracinesca */
.dove-vetrina { position: relative; overflow: clip; min-height: 60vh; }
.dove-vetrina .dove-foto { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; }
.saracinesca { position: absolute; inset: 0; z-index: 2; display: none; place-items: end center; padding-bottom: 12%;
  background: repeating-linear-gradient(180deg, #b9b3ad 0 14px, #8f8a85 14px 16px, #cfc9c3 16px 18px, #a8a29c 18px 30px);
  box-shadow: inset 0 -18px 0 #6f6a66; }
.saracinesca span { padding: 10px 18px; border-radius: 6px; background: var(--rosa); color: var(--bordeaux); font-weight: 800; letter-spacing: .02em; transform: rotate(-3deg); }
.film-on .saracinesca { display: grid; }
@media (min-width: 900px) { .dove-vetrina { min-height: 100vh; } }

/* v10 — lo zucchero: scena ferma, la camera si avvicina e lo zucchero si posa sulla graffa */
.zucchero-palco { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; }
.zucchero-scena { position: absolute; inset: 0; will-change: transform; }
.zucchero::after { z-index: 1; pointer-events: none; }
.film-on .zucchero { display: block; height: 260vh; }
.film-on .zucchero::after { display: none; }
.film-on .zucchero-palco { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip; }
.film-on .zucchero-palco::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(44,32,31,0) 45%, rgba(44,32,31,.8)); }
.film-on .zucchero-testo { z-index: 3; }

/* v10 — i gusti si spiegano da soli: barra di avanzamento e invito al prossimo */
.avanzamento, .prossimo { display: none; }
.film-on .avanzamento { display: block; position: absolute; z-index: 4; left: 0; right: 0; top: 0; height: 3px; background: rgba(0,0,0,.08); opacity: 0; }
.avanzamento i { display: block; height: 100%; background: currentColor; transform-origin: 0 50%; transform: scaleX(0); }
.film-on .prossimo { display: inline-flex; align-items: center; gap: 8px; position: absolute; z-index: 4; right: var(--g); bottom: 5svh; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid currentColor; background: transparent; color: inherit; font-size: 14px; font-weight: 600; cursor: pointer; opacity: 0; transition: opacity .4s; }
.prossimo b { font-weight: 800; }
.prossimo em { font-style: normal; display: inline-block; animation: giu 1.6s ease-in-out infinite; }
@keyframes giu { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(4px); } }
.film-on .prossimo.si { opacity: 1; }
@media (max-width: 899px) {
  .film-on .prossimo { bottom: auto; top: 70px; right: var(--g); font-size: 13px; min-height: 40px; padding: 0 14px; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); }
  .indice button::before { width: 10px; height: 10px; border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) { .prossimo em { animation: none; } }
