/* ==========================================================================
   SPAN Pizzeria — Laura Bassi, Bologna
   Direction: Swiss-editorial monochrome. Derived from their real brand:
   the boxed "SPAN" wordmark (white on black) and the printed carta
   (solid black category bars on white paper). Zero radius, hard rules,
   one tomato-red accent. Mobile-first (390px).
   ========================================================================== */

:root {
  --paper:   #f3f2ee;   /* canvas — cool paper, not warm beige */
  --white:   #ffffff;   /* menu / card surfaces */
  --ink:     #17150f;   /* near-black — the sign, the bars, the text */
  --muted:   #6b675e;   /* secondary text (AA on paper) */
  --rule:    #d7d3c8;   /* hairlines */
  --accent:  #c8301b;   /* Neapolitan tomato red — prices, links, CTA (5.4:1 on white) */
  --accent-ink: #ffffff;

  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --measure: 68ch;
  --edge: clamp(1.1rem, 5vw, 4rem);   /* page side gutter */
}

* { 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.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(1.7rem, 5.2vw, 2.9rem); letter-spacing: -0.02em; }
h3 {
  font-family: var(--font-body);
  font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* -- the boxed wordmark (their sign) --------------------------------------- */
.brand-box {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--ink); color: var(--white);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px var(--ink);
  padding: 0.28em 0.62em;
  line-height: 1;
}

/* -- 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(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.brand { text-decoration: none; }
.topbar .brand-box { font-size: 0.95rem; }
.topbar-cta {
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-ink); background: var(--accent);
  padding: 0.55rem 1.1rem;
  transition: background 0.2s ease, transform 0.1s ease;
}
.topbar-cta:hover { background: #a8261299; background: #ab2513; }
.topbar-cta:active { transform: translateY(1px); }

/* -- layout helpers -------------------------------------------------------- */
.section { padding: clamp(3rem, 8vw, 5.5rem) var(--edge); }
.section > * { max-width: 1180px; margin-inline: auto; }

/* -- hero (typographic, left-aligned) ------------------------------------- */
.hero { padding: clamp(2.6rem, 8vw, 5rem) var(--edge) clamp(2.4rem, 6vw, 4rem); }
.hero-inner { max-width: 1180px; margin-inline: auto; }
.eyebrow {
  font-size: 0.74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.hero-mark { margin: 0 0 1.5rem; }
.wordmark {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--white);
  padding: 0.22em 0.34em;
}
.wordmark-inner {
  display: inline-block;
  border: 3px solid var(--white);
  padding: 0.16em 0.5em 0.22em;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.6rem, 17vw, 9rem);
  letter-spacing: 0.02em; line-height: 0.9;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  max-width: 34ch; color: var(--ink);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* -- buttons (rectangular, print) ----------------------------------------- */
