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

.story-process{
  position:relative;
  width:100vw;
  margin-left:calc(50% - 50vw);
  z-index:3;
  isolation:isolate;
}
/* ~72vh de recorrido por slide: se cruza la sección más rápido sin perder el snap. */
.story-process__room{
  height:calc((var(--rp-n,5) - 1) * 72vh + 100vh);
  height:calc((var(--rp-n,5) - 1) * 72svh + 100svh);
}
.story-process__stage{
  position:sticky;
  top:0;
  height:100vh;
  height:100svh;
  width:100%;
  display:flex;
  align-items:center;
  background:#000;
  color:#fff;
  z-index:3;
  overflow:hidden;
}
/* 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%;
  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:center;
  gap:20px;
  padding:clamp(28px,4vw,64px) clamp(28px,5vw,72px);
  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;
  color:rgba(148,163,184,.75);
  font:inherit;
  font-size:0.82rem;
  font-weight:500;
  cursor:default;
  user-select:none;
  position:relative;
}

.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;min-height:clamp(220px,30vh,300px)}
.story-process__slide{
  position:absolute;
  inset:0;
  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;
}
.story-process__slide.is-active{opacity:1;transform:none;pointer-events:auto}
.story-process__slide-cat{
  display:block;
  margin-bottom:12px;
  font-size:0.68rem;
  font-weight:600;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--accent-text,#f3d2b2);
}
.story-process__slide-title{
  margin:0;
  font-family:'Baloo 2',system-ui,sans-serif;
  font-weight:700;
  font-size:clamp(1.85rem,3.6vw,2.85rem);
  line-height:1.12;
  letter-spacing:-.02em;
  color:#fff;
}
.story-process__slide-desc{
  margin:16px 0 0;
  max-width:40ch;
  font-size:clamp(0.95rem,1.3vw,1.05rem);
  line-height:1.6;
  color:rgba(255,255,255,.85);
}
.story-process__slide-desc:empty{
  display:none;
  margin:0;
}

.story-process__actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:4px}
.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;
}

/* ── Columna derecha: panel de media con rejilla ── */
.story-process__right{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(20px,3vw,48px);
  background-color:#000;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size:3.5rem 3.5rem;
}
.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__stack{
  position:absolute;
  inset:0;
  transition:transform .65s cubic-bezier(.22,1,.36,1);
  will-change:transform;
}
.story-process__shot{margin:0;width:100%;height:100%}
.story-process__shot video,
.story-process__shot img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* ── Hint de scroll ── */
.story-process__hint{
  position:absolute;
  left:50%;
  bottom:20px;
  z-index:3;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.story-process__mouse{
  width:24px;height:38px;
  border:2px solid rgba(226,232,240,.7);
  border-radius:13px;
  display:flex;
  justify-content:center;
  padding-top:6px;
  box-sizing:border-box;
}
.story-process__wheel{
  width:3px;height:7px;
  border-radius:3px;
  background:rgba(226,232,240,.9);
  animation:rpWheel 1.8s ease-in-out infinite;
}
.story-process__hint-txt{
  font-size:0.74rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:600;
  color:rgba(226,232,240,.72);
}
@keyframes rpWheel{
  0%{opacity:0;transform:translateY(-3px)}
  35%{opacity:1}
  70%{opacity:1;transform:translateY(7px)}
  100%{opacity:0;transform:translateY(9px)}
}

/* ── Responsive ── */
@media (max-width:820px){
  .story-process__inner{
    grid-template-columns:1fr;
    grid-template-rows:auto 1fr;
    align-content:center;
    gap:12px;
  }
  .story-process__right{
    order:1;
    padding:calc(var(--rum-navbar-h,56px) + 12px) clamp(20px,6vw,32px) 8px;
    background-size:2.4rem 2.4rem;
  }
  .story-process__frame{width:100%;height:32vh;border-radius:22px}
  .story-process__left{order:2;justify-content:flex-start;padding:8px clamp(20px,6vw,32px) 24px;gap:14px}
  .story-process__intro{display:none}
  .story-process__slides{min-height:220px}
  .story-process__hint{display:none}
}
@media (prefers-reduced-motion:reduce){
  .story-process__slide,
  .story-process__stack,
  .story-process__progress-fill{transition:none}
  .story-process__wheel{animation:none}
}
