:root {
  --nero: #0c0806;
  --cupola: #1a110c;
  --crema: #f6eadb;
  --crema-2: #c9b29b;
  --cenere: #6b5a4e;
  --brace: #ff6a1f;
  --brace-2: #c2410c;
  --oro: #ffb547;
  --f-titolo: "Fraunces", Georgia, serif;
  --f-testo: "Instrument Sans", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --margine: clamp(1rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--nero); color: var(--crema); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; font-family: var(--f-testo); font-size: 1.0625rem; line-height: 1.6; background: var(--nero); overflow-x: clip; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--f-titolo); font-weight: 400; margin: 0; line-height: 1.02; font-variation-settings: "opsz" 144; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; }

.salta { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--crema); color: var(--nero); padding: .6rem 1rem; border-radius: 99px; }
.salta:focus { top: 1rem; }
.v-nascosto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.etichetta { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--oro); margin-bottom: 1.1rem; }

/* ---------- testata: marchio a forma di bocca, voci in mono, brace che respira ---------- */
.testata {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem var(--margine);
  transition: background-color .5s ease, padding .5s ease;
}
.testata.scura { background: rgb(12 8 6 / .82); padding-block: .7rem; }
.marchio { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-family: var(--f-titolo); font-size: 1.25rem; letter-spacing: .01em; }
.marchio svg { width: 34px; height: 34px; color: var(--crema); }
.marchio-fiamma { color: var(--brace); fill: var(--brace); transform-origin: 20px 31px; animation: fiammella 2.4s ease-in-out infinite; }
@keyframes fiammella { 0%, 100% { transform: scale(1, 1); } 40% { transform: scale(.94, 1.08); } 70% { transform: scale(1.04, .95); } }
.voci { display: flex; gap: 1.6rem; margin-left: auto; }
.voci a { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--crema-2); transition: color .25s ease; }
.voci a:hover { color: var(--crema); }

.brace-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: .7rem 1.35rem; border-radius: 99px; border: 0; cursor: pointer;
  font: 600 .875rem/1 var(--f-testo); letter-spacing: .04em; color: #1b0d05; text-decoration: none;
  background: radial-gradient(120% 140% at 30% 20%, var(--oro), var(--brace) 45%, var(--brace-2));
  box-shadow: 0 6px 24px -6px rgb(255 106 31 / .55);
  overflow: hidden; isolation: isolate;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.brace-btn::after { content: ""; position: absolute; inset: -40%; z-index: -1; background: radial-gradient(closest-side, rgb(255 230 170 / .55), transparent); animation: respiro 3.2s ease-in-out infinite; }
@keyframes respiro { 0%, 100% { transform: translate(-18%, 8%) scale(.8); opacity: .5; } 50% { transform: translate(14%, -6%) scale(1.1); opacity: 1; } }
.brace-btn:hover { transform: translateY(-2px) scale(1.03); }
.brace-btn:active { transform: scale(.97); }
.brace-btn.grande { padding: 1.05rem 1.8rem; font-size: 1rem; }

