/* =============================================================
   RÜM index — "Herramientas personalizadas" scroll-story
   Estilo Showroom: split-screen negro, texto editorial mínimo a la
   izquierda, panel de video a la derecha, snap por slide.
   ============================================================= */

.story-process{
  position:relative;
  width:100%;
  max-width:100%;
  margin-left:0;
  margin-right:0;
  z-index:3;
  isolation:isolate;
}
/* Una sola pantalla: el carrusel avanza con arrastre horizontal, no con scroll vertical. */
.story-process__room{
  height:100vh;
  height:100svh;
}
.story-process__stage{
  position:sticky;
  top:0;
  height:100vh;
  height:100svh;
  max-height:100dvh;
  width:100%;
  display:flex;
  align-items:stretch;
  background:#000;
  color:#fff;
  z-index:3;
  overflow:hidden;
  cursor:grab;
  touch-action:pan-y pinch-zoom;
  user-select:none;
}
.story-process__stage.is-dragging{
  cursor:grabbing;
}
.story-process__stage.is-dragging .story-process__cta,
.story-process__stage.is-dragging .story-process__lane{
  pointer-events:none;
}
/* Fundido de entrada/salida: suaviza la transición entre el fondo estelar
   de la página y el bloque negro del scroll-story. */
.story-process__stage::before,
.story-process__stage::after{
  content:"";
  position:absolute;
  left:0;right:0;
  height:110px;
  z-index:4;
  pointer-events:none;
}
.story-process__stage::before{
  top:0;
  background:linear-gradient(180deg, rgba(5,8,20,.9), transparent);
}
.story-process__stage::after{
  bottom:0;
  background:linear-gradient(0deg, rgba(5,8,20,.9), transparent);
}
.story-process__inner{
  position:relative;
  z-index:2;
  width:100%;
  height:100%;
  min-height:0;
  max-height:100%;
  display:grid;
  grid-template-columns:0.45fr 0.55fr;
}

