/* ================================================
   NimbleAI — showcase.css
   "Real videos. Real results." floating reel wall
   ================================================ */

.showcase-section {
  position: relative;
  overflow: hidden;
}

/* Ambient gold glow behind the grid, matches the brand accent */
.showcase-section::before {
  content: '';
  position: absolute;
  top: 6%;
  left: 50%;
  width: 1100px;
  height: 1100px;
  background: radial-gradient(circle, rgba(212, 161, 74, 0.10), transparent 65%);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.showcase-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 64px;
  padding: 10px 0 30px;
}

.showcase-item {
  display: flex;
  justify-content: center;
}

/* Organic, staggered vertical offsets so the grid feels handcrafted, not boxy */
.showcase-item:nth-child(2)  { transform: translateY(38px); }
.showcase-item:nth-child(3)  { transform: translateY(-16px); }
.showcase-item:nth-child(4)  { transform: translateY(22px); }
.showcase-item:nth-child(5)  { transform: translateY(-12px); }
.showcase-item:nth-child(6)  { transform: translateY(30px); }
.showcase-item:nth-child(7)  { transform: translateY(-22px); }
.showcase-item:nth-child(8)  { transform: translateY(14px); }
.showcase-item:nth-child(9)  { transform: translateY(-18px); }
.showcase-item:nth-child(10) { transform: translateY(26px); }
.showcase-item:nth-child(11) { transform: translateY(-8px); }
.showcase-item:nth-child(12) { transform: translateY(18px); }

/* ─── CARD ─── */
.showcase-card {
  position: relative;
  width: 100%;
  max-width: 250px;
  aspect-ratio: 9 / 16;
  border-radius: 32px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(212, 161, 74, 0.16);
  box-shadow:
    0 24px 60px -28px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: showcase-float 7s ease-in-out infinite;
  transition:
    transform .55s cubic-bezier(.22, 1, .36, 1),
    box-shadow .55s ease,
    border-color .55s ease;
  will-change: transform;
}

/* Vary float rhythm per card so nothing moves in sync */
.showcase-item:nth-child(3n)  .showcase-card { animation-duration: 8s;   animation-delay: -2.4s; }
.showcase-item:nth-child(3n+1) .showcase-card { animation-duration: 6.4s; animation-delay: -1s;   }
.showcase-item:nth-child(3n+2) .showcase-card { animation-duration: 7.6s; animation-delay: -3.6s; }

@keyframes showcase-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(-0.35deg); }
}

.showcase-card:hover {
  transform: translateY(-16px) scale(1.045);
  border-color: rgba(212, 161, 74, 0.55);
  box-shadow:
    0 34px 80px -28px rgba(212, 161, 74, 0.35),
    0 0 0 1px rgba(212, 161, 74, 0.12) inset;
  animation-play-state: paused;
  z-index: 5;
}

/* ─── VIDEO ─── */
.showcase-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(160deg, #1a1a20, #0c0c10);
  transition: transform 1.4s cubic-bezier(.22, 1, .36, 1);
}

.showcase-card:hover .showcase-video {
  transform: scale(1.07);
}

/* ─── OVERLAYS ─── */
.showcase-overlay-top,
.showcase-overlay-bottom {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 2;
}

.showcase-overlay-top {
  top: 0;
  height: 64px;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.55), transparent);
}

/* ─── LIVE PULSE DOT ─── */
.showcase-pulse {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D4A14A;
  z-index: 3;
  box-shadow: 0 0 0 0 rgba(212, 161, 74, 0.55);
  animation: showcase-pulse 2.6s infinite;
}

@keyframes showcase-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(212, 161, 74, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(212, 161, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 161, 74, 0); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .showcase-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .showcase-item:nth-child(n) { transform: none; }
  .showcase-item:nth-child(3n+2) { transform: translateY(24px); }
  .showcase-item:nth-child(3n)   { transform: translateY(-14px); }
}

@media (max-width: 760px) {
  .showcase-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 56vw;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 18px;
    margin-top: 44px;
    padding: 6px 4px 22px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .showcase-grid::-webkit-scrollbar { display: none; }

  .showcase-item {
    transform: none !important;
    scroll-snap-align: center;
  }

  .showcase-card {
    max-width: none;
    animation: none;
  }

  .showcase-card:hover {
    transform: none;
  }

  .showcase-card:hover .showcase-video {
    transform: none;
  }
}

@media (max-width: 480px) {
  .showcase-grid {
    grid-auto-columns: 70vw;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .showcase-card {
    animation: none;
  }
  .showcase-pulse {
    animation: none;
  }
  .showcase-video {
    transition: none;
  }
}
