/* ============================================================
   RÜM INDEX — Scroll-telling section transitions (1820-inspired)
   ============================================================ */

:root {
  --rum-tell-ease: cubic-bezier(0.33, 1, 0.68, 1);
  --rum-tell-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

.rum-scroll-tell {
  --tell-p: 0;
}

.rum-scroll-tell .section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06em;
}

.rum-scroll-tell .section-title .rum-tell-mask {
  overflow: hidden;
  display: block;
}

.rum-scroll-tell .rum-tell-mask {
  overflow: hidden;
  display: block;
}

.rum-scroll-tell .rum-tell-inner {
  display: block;
  transform: translate3d(0, 100%, 0);
  opacity: 0;
  transition:
    transform 0.38s var(--rum-tell-spring),
    opacity 0.24s var(--rum-tell-ease);
  will-change: transform, opacity;
}

.rum-scroll-tell.is-scroll-tell-in .rum-tell-inner,
.rum-scroll-tell.is-scroll-tell-in .rum-tell-inner.is-revealed {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.rum-scroll-tell .eyebrow.rum-tell-item {
  transform: translate3d(0, 12px, 0);
  opacity: 0;
  transition:
    transform 0.34s var(--rum-tell-spring),
    opacity 0.22s var(--rum-tell-ease);
}

.rum-scroll-tell.is-scroll-tell-in .eyebrow.rum-tell-item {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  transition-delay: 0.02s;
}

.rum-scroll-tell .section-title .rum-tell-mask:nth-child(1) .rum-tell-inner {
  transition-delay: 0.03s;
}
.rum-scroll-tell .section-title .rum-tell-mask:nth-child(2) .rum-tell-inner {
  transition-delay: 0.06s;
}
.rum-scroll-tell .section-title .rum-tell-mask:nth-child(3) .rum-tell-inner {
  transition-delay: 0.09s;
}

.rum-scroll-tell .rum-tell-body {
  transform: translate3d(0, 16px, 0);
  opacity: 0;
  clip-path: inset(100% 0 0 0);
  transition:
    transform 0.36s var(--rum-tell-spring),
    opacity 0.28s var(--rum-tell-ease),
    clip-path 0.34s var(--rum-tell-ease);
}

.rum-scroll-tell.is-scroll-tell-in .rum-tell-body {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transition-delay: 0.08s;
}

.rum-scroll-tell .rum-tell-cta {
  transform: translate3d(0, 10px, 0) scale(0.98);
  opacity: 0;
  transition:
    transform 0.32s var(--rum-tell-spring),
    opacity 0.22s var(--rum-tell-ease);
}

.rum-scroll-tell.is-scroll-tell-in .rum-tell-cta {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  transition-delay: 0.12s;
}

.story-wrap > .story-connector {
  --connector-p: 0;
  transform: scaleY(calc(0.35 + var(--connector-p) * 0.65));
  opacity: calc(0.2 + var(--connector-p) * 0.75);
  transition: opacity 0.12s linear, transform 0.12s linear;
  transform-origin: center top;
}

.story-hero--scroll-driven.is-hero-scrolling ~ .story-connector {
  opacity: calc(0.35 + var(--hero-text-op, 1) * 0.4);
}

.rum-scroll-tell.story-process .story-process__left > * {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition:
    transform 0.34s var(--rum-tell-spring),
    opacity 0.22s var(--rum-tell-ease);
}

.rum-scroll-tell.story-process.is-scroll-tell-in .story-process__eyebrow {
  opacity: 1;
  transform: none;
  transition-delay: 0.02s;
}
.rum-scroll-tell.story-process.is-scroll-tell-in .story-process__lanes {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}
.rum-scroll-tell.story-process.is-scroll-tell-in .story-process__progress {
  opacity: 1;
  transform: none;
  transition-delay: 0.07s;
}
.rum-scroll-tell.story-process.is-scroll-tell-in .story-process__slides {
  opacity: 1;
  transform: none;
  transition-delay: 0.09s;
}
.rum-scroll-tell.story-process.is-scroll-tell-in .story-process__actions {
  opacity: 1;
  transform: none;
  transition-delay: 0.11s;
}

.rum-scroll-tell.story-process .story-process__frame {
  transform: translate3d(0, 18px, 0) scale(0.98);
  opacity: 0;
  clip-path: inset(8% 5% 8% 5% round 18px);
  transition:
    transform 0.4s var(--rum-tell-spring),
    opacity 0.28s var(--rum-tell-ease),
    clip-path 0.36s var(--rum-tell-ease);
}

.rum-scroll-tell.story-process.is-scroll-tell-in .story-process__frame {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  clip-path: inset(0% 0% 0% 0% round 18px);
  transition-delay: 0.05s;
}

@media (prefers-reduced-motion: reduce) {
  .rum-scroll-tell .rum-tell-inner,
  .rum-scroll-tell .rum-tell-body,
  .rum-scroll-tell .rum-tell-cta,
  .rum-scroll-tell .eyebrow.rum-tell-item,
  .rum-scroll-tell.story-process .story-process__left > *,
  .rum-scroll-tell.story-process .story-process__frame {
    transform: none !important;
    opacity: 1 !important;
    clip-path: none !important;
    transition: none !important;
  }
}