/* ── Columna izquierda ── */
.story-process__left{
  position:relative;
  z-index:3;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:clamp(14px,2vh,20px);
  min-height:0;
  max-height:100%;
  overflow-x:hidden;
  /* visible: no crear scroll anidado que robe el wheel de la página */
  overflow-y:visible;
  padding:
    max(16px,calc(var(--rum-navbar-h,64px) + 10px))
    clamp(28px,5vw,72px)
    max(18px,env(safe-area-inset-bottom,0px));
  background:#000;
}
.story-process__eyebrow{
  font-size:0.68rem;
  font-weight:600;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:rgba(148,163,184,.9);
}
.story-process__intro{
  margin:-4px 0 2px;
  max-width:40ch;
  font-size:0.98rem;
  line-height:1.5;
  color:rgba(226,232,240,.82);
}
.story-process__intro strong{color:#fff;font-weight:600}

.story-process__lanes{
  display:flex;
  flex-wrap:wrap;
  gap:0 24px;
  border-bottom:1px solid rgba(255,255,255,.12);
  padding-bottom:12px;
}
.story-process__lane{
  padding:0 0 10px;
  border:0;
  background:none;
  color:rgba(148,163,184,.75);
  font:inherit;
  font-size:0.82rem;
  font-weight:500;
  cursor:pointer;
  user-select:none;
  position:relative;
  transition:color .2s ease;
}
.story-process__lane:hover{color:rgba(255,255,255,.88)}
.story-process__lane.is-active{
  color:#fff;
  font-weight:600;
}
.story-process__lane.is-active::after{
  content:"";
  position:absolute;
  left:0;right:0;
  bottom:-13px;
  height:2px;
  border-radius:999px;
  background:var(--accent-text,#f3d2b2);
}
.story-process__left,
.story-process__cta{
  user-select:text;
  cursor:auto;
}

.story-process__progress{display:flex;align-items:center;gap:14px}
.story-process__progress-track{
  flex:1;
  height:2px;
  border-radius:999px;
  background:rgba(255,255,255,.1);
  overflow:hidden;
}
.story-process__progress-fill{
  height:100%;
  width:0%;
  border-radius:inherit;
  background:var(--accent-text,#f3d2b2);
  transition:width .45s cubic-bezier(.22,1,.36,1);
}
.story-process__progress-num{
  flex:none;
  font-size:0.72rem;
  font-weight:500;
  letter-spacing:.06em;
  font-variant-numeric:tabular-nums;
  color:rgba(148,163,184,.9);
}

.story-process__slides{
  position:relative;
  flex:0 1 auto;
  min-height:clamp(120px,18vh,220px);
  min-width:0;
}
.story-process__slide{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  opacity:0;
  transform:translateY(18px);
  transition:opacity .55s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1);
  pointer-events:none;
  overflow:hidden;
}
.story-process__slide.is-active{opacity:1;transform:none;pointer-events:auto}
.story-process__slide-title{
  display:-webkit-box;
  margin:0;
  padding-bottom:.06em;
  font-family:'Baloo 2',system-ui,sans-serif;
  font-weight:700;
  font-size:clamp(1.25rem,2.2vw,1.95rem);
  line-height:1.18;
  letter-spacing:-.02em;
  color:#fff;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-clamp:2;
  overflow:hidden;
}
.story-process__slide-cat{
  display:block;
  flex:0 0 auto;
  margin-top:8px;
  margin-bottom:0;
  font-size:0.66rem;
  font-weight:600;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--accent-text,#f3d2b2);
}
.story-process__slide-cat:empty{
  display:none;
  margin:0;
}
.story-process__slide-desc{
  display:-webkit-box;
  margin:12px 0 0;
  max-width:40ch;
  font-size:clamp(0.88rem,1.15vw,1rem);
  line-height:1.55;
  color:rgba(255,255,255,.85);
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  line-clamp:3;
  overflow:hidden;
}
.story-process__slide-desc:empty{
  display:none;
  margin:0;
}

.story-process__actions{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:center;
  flex:0 0 auto;
  margin-top:clamp(16px,2.4vh,24px);
}
.story-process__cta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:14px 28px;
  border-radius:999px;
  border:0;
  font-family:'Baloo 2',system-ui,sans-serif;
  font-weight:800;
  font-size:0.95rem;
  text-decoration:none;
  color:#fff;
  background:var(--btn-grad,linear-gradient(180deg,#dbb896 0%,#d6b08c 48%,#c5a07d 100%));
  box-shadow:0 10px 28px -6px var(--btn-glow,rgba(214,176,140,.55)),inset 0 1px 0 rgba(255,255,255,.22);
  transition:transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.story-process__cta:hover,
.story-process__cta:focus-visible{
  transform:translateY(-1px);
  filter:brightness(1.04);
  box-shadow:0 14px 36px -4px rgba(214,176,140,.65),inset 0 1px 0 rgba(255,255,255,.28);
}
.story-process__cta--ghost{
  color:var(--accent-text,#ffd2ab);
  background:transparent;
  border:1px solid rgba(246,168,104,.55);
  box-shadow:none;
}
.story-process__cta--ghost:hover,
.story-process__cta--ghost:focus-visible{
  background:rgba(246,168,104,.12);
  border-color:#ffbe86;
  box-shadow:none;
  filter:none;
  transform:none;
}

/* ── Flechas para cambiar de mockup desde el panel izquierdo ── */
.story-process__pager{
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.story-process__pager-btn{
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  padding:0;
  border:1px solid rgba(255,255,255,.22);
  border-radius:999px;
  background:rgba(255,255,255,.04);
  color:#fff;
  font-size:1.65rem;
  line-height:1;
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease,opacity .2s ease,transform .2s ease;
}
.story-process__pager-btn span{
  display:block;
  margin-top:-2px;
}
.story-process__pager-btn:hover,
.story-process__pager-btn:focus-visible{
  background:rgba(246,168,104,.24);
  border-color:rgba(255,190,134,.72);
  outline:none;
  transform:scale(1.04);
}
.story-process__pager-btn:disabled{
  opacity:.28;
  cursor:not-allowed;
  pointer-events:none;
  transform:none;
}

/* ── Columna derecha: panel de media ── */
.story-process__right{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(20px,3vw,48px);
  background-color:#000;
}
.story-process__frame{
  position:relative;
  width:min(92%,720px);
  height:min(78vh,700px);
  border-radius:30px;
  overflow:hidden;
  box-shadow:0 32px 64px -20px rgba(0,0,0,.65);
}
.story-process__nav{
  position:absolute;
  top:50%;
  z-index:4;
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  margin-top:-23px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:999px;
  background:rgba(8,10,18,.62);
  color:#fff;
  font-size:1.65rem;
  line-height:1;
  cursor:pointer;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  transition:background .2s ease,border-color .2s ease,opacity .2s ease,transform .2s ease;
}
.story-process__nav span{
  display:block;
  margin-top:-2px;
}
.story-process__nav:hover,
.story-process__nav:focus-visible{
  background:rgba(246,168,104,.24);
  border-color:rgba(255,190,134,.72);
  outline:none;
  transform:scale(1.04);
}
.story-process__nav:disabled{
  opacity:.28;
  cursor:not-allowed;
  pointer-events:none;
  transform:none;
}
.story-process__nav--prev{left:14px}
.story-process__nav--next{right:14px}
.story-process__frame-hint{
  position:absolute;
  left:50%;
  bottom:16px;
  z-index:4;
  transform:translateX(-50%);
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(8,10,18,.72);
  color:rgba(255,255,255,.9);
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  white-space:nowrap;
  pointer-events:none;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  animation:rpFrameHintPulse 2.4s ease-in-out infinite;
}
.story-process__frame-hint-arrow{
  color:#f6a868;
  font-size:.9rem;
  line-height:1;
}
.story-process.is-hint-dismissed .story-process__frame-hint,
.story-process.is-hint-dismissed .story-process__hint{
  opacity:0;
  visibility:hidden;
  transition:opacity .35s ease,visibility .35s ease;
}
@keyframes rpFrameHintPulse{
  0%,100%{opacity:.78;transform:translateX(-50%)}
  50%{opacity:1;transform:translateX(calc(-50% + 4px))}
}
.story-process__stack{
  position:absolute;
  inset:0 auto 0 0;
  display:flex;
  width:calc(var(--rp-n,5) * 100%);
  height:100%;
  transition:transform .65s cubic-bezier(.22,1,.36,1);
  will-change:transform;
}
.story-process__shot{
  margin:0;
  flex:0 0 calc(100% / var(--rp-n,5));
  width:calc(100% / var(--rp-n,5));
  height:100%;
}
.story-process__shot video,
.story-process__shot img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  background:#050508;
  -webkit-transform:translateZ(0);
  transform:translateZ(0);
}

/* ── Hint de arrastre horizontal ── */
.story-process__hint{
  position:absolute;
  left:50%;
  bottom:20px;
  z-index:3;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  gap:10px;
  pointer-events:none;
}
.story-process__drag{
  display:flex;
  align-items:center;
  gap:8px;
  color:rgba(226,232,240,.72);
}
.story-process__drag-arrows{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:0.95rem;
  line-height:1;
  animation:rpDragArrows 2.2s ease-in-out infinite;
}
.story-process__drag-arrows span{
  display:block;
  width:18px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  position:relative;
}
.story-process__drag-arrows span:first-child::after,
.story-process__drag-arrows span:last-child::after{
  content:"";
  position:absolute;
  top:50%;
  width:6px;height:6px;
  border-top:2px solid currentColor;
  transform:translateY(-50%) rotate(45deg);
}
.story-process__drag-arrows span:first-child::after{
  left:-1px;
  border-left:2px solid currentColor;
  transform:translateY(-50%) rotate(-45deg);
}
.story-process__drag-arrows span:last-child::after{
  right:-1px;
  border-right:2px solid currentColor;
}
.story-process__hint-txt{
  font-size:0.74rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:600;
  color:rgba(226,232,240,.72);
}
@keyframes rpDragArrows{
  0%,100%{transform:translateX(0);opacity:.55}
  50%{transform:translateX(6px);opacity:1}
}

/* ── Responsive ── */
@media (max-height:820px) and (min-width:821px){
  .story-process__left{gap:clamp(10px,1.6vh,16px)}
  .story-process__slides{min-height:clamp(140px,20vh,200px)}
  .story-process__slide-title{font-size:clamp(1.15rem,2vw,1.75rem)}
}
@media (max-width:820px){
  .story-process__inner{
    grid-template-columns:1fr;
    grid-template-rows:auto 1fr;
    align-content:start;
    gap:0;
    padding-top:calc(var(--rum-navbar-h,46px) + 6px);
  }
  .story-process__right{
    order:1;
    padding:8px clamp(16px,5vw,28px) 10px;
    min-height:0;
  }
  .story-process__frame{
    width:100%;
    height:clamp(210px,40svh,360px);
    min-height:200px;
    border-radius:18px;
  }
  .story-process__stack,
  .story-process__shot{
    min-height:100%;
  }
  /* En móvil las capturas se ven completas; el recorte "cover" pierde UI/encuadre */
  .story-process__shot video,
  .story-process__shot img{
    object-fit:contain;
    background:#050508;
  }
  .story-process__left{order:2;justify-content:flex-start;padding:12px clamp(20px,6vw,32px) calc(14px + env(safe-area-inset-bottom,0px));gap:12px;min-height:0}
  .story-process__intro{display:none}
  .story-process__slides{flex:0 1 auto;min-height:140px}
  .story-process__slide-title{font-size:clamp(1.2rem,6vw,1.65rem)}
  .story-process__actions{margin-top:14px;gap:12px;flex-wrap:nowrap;justify-content:space-between}
  .story-process__cta{flex:1 1 auto;justify-content:center;min-width:0}
  .story-process__pager{flex:0 0 auto;gap:8px}
  .story-process__hint{
    display:flex;
    bottom:12px;
    padding:0 16px;
    width:100%;
    justify-content:center;
  }
  .story-process__nav{
    width:44px;
    height:44px;
    margin-top:-22px;
    font-size:1.45rem;
  }
  .story-process__pager-btn{
    width:44px;
    height:44px;
  }
  .story-process__nav--prev{left:10px}
  .story-process__nav--next{right:10px}
  .story-process__frame-hint{
    bottom:12px;
    font-size:.64rem;
    padding:7px 12px;
  }
}
/* Teléfonos angostos: el CTA + flechas no deben desbordar */
@media (max-width:400px){
  .story-process__cta{padding:13px 18px;font-size:0.9rem}
  .story-process__nav,
  .story-process__pager-btn{width:42px;height:42px;font-size:1.35rem}
}
@media (prefers-reduced-motion:reduce){
  .story-process__slide,
  .story-process__stack,
  .story-process__progress-fill{transition:none}
  .story-process__drag-arrows{animation:none}
  .story-process__frame-hint{animation:none}
}
