/* ═══════════════════════════════════════════════════════════════════
   Prat Centenar (Pratocentenaro) — Via Cino da Pistoia 18, Milano
   Concept: «al trancio». La pizza al trancio si taglia dalla teglia a
   rettangoli, e in 198 recensioni i clienti nominano proprio quella:
   quindi la pagina È una teglia tagliata, con le linee di taglio che
   compaiono e sei tranci al posto delle solite card.
   Palette dal reale: il verde delle loro tende, il turchese del logo
   sull'insegna, il crema dell'impasto, l'arancione delle sedie fuori.
   ⚠️ Rating 4,3: sotto soglia badge → il voto NON compare da nessuna
   parte. Si usano il volume e i conteggi delle citazioni.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --verde: #0E3B2E;
  --verde-scuro: #0B2A20;
  --turchese: #3FBFB0;
  --turchese-chiaro: #5FD3C4;
  --crema: #F7F1E4;
  --crema-scuro: #EADFC8;
  --impasto: #E8C36A;
  --arancio: #E8623C;
  --testo: #1E1B15;
  --testo-soft: #5E574A;

  --display: 'Arvo', Georgia, serif;
  --corpo: 'Domine', Georgia, serif;

  --max: 1160px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--corpo);
  font-size: clamp(1rem, 0.96rem + 0.16vw, 1.06rem);
  line-height: 1.62;
  color: var(--testo);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.14; margin: 0; }
p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--verde); color: #fff; padding: .8rem 1.2rem; }
.skip:focus { left: 0; }

.js .reveal { opacity: 0; }
.js .reveal.in-view { opacity: 1; }
html:not(.js) .reveal { opacity: 1; }

/* ---------- intro: la teglia che si taglia ---------- */
#intro {
  position: fixed; inset: 0; z-index: 120;
  background: var(--verde); display: grid; place-items: center;
  transition: opacity .6s ease;
}
#intro.hide { opacity: 0; pointer-events: none; }
.intro-teglia {
  position: relative; width: clamp(140px, 30vw, 220px); aspect-ratio: 4 / 3;
  background: var(--impasto); border-radius: 4px;
}
.it-taglio { position: absolute; background: var(--verde); }
.it-v { top: 0; bottom: 0; left: 50%; width: 4px; transform: translateX(-50%) scaleY(0); transform-origin: top; animation: taglio .5s ease .2s forwards; }
.it-o { left: 0; right: 0; top: 50%; height: 4px; transform: translateY(-50%) scaleX(0); transform-origin: left; animation: taglio .5s ease .55s forwards; }
@keyframes taglio { to { transform: translateX(-50%) scaleY(1); } }
.it-o { animation-name: taglioO; }
@keyframes taglioO { to { transform: translateY(-50%) scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .it-v { animation: none; transform: translateX(-50%) scaleY(1); }
  .it-o { animation: none; transform: translateY(-50%) scaleX(1); }
}

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem var(--gutter);
  background: var(--verde); color: var(--crema);
}
.marchio { display: flex; flex-direction: column; line-height: 1.08; text-decoration: none; margin-right: auto; }
.marchio-nome { font-family: var(--display); font-size: 1.25rem; font-weight: 700; letter-spacing: .01em; }
.marchio-sub { font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--turchese-chiaro); }

.top nav { display: flex; align-items: center; gap: 1.4rem; }
.top nav a { text-decoration: none; font-size: .85rem; padding: .3rem 0; border-bottom: 1px solid transparent; }
.top nav a:hover, .top nav a:focus-visible { border-bottom-color: var(--turchese); }
.nav-tel { color: var(--turchese-chiaro) !important; font-weight: 700; }

#langToggle {
  background: none; border: 1px solid rgba(247,241,228,.35); color: inherit;
  font: inherit; font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  padding: .36rem .56rem; cursor: pointer;
}
#langToggle:hover { border-color: var(--turchese); color: var(--turchese-chiaro); }

#burger { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
#burger span { display: block; width: 24px; height: 2px; background: var(--crema); margin: 5px 0; }

