/* Castaways showcase ground + React Bits <DepthCarousel /> faithful CSS */

.naufragos-showcase {
  background: var(--p-inv-bg);
  color: var(--p-inv-ink);
  --bg: var(--p-inv-bg);
  --surface: var(--p-inv-surface);
  --ink: var(--p-inv-ink);
  --muted: var(--p-inv-muted);
  --line: color-mix(in oklab, var(--p-inv-ink) 16%, transparent);
  padding-top: var(--s-8);
  padding-bottom: var(--s-8);
  overflow-x: clip;
}

.naufragos-showcase .castaways-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}

.naufragos-showcase .castaways-head__copy h2 {
  color: var(--p-inv-ink);
}

.naufragos-showcase .castaways-head__copy p {
  margin-top: var(--s-2);
  color: var(--p-inv-muted);
  font-size: 16px;
}

.naufragos-showcase .castaways-skin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-3);
}

.castaways-skin-bar__label {
  font-size: 13px;
  color: var(--p-inv-muted);
}

.castaways-skin-bar .cast-skin-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.castaways-skin-bar .cast-skin-dot {
  margin: 0;
}

.naufragos-showcase .btn--secondary {
  background: var(--p-inv-surface);
  color: var(--p-inv-ink);
  border: 1px solid color-mix(in oklab, var(--p-inv-ink) 24%, transparent);
}

.naufragos-showcase .btn--secondary:hover {
  background: color-mix(in oklab, var(--p-inv-surface) 80%, var(--p-accent) 20%);
}

/* DepthCarousel */
.depth-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: var(--dc-perspective, 1400px);
  perspective-origin: 50% 50%;
  touch-action: pan-y;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.depth-carousel:active {
  cursor: grabbing;
}

.depth-carousel:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
  border-radius: 12px;
}

.depth-carousel__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.depth-carousel__card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  overflow: hidden;
  background: #0b0d12;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.65),
    0 8px 20px -10px rgba(0, 0, 0, 0.5);
  will-change: transform, opacity, filter;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.depth-carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.depth-carousel__tint {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.depth-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3000;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(18, 20, 26, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.depth-carousel__arrow:hover {
  background: rgba(28, 31, 40, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
}

.depth-carousel__arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.depth-carousel__arrow--prev {
  left: 16px;
}

.depth-carousel__arrow--next {
  right: 16px;
}

.depth-carousel__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 16, 22, 0.4);
  backdrop-filter: blur(6px);
}

.depth-carousel__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition:
    width 0.25s ease,
    background 0.25s ease;
}

.depth-carousel__dot.is-active {
  width: 20px;
  background: #fff;
}

@media (max-width: 639px) {
  #castaways-depth-carousel {
    height: 430px !important;
  }
  .depth-carousel__arrow--prev {
    left: 6px;
  }
  .depth-carousel__arrow--next {
    right: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .depth-carousel__card {
    will-change: auto;
  }
  .depth-carousel__arrow,
  .depth-carousel__dot {
    transition: none;
  }
}
