/* Bar Osteria Ciccio — San Mamolo, Bologna
   Direzione: insegna dipinta a mano, un vero bar di quartiere.
   Canvas crema-insegna, inchiostro noce, UNICO accento giallo-insegna.
   Plain CSS, mobile-first, tema unico chiaro. */

:root {
  --cream:      #f8f0da;   /* canvas: il fondo del cassonetto illuminato */
  --latte:      #f1e6c6;   /* banda alterna, superfici tenui */
  --ink:        #2b1d10;   /* testo: le boiserie in legno scuro */
  --brown:      #5c4426;   /* secondario (AA su crema e latte) */
  --sand:       #e0cfa4;   /* filetti */
  --sand-soft:  #ece0bf;   /* filetti su latte */
  --yellow:     #f4bd2e;   /* UNICO accento: insegna, cartellini paste, sgabelli */
  --yellow-deep:#c98a06;   /* variante per testo/hover dell'accento su crema */
  --white:      #fffdf6;   /* card più chiare della crema */

  --maxw: 1120px;
  --radius: 12px;
  --pill: 999px;
  --shadow: 0 14px 34px -18px rgba(43, 29, 16, 0.45);
  --shadow-sm: 0 6px 18px -12px rgba(43, 29, 16, 0.5);

  --font-body: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Caprasimo", Georgia, "Times New Roman", serif;
  --font-script: "Yellowtail", "Brush Script MT", cursive;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; height: auto;}
a { color: inherit; }

h1, h2, h3 { margin: 0; line-height: 1.06; font-weight: 400; }
p { margin: 0; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: 68px; }
.section-head { max-width: 40ch; margin-bottom: 34px; }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6.2vw, 3rem);
  letter-spacing: -0.01em;
}
.lead { color: var(--brown); font-size: 1.125rem; margin-top: 14px; max-width: 58ch; }
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.85em 1.5em;
  border-radius: var(--pill);
  border: 1.5px solid var(--ink);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.btn-primary { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn-ghost   { background: transparent; color: var(--ink); }
.btn:hover   { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active  { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 240, 218, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sand);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding-block: 8px;
}
.brand-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
}
.brand-lockup .brand-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brown);
}
.brand-lockup .brand-name {
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--ink);
  transform: translateY(0.06em);
}
.topnav { margin-left: auto; display: none; gap: 26px; }
.topnav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.18s ease;
}
.topnav a:hover { border-color: var(--yellow); }
.topbar .btn { margin-left: auto; padding: 0.6em 1.1em; }
.topnav + .btn { margin-left: 0; }

@media (min-width: 780px) {
  .topnav { display: inline-flex; }
  .topbar .btn { margin-left: 0; }
  .brand-lockup .brand-name { font-size: 1.85rem; }
}

/* ---------- Hero: cassonetto insegna su banda gialla ---------- */
.hero {
  background: var(--yellow);
  border-bottom: 3px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* riflesso "smaltato" del cassonetto, non un secondo colore */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% -10%, rgba(255,255,255,0.45), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 52px 58px;
  text-align: center;
}
.hero-kicker {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.hero-wordmark {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--ink);
  font-size: clamp(4rem, 19vw, 8.5rem);
  line-height: 0.9;
  margin-block: 2px 10px;
  padding-bottom: 0.1em; /* clearance per la coda della script */
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4.8vw, 1.9rem);
  color: var(--ink);
  max-width: 20ch;
  margin-inline: auto;
  line-height: 1.14;
}
.hero-sub {
  color: var(--ink);
  font-size: 1.06rem;
  max-width: 44ch;
  margin: 15px auto 0;
  opacity: 0.92;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}

@media (min-width: 780px) {
  .hero-inner { padding-block: 66px 74px; }
}

/* ---------- Photo band ---------- */
.photoband {
  position: relative;
  margin: 0;
  border-bottom: 1px solid var(--sand);
}
.photoband > img {
  width: 100%;
  height: clamp(250px, 54vw, 480px);
  object-fit: cover;
  object-position: center 60%;
}
.photoband figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 0 20px;
  background: linear-gradient(to top, rgba(43,29,16,0.82), rgba(43,29,16,0.1) 70%, transparent);
}
.photoband figcaption .cap {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.6vw, 1.6rem);
  line-height: 1.2;
  max-width: 24ch;
}

/* ---------- Rhythm strip: dalla mattina a notte ---------- */
.rhythm .section-head { max-width: 42ch; }
.rhythm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--sand);
}
.rhythm-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--sand);
}
.rhythm-time {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.rhythm-time .when {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--yellow-deep);
}
.rhythm-item p { color: var(--brown); margin-top: 8px; max-width: 42ch; }

@media (min-width: 780px) {
  .rhythm-grid {
    grid-template-columns: repeat(4, 1fr);
    border-top: none;
  }
  .rhythm-item {
    padding: 4px 24px;
    border-bottom: none;
    border-left: 1px solid var(--sand);
  }
  .rhythm-item:first-child { border-left: none; padding-left: 0; }
  .rhythm-item:last-child { padding-right: 0; }
  .rhythm-time { font-size: 1.45rem; flex-direction: column; align-items: flex-start; gap: 5px; }
}

