/* ==========================================================================
   Pizzeria L'Effettiva da Pietro — Bologna
   Direction: "il foglio di Pietro online" — the shop's hand-taped lilac menu
   sheet + red/blue signage, brought online. Playful-artisan, warm, honest.
   Palette from THEIR materials: lilac menu paper, brand red, menu blue-ink.
   ACCENT LOCK: red (#c02a2a) is the ONE action color (CTA/links/prices/names).
   Blue (#39507e) is a role-locked SECOND INK: menu descriptions + swoosh only,
   never on an interactive element.  Mobile-first (390px), plain HTML/CSS.
   VARIANCE 6 / MOTION 3 (CSS only) / DENSITY 4.
   ========================================================================== */

:root {
  --paper:      #f4efec;   /* canvas — warm paper with a whisper of plum */
  --paper-2:    #ede6e6;   /* alternating band */
  --blush:      #efe3e4;   /* delivery band, warm */
  --sheet:      #e9e2f0;   /* the lilac MENU sheet — their real menu paper */
  --ink:        #241f26;   /* text — warm plum-black */
  --muted:      #6a6270;   /* secondary text (AA on paper) */
  --red:        #c02a2a;   /* THE accent: actions, links, prices, pizza names */
  --red-deep:   #9f2320;   /* red hover / links on light */
  --blue:       #39507e;   /* SECOND INK: menu descriptions + swoosh, role-locked */
  --on-red:     #fdf5f3;   /* text on red */
  --line:       rgba(36,31,38,.14);
  --line-blue:  rgba(57,80,126,.28);

  --serif:  "Yeseva One", "Times New Roman", serif;   /* display — echoes sign serif */
  --script: "Grand Hotel", "Segoe Script", cursive;   /* wordmark + menu mastheads */
  --body:   "Albert Sans", -apple-system, "Segoe UI", system-ui, sans-serif;

  --r: 4px;                 /* one radius system — paper/print, not pill */
  --measure: 66ch;
  --edge: 1.25rem;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;              /* guard: slight photo rotations must not scroll the page */
}
img { max-width: 100%; display: block; height: auto;}
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }

h1, h2, h3 { line-height: 1.12; font-weight: 400; }
h2 { font-family: var(--serif); font-size: clamp(1.7rem, 4.6vw, 2.5rem); letter-spacing: .002em; }
h3 { font-family: var(--body); font-weight: 700; font-size: 1.02rem; letter-spacing: .01em; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--edge); }
.section { padding-block: clamp(3rem, 8vw, 5rem); }
.eyebrow {
  font-size: .74rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .17em; color: var(--red); margin-bottom: .7rem;
}
.lead { color: var(--muted); max-width: 52ch; }

