/* ============================================================
   HireJuno — referral.css  (/referral only)
   Load order: brand.css -> megamenu.css -> referral.css -> tokens.css
               -> motion.css -> juno-credits.css
   Brand tokens only (--juno-*, --ink*, --line*, --hj-*). No new palette.
   Motion: 150–300ms, transform/opacity only, off under reduced motion.
   ============================================================ */

.rf { --rf-radius: 22px; --rf-ease: cubic-bezier(.16, 1, .3, 1); }
.rf-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.rf h1, .rf h2, .rf h3 { text-wrap: balance; }
/* Component display rules below must never un-hide a [hidden] element. */
.rf [hidden] { display: none !important; }
/* brand .btn--outline text (#2E8B44) is under 4.5:1 at this size; use the AA green */
.rf .btn--outline { color: var(--juno-green-dark); border-color: var(--juno-green-dark); }
.rf .btn--outline:hover { color: var(--juno-green-deep); }

/* ---------- hero ---------- */
.rf-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 6vw, 88px) 0 clamp(40px, 7vw, 96px);
  background:
    radial-gradient(640px 360px at 92% -10%, rgba(46, 139, 68, .16), transparent 62%),
    radial-gradient(520px 340px at -8% 110%, rgba(246, 185, 59, .16), transparent 60%),
    var(--juno-green-tint);
}
.rf-hero .container { padding-inline: var(--hj-gutter, 16px); }
.rf-hero__grid {
  display: grid; gap: 22px;
  grid-template-areas: "intro" "card" "amounts";
}
.rf-hero__intro   { grid-area: intro; min-width: 0; }
.rf-card          { grid-area: card; }
.rf-hero__amounts { grid-area: amounts; min-width: 0; }

.rf-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 16px; padding: 6px 14px 6px 10px;
  border-radius: 999px; background: var(--paper);
  border: 1px solid rgba(46, 139, 68, .22);
  color: var(--juno-green-dark);
  font: 600 .88rem/1.2 var(--font-display);
}
.rf-eyebrow svg { width: 18px; height: 18px; }

