/* ============================================================
   RAYNE3XL — coverflow.css · carrusel 3D del Archivo
   ============================================================ */

.cf {
  --cf-card: clamp(200px, 30vw, 380px);
  position: relative;
  width: 100%;
}

.cf__frame {
  position: relative;
  cursor: grab;
  overflow: hidden;
  /* aire vertical para que la sombra no se corte */
  padding-block: clamp(2rem, 5vw, 3.4rem);
  outline: none;
  touch-action: pan-y;              /* el drag horizontal es nuestro */
  -webkit-tap-highlight-color: transparent;
}
.cf__frame:active { cursor: grabbing; }
.cf__frame:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: var(--radius); }

.cf__stage {
  position: relative;
  height: var(--cf-card);
  transform-style: preserve-3d;
  user-select: none;
}

.cf__card {
  position: absolute;
  left: 50%;
  top: 0;
  margin: 0;
  width: var(--cf-card);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: var(--black-3);
  will-change: transform, opacity;
  cursor: pointer;
  box-shadow:
    0 30px 60px -22px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(247, 243, 234, 0.07);
  transition: box-shadow var(--fast);
}
.cf__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  filter: saturate(0.82) brightness(0.68);
  transition: filter 0.5s var(--ease);
}
/* la del centro se enciende */
.cf__card.is-center img { filter: saturate(1.06) brightness(1); }
.cf__card.is-center {
  box-shadow:
    0 34px 70px -20px rgba(0, 0, 0, 1),
    0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
    0 0 60px -14px color-mix(in srgb, var(--accent) 42%, transparent);
}
/* barrido de luz sobre el cristal */
.cf__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(247,243,234,0.13) 50%, transparent 58%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.cf__card.is-center .cf__shine { opacity: 1; }

/* ---------- flechas ---------- */
.cf__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(13, 13, 13, 0.62);
  backdrop-filter: blur(10px);
  color: var(--cream);
  transition: background var(--fast), border-color var(--fast), transform var(--fast) var(--ease);
}
.cf__nav svg { width: 22px; height: 22px; }
.cf__nav:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cf__nav--prev { left: clamp(0.25rem, 2vw, 1.5rem); }
.cf__nav--next { right: clamp(0.25rem, 2vw, 1.5rem); }

/* ---------- caption ---------- */
.cf__caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  margin-top: clamp(0.6rem, 2vw, 1.4rem);
  min-height: 4.2rem;
  padding-inline: 1rem;
}
.cf__cat {
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.cf__title {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.cf__counter {
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--cream-faint);
}
.cf__hint {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
  font-family: var(--font-label);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-faint);
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .cf { --cf-card: 62vw; }
  .cf__nav { width: 44px; height: 44px; }
  .cf__nav svg { width: 19px; height: 19px; }
  .cf__nav--prev { left: 0.15rem; }
  .cf__nav--next { right: 0.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cf__card, .cf__card img, .cf__shine { transition: none !important; }
}
