/* A Stàgh Bàn — stile delle pagine pubbliche.
   Ripreso dal prototipo (riferimenti/prototipo-simulazione.html), poi schiarito su richiesta:
   il sito pubblico è sempre chiaro, il nero resta solo sotto le foto e nel piè di pagina.
   Palette in docs/SPEC.md; il tuorlo è l'unico accento. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/newsreader-400-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/caveat-500-latin.woff2") format("woff2");
}

:root {
  --nero: #000000;
  --gesso: #eeeeea;
  --gesso-2: #d6d6cf;
  --fumo: #8e8e88;
  --tuorlo: #d9a227;
  --tuorlo-scuro: #8a6510;
  --sangiovese: #8c2230;

  --sfondo: #f6f5f1;
  --sfondo-alt: #eeeeea;
  --superficie: #ffffff;
  --testo: #111110;
  --testo-2: #5c5c57;
  --bordo: #d9d9d2;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --corpo: "Newsreader", Georgia, "Times New Roman", serif;
  --mano: "Caveat", "Segoe Script", "Bradley Hand", cursive;

  --altezza-testata: 3.6rem;

  --testata-sfondo: rgba(255, 255, 255, .94);
  --scelta-sfondo: var(--nero);
  --scelta-testo: #fff;
  --bottone-sfondo: var(--nero);
  --bottone-testo: #fff;
  --dialetto: var(--tuorlo-scuro);

  color-scheme: light;
}

/* Tema scuro, come nel prototipo: si sceglie con il pulsante della testata
   (data-tema, impostato da tema.js) oppure segue il sistema se non si è scelto. */
:root[data-tema="scuro"] {
  --sfondo: #121211;
  --sfondo-alt: #1a1a18;
  --superficie: #1d1d1b;
  --testo: #ecece6;
  --testo-2: #a6a69f;
  --bordo: #34342f;
  --testata-sfondo: rgba(0, 0, 0, .94);
  --scelta-sfondo: var(--gesso);
  --scelta-testo: var(--nero);
  --bottone-sfondo: var(--gesso);
  --bottone-testo: var(--nero);
  --dialetto: var(--tuorlo);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="chiaro"]) {
    --sfondo: #121211;
    --sfondo-alt: #1a1a18;
    --superficie: #1d1d1b;
    --testo: #ecece6;
    --testo-2: #a6a69f;
    --bordo: #34342f;
    --testata-sfondo: rgba(0, 0, 0, .94);
    --scelta-sfondo: var(--gesso);
    --scelta-testo: var(--nero);
    --bottone-sfondo: var(--gesso);
    --bottone-testo: var(--nero);
    --dialetto: var(--tuorlo);
    color-scheme: dark;
  }
}

html { scroll-padding-top: calc(var(--altezza-testata) + 1rem); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--sfondo);
  color: var(--testo);
  font-family: var(--corpo);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--tuorlo); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.interno { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 520px) { .interno { padding: 0 1rem; } }

