/* White Cafè — menu digitale. Tavolozza presa dal menu originale: espresso, crema, marrone. */

@font-face { font-family: "Cormorant"; src: url("assets/font/cormorant.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("assets/font/cormorant-corsivo.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("assets/font/manrope.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  --espresso: #1D1B19;
  --crema: #F1EBE4;
  --crema-scura: #E7DDD1;
  --marrone: #6A4225;
  --marrone-scuro: #4B2D18;
  --rame: #8F5429;
  --pesca: #F1D3B8;
  --testo: #2A1F18;
  --linea: rgba(106, 66, 37, .22);
  --punti: rgba(106, 66, 37, .42);

  --serif: "Cormorant", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --raggio: 28px;
  --colonna: 640px;
  --lati: 22px;
  --altezza-barra: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--espresso);
  color: var(--testo);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--rame); outline-offset: 3px; border-radius: 6px; }

.visivamente-nascosto {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ───────── colonna centrale (su schermi larghi resta stretta, come sul telefono) ───────── */
.pagina {
  position: relative;
  max-width: var(--colonna);
  margin-inline: auto;
  background: var(--espresso);
  min-height: 100vh;
  min-height: 100svh;
}

/* ───────── copertina ───────── */
.hero {
  position: relative;
  min-height: clamp(330px, 54svh, 560px);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero__immagine {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
}
.hero__velo {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(29,27,25,.62) 0%, rgba(29,27,25,0) 34%, rgba(29,27,25,0) 52%, rgba(29,27,25,.82) 100%);
}
.hero__testo {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  min-height: inherit;
  padding: calc(env(safe-area-inset-top, 0px) + 40px) var(--lati) calc(var(--raggio) + 26px);
  text-align: center;
}
.hero__logo { width: min(78vw, 330px); line-height: 0; filter: drop-shadow(0 2px 14px rgba(0,0,0,.35)); }
.hero__logo img { width: 100%; }
.hero__menu {
  display: flex; align-items: center; gap: 16px;
  font-size: 12px; font-weight: 700; letter-spacing: .42em; text-transform: uppercase; color: var(--pesca);
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}
.hero__menu::before, .hero__menu::after { content: ""; width: 38px; height: 1px; background: currentColor; opacity: .7; }
.hero__menu span { margin-right: -.42em; } /* compensa lo spazio dopo l'ultima lettera */

/* ───────── foglio crema che sale sulla copertina ───────── */
.foglio {
  position: relative;
  margin-top: calc(var(--raggio) * -1);
  background: var(--crema);
  border-radius: var(--raggio) var(--raggio) 0 0;
}
#sentinella { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }

/* ───────── barra categorie (resta in alto mentre si scorre) ───────── */
.barra {
  position: sticky; top: 0; z-index: 20;
  background: var(--crema);
  border-radius: var(--raggio) var(--raggio) 0 0;
  transition: box-shadow .2s ease;
}
.barra.e-fissa { border-radius: 0; box-shadow: 0 1px 0 var(--linea), 0 10px 24px -14px rgba(75,45,24,.45); }
.barra__riga { display: flex; align-items: center; min-height: var(--altezza-barra); }

.pill-lista {
  flex: 1 1 auto; min-width: 0;
  display: flex; gap: 8px;
  padding: 12px 22px 12px var(--lati);
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent);
}
.pill-lista::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto; scroll-snap-align: center;
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 0 14px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  color: var(--marrone);
  background: transparent; border: 1.5px solid var(--linea);
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.pill[aria-current="true"] { background: var(--marrone); border-color: var(--marrone); color: var(--crema); }
.pill:active { transform: scale(.97); }

.barra__cerca {
  flex: 0 0 auto; width: 48px; height: 48px; margin-right: 10px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--marrone); cursor: pointer;
}
.barra__cerca[aria-expanded="true"] { background: var(--crema-scura); }

