/* Home (Rahma) blocks (Freedom: Home (Rahma), the *R.php classes): additions that are not in the source CSS. */

/* ---------- Pinned hero (fpHeroR "pinned", PinnedReveal) ----------
 * The hero's wrapper sticks only once rahma-pin.js has set --pin-top; before that it scrolls like any section.
 * The blocks after it form the rising sheet: above the hero, opaque, the first one with rounded top corners.
 * :where() keeps these at zero specificity, so a section's own position and background win. */
.fpR-pin:not([data-pin-ready]) {
  position: relative;
}

:where(.fpR-pin ~ *) {
  position: relative;
  z-index: 1;
  background-color: var(--fp-bg);
}

.fpR-pin + * {
  border-radius: clamp(28px, 4vw, 44px) clamp(28px, 4vw, 44px) 0 0;
}

/* In the source the rounding is on the sheet around the sections, and the promise section paints its own background
   over it: its top corners show square. Same here. */
.fpR-pin + .fp-PromiseSection-section {
  border-radius: 0;
}

/* ---------- Process card of the hero ---------- */
.fp-ProcessCard-step[data-state='next'] .fpR-ring {
  display: none;
}

.fp-ProcessCard-step[data-state='next'] .fp-ProcessCard-railFill {
  transform: scaleY(0);
}

.fpR-open {
  animation: fpR-open 0.45s var(--fp-ease-out, ease-out);
}

@keyframes fpR-open {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 6em;
  }
}

/* ---------- Players (fpPromiseR, fpAudienceR): the item that comes in ---------- */
.fpR-enter {
  animation: fpR-enter 0.55s var(--fp-ease-out, ease-out);
}

@keyframes fpR-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* Hidden items stay hidden, whatever display their class gives them. */
[data-rp-panel][hidden],
.fp-ProcessCard-stepText[hidden] {
  display: none !important;
}

/* Tab fills start empty (rahma-player.js fills them); without the script the first tab shows full. */
.fp-PromiseSection-tab[aria-selected='false'] .fp-PromiseSection-tabFill {
  transform: scaleX(0);
}

.fp-AudienceSection-tab[aria-selected='false'] .fp-AudienceSection-tabMarkerFill {
  transform: scaleY(0);
}

/* ---------- Benefits gallery: the progress bar only shows in the pinned mode ---------- */
.fp-BenefitsGallery-progress[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .fpR-open,
  .fpR-enter {
    animation: none;
  }
}
