/* Pizzeria del Borgo — sito vetrina. Il borgo in bianco e nero, le pizze e la luce a colori. Vedi ART-DIRECTION.md */
:root {
  --fondo: #0E0C0A;
  --carbone: #181410;
  --avorio: #EFE8DC;
  --avorio-2: rgba(239, 232, 220, .68);
  --avorio-3: rgba(239, 232, 220, .44);
  --linea: rgba(239, 232, 220, .13);
  --ottone: #BF9B68;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --pad: clamp(20px, 5vw, 80px);
  --max: 1360px;
  --es-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--fondo); color: var(--avorio); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, figure, ol, ul { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; font-optical-sizing: auto; line-height: 1.02; letter-spacing: -.01em; }
em { font-style: italic; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 1px solid var(--ottone); outline-offset: 4px; }

.sopra { font: 500 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ottone); margin-bottom: 22px; }
.centrato { text-align: center; }
.titolo { font-size: clamp(40px, 5.4vw, 84px); margin-bottom: 26px; }
.titolo em { color: var(--avorio-2); }
.credito { font-size: 11.5px; color: var(--avorio-3); margin-top: 12px; letter-spacing: .02em; }

/* sottolineatura che si disegna */
.sotto, .link-linea { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--es-out); padding-bottom: 3px; }
.sotto:hover, .link-linea:hover { background-size: 100% 1px; }
.link-linea { display: inline-block; font: 500 13px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; background-size: 100% 1px; background-image: linear-gradient(var(--ottone), var(--ottone)); }
.link-linea:hover { color: var(--ottone); }

/* ---------- apertura ---------- */
.apertura { position: fixed; inset: 0; z-index: 100; background: var(--fondo); display: grid; place-content: center; text-align: center; gap: 16px; pointer-events: none; }
.ap-luogo { font: 500 11px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--avorio-3); }
.ap-nome { font: 400 clamp(34px, 5vw, 64px)/1 var(--serif); }
.ap-linea { display: block; height: 1px; width: 180px; margin: 6px auto 0; background: var(--ottone); transform: scaleX(0); }
html.reduced .apertura, html.gia-visto .apertura { display: none; }

/* ---------- nav ---------- */
.nav { position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 40px; padding: 26px var(--pad); transition: background-color .4s, padding .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.pieno { background: rgba(14, 12, 10, .92); padding-top: 16px; padding-bottom: 16px; border-bottom-color: var(--linea); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.marchio { font: 400 24px/1 var(--serif); letter-spacing: .01em; white-space: nowrap; }
.nav-link { display: flex; gap: 34px; margin-left: auto; }
.nav-link a { font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--avorio-2); transition: color .3s; }
.nav-link a:hover { color: var(--avorio); }
.nav-tel { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.nav-tel span { color: var(--ottone); margin-right: 8px; }
.nav-apri { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; position: relative; }
.nav-apri i { position: absolute; left: 11px; right: 11px; height: 1px; background: var(--avorio); transition: transform .4s var(--es-out); }
.nav-apri i:first-of-type { top: 18px; } .nav-apri i:last-of-type { top: 26px; }
.nav-apri[aria-expanded="true"] i:first-of-type { transform: translateY(4px) rotate(45deg); }
.nav-apri[aria-expanded="true"] i:last-of-type { transform: translateY(-4px) rotate(-45deg); }
.tendina { position: fixed; inset: 0; z-index: 45; background: var(--fondo); display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 100px 28px 40px; }
.tendina a { font: 400 36px/1.1 var(--serif); }
.tendina .tendina-tel { font: 500 13px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ottone); margin-top: 20px; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; isolation: isolate; }
.hero-foto { position: absolute; top: 0; right: 0; bottom: 0; width: 60%; z-index: -2; overflow: hidden; }
.hero-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 60%; transform-origin: 40% 65%; will-change: transform; }
.hero-velo { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, var(--fondo) 39%, rgba(14, 12, 10, .55) 47%, rgba(14, 12, 10, 0) 62%),
  linear-gradient(0deg, var(--fondo) 0%, rgba(14, 12, 10, 0) 24%); }
