/* Gastronomia del Crostolo (negozio inventato, esempio SMagency)
   Il mondo: insegne smaltate e piastrelle di una bottega emiliana. */

@font-face { font-family: "Bodoni"; src: url("fonts/bodoni.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Bodoni"; src: url("fonts/bodoni-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --smalto: #17392d;
  --smalto-scuro: #0e261d;
  --sangue: #7d1d1a;
  --oro: #d2b061;
  --maiolica: #f5f5f2;
  --fuga: #e2dccf;
  --inchiostro: #1d1b17;
  --grigio: #57524a;
  --titoli: "Bodoni", "Didot", Georgia, serif;
  --testo: "Figtree", system-ui, sans-serif;
  --margine: clamp(16px, 4vw, 48px);
  --esce: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--maiolica);
  color: var(--inchiostro);
  font: 400 1.0625rem/1.6 var(--testo);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--oro); color: var(--smalto-scuro); }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }
h1, h2 { font-family: var(--titoli); font-weight: 700; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.icona { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nascosto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Barra "sito dimostrativo" */
.demo {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px;
  padding: 10px var(--margine);
  background: #0f1226; color: #f2efe6; font-size: .86rem; line-height: 1.4;
}
.demo p { margin: 0; }
.demo a { color: #c8ff2e; }
.demo__torna { font-weight: 700; white-space: nowrap; text-decoration: none; }

/* Testata: l'insegna smaltata */
.testata {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px var(--margine);
  background: var(--smalto);
  color: var(--maiolica);
  box-shadow: 0 10px 24px -18px rgba(0, 0, 0, .7);
}
.insegna {
  display: grid; justify-items: center;
  padding: 6px 18px 8px;
  border: 1.5px solid var(--oro);
  border-radius: 10px;
  box-shadow: inset 0 0 0 3px var(--smalto), inset 0 0 0 4px rgba(210, 176, 97, .55);
  text-decoration: none; line-height: 1;
}
.insegna__piccolo { font: 600 .8rem/1 var(--testo); letter-spacing: .32em; text-transform: uppercase; color: var(--oro); }
.insegna__grande { margin-top: 4px; font: italic 700 1.35rem/1 var(--titoli); }
.menu { display: flex; gap: 4px; margin-left: auto; }
.menu a { padding: .5em .8em; border-radius: 6px; font-weight: 600; font-size: .95rem; text-decoration: none; }
.menu a:hover { background: rgba(255, 255, 255, .08); color: var(--oro); }

/* Bottoni */
.bottone {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .8em 1.4em;
  border: 0; border-radius: 8px;
  font: 700 1rem/1.15 var(--testo);
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--esce), box-shadow .2s, background-color .2s;
}
.bottone:hover { transform: translateY(-1px); }
.bottone:active { transform: translateY(1px); }
.bottone--oro { background: var(--oro); color: var(--smalto-scuro); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .55); }
.bottone--oro:hover { background: #dfc074; }
.bottone--oro:disabled { background: #b9b2a2; color: #2e2a24; cursor: not-allowed; transform: none; box-shadow: none; }
.bottone--vuoto { color: var(--maiolica); box-shadow: inset 0 0 0 1.5px rgba(248, 246, 241, .6); }
.bottone--vuoto:hover { background: rgba(255, 255, 255, .08); }
.bottone--verde { background: var(--smalto); color: var(--maiolica); }
.bottone--verde:hover { background: var(--smalto-scuro); }

/* Apertura: la foto del magazzino e la targa smaltata sopra */
.apertura {
  position: relative;
  display: grid;
  min-height: min(88svh, 820px);
  align-items: end;
  padding: clamp(24px, 5vw, 64px) var(--margine);
  overflow: hidden;
  background: var(--smalto-scuro);
}
.apertura__foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.apertura__targa {
  position: relative;
  max-width: 640px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 16px;
  background: var(--smalto);
  color: var(--maiolica);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), inset 0 0 0 2px var(--smalto), inset 0 0 0 3.5px var(--oro);
}
.apertura__targa h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.02em;
  margin-bottom: .45em;
}
.apertura__targa > p { color: rgba(248, 246, 241, .82); font-size: 1.12rem; max-width: 34em; }
.apertura__azioni { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }


/* Il banco del giorno: targhette smaltate sulle piastrelle */
.banco {
  padding: clamp(64px, 9vw, 120px) var(--margine);
  background-color: var(--maiolica);
  background-image:
    linear-gradient(var(--fuga) 1px, transparent 1px),
    linear-gradient(90deg, var(--fuga) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
}
.banco__testa { max-width: 1100px; margin: 0 auto 36px; }
.banco__testa h2 { font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: .95; color: var(--smalto); }
.banco__testa p { margin-top: 14px; max-width: 34em; color: var(--grigio); font-size: 1.12rem; }

.targhe {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 14px; max-width: 1100px; margin: 0 auto; padding: 0; list-style: none;
}
.targa {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "nome prezzo" "dett prezzo";
  align-items: center; column-gap: 16px;
  width: 100%; min-height: 104px;
  padding: 18px 22px;
  border: 0; border-radius: 12px;
  background: var(--smalto);
  color: var(--maiolica);
  text-align: left; font: inherit; cursor: pointer;
  box-shadow: 0 14px 22px -16px rgba(14, 38, 29, .9), inset 0 0 0 2px var(--smalto), inset 0 0 0 3px rgba(210, 176, 97, .6);
  transition: transform .18s var(--esce), box-shadow .18s;
}
.targa:hover { transform: translateY(-2px); }
.targa:active { transform: translateY(1px) scale(.99); }
.targa__nome { grid-area: nome; font: 700 1.5rem/1.05 var(--titoli); }
.targa__dettaglio { grid-area: dett; margin-top: 4px; font-size: .92rem; color: rgba(248, 246, 241, .75); }
.targa__prezzo { grid-area: prezzo; font: 700 1.5rem/1 var(--titoli); color: var(--oro); font-variant-numeric: lining-nums tabular-nums; }
.targa__conta {
  position: absolute; top: -10px; right: -8px;
  display: none; place-items: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: 999px;
  background: var(--sangue); color: var(--maiolica);
  font: 700 1rem/1 var(--testo);
  box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .6);
}
.targa.scelta { background: var(--smalto-scuro); box-shadow: 0 14px 22px -16px rgba(14, 38, 29, .9), inset 0 0 0 2px var(--smalto-scuro), inset 0 0 0 3px var(--oro); }
.targa.scelta .targa__conta { display: grid; animation: timbro .35s var(--esce); }
@keyframes timbro { from { transform: scale(1.6) rotate(-8deg); opacity: 0; } }

/* L'ordine */
/* Resta in fondo allo schermo solo dopo il primo piatto scelto */
.ordine {
  position: relative; bottom: 12px; z-index: 10;
  max-width: 1100px; margin: 28px auto 0;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--inchiostro);
  color: var(--maiolica);
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .7);
}
.ordine.attivo { position: sticky; animation: sale .4s var(--esce); }
@keyframes sale { from { translate: 0 16px; opacity: .6; } }
.ordine__riga { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.ordine__conto { margin: 0; font: 700 1.2rem/1.3 var(--testo); font-variant-numeric: tabular-nums; }
.ordine__svuota { padding: 0; border: 0; background: none; color: var(--oro); font: 600 .95rem var(--testo); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ordine__campi { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.ordine__campi label { font-weight: 600; }
.ordine__campi select {
  min-height: 48px; padding: 0 2.2em 0 .9em;
  border: 1.5px solid rgba(248, 246, 241, .35); border-radius: 8px;
  background: transparent; color: var(--maiolica);
  font: 600 1rem var(--testo);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--oro) 50%), linear-gradient(135deg, var(--oro) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.ordine__campi select option { color: var(--inchiostro); }
.ordine__campi .bottone { margin-left: auto; }
.ordine__nota { margin: 10px 0 0; font-size: .85rem; color: rgba(248, 246, 241, .7); }

/* Da dove arriva: tre foto come piastrelle grandi */
.filiera {
  display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 14px;
  padding: 0 var(--margine) clamp(64px, 9vw, 120px);
  max-width: calc(1100px + 2 * var(--margine)); margin: 0 auto;
}
.filiera__pezzo { margin: 0; position: relative; overflow: hidden; border-radius: 12px; background: var(--smalto); }
.filiera__pezzo--alto { grid-row: span 2; }
.filiera__pezzo img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; }
.filiera__pezzo figcaption {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  padding: 12px 16px; border-radius: 10px;
  background: rgba(248, 246, 241, .94); color: var(--inchiostro);
  font-size: .98rem; line-height: 1.45;
}
.filiera__pezzo figcaption strong { font: italic 700 1.1rem var(--titoli); color: var(--sangue); }

/* Natale: il pannello rosso sangue */
.feste { padding: clamp(64px, 9vw, 120px) var(--margine); background: var(--sangue); color: var(--maiolica); }
.feste__targa { max-width: 760px; margin: 0 auto; text-align: center; }
.feste h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1; margin-bottom: .45em; }
.feste p { font-size: 1.15rem; color: rgba(248, 246, 241, .86); margin: 0 auto 1.4em; max-width: 34em; }

/* Orari e dove */
.orari, .dove { max-width: 1100px; margin: 0 auto; padding: clamp(56px, 8vw, 100px) var(--margine) 0; }
.orari h2, .dove h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); color: var(--smalto); margin-bottom: 20px; }
.orari__tabella { width: 100%; max-width: 640px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.orari__tabella th, .orari__tabella td { padding: 12px 10px; border-bottom: 1px solid var(--fuga); text-align: left; white-space: nowrap; }
.orari__tabella th { font-weight: 700; }
.orari__tabella .chiuso { color: var(--sangue); font-style: italic; }
.orari__tabella tr.oggi { background: var(--smalto); color: var(--maiolica); }
.orari__tabella tr.oggi .chiuso { color: var(--oro); }
.orari__tabella tr.oggi th::after { content: " · oggi"; font-weight: 500; color: var(--oro); }
.dove { padding-bottom: clamp(64px, 9vw, 120px); }
.dove__indirizzo { font: 700 clamp(1.5rem, 3vw, 2rem)/1.25 var(--titoli); }
.dove p:not(.dove__indirizzo) { color: var(--grigio); }
.dove__azioni { display: flex; flex-wrap: wrap; gap: 10px; }

.piede { padding: 40px var(--margine) 110px; background: var(--smalto-scuro); color: rgba(248, 246, 241, .78); font-size: .92rem; }
.piede p { max-width: 1100px; margin: 0 auto .6em; }
.piede__nome { font: italic 700 1.6rem var(--titoli); color: var(--maiolica); }
.piede__crediti { font-size: .8rem; color: rgba(248, 246, 241, .6); }
.piede a { color: var(--oro); }

@media (max-width: 860px) {
  .menu { display: none; }
  .testata__ordina { margin-left: auto; }
  .apertura { min-height: 0; padding-top: 46vw; }
  .apertura__foto { height: 62vw; }
  .filiera { grid-template-columns: 1fr; }
  .filiera__pezzo--alto { grid-row: auto; }
  .ordine__campi .bottone { margin-left: 0; width: 100%; }
  .orari__tabella th, .orari__tabella td { padding: 11px 6px; font-size: .95rem; }
  .orari__tabella tr.oggi th::after { content: ""; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
