/* ==========================================================================
   Menù smart (QR) — foglio di stile a sé, leggero: la pagina non carica site.css.
   Testata fissa in px (non cresce col [+]); il contenuto è tutto in rem, così
   il [+]/[−] cambia --fs sull'<html> e scala solo il menù.
   ========================================================================== */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2"); }

:root {
  --fs: 1;                 /* fattore dimensione testo: lo cambiano i bottoni [+]/[−] */
  --bg: #FAF6EF;
  --surface: #FFFFFF;
  --ink: #2B211A;
  --ink-2: #4A3D33;
  --muted: #74675C;
  --line: rgba(43, 33, 26, .12);
  --brass: #B58A2A;
  --brass-ink: #86621B;
  --brass-soft: #F3E6C6;
  /* Sfondi delle categorie, a rotazione, opacità 50% come richiesto */
  --c0: rgba(173, 216, 230, .5);   /* azzurro chiaro */
  --c1: rgba(178, 223, 178, .5);   /* verde chiaro */
  --c2: rgba(255, 200, 150, .5);   /* arancio chiaro */
  --c3: rgba(255, 236, 150, .5);   /* giallo chiaro */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(var(--fs) * 100%); -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--brass-ink); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Testata fissa ---------- */
.sm-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 246, 239, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); box-shadow: 0 6px 20px rgba(43, 33, 26, .06);
  padding: 8px 14px 10px; padding-top: max(8px, env(safe-area-inset-top));
  font-size: 15px;   /* in px: la testata non cresce col [+] */
}
.sm-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 760px; margin: 0 auto; }
.sm-logo img { width: 120px; height: auto; }
.sm-flags { display: flex; gap: 8px; }
.sm-flags a { display: block; width: 34px; height: 24px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); opacity: .55; transition: opacity .2s, box-shadow .2s, transform .2s; }
.sm-flags a svg { width: 100%; height: 100%; }
.sm-flags a[aria-current] { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brass); }
.sm-flags a:hover { opacity: 1; }

.sm-tools { margin-top: 8px; }
.sm-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: #EFE5D5; }
.sm-tabs button {
  border: 0; cursor: pointer; padding: 9px 18px; min-height: 40px; border-radius: 999px;
  background: transparent; color: var(--ink-2); font-weight: 700; font-size: 15px; letter-spacing: .02em;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.sm-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; box-shadow: 0 2px 8px rgba(43, 33, 26, .2); }
.sm-font { display: flex; gap: 6px; }
.sm-font button {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 22px; font-weight: 700; line-height: 1; display: grid; place-items: center;
}
.sm-font button:active { transform: scale(.94); }
.sm-font button:disabled { opacity: .35; cursor: default; }

/* ---------- Contenuto (tutto in rem: scala col [+]/[−]) ---------- */
main { max-width: 760px; margin: 0 auto; padding: 14px 12px 40px; }
.sm-cat { border-radius: 20px; padding: 1.1rem 1.1rem .4rem; margin-bottom: 14px; }
.sm-cat.c0 { background: var(--c0); }
.sm-cat.c1 { background: var(--c1); }
.sm-cat.c2 { background: var(--c2); }
.sm-cat.c3 { background: var(--c3); }
/* Fuori menù del giorno: in cima, bordo ottone per farlo spiccare */
.sm-daily { background: var(--brass-soft); border: 2px solid var(--brass); }
.sm-cat-title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; line-height: 1.15;
  margin: 0 0 .6rem; letter-spacing: .01em; text-transform: uppercase;
}
.sm-items { list-style: none; margin: 0; padding: 0; }
.sm-item { padding: .85rem 0; border-top: 1px solid rgba(43, 33, 26, .14); }
.sm-item:first-child { border-top: 0; padding-top: .2rem; }
.sm-name { font-size: 1.12rem; font-weight: 700; line-height: 1.3; margin: 0; }
.sm-price { margin: .15rem 0 0; font-size: 1.05rem; font-weight: 700; color: var(--brass-ink); }
.sm-desc { margin: .3rem 0 0; font-size: .98rem; color: var(--ink-2); }
.sm-allergens { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: .5rem 0 0; padding: 0; }
.sm-allergens img { width: 1.75rem; height: 1.75rem; }
.sm-empty { padding: 1.2rem; background: var(--surface); border-radius: 16px; }

/* Legenda allergeni e note in fondo */
.sm-foot { margin-top: 22px; padding: 1.1rem; background: var(--surface); border-radius: 20px; font-size: .92rem; color: var(--ink-2); }
.sm-foot h2 { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 .7rem; color: var(--ink); }
.sm-legend { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.sm-legend li { display: flex; align-items: center; gap: 8px; line-height: 1.25; }
.sm-legend img { width: 1.75rem; height: 1.75rem; flex: none; }
.sm-foot p { margin: .4rem 0 0; }

/* Telefoni molto stretti (≤360px): stringo un po' la testata */
@media (max-width: 360px) {
  .sm-logo img { width: 100px; }
  .sm-flags { gap: 6px; }
  .sm-flags a { width: 30px; height: 21px; }
  .sm-tabs button { padding: 8px 13px; font-size: 14px; }
  .sm-font button { width: 36px; height: 36px; }
}