.pannello-cerca { display: flex; gap: 10px; align-items: center; padding: 0 var(--lati) 14px; }
.pannello-cerca[hidden] { display: none; }
.cerca { flex: 1 1 auto; }
.cerca input {
  width: 100%; height: 48px; padding: 0 18px;
  font: 500 16px/1 var(--sans); color: var(--testo);
  background: #fff; border: 1.5px solid var(--linea); border-radius: 999px;
  -webkit-appearance: none; appearance: none;
}
.cerca input::placeholder { color: rgba(42,31,24,.5); }
.cerca input:focus { outline: 0; border-color: var(--marrone); box-shadow: 0 0 0 3px rgba(106,66,37,.16); }
.cerca input::-webkit-search-cancel-button { display: none; }
.cerca__chiudi { flex: 0 0 auto; min-height: 44px; padding: 0 6px; border: 0; background: none; font-weight: 700; font-size: 14px; color: var(--marrone); cursor: pointer; }

/* ───────── sezioni ───────── */
.menu { padding: 0 var(--lati) 24px; }

.sezione { padding-top: 22px; scroll-margin-top: calc(var(--altezza-barra) - 8px); }
.sezione[hidden] { display: none; }

.sezione__testa {
  display: flex; align-items: flex-end; gap: 16px;
  padding-bottom: 16px; margin-bottom: 6px;
  border-bottom: 1px solid var(--linea);
}
.sezione__foto {
  flex: 0 0 auto; width: 76px; height: 98px; object-fit: cover;
  border-radius: 38px 38px 12px 12px;
  box-shadow: 0 8px 20px -8px rgba(75,45,24,.55);
  background: var(--crema-scura);
}
.sezione h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(29px, 8.4vw, 44px); line-height: .96;
  letter-spacing: .035em; text-transform: uppercase; color: var(--marrone);
  padding-bottom: 2px; text-wrap: balance;
}

.gruppo { margin-top: 10px; }
.gruppo[hidden] { display: none; }
.gruppo__titolo {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0 4px;
  font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--rame);
}
.gruppo__titolo::after { content: ""; flex: 1; height: 1px; background: var(--linea); }

.voce {
  display: flex; align-items: flex-end;
  padding: 9.5px 0;
  font-size: 16.5px; font-weight: 600; line-height: 1.3; color: var(--testo);
}
.voce[hidden] { display: none; }
.voce__nome { flex: 0 1 auto; min-width: 0; text-wrap: pretty; }
.voce__nota { display: block; margin-top: 1px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 17px; line-height: 1.15; color: var(--rame); }
.voce__fila {
  flex: 1 1 14px; min-width: 14px; align-self: flex-end;
  margin: 0 8px calc(.32em + 1px);
  border-bottom: 2px dotted var(--punti);
}
.voce__prezzo {
  flex: 0 0 auto; white-space: nowrap;
  font-weight: 700; color: var(--marrone);
  font-variant-numeric: tabular-nums lining-nums;
}
.voce__prezzo .euro { font-weight: 600; font-size: .86em; opacity: .75; }
.voce__prezzo .barra-prezzi { margin: 0 .3em; font-weight: 500; opacity: .5; }

.vuoto { padding: 48px 8px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--marrone); }

/* ───────── piede ───────── */
.piede {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 40px var(--lati) calc(env(safe-area-inset-bottom, 0px) + 56px);
  border-top: 1px solid var(--linea); margin: 0 var(--lati);
  padding-inline: 0;
  text-align: center;
}
.piede img { width: 150px; opacity: .85; }
.piede p { font-size: 11px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--marrone); opacity: .7; }

/* ───────── schermi più larghi ───────── */
@media (min-width: 700px) {
  :root { --lati: 36px; }
  .sezione__foto { width: 96px; height: 124px; border-radius: 48px 48px 14px 14px; }
  .voce { font-size: 17.5px; }
}

/* ───────── stampa ───────── */
@media print {
  body, .pagina, .foglio { background: #fff; }
  .hero__immagine, .hero__velo, .barra, .sezione__foto, .piede { display: none; }
  .hero { min-height: 0; color: var(--marrone); }
  .hero__logo img { filter: invert(1) sepia(1) saturate(2) hue-rotate(-20deg) brightness(.4); }
  .hero__testo { min-height: 0; padding: 16px 0; }
  .foglio { margin-top: 0; border-radius: 0; }
  .sezione { break-inside: avoid; }
}
