/* ============================================================
   RÜM SCROLL STORY — Immersive 3D Landing
   ============================================================ */

/* ─── Story base ──────────────────────────────────────────── */
.story-wrap {
  position: relative;
  z-index: 1;
  perspective: none;
  transform-style: flat;
  background: transparent;
}
.story-chapter {
  position: relative;
  width: 100%;
  background: transparent;
}

/* ─── Shared story atoms ──────────────────────────────────── */
.story-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand);
  background: rgba(246,168,104,.1);
  border: 1px solid rgba(246,168,104,.28);
  padding: 5px 14px;
  border-radius: 100px;
}
.story-badge::before,
.story-badge::after {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--brand);
  opacity: .6;
}
.story-section-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.7rem, 3.6vw, 3.1rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.025em;
  text-align: center;
  line-height: 1.08;
  margin-top: 14px;
}

/* ─── Act 0: Video Hero ───────────────────────────────────── */
.story-hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.story-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: .82;
  filter: saturate(.88) brightness(.88);
}
.story-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(2,3,10,.08) 0%,
    rgba(2,3,10,.28) 42%,
    rgba(2,3,10,.72) 78%,
    rgba(2,3,10,.94) 100%
  );
}
.story-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  padding: 0 24px;
  padding-top: 72px;
}
.story-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  line-height: 1.55;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.story-hero__eyebrow {
  margin-bottom: 24px;
  opacity: 1;
  transform: translateY(12px);
  animation: storyHeroIn .7s cubic-bezier(.2,.8,.2,1) .35s forwards;
}
.story-hero__title {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(2.5rem, 5.8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.03;
  color: #fff;
  letter-spacing: -.028em;
  margin-bottom: 12px;
  text-shadow: 0 2px 28px rgba(2,3,10,.75);
  opacity: 1;
  transform: translateY(22px);
  animation: storyHeroIn .95s cubic-bezier(.2,.8,.2,1) .65s forwards;
}
.story-hero__subhead {
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  font-weight: 600;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.88);
  letter-spacing: -.01em;
  margin: 0 auto 20px;
  max-width: 36ch;
  text-shadow: 0 1px 16px rgba(2, 3, 10, 0.55);
  opacity: 1;
  transform: translateY(14px);
  animation: storyHeroIn .85s cubic-bezier(.2,.8,.2,1) .88s forwards;
}
.story-hero__sub {
  font-size: clamp(0.92rem, 1.55vw, 1.08rem);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.68);
  letter-spacing: 0;
  text-transform: none;
  max-width: 52ch;
  margin: 0 auto 44px;
  opacity: 1;
  transform: translateY(16px);
  animation: storyHeroIn .8s cubic-bezier(.2,.8,.2,1) 1.15s forwards;
}
/* Texto interior naranja RÜM (gradiente como contador / marca) */
.story-hero__inner {
  font-weight: 700;
  color: var(--brand, #f6a868);
  background: linear-gradient(140deg, #fff8f0 0%, var(--brand, #f6a868) 42%, #ff8f4a 78%, #ff6a2a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 22px rgba(246, 168, 104, 0.38));
}
.story-hero__subhead.story-hero__inner,
.story-hero__sub.story-hero__inner {
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 42ch;
}
.story-hero__subhead.story-hero__inner {
  margin: 0 auto 14px;
}
.story-hero__sub.story-hero__inner {
  margin: 0 auto 44px;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .story-hero__inner {
    -webkit-text-fill-color: currentColor;
    background: none;
    filter: none;
    text-shadow: 0 0 28px rgba(246, 168, 104, 0.45);
  }
}
.story-hero__cta-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 1;
  transform: translateY(14px);
  animation: storyHeroIn .7s cubic-bezier(.2,.8,.2,1) 1.35s forwards;
}
.story-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.story-hero__cta--primary {
  background: var(--brand);
  color: #09101f;
}
.story-hero__cta--primary:hover {
  background: var(--accent-text);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(246,168,104,.3);
}
.story-hero__cta--ghost {
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.82);
}
.story-hero__cta--ghost:hover {
  border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.07);
}
.story-hero__scroll-cue {
  position: absolute;
  bottom: max(22px, env(safe-area-inset-bottom, 0px) + 18px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 1;
  animation: storyHeroCueIn .6s ease 2.1s forwards;
}
.story-hero__scroll-cue-text {
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}
.story-hero__scroll-line {
  display: block;
  width: 2px;
  height: 44px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(246, 168, 104, 0.95) 0%,
    rgba(246, 168, 104, 0.35) 55%,
    rgba(246, 168, 104, 0) 100%
  );
  transform-origin: top center;
  animation: storyHeroScrollLine 2.4s ease-in-out infinite 2.4s;
}
@keyframes storyHeroScrollLine {
  0%, 100% { opacity: 0.55; transform: scaleY(0.72); }
  50% { opacity: 1; transform: scaleY(1); }
}
/* Evita doble línea vertical hero + conector (se veía cortada y desfasada) */
.story-hero + .story-connector {
  display: none;
}

