/* ═══════════════════════════════════════════════════════════════════════════
   ANITA BISTROT — stylesheet
   Mobile-first (@390px default). Desktop = adattamento.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Font self-hostati (subset latin, WOFF2) ─────────────────────────────── */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./assets/fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/dmsans-400.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./assets/fonts/dmsans-600.woff2") format("woff2");
}

/* ── Token ────────────────────────────────────────────────────────────────── */
:root {
  --purple: #5d2a6e;
  --purple-deep: #4a2158;
  --lime: #8cc63f;
  --lime-ink: #2f4a10;      /* testo leggibile su lime */
  --cream: #f6efd6;
  --cream-soft: #fbf7ea;
  --orange: #e9a85c;
  --forest: #35591e;
  --ink: #2a2130;
  --ink-soft: #5b5163;
  --wine: #7a1f2b;

  --shadow: 0 6px 20px rgba(42, 33, 48, 0.12);
  --radius-card: 14px;
  --radius-pill: 999px;
  --maxw: 1120px;
  --gutter: 16px;
  --bottombar-h: 60px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── Reset leggero ────────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* spazio per la bottom bar mobile */
  padding-bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 860px) {
  body { padding-bottom: 0; }
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* eyebrow / etichetta */
.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .leaf { width: 15px; height: 15px; color: var(--lime); flex: none; }

/* ── Bottoni ──────────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--purple);
  --btn-fg: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 19px; height: 19px; flex: none; }

.btn-primary { --btn-bg: var(--lime); --btn-fg: var(--lime-ink); }
.btn-primary:hover { background: #7db634; }

.btn-purple:hover { background: var(--purple-deep); }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border-color: rgba(246, 239, 214, 0.55);
}
.btn-outline:hover { border-color: var(--cream); background: rgba(246, 239, 214, 0.08); }

/* variante outline su fondo chiaro */
.btn-outline-ink {
  background: transparent;
  color: var(--purple);
  border-color: rgba(93, 42, 110, 0.35);
}
.btn-outline-ink:hover { border-color: var(--purple); background: rgba(93, 42, 110, 0.05); }

.btn-block { width: 100%; }

/* focus visibile ovunque */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

/* ── Header / nav ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--purple);
  color: var(--cream);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 16px;
}
.nav__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.nav__brand img { height: 40px; width: auto; }
.nav__links { display: none; gap: 26px; align-items: center; }
.nav__links a { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--cream); opacity: 0.85; }
.nav__links a:hover, .nav__links a[aria-current="page"] { opacity: 1; color: var(--lime); }
.nav__cta { display: none; }
@media (min-width: 860px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
}

/* menu mobile: toggle con <details> (funziona senza JS) */
.nav__menu { position: relative; }
.nav__menu summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  color: var(--cream);
}
.nav__menu summary::-webkit-details-marker { display: none; }
.nav__menu[open] summary { background: rgba(255,255,255,0.1); }
.nav__menu .sheet {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--cream); color: var(--ink);
  border-radius: var(--radius-card); box-shadow: var(--shadow);
  padding: 8px; min-width: 200px; display: grid; gap: 2px;
}
.nav__menu .sheet a { text-decoration: none; padding: 11px 14px; border-radius: 10px; font-weight: 600; }
.nav__menu .sheet a:hover { background: var(--cream-soft); }
@media (min-width: 860px) { .nav__menu { display: none; } }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--purple);
  color: var(--cream);
  overflow: hidden;
  padding: 44px 0 48px;
}
.hero__deco { position: absolute; inset: 0; pointer-events: none; opacity: 0.5; overflow: hidden; }
.hero__deco span { position: absolute; color: var(--lime); display: block; }
.hero__deco svg { display: block; }

/* emblema botanico (colonna destra hero, solo desktop) */
.hero__art { display: none; }
@media (min-width: 860px) {
  .hero__art {
    display: grid; place-items: center;
    min-height: 300px; border-radius: var(--radius-card);
    background: var(--purple-deep);
    position: relative; overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(246,239,214,0.1);
  }
  .hero__art .m-leaf { position: absolute; color: var(--lime); opacity: 0.16; }
  .hero__art .m-heart { position: relative; width: min(300px, 62%); height: auto; }
}
.hero__brand { margin: 4px 0 16px; line-height: 0; }
.hero__brand img { width: min(280px, 74vw); height: auto; display: block; }
.hero__hook { font-size: 1.05rem; max-width: 34ch; color: rgba(246,239,214,0.9); margin-bottom: 20px; }
.hero__cta { display: grid; gap: 12px; max-width: 340px; }

@media (min-width: 860px) {
  .hero { padding: 76px 0 84px; }
  .hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
  .hero__brand img { width: min(320px, 32vw); }
  .hero__cta { grid-auto-flow: column; grid-auto-columns: max-content; }
  .hero__art { align-self: stretch; }
}