.visivamente-nascosto {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.salta {
  position: absolute; left: 1rem; top: -10rem; z-index: 100;
  background: var(--tuorlo); color: var(--nero); padding: .6rem 1rem;
  font-family: var(--display); font-weight: 600;
}
.salta:focus { top: 1rem; }

/* ---------- testata ---------- */

.testata {
  position: sticky; top: 0; z-index: 40;
  background: var(--testata-sfondo);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  color: var(--testo);
  border-bottom: 1px solid var(--bordo);
}
.testata .interno { display: flex; align-items: center; gap: 1.5rem; min-height: var(--altezza-testata); }
.marchio {
  font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em;
  text-decoration: none; margin-right: auto;
}
.testata nav ul { display: flex; gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.voce-nav {
  font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--testo-2);
  text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent;
}
.voce-nav:hover { color: var(--testo); }
.voce-nav[aria-current="page"] { color: var(--testo); border-bottom-color: var(--tuorlo); }
.lingue { display: flex; gap: 2px; border: 1px solid var(--bordo); border-radius: 999px; padding: 2px; }
.lingue a {
  font-family: var(--display); font-weight: 600; font-size: .78rem; text-decoration: none;
  color: var(--testo-2); padding: .2rem .6rem; border-radius: 999px;
}
.lingue a:hover { color: var(--testo); }
.lingue a[aria-current="true"] { background: var(--scelta-sfondo); color: var(--scelta-testo); }
.tema {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; margin-left: -.75rem; padding: 0; cursor: pointer;
  border: 1px solid var(--bordo); border-radius: 999px; background: none; color: var(--testo-2);
}
.tema[hidden] { display: none; }
.tema:hover { color: var(--testo); }
.tema svg { width: 1rem; height: 1rem; }
.tema .tema-luna { display: none; }
:root[data-tema="chiaro"] .tema .tema-luna { display: block; }
:root[data-tema="chiaro"] .tema .tema-sole { display: none; }
:root[data-tema="scuro"] .tema .tema-luna { display: none; }
:root[data-tema="scuro"] .tema .tema-sole { display: block; }
@media (max-width: 560px) {
  .testata .interno { gap: .75rem; }
  .testata nav ul { gap: .8rem; }
  .marchio { font-size: .98rem; }
  .voce-nav { font-size: .88rem; }
}
@media (max-width: 380px) {
  .marchio { font-size: .9rem; }
  .testata nav ul { gap: .6rem; }
}

.avviso { background: var(--sangiovese); color: #fff; }
.avviso .interno { padding-top: .75rem; padding-bottom: .75rem; font-family: var(--display); font-weight: 600; font-size: .95rem; }

/* ---------- vetrina: presentazione a tutto schermo ---------- */

.vetrina {
  position: relative;
  min-height: 34rem;
  height: calc(100vh - var(--altezza-testata));
  height: calc(100svh - var(--altezza-testata));
  overflow: hidden;
  background: #1a1612;
  color: #fff;
  display: flex;
  align-items: flex-end;
}
.vetrina-foto { list-style: none; padding: 0; position: absolute; inset: 0; }
.vetrina-diapositiva {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.vetrina-diapositiva.attiva { opacity: 1; }
.vetrina-img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .vetrina-diapositiva.attiva .vetrina-img { animation: avvicina 9s ease-out both; }
}
@keyframes avvicina { from { transform: scale(1.06); } to { transform: scale(1); } }
/* Velatura per leggere il testo sopra le foto. */
.vetrina::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .45) 38%, rgba(0, 0, 0, .05) 70%),
    linear-gradient(to right, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 60%);
}
.vetrina-testo { position: relative; z-index: 2; width: 100%; padding: 0 0 clamp(4.5rem, 10vh, 6.5rem); }
.vetrina-comandi {
  position: absolute; z-index: 3; right: 1.5rem; bottom: 1.6rem;
  display: flex; align-items: center; gap: .55rem;
}
.vetrina-comandi[hidden] { display: none; }
.vetrina-punto {
  width: .6rem; height: .6rem; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .8); background: transparent;
}
.vetrina-punto[aria-current="true"] { background: var(--tuorlo); border-color: var(--tuorlo); }
.vetrina-pausa {
  width: 2rem; height: 2rem; margin-left: .35rem; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .55); background: rgba(0, 0, 0, .3); color: #fff;
  font-size: .7rem; line-height: 1;
}
/* Icone disegnate in CSS: due barre per la pausa, un triangolo per riprendere. */
.vetrina-pausa { display: inline-flex; align-items: center; justify-content: center; }
.vetrina-pausa::before {
  content: ""; width: .55rem; height: .7rem;
  border-left: .18rem solid currentColor; border-right: .18rem solid currentColor;
}
.vetrina-pausa[aria-pressed="true"]::before {
  width: 0; height: 0; margin-left: .15rem; border-right: 0;
  border-top: .38rem solid transparent; border-bottom: .38rem solid transparent; border-left: .6rem solid currentColor;
}
@media (max-width: 520px) {
  .vetrina-comandi { right: 1rem; bottom: 1rem; }
}