/* ─── Act 3: La causa (tres universos) ──────────────────────── */
.story-chaos {
  position: relative;
}
.story-chaos__scroll-room {
  height: 300vh;
  position: relative;
  overflow: visible;
}
.story-chaos__pin {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  overflow: visible;
  background: transparent;
  display: flex;
  align-items: stretch;
  justify-content: center;
  perspective: none;
}
/* Astronauta — vuela por todo el pin (como index legacy / login) */
.story-chaos .rum-astro-float {
  position: absolute;
  inset: -8vh -6vw;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s ease, visibility .55s ease;
}
.story-chaos.is-astro-active .rum-astro-float {
  opacity: 1;
  visibility: visible;
}
.story-chaos .rum-astro-float__carry {
  position: absolute;
  left: 0;
  bottom: max(8px, min(12dvh, 100px));
  will-change: transform;
  animation: rumAstroChaosDiagonal 52s ease-in-out infinite alternate;
}
.story-chaos .rum-astro-float__img {
  width: min(420px, 45vw);
  max-width: 520px;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: left bottom;
  opacity: .93;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .45));
  transform-origin: 45% 58%;
  animation: rumAstroChaosSpin 20s linear infinite;
  will-change: transform;
}
@keyframes rumAstroChaosDiagonal {
  0%   { transform: translate3d(-14vw, 6vh, 0); }
  100% {
    transform: translate3d(
      calc(100vw - min(420px, 45vw) + 8vw),
      calc(-100dvh + max(10vh, 72px)),
      0
    );
  }
}
@keyframes rumAstroChaosSpin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .story-chaos__sphere-stack {
    transform: none !important;
  }
  .story-chaos .rum-astro-float__carry {
    animation: none;
    left: auto;
    right: max(12px, 2vw);
    top: 18%;
    bottom: auto;
    transform: none;
  }
  .story-chaos .rum-astro-float__img {
    animation: none;
    transform: none;
  }
}
@media (max-width: 720px) {
  .story-chaos .rum-astro-float__img {
    width: min(280px, 58vw);
  }
  @keyframes rumAstroChaosDiagonal {
    0%   { transform: translate3d(-8vw, 4vh, 0); }
    100% {
      transform: translate3d(
        calc(100vw - min(304px, 61vw) + 4vw),
        calc(-100dvh + max(8vh, 64px)),
        0
      );
    }
  }
}
.story-chaos__scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.story-chaos__layout {
  width: min(1040px, 92vw);
  margin: 0 auto;
  padding: clamp(12px, 2vh, 20px) 20px clamp(10px, 1.5vh, 16px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(10px, 1.8vh, 18px);
  height: 100%;
  max-height: 100vh;
  box-sizing: border-box;
}
.story-chaos__intro {
  text-align: center;
  max-width: 680px;
  justify-self: center;
}
.story-chaos__intro .story-chaos__lede {
  display: none;
}
.story-chaos__intro .story-section-title {
  margin-top: 0;
  font-size: clamp(1.35rem, 2.8vw, 2.2rem);
}
.story-chaos__intro .story-badge {
  margin-bottom: 6px;
}
.story-chaos__title {
  margin-top: clamp(26px, 3.2vh, 36px);
}
.story-chaos__lede {
  margin: 14px auto 0;
  font-size: clamp(.92rem, 1.6vw, 1.08rem);
  color: rgba(226, 232, 240, .68);
  line-height: 1.55;
  max-width: 520px;
}
.story-chaos__stage {
  position: relative;
  width: 100%;
  max-width: 1080px;
  transform-style: flat;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  justify-self: center;
  overflow: visible;
  gap: clamp(4px, 0.6vh, 10px);
}
.story-chaos__spheres-stage {
  position: relative;
  width: 100%;
  min-height: 0;
  flex: 0 0 auto;
  padding: 0;
  z-index: 2;
  overflow: visible;
  display: flex;
  align-items: flex-end;
}
.story-chaos__spheres-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2.5vw, 28px);
  width: 100%;
  align-items: stretch;
  opacity: calc(1 - var(--chaos-merge, 0) * 0.98);
  transition: opacity 0.2s linear;
}
.story-chaos__sphere-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  transform-origin: center center;
  transform:
    translateX(calc(var(--chaos-merge-x, 0) * var(--chaos-merge, 0) * 100%))
    translateY(calc(var(--chaos-merge-y, 0) * var(--chaos-merge, 0) * 100%))
    scale(calc(1 - var(--chaos-merge, 0) * 0.22));
  transition: transform 0.15s linear, opacity 0.15s linear;
  opacity: calc(1 - var(--chaos-merge, 0) * 0.85);
}
.story-chaos__sphere-strip {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: clamp(260px, 40vw, 520px);
  max-height: 580px;
  overflow: visible;
  opacity: 0;
  transform: scale(0.62) translateY(36px);
  transform-origin: center center;
}
.story-chaos.is-spheres-live .story-chaos__sphere-stack--design .story-chaos__sphere-strip {
  animation: chaosSphereEnter 1.15s cubic-bezier(0.22, 0.85, 0.24, 1) 0.06s forwards;
}
.story-chaos.is-spheres-live .story-chaos__sphere-stack--obra .story-chaos__sphere-strip {
  animation: chaosSphereEnter 1.15s cubic-bezier(0.22, 0.85, 0.24, 1) 0.22s forwards;
}
.story-chaos.is-spheres-live .story-chaos__sphere-stack--direction .story-chaos__sphere-strip {
  animation: chaosSphereEnter 1.15s cubic-bezier(0.22, 0.85, 0.24, 1) 0.38s forwards;
}
@keyframes chaosSphereEnter {
  0% {
    opacity: 0;
    transform: scale(0.62) translateY(36px);
    filter: blur(6px);
  }
  65% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: none;
  }
}
.story-chaos__sphere-canvas {
  display: block;
  position: relative;
  z-index: 0;
  width: 100%;
  height: auto;
  min-height: clamp(240px, 36vw, 480px);
  cursor: default;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.story-chaos__sphere-canvas.is-sphere-live {
  opacity: 1;
  visibility: visible;
}
.story-chaos__sphere-stack--design { --chaos-merge-x: 1; }
.story-chaos__sphere-stack--obra { --chaos-merge-x: 0; }
.story-chaos__sphere-stack--direction { --chaos-merge-x: -1; }
.story-chaos__merge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: min(640px, 68vw);
  min-height: clamp(340px, 48vw, 580px);
  margin-top: clamp(-180px, -22vw, -120px);
  transform: translate(-50%, -42%) scale(calc(0.55 + var(--chaos-merge, 0) * 0.55));
  opacity: clamp(0, var(--chaos-merge, 0), 1);
  pointer-events: none;
  visibility: visible;
  filter: drop-shadow(0 0 48px rgba(147, 197, 253, 0.35));
}
.story-chaos__sphere-wrap--merge {
  width: 100%;
  min-height: inherit;
  margin: 0;
  pointer-events: none;
  cursor: default;
}
.story-chaos__sphere-canvas--merge {
  display: block;
  width: 100%;
  height: auto;
  min-height: clamp(260px, 38vw, 480px);
  cursor: default;
  opacity: 0;
}
.story-chaos__sphere-canvas--merge.is-sphere-live {
  opacity: 1;
}
.story-chaos.is-merging .story-chaos__spheres-row {
  pointer-events: none;
}
.story-chaos__universes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.5vw, 28px);
  width: 100%;
  padding-top: 0;
  margin-top: clamp(-52px, -6.5vh, -20px);
  flex: 0 0 auto;
  transform-style: preserve-3d;
}
.story-chaos__universe {
  position: relative;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  text-align: center;
  transform-style: preserve-3d;
  overflow: visible;
  outline: none;
  cursor: default;
}
.story-chaos__universe.is-sphere-active .story-chaos__universe-copy {
  opacity: 1;
}
.story-chaos__intro {
  opacity: 1;
  visibility: visible;
}
.story-chaos__sphere-stack--design:hover .story-chaos__sphere-strip,
.story-chaos__sphere-stack--design.is-sphere-active .story-chaos__sphere-strip {
  filter: drop-shadow(0 0 36px rgba(59, 130, 246, 0.55));
}
.story-chaos__sphere-stack--obra:hover .story-chaos__sphere-strip,
.story-chaos__sphere-stack--obra.is-sphere-active .story-chaos__sphere-strip {
  filter: drop-shadow(0 0 36px rgba(245, 158, 11, 0.5));
}
.story-chaos__sphere-stack--direction:hover .story-chaos__sphere-strip,
.story-chaos__sphere-stack--direction.is-sphere-active .story-chaos__sphere-strip {
  filter: drop-shadow(0 0 36px rgba(52, 211, 153, 0.5));
}
.story-chaos.is-merging .story-chaos__sphere-stack {
  pointer-events: none;
}
.story-chaos__universe-copy {
  position: relative;
  z-index: 1;
  opacity: calc(1 - var(--chaos-merge, 0) * 0.94);
  transform: translateY(calc(var(--chaos-merge, 0) * 14px));
}
.story-chaos.is-merged .story-chaos__universe-copy {
  visibility: hidden;
}
.story-chaos.is-merging .rum-astro-float {
  opacity: calc(1 - var(--chaos-merge, 0) * 0.45);
}
.story-chaos__universe-tag {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, .65);
  margin-bottom: 4px;
}
.story-chaos__universe h3 {
  font-size: .92rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -.02em;
}
.story-chaos__universe-pain {
  font-size: clamp(0.82rem, 1.35vw, 0.98rem);
  font-weight: 500;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.5;
  margin: 0 auto;
  max-width: 30ch;
}
.story-chaos__universe.is-sphere-active .story-chaos__universe-pain {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 600;
}
.story-chaos__universe--design.is-sphere-active .story-chaos__universe-pain {
  color: rgba(191, 219, 254, 0.96);
}
.story-chaos__universe--obra.is-sphere-active .story-chaos__universe-pain {
  color: rgba(253, 230, 138, 0.96);
}
.story-chaos__universe--direction.is-sphere-active .story-chaos__universe-pain {
  color: rgba(167, 243, 208, 0.96);
}
.story-chaos__caption {
  position: relative;
  z-index: 8;
  flex: 0 0 auto;
  text-align: center;
  max-width: 560px;
  font-size: clamp(.92rem, 1.6vw, 1.12rem);
  color: rgba(226, 232, 240, .88);
  font-weight: 600;
  line-height: 1.45;
  margin: clamp(-64px, -8vh, -32px) auto clamp(-4px, -0.5vh, 4px);
  padding: 0 16px;
  opacity: var(--chaos-caption-op, 0.4);
  pointer-events: none;
  visibility: visible;
  transition: opacity 0.35s ease, margin 0.25s ease;
}
.story-chaos.is-merging .story-chaos__caption,
.story-chaos.is-merged .story-chaos__caption {
  margin-top: clamp(-96px, -14vh, -52px);
}