/* live pill "Aperto ora" */
.livepill {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.85rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(246,239,214,0.28);
  border-radius: var(--radius-pill);
  padding: 7px 14px; margin-bottom: 18px;
  color: var(--cream);
}
.livepill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-soft); flex: none; }
.livepill.is-open .dot { background: var(--lime); box-shadow: 0 0 0 4px rgba(140,198,63,0.25); }
.livepill.is-closed .dot { background: var(--orange); }

/* ── Sezioni generiche ────────────────────────────────────────────────────── */
.section { padding: 48px 0; }
.section__head { margin-bottom: 24px; }
.section__head h2 { font-size: clamp(1.8rem, 6vw, 2.4rem); margin-top: 6px; }

/* strip icone (4 momenti) */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile {
  background: var(--cream-soft); border-radius: var(--radius-card);
  padding: 18px 16px; text-align: left; box-shadow: var(--shadow);
}
.tile .ic { width: 30px; height: 30px; color: var(--forest); margin-bottom: 10px; }
.tile h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; letter-spacing: 0; }
.tile p { color: var(--ink-soft); font-size: 0.88rem; margin-top: 2px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

/* card "I preferiti" */
.favs { display: grid; gap: 14px; }
.fav {
  display: block; text-decoration: none; color: var(--cream);
  background: var(--purple); border-radius: var(--radius-card);
  padding: 20px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: transform 0.14s ease;
}
.fav:hover { transform: translateY(-3px); }
.fav .kicker { color: var(--lime); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.fav h3 { font-size: 1.35rem; margin: 8px 0 4px; }
.fav p { color: rgba(246,239,214,0.82); font-size: 0.9rem; }
.fav .price { color: var(--orange); font-weight: 600; margin-top: 12px; display: inline-block; }
.fav .leafcorner { position: absolute; right: -8px; bottom: -10px; width: 84px; height: 84px; color: rgba(140,198,63,0.18); pointer-events: none; }
@media (min-width: 720px) { .favs { grid-template-columns: repeat(3, 1fr); } }

/* band (eventi / delivery) */
.band { border-radius: var(--radius-card); padding: 30px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.band--eventi { background: var(--purple); color: var(--cream); }
.band--delivery { background: var(--forest); color: var(--cream); }
.band h2 { font-size: 1.9rem; margin-bottom: 10px; }
.band p { max-width: 52ch; color: rgba(246,239,214,0.9); margin-bottom: 18px; }
.band .btnrow { display: flex; flex-wrap: wrap; gap: 12px; }
.band .leafcorner { position: absolute; right: -14px; top: -14px; width: 120px; height: 120px; color: rgba(140,198,63,0.14); pointer-events: none; }

/* info locale (mappa + orari) */
.localinfo { display: grid; gap: 20px; }
.localinfo .map iframe { width: 100%; height: 260px; border: 0; border-radius: var(--radius-card); box-shadow: var(--shadow); }
.infocard { background: var(--cream-soft); border-radius: var(--radius-card); padding: 22px; box-shadow: var(--shadow); }
.infocard h3 { font-size: 1.3rem; margin-bottom: 10px; }
.infocard address { font-style: normal; color: var(--ink-soft); margin-bottom: 14px; }
@media (min-width: 860px) { .localinfo { grid-template-columns: 1fr 1fr; align-items: start; } }

/* tabella orari */
.hours-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.hours-table th, .hours-table td { text-align: left; padding: 8px 0; border-bottom: 1px solid rgba(93,81,99,0.14); }
.hours-table th { font-weight: 600; }
.hours-table td { color: var(--ink-soft); text-align: right; }
.hours-table tr[data-today] th, .hours-table tr[data-today] td { color: var(--purple); font-weight: 600; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--purple); color: var(--cream); padding: 44px 0 96px; margin-top: 8px; }
@media (min-width: 860px) { .site-footer { padding-bottom: 44px; } }
.footer__grid { display: grid; gap: 26px; }
.footer__grid h4 { font-family: var(--sans); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); margin-bottom: 12px; }
.footer a { color: rgba(246,239,214,0.85); text-decoration: none; }
.footer a:hover { color: var(--lime); }
.footer__links { display: grid; gap: 8px; }
.footer__social { display: flex; gap: 14px; }
.footer__social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(246,239,214,0.3); display: inline-flex; align-items: center; justify-content: center; }
.footer__social a:hover { border-color: var(--lime); }
.footer__social svg { width: 18px; height: 18px; }
.footer__meta { margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(246,239,214,0.18); font-size: 0.82rem; color: rgba(246,239,214,0.6); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ── Bottom bar mobile ────────────────────────────────────────────────────── */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(74, 33, 88, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(246,239,214,0.14);
}
.bottombar .btn { min-height: 44px; font-size: 0.95rem; }
@media (min-width: 860px) { .bottombar { display: none; } }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINA MENU
   ═══════════════════════════════════════════════════════════════════════════ */
.menu-hero { background: var(--purple); color: var(--cream); padding: 34px 0 26px; }
.menu-hero h1 { font-size: clamp(2.4rem, 9vw, 3.4rem); }
.menu-hero p { color: rgba(246,239,214,0.85); margin-top: 6px; }

/* tab-bar categorie sticky */
.menutabs {
  position: sticky; top: 58px; z-index: 30;
  background: var(--cream);
  border-bottom: 1px solid rgba(93,81,99,0.14);
}
.menutabs__scroll {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 10px var(--gutter); max-width: var(--maxw); margin-inline: auto;
  -webkit-overflow-scrolling: touch;
}
.menutabs__scroll::-webkit-scrollbar { display: none; }
.menutabs a {
  flex: none; text-decoration: none; white-space: nowrap;
  font-weight: 600; font-size: 0.88rem; color: var(--ink-soft);
  padding: 8px 14px; border-radius: var(--radius-pill);
  border: 1px solid rgba(93,81,99,0.2); background: var(--cream-soft);
}
.menutabs a.is-active { background: var(--purple); color: var(--cream); border-color: var(--purple); }

/* legenda allergeni + disclaimer */
.allergen-note {
  background: var(--cream-soft); border-radius: var(--radius-card);
  padding: 16px 18px; margin: 22px 0; box-shadow: var(--shadow); font-size: 0.9rem;
}
.allergen-note .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; }
.allergen-note .legend b { color: var(--forest); }
.allergen-note .disc { color: var(--ink-soft); }

