/* Scroll FX: fade + zoom in on enter, fade + zoom out on leave (both directions).
   Classes are added by assets/js/scroll-fx.js, so without JS everything stays visible. */
main {
  overflow-x: clip;
}

.sfx {
  opacity: 0;
  transform: scale(0.86);
  transition:
    opacity 0.8s ease,
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--sfx-delay, 0s);
  will-change: opacity, transform;
}
.sfx.sfx-left  { transform: translateX(-60px) scale(0.92); }
.sfx.sfx-right { transform: translateX(60px) scale(0.92); }
.sfx.sfx-up    { transform: translateY(50px) scale(0.92); }

/* Award columns: a stronger side slide (left column from the left, right from the right).
   Higher specificity, so they also slide back out sideways when leaving. */
.sfx[data-sfx-dir].sfx-left  { transform: translateX(-120px) scale(0.9); }
.sfx[data-sfx-dir].sfx-right { transform: translateX(120px) scale(0.9); }
.sfx[data-sfx-dir].sfx-in    { transform: none; }

/* Leaving past the top of the screen: zoom out slightly larger as it fades */
.sfx.sfx-above { transform: scale(1.08); }

.sfx.sfx-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .sfx,
  .sfx.sfx-left,
  .sfx.sfx-right,
  .sfx.sfx-up,
  .sfx.sfx-above {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
