/* ==========================================================================
   PANIFICIO BIAGINI — via Murri, Bologna
   Direction: minimalist-editorial heritage. Warm paper canvas, one deep
   pine-green accent from the vintage storefront, EB Garamond throughout,
   Caveat handwriting echoing the hand-written price tags. Sharp edges,
   hairline rules, generous whitespace. Mobile-first (390px).
   ========================================================================== */

:root {
  --bg: #f4f0e6;            /* warm paper (justified: the shop's own paper tags + vintage front) */
  --text: #24271f;          /* dark olive-ink (not the banned warm espresso) */
  --muted: #6f695b;
  --accent: #3f5a45;        /* deep pine-sage green — the storefront trim */
  --accent-deep: #324a38;
  --accent-ink: #f4f0e6;
  --line: #d8d1c0;          /* warm hairline */
  --font: "EB Garamond", Georgia, serif;
  --hand: "Caveat", "Segoe Script", cursive;
  --radius: 0px;
  --measure: 60ch;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.2rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--font); font-weight: 600; line-height: 1.1; letter-spacing: 0; }
h2 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin-bottom: 0.75rem; }
h3 { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); margin-bottom: 0.6rem; }

/* -- top bar --------------------------------------------------------------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem;
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 1.3rem; font-weight: 600; letter-spacing: 0.01em; }
.topbar-cta {
  text-decoration: none; font-size: 1rem; font-weight: 600; font-family: var(--font);
  color: var(--accent-ink); background: var(--accent);
  padding: 0.35rem 1.1rem; transition: background 0.25s ease;
}
.topbar-cta:hover { background: var(--accent-deep); }

/* -- buttons (sharp, editorial) -------------------------------------------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 1.05rem;
  padding: 0.6rem 1.5rem; border: 1.5px solid var(--accent); border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--accent-ink); }

/* -- hero (editorial split) ------------------------------------------------ */
.hero {
  display: grid; gap: 2rem;
  padding: 2.5rem 1.25rem 3rem;
  max-width: 1160px; margin: 0 auto;
}
.hero-text { align-self: center; }
.hero-hand { font-family: var(--hand); font-size: 1.7rem; color: var(--accent); line-height: 1; margin-bottom: 0.6rem; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 4.2rem); margin-bottom: 1rem; }
.hero-sub { color: var(--muted); font-size: 1.25rem; max-width: 34ch; margin-bottom: 1.75rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 22% center; border: 1px solid var(--line); }

/* -- heritage creed -------------------------------------------------------- */
.creed { max-width: 40ch; margin: 0 auto; padding: 1.5rem 1.25rem 3.5rem; text-align: center; }
.creed p { font-size: 1.5rem; line-height: 1.5; }

/* -- sections -------------------------------------------------------------- */
.section { padding: 3.5rem 1.25rem; max-width: var(--measure); margin: 0 auto; }
.section--wide { max-width: 1080px; }

/* -- listing (menu, flat editorial) ---------------------------------------- */
.listing { display: grid; gap: 2.25rem; margin-top: 1.5rem; }
.listing-group ul { list-style: none; padding: 0; margin: 0; }
.listing-group li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.listing-group li:last-child { border-bottom: none; }
.note { margin-top: 1.75rem; color: var(--muted); font-size: 1rem; font-style: italic; }

/* -- feature: scritti a mano ----------------------------------------------- */
.feature {
  display: grid; gap: 2.25rem;
  padding: 3.5rem 1.25rem; max-width: 1080px; margin: 0 auto;
  border-block: 1px solid var(--line);
}
.feature-photo { margin: 0; }
.feature-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.feature-text { align-self: center; }
.feature-text > p { color: var(--muted); margin-bottom: 1rem; }
.hand-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; column-gap: 2rem; }
.hand-list li { font-family: var(--hand); font-size: 1.75rem; line-height: 1.25; color: var(--text); }

/* -- gallery --------------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }

/* -- orari & contatti ------------------------------------------------------ */
.info-grid { display: grid; gap: 2.25rem; margin-top: 1.5rem; }
.hours { border-collapse: collapse; width: 100%; }
.hours td { padding: 0.55rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.hours td:first-child { color: var(--text); font-weight: 600; padding-right: 1.5rem; white-space: nowrap; }
.contact-lines { margin-bottom: 1.5rem; line-height: 1.9; }

/* -- footer ---------------------------------------------------------------- */
.footer { padding: 3rem 1.25rem 3.5rem; text-align: center; color: var(--muted); font-size: 1rem; border-top: 1px solid var(--line); }
.demo-note { margin-top: 0.5rem; opacity: 0.8; }

/* -- desktop --------------------------------------------------------------- */
@media (min-width: 860px) {
  .hero { grid-template-columns: 1fr 0.82fr; gap: 3.5rem; padding-block: 4.5rem 5rem; align-items: center; }
  .hero-photo img { aspect-ratio: 3 / 4; object-position: center; }
  .listing { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .feature { grid-template-columns: 0.85fr 1.15fr; align-items: center; gap: 3.5rem; }
  .feature-photo img { aspect-ratio: 3 / 4; }
  .hand-list { columns: 2; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery img { aspect-ratio: 3 / 4; }
  .info-grid { grid-template-columns: 1fr 1fr; }
}

/* -- motion (MOTION 2: minimal, honors reduced-motion) --------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-text > *, .hero-photo { opacity: 0; transform: translateY(12px); animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  .hero-hand { animation-delay: 0.05s; }
  .hero h1 { animation-delay: 0.13s; }
  .hero-sub { animation-delay: 0.22s; }
  .hero-actions { animation-delay: 0.3s; }
  .hero-photo { animation-delay: 0.18s; }
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
