/* ==========================================================================
   Piadineria da Andy — Bologna
   Direction: bright white "gallery wall" + handwritten brand voice.
   Canvas: warm white (their walls). Accent: chalk/crust ORANGE (their menu-board
   chalk headers). Type: DM Sans + Caveat (the wall's felt-tip handwriting).
   Shape rule: photos & cards 16px, buttons pill. Mobile-first (390px).
   ========================================================================== */

:root {
  --bg: #faf8f4;            /* warm white — their walls */
  --surface: #f4efe7;       /* panna — alternating bands */
  --text: #201b16;          /* dark chalkboard / wood ink */
  --muted: #6f665c;         /* secondary text (AA on bg) */
  --line: #e6ddce;          /* hairlines */

  --accent: #cf6a1c;        /* vivid crust orange — buttons / marks */
  --accent-deep: #a64d13;   /* deeper orange — links/inline on white (AA ~5:1) */
  --accent-ink: #2a1808;    /* dark ink on the orange button (contrast ~8:1) */

  --board: #211c17;         /* the chalkboard */
  --board-line: #3a3128;
  --chalk: #f3ece1;         /* white chalk */
  --chalk-orange: #ecab4f;  /* orange chalk (their category titles) */
  --chalk-muted: #b6ab9a;

  --font: "DM Sans", -apple-system, "Segoe UI", sans-serif;
  --font-script: "Caveat", "Segoe Script", cursive;
  --r: 16px;
  --maxw: 1080px;
}

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

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

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

a { color: var(--accent-deep); }

h1, h2, h3 { font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); letter-spacing: -0.025em; }
h3 { font-size: 1.05rem; letter-spacing: 0; }

.kicker-script {
  font-family: var(--font-script);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--accent-deep);
  margin-bottom: 0.35rem;
}

/* -- buttons --------------------------------------------------------------- */
.btn {
  display: inline-block; text-decoration: none;
  font-weight: 500; font-size: 1rem;
  padding: 0.7rem 1.4rem; border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; box-shadow: 0 6px 18px rgba(207,106,28,.28); }