/* ---------- Split (identità / feature) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}
.split-media { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.split-media img {
  width: 100%;
  height: auto; /* override the HTML height attribute so aspect-ratio drives the box (mobile: landscape 4/3) */
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.split-body h2 { margin-bottom: 16px; }
.split-body p { color: var(--brown); }
.split-body p + p { margin-top: 14px; }

.pullquote {
  margin-top: 24px;
  padding: 18px 22px;
  background: var(--white);
  border-left: 4px solid var(--yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.pullquote q {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--ink);
  quotes: "\00ab" "\00bb";
}
.pullquote .cite { display: block; margin-top: 8px; font-size: 0.86rem; color: var(--brown); }

.rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-weight: 600;
}
.rating .stars { color: var(--yellow-deep); letter-spacing: 0.06em; font-size: 1.05rem; }
.rating .n { color: var(--brown); font-weight: 500; }

@media (min-width: 820px) {
  .split { grid-template-columns: 1fr 1fr; gap: 52px; }
  .split.reverse .split-media { order: 2; }
  .split.portrait .split-media img { aspect-ratio: 3 / 4; max-height: 560px; }
}

/* banda alterna (aperitivo) */
.band-latte { background: var(--latte); border-block: 1px solid var(--sand-soft); }
.band-latte .pullquote { background: var(--cream); }

/* ---------- Menu ---------- */
.menu-note-top { color: var(--brown); font-size: 1.08rem; max-width: 54ch; margin-top: 14px; }

.menu-group { margin-top: 48px; }
.menu-group:first-of-type { margin-top: 40px; }
.menu-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 20px;
}
.menu-group-head h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
}
.menu-group-head .grp-note { color: var(--brown); font-size: 0.95rem; }
.menu-group-head .grp-price {
  margin-left: auto;
  font-weight: 700;
  color: var(--ink);
  background: var(--yellow);
  padding: 4px 13px;
  border-radius: var(--pill);
  font-size: 0.95rem;
  white-space: nowrap;
}

.dish-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 680px) {
  .dish-grid { grid-template-columns: 1fr 1fr; column-gap: 44px; }
}
.dish {
  padding: 13px 0;
  border-bottom: 1px solid var(--sand);
}
.dish-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.dish-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.dish-num {
  font-family: var(--font-display);
  color: var(--yellow-deep);
  margin-right: 2px;
}
.dish-tag {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--yellow-deep);
  border: 1px solid var(--yellow-deep);
  border-radius: var(--pill);
  padding: 1px 7px;
  transform: translateY(-2px);
}
.dish-price {
  margin-left: auto;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.dish-desc { color: var(--brown); font-size: 0.97rem; margin-top: 2px; line-height: 1.45; }

.menu-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--sand);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: baseline;
}
.menu-foot .extras { font-weight: 600; color: var(--ink); }
.menu-note { color: var(--brown); font-size: 0.92rem; max-width: 62ch; }

/* ---------- Info grid: orari / dove / contatti ---------- */
.info { border-top: 1px solid var(--sand); }
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
.info-grid h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin-bottom: 16px;
}
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td {
  text-align: left;
  padding: 9px 0;
  border-bottom: 1px solid var(--sand);
  font-weight: 400;
  vertical-align: top;
}
.hours th { color: var(--brown); font-weight: 500; width: 46%; }
.hours td { color: var(--ink); }
.hours tr.today th, .hours tr.today td { font-weight: 700; padding-inline: 10px; background: var(--yellow); border-bottom-color: var(--yellow-deep); }
.hours .today-flag {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cream);
  border-radius: var(--pill);
  padding: 1px 8px;
}
.contact-lines { line-height: 2; }
.contact-lines a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; text-decoration-color: var(--sand); }
.contact-lines a:hover { text-decoration-color: var(--yellow-deep); }
.info .btn { margin-top: 18px; }
.addr { color: var(--brown); }

@media (min-width: 820px) {
  .info-grid { grid-template-columns: 1.1fr 1fr 1fr; gap: 44px; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding-block: 40px;
}
.footer .brand-name { font-family: var(--font-script); font-size: 2rem; display: block; margin-bottom: 8px; color: var(--yellow); }
.footer p { color: rgba(248,240,218,0.80); font-size: 0.92rem; }
.footer p + p { margin-top: 6px; }
.footer a { color: var(--cream); }
.footer .demo-note { color: var(--yellow); font-weight: 600; margin-top: 16px; }

/* ---------- Motion (MOTION 3): reveal leggero, gated ---------- */
.split-media img { transition: transform 0.3s ease; }
@media (hover: hover) {
  .split-media:hover img { transform: scale(1.03); }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: fade-up linear both;
      animation-timeline: view();
      animation-range: entry 2% cover 20%;
    }
    @keyframes fade-up {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}
