/* ==========================================================================
   3D COVERFLOW SHOWCASE & MANIFESTO SCROLL REVEAL (SELECTED WORK)
   ========================================================================== */

.work-section {
  background: #ECECEF !important;
  padding: clamp(60px, 8vh, 100px) 0 clamp(90px, 12vh, 140px) 0;
  position: relative;
  overflow: hidden;
  color: #0D0E12;
}

.work-showcase-wrapper {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

/* --------------------------------------------------------------------------
   MANIFESTO SCROLL REVEAL (TEXTO QUE SE ENCIENDE AL SCROLLEAR)
   -------------------------------------------------------------------------- */
.manifesto-scroll-reveal-container {
  max-width: 1140px;
  margin: clamp(40px, 6vh, 80px) auto clamp(70px, 12vh, 140px) auto;
  padding: 0 var(--page-padding);
  text-align: left;
}

.manifesto-reveal-paragraph {
  font-family: var(--font-primary);
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.025em;
  margin: 0;
  color: #0D0E12;
}

/* Cada palabra inicia en gris sutil y se ilumina a negro pleno conforme scrolleas */
.manifesto-word {
  display: inline-block;
  color: rgba(13, 14, 18, 0.18);
  transition: color 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.25s ease;
  will-change: color;
  margin-right: 0.22em;
}

.manifesto-word.is-lit {
  color: #0D0E12;
}

/* --------------------------------------------------------------------------
   SELECTED WORK HEADER
   -------------------------------------------------------------------------- */
.work-header {
  padding: 0 var(--page-padding);
  margin-bottom: clamp(35px, 5vh, 60px);
}

.work-header .section-display-title {
  color: #0D0E12;
  font-family: var(--font-primary);
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0;
}

/* --------------------------------------------------------------------------
   3D COVERFLOW STAGE
   -------------------------------------------------------------------------- */
.coverflow-stage {
  position: relative;
  width: 100%;
  height: clamp(500px, 60vh, 700px);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  -webkit-perspective: 1400px;
  overflow: visible;
  padding-bottom: 30px;
}

/* Floor Ambient Shadow beneath the 3D cards */
.coverflow-floor-shadow {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 78%;
  max-width: 960px;
  height: 95px;
  background: radial-gradient(ellipse 65% 55% at 50% 50%, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.14) 45%, transparent 75%);
  filter: blur(16px);
  pointer-events: none;
  z-index: 1;
}

.coverflow-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

/* CARD ELEMENT — Aspect Ratio 1.50 para que las fotos se vean COMPLETAS sin cortes */
.coverflow-card {
  position: absolute;
  width: clamp(540px, 58vw, 840px);
  height: clamp(365px, 39vw, 560px);
  border-radius: 22px;
  overflow: hidden;
  background: #111115;
  box-shadow: 0 32px 64px -14px rgba(0, 0, 0, 0.48), 0 16px 32px -16px rgba(0, 0, 0, 0.28);
  transition: transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1), 
              opacity 0.85s ease, 
              filter 0.85s ease,
              box-shadow 0.85s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform, opacity;
  top: 50%;
  left: 50%;
  margin-top: calc(-1 * clamp(365px, 39vw, 560px) / 2);
  margin-left: calc(-1 * clamp(540px, 58vw, 840px) / 2);
}

.coverflow-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Encuadre exacto por producto para que NUNCA queden cortadas las partes importantes */
.coverflow-card[data-index="0"] .coverflow-img {
  object-position: center 25%; /* Alma Andina: tapa, botella completa, uvas y mesa de mármol */
}

.coverflow-card[data-index="1"] .coverflow-img {
  object-position: center center; /* Finca Altura: caja, taza humeante y cápsulas completas sin corte */
}

.coverflow-card[data-index="2"] .coverflow-img {
  object-position: center center; /* El Holandés Errante: encuadre completo */
}

.coverflow-card[data-index="3"] .coverflow-img {
  object-position: center center; /* ZenSweet: sachets completos sin corte */
}

.coverflow-card[data-index="4"] .coverflow-img {
  object-position: center center; /* Coca-Cola: lata completa con tapa y base sin corte */
}

.coverflow-card[data-index="5"] .coverflow-img {
  object-position: center 50%; /* Nuts: las 3 bolsas y frutos secos completos sin corte */
}

/* CARD OVERLAY */
.coverflow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(0, 0, 0, 0.44) 0%, 
    rgba(0, 0, 0, 0.05) 30%, 
    rgba(0, 0, 0, 0.12) 55%, 
    rgba(0, 0, 0, 0.84) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 3.2vw, 40px);
  color: #FFFFFF;
  pointer-events: none;
  box-sizing: border-box;
}

/* TOP META */
.coverflow-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-primary);
  font-size: clamp(0.8rem, 1.05vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.coverflow-counter {
  color: #FFFFFF;
}

.coverflow-meta {
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* BOTTOM META */
.coverflow-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--font-primary);
  width: 100%;
  gap: 16px;
}

.coverflow-title-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.coverflow-title {
  font-size: clamp(1.9rem, 3.2vw, 3.2rem);
  font-weight: 500;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.coverflow-subtitle {
  font-size: clamp(0.85rem, 1.1vw, 1.05rem);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* CTA WITH EXTENDED LINE */
.coverflow-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #FFFFFF;
  font-size: clamp(0.75rem, 0.95vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cta-line {
  width: clamp(35px, 4.5vw, 55px);
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
  display: inline-block;
}

.cta-text {
  color: #FFFFFF;
}

/* PAGINATION DOTS */
.coverflow-pagination {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 10;
}

.coverflow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(13, 14, 18, 0.22);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.coverflow-dot.is-active {
  width: 24px;
  border-radius: 12px;
  background: #0D0E12;
}

/* MOBILE ADAPTATION */
@media (max-width: 768px) {
  .manifesto-scroll-reveal-container {
    padding: 40px 20px 30px 20px;
  }

  .manifesto-reveal-paragraph {
    font-size: 1.55rem;
    line-height: 1.35;
  }

  .coverflow-stage {
    height: 420px;
    perspective: 1000px;
  }

  .coverflow-card {
    width: 86vw;
    height: 58vw;
    min-height: 290px;
    border-radius: 16px;
    margin-top: calc(-1 * clamp(290px, 58vw, 380px) / 2);
    margin-left: -43vw;
  }

  .coverflow-title {
    font-size: 1.6rem;
  }

  .coverflow-top, .coverflow-subtitle, .coverflow-cta {
    font-size: 0.72rem;
  }

  .cta-line {
    width: 24px;
  }

  .coverflow-overlay {
    padding: 18px;
  }
}
