/* Page chrome and the pieces that appear on more than one route. Tokens and
   primitives are in design-system.css; nothing here invents a colour. */

/* ── the facade ───────────────────────────────────────────────── */
.cornice {
  height: 34px;
  position: relative;
  background: linear-gradient(180deg,
    var(--muro-chiaro) 0 20px, var(--rosso) 20px 24px, var(--muro-scuro) 24px);
}
.cornice::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto 0;
  height: 13px;
  background: var(--passata);
}

.testata { padding-top: var(--s5); }
.marchio {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.6vw, 60px);
  line-height: .88;
  letter-spacing: -.03em;
  color: var(--rosso);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 144;
}
.marchio a { color: inherit; text-decoration: none; }
.insegna {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: var(--s3);
  font-variation-settings: "opsz" 9;
}

.navigazione {
  margin-top: var(--s5);
  display: flex;
  gap: var(--s5) var(--s6);
  flex-wrap: wrap;
  align-items: center;
  padding: var(--s2) 0;
  border-top: 3px solid var(--passata);
  border-bottom: 3px solid var(--passata);
}
.navigazione a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15.5px;
  line-height: 1;
  white-space: nowrap;
}
.navigazione a:hover { color: var(--rosso-scuro); }
.navigazione a:active { color: var(--rosso); }
.navigazione a[aria-current] { color: var(--rosso-scuro); font-weight: 700; }
.navigazione .lingua { margin-left: auto; font-weight: 700; }

/* ── page body ────────────────────────────────────────────────── */
main { display: block; }
/* The last section already carries its own bottom padding; main adding more
   left a dead band of wall above the footer. */
main > :last-child { padding-bottom: var(--s9); }
main > .calce-sotto:last-child { padding-bottom: var(--s9); }
.sezione { padding-top: var(--s7); padding-bottom: var(--s6); }
/* The thesis sits beside the lede rather than above it, and gives way to the
   species names — on this page the catch is the display type, not the slogan. */
.due-larga blockquote h1 { font-size: clamp(21px, 2.3vw, 30px); line-height: 1.18; }
.due-larga .bottone { margin-top: var(--s5); }
.sezione > * + * { margin-top: var(--s4); }
.intestazione { max-width: 22ch; }
.piombo { font-size: 18.5px; color: var(--ink-2); max-width: 58ch; }

.calce-sotto { background: var(--calce); position: relative; padding: var(--s8) 0 var(--s9); }
.calce-sotto::before {
  content: "";
  position: absolute;
  inset: auto 0 100% 0;
  height: 14px;
  background: var(--passata);
}

.due { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: var(--s8); align-items: start; }
.due-larga { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s7); align-items: end; }
@media (max-width: 880px) {
  .due, .due-larga { grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
}

/* ── the landing, painted at display size ─────────────────────── */
.sbarco { margin-top: var(--s4); border-collapse: collapse; width: 100%; max-width: 900px; }
.sbarco tr { border-bottom: 2px solid var(--passata); }
.sbarco tr:last-child { border-bottom: 0; }
.sbarco th { text-align: left; padding: var(--s2) 0; font-weight: 400; }
.sbarco td {
  text-align: right;
  padding: var(--s2) 0;
  font-variant-numeric: tabular-nums;
  font-size: clamp(19px, 2.3vw, 29px);
  color: var(--ink-2);
  white-space: nowrap;
}
.specie::first-letter, .registro li b::first-letter { text-transform: uppercase; }
.specie {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.2vw, 40px);
  line-height: 1.06;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 50, "WONK" 1, "opsz" 90;
  position: relative;
  display: inline-block;
  overflow-wrap: anywhere;
  min-width: 0;
}
.sbarco tr.assente .specie { color: var(--ink-spento); }
.sbarco tr.assente td {
  font-size: clamp(14px, 1.6vw, 19px);
  color: var(--rosso-scuro);
  font-weight: 700;
  white-space: normal;
}
/* struck out when the boat came in empty. two bars, second out of register —
   the same move as every other mark on the site */
/* Sized in em, not pixels: a fixed 7px bar reads as a correction over a 40px
   species name and as a blackout over a 24px one on a phone. */
.cancella {
  position: absolute;
  left: -3%; right: -3%;
  top: 50%;
  height: .16em;
  background: var(--rosso);
}
.cancella::after {
  content: "";
  position: absolute;
  left: 2%; right: -2%;
  top: .21em; height: .16em;
  background: var(--passata);
}

/* the ledger in its compact form, on /menu/ */
.registro { background: var(--calce); padding: var(--s5); box-shadow: var(--passo) var(--passo-y) 0 var(--passata); }
.registro h2 { font-size: 21px; }
.registro ul { list-style: none; margin-top: var(--s4); }
.registro li {
  display: flex; justify-content: space-between; gap: var(--s4);
  padding: var(--s2) 0; border-bottom: 1px dotted rgba(36, 26, 16, .35);
}
.registro li:last-child { border-bottom: 0; }
.registro li.assente { color: var(--ink-spento); }
.registro li.assente b { text-decoration: line-through; text-decoration-color: var(--rosso); }
.registro .kg { font-variant-numeric: tabular-nums; }

/* ── the menu ─────────────────────────────────────────────────── */
.piatti { margin-top: var(--s4); }
.piatto-riga { padding: var(--s5) 0; border-top: 1px solid rgba(36, 26, 16, .26); }
.piatto-riga:first-child { border-top: 0; }
.piatto-riga h3 { font-variation-settings: "SOFT" 45, "opsz" 30; }
.piatto-riga .nota { margin-top: var(--s1); }
.piatto-riga.spento h3 { color: var(--ink-spento); }
.motivo { color: var(--rosso-scuro); font-weight: 700; margin-top: var(--s1); }
.prezzo { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }

