/* Trattoria da Nina — calda, di casa, carta e terracotta */
:root {
  --bg: #f3ebde;
  --surface: #fbf6ee;
  --surface-2: #ece1cf;
  --text: #2a2017;
  --muted: #74624f;
  --line: #ddcdb5;
  --accent: #b4532f;
  --accent-ink: #ffffff;
  --olive: #5c6b3a;
  --board: #2c332e;
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", system-ui, sans-serif;
  --wrap: 1180px;
}

body { font-size: 17px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(34px, 5vw, 56px); }
h2 em, h1 em { font-style: italic; color: var(--accent); }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--olive); margin-bottom: 14px;
}
.section { padding: clamp(64px, 10vw, 120px) 0; }
.lead { font-size: clamp(18px, 2vw, 20px); color: var(--muted); max-width: 56ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 1.5px solid var(--text);
  transition: transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--fill { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.logo b { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 26px; }
.logo small { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--accent); }
.top__tools { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button { border: 0; background: none; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.top .btn { min-height: 42px; padding: 0 18px; font-size: 15px; }
.burger { display: none; border: 0; background: none; width: 42px; height: 42px; padding: 0; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px auto; transition: transform .2s, opacity .2s; }

@media (max-width: 880px) {
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px; transform: translateY(-120%); transition: transform .25s;
    z-index: -1;
  }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
  .menu-open .nav { transform: none; }
  .burger { display: block; }
  .menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .burger span:nth-child(2) { opacity: 0; }
  .menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .top__in { gap: 12px; }
  .top__tools { margin-left: auto; }
}
@media (max-width: 420px) { .top .btn { padding: 0 14px; } .logo small { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(44px, 7.4vw, 96px); }
.hero .lead { margin: 22px 0 32px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__proof { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 32px; color: var(--muted); font-size: 15px; }
.hero__proof b { color: var(--text); }
.stars { color: #d4932b; letter-spacing: 2px; }
.hero__img { position: relative; }
.hero__img img {
  width: 100%; aspect-ratio: 1 / 1.05; max-height: 78vh; object-fit: cover; object-position: 38% 55%;
  border-radius: 200px 200px var(--radius) var(--radius);
  background: var(--surface-2);
}
.stamp {
  position: absolute; z-index: 2; left: -22px; bottom: 36px;
  width: 132px; height: 132px; border-radius: 50%;
  background: var(--olive); color: #f3ebde;
  display: grid; place-items: center; text-align: center;
  font-family: var(--font-display); font-style: italic; font-size: 16px; line-height: 1.15;
  transform: rotate(-10deg); box-shadow: 0 10px 30px rgba(42,32,23,.25);
}
.stamp b { display: block; font-size: 32px; font-style: normal; }
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__img { order: -1; }
  .hero__img img { aspect-ratio: 4 / 3; border-radius: 140px 140px var(--radius) var(--radius); }
  .stamp { left: auto; right: 12px; bottom: -28px; width: 108px; height: 108px; font-size: 14px; }
  .stamp b { font-size: 26px; }
}

/* ---------- lavagna ---------- */
.board-sec { padding-bottom: 0; }
.board {
  position: relative; border-radius: 10px; padding: 14px 14px 0;
  background: url(img/legno.webp) center / cover, #7b5a3c;
  box-shadow: 0 24px 60px rgba(42,32,23,.35), inset 0 0 0 1px rgba(255,255,255,.08), inset 0 -2px 0 rgba(0,0,0,.25);
}
.board__surface {
  position: relative; overflow: hidden; border-radius: 4px; color: #eef0ea;
  background: url(img/lavagna.webp) center / cover, #2c2f2c;
  box-shadow: inset 0 0 40px rgba(0,0,0,.6), inset 0 2px 6px rgba(0,0,0,.5);
  padding: clamp(24px, 5vw, 56px); min-height: 380px;
}
.board__menu { position: relative; display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px 40px; align-items: center; }
.board__title { font-family: "Caveat", cursive; font-size: clamp(46px, 6vw, 72px); line-height: 1; font-weight: 700; }
.board__date { font-family: "Caveat", cursive; font-size: 26px; color: #f6d77a; margin-top: 8px; grid-column: 1; }
.board__menu > div:first-child { grid-row: 1; }
.board__list { grid-column: 2; grid-row: 1 / span 2; list-style: none; margin: 0; padding: 0; font-family: "Caveat", cursive; font-size: clamp(27px, 3vw, 34px); }
.board__list li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px dashed rgba(238,240,234,.22); cursor: zoom-in; transition: color .2s; }
.board__list li:hover { color: #fff; }
.board__list li span:last-child { color: #f6d77a; white-space: nowrap; }
/* la scrittura: ogni riga si rivela da sinistra a scatti, come il gesso */
.board__title, .board__date, .board__list li { clip-path: inset(0 100% 0 0); }
.is-written .board__title, .is-written .board__date, .is-written .board__list li {
  animation: chalk-write 1.1s steps(16) forwards; animation-delay: calc(var(--i, 0) * .45s + .1s);
}
@keyframes chalk-write { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .board__title, .board__date, .board__list li { clip-path: none; animation: none !important; } }

.board__chalk { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: auto; }
.is-drawing .board__chalk { pointer-events: auto; touch-action: none; cursor: crosshair; }
.board[data-tool="text"] .board__chalk { cursor: text; }
.board[data-tool="eraser"] .board__chalk { cursor: cell; }
.is-wiping .board__chalk { transition: opacity .45s; opacity: 0; }
.board__invite {
  position: absolute; right: clamp(18px, 4vw, 48px); bottom: 10px; margin: 0;
  font-family: "Caveat", cursive; font-size: 24px; color: rgba(238,240,234,.55); transform: rotate(-3deg);
  transition: opacity .4s; pointer-events: none;
}
.is-drawing .board__invite, .has-drawing .board__invite { opacity: 0; }

/* foto del piatto attaccata con lo scotch */
.board__photo {
  position: absolute; right: clamp(14px, 3vw, 40px); top: 20px; width: 170px; margin: 0; z-index: 3;
  background: #fbf6ee; padding: 8px 8px 26px; box-shadow: 0 14px 30px rgba(0,0,0,.45);
  transform: rotate(var(--tilt, -3deg)) scale(.6); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .35s cubic-bezier(.2, 1.4, .4, 1);
}
.board__photo::before {
  content: ""; position: absolute; left: 50%; top: -10px; width: 70px; height: 22px; transform: translateX(-50%) rotate(-4deg);
  background: rgba(240,228,200,.75); box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.board__photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.board__photo.is-on { opacity: 1; transform: rotate(var(--tilt, -3deg)) scale(1); }
.board__type {
  position: absolute; z-index: 4; width: 220px; background: transparent; border: 0; border-bottom: 1px dashed rgba(238,240,234,.5);
  font: 700 38px/1.1 "Caveat", cursive; outline: none; padding: 0 4px;
}
.board__type::placeholder { color: rgba(238,240,234,.4); }

/* il vassoio di legno coi gessetti */
.board__tray { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 6px 14px; }
.chalk-stick {
  width: 46px; height: 14px; border: 0; border-radius: 3px; padding: 0; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 100%, #fff 30%), var(--c) 55%, color-mix(in srgb, var(--c) 80%, #000 20%));
  box-shadow: 0 3px 4px rgba(0,0,0,.35); transform: rotate(-2deg); transition: transform .2s;
}
.chalk-stick:nth-child(2n) { transform: rotate(3deg); }
.chalk-stick:hover { transform: translateY(-3px) rotate(-6deg); }
.chalk-stick[aria-pressed="true"] { transform: translateY(-6px) rotate(-12deg); box-shadow: 0 8px 10px rgba(0,0,0,.4), 0 0 0 2px #fbf6ee; }
.tray-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(251,246,238,.35); background: rgba(30,18,10,.35); color: #fbf6ee; font-size: 14px; font-weight: 600; cursor: pointer;
}
.tray-btn b { font-family: "Caveat", cursive; font-size: 20px; line-height: 1; }
.tray-btn[aria-pressed="true"] { background: #fbf6ee; color: #2a2017; }
.tray-btn[data-tool="text"] { margin-left: auto; }
.sponge i { width: 20px; height: 12px; border-radius: 2px; background: linear-gradient(#e8c06a 55%, #3d3a37 55%); }
@media (max-width: 760px) {
  .board { padding: 10px 10px 0; }
  .board__menu { grid-template-columns: 1fr; }
  .board__list { grid-column: 1; grid-row: auto; }
  .board__photo { width: 130px; }
  .tray-btn[data-tool="text"] { margin-left: 0; }
  .tray-btn { min-height: 40px; padding: 0 12px; }
}

/* ---------- storia ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.story__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius); background: var(--surface-2); }
.story p { color: var(--muted); }
.story h2 { margin-bottom: 20px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; border-top: 1px solid var(--line); padding-top: 24px; }
.facts b { display: block; font-family: var(--font-display); font-size: clamp(30px, 4vw, 40px); color: var(--accent); font-weight: 500; line-height: 1; }
.facts span { font-size: 14px; color: var(--muted); }
@media (max-width: 880px) { .story { grid-template-columns: 1fr; } }

/* ---------- menu ---------- */
.menu-sec { background: var(--surface); border-block: 1px solid var(--line); }
.menu-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 36px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.tabs button {
  flex: none; border: 1px solid var(--line); background: var(--bg);
  min-height: 42px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 15px;
}
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.menu-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.dishes { list-style: none; margin: 0; padding: 0; }
.dish { padding: 18px 0; border-bottom: 1px dashed var(--line); }
.dish__row { display: flex; align-items: baseline; gap: 10px; }
.dish__name { font-family: var(--font-display); font-size: 22px; font-weight: 500; }
.dish__dots { flex: 1; border-bottom: 2px dotted var(--line); transform: translateY(-5px); }
.dish__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.dish p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; margin-left: 4px; vertical-align: 3px; letter-spacing: .04em; }
.tag--v { background: #e3e8d3; color: var(--olive); }
.tag--gf { background: #f3dfcf; color: #8a4122; }
.menu-photo { position: sticky; top: 96px; }
.menu-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.menu-photo figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; font-style: italic; font-family: var(--font-display); }
.menu-legend { font-size: 14px; color: var(--muted); margin-top: 24px; }
@media (max-width: 880px) { .menu-body { grid-template-columns: 1fr; } .menu-photo { position: static; order: -1; } .menu-photo img { aspect-ratio: 16 / 10; } }

/* ---------- galleria ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 12px; margin-top: 40px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.gallery .g-wide { grid-column: span 2; }
.gallery .g-tall { grid-row: span 2; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; } .gallery .g-tall { grid-row: span 1; grid-column: span 2; } }

/* ---------- recensioni ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 0; }
.review blockquote { margin: 12px 0 18px; font-family: var(--font-display); font-size: 20px; line-height: 1.4; }
.review figcaption { font-size: 14px; color: var(--muted); }
.review figcaption b { color: var(--text); }
@media (max-width: 880px) { .reviews { grid-template-columns: 1fr; } }

/* ---------- prenota ---------- */
.book-sec { background: var(--surface-2); }
.book-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.book-grid h2 { margin-bottom: 16px; }
.book-aside p { color: var(--muted); }
.book-aside ul { padding: 0; list-style: none; margin: 24px 0 0; }
.book-aside li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.book-aside li::before { content: "✦"; color: var(--accent); }
#prenota { scroll-margin-top: 80px; }
@media (max-width: 880px) { .book-grid { grid-template-columns: 1fr; } }

/* ---------- dove siamo ---------- */
.where { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); }
.hours { width: 100%; border-collapse: collapse; margin-top: 24px; }
.hours td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours td:first-child { padding-right: 14px; }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours .closed td:last-child { color: var(--accent); font-weight: 700; }
.addr { font-family: var(--font-display); font-size: 24px; margin: 16px 0 4px; }
.map { width: 100%; min-height: 380px; height: 100%; border: 0; border-radius: var(--radius); filter: sepia(.35) saturate(.85); background: var(--surface-2); }
.where__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
@media (max-width: 880px) { .where { grid-template-columns: 1fr; } .map { min-height: 300px; } }

/* ---------- footer ---------- */
.foot { background: var(--text); color: #e9dfcf; padding: 56px 0 32px; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: end; }
.foot .logo small { color: #b9a68c; }
.foot a { color: #e9dfcf; }
.foot__links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot__credit { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(233,223,207,.15); font-size: 13px; color: #b9a68c; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.gw-credit { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-family: "Geist", system-ui, sans-serif; color: #b9a68c; }
.gw-credit b { color: #e9dfcf; font-weight: 800; }
.gw-credit:hover b { color: #8fd6ab; }

/* griglie: le colonne possono restringersi sotto il contenuto */
.book__grid > *, .book-grid > *, .where > *, .kitchen > *, .people > *, .drinks > *, .shop__in > *, .hero__grid > * { min-width: 0; }

/* ---------- la tavola si apparecchia ---------- */
.tavola { position: relative; height: 420vh; background: #3a271a; }
.tavola__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.tavola__stage { position: absolute; inset: 0; }
.tavola__stage canvas { width: 100%; height: 100%; display: block; }
.tavola__stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(26,16,10,.55) 100%); }
.tavola__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.tavola-off .tavola__fallback { opacity: 1; }
.tavola__caps { position: absolute; inset: 0; pointer-events: none; }
.tavola__caps::before { content: ""; position: absolute; inset: 0 0 auto; height: 45%; background: linear-gradient(rgba(26,16,10,.7), transparent); opacity: clamp(0, (var(--p, 0) - .78) * 8, 1); }
.tavola__cap {
  position: absolute; left: 50%; bottom: 9vh; margin: 0; transform: translate(-50%, 14px); opacity: 0;
  font-family: "Caveat", cursive; font-size: clamp(30px, 4.2vw, 46px); color: #fbf3e6; white-space: nowrap;
  text-shadow: 0 2px 18px rgba(20,10,5,.6); transition: opacity .5s, transform .5s;
}
.tavola__cap.is-on { opacity: 1; transform: translate(-50%, 0); }
.tavola__end {
  position: absolute; left: 0; right: 0; top: 9vh; text-align: center; padding: 0 16px;
  opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s;
}
.tavola__end.is-on { opacity: 1; transform: none; pointer-events: auto; }
.tavola__end h2 { color: #fbf3e6; font-size: clamp(32px, 5vw, 60px); margin-bottom: 22px; text-shadow: 0 2px 24px rgba(20,10,5,.6); }
.tavola__end h2 em { color: #f2c879; }
.tavola__next {
  position: absolute; left: 50%; bottom: calc(11vh + 12px); transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border-radius: 999px;
  border: 1px solid rgba(251,243,230,.35); background: rgba(30,18,10,.55); color: #fbf3e6;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 600 14px/1 "Karla", system-ui, sans-serif; cursor: pointer; transition: opacity .4s, transform .4s; white-space: nowrap;
}
.tavola__next:hover { background: rgba(30,18,10,.75); }
.tavola__ring { width: 40px; height: 40px; transform: rotate(-90deg); flex: none; }
.tavola__ring circle { fill: none; stroke: rgba(251,243,230,.25); stroke-width: 2.5; }
.tavola__ring .tavola__ring-p { stroke: #f2c879; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100 / .8); stroke-linecap: round; }
.tavola__arrow { position: absolute; left: 6px; width: 40px; text-align: center; font-size: 18px; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-3px); opacity: .7; } 50% { transform: translateY(4px); opacity: 1; } }
.is-done .tavola__next { opacity: 0; pointer-events: none; transform: translate(-50%, 12px); }
.tavola__cap { bottom: calc(11vh + 72px); }
@media (prefers-reduced-motion: reduce) { .tavola__arrow { animation: none; } }
.foot__3d { flex-basis: 100%; font-size: 12px; opacity: .75; }
@media (prefers-reduced-motion: reduce) { .tavola { height: auto; } .tavola__pin { position: relative; height: 80vh; } }

/* vapore sui piatti caldi: la tela copre la foto (posizione e angoli li mette steam.js) */
[data-steam] { position: relative; }
.steam { position: absolute; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .6s; }
.steam.is-on { opacity: 1; }
.board__surface { min-height: 460px; }
@media (max-width: 760px) { .board__surface { min-height: 520px; } }

/* grana da pellicola sopra la tavola: rende la scena più calda e rustica */
.tavola__pin::after {
  content: ""; position: absolute; inset: -50%; pointer-events: none; z-index: 1; opacity: .22; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .6s steps(4) infinite;
}
.tavola__stage::after { background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(26,16,10,.62) 100%), linear-gradient(rgba(120,70,30,.08), rgba(120,70,30,.08)); }
.tavola__caps { z-index: 2; }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-6%, 4%); } 50% { transform: translate(5%, -7%); } 75% { transform: translate(-3%, -4%); } 100% { transform: translate(4%, 6%); } }
@media (prefers-reduced-motion: reduce) { .tavola__pin::after { animation: none; } }

/* lavagna: modalità gestore + salva e condividi */
.board__chalk--owner { pointer-events: none !important; }
.is-written .board__chalk--owner { clip-path: inset(0 100% 0 0); animation: chalk-write 1.6s steps(20) forwards; }
.is-owner .board__chalk--owner { animation: none; clip-path: none; }
.board__list { transition: opacity .45s; }
.has-owner-menu .board__list, .is-owner .board__list { opacity: 0; pointer-events: none; }
.is-owner .board__chalk:not(.board__chalk--owner) { opacity: 0; }
.board__ribbon {
  position: absolute; left: 50%; top: 10px; transform: translate(-50%, -160%); margin: 0; z-index: 3; white-space: nowrap;
  background: #1f6b4a; color: #eafff3; font: 600 13px/1.2 "Geist", system-ui, sans-serif; padding: 8px 14px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35); transition: transform .35s; pointer-events: none;
}
.is-owner .board__ribbon { transform: translate(-50%, 0); }
.board__owner-btn {
  position: absolute; left: clamp(18px, 4vw, 48px); bottom: 12px; z-index: 3; display: inline-flex; gap: 6px; align-items: center;
  border: 1px dashed rgba(143,214,171,.6); background: rgba(20,40,30,.55); color: #bfeccf; border-radius: 999px;
  font: 600 13px/1 "Geist", system-ui, sans-serif; padding: 9px 14px; cursor: pointer;
}
.board__owner-btn:hover { background: rgba(31,107,74,.85); color: #fff; }
.is-owner .board__owner-btn { display: none; }
.tray-btn--owner { display: none; }
.is-owner .tray-btn--owner { display: inline-flex; }
.board:not(.has-owner-menu) [data-owner-reset] { display: none !important; }
.is-owner .tray-btn--share { display: none; }
.tray-btn--publish { background: #2f9e6a; border-color: #2f9e6a; color: #fff; }
.tray-btn--share { background: #fbf6ee; color: #2a2017; }
.board__toast {
  position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 20px); opacity: 0; z-index: 5;
  background: #fbf6ee; color: #2a2017; font: 600 14px/1.2 "Geist", system-ui, sans-serif; padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0,0,0,.35); transition: opacity .3s, transform .3s; pointer-events: none; white-space: nowrap;
}
.board__toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) {
  .board__ribbon { white-space: normal; text-align: center; width: max-content; max-width: 88%; font-size: 12px; }
  .board__invite { bottom: 54px; }
}

/* la lavagna appesa su un muro di assi di legno (al posto del panna) */
.board-sec {
  padding: clamp(56px, 8vw, 96px) 0;
  background: linear-gradient(rgba(30,16,8,.28), rgba(30,16,8,.42)), url(img/legno-tavolo.webp) center / cover, #4a2f1e;
  box-shadow: inset 0 18px 30px -18px rgba(0,0,0,.6), inset 0 -18px 30px -18px rgba(0,0,0,.6);
}
/* cornice più chiara del muro, così la lavagna si stacca */
.board { background: linear-gradient(rgba(214,160,96,.42), rgba(160,104,52,.42)), url(img/legno.webp) center / cover, #8a6440; box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 4px 10px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.12); }

/* ---------- fondo "premium caldo" (al posto del panna piatto) ----------
   carta da pane color caramello: sfumatura calda dall'alto verso il cotto, grana di carta fissa */
:root {
  --bg: #e7cda5;
  --surface: #f3e4c9;
  --surface-2: #dcc099;
  --line: #c9a77a;
  --muted: #6a4c33;
  --text: #2a1a10;
}
body {
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(255,240,214,.75), transparent 60%),
    radial-gradient(900px 700px at 100% 110%, rgba(176,92,48,.28), transparent 65%),
    linear-gradient(180deg, #ead2ab 0%, #e2c295 45%, #d9b182 100%);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .32; mix-blend-mode: multiply;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .4 0 0 0 0 .25 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .foot, .top { position: relative; z-index: 1; }
.top { position: sticky; background: color-mix(in srgb, #ecd6b2 88%, transparent); border-bottom-color: rgba(120,80,40,.25); }
.menu-sec { background: rgba(255,244,222,.38); border-block-color: rgba(120,80,40,.2); }
.book-sec { background: rgba(120,64,28,.1); }
.review { background: rgba(255,246,228,.6); border-color: rgba(120,80,40,.2); }
.tabs button { background: rgba(255,246,228,.6); }
.hero__img img, .story__img img { box-shadow: 0 24px 50px rgba(80,40,15,.28); }
.eyebrow { color: #4f5a2a; }

/* ---------- la lavagna è tutto il menu ---------- */
.board__surface { min-height: 600px; }
.board__menu { grid-template-columns: minmax(220px, .8fr) 1.6fr; align-items: start; gap: 18px 56px; }
.board__head { display: flex; flex-direction: column; gap: 6px; }
.board__date { margin-top: 0; }
.board__tabs { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 22px; }
.board__tab {
  border: 0; background: none; padding: 4px 2px; cursor: pointer; color: rgba(238,240,234,.55);
  font: 700 clamp(26px, 2.6vw, 32px)/1.1 "Caveat", cursive; position: relative; transition: color .2s;
}
.board__tab:hover { color: #eef0ea; }
.board__tab[aria-selected="true"] { color: #eef0ea; }
/* la sottolineatura a gesso sotto la linguetta scelta */
.board__tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: -6px; bottom: 2px; height: 3px; border-radius: 3px;
  background: #f6d77a; opacity: .85; transform: rotate(-1.5deg);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 7px, rgba(0,0,0,.55) 7px 9px); mask: repeating-linear-gradient(90deg, #000 0 7px, rgba(0,0,0,.55) 7px 9px);
}
.board__list { grid-column: 2; grid-row: 1; font-size: clamp(27px, 2.8vw, 34px); }
.board__list li { display: block; cursor: default; }
.board__list li[data-photo] { cursor: zoom-in; }
.board__row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.board__price { color: #f6d77a; white-space: nowrap; }
.board__desc { display: block; font-size: .66em; line-height: 1.15; color: rgba(238,240,234,.62); margin-top: 1px; }
.board__tag { font-size: .62em; color: #b9e0a5; }
.board__list li span:last-child { color: inherit; }
.board__list li .board__price { color: #f6d77a; }
.board__title, .board__date { clip-path: inset(0 100% 0 0); }
.is-written .board__title { animation: chalk-write .9s steps(14) forwards; }
.is-written .board__date { animation: chalk-write .8s steps(12) .3s forwards; }
.is-written .board__list li { animation-delay: calc(var(--i, 0) * .32s + .15s); }
/* menu scritto dal gestore: sostituisce solo la linguetta "Oggi" */
.board:not([data-tab="oggi"]) .board__chalk--owner { opacity: 0; }
.board:not([data-tab="oggi"]).has-owner-menu .board__list { opacity: 1; pointer-events: auto; }
.board:not([data-tab="oggi"]) .board__owner-btn { display: none; }
@media (max-width: 760px) {
  .board__surface { min-height: 640px; }
  .board__menu { grid-template-columns: 1fr; gap: 10px; }
  .board__tabs { flex-direction: row; flex-wrap: wrap; gap: 2px 14px; margin-top: 8px; }
  .board__tab { font-size: 25px; }
  .board__list { grid-column: 1; grid-row: auto; font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { .board__title, .board__date { clip-path: none; } }
.board .board__list li .board__row .board__price { color: #f6d77a; }