/* ---------- 1 · il forno ---------- */
.forno { position: relative; height: 430svh; }
.forno-fermo { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--nero); }
.sala-img, .sala-gl { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform-origin: 50% 45%; will-change: transform; }
.sala-gl { opacity: 0; }
.sala-gl.pronto { opacity: 1; }
.palco { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.strato { position: absolute; will-change: transform, opacity; user-select: none; -webkit-user-drag: none; }
.strato-forno { display: block; }
.strato-forno img { width: 100%; height: 100%; }
.strato-fuoco { mix-blend-mode: screen; }
.strato-pizza { filter: drop-shadow(0 18px 22px rgb(0 0 0 / .55)); }
.strato-titolo { display: flex; align-items: center; justify-content: center; pointer-events: none; }
.titolo { font-size: 150px; line-height: .9; text-align: center; letter-spacing: -.01em; color: var(--crema); font-weight: 350; text-shadow: 0 6px 30px rgb(0 0 0 / .55); }
.titolo .riga { display: block; }
.titolo .riga + .riga { font-style: italic; font-weight: 300; }
.titolo .lettera { display: inline-block; }
.scintille { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fumo {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: .8rem; pointer-events: none;
  background:
    radial-gradient(55% 45% at 30% 60%, rgb(90 60 40 / .55), transparent 70%),
    radial-gradient(50% 60% at 72% 40%, rgb(70 48 34 / .6), transparent 70%),
    radial-gradient(90% 90% at 50% 50%, rgb(20 13 9 / .82), rgb(12 8 6 / .96));
}
.fumo-kicker { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .3em; text-transform: uppercase; color: var(--oro); }
.fumo-invito { font-family: var(--f-titolo); font-style: italic; font-size: clamp(1.6rem, 4vw, 2.6rem); color: var(--crema); }
.in-sala { position: absolute; left: 50%; bottom: 14svh; translate: -50% 0; width: min(90vw, 40rem); text-align: center; font-family: var(--f-titolo); font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.05; color: var(--crema); opacity: 0; pointer-events: none; text-shadow: 0 2px 18px rgb(0 0 0 / .7), 0 0 60px rgb(0 0 0 / .5); }
.in-sala::before { content: ""; position: absolute; inset: -40% -20%; z-index: -1; background: radial-gradient(closest-side, rgb(12 8 6 / .62), transparent); }
.in-sala em { font-weight: 300; color: var(--oro); }
.strumenti { position: absolute; inset: 0; pointer-events: none; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: rgb(246 234 219 / .8); opacity: 0; }
.strumenti p { position: absolute; line-height: 1.5; }
.str-sub { color: rgb(246 234 219 / .45); }
.str-num { font-size: 1.5rem; letter-spacing: 0; color: var(--oro); font-variant-numeric: tabular-nums; }
.str-a { left: var(--margine); top: 6.2rem; }
.str-b { right: var(--margine); top: 6.2rem; text-align: right; }
.str-c { left: var(--margine); bottom: 1.6rem; }
.str-d { right: var(--margine); bottom: 1.6rem; }

/* ---------- 2 · l'impasto: parole che si accendono ---------- */
.impasto { position: relative; height: 260svh; }
.impasto-fermo { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; padding: 0 var(--margine); overflow: hidden; }
.impasto-fermo::before { content: ""; position: absolute; width: 70vmax; height: 70vmax; left: var(--gx, 50%); top: var(--gy, 60%); translate: -50% -50%; background: radial-gradient(closest-side, rgb(255 106 31 / .22), transparent); pointer-events: none; }
.accese { position: relative; max-width: 17em; font-family: var(--f-titolo); font-size: clamp(2.2rem, 6.2vw, 5.6rem); line-height: 1.08; letter-spacing: -.015em; }
.accese .parola { display: inline-block; color: var(--cenere); transition: color .08s linear; }
.accese .parola.viva { color: var(--crema); }
.accese .parola.brucia { color: var(--oro); }
.accese .a-capo { display: block; height: 0; }

/* ---------- 3 · le mani: binario laterale ---------- */
.mani { position: relative; height: 340svh; }
.mani-fermo { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.mani-intro { position: relative; z-index: 2; flex: 0 0 auto; width: min(30rem, 34vw); padding: 0 2.5rem 0 var(--margine); align-self: stretch; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(90deg, var(--nero) 78%, transparent); }
.mani-intro h2 { font-size: clamp(2.2rem, 4.2vw, 3.8rem); }
.mani-conta { margin-top: 2rem; font-family: var(--f-mono); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--crema-2); }
.mani-conta span { color: var(--oro); font-size: 1.4rem; }
.binario { list-style: none; margin: 0; padding: 0 10vw 0 2rem; display: flex; gap: clamp(1.2rem, 3vw, 3rem); will-change: transform; }
.scatto { flex: 0 0 auto; width: clamp(15rem, 26vw, 24rem); transition: opacity .4s ease; }
.scatto figure { margin: 0; }
.scatto-foto { overflow: hidden; border-radius: 6px; aspect-ratio: 3 / 4; background: var(--cupola); }
.scatto-foto img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); will-change: transform; }
.scatto figcaption { margin-top: 1rem; color: var(--crema-2); font-size: .95rem; max-width: 22rem; }
.scatto figcaption strong { display: block; font-family: var(--f-titolo); font-weight: 400; font-size: 1.7rem; color: var(--crema); margin-bottom: .2rem; }
.scatto-n { display: block; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--oro); margin-bottom: .4rem; }

