/* ==========================================================================
   PHOTO WALL — drifting columns of event photos as a page background.
   Vanilla CSS/JS port of a drift-wall effect: no build step on this site,
   so the animation runs on plain CSS keyframes rather than React state.
   ========================================================================== */

.wall {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--night);
  perspective: 1200px;
  perspective-origin: 50% 42%;
  -webkit-mask-image:
    radial-gradient(ellipse 80% 85% at 50% 46%, #000 55%, transparent 100%),
    linear-gradient(to top, #000 55%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(ellipse 80% 85% at 50% 46%, #000 55%, transparent 100%),
    linear-gradient(to top, #000 55%, transparent 100%);
  mask-composite: intersect;
}

.wall__plane {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: row;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) scale(1.22)
             rotateX(calc(15deg + var(--tilt-y))) rotateY(calc(-13deg + var(--tilt-x)))
             translateZ(-90px);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .wall__plane { transition: none; }
}

.wall__col {
  position: relative;
  width: calc(240px + 16px);
  transform-style: preserve-3d;
}

.wall__track {
  display: flex;
  flex-direction: column;
  animation-name: wall-drift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

.wall__tile {
  position: relative;
  width: 100%;
  height: calc(160px + 16px);
  flex: 0 0 auto;
}

/* Dimming happens on this container as a whole (not the image alone) so
   that hover can bring it up to full strength in one step, same mechanism
   as the reactbits original: opacity 0.55 -> 1 here, its dark overlay
   0.42 -> 0 below, at the same time. */
.wall__tile-inner {
  position: absolute;
  inset: 8px;
  border-radius: 20px;
  overflow: hidden;
  background: #0b0b12;
  opacity: 0.55;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.wall__tile-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92);
  transition: filter 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.wall__tile-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--night);
  opacity: 0.42;
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hover: the tile in question comes up to full opacity and lifts toward
   the viewer, same as the reactbits DriftWall's active-tile state. Its
   own column's drift pauses too, so there's actually time to look. */
.wall__tile:hover .wall__tile-inner {
  opacity: 1;
  transform: translateZ(64px);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.7);
  z-index: 5;
}
.wall__tile:hover .wall__tile-inner img {
  filter: saturate(1.05);
}
.wall__tile:hover .wall__tile-inner::after {
  opacity: 0;
}
.wall__col:has(.wall__tile:hover) .wall__track {
  animation-play-state: paused;
}

@keyframes wall-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .wall__track { animation-play-state: paused; }
}