.lavagna-luogo { font-family: var(--display); font-weight: 600; font-size: .98rem; color: rgba(255, 255, 255, .82); }
.lavagna-titolo {
  font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 11vw, 6.8rem);
  line-height: .92; letter-spacing: -.035em; margin-top: .6rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.lavagna-claim {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: rgba(255, 255, 255, .92);
  max-width: 34ch; margin-top: 1rem; text-shadow: 0 1px 12px rgba(0, 0, 0, .45);
}
.gesso {
  font-family: var(--mano); font-weight: 500; font-size: clamp(1.55rem, 4vw, 2.15rem); line-height: 1.25;
  margin-top: 1.8rem; padding-left: 1.1rem; border-left: 2px solid var(--tuorlo);
  text-shadow: 0 0 14px rgba(0, 0, 0, .5); max-width: 30ch;
}
.lavagna-azioni { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.lavagna-azioni .bottone { margin-top: 0; }

.stato {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.8rem;
  padding: .5rem .95rem; border: 1px solid var(--bordo); border-radius: 999px; background: var(--superficie);
  font-family: var(--display); font-weight: 600; font-size: .9rem; color: var(--testo);
}
.vetrina .stato { background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .35); color: #fff; }
.pallino { width: .5rem; height: .5rem; border-radius: 999px; background: var(--fumo); flex: none; }
.stato--aperto .pallino { background: var(--tuorlo); box-shadow: 0 0 0 4px rgba(217, 162, 39, .25); }
.stato--chiusura .pallino { background: #e0566a; }

/* ---------- sezioni ---------- */

.sezione { padding: clamp(3.25rem, 8vw, 5.5rem) 0; }
.sezione.alt { background: var(--sfondo-alt); }
.titolo-sez {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 5vw, 2.7rem);
  letter-spacing: -.03em; line-height: 1.02; margin-bottom: 1.75rem;
}
.sotto-sez { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--testo-2); margin-bottom: .9rem; }
.due-col { display: grid; gap: 2.5rem; }
@media (min-width: 820px) { .due-col { grid-template-columns: 1fr 1fr; gap: 4.5rem; } .due-col--centro { align-items: center; } }
.nome-dialetto {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 7vw, 3.8rem);
  line-height: 1; letter-spacing: -.04em; color: var(--dialetto);
}
.storia-titolo, .glossa { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--testo-2); margin: .8rem 0 1.4rem; }
.glossa { font-family: var(--corpo); font-style: italic; font-weight: 400; }
.paragrafo { max-width: 60ch; font-size: 1.1rem; }
.paragrafo + .paragrafo { margin-top: 1rem; }
.foto-storia img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
@media (max-width: 819px) { .foto-storia img { aspect-ratio: 4 / 3; } }

.bottone {
  display: inline-flex; align-items: center; margin-top: 1.6rem; padding: .8rem 1.35rem;
  background: var(--bottone-sfondo); color: var(--bottone-testo); border: 0; border-radius: 999px; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: .92rem; transition: background .15s, color .15s;
}
.vetrina .bottone { background: #fff; color: var(--nero); }
.vetrina .bottone--bordo { background: rgba(0, 0, 0, .25); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.bottone:hover, .vetrina .bottone:hover { background: var(--tuorlo); color: var(--nero); }
.collegamento { font-family: var(--display); font-weight: 600; text-underline-offset: 3px; }

/* ---------- commenti ---------- */

.commenti { list-style: none; padding: 0; display: grid; gap: 2.25rem; }
@media (min-width: 820px) { .commenti { grid-template-columns: repeat(2, 1fr); gap: 2.75rem 4.5rem; } }
.commento-testo { font-size: 1.16rem; font-style: italic; max-width: 46ch; padding-left: 1rem; border-left: 3px solid var(--tuorlo); }
.commento-firma { font-family: var(--display); font-weight: 600; font-size: .92rem; color: var(--testo-2); margin-top: .55rem; padding-left: 1rem; }

/* ---------- orari e contatti ---------- */

.orari { list-style: none; padding: 0; }
.orario { display: flex; align-items: baseline; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--bordo); }
.orario-giorno { font-family: var(--display); font-weight: 600; min-width: 6.5rem; }
.orario-turni { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; color: var(--testo-2); }
.orario.oggi .orario-giorno, .orario.oggi .orario-turni { color: var(--testo); font-weight: 600; }
.orario-chiuso { color: var(--testo-2); font-style: italic; }
.eti-oggi {
  font-family: var(--display); font-weight: 600; font-size: .74rem; color: var(--nero);
  background: var(--tuorlo); padding: .06rem .45rem; border-radius: 3px;
}
.chiusure { list-style: none; padding: 0; }
.chiusura { padding: .9rem 0; border-bottom: 1px solid var(--bordo); }
.chiusura-date { font-family: var(--display); font-weight: 600; color: var(--sangiovese); }
.chiusura-motivo { color: var(--testo-2); }
.vuoto { color: var(--testo-2); font-style: italic; }

.indirizzo {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  line-height: 1.1; letter-spacing: -.03em; font-style: normal;
}
.contatto { margin-top: 1.1rem; }
.contatto-et { display: block; font-family: var(--display); font-weight: 600; font-size: .88rem; color: var(--testo-2); }

/* ---------- pagine interne ---------- */

.testa-pagina { background: var(--sfondo-alt); padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 3vw, 2.25rem); }
.testa-titolo {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 8vw, 4.2rem);
  letter-spacing: -.035em; line-height: .95;
}
.testa-pagina .stato { margin-top: 1.4rem; }
.schede { background: var(--sfondo-alt); border-bottom: 1px solid var(--bordo); }
.schede ul { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; list-style: none; padding: 0; }
.schede ul::-webkit-scrollbar { display: none; }
.scheda {
  display: block; flex: none; color: var(--testo-2); text-decoration: none; padding: 1rem .85rem .85rem;
  border-bottom: 3px solid transparent; font-family: var(--display); font-weight: 600; font-size: .92rem; white-space: nowrap;
}
.schede li:first-child .scheda { padding-left: 0; }
.scheda:hover { color: var(--testo); }
.scheda[aria-current] { color: var(--testo); border-bottom-color: var(--tuorlo); }
.schede--sotto { background: var(--sfondo); }
.schede--sotto .scheda { padding: .7rem .75rem .6rem; border-bottom-width: 2px; font-size: .85rem; }

