/* ============================================================
   Pay it Forward — hero pitch, orange benefits band, 3-step
   donate path, and the "bring a senior" referral block.
   Chrome comes from styles.css; splash shapes straddle the
   band the same way the sponsor page does.
   ============================================================ */

body.payitforward-page {
  background-color: #eadfcb;
}

.payitforward-page .desktop-view-wrapper,
.payitforward-page .mobile-view-wrapper {
  min-height: 0;
}

.payitforward-page .navigation-tab p[data-nav-link] {
  cursor: pointer;
}

/* ---------------- shared bits ---------------- */
.pf-h2 {
  font-family: "Cause", "Jersey 25", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  color: #17130d;
  margin: 0 0 18px;
}

.pf-lede {
  font-family: "Hammersmith One", sans-serif;
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.5;
  color: #3f3a30;
  margin: 0;
}

.pf-inline-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pf-inline-link:hover {
  color: #f35933;
}

/* scroll-reveal (payitforward.js adds .is-in via IntersectionObserver) */
.pf-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.pf-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* bounce/pop variant — for buttons and other elements that should snap
   in with a little recoil rather than the plain fade-and-rise above.
   cubic-bezier(.34,1.56,.64,1) overshoots past 1 before settling, which
   is what gives the "landed with a bounce" feel. Combined with .pf-reveal
   (two-class specificity) so it overrides the plain transform/timing
   above without needing any JS changes — the same observer drives both. */
