/* A running wolf chases the rabbit in a dedicated, noninteractive strip. */
.page { padding-bottom: 48px; }
.chase-track {
  position: fixed; inset: auto 0 0; height: 48px; overflow: hidden;
  pointer-events: none; z-index: 1;
}
.animal-chase {
  position: absolute; left: -180px; bottom: 0; width: 170px; height: 48px;
  animation: wolf-rabbit-cycle 66s linear infinite;
}
.wolf { position: absolute; left: 0; bottom: 0; width: 84px; height: 48px; }
.wolf-gallop {
  transform-origin: 82px 48px;
  animation: wolf-bound .36s linear infinite;
}
.wolf-leg { transform-origin: 0 0; }
.wolf-hind { animation: wolf-hind-stride .36s linear infinite; }
.wolf-front { animation: wolf-front-stride .36s linear infinite; }
.wolf-knee { transform-origin: 0 15px; animation: wolf-knee-fold .36s linear infinite; }
.wolf-leg.far, .wolf-leg.far .wolf-knee { animation-delay: -.07s; }
.wolf-front .wolf-knee { animation-delay: -.12s; }
.wolf-front.far .wolf-knee { animation-delay: -.19s; }
.wolf-tail { transform-origin: 57px 47px; animation: wolf-tail-run .36s ease-in-out infinite; }
.wolf-shadow { transform-origin: 85px 84px; animation: wolf-ground-shadow .36s linear infinite; }
.rabbit { position: absolute; left: 112px; bottom: 0; width: 46px; height: 40px; }
.rabbit-hop { animation: rabbit-hop .32s ease-in-out infinite; }
.rabbit-feet { transform-origin: 47px 65px; animation: rabbit-feet .32s ease-in-out infinite; }
/* A 20-second chase, then a 46-second fox stroll. Inactive animals wait offscreen. */
@keyframes wolf-rabbit-cycle {
  0%, 100% { transform: translateX(0) scaleX(1); }
  12.121212% { transform: translateX(calc(100vw + 400px)) scaleX(1); }
  15.151515% { transform: translateX(calc(100vw + 400px)) scaleX(-1); }
  27.272727% { transform: translateX(0) scaleX(-1); }
  30.303030% { transform: translateX(0) scaleX(1); }
}
/* A gallop has a gathered airborne phase and an extended landing phase. */
@keyframes wolf-bound {
  0%, 100% { transform: translateY(0) rotate(1deg) scaleX(1.04); }
  25% { transform: translateY(-3px) rotate(-2deg) scaleX(.98); }
  50% { transform: translateY(-7px) rotate(-1deg) scaleX(.95); }
  75% { transform: translateY(-3px) rotate(2deg) scaleX(1.02); }
}
@keyframes wolf-hind-stride {
  0%, 100% { transform: rotate(42deg); }
  25% { transform: rotate(12deg); }
  50% { transform: rotate(-48deg); }
  75% { transform: rotate(-18deg); }
}
@keyframes wolf-front-stride {
  0%, 100% { transform: rotate(-48deg); }
  25% { transform: rotate(-12deg); }
  50% { transform: rotate(43deg); }
  75% { transform: rotate(12deg); }
}
@keyframes wolf-knee-fold {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-30deg); }
  50% { transform: rotate(-78deg); }
  75% { transform: rotate(-20deg); }
}
@keyframes wolf-tail-run {
  0%, 100% { transform: rotate(6deg); }
  50% { transform: rotate(-9deg); }
}
@keyframes wolf-ground-shadow {
  0%, 100% { transform: scaleX(1); opacity: .14; }
  50% { transform: scaleX(.8); opacity: .07; }
}
@keyframes rabbit-hop {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-8px); }
}
@keyframes rabbit-feet {
  0%, 100% { transform: rotate(0); }
  45% { transform: rotate(-13deg); }
}
@media (max-height: 600px) {
  .page { padding-bottom: 28px; }
  .chase-track { height: 28px; }
  .animal-chase { width: 100px; height: 28px; }
  .wolf { width: 49px; height: 28px; }
  .rabbit { left: 65px; width: 27px; height: 23px; }
}
@media (max-height: 450px) { .page footer { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .animal-chase { left: 18px; }
  .animal-chase, .animal-chase * { animation: none !important; }
}

.stroll-track { position:fixed; inset:auto 0 0; height:48px; overflow:hidden; pointer-events:none; z-index:1; }
.fox-stroll { position:absolute; left:-180px; bottom:0; width:170px; height:48px; animation:fox-stroll-cycle 66s linear infinite; }
.fox { position:absolute; left:0; bottom:0; width:75px; height:48px; }
.fox-body { animation:fox-walk-bob .6s ease-in-out infinite; }
.fox-tail { transform-origin:58px 49px; animation:fox-walk-tail 1.2s ease-in-out infinite alternate; }
.fox-leg { transform-origin:0 0; animation:fox-walk-step .6s ease-in-out infinite alternate; }
.fox-leg.opposite { animation-delay:-.6s; }
@keyframes fox-stroll-cycle {
  0%, 100% { transform:translateX(0) scaleX(1); }
  60.606061% { transform:translateX(calc(100vw + 400px)) scaleX(1); }
  65.151515% { transform:translateX(calc(100vw + 400px)) scaleX(-1); }
  95.454545% { transform:translateX(0) scaleX(-1); }
  100% { transform:translateX(0) scaleX(1); }
}
@keyframes fox-walk-step { from{transform:rotate(-22deg)} to{transform:rotate(22deg)} }
@keyframes fox-walk-bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-2px)} }
@keyframes fox-walk-tail { from{transform:rotate(-5deg)} to{transform:rotate(7deg)} }
@media(max-height:600px) {
  .stroll-track{height:28px}.fox-stroll{width:100px;height:28px}.fox{width:44px;height:28px}
}
@media(prefers-reduced-motion:reduce) {
  .fox-stroll{display:none}
  .fox-stroll,.fox-stroll *{animation:none!important}
}