/* -- buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5ch; justify-content: center;
  text-decoration: none; font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .85rem 1.35rem; border-radius: var(--r);
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
  transition: transform .18s cubic-bezier(.16,1,.3,1), background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn-primary:hover { background: var(--red-deep); border-color: var(--red-deep); color: var(--on-red); }
.btn-ghost:hover { background: rgba(36,31,38,.06); }

/* -- topbar ----------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .6rem var(--edge);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
}
.brand-mini { display: flex; align-items: baseline; gap: .5ch; text-decoration: none; color: var(--ink); }
.brand-mini .bm-script { font-family: var(--script); color: var(--red); font-size: 1.5rem; line-height: 1; }
.brand-mini .bm-tag { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.topbar .btn { padding: .55rem 1rem; font-size: .92rem; }

/* -- hero ------------------------------------------------------------------- */
.hero { padding-top: clamp(2.2rem, 6vw, 3.4rem); padding-bottom: clamp(2.6rem, 7vw, 4rem); }
.hero-grid { display: grid; gap: clamp(1.8rem, 4vw, 3rem); align-items: center; }
.lockup { display: block; }
.lk-pizzeria {
  font-family: var(--serif); color: var(--red);
  font-size: clamp(1.1rem, 3.4vw, 1.5rem); letter-spacing: .26em;
  text-transform: uppercase; display: block; margin-left: .12em;
}
.lk-name {
  font-family: var(--script); color: var(--ink);
  font-size: clamp(3.6rem, 15vw, 6.4rem); line-height: .95;
  display: block; margin: .1rem 0 .55rem; padding-bottom: .12em;   /* descender clearance for the script */
}
.lk-pietro {
  font-family: var(--body); color: var(--muted); font-weight: 600;
  font-size: clamp(.85rem, 2.5vw, 1rem); letter-spacing: .3em; text-transform: uppercase;
  display: block; margin-left: .18em;
}
.hero-sub { margin: 1.4rem 0 1.6rem; font-size: 1.12rem; color: var(--ink); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-photo { position: relative; }
.hero-photo .photo-print { max-width: 430px; margin-inline: auto; }
.hero-photo img { aspect-ratio: 1 / 1; height: auto; width: 100%; object-fit: cover; }   /* mobile: square print (source is ~square) so it never renders taller than wide; desktop portrait restored below */
.photo-print {
  background: #fff; padding: .55rem .55rem 1.1rem; border-radius: var(--r);
  box-shadow: 0 22px 48px rgba(36,31,38,.18), 0 2px 8px rgba(36,31,38,.10);
  border: 1px solid rgba(36,31,38,.06);
}
.photo-print img { border-radius: 2px; width: 100%; }
.photo-print .cap {
  font-family: var(--script); color: var(--muted);
  font-size: 1.15rem; text-align: center; margin-top: .15rem; line-height: 1;
}
/* rotations are desktop-only (below) to avoid full-width overflow on phones */

/* -- trust strip ------------------------------------------------------------ */
.strip { border-block: 1px solid var(--line); background: var(--paper); }
.strip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.strip-cell { padding: 1.1rem 1rem; text-align: center; border-bottom: 1px solid var(--line); }
.strip-cell:nth-child(odd) { border-right: 1px solid var(--line); }
.strip-cell:nth-last-child(-n+2) { border-bottom: 0; }
.strip-cell .n { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--ink); line-height: 1; }
.strip-cell .n .star { color: var(--red); }
.strip-cell .l { display: block; margin-top: .35rem; font-size: .82rem; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }

/* -- split (impasto / chi siamo) -------------------------------------------- */
.split { display: grid; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.split .txt p { color: var(--muted); margin-top: .9rem; max-width: 46ch; }
.split .txt p strong { color: var(--ink); font-weight: 600; }
.split .ph img { height: clamp(260px, 62vw, 380px); width: 100%; object-fit: cover; }
.alt { background: var(--paper-2); }

/* -- MENU (the lilac sheet) ------------------------------------------------- */
.menu { background: var(--sheet); }
.menu-head { text-align: center; max-width: 60ch; margin: 0 auto 2.2rem; }
.menu-head h2 { color: var(--ink); }
.menu-group { margin-top: 2.4rem; }
.menu-group:first-of-type { margin-top: 1.6rem; }
.menu-group > .mg-title {
  font-family: var(--script); color: var(--ink);
  font-size: clamp(1.9rem, 5.2vw, 2.7rem); line-height: 1;
  text-align: center; margin-bottom: .3rem;
}
.menu-group > .mg-sub {
  text-align: center; color: var(--blue); font-size: .86rem;
  letter-spacing: .04em; margin-bottom: 1.4rem;
}
.pz-list { list-style: none; padding: 0; display: grid; gap: 1.05rem; }
.pz { break-inside: avoid; }
.pz-top { display: flex; align-items: baseline; gap: .5rem; }
.pz-name {
  font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--red); font-size: .96rem;
}
.pz-tag {
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--on-red); background: var(--red); padding: .12rem .4rem;
  border-radius: 2px; margin-left: .5ch; vertical-align: .12em; font-weight: 600;
}
.pz-dot { flex: 1; border-bottom: 1.5px dotted var(--line-blue); transform: translateY(-.2em); }
.pz-price {
  font-weight: 600; color: var(--red); font-variant-numeric: tabular-nums;
  font-size: .96rem; white-space: nowrap;
}
.pz-desc {
  font-style: italic; color: var(--blue); font-size: .92rem;
  line-height: 1.4; margin-top: .1rem; max-width: 44ch;
}
.menu-note {
  margin-top: 2.4rem; text-align: center; color: var(--muted);
  font-size: .9rem; max-width: 50ch; margin-inline: auto;
}

