/* ══════════════════════════════════════════════════════════════════
   Al Paradiso della Pizza — Affori, Milano
   Concept: «LE PIZZE HANNO UN NOME». Il sito È la loro carta: ogni pizza
   si presenta col nome proprio in display, gli ingredienti in italiano e
   sotto, in corsivo, la traduzione inglese — esattamente come sul menù
   plastificato che tengono in sala, che dedica un'intera pagina alle
   pizze con la ricotta.
   Colori campionati dalla loro facciata: il travertino, il rosso profilato
   dell'insegna in corsivo, l'azzurro sbiadito delle tende a righe.
   ══════════════════════════════════════════════════════════════════ */

/* ---------- PLUMBING (reset tecnico canonico) ---------- */
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; }
}

/* ---------- STATO INIZIALE DEI .reveal ----------
   Obbligatorio: con `immediateRender:false` lo stato "from" non esiste
   finché il trigger non scatta, quindi senza queste righe gli elementi
   compaiono, vengono azzerati e ri-dissolti (il flash del 19/7).
   Verificato da `lint-sito` col check `reveal-initial-state`. */
.js .reveal { opacity: 0; }
.js .reveal.in-view { opacity: 1; }
html:not(.js) .reveal, html.reduced-motion .reveal { opacity: 1; }

/* ---------- design system ---------- */
:root {
  --travertino: #E8E0D2;
  --carta: #F4EFE4;
  --rosso: #C0362C;
  --azzurro: #6FA8CB;
  --legno: #8A5A2B;
  --inchiostro: #241C17;
  --tenue: #7A6A5A;
  --filetto: #CFC2AC;

  --display: 'Abril Fatface', Georgia, serif;
  --testo: 'Newsreader', Georgia, serif;
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--carta);
  color: var(--inchiostro);
  font-family: var(--testo);
  font-size: clamp(1.02rem, .5vw + .92rem, 1.12rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
p { margin: 0 0 1.05em; }
a { color: inherit; }
strong { font-weight: 600; }

.eyebrow {
  font-family: var(--testo); font-style: italic;
  font-size: .95rem; letter-spacing: .04em;
  color: var(--rosso); margin-bottom: .9rem;
}
.carta-head { max-width: var(--max); margin: 0 auto clamp(2rem, 5vw, 3.2rem); }
section { padding: clamp(4rem, 9vw, 7rem) var(--gut); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--inchiostro); color: var(--carta); padding: .8rem 1.2rem; z-index: 999; }
.skip:focus { left: .5rem; top: .5rem; }

/* ══════════ intro ══════════ */
#intro {
  position: fixed; inset: 0; z-index: 300;
  background: var(--travertino); color: var(--rosso);
  display: grid; place-items: center; padding: 2rem;
  transition: opacity .6s ease;
}
#intro.hide { opacity: 0; pointer-events: none; }
html:not(.js) #intro { display: none; }
#introMark {
  font-family: var(--display);
  font-size: clamp(1.5rem, 6vw, 3rem);
  text-align: center;
}
.reduced-motion #intro { display: none; }

/* ══════════ header ══════════ */
#header {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem var(--gut);
  background: var(--carta);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
#header.scrolled { border-bottom-color: var(--filetto); }
.brand {
  font-family: var(--display); font-size: 1.3rem;
  color: var(--rosso); text-decoration: none; margin-right: auto;
}
#mainNav { display: flex; align-items: center; gap: clamp(.5rem, 1.3vw, 1.4rem); }
#mainNav a:not(.cta) {
  text-decoration: none; font-size: .97rem;
  padding: .3rem 0; border-bottom: 1.5px solid transparent; white-space: nowrap;
}
#mainNav a:not(.cta):hover { border-bottom-color: var(--rosso); }
#langToggle {
  font-family: var(--testo); font-style: italic; font-size: .85rem;
  background: none; border: 1.5px solid var(--filetto); border-radius: 2rem;
  padding: .25rem .7rem; color: inherit; cursor: pointer;
}
#langToggle:hover { border-color: var(--rosso); color: var(--rosso); }
/* `:not(.cta)` sopra + inline-flex qui: `#mainNav a` (1,0,1) batterebbe
   `.cta` (0,1,0) e ne azzererebbe il padding, tagliando il testo. */
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; white-space: nowrap;
  background: var(--rosso); color: var(--carta) !important;
  padding: .55rem 1.3rem; border-radius: 2px;
  font-weight: 600; text-decoration: none;
}
.cta:hover { background: var(--inchiostro); }
.cta-big { margin-top: 1.6rem; padding: .85rem 1.8rem; font-size: 1.05rem; }
.cta-inline { margin-top: .6rem; }

#burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: .4rem; }
#burger span { display: block; width: 26px; height: 2px; background: var(--inchiostro); }

/* ══════════ HERO ══════════ */
#hero {
  min-height: 100vh; min-height: 100svh;
  padding-top: 6.5rem;
  display: flex; flex-direction: column; justify-content: center;
  max-width: var(--max); margin: 0 auto;
  background: var(--carta);
}
.hero-insegna { margin: 0 0 2.4rem; }
.hero-insegna img {
  width: 100%; display: block;
  border: 1px solid var(--filetto);
  filter: saturate(1.05);
}
.hero-kicker { font-style: italic; color: var(--tenue); margin-bottom: .8rem; }
#hero h1 { margin-bottom: 1.4rem; }
.hero-sub { max-width: 52ch; font-size: 1.12rem; color: #43382E; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem;
  align-items: baseline; margin-top: 2rem;
  padding-top: 1.4rem; border-top: 2px solid var(--inchiostro);
}
.hero-rating { margin: 0; color: var(--tenue); font-size: .98rem; }
.hero-rating strong { font-family: var(--display); font-size: 1.7rem; color: var(--rosso); vertical-align: -.12em; }
.hero-call { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--rosso); }

/* ══════════ LA CARTA — il gesto-firma ══════════ */
#carta { background: var(--travertino); }
.carta-sub { max-width: 54ch; color: #43382E; }
.menu-list {
  list-style: none; margin: 0 auto; padding: 0;
  max-width: var(--max);
  border-top: 2px solid var(--inchiostro);
}
.voce { padding: 1.15rem 0; border-bottom: 1px solid var(--filetto); }
.voce-testa {
  display: flex; align-items: baseline; gap: 1rem;
  justify-content: space-between;
}
.voce h3 { font-size: clamp(1.35rem, 2.6vw, 2rem); }
/* il filetto di puntini fra nome e prezzo: è il segno grafico dei menù */
.voce-testa::before {
  content: ''; flex: 1 1 auto; order: 1;
  border-bottom: 1.5px dotted var(--filetto);
  transform: translateY(-.35em);
}
.voce-testa .prezzo {
  order: 2; font-family: var(--display);
  font-size: 1.25rem; color: var(--rosso); white-space: nowrap;
}
.voce h3 { order: 0; }
.ing { margin: .45rem 0 .1rem; max-width: 62ch; }
.ing-en {
  margin: 0; font-style: italic; font-size: .93rem;
  color: var(--tenue); max-width: 62ch;
}
.carta-piede {
  max-width: var(--max); margin: 1.8rem auto 0;
  font-size: .92rem; color: var(--tenue);
}
.carta-fig { max-width: 420px; margin: clamp(2.5rem, 6vw, 4rem) auto 0; }
.carta-fig img { width: 100%; display: block; border: 1px solid var(--filetto); }
.carta-fig figcaption { margin-top: .7rem; font-style: italic; font-size: .88rem; color: var(--tenue); text-align: center; }

/* ══════════ LA SALA ══════════ */
.sala-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.sala-text p { max-width: 46ch; }
.sala-text h2 { margin-bottom: 1.3rem; }
.sala-fig { margin: 0; display: grid; gap: .8rem; }
.sala-fig img { width: 100%; display: block; border: 1px solid var(--filetto); }
.sala-fig img:last-child { max-height: 460px; object-fit: cover; object-position: center 30%; }

/* ══════════ IL FORNO ══════════ */
#forno { background: var(--inchiostro); color: var(--travertino); }
.forno-inner { max-width: 760px; margin: 0 auto; }
#forno .eyebrow { color: var(--azzurro); }
#forno h2 { margin-bottom: 1.3rem; }
#forno p { color: #DCD2C2; }
.forno-asporto {
  margin-top: 1.6rem; padding-left: 1.1rem;
  border-left: 3px solid var(--rosso);
}

/* ══════════ RECENSIONI ══════════ */
.voci-grid { max-width: var(--max); margin: 0 auto; columns: 2 320px; column-gap: 1.6rem; }
.voci-grid blockquote {
  break-inside: avoid; margin: 0 0 1.6rem; padding: 0 0 1.4rem;
  border-bottom: 1px solid var(--filetto);
}
.voci-grid p { font-size: 1.04rem; margin-bottom: .6rem; }
.voci-grid cite { font-style: italic; font-size: .88rem; color: var(--tenue); }

/* ══════════ GALLERY ══════════ */
#fuori { background: var(--travertino); }
.fuori-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem;
}
.shot { padding: 0; border: 1px solid var(--filetto); background: none; cursor: pointer; overflow: hidden; display: block; }
.shot img { width: 100%; height: 300px; object-fit: cover; display: block; transition: transform .5s ease; }
.shot:hover img { transform: scale(1.04); }
.shot-wide { grid-column: span 2; }
.fuori-nota { max-width: var(--max); margin: 1.6rem auto 0; font-size: .9rem; font-style: italic; color: var(--tenue); }