/* ─── Act 2: Cost ──────────────────────────────────────────── */
.story-cost {
  position: relative;
}
.story-cost__scroll-room {
  height: 250vh;
  position: relative;
}
.story-cost::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 50%,rgba(246,168,104,.055) 0%,transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.story-cost__pin {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}
.story-cost__content {
  text-align: center;
  max-width: 720px;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
.story-cost__intro {
  font-size: clamp(.9rem,1.8vw,1.1rem);
  color: rgba(226,232,240,.68);
  margin: 20px 0 18px;
  line-height: 1.55;
}
.story-cost__number {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(3.4rem,8.5vw,7.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(140deg,#fff 0%,var(--brand) 55%,#ff8844 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  min-height: 1.2em;
}
.story-cost__denom {
  font-size: .78rem;
  letter-spacing: .1em;
  color: rgba(246,168,104,.68);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.story-cost__scroll-hint {
  font-size: .72rem;
  color: rgba(148, 163, 184, 0.65);
  margin-bottom: 28px;
  opacity: var(--cost-scroll-hint-op, 1);
  transition: opacity 0.35s ease;
}
.story-cost__statement {
  font-size: clamp(1.1rem,2.3vw,1.65rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 20px;
  opacity: var(--cost-statement-op,0);
  transform: translateY(calc((1 - var(--cost-statement-op,0)) * 18px));
}
.story-cost__sub {
  font-size: .98rem;
  color: var(--muted);
  line-height: 1.6;
  opacity: var(--cost-sub-op,0);
  transform: translateY(calc((1 - var(--cost-sub-op,0)) * 14px));
}
.story-cost__refs {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(148,163,184,.14);
  font-size: .72rem;
  line-height: 1.55;
  color: rgba(148,163,184,.78);
  text-align: left;
  opacity: var(--cost-refs-op,0);
  transform: translateY(calc((1 - var(--cost-refs-op,0)) * 10px));
}
.story-cost__refs > summary,
.story-cost__ref > summary {
  list-style: none;
  cursor: pointer;
}
.story-cost__refs > summary::-webkit-details-marker,
.story-cost__ref > summary::-webkit-details-marker {
  display: none;
}
.story-cost__refs-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.16);
  background: rgba(2,3,10,.35);
  transition: border-color .2s ease, background .2s ease;
}
.story-cost__refs-summary:hover {
  border-color: rgba(246,168,104,.35);
  background: rgba(246,168,104,.06);
}
.story-cost__refs-summary:focus-visible,
.story-cost__ref-summary:focus-visible {
  outline: 2px solid rgba(246,168,104,.55);
  outline-offset: 2px;
}
.story-cost__refs-summary-label {
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(246,168,104,.72);
}
.story-cost__refs-summary-meta {
  font-size: .66rem;
  color: rgba(148,163,184,.55);
  white-space: nowrap;
}
.story-cost__refs-summary::after,
.story-cost__ref-summary::after {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1.5px solid rgba(246,168,104,.75);
  border-bottom: 1.5px solid rgba(246,168,104,.75);
  transform: rotate(45deg);
  transition: transform .22s ease;
}
.story-cost__refs[open] > .story-cost__refs-summary::after,
.story-cost__ref[open] > .story-cost__ref-summary::after {
  transform: rotate(-135deg);
}
.story-cost__refs-panel {
  margin-top: 10px;
  padding: 4px 2px 0;
}
.story-cost__refs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.story-cost__ref {
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.1);
  background: rgba(2,3,10,.28);
  overflow: hidden;
}
.story-cost__ref-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  font-weight: 600;
  color: rgba(226,232,240,.88);
  transition: background .2s ease;
}
.story-cost__ref-summary:hover {
  background: rgba(125,211,252,.06);
}
.story-cost__ref-label em {
  font-style: italic;
  font-weight: 500;
}
.story-cost__ref-body {
  padding: 0 11px 10px;
}
.story-cost__ref-body p {
  margin: 0 0 8px;
  color: rgba(148,163,184,.82);
  line-height: 1.5;
}
.story-cost__ref-link {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  color: rgba(125,211,252,.9);
  text-decoration: none;
}
.story-cost__ref-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.story-cost__refs-note {
  margin: 12px 2px 0;
  font-style: italic;
  color: rgba(148,163,184,.62);
  line-height: 1.5;
}

/* ─── Act 3: BIM Scroll 3D ─────────────────────────────────── */
.story-bim-scroll {
  position: relative;
}
.story-bim-scroll__scroll-room {
  height: 620vh;
  position: relative;
}
.story-bim-scroll__pin {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: transparent;
}
.story-bim-scroll__pin::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg);
}
.story-bim-scroll__canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #02030a;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  display: block;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.story-bim-scroll.is-bim-live .story-bim-scroll__canvas {
  opacity: 1;
  visibility: visible;
  image-rendering: auto;
  -webkit-font-smoothing: antialiased;
}
.story-bim-scroll__fallback-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 8vh 10vw 12vh 30vw;
  opacity: 1;
  visibility: visible;
}
.story-bim-scroll__fallback-svg {
  width: min(70vw, 900px);
  height: auto;
  max-height: 70vh;
  filter: drop-shadow(0 0 48px rgba(246, 168, 104, 0.2));
}
.story-bim-scroll.is-bim-live .story-bim-scroll__fallback-scene {
  opacity: 0;
  visibility: hidden;
}
.story-bim-scroll.is-bim-failed .story-bim-scroll__canvas {
  opacity: 0;
  visibility: hidden;
}
.story-bim-scroll.is-bim-failed .story-bim-scroll__fallback-scene {
  opacity: 1;
  visibility: visible;
}
.story-bim-scroll.is-bim-failed .story-bim-scroll__pin::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 38% at 72% 48%, rgba(246, 168, 104, 0.14), transparent 70%),
    linear-gradient(165deg, #0a1020 0%, #02030a 55%, #050810 100%);
}
.story-bim-scroll__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: center;
}
.story-bim-scroll__text-side {
  padding: 0 56px;
  width: min(440px, 42vw);
  max-width: 440px;
  flex-shrink: 0;
}
.story-bim-scroll__stages {
  position: relative;
  min-height: 220px;
  width: 100%;
}
.story-bim-stage {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.2,.8,.2,1), transform .55s cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
  pointer-events: none;
}
.story-bim-stage.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.story-bim-stage__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
  display: block;
}
.story-bim-stage__title {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.7rem,2.8vw,2.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -.022em;
  margin-bottom: 16px;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}