.riga-alta { display: flex; justify-content: space-between; gap: var(--s4); align-items: baseline; }

.resta {
  display: inline-block;
  margin-top: var(--s3);
  background: var(--rosso-scuro);
  color: var(--calce);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: var(--s1) var(--s3);
  line-height: 1.5;
}

/* ── the table: what the instrument is for ────────────────────── */
.tavolo {
  background: var(--muro);
  padding: var(--s5);
  box-shadow: var(--passo) var(--passo-y) 0 var(--passata);
  position: sticky;
  top: var(--s5);
}
@media (max-width: 880px) { .tavolo { position: static; } }
.tavolo h2 { font-size: 22px; }
.tavolo > * + * { margin-top: var(--s4); }
.conto { width: 100%; border-collapse: collapse; }
.conto th {
  text-align: left;
  font-weight: 400;
  font-family: var(--font-display);
  font-size: 16.5px;
  padding: var(--s2) var(--s3) var(--s2) 0;
  font-variation-settings: "SOFT" 45, "opsz" 20;
}
.conto td { text-align: right; padding: var(--s2) 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.conto .quanti { color: var(--ink-2); font-size: 14.5px; padding-right: var(--s4); }
.conto tbody tr { border-bottom: 1px dotted rgba(36, 26, 16, .4); }
.conto tfoot th, .conto tfoot td {
  border-top: 3px solid var(--passata);
  padding-top: var(--s3);
  font-weight: 700;
  font-size: 19px;
}
.a-testa { font-family: var(--font-display); font-size: 25px; font-variation-settings: "SOFT" 45, "opsz" 30; }

/* ── the instrument's controls ────────────────────────────────── */
.strumento { margin-top: var(--s6); }
.gruppo { border: 0; margin-top: var(--s5); }
.gruppo legend { padding: 0; }
.scelte { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s3); }

.pillola { position: relative; }
.pillola input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; margin: 0; cursor: pointer;
}
.pillola span {
  display: block;
  border: 2px solid var(--ink-2);
  padding: var(--s2) var(--s4);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink-2);
  background: none;
}
.pillola input:checked + span { background: var(--rosso-scuro); border-color: var(--rosso-scuro); color: var(--calce); }
.pillola input:focus-visible + span { outline: 3px solid var(--rosso-scuro); outline-offset: 3px; }
.pillola input:hover + span { border-color: var(--rosso-scuro); }
.pillola input:disabled + span { opacity: .55; cursor: not-allowed; }

.contatore { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s3); }
.contatore button {
  font: 700 18px/1 var(--font-body);
  width: 44px; height: 44px;
  border: 2px solid var(--ink-2);
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.contatore button:hover { border-color: var(--rosso-scuro); color: var(--rosso-scuro); }
.contatore button:active { background: var(--muro-scuro); }
.contatore button[disabled] { opacity: .55; cursor: not-allowed; }
.contatore output { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 3ch; text-align: center; }

/* Selecting a portion can put another dish out of reach. The reason wipes in;
   nothing else moves, and nothing animates just because it appeared. */
.motivo { transition: opacity 180ms ease; }
.piatto-riga[data-cambiato="1"] .motivo { animation: entra 180ms ease both; }
@keyframes entra { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.senza-script { background: var(--calce); padding: var(--s4) var(--s5); border-left: 6px solid var(--rosso); }

/* ── figures ──────────────────────────────────────────────────── */
.didascalia {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink-2);
  text-align: center;
  margin-top: var(--s5);
  font-variation-settings: "opsz" 14;
}
/* A photograph of a dish. Square, so the grid stays even whether a cell holds
   a photo or a drawing. */
.scatto { margin: 0; }
.scatto img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 1; object-fit: cover;
  box-shadow: var(--passo) var(--passo-y) 0 var(--passata);
}
.scatto .didascalia { text-align: left; margin-top: var(--s4); }

.vetrina { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--s7); }
.vetrina figure { margin: 0; }
.vetrina figcaption { margin-top: var(--s5); }

/* ── prose lists ──────────────────────────────────────────────── */
.elenco { list-style: none; }
.elenco li { padding: var(--s4) 0; border-top: 1px solid rgba(36, 26, 16, .26); max-width: var(--misura); }
.elenco li:first-child { border-top: 0; }
.elenco h3 { margin-bottom: var(--s1); }

.orari { border-collapse: collapse; }
.orari th { text-align: left; padding: var(--s2) var(--s5) var(--s2) 0; font-weight: 700; }
.orari td { padding: var(--s2) 0; color: var(--ink-2); }

/* ── footer ───────────────────────────────────────────────────── */
.chiusura {
  background: var(--ink);
  color: var(--muro-chiaro);
  padding: var(--s8) 0 var(--s7);
  /* no margin: the last section already carries its own bottom padding, and
     stacking the two left a band of bare wall above the footer */
}
.chiusura a { color: var(--muro-chiaro); }
.chiusura a:hover { color: var(--calce); }
.chiusura :focus-visible { outline-color: var(--muro-chiaro); }
.mappa { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: var(--s6); }
.mappa h2 {
  font-size: 12.5px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muro-scuro);
  font-variation-settings: "opsz" 9;
}
.mappa ul { list-style: none; margin-top: var(--s3); }
.mappa li { margin-top: var(--s2); }
.mappa a { text-decoration: none; }
.mappa a:hover { text-decoration: underline; }
.recapiti { margin-top: var(--s6); font-size: 15.5px; overflow-wrap: anywhere; }
.recapiti p { max-width: 46ch; }
.avviso {
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 2px solid var(--ink-2);
  font-size: 14.5px;
  color: var(--muro-scuro);
}
.avviso p { max-width: 62ch; }
.avviso a { color: var(--muro-chiaro); }
