/* Repeatable animated raster props for the question screens (see props.js).
   Transform/opacity only; `will-change` on the layer, never on the instances.
   Reduced motion freezes the arrangement (the global base.css guards zero the loops;
   the explicit rules below also stop the props from looping under the in-page toggle). */

.question-props {
  position: absolute;
  inset: 0;
  z-index: 1; /* behind .scene__content (z-index 2) */
  overflow: hidden;
  pointer-events: none;
  --props-density: 1;
  will-change: transform;
}

.question-prop {
  position: absolute;
  left: calc(var(--x, 50) * 1%);
  top: calc(var(--y, 50) * 1%);
  width: var(--w, 60px);
  opacity: 0.9;
  /* Centred on the anchor; kept low-contrast so nothing competes with the copy. */
  transform: translate(-50%, -50%) scale(calc(var(--s, 1) * var(--props-density, 1)));
  transform-origin: 50% 82%;
}
.question-prop img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
}
.question-prop[data-anim='none'] {
  opacity: 0.8;
}

/* Motifs: transform/opacity only, staggered via --d. */
.question-prop[data-anim='bob'] {
  animation: bob 5s ease-in-out var(--d, 0s) infinite;
}
.question-prop[data-anim='sway'] {
  animation: sway 4.4s ease-in-out var(--d, 0s) infinite;
}
.question-prop[data-anim='drip'] {
  animation: drip 3.4s linear var(--d, 0s) infinite;
}
.question-prop[data-anim='rain'] {
  animation: rain 2.8s linear var(--d, 0s) infinite;
}
.question-prop[data-anim='seed-fall'] {
  animation: seed-fall 6s linear var(--d, 0s) infinite;
}
.question-prop[data-anim='crawl'] {
  animation: crawl 5s ease-in-out var(--d, 0s) infinite, bug-appear 3.6s ease-in-out var(--d, 0s) infinite;
}
.question-prop[data-anim='mow'] {
  animation: mow 6s ease-in-out var(--d, 0s) infinite;
}
.question-prop[data-anim='float'] {
  animation: prop-float 7s ease-in-out var(--d, 0s) infinite;
}

@keyframes sway {
  0%,
  100% {
    rotate: -4deg;
  }
  50% {
    rotate: 4deg;
  }
}
@keyframes drip {
  0% {
    translate: 0 -6px;
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    translate: 0 26px;
    opacity: 0;
  }
}
@keyframes rain {
  0% {
    translate: 0 -36px;
    opacity: 0;
  }
  22% {
    opacity: 0.85;
  }
  100% {
    translate: 0 150px;
    opacity: 0;
  }
}
@keyframes seed-fall {
  0% {
    translate: 0 -40px;
    rotate: 0deg;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    translate: 0 180px;
    rotate: 220deg;
    opacity: 0;
  }
}
@keyframes crawl {
  0%,
  100% {
    translate: 0 0;
  }
  25% {
    translate: 14px -3px;
  }
  50% {
    translate: 30px 0;
  }
  75% {
    translate: 14px 3px;
  }
}
@keyframes bug-appear {
  0%,
  100% {
    opacity: 0;
  }
  15%,
  78% {
    opacity: 1;
  }
}
@keyframes mow {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 46px 0;
  }
}
@keyframes prop-float {
  0%,
  100% {
    translate: 0 0;
    rotate: -3deg;
  }
  50% {
    translate: 10px -10px;
    rotate: 4deg;
  }
}

/* Reduced motion: static, evenly distributed arrangement (no loops). */
@media (prefers-reduced-motion: reduce) {
  .question-prop,
  .question-prop[data-anim] {
    animation: none !important;
    opacity: 0.85;
  }
}
body.motion-reduced .question-prop,
body.motion-reduced .question-prop[data-anim] {
  animation: none !important;
  opacity: 0.85;
}
