/* Reveal-on-scroll states. JS (IntersectionObserver, animations.js) adds
   .is-in to flip these to their visible state. If JS never runs, the
   <noscript> override in <head> keeps everything visible.

   data-reveal flavours — each section mixes different ones so the page
   never repeats the same entrance:
     (default) rise   · fade · left · right · blur · clip · scale        */
[data-reveal], [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out), clip-path 1s var(--ease-out);
}
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-48px) rotate(-1.5deg); }
[data-reveal="right"] { transform: translateX(48px) rotate(1.5deg); }
[data-reveal="blur"] { transform: scale(1.04); filter: blur(14px); }
[data-reveal="scale"] { transform: scale(0.9); }
[data-reveal="clip"] {
  opacity: 1;
  transform: translateY(0.35em);
  clip-path: inset(0 0 100% 0);
}
[data-reveal].is-in, [data-reveal-group].is-in > * {
  opacity: 1;
  transform: none;
  filter: none;
  clip-path: inset(0 0 -10% 0);
}
[data-reveal-group] > *:nth-child(1) { transition-delay: 0.02s; }
[data-reveal-group] > *:nth-child(2) { transition-delay: 0.1s; }
[data-reveal-group] > *:nth-child(3) { transition-delay: 0.18s; }
[data-reveal-group] > *:nth-child(4) { transition-delay: 0.26s; }
[data-reveal-group] > *:nth-child(5) { transition-delay: 0.34s; }
[data-reveal-group] > *:nth-child(n+6) { transition-delay: 0.4s; }

/* hero title: words rise out of their line masks */
[data-split-lines] .line { overflow: hidden; display: inline-block; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
[data-split-lines] .line-inner { display: inline-block; transform: translateY(110%) rotate(4deg); transition: transform 1.1s var(--ease-out); }
[data-split-lines].is-in .line-inner { transform: none; }

/* season title: letters flip up one by one */
[data-chars] { perspective: 600px; }
[data-chars] .char-word { display: inline-block; white-space: nowrap; }
[data-chars] .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotateX(-80deg);
  transform-origin: 50% 100%;
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--ci) * 0.035s);
}
[data-chars].is-in .char { opacity: 1; transform: none; }

/* manifesto words: fallback (no GSAP) fades the whole block */
[data-words]:not(.is-scrubbed) { opacity: 0; transition: opacity 1.2s var(--ease-out); }
[data-words]:not(.is-scrubbed).is-in { opacity: 1; }

/* kitchen menu groups: heading underline draws in */
.kmenu__title { background: linear-gradient(var(--c-ink), var(--c-ink)) left bottom / 0% 2px no-repeat; border-bottom-color: transparent; transition: background-size 1s var(--ease-out); }
.kmenu__group.is-in .kmenu__title { background-size: 100% 2px; }

/* footer giant wordmark: rises up from below its baseline */
.site-footer__giant { transform: translateY(40%); opacity: 0; transition: transform 1.4s var(--ease-out), opacity 1.2s var(--ease-out); }
.site-footer__giant.is-in { transform: none; opacity: 1; }

[data-float] { animation: floatY 4.5s ease-in-out infinite; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-group] > *, [data-split-lines] .line-inner,
  [data-chars] .char, [data-words], .site-footer__giant,
  .menu-panel .menu-item, .menu-panel .kmenu__row, .gallery__item picture, .gallery__item img, .gallery__item figcaption, .gallery__item::after, .mc-card,
  .lunch-course > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  .lunch-course__rule { transform: none !important; }
  [data-float], .leaf svg { animation: none; }
}