.story-bim-stage__sub {
  font-size: .96rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}
.story-bim-scroll__progress {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.story-bim-step {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
}
.story-bim-step.is-done { background: rgba(246,168,104,.45); }
.story-bim-step.is-active {
  background: var(--brand);
  transform: scale(1.65);
  box-shadow: 0 0 8px rgba(246,168,104,.5);
}

/* Dashboard panels (ops = stage 3, exec = stage 4) */
.story-bim-dash-panel {
  position: absolute;
  right: clamp(16px, 4vw, 48px);
  top: 46%;
  z-index: 4;
  width: min(400px, 40vw);
  pointer-events: none;
  transition: opacity .45s ease, transform .55s cubic-bezier(.2,.8,.2,1);
}
.story-bim-ops-panel {
  opacity: var(--bim-ops-panel-op, 0);
  transform: translateY(-50%) translateX(calc((1 - var(--bim-ops-panel-op, 0)) * 24px));
  pointer-events: auto;
}
.story-bim-exec-panel {
  opacity: var(--bim-exec-panel-op, 0);
  transform: translateY(-50%) translateX(calc((1 - var(--bim-exec-panel-op, 0)) * 28px));
  pointer-events: auto;
  max-height: min(58vh, 500px);
  width: min(360px, 36vw);
  top: 44%;
}
.story-bim-exec-panel .story-bim-dash-panel__shell {
  max-height: min(58vh, 500px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, 0.35) transparent;
}
.story-bim-exec-panel .story-bim-dash-panel__shell {
  padding: 12px 13px 11px;
}
.story-bim-dash-panel__shell {
  background: rgba(8,14,28,.88);
  border: 1px solid rgba(96,165,250,.28);
  border-radius: 14px;
  padding: 18px 18px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 24px 60px rgba(0,0,0,.45),
    0 0 0 1px rgba(255,255,255,.04) inset;
}
.story-bim-ops-panel .story-bim-dash-panel__shell {
  border-color: rgba(52,211,153,.32);
}
.story-bim-exec-panel .story-bim-dash-panel__badge {
  font-size: 8px;
  margin-bottom: 5px;
}
.story-bim-exec-panel .story-bim-dash-panel__title {
  font-size: 0.92rem;
  margin: 0 0 4px;
}
.story-bim-exec-panel .story-bim-dash-panel__meta {
  font-size: 0.64rem;
  margin: 0 0 9px;
}
.story-bim-exec-panel .story-bim-dash-panel__kpis {
  gap: 6px;
  margin-bottom: 9px;
}
.story-bim-dash-panel__badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}
.story-bim-dash-panel__title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 6px;
}
.story-bim-dash-panel__meta {
  font-size: .72rem;
  color: rgba(226,232,240,.55);
  margin: 0 0 14px;
  line-height: 1.4;
}
.story-bim-dash-panel__kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
/* 4D simulation slider — always on in BIM scroll */
.story-bim-sim4d {
  position: absolute;
  left: 50%;
  bottom: max(14px, 2vh);
  transform: translateX(-50%);
  z-index: 8;
  width: min(440px, 82vw);
  padding: 8px 12px 7px;
  border-radius: 11px;
  border: 1px solid rgba(96,165,250,.28);
  background: rgba(6,10,22,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 28px rgba(0,0,0,.4);
  pointer-events: auto;
}
.story-bim-sim4d__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.story-bim-sim4d__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
}
.story-bim-sim4d__readout {
  font-size: .64rem;
  font-weight: 700;
  color: rgba(226,232,240,.85);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.story-bim-sim4d__track-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
}
.story-bim-sim4d__tick {
  font-size: .52rem;
  color: rgba(148,163,184,.65);
  font-weight: 600;
  white-space: nowrap;
}
.story-bim-sim4d__slider {
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
  cursor: grab;
  background: transparent;
  touch-action: none;
  -webkit-appearance: none;
  appearance: none;
}
.story-bim-sim4d__slider:active {
  cursor: grabbing;
}
.story-bim-sim4d__slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 100px;
  background: linear-gradient(
    90deg,
    #2563eb 0%,
    #38bdf8 calc(var(--bim-sim4d-pct, 68) * 1%),
    rgba(255,255,255,.1) calc(var(--bim-sim4d-pct, 68) * 1%),
    rgba(255,255,255,.1) 100%
  );
}
.story-bim-sim4d__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: var(--brand);
  box-shadow: 0 0 10px rgba(246, 168, 104, 0.5);
}
.story-bim-sim4d__slider::-moz-range-track {
  height: 5px;
  border-radius: 100px;
  background: rgba(255,255,255,.1);
}
.story-bim-sim4d__slider::-moz-range-progress {
  height: 5px;
  border-radius: 100px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}
