/* ==========================================================================
   Foundation "Participate as an Individual" (measured on live nafas.com/foundation)
   Live: desktop/tablet .framer-6y3few > .framer-1kxr0um (#participate), phone .framer-cvtwiz.
   Breakpoints (Framer CSS of this page): desktop >= 1200, tablet 810-1199.98, phone <= 809.98.
   - Column rule: section is full width with padding 0 12px 12px; the rounded #f5f5f5 frame is its child.
   - Desktop: frame padding 140, content box 936 x 953 with absolute children (title top 1, leads top 91 / 217,
     cards row at the bottom: two 458px cards, gap 20). Card = photo (1.49988:1) + 288px info column (bottom aligned).
     Hover anywhere on a card: card black, card texts white (0.2s); hover on its pill: pill white.
   - Tablet: one column, gap 40; cards "Buy" then "Donate", full width; text boxes 100px tall.
   - Phone: frame padding 80 20; cards "Buy" then "Donate" like desktop (live: Donate first; Danny, 2026-10-28); Buy card 531px tall with its pill at the bottom.
   - Pills: "Read report" turns white on hover (0.2s). "Buy a sensor" (tablet/phone) turns black at 0.8 opacity with
     green link text on hover, #f5f5f5 while pressed; only the inline text link navigates (same tab), as on live.
   - Scroll reveal (js/60-participate.js): every text block fades 0 -> 1 in 0.4s cubic-bezier(.25,.3,.25,1) when half
     of it is in view, and fades out again when less than half is in view (live replays it both ways).
   ========================================================================== */

/* ---------- base (desktop >= 1200) ---------- */
.nf-fd-part {
  position: relative; display: flex; justify-content: center;
  width: 100%; padding: 0 12px 12px; background-color: var(--nf-white);
}
.nf-fd-part__frame {
  position: relative; flex: 1 0 0; width: 1px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 40px;
  padding: 140px; background-color: var(--nf-grey-f5); border-radius: 12px; overflow: hidden;
}
.nf-fd-part__body { position: relative; flex: 0 0 auto; width: 936px; height: 953px; overflow: hidden; }

.nf-fd-part__title, .nf-fd-part__lead, .nf-fd-part__dhead, .nf-fd-part__dtext, .nf-fd-part__head, .nf-fd-part__text {
  white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word;
  font-family: var(--nf-font-regular); font-weight: 400; line-height: 1.2; letter-spacing: normal; text-align: left;
}
.nf-fd-part__title { position: absolute; top: 1px; left: 0; width: 100%; font-size: 42px; color: var(--nf-green); }
.nf-fd-part__lead { position: absolute; left: 0; width: 100%; font-size: 24px; color: var(--nf-black); }
.nf-fd-part__lead--1 { top: 91px; }
.nf-fd-part__lead--2 { top: 217px; }

/* desktop cards */
.nf-fd-part__dcards {
  position: absolute; left: 0; bottom: 0; width: 100%;
  display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 20px; overflow: hidden;
}
.nf-fd-part__dcard {
  position: relative; flex: 1 0 0; width: 1px;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 0;
  padding: 24px; background-color: var(--nf-white); border-radius: 12px; overflow: hidden;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); cursor: pointer;
  transition: background-color 0.2s ease;
}
.nf-fd-part__dphoto { position: relative; flex: 0 0 auto; width: 100%; aspect-ratio: 1.49988 / 1; border-radius: 8px; }
.nf-fd-part__imgwrap { position: absolute; inset: 0; border-radius: inherit; }
.nf-fd-part__imgwrap img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: inherit; }
.nf-fd-part__dinfo {
  position: relative; flex: 0 0 auto; width: 100%; height: 288px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 20px; overflow: hidden;
}
.nf-fd-part__icon { display: block; flex: 0 0 auto; fill: var(--nf-green); overflow: hidden; }
.nf-fd-part__icon--tower { width: 28px; height: 28px; }
.nf-fd-part__icon--heart { width: 30px; height: 28px; }
.nf-fd-part__icon--tower44 { width: 44px; height: 44px; }
.nf-fd-part__dhead-box, .nf-fd-part__dtext-box { position: relative; flex: 0 0 auto; width: 100%; }
.nf-fd-part__dtext-box { height: 77px; }
.nf-fd-part__dhead { font-size: 28px; color: var(--nf-black); transition: color 0.2s ease; }
.nf-fd-part__dtext { font-size: 16px; color: var(--nf-black); transition: color 0.2s ease; }
.nf-fd-part__drow { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 0; flex: 0 0 auto; }

/* green pills ("Be a sponsor", "Read report") */
.nf-fd-part__dbtn, .nf-fd-part__btn {
  position: relative; flex: 0 0 auto; display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 10px;
  height: 54px; padding: 16px 24px; background-color: var(--nf-green); border-radius: 32px;
  text-decoration: none; cursor: pointer; transition: background-color 0.2s ease;
  color: #0000ee; /* live leaves the UA link colour on the pill (its label sets its own black) */
}
.nf-fd-part__dbtn-label, .nf-fd-part__btn-label, .nf-fd-part__pill-label {
  display: block; white-space: pre;
  font-family: var(--nf-font-regular); font-weight: 400; font-size: 21px; line-height: 1.2; letter-spacing: normal;
  color: var(--nf-black);
}

/* tablet / phone cards (hidden on desktop) */
.nf-fd-part__cards { display: none; }