.hero-alto { position: absolute; left: var(--pad); top: 50%; transform: translateY(-62%); max-width: 46%; }
.hero-titolo { font-size: clamp(52px, 6.3vw, 112px); line-height: .98; }
.hero-titolo em { color: var(--avorio-2); }
.hero-basso { position: absolute; left: var(--pad); bottom: clamp(48px, 10vh, 104px); display: grid; gap: 22px; justify-items: start; }
.hero-cta { display: flex; gap: 32px; }
.stato { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .08em; color: var(--avorio-2); }
.stato i { width: 6px; height: 6px; border-radius: 50%; background: var(--avorio-3); }
.stato.aperto i { background: var(--ottone); box-shadow: 0 0 0 4px rgba(191, 155, 104, .18); }
.credito-hero { position: absolute; right: var(--pad); bottom: 22px; margin: 0; }

/* ---------- manifesto ---------- */
.manifesto { padding: clamp(110px, 18vw, 240px) var(--pad); max-width: 1180px; margin: 0 auto; }
.manifesto-testo { font: 400 clamp(30px, 3.9vw, 58px)/1.22 var(--serif); text-align: center; letter-spacing: -.005em; }
.manifesto-testo em { color: var(--ottone); }

/* ---------- immagini che si svelano ---------- */
.svela { position: relative; overflow: hidden; }
.svela img { transform-origin: 50% 50%; }
.svela::after { content: ""; position: absolute; inset: 0; background: var(--fondo); transform-origin: 100% 50%; transform: scaleX(0); pointer-events: none; }
html.js .svela::after { transform: scaleX(1); transition: transform 1.3s cubic-bezier(.87, 0, .13, 1); }
html.js .svela.svelata::after { transform: scaleX(0); }

/* ---------- il luogo ---------- */
.luogo { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: center; padding: 0 var(--pad) clamp(100px, 14vw, 200px); max-width: var(--max); margin: 0 auto; }
.luogo-foto { border-radius: 999px 999px 0 0 / 40% 40% 0 0; }
.luogo-foto img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 55% 50%; }
.luogo-foto .credito { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 18px 14px; margin: 0; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: rgba(239, 232, 220, .7); }
.luogo-testo > p:not(.sopra) { color: var(--avorio-2); max-width: 44ch; }
.tre { list-style: none; padding: 0; margin-top: 44px; border-top: 1px solid var(--linea); }
.tre li { display: flex; align-items: baseline; gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--linea); font: 400 22px/1.2 var(--serif); }
.tre span { font: 500 12px/1 var(--sans); letter-spacing: .2em; color: var(--ottone); min-width: 26px; }