/* The fox strolls straight through — no stops on the way. */

/* A heap of fallen autumn leaves the sweeper occasionally tidies up;
   between visits the pile quietly falls back in. */
.leaf-pile { position:fixed; left:calc(50vw + 44px); bottom:2px; width:44px; height:16px; pointer-events:none; z-index:1; }
.leaf-leaves { transform-origin:50% 92%; animation:leaf-cycle 66s linear infinite; }
@keyframes leaf-cycle {
  0% { opacity:0; transform:translateY(-8px); }
  12.121212% { opacity:1; transform:none; }
  55.303030% { opacity:1; transform:rotate(0); }
  55.681818% { transform:rotate(3deg) translateY(-1px); }
  56.060606% { transform:rotate(-2.5deg); }
  56.439394% { transform:rotate(2.5deg); }
  56.818182% { transform:rotate(-2deg); }
  57.196970% { transform:rotate(2deg); }
  57.575758% { transform:rotate(-1.5deg); }
  57.954545% { transform:rotate(.5deg); }
  58.333333% { opacity:1; transform:scale(1); }
  59.090909% { opacity:0; transform:scale(.55); }
  100% { opacity:0; transform:scale(.55); }
}
@media(max-height:600px){.leaf-pile{left:calc(50vw + 32px);width:30px;height:11px;bottom:1px}}
@media(prefers-reduced-motion:reduce){.leaf-pile .leaf-leaves{animation:none}}

.fox-cleaner{position:fixed;left:0;bottom:0;width:40px;height:48px;pointer-events:none;z-index:2;animation:cleaner-visit 66s linear infinite}
.cleaner-walk{animation:cleaner-bob .38s ease-in-out infinite}
.cleaner-boot{transform-origin:55px 94px;animation:cleaner-step .38s ease-in-out infinite alternate}
.cleaner-boot.right{animation-delay:-.38s}
.cleaner-sweep{transform-origin:20px 65px;animation:cleaner-sweep 66s linear infinite}
@keyframes cleaner-visit{
  0%,48.484848%{transform:translateX(calc(100vw + 80px))}
  55.303030%,58.333333%{transform:translateX(calc(50vw + 44px))}
  65.151515%,100%{transform:translateX(calc(100vw + 80px))}
}
@keyframes cleaner-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@keyframes cleaner-step{from{transform:rotate(-9deg)}to{transform:rotate(9deg)}}
@keyframes cleaner-sweep{
  0%,55.303030%{transform:rotate(0)}
  55.681818%{transform:rotate(22deg)}56.060606%{transform:rotate(-18deg)}
  56.439394%{transform:rotate(22deg)}56.818182%{transform:rotate(-18deg)}
  57.196970%{transform:rotate(22deg)}57.575758%{transform:rotate(-18deg)}
  57.954545%{transform:rotate(22deg)}58.333333%,100%{transform:rotate(0)}
}
@media(max-height:600px){.fox-cleaner{width:23px;height:28px}@keyframes cleaner-visit{0%,48.484848%{transform:translateX(calc(100vw + 80px))}55.303030%,58.333333%{transform:translateX(calc(50vw + 32px))}65.151515%,100%{transform:translateX(calc(100vw + 80px))}}}
@media(prefers-reduced-motion:reduce){.fox-cleaner{display:none;animation:none}.fox-cleaner *{animation:none!important}}
.cleanup-track{position:fixed;inset:auto 0 0;height:48px;overflow:hidden;pointer-events:none;z-index:2}
.fox-cleaner{position:absolute;overflow:visible}
@media(max-height:600px){.cleanup-track{height:28px}}