.story-bim-sim4d__slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: var(--brand);
  box-shadow: 0 0 10px rgba(246, 168, 104, 0.5);
}
.story-bim-exec-kpi {
  background: rgba(15,23,42,.65);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 8px 10px;
}
.story-bim-exec-panel .story-bim-exec-kpi {
  padding: 6px 8px;
  border-radius: 8px;
}
.story-bim-exec-kpi__v {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.1;
}
.story-bim-exec-panel .story-bim-exec-kpi__v {
  font-size: 0.86rem;
}
.story-bim-exec-kpi__k {
  display: block;
  font-size: .62rem;
  color: rgba(203,213,225,.72);
  margin-top: 2px;
  line-height: 1.25;
}
.story-bim-exec-panel .story-bim-exec-kpi__k {
  font-size: 0.56rem;
}
.story-bim-exec-kpi__d {
  display: block;
  font-size: .58rem;
  color: rgba(148,163,184,.75);
  margin-top: 3px;
}
.story-bim-exec-panel .story-bim-exec-kpi__d {
  font-size: 0.52rem;
  margin-top: 2px;
}
.story-bim-exec-kpi__d--up { color: #6ee7b7; }
.story-bim-exec-kpi__d--warn { color: #fdba74; }
.story-bim-exec-panel__schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.story-bim-exec-panel__schedule-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(226,232,240,.82);
}
.story-bim-exec-panel__schedule-live {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6ee7b7;
  background: rgba(52,211,153,.12);
  border: 1px solid rgba(52,211,153,.35);
  padding: 2px 7px;
  border-radius: 100px;
}
.story-bim-exec-gantt__row {
  display: grid;
  grid-template-columns: 72px 1fr 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.story-bim-exec-gantt__label {
  font-size: .62rem;
  color: rgba(203,213,225,.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-bim-exec-gantt__track {
  height: 5px;
  border-radius: 100px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.story-bim-exec-gantt__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}
.story-bim-exec-gantt__row--risk .story-bim-exec-gantt__fill {
  background: linear-gradient(90deg, #b45309, #f59e0b);
}
.story-bim-exec-gantt__row--plan .story-bim-exec-gantt__fill {
  background: linear-gradient(90deg, #334155, #64748b);
}
.story-bim-exec-gantt__pct {
  font-size: .6rem;
  font-weight: 700;
  color: rgba(226,232,240,.65);
  text-align: right;
}
.story-bim-exec-panel__insight {
  font-size: .65rem;
  color: rgba(148,163,184,.85);
  line-height: 1.45;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.story-bim-dash-panel__charts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.story-bim-exec-panel .story-bim-dash-panel__charts {
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
}
.story-bim-dash-chart__title {
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.78);
  margin: 0 0 6px;
}
.story-bim-exec-panel .story-bim-dash-chart__title {
  font-size: 0.58rem;
  margin: 0 0 4px;
}
.story-bim-exec-panel .story-bim-exec-gantt__row {
  grid-template-columns: 64px 1fr 28px;
  gap: 6px;
  margin-bottom: 4px;
}
.story-bim-exec-panel .story-bim-exec-gantt__label {
  font-size: 0.56rem;
}
.story-bim-exec-panel .story-bim-exec-gantt__track {
  height: 4px;
}
.story-bim-exec-panel .story-bim-exec-gantt__pct {
  font-size: 0.54rem;
}
.story-bim-exec-panel .story-bim-exec-panel__insight {
  font-size: 0.58rem;
  margin: 6px 0 0;
  padding-top: 6px;
}
.story-bim-exec-panel .story-bim-exec-cashflow {
  height: 52px;
}
.story-bim-exec-timeline {
  position: relative;
}
.story-bim-exec-timeline__axis {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
  margin-bottom: 6px;
  padding-left: 52px;
  font-size: 0.5rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.55);
  text-align: center;
}
.story-bim-exec-timeline__row {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.story-bim-exec-timeline__label {
  font-size: 0.58rem;
  color: rgba(203, 213, 225, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-bim-exec-timeline__track {
  position: relative;
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}
.story-bim-exec-timeline__bar {
  position: absolute;
  top: 3px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  min-width: 4px;
}
.story-bim-exec-timeline__row--risk .story-bim-exec-timeline__bar {
  background: linear-gradient(90deg, #b45309, #f59e0b);
}
.story-bim-exec-timeline__row--plan .story-bim-exec-timeline__bar {
  background: linear-gradient(90deg, #475569, #94a3b8);
}
.story-bim-exec-timeline > .story-bim-exec-timeline__now {
  position: absolute;
  top: 22px;
  bottom: 4px;
  left: calc(52px + (100% - 52px) * var(--bim-dash-pct, 68) / 100 - 1px);
  width: 2px;
  background: var(--brand);
  box-shadow: 0 0 8px rgba(246, 168, 104, 0.65);
  pointer-events: none;
  z-index: 2;
}
.story-bim-exec-scurve {
  display: block;
  width: 100%;
  height: auto;
}
.story-bim-exec-scurve__planned {
  fill: none;
  stroke: rgba(148, 163, 184, 0.45);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}
.story-bim-exec-scurve__actual {
  fill: none;
  stroke: url(#storyBimScurveGrad);
  stroke-width: 2.2;
  stroke-linecap: round;
}
.story-bim-exec-scurve__marker {
  fill: var(--brand);
  stroke: #fff;
  stroke-width: 1.5;
}
.story-bim-exec-scurve__legend {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 0.55rem;
  color: rgba(148, 163, 184, 0.7);
}
.story-bim-exec-scurve__legend span::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.story-bim-exec-scurve__legend-plan::before {
  background: rgba(148, 163, 184, 0.5);
}
.story-bim-exec-scurve__legend-act::before {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  height: 3px;
}
.story-bim-exec-cashflow {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  align-items: end;
  height: 72px;
  padding-top: 4px;
}
.story-bim-exec-cashflow__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
  justify-content: flex-end;
}
.story-bim-exec-cashflow__bar {
  width: 100%;
  max-width: 22px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  height: calc(var(--cf-h, 40) * 1%);
  min-height: 4px;
  opacity: 0.45;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}
.story-bim-exec-cashflow__col.is-active .story-bim-exec-cashflow__bar {
  opacity: 1;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
}
.story-bim-exec-cashflow__col.is-out .story-bim-exec-cashflow__bar {
  background: linear-gradient(180deg, #f59e0b, #b45309);
}
.story-bim-exec-cashflow__lbl {
  font-size: 0.48rem;
  color: rgba(148, 163, 184, 0.65);
  font-weight: 600;
}

/* ─── Act 4: Platform (estilo Ü / consultoría) ─────────────── */
.story-platform--rum {
  padding: clamp(88px, 12vh, 128px) 0 clamp(96px, 14vh, 140px);
}
.story-platform--rum .story-platform__shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
}
.story-platform--rum .story-platform__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: clamp(40px, 6vh, 56px);
}
.story-platform--rum .story-platform__header .eyebrow {
  margin-left: auto;
  margin-right: auto;
}
.story-platform--rum .story-platform__header .section-title {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.story-platform--rum .story-platform__lede {
  color: rgba(226, 232, 240, 0.72);
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 0.98rem;
  line-height: 1.7;
}
.story-platform--rum .story-platform__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
  align-items: stretch;
  background: transparent;
  border: none;
  max-width: none;
  margin: 0;
}
.story-platform--rum .story-platform__card {
  background: var(--panel-bg, rgba(8, 14, 28, 0.92));
  border: 1.5px solid var(--panel-border, rgba(255, 255, 255, 0.12));
  border-radius: 22px;
  padding: clamp(18px, 1.6vw, 24px) clamp(16px, 1.4vw, 22px) clamp(16px, 1.4vw, 20px);
  position: relative;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.35s ease;
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.28), var(--card-inset, inset 0 1px 0 rgba(255, 255, 255, 0.06));
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.story-platform--rum .story-platform__card.is-in {
  opacity: 1;
  transform: translateY(0);
}
.story-platform--rum .story-platform__card:nth-child(2) { transition-delay: 0.1s; }
.story-platform--rum .story-platform__card:nth-child(3) { transition-delay: 0.18s; }
.story-platform--rum .story-platform__card:nth-child(4) { transition-delay: 0.26s; }
.story-platform--rum .story-platform__card:hover,
.story-platform--rum .story-platform__card.is-sphere-active {
  border-color: rgba(246, 168, 104, 0.38);
  box-shadow: 0 22px 48px rgba(2, 8, 23, 0.38), 0 0 0 1px rgba(246, 168, 104, 0.12);
}
.story-platform--rum .story-platform__sphere {
  position: relative;
  width: 100%;
  height: clamp(108px, 11vw, 148px);
  margin: 0 0 4px;
  border-radius: 14px;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 90% at 50% 58%, rgba(246, 168, 104, 0.07) 0%, transparent 72%);
}
.story-platform--rum .story-platform__sphere-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.story-platform--rum.is-spheres-live .story-platform__sphere-canvas.is-sphere-live {
  opacity: 1;
}
.story-platform--rum .story-platform__card:hover .story-platform__sphere {
  background: radial-gradient(ellipse 85% 90% at 50% 58%, rgba(246, 168, 104, 0.12) 0%, transparent 72%);
}
.story-platform--rum .story-platform__card-label {
  display: inline-flex;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.story-platform--rum .story-platform__card h3 {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1rem, 1.15vw, 1.22rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.2;
}
.story-platform--rum .story-platform__card-panel {
  flex: 1;
  margin-bottom: 18px;
}
.story-platform--rum .story-platform__card-panel p {
  font-size: clamp(0.78rem, 0.85vw, 0.86rem);
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.55;
  margin: 0 0 10px;
}
.story-platform--rum .story-platform__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.story-platform--rum .story-platform__tag {
  font-size: 10px;
  padding: 5px 8px;
  color: rgba(226, 232, 240, 0.78);
}
.story-platform--rum .story-platform__card-actions {
  margin-top: auto;
  padding-top: 4px;
}
.story-platform--rum .story-platform__cta {
  width: 100%;
  max-width: 100%;
  justify-content: center;
  font-size: clamp(0.72rem, 0.8vw, 0.82rem);
  padding: 10px 12px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}
.story-platform--rum .story-platform__cta--rum {
  background: rgba(246, 168, 104, 0.14);
  border-color: rgba(246, 168, 104, 0.55);
  color: #fff1df;
  box-shadow: 0 16px 34px rgba(2, 8, 23, 0.28), 0 0 24px rgba(246, 168, 104, 0.12);
}
.story-platform--rum .story-platform__cta--rum::after {
  content: 'Ü';
  margin-left: 6px;
  font-weight: 800;
  color: var(--brand);
  opacity: 0.95;
}
.story-platform--rum .story-platform__cta--rum:hover,
.story-platform--rum .story-platform__cta--rum:focus-visible {
  background: rgba(246, 168, 104, 0.22);
  border-color: #ffbe86;
}

/* ─── Act 5: CTA ────────────────────────────────────────────── */
.story-cta {
  position: relative;
  padding: 120px 0 80px;
  text-align: center;
  overflow: hidden;
}
.story-cta__bg-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(246,168,104,.07),transparent 68%);
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
  z-index: 0;
}
.story-cta__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}
.story-cta__title {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.95rem,4.4vw,3.9rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.032em;
  line-height: 1.05;
  margin: 18px 0 18px;
}
.story-cta__sub {
  font-size: clamp(.98rem,1.9vw,1.18rem);
  color: var(--muted);
  margin-bottom: 46px;
  line-height: 1.6;
}
.story-cta__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.story-cta__btn-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 38px;
  border-radius: 100px;
  background: var(--brand);
  color: #09101f;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  transition: all .24s ease;
}
.story-cta__btn-main:hover {
  background: var(--accent-text);
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(246,168,104,.28);
}
.story-cta__btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 38px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.78);
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  transition: all .24s ease;
}
.story-cta__btn-ghost:hover {
  border-color: rgba(255,255,255,.44);
  background: rgba(255,255,255,.065);
}
.story-cta__trust {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.story-cta__trust-item {
  font-size: .8rem;
  color: rgba(226,232,240,.48);
  display: flex;
  align-items: center;
  gap: 6px;
}
.story-cta__trust-item::before {
  content: '✓';
  color: var(--brand);
  font-size: .72rem;
  font-weight: 700;
}

/* ─── Legacy landing inventory (temp reference) ─────────────── */
.story-legacy-inventory {
  padding: 72px 0 100px;
  border-top: 1px dashed rgba(246, 168, 104, .35);
  background: rgba(2, 3, 10, .55);
}
.story-legacy-inventory__inner {
  width: min(960px, 92vw);
  margin: 0 auto;
  padding: 0 20px;
}
.story-legacy-inventory__head {
  text-align: center;
  margin-bottom: 40px;
}
.story-legacy-inventory__note {
  margin: 12px auto 0;
  max-width: 620px;
  font-size: .88rem;
  color: rgba(226, 232, 240, .55);
  line-height: 1.5;
}
.story-legacy-inventory__group {
  margin-bottom: 28px;
  padding: 18px 18px 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(8, 12, 24, .5);
}
.story-legacy-inventory__group-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand);
  margin: 0 0 12px;
  letter-spacing: -.02em;
}
.story-legacy-inventory__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.story-legacy-inventory__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: min(100%, 220px);
  flex: 1 1 200px;
}
.story-legacy-inventory__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 700;
  color: #0f172a;
  background: var(--brand);
  text-decoration: none;
  border: 1px solid rgba(246, 168, 104, .5);
  transition: filter .2s ease, transform .2s ease;
}
.story-legacy-inventory__btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.story-legacy-inventory__ghost {
  font-size: .78rem;
  color: rgba(226, 232, 240, .5);
  font-style: italic;
}
.story-legacy-inventory__meta {
  font-size: .62rem;
  color: rgba(148, 163, 184, .55);
  word-break: break-all;
}
.story-legacy-inventory__footer {
  margin: 24px 0 0;
  font-size: .8rem;
  color: rgba(226, 232, 240, .45);
  text-align: center;
  line-height: 1.45;
}