/* ---------- le quattro porte ---------- */
.porte { background: var(--carbone); }
.porte-pin { position: relative; min-height: 100svh; padding: 110px var(--pad) 44px; display: grid; grid-template-rows: auto 1fr auto; max-width: var(--max); margin: 0 auto; }
.porte-testa .titolo { margin: 0; font-size: clamp(38px, 4.4vw, 68px); }
.porte-scena { position: relative; overflow: clip; display: grid; grid-template-columns: minmax(180px, .75fr) minmax(280px, 1.1fr) minmax(260px, 1fr); gap: clamp(24px, 4.5vw, 72px); align-items: center; padding: 26px 0 16px; }
.porte-fotos { position: relative; aspect-ratio: 2 / 3; max-height: 56svh; width: 100%; }
.porta-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 999px 999px 0 0 / 34% 34% 0 0; opacity: 0; transform: scale(1.05); transition: opacity .9s var(--es-out), transform 1.4s var(--es-out); }
.porta-foto.on { opacity: 1; transform: none; }
.pizza4-wrap { position: relative; width: min(100%, 50svh); aspect-ratio: 1; justify-self: center; }
.pizza4 { position: absolute; inset: 0; will-change: transform; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55)); }
.pizza4-anello { position: absolute; inset: -5%; border-radius: 50%; border: 1px solid rgba(191, 155, 104, .35); z-index: -1; }
.pizza4-anello::before { content: ""; position: absolute; inset: 4.5%; border-radius: 50%; border: 1px solid var(--linea); }
.spicchio { position: absolute; inset: 0; background: var(--img) center / cover no-repeat; opacity: 0; transition: transform 1.2s var(--es-out), opacity .8s ease-out; }
.spicchio[data-q="0"] { clip-path: polygon(50% 50%, 50% -2%, -2% -2%, -2% 50%); transform: translate(-18%, -18%) rotate(-10deg); }
.spicchio[data-q="1"] { clip-path: polygon(50% 50%, 50% -2%, 102% -2%, 102% 50%); transform: translate(18%, -18%) rotate(10deg); }
.spicchio[data-q="2"] { clip-path: polygon(50% 50%, 102% 50%, 102% 102%, 50% 102%); transform: translate(18%, 18%) rotate(-10deg); }
.spicchio[data-q="3"] { clip-path: polygon(50% 50%, 50% 102%, -2% 102%, -2% 50%); transform: translate(-18%, 18%) rotate(10deg); }
.spicchio.dentro { opacity: 1; transform: none; }
.porte-passi { list-style: none; padding: 0; position: relative; min-height: 290px; }
.passo { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(20px); transition: opacity .6s ease-out, transform .9s var(--es-out); pointer-events: none; }
.passo.on { opacity: 1; transform: none; pointer-events: auto; }
.passo-num { font: 500 12px/1 var(--sans); letter-spacing: .24em; color: var(--ottone); margin-bottom: 18px; }
.passo h3 { font-size: clamp(34px, 3.4vw, 52px); margin-bottom: 18px; }
.passo h3 em { color: var(--avorio); }
.passo > p:not(.passo-num):not(.passo-pizza) { color: var(--avorio-2); max-width: 36ch; margin-bottom: 22px; }
.passo-pizza { padding-top: 16px; border-top: 1px solid var(--linea); font-size: 14.5px; color: var(--avorio-2); max-width: 40ch; }
.passo-pizza b { font: italic 400 19px var(--serif); color: var(--avorio); }
.passo-pizza span { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .18em; color: var(--ottone); }
.passo-finale h3 { font-size: clamp(52px, 5vw, 84px); }
.porte-barra { display: flex; gap: 8px; max-width: 220px; }
.porte-barra i { flex: 1; height: 1px; background: var(--linea); position: relative; overflow: hidden; }
.porte-barra i::after { content: ""; position: absolute; inset: 0; background: var(--ottone); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--es-out); }
.porte-barra i.on::after { transform: scaleX(1); }
.porte.ferma .porte-scena { grid-template-columns: 1fr; }
.porte.ferma .porte-fotos, .porte.ferma .porte-barra { display: none; }
.porte.ferma .pizza4-wrap { width: min(100%, 420px); }
.porte.ferma .spicchio { opacity: 1; transform: none; }
.porte.ferma .porte-passi { display: grid; gap: 40px; min-height: 0; }
.porte.ferma .passo { position: static; opacity: 1; transform: none; }

