/* ==========================================================================
   Fiorini Gaetano E C. — Panificio a Bologna
   Direction: "Il pane del mattino" — bright daylight heritage bakery.
   Warm wheat-cream canvas, roasted-crust ink, ONE terracotta accent, and a
   hand-drawn covone-di-grano (wheat sheaf) line motif taken from their real
   shop window. Wheat-gold lives ONLY inside that motif, never in the UI.
   Committed light theme. Mobile-first (390px). Radius locked at 4px.
   ========================================================================== */

:root {
  --paper:  #f7efdc;   /* canvas: warm wheat-cream (their cream wall + crumb) */
  --surface:#fdf9ef;   /* cards / framed panels */
  --band:   #efe3c9;   /* alternating band */
  --line:   #e2d6ba;   /* hairline */
  --ink:    #2a1d10;   /* text: roasted-crust dark brown (~14:1 on paper) */
  --muted:  #6f5636;   /* secondary (~6:1 on paper, AA) */
  --accent: #b0451e;   /* terracotta crust — the ONE action colour (~4.9:1) */
  --accent-deep:#8f3716;
  --on-accent:#fdf6ec; /* text on accent (~5.6:1) */
  --grano:  #c69433;   /* wheat gold — DECORATIVE ONLY (svg kernels) */

  --dark:      #2a1d10;/* the single dark block (reviews) */
  --dark-text: #f4ead6;
  --dark-muted:#cbb79a;
  --dark-accent:#e08a5a;

  --radius: 4px;
  --wrap: 1040px;
  --measure: 60ch;
  --font-display: "Alegreya", Georgia, "Times New Roman", serif;
  --font-body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.005em; font-weight: 800; }
h2 { font-size: clamp(1.75rem, 5.2vw, 2.5rem); }
h3 { font-size: 1.02rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0.005em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
}

/* -- wheat mark ------------------------------------------------------------ */
.spiga { color: var(--ink); }
.spiga .stem { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.spiga .kernel { fill: var(--grano); stroke: var(--ink); stroke-width: 1; }
svg.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* -- buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-weight: 700; font-size: 0.98rem;
  padding: 0.72rem 1.4rem; border-radius: var(--radius);
  border: 1px solid transparent; line-height: 1;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--on-accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 32%, transparent); }
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* -- topbar ---------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 0.7rem 1.25rem;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand svg { flex: none; }
.topbar .btn { padding: 0.5rem 1.05rem; font-size: 0.9rem; }

/* -- hero / masthead ------------------------------------------------------- */
.hero { text-align: center; padding: clamp(2.75rem, 8vh, 4.5rem) 1.25rem clamp(2rem, 5vh, 3rem); }
.hero .mark { display: flex; justify-content: center; margin-bottom: 1.1rem; }
.hero .eyebrow { display: block; margin-bottom: 0.9rem; }
.hero h1 { font-size: clamp(3.6rem, 17vw, 6.5rem); letter-spacing: -0.02em; }
.hero-sub { color: var(--muted); max-width: 40ch; margin: 1.1rem auto 1.75rem; font-size: 1.075rem; }
.hero-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* -- grain divider --------------------------------------------------------- */
.divider { display: flex; align-items: center; justify-content: center; gap: 1rem; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.divider svg { flex: none; }

/* -- generic section ------------------------------------------------------- */
.section { padding: clamp(3rem, 7vh, 4.5rem) 0; }
.section .lead { color: var(--muted); max-width: var(--measure); }
.section > .wrap > h2 { margin-bottom: 1rem; }

/* -- facade band ----------------------------------------------------------- */
.facade { padding: clamp(1.5rem, 4vh, 2.5rem) 0; }
.facade figure { max-width: var(--wrap); margin-inline: auto; }
.facade img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  object-position: 50% 32%; border-radius: var(--radius);
  border: 1px solid var(--line);
}
.facade figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.6rem; text-align: center; }

