/* ============================================================
   WSPOMINAMY — ikony / portrety 70s–2000s
   PL + rock · disco · pop · jazz · italo · punk · pop-rock
   Wtopione w tło · delikatne zanikanie krawędzi · kalejdoskop
   ============================================================ */

.wspominamy-section {
  position: relative;
  margin: 1.6rem auto 2.2rem;
  padding: 0 0 0.4rem;
  max-width: 1180px;
  overflow: visible;
}

.wspominamy-section .section-title {
  margin-bottom: 1.1rem;
  letter-spacing: 0.08em;
}

.wspominamy-sub {
  text-align: center;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.92rem;
  font-weight: 600;
  margin: -0.4rem 0 1.35rem;
  letter-spacing: 0.04em;
}

/* ——— 4 sloty w jednej linii ——— */
.wspominamy-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
  z-index: 2;
  padding: 0 6px;
}

.wspominamy-slot {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
  /* prawie bez ramki — wtopione w tło */
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.28),
    0 0 40px color-mix(in srgb, var(--accent) 8%, transparent);
  transform: translateZ(0);
  transition:
    box-shadow 0.45s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  /* delikatne zanikanie CAŁEGO slotu w tło (maska krawędzi) */
  -webkit-mask-image: radial-gradient(
    ellipse 92% 88% at 50% 48%,
    #000 42%,
    rgba(0, 0, 0, 0.85) 62%,
    rgba(0, 0, 0, 0.35) 82%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 92% 88% at 50% 48%,
    #000 42%,
    rgba(0, 0, 0, 0.85) 62%,
    rgba(0, 0, 0, 0.35) 82%,
    transparent 100%
  );
}

.wspominamy-slot:hover {
  transform: translateY(-6px) scale(1.025);
  box-shadow:
    0 0 36px color-mix(in srgb, var(--accent2) 30%, transparent),
    0 18px 44px rgba(0, 0, 0, 0.42);
  -webkit-mask-image: radial-gradient(
    ellipse 96% 92% at 50% 48%,
    #000 48%,
    rgba(0, 0, 0, 0.9) 70%,
    rgba(0, 0, 0, 0.45) 88%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 96% 92% at 50% 48%,
    #000 48%,
    rgba(0, 0, 0, 0.9) 70%,
    rgba(0, 0, 0, 0.45) 88%,
    transparent 100%
  );
}

/* warstwa zdjęcia + crossfade */
.wspominamy-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.wspominamy-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  image-rendering: -webkit-optimize-contrast;
  filter:
    contrast(1.06)
    saturate(1.08)
    brightness(0.9);
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.1s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.6s ease;
  will-change: opacity, transform;
  pointer-events: none;
  user-select: none;
}

.wspominamy-img.is-visible {
  opacity: 1;
  transform: scale(1);
}

.wspominamy-img.is-leaving {
  opacity: 0;
  transform: scale(0.96);
  filter: contrast(1.05) saturate(0.9) brightness(0.65) blur(2px);
}

/* miękka winieta + zanikanie krawędzi (warstwa na zdjęciu) */
.wspominamy-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  background:
    /* krawędzie → transparent (wtopienie w tło strony) */
    linear-gradient(
      90deg,
      rgba(5, 5, 16, 0.72) 0%,
      transparent 14%,
      transparent 86%,
      rgba(5, 5, 16, 0.72) 100%
    ),
    linear-gradient(
      180deg,
      rgba(5, 5, 16, 0.55) 0%,
      transparent 18%,
      transparent 62%,
      rgba(5, 5, 16, 0.75) 100%
    ),
    radial-gradient(
      ellipse 80% 70% at 50% 38%,
      transparent 30%,
      rgba(0, 0, 0, 0.38) 100%
    );
  mix-blend-mode: multiply;
  opacity: 0.92;
}

/* subtelny accent glow u dołu — też miękko zanikający */
.wspominamy-slot::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 42%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    0deg,
    color-mix(in srgb, var(--accent) 20%, transparent),
    transparent 75%
  );
  opacity: 0.45;
  border-radius: 0 0 20px 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

/* ambient particles / magic behind row */
.wspominamy-magic {
  position: absolute;
  inset: -20px -10px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.wsp-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(36px);
  opacity: 0.22;
  animation: wspOrbFloat 11s ease-in-out infinite;
}
.wsp-orb.o1 {
  width: 160px;
  height: 160px;
  left: 8%;
  top: 20%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}
.wsp-orb.o2 {
  width: 130px;
  height: 130px;
  right: 10%;
  bottom: 10%;
  background: radial-gradient(circle, var(--accent2) 0%, transparent 70%);
  animation-duration: 13s;
  animation-delay: -4s;
}
.wsp-orb.o3 {
  width: 100px;
  height: 100px;
  left: 42%;
  top: 55%;
  background: radial-gradient(circle, var(--accent3, #ff00ff) 0%, transparent 70%);
  animation-duration: 9s;
  animation-delay: -2s;
}

@keyframes wspOrbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.18;
  }
  50% {
    transform: translate(12px, -10px) scale(1.12);
    opacity: 0.32;
  }
}

/* loading shimmer */
.wspominamy-slot.is-loading .wspominamy-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(255, 255, 255, 0.06) 45%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: wspShimmer 1.4s ease-in-out infinite;
}

@keyframes wspShimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .wspominamy-row {
    gap: 12px;
  }
  .wspominamy-slot {
    border-radius: 16px;
  }
}

@media (max-width: 640px) {
  .wspominamy-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 10px;
  }
  .wspominamy-slot {
    aspect-ratio: 3 / 3.6;
    border-radius: 14px;
  }
  .wspominamy-sub {
    font-size: 0.82rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 380px) {
  .wspominamy-row {
    gap: 8px 6px;
  }
}

body.rdm-mobile .wspominamy-magic {
  opacity: 0.65;
}