/* ---------- il borgo (galleria) ---------- */
.borgo { padding: clamp(100px, 13vw, 180px) 0 clamp(60px, 8vw, 110px); }
.borgo-pin { overflow: hidden; }
.borgo-binario { display: flex; align-items: flex-end; gap: clamp(28px, 4vw, 64px); padding: 0 var(--pad); width: max-content; will-change: transform; }
.borgo-testa { width: min(440px, 80vw); flex: none; align-self: center; }
.borgo-testa > p:not(.sopra) { color: var(--avorio-2); }
.quadro { flex: none; }
.quadro img { width: 100%; object-fit: cover; }
.q-alto { width: clamp(260px, 26vw, 400px); }
.q-alto img { aspect-ratio: 4 / 5; }
.q-largo { width: clamp(320px, 40vw, 620px); }
.q-largo img { aspect-ratio: 3 / 2; }
.quadro figcaption { margin-top: 14px; font: italic 400 19px var(--serif); color: var(--avorio-2); display: flex; gap: 14px; align-items: baseline; }
.quadro figcaption span { font: 500 11px/1 var(--sans); font-style: normal; letter-spacing: .2em; color: var(--ottone); }
.credito-borgo { padding: 0 var(--pad); margin-top: 28px; }

/* ---------- menù ---------- */
.menu { padding: clamp(80px, 10vw, 150px) var(--pad); max-width: var(--max); margin: 0 auto; }
.menu-testa { max-width: 900px; margin-bottom: 56px; }
.menu-testa .titolo { font-size: clamp(38px, 4.6vw, 72px); }
.menu-info { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--avorio-3); }
.provare { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-bottom: 90px; }
.prova img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1.2s var(--es-out); }
.prova:hover img { transform: scale(1.04); }
.prova figcaption { position: relative; z-index: 1; background: var(--fondo); padding-top: 16px; display: grid; gap: 6px; }
.prova b { font: italic 400 26px/1 var(--serif); }
.prova span { font-size: 14px; color: var(--avorio-2); line-height: 1.5; }
.schede { display: flex; gap: 34px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--linea); margin-bottom: 30px; }
.schede::-webkit-scrollbar { display: none; }
.schede button { flex: none; border: 0; background: none; padding: 0 0 16px; font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--avorio-3); position: relative; transition: color .3s; }
.schede button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ottone); transform: scaleX(0); transition: transform .5s var(--es-out); }
.schede button:hover { color: var(--avorio-2); }
.schede button[aria-selected="true"] { color: var(--avorio); }
.schede button[aria-selected="true"]::after { transform: scaleX(1); }
.menu-lista { columns: 2; column-gap: clamp(40px, 7vw, 110px); }
.gruppo-titolo { break-after: avoid; font: 500 11.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ottone); margin: 26px 0 6px; }
.gruppo-titolo:first-child { margin-top: 0; }
.voce { break-inside: avoid; padding: 18px 0; border-bottom: 1px solid var(--linea); }
.voce-riga { display: flex; align-items: baseline; gap: 14px; }
.voce h4 { margin: 0; font: 400 24px/1.1 var(--serif); }
.voce-riga::after { content: ""; flex: 1; order: 2; }
.voce-prezzo { order: 3; font-size: 14px; letter-spacing: .06em; color: var(--avorio-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.voce-storia { order: 1; border: 0; background: none; padding: 0; font: italic 400 15px var(--serif); color: var(--ottone); }
.voce-storia:hover { text-decoration: underline; text-underline-offset: 3px; }
.voce-ingr { margin-top: 6px; font-size: 14.5px; color: var(--avorio-3); line-height: 1.5; }
.voce-nota { margin-top: 10px; font: italic 400 16px/1.5 var(--serif); color: var(--avorio-2); padding-left: 14px; border-left: 1px solid var(--ottone); }
.credito-menu { margin-top: 36px; }

/* ---------- prenota ---------- */
.prenota { position: relative; padding: clamp(120px, 16vw, 220px) var(--pad); isolation: isolate; overflow: hidden; }
.prenota-foto { position: absolute; inset: 0; z-index: -1; }
.prenota-foto img { width: 100%; height: 120%; object-fit: cover; opacity: .22; }
.prenota-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--fondo), rgba(14, 12, 10, .2) 30%, rgba(14, 12, 10, .2) 70%, var(--fondo)); }
.prenota-dentro { max-width: 980px; margin: 0 auto; display: grid; justify-items: center; }
.numero { font: 400 clamp(52px, 9vw, 140px)/1 var(--serif); letter-spacing: -.01em; margin: 10px 0 20px; transition: color .4s; }
.numero:hover { color: var(--ottone); }
.prenota-nota { color: var(--avorio-2); text-align: center; margin-bottom: 70px; }
.prenota-griglia { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding-top: 44px; border-top: 1px solid var(--linea); }
.orari { list-style: none; padding: 0; }
.orari li { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; color: var(--avorio-2); border-bottom: 1px solid var(--linea); font-variant-numeric: tabular-nums; }
.orari li.oggi { color: var(--avorio); }
.orari li.oggi span:first-child::after { content: "oggi"; margin-left: 10px; font: italic 400 14px var(--serif); color: var(--ottone); }
.indirizzo { font: 400 26px/1.3 var(--serif); margin-bottom: 22px; }