/* ---------- 4 · la cottura ---------- */
.cottura { position: relative; height: 420svh; }
.cottura-fermo { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .7fr); align-items: center; gap: 2rem; padding: 0 var(--margine); overflow: hidden; }
.cottura-fermo::before { content: ""; position: absolute; inset: 0; background: radial-gradient(45% 55% at 55% 50%, rgb(255 106 31 / calc(var(--calore, 0) * .32)), transparent 70%); pointer-events: none; }
.cottura-testo h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); margin-bottom: 2rem; }
.tappe { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.tappe li { display: grid; grid-template-columns: 3.4rem 1fr; color: var(--cenere); transition: color .35s ease, transform .35s ease; }
.tappe li span { font-family: var(--f-mono); font-size: .8rem; padding-top: .2rem; }
.tappe li.fatta { color: var(--crema-2); }
.tappe li.ora { color: var(--crema); transform: translateX(.4rem); }
.tappe li.ora span { color: var(--oro); }
.cottura-pizza { position: relative; width: min(100%, 72svh); aspect-ratio: 1; justify-self: center; will-change: transform; }
.cottura-pizza > img, .cottura-gl { position: absolute; inset: 4%; width: 92%; height: 92%; border-radius: 50%; object-fit: cover; }
.pizza-cotta { opacity: 0; }
.cottura-gl { opacity: 0; }
.cottura-gl.pronto { opacity: 1; }
.cottura-gl.pronto ~ img { visibility: hidden; }
.anello { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.anello circle { fill: none; stroke-width: .6; }
.anello-fondo { stroke: rgb(246 234 219 / .12); }
.anello-pieno { stroke: var(--brace); stroke-linecap: round; stroke-dasharray: 301.6; stroke-dashoffset: 301.6; } /* controllo-trattini:ok, barra di avanzamento circolare della cottura */
.timer { justify-self: end; text-align: right; font-family: var(--f-mono); line-height: 1; }
.timer span { display: block; font-size: clamp(4rem, 9vw, 8.5rem); font-weight: 500; color: var(--crema); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.timer small { display: block; margin-top: .6rem; font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--crema-2); }

/* ---------- 5 · il menù ---------- */
.menu { position: relative; padding: clamp(6rem, 14vw, 11rem) var(--margine) clamp(5rem, 10vw, 8rem); max-width: 1240px; margin: 0 auto; }
.menu-testa h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); max-width: 12em; }
.carta { list-style: none; margin: 4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 6vw, 6rem); }
.piatto { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.5rem; padding: 1.6rem 0 1.7rem; isolation: isolate; }
.piatto::before { content: ""; position: absolute; inset: 0 -.7rem; z-index: -1; border-radius: 10px; background: radial-gradient(70% 120% at var(--mx, 50%) 50%, rgb(255 106 31 / .16), transparent 70%); opacity: 0; transition: opacity .35s ease; }
.piatto:hover::before { opacity: 1; }
.piatto h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.piatto p { grid-column: 1; color: var(--crema-2); font-size: .95rem; margin-top: .35rem; }
.prezzo { grid-column: 2; grid-row: 1 / span 2; align-self: start; font-family: var(--f-mono); font-size: 1.1rem; color: var(--oro); padding-top: .5rem; }
.piatto-casa h3 { font-style: italic; color: var(--oro); }
.nota { margin-top: 2.5rem; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cenere); }

