/* Creative Wall — dual-fan 3D slider (Melius GIF style) */
.creative-wall {
  --cw-bg: #ffffff;
  --cw-serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-top: 48px;
  margin-bottom: 8px;
  padding: 40px 0 36px;
  background-color: var(--cw-bg);
  background-image: radial-gradient(rgba(0, 0, 0, 0.07) 0.8px, transparent 0.8px);
  background-size: 14px 14px;
  overflow: hidden;
  text-align: center;
}

/* Full-bleed on desktop without causing mobile horizontal scroll */
@media (min-width: 1025px) {
  .creative-wall {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

.creative-wall__inner {
  width: min(100% - 32px, 1100px);
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.creative-wall__title {
  font-family: var(--cw-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 5.5vw, 5.1rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #111;
  margin: 0 auto 20px;
  max-width: 18ch;
}

.creative-wall__stage {
  position: relative;
  height: clamp(420px, 58vw, 680px);
  perspective: 1600px;
  perspective-origin: 50% 48%;
  touch-action: none;
  cursor: grab;
  margin: 4px 0 8px;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}
.creative-wall__stage.is-dragging { cursor: grabbing; }

.creative-wall__track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

/* Soft center origin / vanishing preview */
.cw-focus {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(78px, 8.5vw, 118px);
  height: clamp(110px, 13vw, 168px);
  transform: translate(-50%, -50%) translateZ(-260px) scale(0.9);
  border-radius: 12px;
  overflow: hidden;
  z-index: 5;
  opacity: 0.62;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
.cw-focus__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
}
.cw-focus__img.is-shown {
  opacity: 1;
}

.cw-card {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 14px;
  overflow: hidden;
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform, opacity, width, height;
  pointer-events: none;
  backface-visibility: hidden;
}
.cw-card.is-spawning {
  filter: blur(0.4px);
}
.cw-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border: 0;
}

@media (max-width: 768px) {
  .creative-wall {
    margin-top: 28px;
    padding: 24px 0 20px;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .creative-wall__title {
    font-size: clamp(2.1rem, 7vw, 3.6rem);
    margin-bottom: 14px;
  }
  .creative-wall__stage {
    height: clamp(280px, 78vw, 420px);
  }
  .cw-card { border-radius: 12px; }
}

@media (max-width: 480px) {
  .creative-wall {
    padding: 20px 0 16px;
    margin-top: 22px;
  }
  .creative-wall__title {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }
  .creative-wall__stage {
    height: clamp(240px, 72vw, 360px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cw-card,
  .cw-focus {
    transition: none !important;
  }
}
