/* ==========================================================================
   IL GRISSINO MATTO - forno, pane, pasta fresca e pasticceria, Pianoro (BO)
   Direction: "insegna nero + giallo" - dark warm signboard black + one
   canary-gold accent, taken 1:1 from their sign. Script wordmark (Sacramento)
   echoes the painted gold cursive; Bricolage Grotesque block-caps echo the
   "PANE PASTA FRESCA" lettering. Mobile-first (390px). One accent, radius 4px.
   ========================================================================== */

:root {
  --bg: #14110b;          /* signboard black (warm) */
  --surface: #1e1a12;     /* cards / alternating bands */
  --surface-2: #1a160f;   /* text tiles */
  --line: #332c1f;        /* hairlines */
  --text: #f5eede;        /* warm cream (the white "PANE PASTA" lettering) */
  --muted: #b0a48f;       /* tortora-sabbia, ~7.9:1 on bg */
  --accent: #f4c518;      /* canary-gold: the cursive + the "PANE PASTA" banner */
  --accent-hi: #ffd634;   /* hover */
  --ink: #14110b;         /* text on accent */
  --font-script: "Sacramento", "Segoe Script", cursive;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 4px;
  --wrap: 1180px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; height: auto; }  /* height:auto so aspect-ratio wins over HTML width/height attrs */
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font); line-height: 1.08; letter-spacing: -0.02em; }

/* Mobile-image iron rule safety net for any <figure> content image */
@media (max-width: 640px) {
  figure img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
}

/* -- buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; font-family: var(--font); font-weight: 600; font-size: 1rem;
  padding: 0.72rem 1.3rem; border-radius: var(--radius);
  border: 1px solid var(--muted); color: var(--text);
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--text); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }

/* -- top bar ---------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 0.6rem 1.25rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { font-family: var(--font-script); color: var(--accent); font-size: 1.75rem; line-height: 1; }
.topbar-cta {
  text-decoration: none; font-family: var(--font); font-weight: 600; font-size: 0.95rem;
  color: var(--ink); background: var(--accent);
  padding: 0.45rem 1rem; border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: background 0.2s ease, transform 0.18s ease;
}
.topbar-cta svg { width: 1em; height: 1em; }
.topbar-cta:hover { background: var(--accent-hi); transform: translateY(-1px); }

/* -- hero ------------------------------------------------------------------- */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(2.4rem, 6vh, 3.5rem) 1.25rem 3rem;
  display: grid; gap: 2rem;
}
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
}
h1.wordmark {
  font-family: var(--font-script); font-weight: 400; color: var(--accent);
  font-size: clamp(3.1rem, 13vw, 5.6rem); line-height: 1.02;
  letter-spacing: 0; margin: 0.35rem 0 0.15rem; padding-bottom: 0.1rem;
}
.hero-sub {
  color: var(--text); font-weight: 500;
  font-size: clamp(1.12rem, 2.6vw, 1.3rem); line-height: 1.5;
  max-width: 40ch; margin: 0.9rem 0 1.7rem;
}
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%; aspect-ratio: 900 / 326; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 22%, transparent);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 3rem;
    padding: 4.5rem 1.25rem 4rem;
  }
}

/* -- sections --------------------------------------------------------------- */
.section { padding: 3.6rem 1.25rem; }
.section-inner { max-width: var(--wrap); margin: 0 auto; }
h2 { font-weight: 800; font-size: clamp(1.75rem, 5.2vw, 2.6rem); line-height: 1.03; }
.section-lead { color: var(--muted); max-width: 54ch; margin-top: 0.7rem; font-size: 1.05rem; }

/* -- cosa sforniamo (tiles) ------------------------------------------------- */
.tiles { display: grid; gap: 0.9rem; margin-top: 1.9rem; }
.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tile--photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tile-body { padding: 1.05rem 1.15rem 1.25rem; }
.tile h3 { font-weight: 700; font-size: 1.18rem; color: var(--text); }
.tile p { color: var(--muted); font-size: 0.98rem; margin-top: 0.35rem; }
.tile--text {
  justify-content: center; padding: 1.5rem 1.35rem;
  background: var(--surface-2); border-left: 3px solid var(--accent);
}
.tile--text .quote { color: var(--text); font-size: 1.12rem; font-weight: 600; line-height: 1.35; }
.tile--text .cite { color: var(--muted); font-size: 0.92rem; margin-top: 0.6rem; font-style: italic; }
.menu-note { color: var(--muted); font-size: 0.92rem; margin-top: 1.5rem; max-width: 60ch; }

@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(6, 1fr); }
  .tile--photo { grid-column: span 2; }
  .tile--text { grid-column: span 3; }
}

/* -- yellow color-block band (the signature) -------------------------------- */
.band { background: var(--accent); color: var(--ink); padding: 3.4rem 1.25rem; }
.band-inner { max-width: var(--wrap); margin: 0 auto; }
.band h2 { color: var(--ink); font-size: clamp(1.9rem, 6.4vw, 3.1rem); max-width: 15ch; }
.band-quote {
  font-weight: 600; font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  line-height: 1.35; max-width: 32ch; margin: 0;
}
.band-quote .cite {
  display: block; margin-top: 0.9rem; font-weight: 700;
  font-size: 0.95rem; opacity: 0.82;
}
.band-quote .cite .stars { color: var(--ink); }
@media (min-width: 820px) {
  .band-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
}

/* -- dove siamo ------------------------------------------------------------- */
.info { display: grid; gap: 2rem; margin-top: 1.7rem; }
.info h3 { font-weight: 700; font-size: 1.2rem; color: var(--text); margin-bottom: 0.6rem; }
.info p { color: var(--muted); }
.info .addr { color: var(--text); font-weight: 500; }
.info a { font-weight: 600; }
.info .maps { margin-top: 1.2rem; }
@media (min-width: 720px) { .info { grid-template-columns: 1fr 1fr; gap: 3rem; } }

/* -- footer ----------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.8rem 1.25rem 3.2rem; text-align: center; color: var(--muted); font-size: 0.95rem;
}
.footer .brand { font-family: var(--font-script); color: var(--accent); font-size: 2.2rem; display: block; margin-bottom: 0.5rem; line-height: 1; }
.footer .addr { color: var(--muted); }
.demo-note { margin-top: 1.1rem; opacity: 0.6; font-size: 0.85rem; }

/* -- motion ----------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.05s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.1s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.15s; }
  .hero-copy > *:nth-child(5) { animation-delay: 0.2s; }
  .hero-figure { animation: rise 0.8s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
