/* Reveal language (R5 home, 9 November 2026): the pre-states for js/lib/reveal.js (measured on dairyfoodbg.com, see
   .reanimate/dairy/spec.md). They exist only while scripting is on and motion is welcome; if the module never arrives a
   failsafe shows everything after 2.8 s; reduced motion gets the finished state at once. Prefix rv-. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  html.js:not(.rv-ready) [data-reveal], html.js:not(.rv-ready) [data-wipe], html.js:not(.rv-ready) [data-blur-title] { animation: rv-failsafe 1ms 2.8s forwards; }
  html.rv-ready [data-reveal]:not(.rv-in) { opacity: .01; }
  html.rv-ready [data-blur-title]:not(.rv-in):not(.m-split) { opacity: .01; }
  html.rv-ready [data-blur-title]:not(.rv-in) .m-w__in { opacity: 0; filter: blur(.45em); }
  html.rv-ready [data-wipe]:not(.rv-in) { clip-path: inset(0 100% 0 0); }
  html.rv-ready [data-wipe] [data-wipe-text]:not(.rv-in) { opacity: .01; }
}
@keyframes rv-failsafe { to { opacity: 1; clip-path: none; filter: none; } }
/* words and chars travel in the open (lines stay clipped by their word masks); a blurred word needs room too */
.rv-open .m-w { overflow: visible; }
[data-wipe] { will-change: clip-path; }
[data-win] { will-change: transform, opacity; }
[data-parallax="target"] { will-change: transform; }

/* the nav leaves on the way down and comes back on the way up (reveal.js adds .is-away) */
header.nv { transition: transform .3s cubic-bezier(.45, 0, .55, 1); }
header.nv.is-away { transform: translateY(-110%); }

/* small loops the reference keeps running: the scroll hint's bounce, a soft bob, a sway */
@keyframes rv-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@keyframes rv-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5.6px); } }
@keyframes rv-sway { 0%, 100% { rotate: -2.2deg; } 50% { rotate: 2.2deg; } }
.rv-bounce { animation: rv-bounce 2s ease-in-out infinite; }
.rv-bob { animation: rv-bob 2.6s ease-in-out infinite; }
.rv-sway { animation: rv-sway 3s ease-in-out infinite; transform-origin: 50% 100%; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-wipe], [data-blur-title], [data-blur-title] .m-w__in, [data-wipe-text] { opacity: 1 !important; filter: none !important; transform: none !important; clip-path: none !important; }
  header.nv { transition: none; }
  header.nv.is-away { transform: none; }
  .rv-bounce, .rv-bob, .rv-sway { animation: none; }
}
