/* Trattoria Sandoni — trattoria emiliana a tovaglia a quadri.
   Palette dai loro materiali: lino/pareti + rosso del logo stampato + verde-tovaglia (solo gingham).
   Besley (Clarendon slab) + Libre Franklin. Mobile-first (390px). */

:root {
  --linen: #f6f1e7;      /* canvas: pareti + tovaglie + carta del menù */
  --band: #efe6d5;       /* banda alterna, un tono più caldo */
  --card: #fbf8f1;       /* superfici chiare */
  --ink: #241a12;        /* testo: le travi di legno scuro */
  --taupe: #6b5a49;      /* secondario (AA su lino) */
  --line: #e0d5c1;       /* filetti tenui */
  --red: #b81d29;        /* UNICO accento d'azione: il rosso del loro logo */
  --red-deep: #97121d;   /* hover */
  --green: #3f6157;      /* verde-tovaglia: SOLO nel motivo gingham */
  --radius: 4px;
  --wrap: 1060px;
  --shadow: 0 14px 34px -18px rgba(36, 26, 18, .38);
  --shadow-sm: 0 6px 16px -10px rgba(36, 26, 18, .40);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Libre Franklin", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--linen);
  line-height: 1.62;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: "Besley", Georgia, serif;
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--red); }

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

/* ---------- Gingham ribbon: il motivo tovaglia-a-quadri (verde, solo qui) ---------- */
.gingham {
  height: 18px;
  background-color: #fbf8f1;
  background-image:
    repeating-linear-gradient(0deg,  transparent 0 9px, rgba(63,97,87,.55) 9px 18px),
    repeating-linear-gradient(90deg, transparent 0 9px, rgba(63,97,87,.55) 9px 18px);
  background-blend-mode: multiply;
  border-block: 1px solid rgba(63,97,87,.28);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246,241,231,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 62px;
}
.brand {
  font-family: "Besley", Georgia, serif;
  font-weight: 700; font-size: 1.18rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: .45rem;
}
.brand .mark { color: var(--red); }
.nav-links { display: none; gap: 26px; }
.nav-links a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .96rem;
  padding-bottom: 2px; border-bottom: 1.5px solid transparent; transition: border-color .2s, color .2s;
}
.nav-links a:hover { color: var(--red); border-color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: inherit; font-weight: 600; font-size: .98rem;
  padding: .72rem 1.25rem; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
  transition: transform .15s ease, background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-sm { padding: .55rem .95rem; font-size: .92rem; }

/* ---------- Hero (editoriale, allineato a sinistra, niente foto) ---------- */
.hero { padding: 56px 0 46px; }
.hero .meta {
  font-weight: 600; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--taupe); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.9rem, 12vw, 5.4rem);
  line-height: 0.98;
}
.hero h1 .rule {
  display: block; width: 76px; height: 4px; background: var(--red);
  margin: 22px 0 20px; border-radius: 2px;
}
.hero-sub {
  font-size: 1.12rem; color: var(--taupe); max-width: 34ch; margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sala: foto "appesa alla parete" ---------- */
.sala { background: var(--linen); padding: 8px 0 0; }
.sala-frame {
  max-width: 940px; margin: 0 auto; padding: 12px; background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.sala-frame img { border-radius: 2px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.sala-rail { margin-top: 22px; }
.sala-cap {
  text-align: center; color: var(--taupe); font-size: .95rem;
  padding: 16px 20px 4px; font-style: italic; font-family: "Besley", Georgia, serif;
}

/* ---------- Section scaffolding ---------- */
.section { padding: 66px 0; }
.section.alt { background: var(--band); }
.eyebrow {
  font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 12px;
}
.section h2 { font-size: clamp(1.9rem, 6vw, 2.9rem); margin-bottom: 8px; }
.lead { color: var(--taupe); font-size: 1.08rem; max-width: 60ch; margin-top: 14px; }

/* ---------- Split (pasta fatta in casa) ---------- */
.split { display: grid; gap: 30px; align-items: center; }
.split .media img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  aspect-ratio: 4 / 3; object-fit: cover;
}
.split .copy p + p { margin-top: 14px; }
.split .copy .sign {
  margin-top: 22px; font-family: "Besley", Georgia, serif; font-style: italic;
  font-size: 1.16rem; color: var(--ink);
}
.split .copy .sign::before { content: ""; display: block; width: 46px; height: 3px; background: var(--red); margin-bottom: 14px; border-radius: 2px; }

/* ---------- Menù ---------- */
.menu-groups { display: grid; gap: 34px 48px; margin-top: 34px; }
.menu-group h3 {
  font-family: "Besley", Georgia, serif; font-style: italic; font-weight: 600;
  font-size: 1.62rem; color: var(--ink); padding-bottom: 8px; margin-bottom: 14px;
  border-bottom: 2px solid var(--red);
  display: flex; align-items: baseline; justify-content: space-between;
}
.menu-group h3 .g-note { font-family: "Libre Franklin", sans-serif; font-style: normal; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--taupe); font-weight: 600; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { padding: 9px 0; border-bottom: 1px dotted var(--line); }
.menu-list li:last-child { border-bottom: 0; }
.dish-row { display: flex; align-items: baseline; gap: 8px; }
.dish-name { font-weight: 600; }
.leader { flex: 1 1 auto; border-bottom: 1.5px dotted #cdbfa8; transform: translateY(-3px); min-width: 14px; }
.price { font-family: "Besley", Georgia, serif; font-weight: 700; color: var(--red); white-space: nowrap; }
.dish-desc { color: var(--taupe); font-size: .94rem; margin-top: 1px; max-width: 46ch; }
.dish-desc em { font-style: italic; }
.menu-note {
  margin-top: 30px; color: var(--taupe); font-size: .95rem; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--red);
  border-radius: var(--radius);
}
.menu-note strong { color: var(--ink); }

/* ---------- I piatti: coppia editoriale asimmetrica ---------- */
.plates { display: grid; gap: 16px; margin-top: 30px; }
.plates figure { margin: 0; }
.plates img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-sm); object-fit: cover; }
.plates .big img { aspect-ratio: 5 / 4; }
.plates .small img { aspect-ratio: 4 / 5; }
.plates figcaption {
  font-family: "Besley", Georgia, serif; font-style: italic; color: var(--taupe);
  font-size: .95rem; margin-top: 10px;
}