/* ─── Section connector ─────────────────────────────────────── */
.story-connector {
  width: 2px;
  height: 48px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(246, 168, 104, 0.35), transparent);
  margin: 0 auto;
  opacity: 0.65;
}

/* ─── Shared keyframes ──────────────────────────────────────── */
@keyframes storyFadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes storyHeroIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes storyHeroCueIn {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* ─── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .story-hero__eyebrow,
  .story-hero__title,
  .story-hero__subhead,
  .story-hero__sub,
  .story-hero__cta-group,
  .story-hero__scroll-cue {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .story-chaos__universe { opacity: 1 !important; transform: none !important; }
  .story-chaos__sphere-stack {
    opacity: 1 !important;
    transform: none !important;
  }
  .story-chaos__sphere-strip {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .story-chaos__caption { opacity: 1; --chaos-caption-op: 1; }
  .story-cost__statement { opacity: 1; transform: none; --cost-statement-op: 1; }
  .story-cost__sub { opacity: 1; transform: none; --cost-sub-op: 1; }
  .story-cost__refs { opacity: 1; transform: none; --cost-refs-op: 1; }
  .story-platform__card { opacity: 1; transform: none; }
  .story-bim-stage { opacity: 0; transform: none; }
  .story-bim-stage.is-active { opacity: 1; }
  .story-bim-exec-panel,
  .story-bim-ops-panel {
    opacity: 1;
    --bim-exec-panel-op: 1;
    --bim-ops-panel-op: 1;
    transform: translateY(-50%);
  }
}

@media (max-width: 1180px) {
  .story-platform--rum .story-platform__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
  }
  .story-platform--rum .story-platform__shell {
    width: min(1120px, calc(100% - 40px));
  }
}

/* ─── Mobile ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Act 0 — video hero: altura real del viewport, texto legible, ritmo más ágil */
  .story-hero {
    height: 100svh;
    height: 100dvh;
    min-height: 0;
  }
  .story-hero__video {
    opacity: 0.9;
    object-position: center 30%;
    filter: saturate(0.9) brightness(0.9);
  }
  .story-hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(2, 3, 10, 0.12) 0%,
      rgba(2, 3, 10, 0.38) 38%,
      rgba(2, 3, 10, 0.82) 72%,
      rgba(2, 3, 10, 0.96) 100%
    );
  }
  .story-hero__content {
    max-width: 100%;
    padding: max(92px, calc(env(safe-area-inset-top, 0px) + 76px)) 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .story-hero__title {
    font-size: clamp(1.75rem, 8.4vw, 2.55rem);
    line-height: 1.06;
    margin-bottom: 10px;
    max-width: 16ch;
  }
  .story-hero__subhead.story-hero__inner,
  .story-hero__sub.story-hero__inner {
    font-size: clamp(0.96rem, 4.1vw, 1.12rem);
    max-width: 34ch;
  }
  .story-hero__subhead.story-hero__inner {
    margin-bottom: 10px;
  }
  .story-hero__sub.story-hero__inner {
    margin-bottom: 26px;
  }
  .story-hero__cta-group {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  .story-hero__cta {
    width: 100%;
    justify-content: center;
    padding: 13px 22px;
    font-size: 0.9rem;
  }
  .story-hero__scroll-cue {
    bottom: max(12px, env(safe-area-inset-bottom, 0px) + 10px);
  }
  .story-hero__scroll-line {
    height: 36px;
  }
  .story-hero__eyebrow {
    animation-duration: 0.48s;
    animation-delay: 0.1s;
  }
  .story-hero__title {
    animation-duration: 0.62s;
    animation-delay: 0.2s;
  }
  .story-hero__subhead {
    animation-duration: 0.52s;
    animation-delay: 0.34s;
  }
  .story-hero__sub {
    animation-duration: 0.48s;
    animation-delay: 0.46s;
  }
  .story-hero__cta-group {
    animation-duration: 0.42s;
    animation-delay: 0.56s;
  }
  .story-hero__scroll-cue {
    animation-duration: 0.38s;
    animation-delay: 0.72s;
  }

  /* Ritmo entre capítulos */
  .story-wrap > .story-connector {
    height: 36px;
    margin: 10px auto 14px;
    opacity: 0.5;
  }

  .story-cost__content {
    padding: 0 18px;
  }
  .story-cost__intro {
    margin: 12px 0 10px;
    font-size: 0.88rem;
    line-height: 1.5;
  }
  .story-cost__number {
    font-size: clamp(2.5rem, 13.5vw, 4rem);
  }
  .story-cost__statement {
    font-size: clamp(1rem, 4.6vw, 1.25rem);
    line-height: 1.35;
  }
  .story-cost__sub {
    font-size: 0.9rem;
  }
  .story-cost__refs {
    margin-top: 20px;
    padding-top: 14px;
  }

  .story-chaos__scroll-room { height: 280vh; }
  .story-cost__scroll-room { height: 200vh; }
  .story-bim-scroll__scroll-room { height: 480vh; }
  .story-chaos__spheres-stage {
    max-width: none;
    width: 100%;
    min-height: 0;
  }
  .story-chaos__spheres-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .story-chaos__sphere-stack--design { --chaos-merge-x: 0; --chaos-merge-y: 1; }
  .story-chaos__sphere-stack--obra { --chaos-merge-y: 0; }
  .story-chaos__sphere-stack--direction { --chaos-merge-x: 0; --chaos-merge-y: -1; }
  .story-chaos__merge {
    width: min(92vw, 420px);
    margin-top: clamp(-120px, -18vw, -80px);
  }
  .story-chaos__universes {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: clamp(-36px, -8vw, -16px) auto 0;
    padding-top: 0;
  }
  .story-chaos__sphere-strip {
    min-height: clamp(220px, 56vw, 360px);
    max-height: 400px;
  }
  .story-chaos.is-spheres-live .story-chaos__sphere-strip {
    animation-duration: 0.85s;
  }
  .story-chaos .rum-astro-float__img {
    width: min(220px, 50vw);
    opacity: .75;
  }
  .story-platform--rum .story-platform__grid { grid-template-columns: 1fr; }
  .story-platform--rum .story-platform__card { padding: 24px 22px 22px; }
  .story-platform--rum .story-platform__shell { width: calc(100% - 32px); }
  .story-bim-scroll__text-side {
    padding: 24px;
    width: min(100%, 360px);
    max-width: 100%;
  }
  .story-bim-dash-panel {
    right: 12px;
    width: min(340px, 88vw);
    top: auto;
    bottom: 108px;
    transform: none;
  }
  .story-bim-ops-panel {
    transform: translateY(calc((1 - var(--bim-ops-panel-op, 0)) * 16px));
  }
  .story-bim-exec-panel {
    transform: translateY(calc((1 - var(--bim-exec-panel-op, 0)) * 16px));
    width: min(320px, 90vw);
    max-height: min(52vh, 420px);
  }
  .story-bim-exec-panel .story-bim-dash-panel__shell {
    max-height: min(52vh, 420px);
  }
  .story-bim-sim4d {
    width: min(360px, 92vw);
    bottom: 12px;
    padding: 7px 10px 6px;
  }
  .story-bim-scroll__progress { right: 14px; }
  .story-bim-stage__title { font-size: clamp(1.5rem,5vw,2.2rem); }

  .story-platform--rum .story-platform__header {
    padding: 0 4px;
    text-align: center;
  }
  .story-platform--rum .story-platform__lede {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .story-cta {
    padding: 72px 0 56px;
  }
  .story-cta__content {
    padding: 0 20px;
  }
  .story-cta__title {
    font-size: clamp(1.55rem, 6.8vw, 2.1rem);
    margin: 14px 0 12px;
  }
  .story-cta__sub {
    font-size: 0.92rem;
    margin-bottom: 32px;
  }
  .story-cta__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 36px;
  }
  .story-cta__btn-main,
  .story-cta__btn-ghost {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .story-hero__title {
    max-width: 14ch;
  }
  .story-hero__cta-group { flex-direction: column; align-items: center; }
  .story-cta__trust { flex-direction: column; align-items: center; gap: 12px; }
}

