/* ==========================================================================
   Casa SaPò — Ristorante, San Lazzaro di Savena
   Direction: "giardino sotto il pergolato". Warm parchment canvas, aubergine
   ink from their printed menu, one garden-green accent from the vine canopy.
   Bodoni Moda (Didone, echoes their menu) + Libre Franklin. Radius 4px.
   Mobile-first (390px), plain static HTML/CSS.
   ========================================================================== */

:root {
  --bg: #f6f3ea;          /* warm parchment (their menu paper + tablecloths) */
  --band: #eef0e4;        /* soft sage band (garden greens, tinted neutral) */
  --ink: #34222f;         /* aubergine-plum display ink (from their menu) */
  --text: #2a2622;        /* warm near-black body */
  --muted: #6a6553;       /* warm taupe meta (AA 5.5:1 on canvas) */
  --line: #ddd6c4;        /* hairline on parchment */
  --line-band: #d5d8c6;   /* hairline on sage */
  --accent: #3d5a34;      /* garden green — the one accent (7:1 on canvas) */
  --accent-deep: #2f4728; /* hover */
  --accent-ink: #ffffff;  /* text on green */
  --font-display: "Bodoni Moda", Georgia, "Times New Roman", serif;
  --font-body: "Libre Franklin", -apple-system, "Segoe UI", sans-serif;
  --radius: 4px;
  --wrap: 68rem;
  --measure: 60ch;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; height: auto;}
a { color: var(--accent); }
a:hover { color: var(--accent-deep); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; color: var(--ink); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 5.2vw, 2.7rem); letter-spacing: -0.005em; margin-bottom: 0.6rem; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.01em; margin-bottom: 0.9rem; }

p { max-width: var(--measure); }

.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}

/* -- buttons --------------------------------------------------------------- */
.btn {
  display: inline-block; text-decoration: none;
  font-weight: 600; font-size: 0.98rem; letter-spacing: 0.01em;
  padding: 0.72rem 1.4rem; border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-ghost:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* -- top bar --------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 1.25rem;
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display); font-weight: 900; font-size: 1.3rem;
  color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
