/* =========================================================================
   08 — Krak-style referral banner (._share-referral)
   Replaces the old testimonials. Dark panel, white people-tag pills with
   black handles in two counter-drifting marquee rows (same -50% loop
   mechanics as the QR flag rows), invite copy + white CTA pill.
   ========================================================================= */

._share-referral {
  position: relative;
  overflow: hidden;
  background: var(--surface-dark);
  color: #fff;
  padding-block: clamp(96px, 12vw, 168px);
}

._share-referral h2 { max-width: 14em; }

/* ---- People marquee rows ------------------------------------------------ */
._share-referral .people-rows {
  width: var(--100vw);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 28px);
  margin-block: clamp(40px, 5vw, 72px);
}
._share-referral .people-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
._share-referral .people-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
/* The loop is armed by JS (data-ready) once the single authored group has
   been cloned to 4 identical copies — the -50% keyframe then lands exactly
   on a copy boundary (seamless). Without JS the static row just sits. */
._share-referral .people-track[data-ready="true"] {
  animation: share-people 40s linear infinite;
}
._share-referral .people-track.reverse[data-ready="true"] {
  animation-name: share-people-rev;
}
@keyframes share-people {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
@keyframes share-people-rev {
  from { transform: translate3d(-50%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* Groups tile seamlessly: inter-pill gap == group padding-right */
._share-referral .people-group {
  display: flex;
  gap: clamp(14px, 1.4vw, 22px);
  padding-right: clamp(14px, 1.4vw, 22px);
}

/* ---- Pills: white, black tag text --------------------------------------- */
._share-referral .person-pill {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, .8vw, 12px);
  height: clamp(52px, 4.4vw, 68px);
  padding: 6px;
  padding-right: clamp(18px, 1.7vw, 26px);
  border-radius: 999px;
  background: #fff;
  color: var(--orange-900);
}
._share-referral .avatar {
  position: relative;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  width: clamp(40px, 3.4vw, 56px);
  height: clamp(40px, 3.4vw, 56px);
  border-radius: 100%;
  background: #e9e9ec;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: var(--fw-semi);
}
._share-referral .avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
._share-referral .handle {
  font-size: clamp(17px, 1.55vw, 24px);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  letter-spacing: .01em;
}

/* ---- Copy + CTA --------------------------------------------------------- */
._share-referral .invite { opacity: .92; }
._share-referral .share-cta {
  margin-top: clamp(32px, 3.4vw, 48px);
  --color: var(--orange);
  --background-color: #fff;
}

/* ---- Mobile ------------------------------------------------------------- */
@media only screen and (max-width: 743px) {
  ._share-referral .people-rows { gap: 12px; }
  ._share-referral h2,
  ._share-referral .invite { padding-inline: var(--grid-margin); }
}
