/* ERA Sushi: style warstwy ruchu (assets/js/ruch.js)
   Klasa .ruch na <html> ustawia skrypt w <head> zawsze (decyzja właściciela: także przy ograniczeniu
   ruchu w systemie), chyba że gość wyłączył animacje przyciskiem w stopce (localStorage „era-ruch” = „nie”).
   Bez tej klasy cała treść jest widoczna i nieruchoma. */

/* ---------- Odsłanianie przy przewijaniu ---------- */
.ruch .ods {
  opacity: 0; transform: translateY(34px);
  transition: opacity .9s var(--ease) var(--opozn, 0ms), transform 1.1s var(--ease) var(--opozn, 0ms);
}
.ruch .ods.widac { opacity: 1; transform: none; }

/* Nagłówki słowo po słowie */
.slowo { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.slowo > span { display: inline-block; }
.ruch .slowa .slowo > span {
  transform: translateY(110%) rotate(4deg); transform-origin: 0 100%;
  transition: transform 1s var(--ease) calc(var(--opozn, 0ms) + var(--i, 0) * 75ms);
}
.ruch .slowa.widac .slowo > span { transform: none; }

/* ---------- Pasek postępu pod nagłówkiem (przewijanie strony, bez JS) ---------- */
@supports (animation-timeline: scroll()) {
  .ruch .naglowek::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: linear-gradient(90deg, var(--zloto-jasne), var(--fiolet));
    transform-origin: 0 50%; transform: scaleX(0);
    animation: postep linear both; animation-timeline: scroll(root);
  }
}
@keyframes postep { to { transform: scaleX(1); } }

/* ---------- Pierwszy ekran (wejście tytułu i unoszenie talerza: style.css) ---------- */
.ruch .hero__zdjecie { transition: transform .2s linear; will-change: transform; }
@keyframes unos { from { translate: 0 0; } to { translate: 0 -12px; } }
/* tło przesuwa się wolniej niż strona, więc przejście w kolor sekcji przenosimy na sam .hero */
.ruch .hero__tlo::after { display: none; }
.ruch .hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(237, 220, 243, 0), var(--ryz));
}

/* ---------- Płatki ---------- */
.platki { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.platki--przod { z-index: 4; }
.platek { position: absolute; top: 0; left: 0; height: auto; opacity: 0; will-change: transform; }
.platki--przod .platek { filter: blur(2.5px); }
/* w lunchach płatki spadają z girlandy i znikają nad kartami */
.lunche .platki {
  z-index: auto; bottom: auto; height: min(100%, 1150px);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

/* Tablet: girlanda w lunchach w proporcji 16:9, bez pustego pasa pod kwiatami */
@media (min-width: 600px) and (max-width: 899px) { .lunche__film { aspect-ratio: 16 / 9; margin-bottom: -2rem; } }

/* ---------- Wstęga z kategoriami ---------- */
main { overflow-x: clip; } /* przekrzywiona wstęga nie może poszerzać strony (clip nie psuje position: sticky) */
.wstega {
  position: relative; z-index: 2; overflow: hidden;
  background: var(--sliwka); color: var(--na-ciemnym);
  border-block: 1px solid rgba(214, 190, 140, .4);
  padding-block: clamp(.8rem, 1.6vw, 1.15rem);
  transform: rotate(-1.2deg); width: 104%; margin: -.9rem 0 -.9rem -2%;
  box-shadow: 0 14px 30px rgba(41, 26, 59, .18);
}
.wstega__tor { display: flex; width: max-content; }
.wstega__czesc { display: flex; align-items: center; flex: none; gap: clamp(1.1rem, 2.4vw, 2.1rem); padding-right: clamp(1.1rem, 2.4vw, 2.1rem); }
.wstega__czesc span { font-family: var(--f-tytul); font-size: clamp(1.45rem, 2.6vw, 2.15rem); line-height: 1.15; white-space: nowrap; }
.wstega__czesc span:nth-of-type(even) { color: var(--zloto-jasne); }
.wstega__czesc img { width: clamp(22px, 2vw, 28px); height: auto; opacity: .85; }
.ruch .wstega__tor { animation: wstega 60s linear infinite; }
.ruch .wstega:hover .wstega__tor { animation-play-state: paused; }
@keyframes wstega { to { transform: translateX(-50%); } }

/* ---------- Pasek dań („Nie tylko zestawy”) ---------- */
.skrot__glowa { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1rem, 2.5vw, 2rem); }
.skrot__glowa .skrot__tytul { margin-bottom: 0; }
.tasma__strzalki { display: flex; gap: .5rem; flex: none; }
.tasma__strzalka {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--fiolet); background: none; color: var(--fiolet);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.tasma__strzalka:hover { background: var(--fiolet); color: #fff; }
.tasma__strzalka .ikona { width: 1.3em; height: 1.3em; }
.tasma {
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  padding-inline: max(var(--margines), calc((100vw - var(--max)) / 2 + var(--margines)));
  padding-block: 1.25rem 1.75rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.tasma::-webkit-scrollbar { display: none; }
.ruch .tasma { scroll-snap-type: none; }
.tasma .pokaz { display: flex; gap: clamp(1.25rem, 3vw, 2.75rem); width: max-content; margin: 0; }
.tasma .pokaz__poz { flex: 0 0 clamp(205px, 21vw, 290px); scroll-snap-align: start; }
.tasma .pokaz__poz:nth-child(even) { padding-top: clamp(1rem, 2.5vw, 2.25rem); }
.tasma .pokaz__danie:hover .wycinek, .tasma .pokaz__danie:focus-visible .wycinek { transform: translateY(-8px) rotate(-2deg) scale(1.03); }
@media (max-width: 899px) {
  .tasma { -webkit-mask-image: none; mask-image: none; }
  .tasma__strzalka { width: 44px; height: 44px; }
}

/* ---------- Lot zdjęcia do koszyka ---------- */
.lot-do-koszyka {
  position: fixed; z-index: 90; pointer-events: none; object-fit: cover;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  filter: drop-shadow(0 14px 18px rgba(41, 26, 59, .3));
}

/* ---------- Drobne ożywienia ---------- */
.ruch .zestaw-polka .wycinek { transition: transform .6s var(--ease), filter .6s var(--ease); }
.ruch .zestaw-polka__przycisk:hover .wycinek { transform: translateY(-10px) rotate(-1.2deg); filter: drop-shadow(0 34px 34px rgba(41, 26, 59, .22)) drop-shadow(0 6px 8px rgba(41, 26, 59, .12)); }
.ruch .lunch__foto:hover .wycinek { transform: translateY(-8px) rotate(1deg); }
.ruch .kroki li .kroki__nr { transition: transform .5s var(--ease), background-color .3s; }
.ruch .kroki li:hover .kroki__nr { transform: rotate(-8deg) scale(1.08); }

/* ---------- Przełącznik animacji w stopce ---------- */
.stopka__ruch {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .3rem .9rem;
  border: 1px solid rgba(214, 190, 140, .45); border-radius: 999px; background: none; color: var(--na-ciemnym);
  font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
}
.stopka__ruch:hover { background: rgba(244, 238, 251, .1); }
.stopka__ruch .ikona { width: 1em; height: 1em; }
html:not(.js) .stopka__ruch { display: none; }

@media print {
  .ruch .ods, .ruch .slowa .slowo > span { opacity: 1 !important; transform: none !important; }
  .platki, .wstega { display: none; }
}
