/* ==========================================================================
   Pangourmet d'Autore — "menù d'autore" editorial anthology.
   Cocoa-on-cream (sampled from their chocolate-brown logo), near-monochrome:
   the food photos carry all the colour. Newsreader (literary serif, italic
   titles) + Space Mono (manuscript labels/prices). Sharp corners, hairlines.
   Mobile-first (390px), one committed light theme.
   ========================================================================== */

:root {
  --paper:     #f4ecd8;   /* aged-paper cream canvas */
  --paper-2:   #eee2c8;   /* alternating band */
  --tile:      #faf5e8;   /* menu surface / chips */
  --rule:      #d8c9a8;   /* hairlines */
  --ink:       #2f2016;   /* body + headings (~11:1 on paper) */
  --muted:     #5e4c39;   /* secondary text (~5.6:1 on paper) */
  --accent:    #7a4620;   /* chestnut logo-brown: links, prices, CTA (~6:1) */
  --accent-deep: #5c3216; /* hover / small text */
  --cocoa:     #2c1d13;   /* the one dark colour-block */
  --cocoa-mark:#d9a86e;   /* legible warm tint of the brown, on cocoa only */

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "Space Mono", ui-monospace, "Courier New", monospace;

  --wrap: 63rem;
  --measure: 60ch;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

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

img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }

h1, h2, h3 { font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin-bottom: 0.8rem; }
h3 { font-size: 1.15rem; }
p { max-width: var(--measure); }

/* -- shared: mono eyebrow (rationed to <= ceil(sections/3)) --------------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

/* -- shared: buttons (sharp, hairline system) ----------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 0.7rem 1.4rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.12s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--paper); }

/* -- top bar --------------------------------------------------------------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1.25rem;
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.brand em { font-style: italic; color: var(--accent); }
.topbar-cta {
  font-family: var(--font-mono);
  font-size: 0.78rem; letter-spacing: 0.06em;
  text-decoration: none; color: var(--paper); background: var(--accent);
  padding: 0.45rem 1rem;
}
.topbar-cta:hover { background: var(--accent-deep); }

/* -- masthead -------------------------------------------------------------- */
.masthead {
  padding: clamp(2.5rem, 7vh, 4.5rem) 1.25rem 2.5rem;
  max-width: var(--wrap); margin: 0 auto;
}
.masthead-text { max-width: 42rem; }
.masthead h1 {
  display: flex; flex-direction: column;
  font-weight: 500;
  line-height: 0.98;
  margin-bottom: 1.2rem;
}
.masthead .wm-1 { font-size: clamp(2.9rem, 13vw, 6rem); letter-spacing: -0.02em; }
.masthead .wm-2 {
  font-style: italic; font-weight: 400;
  font-size: clamp(1.8rem, 8vw, 3.6rem);
  color: var(--accent);
  padding-left: 0.06em; padding-bottom: 0.08em;   /* italic descender clearance */
  margin-top: -0.12em;
}
.rule { height: 1px; background: var(--rule); margin: 0 0 1.3rem; max-width: 42rem; }
.lead { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--muted); max-width: 34ch; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.6rem; }

.masthead-figure { margin-top: 2.5rem; }
.masthead-figure img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: 1px solid var(--rule);
}
figcaption, .showcase-cap {
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.05em;
  color: var(--muted); margin-top: 0.6rem;
}

/* -- generic section ------------------------------------------------------- */
.section { padding: clamp(2.8rem, 7vh, 4.5rem) 1.25rem; max-width: var(--wrap); margin: 0 auto; }
.section > p { margin-bottom: 0.9rem; }

/* -- la bottega ------------------------------------------------------------ */
.bottega { max-width: 52rem; }
.rating, .reviews-score { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink); margin-top: 1.4rem; }
.stars { color: var(--accent); letter-spacing: 0.05em; }
.reviews-score .stars { color: var(--cocoa-mark); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.chips li {
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.03em;
  color: var(--muted);
  border: 1px solid var(--rule);
  padding: 0.35rem 0.7rem;
  background: var(--tile);
}

/* -- menu / anthology index ------------------------------------------------ */
.menu-lead { color: var(--muted); margin-bottom: 2rem; }
.collection { margin-top: 2.6rem; }
.collection:first-of-type { margin-top: 2rem; }
.collection-title {
  font-style: italic; font-weight: 400;
  font-size: 1.5rem; color: var(--accent);
  padding-bottom: 0.6rem; margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}
.entries { list-style: none; padding: 0; display: grid; gap: 1.6rem; }
.entry-head {
  display: flex; align-items: baseline; gap: 0.75rem;
}
.dish { font-size: 1.28rem; font-weight: 500; letter-spacing: -0.01em; }
.entry-head .price {
  font-family: var(--font-mono); font-size: 0.9rem;
  color: var(--accent); margin-left: auto; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ingredients { color: var(--muted); font-size: 0.98rem; margin-top: 0.25rem; max-width: 52ch; }
.menu-note {
  margin-top: 2.6rem; padding-top: 1.2rem; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: 0.85rem; font-family: var(--font-mono);
  line-height: 1.7; letter-spacing: 0.01em; max-width: 60ch;
}

/* -- feature split (the ONE image+text split) ----------------------------- */
.feature { display: grid; gap: 1.6rem; }
.feature-figure img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 1px solid var(--rule);
}
.feature-text p { margin-bottom: 0.9rem; }

/* -- showcase band --------------------------------------------------------- */
.showcase { padding: 0 1.25rem 1rem; max-width: var(--wrap); margin: 0 auto; }
.showcase img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border: 1px solid var(--rule);
}

