/* MiTax - referral.css
   Page-specific styles for the Referral / "Recommended by [Firm]" page.
   Built on the shared design system (tokens.css / base.css / components.css).
   Preserves the classes referral.js depends on: #ref-copy-btn, #ref-link-text,
   #ref-copy-ok + .is-hidden, #ref-whatsapp-btn, plus the .btn-whatsapp style.
   How-it-works uses the shared .steps / .step components. */

/* ---------- Page hero (shared pattern, scoped per page CSS) ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(52px, 7vw, 96px) 0 clamp(36px, 5vw, 60px);
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grad-hero);
  opacity: .85;
  pointer-events: none;
}
.page-hero .eyebrow { margin-bottom: var(--sp-4); }
.page-hero h1 { margin: 0 0 var(--sp-4); max-width: 22ch; }
.page-hero .lede { max-width: 56ch; margin: 0; }
.page-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

/* ---------- Share card ---------- */
.ref-share-card {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-lg);
}
.ref-share-card .badge { margin-bottom: var(--sp-4); }
.ref-share-card h2 {
  margin: 0 0 var(--sp-3);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
}
.ref-share-card > p {
  margin: 0 auto var(--sp-5);
  font-size: 15px;
  color: var(--ink-500);
  line-height: 1.55;
  max-width: 46ch;
}

/* Referral link readout */
.ref-link-row {
  display: flex;
  align-items: stretch;
  gap: var(--sp-2);
  max-width: 460px;
  margin: 0 auto var(--sp-4);
  flex-wrap: wrap;
  justify-content: center;
}
.ref-link-field {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 44px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-700);
  background: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ref-copy-ok {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-600);
  margin: 0 0 var(--sp-4);
}

/* Share buttons */
.ref-share-alt {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.btn-whatsapp {
  background: #25D366;
  color: #06331B;
  border-color: #25D366;
  font-weight: 600;
}
.btn-whatsapp:hover {
  background: #1EBE5A;
  border-color: #1EBE5A;
  color: #06331B;
  box-shadow: 0 8px 20px rgba(37, 211, 102, .28);
}
.btn-whatsapp svg { width: 18px; height: 18px; }

/* Utility: hidden state (referral.js toggles the copy-ok message). */
.is-hidden { display: none !important; }

/* ---------- Co-brand banner ---------- */
.ref-cobrand {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: center;
  padding: clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, var(--primary-050), var(--surface) 70%);
  border: 1px solid var(--primary-100);
  border-radius: var(--r-2xl);
}
@media (min-width: 760px) { .ref-cobrand { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--sp-7); } }
.ref-cobrand-copy h3 { margin: 0 0 8px; font-size: 19px; font-weight: 600; }
.ref-cobrand-copy p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-700); }
.ref-cobrand-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  font-size: 14px;
  color: var(--ink-500);
  box-shadow: var(--shadow-sm);
}
.ref-cobrand-badge strong { color: var(--ink); }
.ref-cobrand-badge .ref-firm-mark {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--primary-100);
  color: var(--primary);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Reward terms ---------- */
.ref-terms { max-width: 760px; }
.ref-terms-note {
  padding: 14px 16px;
  margin: 0 0 var(--sp-5);
  background: var(--accent-050);
  border: 1px solid var(--accent-100);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--ink-700);
  line-height: 1.55;
}
.ref-terms-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
@media (min-width: 720px) { .ref-terms-list { grid-template-columns: 1fr 1fr; } }
.ref-terms-list li {
  padding: 20px 22px;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.ref-terms-list h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.ref-terms-list p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-500); }
.ref-terms-list p .ph { color: var(--amber-600); font-weight: 600; }
