/* ==========================================================================
   Vital Heroes — Report-Vorschau scrolly (enhanced)
   Progressive enhancement: base = accessible stacked sequence.
   .rp--pinned (added by JS on wide screens + motion OK) = pinned step-through.
   ========================================================================== */
.rp { --rp-top: 76px; --rp-figure-h: min(80vh, 820px);
  position: relative; isolation: isolate; }

/* ---- Intro ---- */
.rp__intro { background: var(--vh-beige); color: var(--vh-green); text-align: center;
  padding: clamp(64px, 9vw, 120px) 24px clamp(36px, 5vw, 60px); }
.rp__intro .rp__anno { color: var(--vh-orange); margin-bottom: 16px; }
.rp__intro h2 { font-size: var(--vh-fs-h2); font-weight: 800; line-height: 1.04;
  max-width: 20ch; margin: 0 auto 16px; text-wrap: balance; }
.rp__lead { font-size: var(--vh-fs-lead); line-height: 1.45; color: var(--vh-fg-muted);
  max-width: 48ch; margin: 0 auto; }
.rp__anno { font-family: var(--vh-font-secondary); font-weight: 700; font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase; }

/* ---- Stage ---- */
.rp__scrolly { position: relative; background: var(--vh-green); color: var(--vh-beige); }
.rp__scrolly::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 80% 12%, rgba(255,103,19,.12), transparent 70%); }
.rp__stage { position: static; }
.rp__inner { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.rp__panels { position: relative; }
.rp__panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.95fr);
  gap: clamp(32px, 5vw, 80px); align-items: center; padding: clamp(52px, 8vh, 104px) 0; }
.rp__panel + .rp__panel { border-top: 1px solid rgba(227,221,209,.14); }

/* figure — report page in a soft paper frame */
.rp__figure { margin: 0; justify-self: center; width: 100%;
  max-width: calc(var(--rp-figure-h) * .707); position: relative; }