/* ---------- hero ---------- */
#hero { display: grid; grid-template-columns: 1fr 1fr; background: var(--verde); color: var(--crema); }
.hero-testo {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--gutter);
}
.occhiello {
  font-size: .71rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--turchese); margin-bottom: 1.4rem;
}
#heroTitolo { font-size: clamp(2.4rem, 6vw, 4.4rem); margin-bottom: 1.3rem; }
#heroTitolo .riga { display: block; }
#heroTitolo .turchese { color: var(--turchese-chiaro); }
.hero-p { max-width: 44ch; color: rgba(247,241,228,.8); }
.hero-p strong { color: var(--impasto); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-foto { overflow: hidden; }
.hero-foto img { width: 100%; height: 100%; object-fit: cover; min-height: 420px; }

.btn {
  display: inline-block; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: .85rem;
  letter-spacing: .06em; text-transform: uppercase; padding: .95rem 1.7rem;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn-pieno { background: var(--impasto); color: var(--verde-scuro); }
.btn-pieno:hover, .btn-pieno:focus-visible { background: var(--arancio); color: #fff; }
.btn-vuoto { border: 1px solid rgba(247,241,228,.42); color: var(--crema); }
.btn-vuoto:hover, .btn-vuoto:focus-visible { border-color: var(--turchese); color: var(--turchese-chiaro); }

/* ══════ LA TEGLIA — sezione-firma ══════ */
#trancio { background: var(--crema); padding: clamp(3.5rem, 8vw, 6rem) var(--gutter); }
.tr-intro { max-width: var(--max); margin: 0 auto clamp(2rem, 4vw, 2.8rem); }
.tr-intro h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin-bottom: .8rem; }
.tr-intro p { color: var(--testo-soft); max-width: 56ch; margin: 0; }

/* la teglia vera e propria: fondo impasto, tranci separati da linee di
   taglio disegnate col gap + il colore della teglia sotto */
.teglia {
  max-width: var(--max); margin: 0 auto;
  background: var(--verde); padding: 4px; border-radius: 4px;
}
.tranci {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
}
.trancio {
  background: var(--impasto); color: var(--verde-scuro);
  padding: clamp(1.4rem, 3vw, 2.2rem) clamp(1.2rem, 2.5vw, 1.8rem);
  position: relative; min-height: 200px;
  /* le fette entrano dal basso: lo fa la firma in JS */
}
.trancio:nth-child(even) { background: #E4B95A; }
/* doppia classe: senza, `.trancio:nth-child(even)` ha specificità
   maggiore e il trancio del conto restava color impasto come gli altri */
.trancio.trancio-conto { background: var(--crema-scuro); }
.tr-num {
  font-family: var(--display); font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; color: rgba(11,42,32,.5); display: block; margin-bottom: .7rem;
}
.trancio h3 { font-size: clamp(1.15rem, 2.4vw, 1.5rem); margin-bottom: .6rem; }
.trancio p { font-size: .93rem; color: rgba(11,42,32,.78); margin: 0; }
.tr-fascia {
  font-family: var(--display); font-size: 2rem; font-weight: 700;
  color: var(--arancio) !important; margin: 0 0 .5rem !important;
}

/* ---------- numeri ---------- */
#cucina { background: var(--verde-scuro); color: var(--crema); padding: clamp(3.5rem, 8vw, 6rem) var(--gutter); }
.cu-in { max-width: var(--max); margin: 0 auto; }
.cu-in h2 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); margin-bottom: .8rem; }
.cu-sub { color: rgba(247,241,228,.7); max-width: 58ch; }
.numeri {
  list-style: none; margin: 2.2rem 0 1.8rem; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.6rem;
}
.numeri li { display: flex; flex-direction: column; gap: .3rem; border-top: 2px solid var(--turchese); padding-top: .9rem; }
.nu-n { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; color: var(--impasto); line-height: 1; }
.nu-l { font-size: .84rem; color: rgba(247,241,228,.72); }
.cu-nota { font-size: .92rem; color: rgba(247,241,228,.6); max-width: 62ch; margin: 0; font-style: italic; }

/* ---------- citazione ---------- */
#voci { background: var(--crema); padding: clamp(3rem, 7vw, 5rem) var(--gutter); }
.citazione {
  max-width: 780px; margin: 0 auto; padding: 0 0 0 clamp(1rem, 3vw, 2rem);
  border-left: 5px solid var(--arancio);
}
.citazione p {
  font-family: var(--display); font-size: clamp(1.2rem, 2.8vw, 1.7rem);
  line-height: 1.4; margin-bottom: .9rem;
}
.citazione cite {
  font-style: normal; font-size: .76rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--testo-soft);
}

/* ---------- dove ---------- */
#dove { display: grid; grid-template-columns: .9fr 1.1fr; background: var(--crema-scuro); }
.dove-info { padding: clamp(3rem, 7vw, 5rem) var(--gutter); }
.dove-info h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.1rem; }
.indirizzo { font-family: var(--display); font-size: 1.28rem; font-weight: 700; line-height: 1.4; }
.mezzi, .orario { color: var(--testo-soft); font-size: .94rem; }
.orario strong { color: var(--testo); }
.dove-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.dove-cta .btn-vuoto { border-color: rgba(30,27,21,.4); color: var(--testo); }
.dove-cta .btn-vuoto:hover { border-color: var(--arancio); color: var(--arancio); }
.dove-mappa iframe { width: 100%; height: 100%; min-height: 380px; display: block; }

/* ---------- footer ---------- */
footer {
  background: var(--verde); color: rgba(247,241,228,.72);
  padding: clamp(2.4rem, 5vw, 3.4rem) var(--gutter);
  text-align: center; font-size: .9rem;
}
footer p { margin: 0 0 .5rem; }
.foot-marchio { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--crema); margin-bottom: .6rem; }
footer a { color: var(--turchese-chiaro); }
.foot-nota { font-size: .78rem; color: rgba(247,241,228,.42); margin-top: 1.2rem; }

/* ---------- action bar ---------- */
#actionBar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; transform: translateY(100%); transition: transform .3s ease;
}
#actionBar.is-visible { transform: translateY(0); }
#actionBar a {
  flex: 1; text-align: center; text-decoration: none;
  font-family: var(--display); padding: .95rem .5rem; font-size: .82rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
#actionBar a:first-child { background: var(--impasto); color: var(--verde-scuro); }
#actionBar a:last-child { background: var(--verde); color: var(--crema); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  #hero, #dove { grid-template-columns: 1fr; }
  .hero-foto { order: -1; }
  .hero-foto img { min-height: 260px; max-height: 40vh; }
  .tranci { grid-template-columns: repeat(2, 1fr); }
  .dove-mappa iframe { min-height: 300px; }
}

@media (max-width: 640px) {
  .top nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--verde-scuro); padding: 0 var(--gutter);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
  }
  .top nav.nav-open { max-height: 340px; padding: 1rem var(--gutter) 1.4rem; }
  .top nav a { width: 100%; padding: .7rem 0; }
  #burger { display: block; }
  #actionBar { display: flex; }
  .tranci { grid-template-columns: 1fr; }
  .trancio { min-height: 0; }
}