/* -- statement + chips + rating -------------------------------------------- */
.statement { background: var(--band); }
.statement .lead { font-size: 1.12rem; color: var(--ink); }
.rating { display: inline-flex; align-items: baseline; gap: 0.5rem; margin-top: 1.25rem; font-weight: 700; }
.rating .stars { color: var(--accent); font-size: 1.05rem; letter-spacing: 0.05em; }
.rating .count { color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; list-style: none; padding: 0; }
.chips li {
  font-size: 0.86rem; font-weight: 500; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  padding: 0.4rem 0.85rem; border-radius: var(--radius);
}

/* -- products (grouped index with wheat bullets) --------------------------- */
.prodotti .groups { display: grid; gap: 1.5rem; margin-top: 1.75rem; }
@media (min-width: 720px) { .prodotti .groups { grid-template-columns: 1fr 1fr; gap: 1.5rem 3rem; } }
.grp { border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.grp .grp-head { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.4rem; }
.grp .grp-head svg { flex: none; }
.grp h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.grp p { color: var(--muted); }
.prodotti .note { margin-top: 1.75rem; color: var(--muted); font-size: 0.92rem; }

/* -- feature split (the one img+text split) -------------------------------- */
.feature .split { display: grid; gap: 1.5rem; align-items: center; }
.feature img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  object-position: 50% 38%; border-radius: var(--radius); border: 1px solid var(--line);
}
.feature .copy .lead { margin-top: 0.9rem; }
@media (min-width: 820px) {
  .feature .split { grid-template-columns: 0.9fr 1.1fr; gap: 3rem; }
  .feature .split.reverse > figure { order: 2; }
  .feature img { aspect-ratio: 3 / 4; object-position: 50% 35%; }  /* taller on desktop only */
}

/* -- gallery --------------------------------------------------------------- */
.gallery-grid { display: grid; gap: 0.75rem; margin-top: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-grid img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.gallery-grid figure:last-child img { aspect-ratio: 3 / 2; }

/* -- reviews (the single dark block, "Color Block Story") ------------------ */
.reviews { background: var(--dark); color: var(--dark-text); }
.reviews h2 { color: var(--dark-text); }
.reviews .eyebrow { color: var(--dark-accent); }
.quotes { display: grid; gap: 1.5rem; margin-top: 1.75rem; }
@media (min-width: 720px) { .quotes { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.quote p { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; font-style: italic; color: var(--dark-text); }
.quote .who { display: block; margin-top: 0.85rem; font-family: var(--font-body); font-style: normal; font-size: 0.9rem; font-weight: 500; color: var(--dark-muted); }
.reviews .rating { margin-top: 2rem; }
.reviews .rating .stars { color: var(--dark-accent); }
.reviews .rating .count { color: var(--dark-muted); }

/* -- orari & dove ---------------------------------------------------------- */
.info-grid { display: grid; gap: 2.25rem; margin-top: 1.5rem; }
@media (min-width: 720px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.hours { border-collapse: collapse; width: 100%; max-width: 320px; }
.hours td { padding: 0.4rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.hours td:first-child { color: var(--ink); font-weight: 700; width: 45%; }
.hours tr.today td { color: var(--accent); }
.hours tr.today td:first-child { color: var(--accent); }
.contact p { margin-bottom: 0.35rem; }
.contact .addr { color: var(--ink); }
.contact a { font-weight: 700; }
.contact .btn { margin-top: 1.1rem; }

/* -- footer ---------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 1.25rem 3rem; text-align: center; color: var(--muted); font-size: 0.92rem; }
.footer .brand { justify-content: center; margin-bottom: 0.75rem; color: var(--ink); }
.footer p { margin-bottom: 0.35rem; }
.demo-note { opacity: 0.75; font-size: 0.82rem; margin-top: 0.75rem; }

/* -- motion (subtle, dial ~3; safe default = visible) ---------------------- */
.js-motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.js-motion .reveal.in { opacity: 1; transform: none; }
.js-motion .hero .reveal { transition-duration: .8s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-motion .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