.rp__figure::after { content: none; }
.rp__figure img { display: block; width: 100%; height: auto; aspect-ratio: 1588/2248;
  object-fit: contain; border-radius: 14px 14px 14px 0; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
  background: #fff; }

/* text column */
.rp__cap { max-width: 44ch; }
.rp__step-anno { display: inline-flex; align-items: baseline; gap: .5ch; color: var(--vh-orange);
  margin-bottom: 16px; font-family: var(--vh-font-secondary); font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase; }
.rp__step-anno span { color: rgba(227,221,209,.5); }
.rp__title { font-family: var(--vh-font-primary); font-weight: 800; font-size: var(--vh-fs-h2);
  line-height: 1.03; letter-spacing: -.01em; color: #fff; margin: 0 0 16px; text-wrap: balance; }
.rp__text { font-size: var(--vh-fs-lead); line-height: 1.55; color: rgba(227,221,209,.86); margin: 0; }

.rp__cta { display: inline-flex; align-items: center; gap: .6ch; margin-top: 28px; padding: 16px 30px;
  background: var(--vh-orange); color: #fff; border-radius: var(--vh-r-pill); font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase; font-size: 14px;
  transition: background var(--vh-dur) var(--vh-ease), transform var(--vh-dur) var(--vh-ease); }
.rp__cta:hover { background: var(--vh-orange-95); text-decoration: none; transform: translateY(-2px); }

/* dots + drivers hidden in base flow */
.rp__dots { display: none; }
.rp__steps { display: none; }

/* ---- Outro ---- */
.rp__outro { background: var(--vh-beige); color: var(--vh-green); text-align: center;
  padding: clamp(60px, 8vw, 104px) 24px; }
.rp__outro h3 { font-size: var(--vh-fs-h3); font-weight: 800; max-width: 22ch; margin: 0 auto 24px; }
.rp__outro .rp__cta { margin-top: 0; }

/* =========================================================================
   PINNED MODE (JS adds .rp--pinned on >=901px + motion OK)
   ========================================================================= */
.rp--pinned .rp__stage { position: sticky; top: var(--rp-top);
  height: calc(100svh - var(--rp-top)); display: flex; align-items: center; overflow: hidden; }
.rp--pinned .rp__inner { display: flex; align-items: center; height: 100%; }
.rp--pinned .rp__panels { width: 100%; height: var(--rp-figure-h); }
.rp--pinned .rp__panel { position: absolute; inset: 0; padding: 0; border: 0; opacity: 0;
  visibility: hidden; transform: translateY(24px);
  transition: opacity .6s var(--vh-ease), transform .7s var(--vh-ease), visibility 0s linear .6s;
  will-change: opacity, transform; }
.rp--pinned .rp__panel.is-active { opacity: 1; visibility: visible; transform: none;
  transition: opacity .6s var(--vh-ease), transform .7s var(--vh-ease), visibility 0s; }
.rp--pinned .rp__figure { max-width: calc(var(--rp-figure-h) * .707); }
.rp--pinned .rp__figure img { height: var(--rp-figure-h); width: auto; margin: 0 auto; }

/* progress dots */
.rp--pinned .rp__dots { position: absolute; left: 50%; bottom: clamp(16px, 3vh, 30px);
  transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.rp__dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: var(--vh-r-pill);
  background: rgba(227,221,209,.3); cursor: pointer;
  transition: background var(--vh-dur) var(--vh-ease), width var(--vh-dur) var(--vh-ease); }
.rp__dot:hover { background: rgba(227,221,209,.6); }
.rp__dot.is-active { width: 28px; background: var(--vh-orange); }

/* scroll drivers */
.rp--pinned .rp__steps { display: block; position: relative;
  margin-top: calc(-1 * (100svh - var(--rp-top))); z-index: 2; pointer-events: none; }
.rp--pinned .rp__step { height: calc(100svh - var(--rp-top)); }

/* =========================================================================
   Narrow screens — single-column sequence (never pinned)
   ========================================================================= */
@media (max-width: 900px) {
  .rp__panel { grid-template-columns: 1fr; gap: 24px; padding: clamp(44px, 9vw, 64px) 0; text-align: center; }
  .rp__figure { max-width: min(340px, 78vw); }
  .rp__figure::after { width: 64px; height: 64px; inset: -12px -12px auto auto; }
  .rp__cap { max-width: 46ch; margin: 0 auto; }
  .rp__step-anno { justify-content: center; }
  /* pinned step-through kept on mobile — single column, fits the viewport */
  .rp--pinned .rp__stage { height: calc(100svh - var(--rp-top)); }
  .rp--pinned .rp__panels { height: calc(100svh - var(--rp-top)); }
  .rp--pinned .rp__panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 0 4px; text-align: center; }
  .rp--pinned .rp__figure { max-width: min(210px, 50vw); }
  .rp--pinned .rp__figure::after { width: 52px; height: 52px; inset: -10px -10px auto auto; }
  .rp--pinned .rp__figure img { height: auto; width: 100%; }
  .rp--pinned .rp__cap { max-width: 94%; }
  .rp--pinned .rp__step-anno { margin-bottom: 8px; }
  .rp--pinned .rp__title { font-size: clamp(19px, 5.4vw, 26px); margin-bottom: 8px; }
  .rp--pinned .rp__text { font-size: 14px; line-height: 1.5; }
  .rp--pinned .rp__cta { margin-top: 12px; padding: 12px 22px; font-size: 13px; }
  .rp--pinned .rp__dots { bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .rp--pinned .rp__stage { position: static; height: auto; display: block; overflow: visible; }
  .rp--pinned .rp__inner { display: block; height: auto; }
  .rp--pinned .rp__panels { height: auto; }
  .rp--pinned .rp__panel { position: relative; inset: auto; opacity: 1; visibility: visible;
    transform: none; padding: clamp(48px, 8vh, 100px) 0; border-top: 1px solid rgba(227,221,209,.14); }
  .rp--pinned .rp__figure img { height: auto; width: 100%; }
  .rp--pinned .rp__steps, .rp--pinned .rp__dots { display: none; }
}
