/* ==========================================================================
   SCHIACCIALERT — Novità: lingue, foto vere, schiacce che si aprono con un
   clic, promo, schiaccia dolce. Caricato dopo style.css (lo completa).
   ========================================================================== */

/* ---- selettore lingua ---- */
.lang { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; border: 1.5px solid currentColor; font-family: var(--f-mono); font-size: 12px; line-height: 1; flex: none; }
.lang svg { width: 15px; height: 15px; flex: none; }
.lang b { font-weight: 700; letter-spacing: .04em; }
.lang select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; color: #1A1210; }
.lang:focus-within { outline: 3px solid var(--yellow); outline-offset: 3px; }
.lang--footer { margin-top: 18px; }
@media (max-width: 900px) {
  .nav__status { display: none; }
  .nav .lang { margin-left: auto; }
}
html[data-lang="zh"] .manifesto__text, html[data-lang="ko"] .manifesto__text { letter-spacing: 0; line-height: 1.3; }
html[data-lang="ko"] body { word-break: keep-all; }
html[data-lang="ru"] .h-giant, html[data-lang="de"] .h-giant { font-size: clamp(44px, 9vw, 150px); }
html[data-lang="ru"] .nav__links, html[data-lang="de"] .nav__links, html[data-lang="fr"] .nav__links, html[data-lang="es"] .nav__links { gap: 16px; font-size: 14.5px; }

/* ---- manifesto: foto vere ---- */
.snaps { display: grid; grid-template-columns: 1.55fr 1fr 1fr; gap: clamp(12px, 2vw, 26px); align-items: center; margin-top: clamp(48px, 7vw, 90px); }
.snap { position: relative; margin: 0; background: #fff; padding: 10px 10px 0; border-radius: 6px; box-shadow: 0 26px 40px -24px rgba(26, 18, 16, .55), 0 0 0 1.5px rgba(26, 18, 16, .08); rotate: var(--r, 0deg); transition: rotate .5s var(--spring), scale .5s var(--spring), opacity .7s, transform .7s var(--ease); }
.snap:hover { rotate: 0deg; scale: 1.03; z-index: 2; }
.snap img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; }
.snap--b img, .snap--c img { aspect-ratio: 4 / 5; }
.snap--b img { object-position: 50% 30%; }
.snap figcaption { font-family: var(--f-hand); font-size: clamp(16px, 1.7vw, 22px); text-align: center; padding: 9px 4px 11px; color: var(--ink); }
.snap--a { --r: -2deg; }
.snap--b { --r: 2.5deg; margin-top: 30px; }
.snap--c { --r: -1.5deg; margin-top: -20px; }
.snap::before { content: ""; position: absolute; top: -11px; left: 50%; width: 92px; height: 24px; margin-left: -46px; background: rgba(255, 199, 44, .82); rotate: -3deg; box-shadow: 0 2px 4px rgba(0, 0, 0, .12); }
@media (max-width: 700px) {
  .snaps { grid-template-columns: 1fr 1fr; }
  .snap--a { grid-column: 1 / -1; }
  .snap--b, .snap--c { margin-top: 0; }
}

