/* =========================================================
   Bar Galleria — foglio di stile
   Mobile-first. Colori e font si cambiano in :root qui sotto.
   ========================================================= */

:root {
  /* Palette */
  --espresso: #2A1C15;   /* testo principale, sezioni scure, bottone primario */
  --latte:    #F7F1E7;   /* sfondo pagina */
  --crema:    #EADBC4;   /* superfici, illustrazioni, sezioni alternate */
  --ottone:   #A8722A;   /* dettagli decorativi (linee, puntini) */
  --ottone-t: #7E5216;   /* ottone scuro per testi piccoli su chiaro (contrasto AA) */
  --mare:     #1F4D4F;   /* verde Golfo dell'Asinara: link e stato "aperto" */
  --sole:     #E3B25E;   /* solo illustrazioni */
  --banco:    #D2BC9C;   /* solo illustrazioni */

  --testo:      var(--espresso);
  --testo-soft: #5B4A3F;
  --bordo:      rgba(42, 28, 21, .14);

  /* Tipografia: solo font di sistema, nessun servizio esterno */
  --font-titoli: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --font-testo: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --r: 14px;
  --gutter: 20px;
  --max: 1120px;
  --sec: clamp(56px, 10vw, 112px);
}

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

body {
  margin: 0;
  background: var(--latte);
  color: var(--testo);
  font-family: var(--font-testo);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 72px; /* spazio per la barra azioni su mobile */
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

img, svg { display: block; max-width: 100%; }
a { color: var(--mare); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ottone); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-titoli); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 11vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 6.4vw, 2.7rem); max-width: 18ch; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--espresso); color: var(--latte); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ottone-t); margin-bottom: .9em; display: flex; align-items: center; gap: .6em;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.muted { color: var(--testo-soft); }
.lead { font-size: 1.15rem; color: var(--testo-soft); max-width: 34ch; }

/* ---------- Banner demo ---------- */
.demo-banner {
  background: #FFF4D6; color: #4A3200; border-bottom: 1px solid #E9D49B;
  font-size: .84rem; line-height: 1.45; padding: 9px var(--gutter); text-align: center;
}
.demo-banner strong { text-transform: uppercase; letter-spacing: .06em; display: block; }
@media (min-width: 700px) { .demo-banner strong { display: inline; margin-right: .5em; } }

.tbc {
  display: inline-block; font-family: var(--font-testo); font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; vertical-align: .15em;
  background: #FFF4D6; color: #6B4A00; border: 1px dashed #C9A54A; border-radius: 99px; padding: 1px 8px;
}
.tbc-line { font-size: .85rem; color: var(--testo-soft); margin-top: 14px; }
.segnaposto {
  border: 1.5px dashed var(--ottone); border-radius: 10px; padding: 12px 14px;
  color: var(--ottone-t); background: rgba(234, 219, 196, .35); font-size: .95rem;
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 600 1rem/1.2 var(--font-testo); text-decoration: none; text-align: center;
  border: 2px solid var(--espresso); transition: background-color .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--espresso); color: var(--latte); }
.btn-primary:hover { background: #45302A; }
.btn-ghost { background: transparent; color: var(--espresso); }
.btn-ghost:hover { background: var(--crema); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row .btn { flex: 1 1 210px; }
@media (min-width: 600px) { .cta-row .btn { flex: 0 0 auto; } }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--bordo); background: var(--latte); position: relative; z-index: 20; }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--espresso); text-decoration: none; min-height: 48px; flex: 1 1 auto; min-width: 0; }
.brand-mark { width: 34px; height: 34px; color: var(--ottone); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-family: var(--font-titoli); font-size: 1.35rem; font-weight: 600; }
.brand-place { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--testo-soft); overflow-wrap: anywhere; }
/* Sotto i 400 px la via si nasconde (l'indirizzo completo resta nell'hero e in "Dove siamo"). */
@media (max-width: 399.98px) {
  .bp-via { display: none; }
  .header-in { gap: 8px; }
  .nav-toggle { padding: 0 12px; gap: 8px; }
}

.nav-toggle { flex: none;
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; min-width: 48px; padding: 0 14px;
  background: transparent; color: var(--espresso); border: 1.5px solid var(--bordo); border-radius: 999px;
  font: 600 .95rem var(--font-testo); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav { display: none; }
.nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--latte); border-bottom: 1px solid var(--bordo); padding: 8px var(--gutter) 20px;
  box-shadow: 0 18px 30px -20px rgba(42, 28, 21, .35);
}
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li a {
  display: block; padding: 13px 4px; min-height: 48px; color: var(--espresso); text-decoration: none;
  font-family: var(--font-titoli); font-size: 1.3rem; border-bottom: 1px solid var(--bordo);
}
.nav .nav-call { margin-top: 16px; width: 100%; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav, .nav.is-open { display: flex; align-items: center; gap: 22px; position: static; padding: 0; border: 0; box-shadow: none; background: none; }
  .nav ul { display: flex; gap: 4px; }
  .nav li a { font-family: var(--font-testo); font-size: .95rem; font-weight: 500; border: 0; padding: 12px 10px; }
  .nav li a:hover { color: var(--ottone-t); }
  .nav .nav-call { margin: 0; width: auto; min-height: 44px; padding: 10px 20px; }
}