/* icon sprite */
.nf-fd-part__defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- tablet (810 - 1199.98) ---------- */
@media (min-width: 810px) and (max-width: 1199.98px) {
  .nf-fd-part__body {
    width: 100%; height: auto; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 40px;
  }
  .nf-fd-part__title, .nf-fd-part__lead { position: relative; top: auto; left: auto; flex: 0 0 auto; }
  .nf-fd-part__dcards { display: none; }
  .nf-fd-part__cards {
    position: relative; flex: 0 0 auto; width: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 20px; overflow: hidden;
  }
}

/* ---------- tablet and phone: card internals ---------- */
@media (max-width: 1199.98px) {
  .nf-fd-part__card {
    position: relative; flex: 0 0 auto; width: 100%;
    display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 20px;
    padding: 24px; background-color: var(--nf-white); border-radius: 12px; overflow: hidden;
  }
  .nf-fd-part__photo { position: relative; flex: 0 0 auto; width: 100%; aspect-ratio: 1.49891 / 1; border-radius: 8px; min-height: 0; }
  .nf-fd-part__card--buy .nf-fd-part__photo { z-index: 1; }
  .nf-fd-part__icon-frame { position: relative; flex: 0 0 auto; width: 47px; aspect-ratio: 1.07143 / 1; }
  .nf-fd-part__icon-frame .nf-fd-part__icon { position: absolute; top: 8px; left: 9px; }
  .nf-fd-part__head { position: relative; flex: 0 0 auto; width: 100%; font-size: 28px; color: var(--nf-black); }
  .nf-fd-part__text-box { position: relative; flex: 0 0 auto; width: 100%; height: 100px; }
  .nf-fd-part__text { font-size: 16px; color: var(--nf-black); }
  .nf-fd-part__row {
    position: relative; flex: 0 0 auto; width: 100%; height: 54px;
    display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-end; gap: 10px;
  }
  /* "Buy a sensor": a pill with an inline text link (only the text navigates, like live) */
  .nf-fd-part__pill {
    position: relative; flex: 0 0 auto; width: 168px; height: 54px;
    display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 0;
    padding: 16px 24px; background-color: var(--nf-green); border-radius: 32px; opacity: 1; cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
  }
  .nf-fd-part__pill-label {
    -webkit-user-select: none; user-select: none;
    font-feature-settings: "cv09" on, "cv01" on, "cv11" on, "cv05" on;
    transition: color 0.2s ease;
  }
  .nf-fd-part__pill-link { color: var(--nf-black); text-decoration: none; }
}

/* ---------- phone (<= 809.98) ---------- */
@media (max-width: 809.98px) {
  .nf-fd-part__frame { padding: 80px 20px; }
  .nf-fd-part__body {
    width: 100%; height: auto; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 40px;
  }
  .nf-fd-part__title, .nf-fd-part__lead { position: relative; top: auto; left: auto; flex: 0 0 auto; }
  .nf-fd-part__title { font-size: 28px; }
  .nf-fd-part__lead { font-size: 18px; }
  .nf-fd-part__dcards { display: none; }
  .nf-fd-part__cards {
    position: relative; flex: 0 0 auto; width: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 20px; overflow: hidden;
  }
  .nf-fd-part__card--buy { height: 531px; }
  .nf-fd-part__head { font-size: 24px; }
  .nf-fd-part__text-box { height: auto; }
  .nf-fd-part__card--buy .nf-fd-part__row { flex: 1 0 0; height: 1px; }
  .nf-fd-part__card--buy .nf-fd-part__pill { flex: 1 0 0; width: 1px; }
  .nf-fd-part__card--donate .nf-fd-part__row { flex-direction: column; justify-content: flex-end; align-items: flex-end; height: auto; }
  .nf-fd-part__card--donate .nf-fd-part__btn { width: 100%; }
  .nf-fd-part__btn-label, .nf-fd-part__pill-label { font-size: 16px; }
}

/* ---------- interactions ---------- */
@media (hover: hover) {
  .nf-fd-part__dcard:hover { background-color: var(--nf-black); }
  .nf-fd-part__dcard:hover .nf-fd-part__dhead, .nf-fd-part__dcard:hover .nf-fd-part__dtext { color: var(--nf-white); }
  .nf-fd-part__dbtn:hover, .nf-fd-part__btn:hover { background-color: var(--nf-white); }
  .nf-fd-part__pill:hover { background-color: var(--nf-black); opacity: 0.8; }
  .nf-fd-part__pill:hover .nf-fd-part__pill-label { color: var(--nf-white); }
  .nf-fd-part__pill:hover .nf-fd-part__pill-link { color: var(--nf-green); }
}
.nf-fd-part__pill:active { background-color: var(--nf-grey-f5); opacity: 1; }
.nf-fd-part__pill:active .nf-fd-part__pill-label { color: var(--nf-black); }
.nf-fd-part__pill:active .nf-fd-part__pill-link { color: var(--nf-green); }

/* ---------- scroll reveal (js/60-participate.js toggles .is-inview) ---------- */
[data-fd-part-inview] { opacity: 0; transition: opacity 0.4s cubic-bezier(0.25, 0.3, 0.25, 1); }
[data-fd-part-inview].is-inview { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  [data-fd-part-inview] { opacity: 1; transition: none; }
}

/* Phone: the standard phone pill, 15px text, 35px tall (was 16px / 54px) (QC 2026-10-28). */
@media (max-width: 809.98px) {
  .nf-fd-part__btn, .nf-fd-part__dbtn { height: 35px; padding: 0 16px; }
  .nf-fd-part__btn-label, .nf-fd-part__dbtn-label { font-size: 15px; line-height: 1.2; }
}
