.scene, .a3d { display: grid; }

.carousel-wrap{
  margin-top: 28px;
}

.mobile-carousel-wrap{
  display: none;
  margin-top: 18px;
}

.mobile-carousel{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 10px;
  overflow-x: auto;
  padding: 0 0 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}

.mobile-slide{
  margin: 0;
  scroll-snap-align: center;
}

.mobile-slide-image{
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 1.35rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  display: block;
}

.scene{
  width: 100%;
  min-height: 360px;
  overflow: hidden;
  perspective: 35em;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20% 80%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20% 80%, transparent);
}

.a3d{
  place-self: center;
  transform-style: preserve-3d;
  animation: ry 32s linear infinite;
}

@keyframes ry{
  to{ transform: rotateY(360deg); }
}

.card{
  --w: 17.5em;
  --ba: calc(1turn / var(--n));
  grid-area: 1 / 1;
  width: var(--w);
  aspect-ratio: 7 / 10;
  object-fit: cover;
  border-radius: 1.5em !important;
  backface-visibility: hidden;
  transform:
    rotateY(calc(var(--i) * var(--ba)))
    translateZ(calc(-1 * (0.5 * var(--w) + 0.5em) / tan(0.5 * var(--ba))));
}

@media (prefers-reduced-motion: reduce){
  .a3d{ animation-duration: 128s; }
}

@media (max-width: 560px){
  .card{ --w: 14.5em; }
}

@media (max-width: 768px){
  .carousel-wrap{
    display: none;
  }

  .mobile-carousel-wrap{
    display: block;
  }

  .mobile-carousel::-webkit-scrollbar{
    height: 8px;
  }

  .mobile-carousel::-webkit-scrollbar-thumb{
    background: rgba(197, 160, 89, 0.35);
    border-radius: 999px;
  }
}