.rf-hero h1 {
  font-size: clamp(2.4rem, 7.2vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.rf-lead {
  font-size: var(--hj-text-md, 1.1rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 0;
}
.rf-lead strong { color: var(--ink); font-weight: 600; }

.rf-amounts {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  max-width: 34rem;
}
.rf-amount {
  display: grid; gap: 6px; align-content: start;
  padding: 14px 14px 16px; border-radius: 18px;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: var(--hj-elev-2);
}
.rf-amount__top { display: flex; align-items: center; gap: 8px; }
.rf-amount__coin { flex: none; display: grid; place-items: center; }
.rf-amount__top strong {
  font: 800 1.75rem/1 var(--font-display);
  color: var(--juno-green-deep);
  letter-spacing: -0.02em;
}
.rf-amount__label { font-size: .86rem; line-height: 1.4; color: var(--ink-soft); }

.rf-hero__fine { margin: 0; font-size: .9rem; color: var(--hj-fg-subtle, #5F6B7F); }
.rf-linkbtn {
  background: none; border: 0; padding: 10px 2px; margin: -10px 0;
  color: var(--juno-green-dark); font: 600 .9rem/1.2 var(--font-body);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.rf-linkbtn:hover { color: var(--juno-green-deep); }

/* ---------- invite card ---------- */
.rf-card {
  position: relative;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px 18px 20px;
  box-shadow: var(--hj-elev-4);
}
.rf-card__pane.is-in { animation: rf-pane-in .26s var(--rf-ease) both; }
@keyframes rf-pane-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.rf-card__head { margin-bottom: 16px; }
.rf-card__title {
  font-size: 1.35rem; line-height: 1.2; margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.rf-card__text { margin: 0 0 18px; font-size: .96rem; line-height: 1.55; color: var(--ink-soft); }
.rf-card__head .rf-card__text { margin: 0; }
.rf-card__actions { display: grid; gap: 10px; }
.rf-card__actions .btn { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; }
.rf-card__fine { margin: 14px 0 0; font-size: .82rem; color: var(--hj-fg-subtle, #5F6B7F); }

.rf-card__badge {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 14px;
  background: var(--juno-green-tint); color: var(--juno-green-dark);
}
.rf-card__badge svg { width: 26px; height: 26px; }
.rf-card__badge--coin { background: #FFF6DC; }
.rf-card__badge--warn { background: var(--hj-warning-soft, #FDF3DC); color: var(--hj-warning, #8A6200); }

.rf-mono-soft { font-family: var(--font-display); letter-spacing: .02em; color: var(--juno-green-deep); white-space: nowrap; }

/* code */
.rf-code {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 8px 12px 16px; margin-bottom: 10px;
  border-radius: 16px;
  background: var(--juno-green-tint);
  border: 2px dashed rgba(46, 139, 68, .45);
}
.rf-code__label { display: block; font-size: .78rem; font-weight: 600; color: var(--juno-green-dark); margin-bottom: 2px; }
.rf-code__value {
  display: block;
  font: 800 clamp(1.45rem, 6.4vw, 1.85rem)/1.1 var(--font-display);
  letter-spacing: .02em;
  color: var(--juno-green-deep);
  overflow-wrap: anywhere;
}
.rf-iconbtn {
  flex: none; width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--paper); color: var(--juno-green-dark);
  border: 1.5px solid rgba(46, 139, 68, .35);
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.rf-iconbtn svg { width: 20px; height: 20px; }
.rf-iconbtn:hover { background: #F3FAF5; border-color: var(--juno-green); }
.rf-iconbtn:active { transform: scale(.95); }

/* link + copy: stacked on phones so the whole link is readable */
.rf-link { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rf-link__input {
  flex: 1 1 100%; min-width: 0; height: 50px;
  padding: 0 14px; border-radius: 14px;
  border: 1.5px solid var(--hj-border-interactive, #7E8794);
  background: var(--cream); color: var(--ink);
  font: 500 .95rem/1 var(--font-body);
  text-overflow: ellipsis;
}
.rf-link__input:focus { outline: 3px solid var(--hj-focus-color, #1F6B33); outline-offset: 1px; border-color: var(--juno-green); }
.rf-link__copy {
  position: relative; flex: 1 1 100%; min-height: 50px; padding: 0 18px;
  display: inline-grid; place-items: center; box-shadow: none;
}
.rf-link__copy > span {
  grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px;
  transition: opacity .18s ease, transform .22s var(--rf-ease);
}
.rf-link__copy svg { width: 18px; height: 18px; }
.rf-link__copy-done { opacity: 0; transform: translateY(6px); }
.rf-link__copy.is-done { background: var(--juno-green-deep); }
.rf-link__copy.is-done .rf-link__copy-idle { opacity: 0; transform: translateY(-6px); }
.rf-link__copy.is-done .rf-link__copy-done { opacity: 1; transform: none; }

/* share */
.rf-share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rf-card--native-share .rf-share { grid-template-columns: repeat(2, 1fr); }
.rf-share__btn {
  min-height: 52px; padding: 8px 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 14px; border: 1.5px solid var(--line-strong);
  background: var(--paper); color: var(--ink);
  font: 600 .9rem/1.1 var(--font-display);
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease;
}
.rf-share__btn svg { width: 20px; height: 20px; flex: none; }
.rf-share__btn:hover { border-color: var(--juno-green); color: var(--juno-green-dark); background: #F3FAF5; text-decoration: none; }
.rf-share__btn:active { transform: scale(.97); }
.rf-share__btn[hidden] { display: none; }

.rf-card__note {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 16px 0 0; padding: 12px 14px; border-radius: 14px;
  background: #FFF9EA; border: 1px solid #F4D48A;
  font-size: .9rem; line-height: 1.45; color: #5A3A00;
}
.rf-card__note .jc-coin { margin-top: 1px; }
.rf-card__note--warn { background: var(--hj-warning-soft, #FDF3DC); border-color: #EBCB82; color: var(--hj-warning, #8A6200); }
.rf-card--paused .rf-share,
.rf-card--paused .rf-link,
.rf-card--paused .rf-code { opacity: .5; pointer-events: none; }

/* skeleton */
.rf-skel {
  border-radius: 14px; margin-bottom: 12px;
  background: linear-gradient(90deg, #F3EFE6 0%, #FAF8F3 45%, #F3EFE6 90%);
  background-size: 200% 100%;
  animation: rf-shimmer 1.3s linear infinite;
}
.rf-skel--title { height: 26px; width: 60%; }
.rf-skel--code { height: 76px; }
.rf-skel--row { height: 50px; }
.rf-skel--grid { height: 52px; margin-bottom: 0; }
@keyframes rf-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- sections ---------- */
.rf-section { padding: clamp(44px, 7vw, 88px) 0; }
.rf-section .container { padding-inline: var(--hj-gutter, 16px); }
.rf-section--sand { background: var(--sand); }
.rf-section--referrals { padding-top: clamp(36px, 5vw, 64px); }
.rf-section__head { max-width: 40rem; margin: 0 auto clamp(24px, 4vw, 40px); text-align: center; }
.rf-section__head--left { margin-inline: 0; text-align: left; }
.rf-section__head h2, .rf-mine__head h2 { margin-bottom: 8px; }
.rf-section__sub { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- your referrals ---------- */
.rf-mine__head { margin-bottom: 20px; }
.rf-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 0 0 18px;
}
.rf-stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px 12px; min-width: 0;
}
.rf-stat dt { font-size: .8rem; line-height: 1.3; color: var(--ink-soft); font-weight: 500; }
.rf-stat dd {
  margin: 6px 0 0; display: flex; align-items: center; gap: 6px;
  font: 800 1.6rem/1 var(--font-display); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rf-stat--earned { background: #FFFBF0; border-color: #F4D48A; }
.rf-stat--earned dd { color: var(--juno-green-deep); }
.rf-stat__coin { display: inline-grid; }

.rf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rf-row {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center;
  padding: 14px; border-radius: 18px;
  background: var(--paper); border: 1px solid var(--line);
  animation: rf-row-in .26s var(--rf-ease) both;
  animation-delay: calc(var(--rf-i, 0) * 40ms);
}
@keyframes rf-row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rf-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font: 700 1.05rem/1 var(--font-display);
}
.rf-row__main { display: grid; gap: 4px; min-width: 0; }
.rf-row__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rf-row__name { font: 600 1rem/1.25 var(--font-display); color: var(--ink); }
.rf-row__line { font-size: .88rem; line-height: 1.4; color: var(--ink-soft); }

.rf-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  font: 600 .8rem/1.2 var(--font-display); white-space: nowrap;
  border: 1px solid transparent;
}
.rf-chip svg { width: 14px; height: 14px; flex: none; }
.rf-chip--joined    { background: var(--sand); color: var(--ink); border-color: var(--line-strong); }
.rf-chip--booked    { background: var(--hj-info-soft, #E3EEFB); color: var(--hj-info, #1D5A9E); }
.rf-chip--completed { background: var(--hj-warning-soft, #FDF3DC); color: var(--hj-warning, #8A6200); }
.rf-chip--review    { background: var(--hj-warning-soft, #FDF3DC); color: var(--hj-warning, #8A6200); }
.rf-chip--rewarded  { background: var(--hj-success-soft, #E4F3EA); color: var(--hj-success, #12734B); }
.rf-chip--void      { background: #F1F2F4; color: #4A5568; border-color: #DADDE2; }

.rf-empty {
  text-align: center; padding: 28px 20px;
  border: 1.5px dashed var(--line-strong); border-radius: 22px;
  background: var(--paper);
}
.rf-empty__art { width: 96px; margin: 0 auto 10px; }
.rf-empty h3 { font-size: 1.15rem; margin-bottom: 6px; }
.rf-empty p { max-width: 30rem; margin: 0 auto 16px; font-size: .95rem; }
.rf-empty .btn { min-height: 48px; }

/* ---------- how it works ---------- */
.rf-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rf-step {
  position: relative;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--rf-radius); padding: 22px 20px 20px;
  box-shadow: var(--hj-elev-1);
}
.rf-step__num {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--juno-green-tint); color: var(--juno-green-deep);
  font: 700 .95rem/1 var(--font-display);
}
.rf-step__art {
  width: 56px; height: 56px; border-radius: 18px; margin-bottom: 14px;
  display: grid; place-items: center;
  background: var(--juno-green-tint); color: var(--juno-green-dark);
}
.rf-step__art svg { width: 26px; height: 26px; }
.rf-step__art--coin {
  width: auto; min-width: 56px; padding: 0 12px 0 10px;
  display: inline-flex; gap: 6px; background: #FFF6DC; color: #7A4A00;
}
.rf-step__plus { font: 800 1.1rem/1 var(--font-display); }
.rf-step h3 { font-size: 1.15rem; margin-bottom: 6px; padding-right: 40px; }
.rf-step p { margin: 0; font-size: .95rem; line-height: 1.55; }

/* ---------- rules ---------- */
.rf-rules { max-width: 820px; margin: 0 auto; }
.rf-rules__card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--rf-radius); padding: clamp(18px, 4vw, 32px);
}
.rf-rules__lead { color: var(--ink); font-size: 1rem; line-height: 1.6; }
.rf-rules__lead strong { font-weight: 600; }
.rf-rules__list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.rf-rules__list li {
  position: relative; padding-left: 30px;
  font-size: .95rem; line-height: 1.6; color: var(--ink-soft);
}
.rf-rules__list li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--juno-green-tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F6B33' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.rf-rules__list a, .rf-rules__foot a, .rf-section__sub a { color: var(--juno-green-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rf-rules__foot { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .92rem; }

/* ---------- focus ---------- */
.rf :is(a, button, input):focus-visible {
  outline: 3px solid var(--hj-focus-color, #1F6B33);
  outline-offset: 2px;
}

/* ---------- larger screens ---------- */
@media (min-width: 480px) {
  .rf-card { padding: 26px 24px 24px; }
  .rf-link { flex-wrap: nowrap; }
  .rf-link__input { flex: 1 1 auto; }
  .rf-link__copy { flex: none; }
  .rf-share { grid-template-columns: repeat(3, 1fr); }
  .rf-card--native-share .rf-share { grid-template-columns: repeat(4, 1fr); }
  .rf-card__actions { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .rf-steps { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .rf-stats { gap: 14px; }
  .rf-stat { padding: 18px 20px; }
  .rf-stat dd { font-size: 2rem; }
  .rf-row { grid-template-columns: 48px 1fr; padding: 16px 20px; }
  .rf-avatar { width: 48px; height: 48px; }
  .rf-row__main { grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; }
  .rf-row__top { grid-column: 1; }
  .rf-row__line { grid-column: 1; }
}
@media (min-width: 960px) {
  .rf-hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    grid-template-areas: "intro card" "amounts card";
    grid-template-rows: auto 1fr;
    column-gap: 56px; row-gap: 24px;
    align-items: start;
  }
  .rf-card { align-self: center; }
  .rf-hero__intro { align-self: end; }
  .rf-card { padding: 30px 28px 28px; }
  .rf-list { gap: 12px; }
  #rfMine .container, #rfMine .rf-list { max-width: 1160px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rf-card__pane.is-in, .rf-row { animation: none; }
  .rf-skel { animation: none; }
  .rf-link__copy > span, .rf-share__btn, .rf-iconbtn { transition: none; }
}