.pf-pop.pf-reveal {
  transform: scale(0.6);
  transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pf-pop.pf-reveal.is-in {
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .pf-reveal { opacity: 1; transform: none; transition: none; }
}

/* buttons */
.pf-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  padding: 14px 26px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pf-cta--primary {
  color: #fff;
  background: #f35933;
  box-shadow: 0 8px 18px rgba(243, 89, 51, 0.4);
}

.pf-cta--primary:hover {
  background: #d94a29;
  transform: translateY(-2px);
}

.pf-cta--primary:active {
  transform: translateY(0);
}

/* ---------------- top wrapper + splash shapes ---------------- */
.pf-top {
  position: relative;
  overflow: hidden;
  background-color: #eadfcb;
}

.pf-splash {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.pf-splash svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* both blobs straddle the orange band, like the mock */
.pf-splash-blue {
  width: 540px;
  height: 540px;
  left: -250px;
  top: 240px;
}

.pf-splash-green {
  width: 560px;
  height: 560px;
  right: -240px;
  top: 150px;
}

.pf-splash-green svg {
  animation: archive-spin 18s linear infinite;
}

.pf-splash-blue svg {
  animation: archive-spin 22s linear infinite reverse;
}

/* ---------------- hero ---------------- */
.pf-hero {
  position: relative;
  z-index: 3;
  padding: 64px 24px 84px;
  max-width: 1020px;
  margin: 0 auto;
}

.pf-title {
  font-family: "Cause", "Jersey 25", sans-serif;
  font-weight: 700;
  color: #000;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.02;
  margin: 0 0 52px;
  text-align: center;
}

.pf-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.pf-hero-grid .pf-lede {
  max-width: 430px;
}

/* framed photo cards */
.pf-shot.pf-reveal {
  transition-duration: 0.3s;
}

.pf-shot {
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.pf-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-shot-hero {
  width: 100%;
  max-width: 470px;
  aspect-ratio: 1200 / 848;
  transform: rotate(-2deg);
  justify-self: center;
}

.pf-shot-refer {
  width: min(420px, 92%);
  aspect-ratio: 1;
  transform: rotate(2deg);
  justify-self: center;
}

/* ---------------- benefits band ---------------- */
.pf-benefits {
  /* no z-index: the band's background stays under the splash shapes
     while its z-indexed children paint above them (sponsor.css trick) */
  position: relative;
  background-color: #f35933;
  padding: 64px 24px 72px;
  text-align: center;
}

.pf-benefits-title {
  position: relative;
  z-index: 3;
  font-family: "Cause", "Jersey 25", sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.05;
  margin: 0 0 20px;
}

.pf-benefits-copy {
  position: relative;
  z-index: 3;
  font-family: "Hammersmith One", sans-serif;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.4;
  color: #fff;
  max-width: 460px;
  margin: 0 auto;
}

/* ---------------- donate steps ---------------- */
.pf-give {
  position: relative;
  z-index: 3;
  max-width: 680px;
  margin: 0 auto;
  padding: 88px 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pf-give-intro {
  font-family: "Hammersmith One", sans-serif;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.45;
  color: #17130d;
  text-align: center;
  max-width: 470px;
  margin: 0 0 40px;
}

.pf-rule {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #d9d1bf;
}

/* wraps the drawn line + the steps list so both can be measured and
   revealed as one synced group, instead of each step fading in on
   its own */
.pf-steps-wrap {
  position: relative;
  width: 100%;
}

/* the group itself doesn't fade/slide — the line drawing down and the
   dots dropping in ARE the reveal, so the generic .pf-reveal motion
   is neutralised here */
.pf-steps-wrap.pf-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* drawn on top of the steps; position/height/left are set by
   payitforward.js from the actual rendered dot positions, since step
   text wraps to different heights and fixed offsets can't track that */
.pf-steps-line {
  position: absolute;
  width: 0;
  border-left: 3px dashed #f3956f;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s cubic-bezier(0.22, 1.3, 0.36, 1);
  pointer-events: none;
}

.pf-steps-wrap.is-in .pf-steps-line {
  transform: scaleY(1);
}

.pf-steps {
  list-style: none;
  margin: 44px 0 10px;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.pf-step {
  position: relative;
  padding-left: 62px;
}

.pf-step-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f35933;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 12px rgba(243, 89, 51, 0.4);
  /* dropped in from above as the line reaches it; payitforward.js sets
     transition-delay per dot so they land in sequence, not all at once */
  opacity: 0;
  transform: translateY(-16px) scale(0.5);
  transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pf-steps-wrap.is-in .pf-step-dot {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pf-step h3 {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 17.5px;
  color: #17130d;
  margin: 6px 0 6px;
}

.pf-step p {
  font-family: "Poppins", sans-serif;
  font-size: 15.5px;
  line-height: 1.5;
  color: #6d675a;
  margin: 0;
  max-width: 540px;
}

.pf-give-cta {
  margin: 26px 0 44px;
}

/* ---------------- refer ---------------- */
.pf-refer {
  position: relative;
  z-index: 3;
  max-width: 940px;
  margin: 0 auto;
  padding: 88px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pf-refer-title {
  text-align: center;
  margin-bottom: 48px;
}

.pf-refer-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}

/* the mock renders this block a notch smaller than the donate steps */
.pf-steps--compact {
  margin: 0;
  gap: 26px;
}

.pf-steps--compact .pf-step {
  padding-left: 50px;
}

.pf-steps--compact .pf-step-dot {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.pf-steps--compact .pf-step h3 {
  font-size: 15.5px;
  margin-top: 4px;
}

.pf-steps--compact .pf-step p {
  font-size: 13.5px;
}

/* title-only variant (refer steps): no <p>, so the dot centers on the
   title itself and the connector only needs to bridge the gap between
   items rather than reach past a paragraph */
.pf-steps--title-only .pf-step {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding-left: 0;
}

.pf-steps--title-only .pf-step-dot {
  position: static;
  flex-shrink: 0;
  margin-right: 20px;
}

.pf-steps--title-only .pf-step h3 {
  margin: 0;
  line-height: 1.35;
}

.pf-refer-ctas {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 52px;
}


/* ------------------------------------------------------------
   Responsive — the mobile layout the mock implies: everything
   stacks to one centred column, image above its copy.
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .pf-splash-blue { width: 400px; height: 400px; left: -210px; }
  .pf-splash-green { width: 420px; height: 420px; right: -220px; }
}

@media (max-width: 767px) {
  .pf-hero {
    padding: 48px 20px 64px;
  }

  .pf-title {
    margin-bottom: 38px;
  }

  .pf-hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .pf-hero-grid .pf-lede {
    max-width: none;
    text-align: center;
  }

  .pf-shot-hero {
    max-width: min(420px, 100%);
  }

  .pf-splash-blue { width: 280px; height: 280px; left: -170px; top: 300px; }
  .pf-splash-green { width: 300px; height: 300px; right: -180px; top: 200px; }

  .pf-benefits {
    padding: 52px 20px 60px;
  }

  .pf-give {
    padding: 64px 20px 0;
  }

  .pf-give-intro {
    margin-bottom: 32px;
  }

  .pf-steps {
    margin-top: 36px;
    gap: 30px;
  }

  .pf-refer {
    padding: 72px 20px 44px;
  }

  .pf-refer-title {
    margin-bottom: 36px;
  }

  .pf-refer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* compact steps read at full size once they own the column */
  .pf-steps--compact .pf-step h3 { font-size: 16.5px; }
  .pf-steps--compact .pf-step p { font-size: 14.5px; }

  .pf-refer-ctas {
    margin-top: 44px;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
  }

  .pf-refer-ctas .pf-cta {
    justify-content: center;
  }

}
