/* ==========================================================================
   PANIFICIO IDICE — San Lazzaro di Savena
   Vintage-di-quartiere. Signature: the striped awning ("tendone") + scalloped
   valance, rendered in pure CSS. Canvas = oat-cream of the awning fabric;
   ink = the painted "PANIFICIO IDICE" lettering; one accent = teal-Idice
   (the river namesake / the greenish stone of the facade / enamel signage).
   Mobile-first (390px), then a min-width layer for desktop.
   ========================================================================== */

:root {
  --bg:          #f1e8d4;   /* oat-cream — the awning ground */
  --surface:     #fbf6ec;   /* lit panels / cards */
  --band:        #e7dabf;   /* deeper oat — alt bands + the awning's dark stripe */
  --line:        #d9c9a6;   /* hairlines */
  --ink:         #2a2118;   /* painted-sign near-black brown */
  --muted:       #6f6250;   /* warm taupe (AA on --bg) */
  --accent:      #125e59;   /* teal-Idice — the one touchable colour */
  --accent-hover:#0c4642;
  --accent-ink:  #f4ead6;   /* cream text on teal */

  /* awning geometry */
  --stripe-a:    #eaddc0;   /* darker fabric stripe */
  --stripe-b:    #fbf5e7;   /* lighter fabric stripe */
  --sw:          17px;      /* stripe width */
  --scallop:     15px;      /* valance tab radius */

  --font-display: "Petrona", Georgia, "Times New Roman", serif;
  --font-body: "Cabin", -apple-system, "Segoe UI", sans-serif;
  --radius: 2px;
  --measure: 60ch;
  --edge: 1.25rem;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  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-hover); }

/* Iron-rule safety net: no content photo towers at phone width. */
@media (max-width: 640px) {
  figure img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.005em;
  font-weight: 800;
  color: var(--ink);
}
h2 { font-size: clamp(1.7rem, 5.2vw, 2.5rem); margin-bottom: 0.85rem; }
h3 {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.6rem; font-family: var(--font-body);
}

/* ==== TOP BAR ============================================================== */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  padding: 0.7rem var(--edge);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.18rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.brand-mark {
  width: 22px; height: 13px; border-radius: 2px; flex: none;
  background: repeating-linear-gradient(90deg,
    var(--stripe-a) 0 4px, var(--accent) 4px 8px);
  box-shadow: inset 0 0 0 1px rgba(42,33,24,0.12);
}
.topbar-cta {
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  color: var(--accent-ink); background: var(--accent);
  padding: 0.46rem 1.05rem; border-radius: var(--radius);
  transition: background 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.topbar-cta:hover { background: var(--accent-hover); color: var(--accent-ink); }
.topbar-cta:active { transform: translateY(1px); }

/* ==== HERO — under the awning ============================================= */
.hero { padding-bottom: 3rem; }

.awning {
  position: relative;
  height: clamp(60px, 17vw, 104px);
  width: 100%;
  background:
    linear-gradient(180deg, rgba(42,33,24,0.10), rgba(42,33,24,0) 42%),
    repeating-linear-gradient(90deg,
      var(--stripe-a) 0 var(--sw),
      var(--stripe-b) var(--sw) calc(2 * var(--sw)));
  border-bottom: 2px solid rgba(42,33,24,0.22);
}
/* scalloped valance hanging below the fabric */
.awning::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 100%;
  height: var(--scallop);
  background:
    linear-gradient(180deg, rgba(42,33,24,0.10), rgba(42,33,24,0) 60%),
    repeating-linear-gradient(90deg,
      var(--stripe-a) 0 var(--sw),
      var(--stripe-b) var(--sw) calc(2 * var(--sw)));
  -webkit-mask: radial-gradient(circle at 50% 0,
      #000 calc(var(--scallop) - 0.5px), transparent var(--scallop)) repeat-x;
  -webkit-mask-size: calc(2 * var(--scallop)) 100%;
  mask: radial-gradient(circle at 50% 0,
      #000 calc(var(--scallop) - 0.5px), transparent var(--scallop)) repeat-x;
  mask-size: calc(2 * var(--scallop)) 100%;
}

.hero-body {
  max-width: var(--measure); margin: 0 auto;
  padding: calc(var(--scallop) + 2.2rem) var(--edge) 0;
  text-align: center;
}
.eyebrow {
  color: var(--accent); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 0.7rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 11vw, 4.4rem);
  line-height: 1.02; margin-bottom: 0.9rem;
}
.hero-sub {
  color: var(--muted); font-size: 1.08rem;
  max-width: 34ch; margin: 0 auto 1.7rem;
}
.hero-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 0.62rem 1.35rem; font-weight: 600; font-size: 1rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }

/* ==== GENERIC SECTION / BAND ============================================== */
.section { padding: 3.4rem var(--edge); max-width: var(--measure); margin: 0 auto; }
.section > h2 { margin-bottom: 1.4rem; }

