/* Referral Partner Program (/partners/referral)
   Deltas only. This page loads styles.css, facecapture.css (fc-steps,
   fc-value-card, fc-how-it-works) and contact.css (page-hero, form fields,
   honeypot, form status) first, so everything below is a scoped adjustment
   using the existing tokens. */

/* ---------- Hero ---------- */
.page-hero__bg--referral {
  background-image: url(../images/mine-facecapture-hero-v1.webp);
  background-position: 40%;
}

.ref-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2rem;
}

/* The shared ghost button is built for light sections (ink text, line border).
   On the hero photo it needs the on-dark treatment. */
.ref-hero__actions .btn--ghost {
  color: var(--white);
  background: transparent;
  border-color: #ffffff66;
}

.ref-hero__actions .btn--ghost:hover {
  color: var(--ink);
  background: var(--white);
  border-color: var(--white);
}

/* ---------- Sections ---------- */
.ref-program { background: var(--paper); }
.ref-who { background: var(--white); }
.ref-join { background: var(--white); }

/* The header is fixed at 88px. This page has no product sub-nav under it, so
   108px (88 + slack) is enough for the in-page links to clear it. */
#program,
#who,
#how-it-works,
#join { scroll-margin-top: 108px; }

.ref-program__inner { max-width: 760px; }
.ref-program__inner .section-head { margin-bottom: 2rem; }

.ref-program__body {
  color: var(--slate);
  font-size: var(--fs-lead);
  line-height: 1.6;
  margin: 0 0 1.2rem;
}

.ref-program__support {
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: 1.65;
  margin: 1.8rem 0 0;
}

/* ---------- Who we partner with ---------- */
/* The shared card grid is 4 across; this page wants a 2 x 2. */
@media (width>=901px) {
  .fc-value-cards--2up { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- How it works ---------- */
.ref-steps__note {
  color: var(--slate);
  font-size: var(--fs-lead);
  line-height: 1.6;
  text-align: center;
  max-width: 680px;
  margin: 3rem auto 0;
}

/* ---------- Join the program ---------- */
.ref-join__card {
  max-width: 760px;
  margin-inline: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

.ref-join__card .btn { width: 100%; justify-content: center; }

.ref-regions {
  border: 0;
  margin: 0 0 1.1rem;
  padding: 0;
}

.ref-regions legend {
  font-family: var(--font-display);
  color: var(--slate);
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .55rem;
  padding: 0;
}

.ref-regions legend .req { color: var(--olive-text); }

.ref-regions__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem 1.1rem;
}

.ref-regions__option {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  color: var(--ink);
  font-size: .95rem;
  line-height: 1.4;
}

/* contact.css sets .field input { width: 100% }, which would stretch these
   checkboxes across their grid cell and push the label to the far edge. */
.ref-regions__option input {
  accent-color: var(--olive);
  width: auto;
  margin: .15rem 0 0;
  flex: none;
}

.field__help {
  color: var(--slate);
  font-size: .82rem;
  line-height: 1.5;
  margin: .45rem 0 0;
}

.field__error {
  color: var(--error);
  font-size: .82rem;
  line-height: 1.5;
  margin: .5rem 0 0;
  display: none;
}

.ref-regions.is-invalid .field__error { display: block; }

.ref-join__aside {
  max-width: 760px;
  margin: 1.6rem auto 0;
  color: var(--slate);
  font-size: .88rem;
  line-height: 1.6;
}

.ref-join__aside p { margin: 0 0 .4rem; }
.ref-join__aside a { color: var(--olive-text); text-decoration: underline; }
.ref-join__aside a:hover { color: var(--olive-text-hover); }

/* ---------- Success state (replaces the form in place) ---------- */
.ref-success {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  background: var(--olive-soft);
  border: 1px solid var(--olive);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
}

.ref-success[hidden] { display: none; }
.ref-success:focus { outline: 2px solid var(--olive); outline-offset: 3px; }

.ref-success svg {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 2px;
  color: var(--olive-deep);
}

.ref-success p {
  color: var(--olive-deep);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (width<=760px) {
  .ref-regions__list { grid-template-columns: repeat(2, 1fr); }
}

@media (width<=520px) {
  .ref-regions__list { grid-template-columns: 1fr; }
  .ref-hero__actions .btn { width: 100%; justify-content: center; }
}