.topnav { margin-left: auto; display: flex; gap: 1.5rem; }
.topnav a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.topnav a:hover { color: var(--accent); }
.topbar-cta {
  text-decoration: none; font-weight: 600; font-size: 0.92rem;
  color: var(--accent-ink); background: var(--accent);
  padding: 0.5rem 1.1rem; border-radius: var(--radius);
  transition: background-color 0.18s ease;
}
.topbar-cta:hover { background: var(--accent-deep); color: #fff; }
@media (max-width: 720px) {
  .topnav { display: none; }
  .topbar-cta { margin-left: auto; }
}

/* -- hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: min(82vh, 640px);
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center 62%;
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(29,38,24,0.86) 0%, rgba(29,38,24,0.42) 34%, rgba(29,38,24,0.06) 62%, rgba(29,38,24,0.10) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  padding: 1.75rem 1.35rem 2.4rem;
  max-width: var(--wrap); width: 100%; margin: 0 auto;
  color: #fff;
}
.hero-inner .eyebrow { color: #f1ecdd; text-shadow: 0 1px 10px rgba(20,26,16,0.6); }
.hero h1 {
  color: #fff; font-weight: 900;
  font-size: clamp(2.6rem, 12vw, 5.5rem);
  line-height: 0.98; margin-bottom: 0.7rem;
  letter-spacing: -0.01em; white-space: nowrap;
  text-shadow: 0 2px 24px rgba(20,26,16,0.35);
}
.hero-sub {
  color: #f3efe4; font-size: clamp(1.02rem, 3.4vw, 1.3rem);
  max-width: 30ch; margin-bottom: 1.6rem; line-height: 1.5;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* -- sections -------------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5rem) 1.35rem; }
.section .wrap, .intro-grid { max-width: var(--wrap); margin: 0 auto; }
.band { background: var(--band); }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 54ch; margin-bottom: 2rem; }

/* -- intro ----------------------------------------------------------------- */
.intro-grid { display: grid; gap: 2rem; align-items: start; }
.intro p { margin-bottom: 1rem; font-size: 1.12rem; }
.intro-note { color: var(--muted); }
.rating {
  display: flex; flex-direction: column; gap: 0.15rem;
  border-left: 2px solid var(--accent); padding: 0.4rem 0 0.4rem 1.2rem;
}
.rating-score { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; color: var(--ink); line-height: 1; }
.rating-stars { color: var(--accent); letter-spacing: 0.12em; font-size: 1rem; }
.rating-meta { color: var(--muted); font-size: 0.92rem; }
@media (min-width: 780px) {
  .intro-grid { grid-template-columns: 1fr auto; gap: 4rem; }
}

/* -- carta (menu) ---------------------------------------------------------- */
.menu { display: grid; gap: 2.5rem; }
.menu-col h3 {
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em;
  font-family: var(--font-body); font-weight: 700; font-size: 0.82rem;
  padding-bottom: 0.6rem; border-bottom: 2px solid var(--accent);
  margin-bottom: 0.4rem;
}
.dishes { list-style: none; padding: 0; }
.dishes li { padding: 0.95rem 0; border-bottom: 1px solid var(--line-band); }
.dish-head { display: flex; align-items: baseline; gap: 0.9rem; }
.dish-name {
  font-family: var(--font-display); font-weight: 500; font-size: 1.3rem;
  color: var(--ink); line-height: 1.2;
}
.dish-price {
  margin-left: auto; color: var(--accent); font-weight: 700;
  font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dish-desc { color: var(--muted); font-size: 0.98rem; margin-top: 0.25rem; max-width: none; }
.menu-note { color: var(--muted); font-size: 0.88rem; margin-top: 1rem; max-width: none; }
@media (min-width: 780px) {
  .menu { grid-template-columns: 1.15fr 1fr; gap: 3.5rem; }
}

/* -- dalla cucina (gallery) ------------------------------------------------ */
.plates { display: grid; gap: 1rem; margin-top: 0.5rem; }
.plate { margin: 0; }
.plate img {
  width: 100%; border-radius: var(--radius);
  aspect-ratio: 4 / 3; object-fit: cover; /* mobile: landscape crop (desktop overrides below restore the portrait grid) */
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.plate:hover img { transform: scale(1.03); }
.plate figcaption {
  font-family: var(--font-display); font-style: italic; font-size: 1.05rem;
  color: var(--ink); margin-top: 0.6rem;
}
@media (min-width: 780px) {
  .plates { grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
  .plate-lead img { aspect-ratio: 3 / 4; }
  .plate:not(.plate-lead) img { aspect-ratio: 4 / 5; }
}

/* -- sala e giardino ------------------------------------------------------- */
.spazi-grid { display: grid; gap: 2rem; align-items: center; }
.spazi-text p { font-size: 1.1rem; margin-bottom: 1.3rem; }
.ticks { list-style: none; padding: 0; }
.ticks li { padding: 0.5rem 0 0.5rem 1.6rem; position: relative; color: var(--text); border-top: 1px solid var(--line-band); }
.ticks li:first-child { border-top: none; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 1.15rem;
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--accent);
}
.spazi-imgs { display: grid; gap: 1rem; }
.spazi-imgs img { width: 100%; border-radius: var(--radius); object-fit: cover; }
.spazi-imgs img:first-child { aspect-ratio: 3 / 2; }
.spazi-imgs img:last-child { aspect-ratio: 2 / 1; }
@media (min-width: 780px) {
  .spazi-grid { grid-template-columns: 1fr 1.05fr; gap: 3.5rem; }
}

/* -- orari & dove ---------------------------------------------------------- */
.info-grid { display: grid; gap: 2.5rem; }
.hours { border-collapse: collapse; width: 100%; max-width: 30rem; }
.hours td { padding: 0.55rem 1rem 0.55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.hours td:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { list-style: none; padding: 0; margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li {
  font-size: 0.85rem; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.32rem 0.7rem; background: color-mix(in srgb, var(--bg) 60%, #fff);
}
.contact-lines { margin-bottom: 1.5rem; font-size: 1.08rem; line-height: 1.9; }
.contact-lines a { font-weight: 600; }
@media (min-width: 780px) {
  .info-grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; }
}

/* -- footer ---------------------------------------------------------------- */
.footer {
  padding: 3rem 1.35rem 3.5rem; text-align: center;
  color: var(--muted); font-size: 0.9rem;
  border-top: 1px solid var(--line);
}
.footer-brand { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: var(--ink); margin: 0 auto 0.5rem; }
.footer p { max-width: none; }
.demo-note { margin-top: 0.6rem; opacity: 0.75; }

/* Motion is intentionally minimal (dial 3): hover/active transitions only.
   Content is never hidden behind a scroll animation (robust, always visible). */