.btn {
  display: inline-flex; align-items: center;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  color: var(--ink); background: transparent;
  border: 1.5px solid var(--ink);
  padding: 0.72rem 1.4rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* -- full-width facade band ----------------------------------------------- */
.band { padding: 0; }
.band-figure { max-width: none; margin: 0; }
.band-figure img { width: 100%; height: clamp(220px, 52vw, 520px); object-fit: cover; }
.band-figure figcaption {
  max-width: 1180px; margin-inline: auto;
  padding: 0.9rem var(--edge);
  font-size: 0.9rem; color: var(--muted);
  border-bottom: 1px solid var(--rule);
}

/* -- ethos (statement + swiss ledger) ------------------------------------- */
.ethos .statement { max-width: 20ch; margin-inline: 0; }
.ethos .lede {
  max-width: 52ch; margin-inline: 0; margin-top: 1.1rem;
  font-size: 1.1rem; color: var(--muted);
}
.ledger {
  margin-top: 2.6rem;
  display: grid; gap: 0;
  border-top: 2px solid var(--ink);
}
.ledger-col { padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.ledger-k {
  display: block;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.ledger-col p { max-width: 44ch; color: var(--ink); }
@media (min-width: 760px) {
  .ledger { grid-template-columns: repeat(3, 1fr); column-gap: 0; }
  .ledger-col { padding: 1.6rem 2rem 1.8rem; border-bottom: none; border-left: 1px solid var(--rule); }
  .ledger-col:first-child { padding-left: 0; border-left: none; }
}

/* -- menu (the signature: printed carta) ---------------------------------- */
.menu { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.menu-head { max-width: 1180px; }
.menu-intro { max-width: 56ch; margin-top: 0.8rem; color: var(--muted); }

.menu-cols { margin-top: 2.4rem; }
@media (min-width: 820px) {
  .menu-cols { columns: 2; column-gap: 3.2rem; }
}
.cat { break-inside: avoid; margin-bottom: 1.7rem; }
.cat-bar {
  background: var(--ink); color: var(--white);
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.98rem; text-transform: uppercase; letter-spacing: 0.12em;
  padding: 0.52rem 0.8rem;
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 3px solid var(--accent);
}
.cat-bar:not(:first-child) { margin-top: 1.5rem; }
.cat-bar-note {
  font-family: var(--font-body); font-weight: 500;
  font-size: 0.72rem; letter-spacing: 0.08em; color: #cfcabf;
}

.dishes { list-style: none; padding: 0; }
.dishes li {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid var(--rule);
}
.dishes li:last-child { border-bottom: none; }
.d { flex: 1; min-width: 0; }
.d-name {
  display: block;
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.02rem; letter-spacing: 0.01em;
}
.d-qty {
  font-family: var(--font-body); font-weight: 500;
  font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-left: 0.4rem;
}
.d-desc {
  display: block; margin-top: 0.15rem;
  font-size: 0.86rem; line-height: 1.45; color: var(--muted);
  max-width: 46ch;
}
.p {
  font-family: var(--font-display); font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.98rem;
}
.menu-note {
  max-width: 1180px; margin: 2.4rem auto 0;
  font-size: 0.85rem; color: var(--muted);
  padding-top: 1.1rem; border-top: 1px solid var(--rule);
}

/* -- 2-up food band -------------------------------------------------------- */
.band-2up {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 700px) { .band-2up { grid-template-columns: 1fr 1fr; } }
.band-2up figure { margin: 0; position: relative; }
.band-2up img { width: 100%; height: clamp(240px, 42vw, 440px); object-fit: cover; }
.band-2up figcaption {
  padding: 0.85rem var(--edge);
  font-size: 0.86rem; color: var(--muted);
  border-top: 1px solid var(--rule);
}
@media (min-width: 700px) {
  .band-2up figure:first-child img { border-right: 1px solid var(--rule); }
}

/* -- info (orari + contatti) ---------------------------------------------- */
.info-grid { margin-top: 2rem; display: grid; gap: 2.6rem; }
@media (min-width: 720px) { .info-grid { grid-template-columns: 1.2fr 1fr; gap: 3.5rem; } }

.hours { border-collapse: collapse; width: 100%; max-width: 30rem; }
.hours th, .hours td {
  text-align: left; padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 400; vertical-align: baseline;
}
.hours th { font-weight: 600; width: 8.5rem; }
.hours td { color: var(--muted); font-variant-numeric: tabular-nums; }
.hours tr.is-today th { color: var(--accent); }
.hours tr.is-today td { color: var(--ink); }
.hours tr.is-today th::after {
  content: " · oggi";
  font-weight: 600; font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
}
.rating {
  margin-top: 1.1rem; font-size: 0.92rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.contact-lines { margin-bottom: 1.3rem; line-height: 1.7; }
.info .btn-primary { margin-top: 0.4rem; }

/* -- footer ---------------------------------------------------------------- */
.footer {
  padding: 3rem var(--edge) 3.5rem;
  text-align: center;
  color: var(--muted); font-size: 0.9rem;
  border-top: 2px solid var(--ink);
}
.footer > * { max-width: 1180px; margin-inline: auto; }
.footer-mark { font-size: 0.9rem; margin-bottom: 1.1rem; }
.footer p { margin-top: 0.4rem; }
.copy { font-size: 0.85rem; }
.demo-note { margin-top: 1rem; opacity: 0.75; font-size: 0.8rem; }

/* -- motion (MOTION 2: hover + one gentle reveal, reduced-motion safe) ----- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .band-figure img, .ethos, .cat, .band-2up figure, .info-grid {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
    @keyframes rise {
      from { opacity: 0; transform: translateY(14px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}