.band {
  padding: 3.6rem var(--edge);
  background: var(--band);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.band > * { max-width: 52ch; margin-left: auto; margin-right: auto; }

/* ---- statement ---- */
.statement p { color: var(--muted); font-size: 1.12rem; }
.rating {
  margin-top: 1.5rem; color: var(--ink) !important; font-size: 1rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.rating .stars { color: var(--accent); letter-spacing: 0.06em; font-size: 1.05rem; }
.rating strong { font-weight: 700; }

/* ==== FACADE PHOTO ======================================================== */
.facade-wrap { padding: 3.2rem var(--edge); }
.facade { max-width: 652px; margin: 0 auto; }
.facade img {
  width: 100%; height: auto;
  aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px -20px rgba(42,33,24,0.5);
}
.facade figcaption {
  margin-top: 0.7rem; text-align: center;
  color: var(--muted); font-family: var(--font-display);
  font-style: italic; font-size: 0.98rem;
}

/* ==== DAL FORNO — grouped index =========================================== */
.products { max-width: 64ch; }
.prod-grid { display: grid; gap: 1.6rem; }
.prod-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem 1.5rem;
}
.prod-group h3 {
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.6rem;
}
.prod-group ul { list-style: none; padding: 0; }
.prod-group li {
  padding: 0.5rem 0; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  font-size: 1.05rem;
}
.prod-group li:first-child { border-top: 0; }
.prod-note { margin-top: 1.6rem; color: var(--muted); font-size: 0.94rem; font-style: italic; }

/* ==== FEATURE — the gnocco ================================================ */
.feature { background: var(--band); }
.feature-kicker {
  color: var(--accent); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 0.9rem;
}
.feature-dish {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 8vw, 3.2rem); line-height: 1.06;
  color: var(--ink); margin-bottom: 1rem;
}
.feature-dish em { font-style: italic; font-weight: 600; color: var(--accent); }
.feature-desc { color: var(--muted); font-size: 1.1rem; max-width: 46ch; }

/* ==== REVIEWS — the one teal block ======================================== */
.reviews {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 4rem var(--edge);
  text-align: center;
}
.reviews blockquote { max-width: 40ch; margin: 0 auto; }
.reviews p {
  font-family: var(--font-display); font-weight: 700; font-style: italic;
  font-size: clamp(1.5rem, 5.5vw, 2.2rem); line-height: 1.24;
  color: var(--accent-ink);
}
.reviews cite {
  display: block; margin-top: 1.3rem;
  font-style: normal; font-size: 0.9rem; letter-spacing: 0.03em;
  color: color-mix(in srgb, var(--accent-ink) 78%, var(--accent));
}

/* ==== ORARI & DOVE ======================================================== */
.dove { max-width: 62ch; }
.info-grid { display: grid; gap: 2.2rem; }
.hours { border-collapse: collapse; width: 100%; max-width: 26rem; }
.hours td { padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--line); }
.hours td:first-child { color: var(--ink); font-weight: 500; }
.hours td:last-child { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.hours td.closed { color: var(--muted); font-style: italic; }
.hours tr.is-today td {
  color: var(--accent); font-weight: 700;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.hours tr.is-today td:last-child { color: var(--accent); }
.contact-lines { margin-bottom: 1.35rem; line-height: 1.9; }

/* ==== FOOTER ============================================================== */
.footer {
  position: relative;
  padding: 3.2rem var(--edge) 2.6rem;
  text-align: center; color: var(--muted); font-size: 0.92rem;
  background: var(--surface); border-top: 1px solid var(--line);
}
.footer p { max-width: 60ch; margin: 0 auto; }
.footer a { color: var(--accent); }
.footer-valance {
  position: absolute; left: 0; right: 0; top: -1px; height: var(--scallop);
  background: repeating-linear-gradient(90deg,
    var(--stripe-a) 0 var(--sw), var(--stripe-b) var(--sw) calc(2 * var(--sw)));
  -webkit-mask: radial-gradient(circle at 50% 100%,
      #000 calc(var(--scallop) - 0.5px), transparent var(--scallop)) repeat-x;
  -webkit-mask-size: calc(2 * var(--scallop)) 100%;
  mask: radial-gradient(circle at 50% 100%,
      #000 calc(var(--scallop) - 0.5px), transparent var(--scallop)) repeat-x;
  mask-size: calc(2 * var(--scallop)) 100%;
}
.footer-brand {
  font-family: var(--font-display); font-weight: 800; font-size: 1.4rem;
  color: var(--ink); margin: 0.6rem 0 0.6rem;
}
.footer .copy { margin-top: 0.9rem; font-size: 0.86rem; }
.demo-note { margin-top: 0.9rem; opacity: 0.72; font-size: 0.82rem; }

/* ==== REVEAL (gated) ====================================================== */
/* Hidden state only when JS is on (.js added early); no-JS keeps content visible. */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16,1,0.3,1); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ==== DESKTOP ============================================================= */
@media (min-width: 720px) {
  :root { --sw: 22px; --scallop: 19px; }
  .hero-body { padding-top: calc(var(--scallop) + 3rem); }
  .hero-sub { font-size: 1.18rem; max-width: 42ch; }
  .prod-grid { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
  .info-grid { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .section, .dove { padding-top: 4.4rem; padding-bottom: 4.4rem; }
  .band, .reviews { padding-top: 4.6rem; padding-bottom: 4.6rem; }
  .feature-desc { margin-left: auto; margin-right: auto; }
}