/* ---------- Perché ci vengono: recensioni + fatti ---------- */
.why { display: grid; gap: 30px; margin-top: 30px; }
.quotes { display: grid; gap: 18px; }
.quote {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 18px; box-shadow: var(--shadow-sm);
}
.quote p { font-family: "Besley", Georgia, serif; font-size: 1.12rem; line-height: 1.4; }
.quote .stars { color: var(--red); letter-spacing: 2px; font-size: .95rem; margin-bottom: 10px; }
.quote cite { display: block; margin-top: 12px; font-style: normal; color: var(--taupe); font-size: .88rem; }
.facts { border-top: 2px solid var(--red); padding-top: 20px; }
.facts .rating {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px;
}
.facts .rating .big { font-family: "Besley", Georgia, serif; font-weight: 700; font-size: 2.6rem; color: var(--ink); line-height: 1; }
.facts .rating .sub { color: var(--taupe); font-size: .95rem; }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 10px; align-items: flex-start; font-size: .98rem; }
.facts li::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin-top: .55em; background: var(--red); border-radius: 50%; }

/* ---------- Orari & dove ---------- */
.info-grid { display: grid; gap: 34px; margin-top: 30px; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours td:first-child { font-weight: 600; width: 8.5rem; }
.hours td:last-child { text-align: right; color: var(--taupe); }
.hours tr.closed td:last-child { color: #a08b74; }
.hours tr.today td { color: var(--red); font-weight: 700; }
.hours tr.today td:last-child { color: var(--red); }
.hours-legend { margin-top: 12px; font-size: .85rem; color: var(--taupe); }
.contact-lines { line-height: 2; }
.contact-lines a { color: var(--red); text-decoration: none; font-weight: 600; }
.contact-lines a:hover { text-decoration: underline; }
.addr { font-style: normal; color: var(--ink); }
.dove-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; }
.info-grid h3 { font-size: 1.5rem; margin-bottom: 12px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #e9ddca; padding: 40px 0; }
.footer .wrap { display: grid; gap: 8px; }
.footer .f-brand { font-family: "Besley", Georgia, serif; font-weight: 700; font-size: 1.3rem; color: #fff; }
.footer a { color: #f0c9ac; }
.footer .demo-note { color: #b6a488; font-size: .82rem; margin-top: 12px; }

/* ---------- Reveal (CSS-only, safe fallback: visibile di default) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 26%;
    }
    @keyframes rise-in {
      from { opacity: 0; transform: translateY(24px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}

/* ---------- Responsive ---------- */
@media (min-width: 700px) {
  .split { grid-template-columns: 1fr 1fr; gap: 44px; }
  .menu-groups { grid-template-columns: 1fr 1fr; }
  .plates { grid-template-columns: 1.5fr 1fr; align-items: start; }
  .info-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; }
  .why { grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
  .hero-sub { font-size: 1.18rem; }
}

@media (min-width: 1000px) {
  body { font-size: 18px; }
  .nav-links { display: flex; }
  .hero { padding: 84px 0 64px; }
  .hero h1 { font-size: 5.6rem; }
  .section { padding: 88px 0; }
  .menu-groups { gap: 40px 60px; }
  /* Primi & Secondi (i due gruppi lunghi) prendono più aria in colonna piena quando serve */
}