/* ---------- footer ---------- */
.piede { border-top: 1px solid var(--linea); padding: 56px var(--pad) calc(44px + env(safe-area-inset-bottom)); max-width: var(--max); margin: 0 auto; display: grid; gap: 14px; color: var(--avorio-2); font-size: 14px; }
.piede-nome { font: 400 34px/1 var(--serif); color: var(--avorio); margin-bottom: 10px; }
.piede-riga { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 30px; }
.piede-crediti { font-size: 12px; color: var(--avorio-3); max-width: 90ch; }

/* entrate (le applica GSAP; senza JS resta tutto visibile) */
html.js .entra { opacity: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-link { display: none; }
  .nav-tel { margin-left: auto; }
  .porte-scena { grid-template-columns: 1fr 1fr; }
  .porte-fotos { display: none; }
  .provare { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { padding: 18px 20px; gap: 12px; }
  .nav.pieno { padding-top: 12px; padding-bottom: 12px; }
  .marchio { font-size: 21px; }
  .nav-tel { display: none; }
  .nav-apri { display: block; }
  .hero-foto { top: auto; left: 0; width: 100%; height: 70svh; }
  .hero-foto img { object-position: 43% 60%; }
  .hero-velo { background: linear-gradient(180deg, var(--fondo) 30%, rgba(14, 12, 10, 0) 44%, rgba(14, 12, 10, 0) 70%, rgba(14, 12, 10, .88) 88%, var(--fondo) 100%); }
  .hero-alto { top: 104px; left: 20px; right: 20px; max-width: none; transform: none; }
  .hero-titolo { font-size: clamp(46px, 13vw, 64px); }
  .hero-basso { left: 20px; right: 20px; bottom: 36px; }
  .hero-cta { flex-direction: column; gap: 18px; }
  .credito-hero { display: none; }
  .luogo { grid-template-columns: 1fr; }
  .porte-pin { padding: 84px 20px 22px; }
  .porte-scena { grid-template-columns: 1fr; gap: 18px; align-content: center; padding: 8px 0; }
  .pizza4-wrap { width: min(70vw, 33svh); }
  .porte-passi { min-height: 240px; }
  .passo h3 { font-size: 34px; margin-bottom: 10px; }
  .passo > p:not(.passo-num):not(.passo-pizza) { font-size: 15px; margin-bottom: 12px; }
  .passo-num { margin-bottom: 10px; }
  .passo-pizza { padding-top: 10px; font-size: 13.5px; }
  .porte-barra { max-width: none; }
  .borgo-pin { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .borgo-pin::-webkit-scrollbar { display: none; }
  .borgo-binario { padding: 0 20px; gap: 18px; }
  .quadro, .borgo-testa { scroll-snap-align: start; }
  .q-alto { width: 70vw; } .q-largo { width: 84vw; }
  .menu-lista { columns: 1; }
  .provare { gap: 14px; margin-bottom: 64px; }
  .prova b { font-size: 21px; }
  .prova span { display: none; }
  .schede { gap: 24px; }
  .prenota-griglia { grid-template-columns: 1fr; gap: 44px; }
  .tre li { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