/* ---------- carta del menu ---------- */

.carta-testa { margin-bottom: 2.5rem; }
.carta-tipo { font-family: var(--display); font-weight: 600; font-size: .98rem; color: var(--testo-2); }
.carta-titolo {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 5vw, 2.7rem);
  letter-spacing: -.03em; line-height: 1.05; margin-top: .15rem;
}
.carta-periodo { font-family: var(--mano); font-size: 1.7rem; color: var(--testo-2); margin-top: .3rem; line-height: 1.2; }
.carta-minimo { color: var(--testo-2); margin-top: .8rem; }
.carta-prezzo {
  display: inline-block; margin-top: 1rem; padding: .4rem .85rem; border-radius: 3px;
  background: var(--tuorlo); color: var(--nero);
  font-family: var(--display); font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums;
}
.carta-nota { font-style: italic; color: var(--testo-2); margin-top: .8rem; max-width: 60ch; }
.carta-vuota { font-size: 1.1rem; max-width: 52ch; }
.portata + .portata { margin-top: 2.75rem; }
.portata-titolo {
  font-family: var(--display); font-weight: 800; font-size: 1.28rem; letter-spacing: -.015em;
  padding-bottom: .5rem; border-bottom: 2px solid var(--tuorlo);
}
.portata-nota { font-style: italic; color: var(--testo-2); font-size: .96rem; margin-top: .6rem; }
.piatti { list-style: none; padding: 0; }
.piatto { padding: 1.05rem 0; border-bottom: 1px solid var(--bordo); }
.piatto-riga { display: flex; align-items: baseline; gap: .5rem; }
.piatto-nome { font-family: var(--display); font-weight: 600; font-size: 1.07rem; }
.punti { flex: 1; min-width: 1.5rem; border-bottom: 1.5px dotted var(--bordo); transform: translateY(-.28em); }
.piatto-prezzo { font-family: var(--display); font-weight: 600; font-size: 1.07rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.piatto-desc, .piatto-allergeni { color: var(--testo-2); font-size: .99rem; margin-top: .25rem; max-width: 56ch; }
.piatto-allergeni { font-size: .9rem; }
.carta-piede { margin-top: 2.5rem; color: var(--testo-2); font-size: .94rem; font-style: italic; }
.elenco-semplice { list-style: none; padding: 0; margin-top: 1rem; }
.elenco-semplice li { padding: .5rem 0; border-bottom: 1px solid var(--bordo); }

/* ---------- informativa e avviso ---------- */

.testo-lungo { max-width: 46rem; }
.testo-lungo h2 { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.015em; margin: 2.2rem 0 .6rem; }
.testo-lungo p + p, .testo-lungo ul + p, .testo-lungo p + ul { margin-top: .7rem; }
.testo-lungo ul { padding-left: 1.2rem; }
.testo-lungo li + li { margin-top: .25rem; }
.introduzione { font-size: 1.15rem; }
.aggiornato { margin-top: 2.5rem; color: var(--testo-2); font-style: italic; }

.avviso-cookie {
  position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 44rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
  padding: 1rem 1.25rem; border-radius: 10px;
  background: var(--superficie); color: var(--testo); border: 1px solid var(--bordo);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
  font-size: .98rem;
}
.avviso-cookie[hidden] { display: none; }
.avviso-cookie p { flex: 1 1 20rem; }
.avviso-cookie a { font-family: var(--display); font-weight: 600; text-underline-offset: 3px; }
.avviso-cookie .bottone { margin-top: 0; }

/* ---------- piè di pagina ---------- */

.pie { background: var(--nero); color: var(--fumo); padding: 2.5rem 0 3rem; font-size: .94rem; }
.pie .interno { display: flex; flex-wrap: wrap; gap: .5rem 2.25rem; }
.pie strong { color: var(--gesso); font-family: var(--display); }
.pie a { color: var(--gesso-2); }
.pie-legale { flex-basis: 100%; font-size: .85rem; margin-top: .75rem; }

@media print {
  .testata, .pie, .schede, .lavagna-azioni, .salta, .vetrina-comandi { display: none; }
  body { background: #fff; color: #000; }
}
