/* ==========================================================================
   La chiave del gusto — Barcellona Pozzo di Gotto (ME)
   Direzione: intonaco greige caldo + zafferano/ocra (dalle loro foto) + espresso.
   Display Newsreader / Body Hanken Grotesk. VARIANCE 6 / MOTION 3 / DENSITY 4.
   Mobile-first (390px). Radius unico 6px. Un solo accento, bloccato.
   ========================================================================== */

:root {
  --bg: #EAE4D9;          /* intonaco a calce (photo-01) */
  --panel: #F3EEE6;       /* superficie chiara */
  --ink: #2B2019;         /* espresso, testo */
  --muted: #6B5E52;       /* testo secondario */
  --accent: #C8871B;      /* zafferano/ocra (pareti photo-05) — fill/bordi/decoro */
  --accent-deep: #8A5A12; /* accento come TESTO (contrasto AA su canvas chiaro) */
  --accent-ink: #241A11;  /* testo su fondo accento */
  --espresso: #231A14;    /* band color-block (usata una volta sola) */
  --hair: #D9D0C1;        /* filetti */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
  --wrap: 1080px;
  --measure: 66ch;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 1.25rem; }

/* Iron rule, structural: nessuna foto contenuto "torreggia" su mobile.
   Ogni <img>/<figure> di contenuto e' croppata landscape-or-square a 390px;
   un ratio piu' alto si ripristina SOLO dentro le media query desktop. */
@media (max-width: 640px) {
  figure img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
}

/* -- top bar --------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}
.brand {
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand em { color: var(--accent-deep); font-style: italic; }
.topbar-cta {
  text-decoration: none; font-weight: 600; font-size: 0.92rem;
  color: var(--accent-ink); background: var(--accent);
  padding: 0.45rem 0.95rem; border-radius: var(--radius);
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease;
}
.topbar-cta:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.topbar-cta:active { transform: translateY(1px); }

/* -- buttons --------------------------------------------------------------- */
.btn {
  display: inline-block; text-decoration: none;
  font-weight: 600; font-size: 0.98rem;
  padding: 0.72rem 1.35rem; border-radius: var(--radius);
  border: 1px solid var(--ink); color: var(--ink);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
/* ghost su fondo espresso (band cucina) */
.on-dark .btn { border-color: color-mix(in srgb, #fff 45%, transparent); color: #F3EEE6; }
.on-dark .btn:hover { background: color-mix(in srgb, #fff 10%, transparent); }

/* -- HERO: split asimmetrico ---------------------------------------------- */
.hero { padding-block: clamp(2.4rem, 6vh, 3.6rem) clamp(2.6rem, 7vh, 4rem); }
.hero-grid { display: grid; gap: 1.6rem; align-items: center; }
.hero-kicker {
  color: var(--accent-deep); font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 0.9rem;
}
.hero h1 {
  font-size: clamp(2.7rem, 11vw, 4.6rem);
  line-height: 0.98; margin-bottom: 1rem;
}
.hero h1 em { font-style: italic; color: var(--accent-deep); }
.hero-sub { color: var(--muted); max-width: 34ch; margin-bottom: 1.6rem; font-size: 1.1rem; }
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%; height: auto;
  aspect-ratio: 3 / 2;           /* mobile: landscape, non torreggia */
  object-fit: cover; object-position: 50% 62%;
  border-radius: var(--radius);
}

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 2.6rem; }
  .hero-figure img { aspect-ratio: 4 / 5; }   /* desktop: ritratto nello split */
}

/* -- sezioni generiche ----------------------------------------------------- */
.section { padding-block: clamp(2.8rem, 7vh, 4.2rem); }
.section-lead { color: var(--muted); max-width: var(--measure); margin-bottom: 1.5rem; }
.eyebrow-line { /* filetto accento come "categoria", non un eyebrow testuale */
  width: 44px; height: 3px; background: var(--accent); border-radius: 2px;
  margin-bottom: 1.1rem;
}

/* storia: testo + foto (immagine a sinistra su desktop) */
.split { display: grid; gap: 1.6rem; align-items: center; }
.split p { color: var(--muted); }
.split p + p { margin-top: 0.9rem; }
.split-figure { margin: 0; }
.split-figure img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius);
}
.split-figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--muted); }
@media (min-width: 820px) {
  .split { grid-template-columns: 1fr 1fr; gap: 2.6rem; }
  .split--img-left .split-figure { order: -1; }
  .split-figure img { aspect-ratio: 4 / 3; }
}

