.drift-wall {
  position: relative;
  width: 100%;
  height: 620px;
  overflow: hidden;
  background: #f8f9fc;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  --tile-w: 240px;
  --tile-h: 160px;
  --tile-gap: 24px;
}

.drift-wall__plane {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max-content;
  min-width: 120%;
  display: flex;
  flex-direction: row;
  gap: var(--tile-gap);
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateX(12deg) rotateY(-6deg);
  will-change: transform;
}

.drift-wall__col {
  flex: 0 0 auto;
  width: var(--tile-w);
  display: flex;
  flex-direction: column;
  gap: var(--tile-gap);
  transform-style: preserve-3d;
}

.drift-wall__track {
  display: flex;
  flex-direction: column;
  gap: var(--tile-gap);
  will-change: transform;
}

.drift-wall__tile {
  display: block;
  width: var(--tile-w);
  height: var(--tile-h);
  flex: 0 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  opacity: 0.8;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.drift-wall__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.drift-wall__tile .dw-tile-title {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #111;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 0.3px;
  pointer-events: none;
}

.drift-wall__tile:hover {
  opacity: 1;
  transform: translateZ(60px) scale(1.06);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 25px 60px rgba(99, 102, 241, 0.35), 0 10px 24px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.drift-wall__tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(113, 196, 255, 0.08));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.drift-wall__tile:hover::after {
  opacity: 1;
}

/* Edge fade */
.drift-wall::before,
.drift-wall::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 100px;
  pointer-events: none;
  z-index: 5;
}
.drift-wall::before {
  top: 0;
  background: linear-gradient(to bottom, #f8f9fc, transparent);
}
.drift-wall::after {
  bottom: 0;
  background: linear-gradient(to top, #f8f9fc, transparent);
}

@media (max-width: 1024px) {
  .drift-wall { height: 520px; --tile-w: 180px; --tile-h: 120px; --tile-gap: 20px; }
}
@media (max-width: 768px) {
  .drift-wall { height: 440px; --tile-w: 140px; --tile-h: 96px; --tile-gap: 14px; }
  .drift-wall__plane { transform: translate(-50%, -50%) rotateX(12deg) rotateY(-4deg); }
}
@media (max-width: 480px) {
  .drift-wall { height: 360px; --tile-w: 110px; --tile-h: 76px; --tile-gap: 12px; }
  .drift-wall__plane { transform: translate(-50%, -50%) rotateX(10deg) rotateY(-3deg); }
}