/* ---- anatomia: non più a scorrimento, si apre con un clic ---- */
.scene { height: auto; }
.scene__cta { opacity: 1; visibility: visible; }
.scene__stage { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.scene__hint { position: absolute; left: 0; right: 0; bottom: 9%; text-align: center; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); pointer-events: none; transition: opacity .3s; animation: hintPulse 1.8s ease-in-out infinite; }
.scene.is-open .scene__hint { opacity: 0 !important; animation: none; }
@keyframes hintPulse { 50% { translate: 0 -5px; } }
.scene .layer > .ing { transition: filter .3s; }
.scene.is-open .layer.is-active > .ing { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 75%, transparent)) brightness(1.06); }
.scene.is-static .scene__toggle, .scene.is-static .scene__hint { display: none; }
@media (max-width: 900px) {
  .scene { height: auto; }
  .scene__stage { padding-bottom: 170px; }
  .scene__hint { bottom: 150px; }
  .scene:not(.is-open) .scene__detail { opacity: 0; }
  .scene.is-open .scene__cta a { display: none; }
  .scene .scene__detail, .scene--cascata .scene__detail, .scene--tavola .scene__detail { bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) { .scene__hint { animation: none; } }

/* ---- menù: schede apribili, promo, oggi ---- */
button.mcard__art { display: block; width: calc(100% + 12px); border: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent; }
.mcard.is-open .stk__l { transform: translateY(calc(var(--y) + var(--d) * -13%)); }
.mcard--dolce { --c1: #FFE3EC; --c2: #F3A9C0; }
/* le dolci hanno un solo strato di crema: restano socchiuse, altrimenti da chiuse si vede solo il pane */
.mcard--dolce .stk__l { transform: translateY(calc(var(--y) + var(--d) * -11%)); }
.mcard--dolce:hover .stk__l, .mcard--dolce.is-open .stk__l { transform: translateY(calc(var(--y) + var(--d) * -24%)); }
.mcard__today { position: absolute; top: 20px; right: 22px; z-index: 2; font-family: var(--f-display); font-size: 15px; text-transform: uppercase; letter-spacing: .04em; background: var(--yellow); color: var(--ink); padding: 5px 10px 4px; border-radius: 8px; rotate: 5deg; box-shadow: 0 0 0 2px var(--ink); animation: todayPop 1.4s var(--spring) infinite alternate; }
@keyframes todayPop { to { rotate: -3deg; scale: 1.08; } }
.mcard__price--promo { color: var(--red); }
.mcard__price s { font-size: .62em; color: var(--muted); text-decoration-thickness: 2px; margin-right: 2px; }
.dolci__offer { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--ink); color: var(--cream); font-weight: 600; font-size: clamp(15px, 1.4vw, 17px); box-shadow: 4px 4px 0 var(--red); }
.dolci__offer span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; background: var(--yellow); color: var(--ink); padding: 5px 9px; border-radius: 999px; }
.chip--link { text-decoration: none; display: inline-flex; align-items: center; border-style: dashed; }
.promo { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); flex-wrap: wrap; margin: 0 0 28px; padding: 16px clamp(16px, 2.4vw, 28px); border-radius: var(--radius); background: var(--ink); color: var(--cream); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--yellow); position: relative; overflow: hidden; }
.promo[hidden] { display: none; }
.promo::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 10px, var(--ink) 10px 20px); }
.promo__tag { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; background: var(--yellow); color: var(--ink); padding: 6px 10px; border-radius: 8px; font-weight: 700; flex: none; }
.promo p { flex: 1 1 240px; font-size: clamp(17px, 1.8vw, 22px); line-height: 1.25; }
.promo p b { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; color: var(--yellow); font-size: 1.15em; }
.promo__price { font-family: var(--f-display); font-size: clamp(44px, 5vw, 68px); line-height: .9; color: var(--yellow); rotate: -4deg; flex: none; }
.promo.is-today { background: var(--red); }
.promo.is-today .promo__price { animation: todayPop 1.2s var(--spring) infinite alternate; }
.dolci { margin-top: clamp(56px, 8vw, 100px); padding: clamp(26px, 4vw, 48px); border-radius: calc(var(--radius) + 8px); background: radial-gradient(ellipse 80% 90% at 80% 0%, #FFE9EF, #F9D3C0 60%, #F2C39E); border: 2px solid var(--ink); position: relative; scroll-margin-top: calc(var(--nav-h) + 16px); }
.dolci__head { margin-bottom: 26px; max-width: 60ch; }
.dolci__head .h-display { font-size: clamp(38px, 5.4vw, 72px); margin-top: 8px; }
.dolci__head > p:last-child { margin-top: 12px; color: #5D4E45; font-size: clamp(16px, 1.5vw, 19px); }
.menu__grid--dolci { grid-template-columns: repeat(auto-fit, minmax(268px, 340px)); }
.menu__more { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (prefers-reduced-motion: reduce) { .mcard__today, .promo.is-today .promo__price { animation: none; } }

/* ---- il popolo: nastro di foto vere ---- */
.photoband { min-height: clamp(280px, 36vw, 480px); display: grid; align-content: start; gap: 12px; margin: calc(clamp(90px, 12vw, 150px) * -1 + 34px) 0 clamp(50px, 7vw, 90px); rotate: -1.6deg; scale: 1.04; }
.photoband__row { overflow: hidden; }
.photoband__row > div { display: flex; gap: 12px; width: max-content; animation: bandMove 70s linear infinite; }
.photoband__row--rev > div { animation-direction: reverse; animation-duration: 84s; }
.photoband:hover .photoband__row > div { animation-play-state: paused; }
.photoband img { height: clamp(130px, 17vw, 230px); width: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; display: block; background: var(--red-3); border: 3px solid var(--cream); box-shadow: 0 14px 26px -16px rgba(0, 0, 0, .7); }
@keyframes bandMove { to { transform: translateX(calc(-50% - 6px)); } }
@media (prefers-reduced-motion: reduce) { .photoband__row > div { animation: none; } }

/* ---- invito al gioco (gioco.html) ---- */
.gamecta { display: flex; align-items: center; gap: clamp(12px, 2vw, 22px); margin-top: clamp(30px, 4vw, 48px); padding: 18px clamp(16px, 2.4vw, 28px); border-radius: var(--radius); background: var(--yellow); color: var(--ink); text-decoration: none; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--red); transition: translate .25s var(--spring), box-shadow .25s; }
.gamecta:hover { translate: -3px -3px; box-shadow: 10px 10px 0 var(--red); }
.gamecta__tag { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; background: var(--ink); color: var(--yellow); padding: 6px 10px; border-radius: 8px; font-weight: 700; flex: none; rotate: -4deg; }
.gamecta__txt { flex: 1; min-width: 0; }
.gamecta__txt b { display: block; font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: clamp(22px, 2.8vw, 34px); line-height: 1; }
.gamecta__txt span { display: block; margin-top: 4px; font-size: 15.5px; }
.gamecta i { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font-style: normal; font-size: 20px; padding-left: 3px; }
@media (max-width: 600px) { .gamecta__tag { display: none; } }

/* niente scorrimento orizzontale su telefono (il nastro giallo inclinato sporgeva di qualche pixel) */
html { overflow-x: clip; }