/* ---------- Hero ---------- */
.hero { padding: 36px 0 var(--sec); }
.hero-in { display: grid; gap: 28px; align-items: center; }
.hero-art { margin: 0; max-width: 300px; justify-self: center; width: 78%; }
.status {
  display: inline-flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 600;
  background: #fff; border: 1px solid var(--bordo); border-radius: 999px; padding: 8px 16px; margin: 4px 0 22px;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #9A8C80; flex: none; }
.status.is-open .status-dot { background: #2E8B57; box-shadow: 0 0 0 4px rgba(46, 139, 87, .18); }
.status.is-open { color: var(--mare); }
@media (min-width: 900px) {
  .hero { padding-top: 64px; }
  .hero-in { grid-template-columns: 1.15fr .85fr; gap: 48px; }
  .hero-art { width: 100%; max-width: 380px; }
}
@media (prefers-reduced-motion: no-preference) {
  .steam { stroke-dasharray: 60; animation: vapore 4s ease-in-out infinite; }
  @keyframes vapore { 0%, 100% { stroke-dashoffset: 0; opacity: .9; } 50% { stroke-dashoffset: 18; opacity: .45; } }
}

/* ---------- Sezioni ---------- */
.section { padding: var(--sec) 0; }
.section-tint { background: var(--crema); }
.section-tint .eyebrow { color: #6E470F; }
.section-dark { background: var(--espresso); color: var(--latte); }
.section-dark .eyebrow { color: var(--sole); }
.section-dark h2 { color: var(--latte); }
.two-col { display: grid; gap: 22px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; } }
.prose p { max-width: 58ch; }

/* La giornata */
.day { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: d; }
.day-step {
  background: var(--latte); border-radius: var(--r); padding: 22px 22px 18px; position: relative;
  border-top: 3px solid var(--ottone);
}
.day-step p { color: var(--testo-soft); margin: 0; }
.day-step h3 { margin-bottom: .3em; }
.day-time { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6E470F; margin-bottom: 8px; }
@media (min-width: 760px) { .day { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

/* Listino */
.menu-card { background: #fff; border: 1px solid var(--bordo); border-radius: var(--r); padding: 24px 22px; }
.menu-card.is-sample { position: relative; }
.sample-tag {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: #FFF4D6; color: #6B4A00; border: 1px dashed #C9A54A; border-radius: 8px; padding: 4px 10px; margin-bottom: 14px;
}
.menu-cat { font-size: 1.2rem; margin: 10px 0 6px; }
.menu-list { list-style: none; margin: 0 0 12px; padding: 0; }
.menu-list li { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; color: var(--testo-soft); }
.menu-list .dots { flex: 1; border-bottom: 1.5px dotted var(--banco); transform: translateY(-4px); min-width: 20px; }

/* Galleria */
.gallery-note { max-width: 60ch; }
.gallery { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.g-item { background: var(--latte); border-radius: var(--r); padding: 14px 14px 12px; text-align: center; }
.g-item svg { width: 100%; height: auto; aspect-ratio: 5 / 6; }
.g-item span { display: block; font-size: .85rem; color: var(--testo-soft); margin-top: 8px; }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }

/* Orari */
.hours { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.hours th, .hours td { padding: 13px 4px; border-bottom: 1px solid rgba(247, 241, 231, .16); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--sole); font-weight: 700; }
.hours tr.is-today th::after { content: " · oggi"; font-weight: 400; font-size: .85em; }
.hours .closed { color: #C9B9A6; }
.hours .tbc { margin-left: 6px; }
.status-dark { background: rgba(247, 241, 231, .08); border-color: rgba(247, 241, 231, .2); color: var(--latte); }
.status-dark.is-open { color: #BFE3CF; }
.note-dark { font-size: .9rem; color: #D9CBB8; max-width: 40ch; }

/* Dove siamo */
.address { font-size: 1.1rem; color: var(--testo-soft); margin-top: -.3em; margin-bottom: 1.4em; }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--bordo); }
.contact-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 15px 0; border-bottom: 1px solid var(--bordo); }
.contact-list a { min-height: 24px; overflow-wrap: anywhere; }
.c-label { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ottone-t); }

/* Footer */
.site-footer { background: #1E1410; color: #D9CBB8; padding: 48px 0 40px; font-size: .92rem; }
.site-footer a { color: #F1E3C8; }
.footer-in { display: grid; gap: 24px; }
.footer-name { font-family: var(--font-titoli); font-size: 1.5rem; color: var(--latte); margin-bottom: .3em; }
.footer-legal p { margin-bottom: .6em; }
.site-footer .segnaposto { color: #F1D9A8; background: transparent; border-color: #8A6A3A; }
@media (min-width: 760px) { .footer-in { grid-template-columns: 1fr 1fr; } }

/* Barra azioni mobile */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(247, 241, 231, .96); border-top: 1px solid var(--bordo);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.mobile-cta a {
  display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 2px solid var(--espresso); color: var(--espresso);
}
.mobile-cta .mc-call { background: var(--espresso); color: var(--latte); }
@media (min-width: 900px) { .mobile-cta { display: none; } }

@media print { .mobile-cta, .nav-toggle, .demo-banner { display: none; } body { padding: 0; } }
.segnaposto-inline { color: #F1D9A8; border-bottom: 1px dashed #8A6A3A; }
.status.is-tbc .status-dot { background: #C9A54A; }