/* -- reviews (the one dark colour-block) ----------------------------------- */
.reviews {
  max-width: none; background: var(--cocoa); color: var(--paper);
  margin-top: 1.5rem;
}
.reviews > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.reviews .kicker { color: var(--cocoa-mark); }
.reviews h2 { color: var(--paper); }
.quotes { display: grid; gap: 1.8rem; margin-top: 1.6rem; }
.reviews blockquote { border-left: 2px solid var(--cocoa-mark); padding-left: 1.1rem; }
.reviews blockquote p {
  font-size: 1.18rem; font-style: italic; line-height: 1.5;
  color: var(--paper); max-width: 46ch;
}
.reviews cite {
  display: block; margin-top: 0.7rem;
  font-family: var(--font-mono); font-style: normal;
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cocoa-mark);
}
.reviews-score { color: var(--paper); }

/* -- atmosfera diptych ----------------------------------------------------- */
.atmosfera .diptych { display: grid; gap: 1rem; margin-top: 1.8rem; }
.diptych figure { margin: 0; }
.diptych img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 1px solid var(--rule);
}

/* -- orari & dove ---------------------------------------------------------- */
.info-grid { display: grid; gap: 2.2rem; margin-top: 1.6rem; }
.hours-block h3, .contact-block h3 {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.9rem;
}
.hours { border-collapse: collapse; width: 100%; max-width: 26rem; }
.hours td {
  padding: 0.5rem 0; border-bottom: 1px solid var(--rule);
  color: var(--muted); font-size: 0.95rem;
}
.hours td:first-child { color: var(--ink); }
.hours td:last-child { text-align: right; font-family: var(--font-mono); font-size: 0.82rem; }
.hours tr.is-today td { color: var(--accent); font-weight: 500; }
.hours tr.is-today td:first-child { font-weight: 500; }
.contact-lines { line-height: 1.9; margin-bottom: 1.4rem; }

/* -- footer ---------------------------------------------------------------- */
.footer {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  padding: 2.8rem 1.25rem 3rem; text-align: center;
  color: var(--muted); font-size: 0.85rem; line-height: 1.8;
}
.foot-brand { font-size: 1.35rem; color: var(--ink); margin: 0 auto 0.4rem; max-width: none; }
.foot-brand em { font-style: italic; color: var(--accent); }
.footer p { max-width: none; }
.demo-note { margin-top: 0.8rem; opacity: 0.7; font-family: var(--font-mono); font-size: 0.72rem; }

/* ==========================================================================
   DESKTOP (>= 760px)
   ========================================================================== */
@media (min-width: 760px) {
  .masthead-figure img { aspect-ratio: 21 / 9; }

  /* menu entries into two columns per collection */
  .entries { grid-template-columns: 1fr 1fr; gap: 1.6rem 3rem; }

  /* feature: real 50/50 split; portrait image restored on desktop */
  .feature { grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
  .feature-figure img { aspect-ratio: 3 / 4; }

  .diptych { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .diptych img { aspect-ratio: 3 / 4; }   /* facade + room read as portraits on desktop */

  .info-grid { grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; }
  .quotes { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

/* ==========================================================================
   MOTION — restrained, CSS-only, gated on reduced-motion (MOTION 3)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .masthead-text > * { opacity: 0; transform: translateY(12px); animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  .masthead-text > *:nth-child(1) { animation-delay: 0.05s; }
  .masthead-text > *:nth-child(2) { animation-delay: 0.13s; }
  .masthead-text > *:nth-child(3) { animation-delay: 0.21s; }
  .masthead-text > *:nth-child(4) { animation-delay: 0.29s; }
  .masthead-text > *:nth-child(5) { animation-delay: 0.37s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