/* -- full-bleed atmosphere band --------------------------------------------- */
.band-photo { position: relative; }
.band-photo img { width: 100%; height: clamp(240px, 42vw, 460px); object-fit: cover; }
.band-photo .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.2rem var(--edge) 1.1rem; color: var(--on-red);
  font-family: var(--script); font-size: clamp(1.6rem, 5vw, 2.6rem); line-height: 1;
  background: linear-gradient(to top, rgba(24,18,26,.78), rgba(24,18,26,0));
}

/* -- delivery band ---------------------------------------------------------- */
.deliver { background: var(--blush); }
.deliver-grid { display: grid; gap: clamp(1.4rem, 4vw, 2.6rem); align-items: center; }
.deliver h2 { color: var(--ink); }
.deliver p { color: var(--muted); margin: .9rem 0 1.5rem; max-width: 42ch; }
.deliver-actions { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; }
.wa-link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .5ch; }
.wa-link:hover { text-decoration: underline; }
.deliver-photo img { height: clamp(260px, 62vw, 380px); width: 100%; object-fit: cover; }

/* -- info / orari / dove ---------------------------------------------------- */
.info { background: var(--paper-2); }
.info-grid { display: grid; gap: 2.2rem; }
.hours { border-collapse: collapse; width: 100%; max-width: 24rem; }
.hours td { padding: .5rem 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hours tr:last-child td { border-bottom: 0; }
.hours td:first-child { font-weight: 600; color: var(--ink); }
.hours td:last-child { text-align: right; color: var(--muted); }
.hours tr.closed td:last-child { color: var(--muted); font-style: italic; }
.hours tr.today td { color: var(--red); }
.hours tr.today td:first-child { font-weight: 700; }
.hours tr.today td:last-child { color: var(--red); font-style: normal; }
.today-flag { display: inline-block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-left: .6ch; }
.hours-note { color: var(--muted); font-size: .86rem; margin-top: .9rem; max-width: 30ch; }
.contact-lines { line-height: 2; }
.contact-lines a { text-decoration: none; }
.contact-lines a:hover { text-decoration: underline; }
.addr { color: var(--muted); }
.info .btn { margin-top: 1.2rem; }

/* -- footer ----------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 2.6rem; text-align: center; }
.footer .bm-script { font-family: var(--script); color: var(--red); font-size: 2rem; line-height: 1; }
.footer .f-tag { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: .2rem; }
.footer .f-meta { color: var(--muted); font-size: .9rem; margin-top: 1rem; line-height: 1.9; }
.footer .f-meta a { text-decoration: none; }
.demo-note { margin-top: 1rem; color: var(--muted); font-size: .8rem; opacity: .8; }

/* ==========================================================================
   Desktop
   ========================================================================== */
@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1.02fr .98fr; }
  .strip-grid { grid-template-columns: repeat(4, 1fr); }
  .strip-cell { border-bottom: 0 !important; border-right: 1px solid var(--line); }
  .strip-cell:last-child { border-right: 0; }
  .strip-cell:nth-child(odd) { border-right: 1px solid var(--line); }
  .split { grid-template-columns: 1fr 1fr; }
  .split.rev .txt { order: 2; }
  .pz-list { grid-template-columns: 1fr 1fr; gap: 1.05rem 3rem; }
  .deliver-grid { grid-template-columns: 1.15fr .85fr; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .hero-photo img { aspect-ratio: auto; height: clamp(360px, 92vw, 500px); }   /* desktop: original tall framed print */
  .hero-photo .photo-print { transform: rotate(-1.6deg); }
  .deliver-photo .photo-print { transform: rotate(1.4deg); }
}
@media (min-width: 1040px) {
  .lk-name { font-size: 6.6rem; }
}

/* ==========================================================================
   Motion — subtle CSS reveal, gated + reduced-motion safe (MOTION 3)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 26%;
    }
    @keyframes rise {
      from { opacity: 0; transform: translateY(22px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}
.photo-print img { transition: transform .5s cubic-bezier(.16,1,.3,1); }
.photo-print:hover img { transform: scale(1.02); }