/* -- MENU: due gruppi, leader puntinati, prezzi reali ---------------------- */
.menu-groups { display: grid; gap: 2.2rem; margin-top: 0.5rem; }
@media (min-width: 780px) { .menu-groups { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.menu-group h3 {
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent-deep);
  padding-bottom: 0.6rem; margin-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent);
}
.menu-list { list-style: none; padding: 0; }
.menu-item {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: baseline; column-gap: 0.5rem; row-gap: 0.15rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hair);
}
.menu-item:last-child { border-bottom: 0; }
.mi-name { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; }
.mi-lead { border-bottom: 1px dotted var(--muted); transform: translateY(-0.28em); opacity: 0.55; }
.mi-price {
  font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.mi-desc { grid-column: 1 / -1; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.menu-note { margin-top: 1.4rem; color: var(--muted); font-size: 0.9rem; }

/* -- BAND "dalla cucina": color-block espresso (una volta sola) ------------ */
.cucina { background: var(--espresso); color: #F0E8DE; }
.cucina .cucina-grid { display: grid; gap: 1.6rem; align-items: center; }
.cucina h2 { color: #FBF6EE; }
.cucina h2 em { font-style: italic; color: var(--accent); }
.cucina p { color: #CBB9A6; }
.cucina p + p { margin-top: 0.9rem; }
.cucina-figure { margin: 0; }
.cucina-figure img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius);
}
@media (min-width: 820px) {
  .cucina .cucina-grid { grid-template-columns: 0.9fr 1.1fr; gap: 2.8rem; }
  .cucina-figure { order: -1; }
  .cucina-figure img { aspect-ratio: 4 / 5; }  /* ritratto ripristinato su desktop */
}

/* -- SALA: una grande immagine d'atmosfera (galleria = one big image) ------ */
.sala-figure { margin: 1rem 0 0; }
.sala-figure img {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  object-position: 50% 55%; border-radius: var(--radius);
}
@media (min-width: 820px) { .sala-figure img { aspect-ratio: 21 / 8; } }

/* -- ORARI & DOVE ---------------------------------------------------------- */
.info-grid { display: grid; gap: 2rem; margin-top: 1.2rem; }
@media (min-width: 720px) { .info-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.hours { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours td { padding: 0.34rem 1rem 0.34rem 0; color: var(--muted); vertical-align: top; }
.hours tr td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.hours tr.is-closed td:last-child { color: var(--accent-deep); }
.hours tr.today td { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.contact-lines { margin-bottom: 1.2rem; line-height: 1.9; }
.contact-lines a { font-weight: 500; }
.note-prenota { color: var(--muted); font-size: 0.92rem; margin-top: 0.4rem; }
.dove-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.4rem; }

/* -- footer ---------------------------------------------------------------- */
.footer {
  padding: 2.4rem 1.25rem 3rem; text-align: center;
  color: var(--muted); font-size: 0.9rem;
  border-top: 1px solid var(--hair);
}
.footer .brand-foot { font-family: var(--font-display); color: var(--ink); font-size: 1.05rem; }
.demo-note { margin-top: 0.6rem; opacity: 0.75; }

/* -- reveal on scroll (MOTION 3, CSS-driven, gated) ------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.is-in { opacity: 1; transform: none; }
  .hero .hero-copy { animation: rise 0.7s ease both; }
  .hero .hero-figure { animation: rise 0.7s ease 0.08s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