.btn-primary:hover { background: #e0771f; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { color: var(--text); border-color: var(--text); }
.btn-ghost:hover { background: var(--text); color: var(--bg); }
.btn-ghost:active { transform: translateY(1px); }

/* -- topbar ---------------------------------------------------------------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  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-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.brand-script { font-family: var(--font-script); font-weight: 700; color: var(--accent-deep); font-size: 1.5rem; letter-spacing: 0; }
.topbar-cta {
  text-decoration: none; font-weight: 700; font-size: 0.95rem;
  color: var(--accent-ink); background: var(--accent);
  padding: 0.45rem 1.1rem; border-radius: 999px;
  transition: background-color .2s ease;
}
.topbar-cta:hover { background: #e0771f; }

/* -- layout helpers -------------------------------------------------------- */
section { padding-inline: 1.1rem; }

/* -- (A) hero -------------------------------------------------------------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding-top: clamp(2rem, 6vh, 3.25rem);
  padding-bottom: clamp(2.5rem, 6vh, 3.5rem);
  display: grid; gap: 1.75rem;
}
.hero-kicker {
  font-family: var(--font-script);
  font-size: 1.5rem; line-height: 1; color: var(--accent-deep);
  margin-bottom: 0.5rem;
}
.hero h1 {
  font-size: clamp(2.3rem, 8.5vw, 3.9rem);
  margin-bottom: 0.9rem;
}
.hero-sub { color: var(--muted); max-width: 40ch; font-size: 1.1rem; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-media { position: relative; }
.hero-media::before {
  content: ""; position: absolute; inset: auto -0.6rem -0.7rem auto;
  width: 62%; height: 68%; border-radius: var(--r);
  background: var(--surface); z-index: 0;
}
.hero-media img {
  position: relative; z-index: 1;
  width: 100%; aspect-ratio: 5 / 4; object-fit: cover;
  border-radius: var(--r);
  box-shadow: 0 20px 45px rgba(32,27,22,.22);
}

/* -- (B) facts ------------------------------------------------------------- */
.facts {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden;
}
.fact {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 1.1rem 1.15rem;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.fact:nth-child(-n+2) { border-top: 0; }
.fact:nth-child(odd) { border-left: 0; }
.fact-big { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.fact-sm { color: var(--muted); font-size: 0.9rem; }

/* -- (C) split (Andy) ------------------------------------------------------ */
.split {
  max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(3rem, 8vh, 4.5rem);
  display: grid; gap: 1.5rem;
}
.split-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); }
.split-copy h2 { margin-bottom: 0.75rem; }
.split-copy p { color: var(--text); max-width: 52ch; }
.split-copy p + p { margin-top: 0.9rem; color: var(--muted); }

/* -- (D) photo band -------------------------------------------------------- */
.photoband { padding-inline: 0; }
.photoband img {
  width: 100%; height: clamp(220px, 42vh, 420px); object-fit: cover;
}
.photoband-cap {
  max-width: var(--maxw); margin: 0.7rem auto 0; padding-inline: 1.1rem;
  color: var(--muted); font-size: 0.9rem;
}

/* -- (E) menu / chalkboard ------------------------------------------------- */
.menu {
  max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(3rem, 8vh, 4.5rem);
}
.menu-head { margin-bottom: 1.5rem; }
.menu-head h2 { margin-bottom: 0.4rem; }
.menu-intro { color: var(--muted); max-width: 48ch; }

.board {
  background: var(--board);
  border-radius: var(--r);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  display: grid; gap: 2rem;
  color: var(--chalk);
  box-shadow: 0 18px 40px rgba(32,27,22,.20);
}
.board-col { display: grid; gap: 1.9rem; align-content: start; }
.mgroup { }
.mtitle {
  font-family: var(--font-script);
  font-weight: 700; font-size: 2rem; line-height: 1;
  color: var(--chalk-orange);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--board-line);
  letter-spacing: 0;
}
.mlist { list-style: none; padding: 0; }
.mlist li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.mlist li:last-child { border-bottom: 0; }
.mlist .d { color: var(--chalk); font-size: 0.98rem; line-height: 1.35; }
.mlist .d b { color: var(--chalk-orange); font-weight: 700; }
.mlist .p {
  color: var(--chalk-orange); font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mlist .p::before { content: "€ "; font-weight: 500; }
.mlist .p:empty::before { content: ""; }
.mlist .p.from::before { content: "da € "; font-weight: 500; }
.mextra { margin-top: 0.7rem; color: var(--chalk-muted); font-size: 0.88rem; }
.menu-note { margin-top: 1.1rem; color: var(--muted); font-size: 0.9rem; }

/* -- (F) muro dei ringraziamenti ------------------------------------------- */
.wall {
  background: var(--surface);
  padding-block: clamp(3rem, 8vh, 4.5rem);
}
.wall-head { max-width: var(--maxw); margin: 0 auto 1.75rem; }
.wall-head h2 { margin-bottom: 0.4rem; }
.wall-intro { color: var(--muted); max-width: 46ch; }
.wall-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 1.25rem;
}
.wall-photo img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 62%;
  border-radius: var(--r); border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(32,27,22,.14);
}
.wall-notes { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.note {
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.2rem 1.3rem;
  box-shadow: 0 8px 20px rgba(32,27,22,.08);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.note blockquote {
  font-family: var(--font-script);
  font-size: 1.7rem; line-height: 1.15; font-weight: 600;
}
.note figcaption {
  font-family: var(--font-script);
  font-size: 1.2rem; color: var(--muted);
}
/* ink colors are CONTENT (the real wall is multi-colour), not UI accents */
.note-a blockquote { color: #c0392b; }
.note-b blockquote { color: #1f6f8b; }
.note-c blockquote { color: #2e7d4f; }
.note-d blockquote { color: #6a4a8c; }
.note-e blockquote { color: #b5641a; }
.wall-photo img {
  width: 100%; height: 100%; min-height: 220px; object-fit: cover;
  border-radius: 14px;
}

/* -- (G) info / orari & dove ----------------------------------------------- */
.info {
  max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(3rem, 8vh, 4.5rem);
}
.info h2 { margin-bottom: 1.25rem; }
.info-grid { display: grid; gap: 2rem; }
.hours { border-collapse: collapse; width: 100%; max-width: 420px; }
.hours td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); }
.hours tr td:first-child { font-weight: 500; }
.hours tr td:last-child { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today td { color: var(--accent-deep); font-weight: 700; }
.hours tr.is-today td:last-child { color: var(--accent-deep); }
.info-hours h3, .info-contact h3 { color: var(--muted); margin-bottom: 0.6rem; }
.contact-lines { margin-bottom: 1.25rem; line-height: 1.9; }
.contact-lines a { font-weight: 500; }

/* -- footer ---------------------------------------------------------------- */
.footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 2.5rem 1.1rem 3rem; text-align: center;
  color: var(--muted); font-size: 0.9rem;
  border-top: 1px solid var(--line);
}
.demo-note { margin-top: 0.5rem; opacity: 0.75; }

/* -- motion (gentle load only; MOTION dial ~3) ----------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .6s cubic-bezier(.16,1,.3,1) backwards; }
  .hero-copy > *:nth-child(2) { animation-delay: .06s; }
  .hero-copy > *:nth-child(3) { animation-delay: .12s; }
  .hero-copy > *:nth-child(4) { animation-delay: .18s; }
  .hero-media { animation: rise .7s cubic-bezier(.16,1,.3,1) .1s backwards; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ==========================================================================
   DESKTOP
   ========================================================================== */
@media (min-width: 780px) {
  section { padding-inline: 1.5rem; }

  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 2.5rem;
    padding-top: clamp(2.5rem, 7vh, 4rem);
    padding-bottom: clamp(3rem, 8vh, 4.5rem);
  }
  .hero-media::before { inset: auto -1rem -1.1rem auto; }

  .facts { grid-template-columns: repeat(4, 1fr); }
  .fact { border-top: 0; }
  .fact:first-child { border-left: 0; }

  .split { grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; }
  .split-media img { aspect-ratio: 4 / 5; max-height: 520px; }

  .board { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }

  .wall-grid {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: start;
    gap: 2.25rem;
  }
  .wall-photo img { aspect-ratio: 5 / 4; }
  .wall-notes { display: block; column-count: 2; column-gap: 1rem; }
  .wall-notes .note { break-inside: avoid; margin-bottom: 1rem; }
  .note-a { transform: rotate(-1.5deg); }
  .note-b { transform: rotate(1.2deg); }
  .note-c { transform: rotate(1.4deg); }
  .note-d { transform: rotate(-1deg); }
  .note-e { transform: rotate(0.8deg); }

  .info-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (min-width: 780px) and (prefers-reduced-motion: no-preference) {
  .note { transition: transform .2s ease, box-shadow .2s ease; }
  .note:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 12px 26px rgba(32,27,22,.12); }
}