/* sezioni menu con tema */
.msec { padding: 34px 0 8px; scroll-margin-top: 120px; }
.msec__title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.msec__title h2 { font-size: 1.9rem; }
.msec--forest .msec__title h2 { color: var(--forest); }
.msec--purple .msec__title h2 { color: var(--purple); }
.msec__rule { height: 3px; width: 46px; border-radius: 3px; background: var(--orange); margin-bottom: 20px; }
.msec--forest .msec__rule { background: var(--forest); }
.msec--purple .msec__rule { background: var(--purple); }

.mgroup { margin-bottom: 22px; }
.mgroup__title { font-family: var(--sans); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.mgroup__note { font-size: 0.85rem; color: var(--ink-soft); font-style: italic; margin-bottom: 10px; }

/* riga voce (con descrizione) */
.mitem { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid rgba(93,81,99,0.1); }
.mitem__body { flex: 1 1 auto; min-width: 0; }
.mitem__name { font-weight: 600; }
.mitem__name .badge { margin-left: 6px; }
.mitem__desc { color: var(--ink-soft); font-size: 0.9rem; margin-top: 2px; }
.mitem__alg { color: var(--ink-soft); font-size: 0.76rem; margin-top: 3px; letter-spacing: 0.04em; }
.mitem__price {
  flex: none; font-weight: 600; color: var(--orange);
  font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right;
}

/* lista compatta (solo nome + prezzo) */
.mcompact { display: grid; grid-template-columns: 1fr; gap: 0; }
.mcompact .row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(93,81,99,0.1); }
.mcompact .row .nm { min-width: 0; }
.mcompact .row .pr { flex: none; font-weight: 600; color: var(--orange); font-variant-numeric: tabular-nums; }
@media (min-width: 720px) { .mcompact { grid-template-columns: 1fr 1fr; column-gap: 40px; } }

/* badge */
.badge { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: var(--radius-pill); vertical-align: middle; }
.badge--novita { background: var(--lime); color: var(--lime-ink); }
.badge--special { background: var(--orange); color: #4a2e0e; }
.badge--piccante { background: var(--wine); color: #fff; }
.badge--veg { background: var(--forest); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINA CHI SIAMO
   ═══════════════════════════════════════════════════════════════════════════ */
.about-hero { background: var(--purple); color: var(--cream); padding: 44px 0; }
.about-hero h1 { font-size: clamp(2.4rem, 9vw, 3.4rem); }
.about-story { font-size: 1.08rem; max-width: 62ch; }
.about-story p + p { margin-top: 16px; }
.diffs { display: grid; gap: 14px; margin-top: 8px; }
.diff { background: var(--cream-soft); border-radius: var(--radius-card); padding: 22px; box-shadow: var(--shadow); }
.diff .ic { width: 28px; height: 28px; color: var(--forest); margin-bottom: 10px; }
.diff h3 { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; }
.diff p { color: var(--ink-soft); font-size: 0.92rem; margin-top: 4px; }
.photos { display: grid; gap: 14px; }
.photos .ph { aspect-ratio: 4 / 3; border-radius: var(--radius-card); background: var(--purple-deep); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; color: rgba(246,239,214,0.4); overflow: hidden; }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 720px) { .diffs { grid-template-columns: repeat(3, 1fr); } .photos { grid-template-columns: repeat(3, 1fr); } }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINA CONTATTI
   ═══════════════════════════════════════════════════════════════════════════ */
.contact-hero { background: var(--purple); color: var(--cream); padding: 40px 0; }
.contact-hero h1 { font-size: clamp(2.2rem, 8vw, 3rem); }
.contact-actions { display: grid; gap: 12px; margin-top: 6px; }
@media (min-width: 560px) { .contact-actions { grid-auto-flow: column; grid-auto-columns: max-content; } }

.util { color: var(--ink-soft); font-size: 0.9rem; }
.stack-gap > * + * { margin-top: 14px; }
