/* ============================================================
   RÜM INDEX — Three narrative layers (qué / cómo / resultados)
   ============================================================ */

/* Hero: una promesa, CTA visible */
.story-hero__brand-mark {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brand, #f6a868);
  margin: 0 0 18px;
  opacity: 0;
  animation: storyHeroIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s forwards;
}
.story-hero__sub--solo {
  max-width: 46ch;
}
.story-hero--narrative .story-hero__cta-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  opacity: 0;
  animation: storyHeroIn 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) 1.2s forwards;
}

/* ─── Cómo lo hacen ────────────────────────────────────────── */
.story-how {
  position: relative;
  z-index: 12;
  padding: clamp(72px, 10vh, 108px) 0 clamp(64px, 9vh, 96px);
}
.story-how__shell {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  text-align: center;
}
.story-how__header {
  margin-bottom: clamp(28px, 4vh, 40px);
}
.story-how__header .section-title {
  max-width: 22ch;
  margin-inline: auto;
  text-wrap: balance;
}
.story-how__integration {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 1.9vw, 1.15rem);
  line-height: 1.65;
  color: rgba(226, 232, 240, 0.78);
  max-width: 52ch;
  margin: 0 auto 32px;
  text-wrap: balance;
}

/* ─── Resultados ───────────────────────────────────────────── */
.story-results {
  position: relative;
  z-index: 12;
  padding: clamp(64px, 9vh, 96px) 0 clamp(88px, 12vh, 120px);
}
.story-results__shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  text-align: center;
}
.story-results__header {
  margin-bottom: clamp(36px, 5vh, 52px);
}
.story-results__header .section-title {
  max-width: 28ch;
  margin-inline: auto;
  text-wrap: balance;
}
.story-results__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 16px);
  margin-bottom: 40px;
  text-align: left;
}
.story-results__card {
  display: grid;
  gap: 10px;
  min-height: 100%;
  padding: clamp(20px, 2vw, 26px) clamp(18px, 1.8vw, 22px);
  border-radius: 18px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  background: var(--bg-panel, rgba(8, 14, 28, 0.88));
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}
.story-results__card:hover {
  border-color: var(--accent-border-strong, rgba(246, 168, 104, 0.55));
  box-shadow:
    0 22px 48px rgba(2, 8, 23, 0.32),
    0 0 0 1px rgba(246, 168, 104, 0.08);
  transform: translateY(-2px);
}
.story-results__index {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(246, 168, 104, 0.7);
}
.story-results__phase {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1rem, 1.15vw, 1.2rem);
  font-weight: 800;
  color: var(--text, #f8fafc);
  margin: 0;
  line-height: 1.2;
}
.story-results__line {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.84rem, 0.95vw, 0.92rem);
  line-height: 1.6;
  color: var(--muted, rgba(226, 232, 240, 0.72));
  margin: 0;
}

/* Reveal por scroll (usa el observer .scrollfx/.is-in de landing_core) */
.scrollfx .story-results__grid > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.5s cubic-bezier(0.25, 0.9, 0.3, 1),
    transform 0.55s cubic-bezier(0.18, 0.94, 0.2, 1);
}
.scrollfx.is-in .story-results__grid > * {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(0.05s + 0.08s * var(--res-i, 0));
}

/* Platform: sin lede repetitiva */
.story-platform--rum .story-platform__lede {
  display: none;
}
.story-platform--rum .story-platform__header .section-title {
  max-width: 24ch;
  margin-inline: auto;
  text-wrap: balance;
}

/* Process: sin intro redundante */
.story-process__intro {
  display: none;
}

@media (max-width: 980px) {
  .story-results__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .story-results__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scrollfx .story-results__grid > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .story-results__card {
    transition: none;
  }
  .story-results__card:hover {
    transform: none;
  }
}
