/* ==========================================================================
   Panificio Pasticceria Mariana Ignat — Bologna
   Direzione: "pasticceria di famiglia / torte per le feste".
   Canvas rosa-cipria caldo (dal rosé della foto della torta), un solo accento
   lampone (frutti di bosco + "via dei Lamponi"), display Garamond elegante.
   Mobile-first: progettato a 390px.
   ========================================================================== */

:root {
  --bg: #faf2ef;            /* cipria / porcellana calda */
  --surface: #f4e7e2;       /* cipria più profonda: bande alternate */
  --card: #fffbf9;          /* bianco caldo: pannelli */
  --text: #33202a;          /* prugna-bruno caldo (cast berry) */
  --muted: #8a6a72;         /* malva-talpa: testo secondario */
  --line: #e7d5cf;          /* filetto cipria */
  --accent: #b22a4d;        /* lampone */
  --accent-deep: #90203d;   /* lampone scuro: hover */
  --accent-ink: #fff6f3;    /* testo su accento */

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", -apple-system, "Segoe UI", system-ui, sans-serif;

  --radius: 14px;
  --radius-lg: 20px;
  --measure: 64ch;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

a { color: var(--accent); }
a:hover { color: var(--accent-deep); }

::selection { background: var(--accent); color: var(--accent-ink); }

/* -- headings -------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--text);
}
h2 { font-size: clamp(2rem, 6vw, 2.9rem); margin-bottom: 0.9rem; }
h2 em { font-style: italic; font-weight: 600; color: var(--accent); }
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

p { max-width: var(--measure); }

/* Mobile-image iron rule: any content photo crops to landscape-or-square,
   never a tower. height:auto so aspect-ratio governs the box. */
figure img { width: 100%; height: auto; object-fit: cover; border-radius: var(--radius); }

/* -- 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(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
  color: var(--text); text-decoration: none; letter-spacing: 0.01em;
}
.topbar-cta {
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
  color: var(--accent-ink); background: var(--accent);
  padding: 0.45rem 1.1rem; border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.topbar-cta:hover { background: var(--accent-deep); color: var(--accent-ink); }
.topbar-cta:active { transform: translateY(1px); }

/* -- buttons --------------------------------------------------------------- */
.btn {
  display: inline-block; text-decoration: none; color: var(--text);
  border: 1px solid var(--text); border-radius: 999px;
  padding: 0.7rem 1.5rem; font-weight: 600; font-size: 0.98rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:hover { background: var(--text); 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-deep); border-color: var(--accent-deep); color: var(--accent-ink); }

/* -- hero (typographic) ---------------------------------------------------- */
.hero {
  max-width: 840px; margin: 0 auto; text-align: center;
  padding: clamp(3.5rem, 11vh, 6rem) 1.25rem clamp(3.5rem, 9vh, 5rem);
}
.hero-kicker {
  color: var(--accent); font-weight: 600;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em;
  margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(3.4rem, 15vw, 6rem);
  font-weight: 700; line-height: 0.98; margin-bottom: 1.25rem;
}
.hero-sub {
  color: var(--muted); font-size: 1.15rem; line-height: 1.55;
  max-width: 40ch; margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* -- generic section ------------------------------------------------------- */
.section { padding: clamp(3rem, 8vh, 5rem) 1.25rem; }
.section > *, .assortimento > .panels, .assortimento > .menu-note { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

/* surface bands (alternating rhythm) */
.assortimento, .dove { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* -- torte (signature feature, split) -------------------------------------- */
.feature {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 8vh, 5rem) 1.25rem;
  display: grid; gap: 2rem; align-items: center;
}
.feature-text p { color: var(--text); font-size: 1.1rem; }
.feature-text .feature-note { color: var(--muted); font-size: 0.98rem; margin-top: 0.8rem; }
.feature-text .btn { margin-top: 1.5rem; }
.feature-photo img { aspect-ratio: 4 / 3; }   /* mobile: landscape crop, no tower */

/* -- assortimento (two panels) --------------------------------------------- */
.panels { display: grid; gap: 1.25rem; margin-top: 1.75rem; }
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.75rem 1.5rem;
}
.offer { list-style: none; padding: 0; }
.offer li { padding: 0.85rem 0; border-top: 1px solid var(--line); }
.offer li:first-child { border-top: 0; padding-top: 0.2rem; }
.offer-name { display: block; font-weight: 600; font-size: 1.05rem; }
.offer-desc { display: block; color: var(--muted); font-size: 0.95rem; }
.menu-note { margin-top: 1.5rem; color: var(--muted); font-size: 0.9rem; text-align: center; max-width: none; }

/* -- creazioni (showcase band) --------------------------------------------- */
.showcase {
  padding: clamp(3rem, 8vh, 5rem) 1.25rem;
  max-width: var(--maxw); margin: 0 auto; text-align: center;
}
.showcase-text { max-width: 46ch; margin: 1.75rem auto 0; }
.showcase-text p { color: var(--muted); font-size: 1.1rem; margin: 0 auto; }
.showcase-photo img { aspect-ratio: 16 / 9; max-height: 62vh; }

/* -- orari & dove ---------------------------------------------------------- */
.info-grid { display: grid; gap: 2.25rem; margin-top: 1.75rem; }
.hours { border-collapse: collapse; font-size: 1.05rem; }
.hours td { padding: 0.4rem 1.5rem 0.4rem 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.hours td:first-child { color: var(--text); font-weight: 600; }
.contact-lines { margin-bottom: 1.5rem; line-height: 1.9; }
.contact-lines a { font-weight: 600; }

/* -- footer ---------------------------------------------------------------- */
.footer {
  padding: 3rem 1.25rem; text-align: center;
  color: var(--muted); font-size: 0.9rem;
  border-top: 1px solid var(--line);
}
.footer-brand { font-family: var(--font-display); font-size: 1.35rem; color: var(--text); margin-bottom: 0.3rem; max-width: none; }
.footer p { max-width: none; }
.demo-note { margin-top: 0.75rem; opacity: 0.75; }

/* ==========================================================================
   Desktop / tablet
   ========================================================================== */
@media (min-width: 720px) {
  .panels { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 860px) {
  .feature {
    grid-template-columns: 1fr 1fr; gap: 3.5rem;
  }
  .feature-photo img { aspect-ratio: 4 / 5; }  /* desktop: restore a taller portrait in the split */
}

/* ==========================================================================
   Motion: gentle, CSS-only, reduced-motion honored
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .hero-kicker, .hero h1, .hero-sub, .hero-actions {
    animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero h1 { animation-delay: 0.06s; }
  .hero-sub { animation-delay: 0.12s; }
  .hero-actions { animation-delay: 0.18s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