/* ══════════ DOVE ══════════ */
.dove-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: .85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.dove-info address { font-style: normal; font-size: 1.14rem; line-height: 1.5; margin-bottom: .5rem; }
.dove-tel a { font-family: var(--display); font-size: 1.4rem; color: var(--rosso); text-decoration: none; }
.dove-stato { font-size: .95rem; color: var(--tenue); margin-bottom: 1.3rem; }
.orari { list-style: none; margin: 0; padding: 0; font-size: .97rem; }
.orari li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--filetto); }
.orari li.is-today { color: var(--rosso); font-weight: 600; }
.orari li.is-today b { color: var(--rosso); }
.dove-serv { margin-top: 1.1rem; font-size: .92rem; font-style: italic; color: var(--tenue); }
.dove-map iframe { width: 100%; height: clamp(340px, 46vw, 470px); border: 1px solid var(--filetto); }

/* ══════════ FAQ ══════════ */
#faq { background: var(--travertino); }
#faq h2 { max-width: var(--max); margin: 0 auto clamp(1.6rem, 4vw, 2.4rem); }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-list details { border-bottom: 1px solid var(--filetto); padding: 1.1rem 0; }
.faq-list summary {
  cursor: pointer; font-weight: 600; font-size: 1.06rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; color: var(--rosso); font-size: 1.4rem; line-height: 1; }
.faq-list details[open] summary::after { content: '–'; }
.faq-list p { margin: .8rem 0 0; color: var(--tenue); max-width: 62ch; }

/* ══════════ FOOTER ══════════ */
footer { background: var(--inchiostro); color: var(--travertino); }
.foot-inner {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gut) 1.5rem;
  display: grid; grid-template-columns: auto 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
}
.foot-name { font-family: var(--display); font-size: 1.6rem; color: var(--rosso); }
.foot-col p { margin: 0 0 .4rem; font-size: .95rem; opacity: .85; }
.foot-col a { color: var(--travertino); }
.foot-credit { text-align: center; padding: 0 var(--gut) 2.2rem; font-size: .82rem; font-style: italic; opacity: .6; }
.foot-credit a { color: var(--azzurro); }

/* ══════════ action bar mobile ══════════ */
#actionBar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 190;
  display: none; gap: 1px; background: var(--inchiostro);
  transform: translateY(100%); transition: transform .35s ease;
}
#actionBar.is-visible { transform: translateY(0); }
#actionBar a { flex: 1; text-align: center; padding: .95rem .5rem; text-decoration: none; font-weight: 600; font-size: .97rem; }
.ab-call { background: var(--rosso); color: var(--carta); }
.ab-map { background: var(--travertino); color: var(--inchiostro); }

/* ══════════ lightbox ══════════ */
#lightbox {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(36, 28, 23, .94);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
#lightboxImg { max-width: 92vw; max-height: 88vh; }
#lightboxClose { position: absolute; top: 1.2rem; right: 1.4rem; background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }

/* ══════════ responsive ══════════ */
@media (max-width: 960px) {
  #burger { display: flex; }
  #mainNav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--carta); border-bottom: 1px solid var(--filetto);
    padding: .5rem var(--gut) 1.2rem;
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .35s ease, visibility .35s;
  }
  #mainNav.nav-open { max-height: 32rem; visibility: visible; }
  #mainNav a:not(.cta) { padding: .75rem 0; border-bottom: 1px solid var(--filetto); }
  #langToggle { align-self: flex-start; margin: .8rem 0; }
  .sala-grid, .dove-grid { grid-template-columns: 1fr; }
  #actionBar { display: flex; }
  body { padding-bottom: 3.4rem; }
}
@media (max-width: 640px) {
  .voci-grid { columns: 1; }
  .shot-wide { grid-column: span 1; }
  .shot img { height: 230px; }
  .foot-inner { grid-template-columns: 1fr; }
  .voce-testa { flex-wrap: wrap; }
  .voce-testa::before { display: none; }
  .voce-testa .prezzo { order: 1; }
}