/* ---------- 6 · prenota ---------- */
.prenota { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 7rem var(--margine); overflow: hidden; background: radial-gradient(80% 60% at 50% 110%, rgb(194 65 12 / .42), transparent 70%), var(--nero); }
.braci { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.prenota-dentro { position: relative; width: min(1180px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; }
.prenota-testo h2 { font-size: clamp(2.6rem, 6vw, 5.4rem); margin-bottom: 1.4rem; }
.prenota-testo > p { color: var(--crema-2); max-width: 28rem; }
.orari { margin: 2.5rem 0 0; display: grid; gap: .9rem; }
.orari div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; max-width: 26rem; padding-bottom: .9rem; border-bottom: 1px solid rgb(246 234 219 / .12); }
.orari dt { color: var(--crema-2); }
.orari dd { margin: 0; font-family: var(--f-mono); font-size: .9rem; color: var(--crema); }
.modulo { display: grid; gap: 1.1rem; padding: clamp(1.4rem, 3vw, 2.4rem); border-radius: 14px; background: rgb(26 17 12 / .78); border: 1px solid rgb(255 181 71 / .14); }
.modulo label { display: grid; gap: .4rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--crema-2); }
.modulo input, .modulo select { font: 1rem var(--f-testo); letter-spacing: 0; text-transform: none; color: var(--crema); background: rgb(12 8 6 / .7); border: 1px solid rgb(246 234 219 / .16); border-radius: 8px; padding: .8rem .9rem; min-height: 48px; color-scheme: dark; }
.modulo input:focus, .modulo select:focus { outline: none; border-color: var(--brace); box-shadow: 0 0 0 3px rgb(255 106 31 / .2); }
.modulo-riga { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; }
.modulo .brace-btn { margin-top: .4rem; }
.modulo-esito { min-height: 1.5em; color: var(--oro); }

.piede { padding: 2.2rem var(--margine) 2.6rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; font-size: .85rem; color: var(--cenere); border-top: 1px solid rgb(246 234 219 / .08); }

/* ---------- comparse ---------- */
.js:not(.rm) .compare { opacity: 0; transform: translateY(28px); }
.compare { transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.js:not(.rm) .compare.visto { opacity: 1; transform: none; }

/* ---------- telefono ---------- */
@media (max-width: 767px) {
  .voci { display: none; }
  .testata { gap: 1rem; }
  .testata .brace-btn { margin-left: auto; }
  .marchio { font-size: 1.05rem; }
  .str-a, .str-b { top: 5rem; }
  .str-d { display: none; }
  .forno { height: 380svh; }
  .mani { height: 300svh; }
  .mani-fermo { flex-direction: column; align-items: stretch; justify-content: center; gap: 1.6rem; }
  .mani-intro { width: auto; padding: 0 var(--margine); background: none; align-self: auto; }
  .mani-conta { margin-top: .8rem; }
  .binario { padding: 0 var(--margine); }
  .scatto { width: 68vw; }
  .scatto figcaption { font-size: .9rem; }
  .cottura { height: 360svh; }
  .cottura-fermo { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr; align-content: center; gap: 1.2rem; padding-top: 4.5rem; }
  .cottura-testo { grid-column: 1 / -1; }
  .cottura-testo h2 { margin-bottom: 1rem; }
  .tappe { gap: .5rem; font-size: .95rem; }
  .tappe li:not(.ora) { display: none; }
  .cottura-pizza { grid-column: 1; width: min(100%, 44svh); justify-self: start; }
  .timer { grid-column: 2; align-self: end; }
  .timer span { font-size: 3.4rem; }
  .carta { grid-template-columns: minmax(0, 1fr); margin-top: 2.5rem; }
  .prenota-dentro { grid-template-columns: minmax(0, 1fr); }
  .piede { flex-direction: column; }
}

/* ---------- meno movimento: tutto al suo posto ---------- */
.rm .forno, .rm .impasto, .rm .mani, .rm .cottura { height: auto; }
.rm .forno-fermo, .rm .impasto-fermo, .rm .mani-fermo, .rm .cottura-fermo { position: relative; }
.rm .fumo, .rm .scintille { display: none; }
.rm .strumenti { opacity: 1; }
.rm .in-sala { display: none; }
.rm .accese .parola { color: var(--crema); }
.rm .mani-fermo { height: auto; padding: 6rem 0; flex-direction: column; align-items: stretch; gap: 2rem; }
.rm .mani-intro { width: auto; background: none; }
.rm .binario { overflow-x: auto; padding-bottom: 1rem; }
.rm .scatto-foto img { transform: none; }
.rm .pizza-cotta { opacity: 1; }
.rm .anello-pieno { stroke-dashoffset: 0; }
.rm .marchio-fiamma, .rm .brace-btn::after { animation: none; }
