/* Your Returns — Figma 2324:399 / 2346:1507
   EarningMap (2324:407) · StreamHeader (2324:459) · ProductRow ×2 (2324:463, 2324:532) */
.returns {
  --returns-node: linear-gradient(140deg, var(--accent-deep) 14.51%, var(--cta-b) 85.49%);
  --returns-pill: rgba(49, 226, 154, .14);
  padding-top: 0; /* design: section starts flush; Marketplace above supplies the gap */
}

/* ---------- EarningBento (the five Figma streams; visuals are text-free) ----------
   Desktop 4 columns:  own own   refer   partner
                       own own   advisor partner
                       team team team    team               */
.returns__bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "own own refer partner"
    "own own advisor partner"
    "team team team team";
  gap: 16px;
}
.returns__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--el-sm);
  transition: box-shadow var(--t-card) var(--ease), border-color var(--t-card) var(--ease);
}
.returns__tile--own     { grid-area: own; padding: 30px; background: linear-gradient(160deg, #e9faf2 0%, var(--surface) 55%); }
.returns__tile--refer   { grid-area: refer; }
.returns__tile--advisor { grid-area: advisor; }
.returns__tile--partner { grid-area: partner; color: #fff; border-color: transparent; background: linear-gradient(165deg, var(--ink-btn) 0%, var(--ink-deep) 85%); }
.returns__tile--team    { grid-area: team; flex-direction: row; align-items: center; gap: 24px; }
@media (hover: hover) {
  .returns__tile:hover { box-shadow: var(--el-md); border-color: rgba(22, 169, 122, .35); }
}

.returns__lane-tag {
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cta-b);
}
.returns__lane-tag--own { color: var(--accent-deep); }
.returns__tile--partner .returns__lane-tag { color: var(--accent); }

.returns__n {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 6px;
  border-radius: 9px;
  background: var(--returns-node);
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
}
.returns__tile-title { font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }
.returns__tile-title--lg { font-size: 26px; }
.returns__tile--partner .returns__tile-title { color: #fff; }
.returns__tile-text { font-size: 13.5px; line-height: 1.55; color: var(--muted); max-width: 40ch; }
.returns__tile--partner .returns__tile-text { color: #a8c6c0; }
.returns__pill {
  margin-top: auto;
  padding: 5px 11px;
  border-radius: 99px;
  background: var(--returns-pill);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--accent-deep);
  white-space: nowrap;
}
.returns__tile--partner .returns__pill { background: rgba(49, 226, 154, .16); color: var(--accent); }

/* 01 · yield + growth chart */
.returns__yield { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.returns__yield-num {
  font-size: 58px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  background: var(--grad-stat);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.returns__yield-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.returns__chart { position: relative; align-self: stretch; margin-top: auto; padding-top: 16px; }
.returns__chart svg { display: block; width: 100%; height: 200px; overflow: visible; }
@media (max-width: 720px) { .returns__chart svg { height: 130px; } }
.returns__chart-line { stroke: var(--accent-deep); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.returns__chart-pay circle { fill: var(--surface); stroke: var(--accent-deep); stroke-width: 2.5; vector-effect: non-scaling-stroke; }

/* 02 · referral link + avatars */
.returns__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  align-self: stretch;
  margin-top: 6px;
  padding: 8px 8px 8px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(22, 169, 122, .45);
  background: rgba(49, 226, 154, .06);
}
.returns__link-icon { flex: none; color: var(--accent-deep); }
.returns__link-line { flex: 1; height: 8px; border-radius: 99px; background: linear-gradient(90deg, rgba(22, 169, 122, .35), rgba(22, 169, 122, .08)); }
.returns__avatars { display: flex; flex: none; }
.returns__avatars i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: -7px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--grad-mark);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 800;
  color: var(--ink-deep);
}
.returns__avatars i:last-child { background: var(--ink-deep); box-shadow: inset 0 0 0 5px var(--ink-deep), inset 0 0 0 7px var(--accent); }

/* 03 · commission bars */
.returns__bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  align-self: stretch;
  height: 150px;
  margin-block: 14px 4px;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.returns__bars i {
  position: relative;
  flex: 1;
  height: calc(var(--h) * 100%);
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(49, 226, 154, .25) 100%);
  transform-origin: bottom;
}
.returns__bars i:not(:last-child) { opacity: .55; }


/* 05 · team tree */
.returns__team-copy { flex: 0 1 300px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.returns__team-copy .returns__pill { margin-top: 8px; }
.returns__tree { flex: 1 1 0; min-width: 0; height: 150px; overflow: visible; }
.returns__tree-link { fill: none; stroke: var(--accent-deep); stroke-width: 1.6; stroke-dasharray: 4 4; opacity: .55; }
.returns__tree-you circle { fill: var(--ink-deep); }
.returns__tree-you .returns__tree-core { fill: var(--accent); }
.returns__tree-node circle { fill: var(--cta-b); stroke: var(--surface); stroke-width: 3; }
.returns__tree-leaf circle { fill: rgba(49, 226, 154, .35); stroke: var(--accent-deep); stroke-width: 1.5; }


/* ---- Bento motion: each tile's visual plays when the tile is revealed ---- */
.js .returns__chart-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.45, .05, .25, 1) .35s; }
.js .returns__chart-area { opacity: 0; transition: opacity 1s var(--ease) 1.2s; }
.js .returns__chart-pay circle { opacity: 0; transform: scale(0); transform-box: fill-box; transform-origin: center; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), opacity .3s; }
.js .returns__tile.in .returns__chart-line { stroke-dashoffset: 0; }
.js .returns__tile.in .returns__chart-area { opacity: 1; }
.js .returns__tile.in .returns__chart-pay circle { opacity: 1; transform: none; }
.js .returns__tile.in .returns__chart-pay circle:nth-child(1) { transition-delay: .7s; }
.js .returns__tile.in .returns__chart-pay circle:nth-child(2) { transition-delay: 1s; }
.js .returns__tile.in .returns__chart-pay circle:nth-child(3) { transition-delay: 1.3s; }
.js .returns__tile.in .returns__chart-pay circle:nth-child(4) { transition-delay: 1.65s; animation: rb-ping 2.4s ease-out 2.4s infinite; }
@keyframes rb-ping { 0% { stroke-width: 2.5; } 50% { stroke-width: 9; stroke-opacity: .25; } 100% { stroke-width: 2.5; } }

.js .returns__bars i { transform: scaleY(0); transition: transform .9s var(--ease); }
.js .returns__tile.in .returns__bars i { transform: none; }
.js .returns__tile.in .returns__bars i:nth-child(2) { transition-delay: .1s; }
.js .returns__tile.in .returns__bars i:nth-child(3) { transition-delay: .2s; }
.js .returns__tile.in .returns__bars i:nth-child(4) { transition-delay: .3s; }
.js .returns__tile.in .returns__bars i:nth-child(5) { transition-delay: .4s; }
.js .returns__tile.in .returns__bars i:nth-child(6) { transition-delay: .5s; }

.js .returns__avatars i { opacity: 0; transform: translateX(10px); transition: opacity .4s, transform .5s var(--ease); }
.js .returns__tile.in .returns__avatars i { opacity: 1; transform: none; }
.js .returns__tile.in .returns__avatars i:nth-child(2) { transition-delay: .12s; }
.js .returns__tile.in .returns__avatars i:nth-child(3) { transition-delay: .24s; }
.js .returns__tile.in .returns__avatars i:nth-child(4) { transition-delay: .36s; }

.js .returns__tree-link { stroke-dashoffset: 1; stroke-dasharray: 1; transition: stroke-dasharray 0s, stroke-dashoffset 1s var(--ease) .3s; }
.js .returns__tile.in .returns__tree-link { stroke-dashoffset: 0; }
.js .returns__tree-node circle,
.js .returns__tree-leaf circle { opacity: 0; transform: scale(0); transform-box: fill-box; transform-origin: center; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1) .6s, opacity .3s .6s; }
.js .returns__tile.in .returns__tree-leaf circle { transition-delay: .95s; }
.js .returns__tile.in .returns__tree-node circle,
.js .returns__tile.in .returns__tree-leaf circle { opacity: 1; transform: none; }


/* ---- Bento responsive ---- */
@media (max-width: 1060px) {
  .returns__bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "own own"
      "refer advisor"
      "partner partner"
      "team team";
  }
}
@media (max-width: 720px) {
  .returns__bento { grid-template-columns: minmax(0, 1fr); grid-template-areas: "own" "refer" "partner" "advisor" "team"; gap: 12px; }
  .returns__tile, .returns__tile--own { padding: 22px; border-radius: 22px; }
  .returns__tile-title--lg { font-size: 22px; }
  .returns__yield-num { font-size: 46px; }
  .returns__bars { height: 110px; }
  .returns__tile--team { flex-direction: column; align-items: stretch; }
  .returns__team-copy { flex: none; }
  .returns__tree { flex: none; height: 120px; }
}


/* ---------- StreamHeader — emphasised as a banner (copy unchanged) ---------- */
.returns__stream-head {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 22px;
  row-gap: 10px;
  margin-top: 64px;
  padding: 26px 32px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(22, 169, 122, .2);
  border-radius: 24px;
  background: linear-gradient(100deg, rgba(49, 226, 154, .2) 0%, rgba(25, 154, 172, .08) 55%, rgba(255, 255, 255, .6) 100%);
  box-shadow: var(--el-sm);
}
.returns__stream-head::before {              /* faint plot grid on the right, fading in from the left */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(22, 169, 122, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 169, 122, .12) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
}
.returns__stream-head::after {               /* accent rule that draws in under the banner */
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--cta-b));
  transform-origin: left;
}
.returns__stream-num {
  font-size: 64px;
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.05em;
  background: var(--grad-stat);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.returns__stream-name {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: var(--ink);
}
.returns__stream-for {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid rgba(22, 169, 122, .25);
  border-radius: 99px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-btn);
  box-shadow: var(--el-sm);
}
.returns__stream-for::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(49, 226, 154, .22);
}
/* motion: rule draws, number slides in */
.js .returns__stream-head::after { transform: scaleX(0); transition: transform 1.2s var(--ease) .35s; }
.js .returns__stream-head.in::after { transform: none; }
.js .returns__stream-num { transform: translateX(-18px); opacity: 0; transition: transform .9s var(--ease) .2s, opacity .6s var(--ease) .2s; }
.js .returns__stream-head.in .returns__stream-num { transform: none; opacity: 1; }
@media (max-width: 1060px) {
  .returns__stream-name { font-size: 30px; }
  .returns__stream-num { font-size: 52px; }
  .returns__stream-for { margin-left: 0; }
}

/* ---------- ProductRow ---------- */
.returns__row {
  display: flex;
  align-items: center;
  gap: 66px;
  padding-block: 44px;
}
.returns__row--flip { flex-direction: row-reverse; }

.returns__copy {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.returns__row-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
}
.returns__row-text {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
}
.returns__figures {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
}
.returns__fig {
  display: flex;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
}
.returns__fig-val {
  order: -1;
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--accent-deep);
}
.returns__fig-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
}

/* Visual: 547×540 stage, glow + phone both centred */
.returns__visual {
  flex: 0 0 547px;
  height: 540px;
  display: grid;
  place-items: center;
}
.returns__visual > * { grid-area: 1 / 1; }
.returns__glow { width: 290px; height: 290px; }
.returns__phone {
  position: relative;
  width: 242px;
  height: 506px;
  border-radius: 34px;
  box-shadow: 0 26px 35px rgba(6, 33, 31, .22);
}


/* ---------- Tablet ---------- */
@media (max-width: 1060px) {
  .returns__row { gap: 40px; }
  .returns__visual { flex-basis: 360px; }
}

@media (max-width: 860px) {
  .returns__row,
  .returns__row--flip { flex-direction: column; align-items: stretch; gap: 16px; padding-block: 20px; }
  .returns__visual { flex-basis: auto; height: auto; padding-top: 8px; }
  .returns__glow { display: none; }
}

/* ---------- Phone (390 frame) ---------- */
@media (max-width: 720px) {
  .returns__head { margin-bottom: 24px; }


  .returns__stream-head { display: none; }

  .returns__row:first-of-type { margin-top: 4px; } /* 24px section gap − 20px row padding */
  .returns__row-title { font-size: 22px; line-height: 1.18; }
  .returns__row-text { font-size: 14.5px; }
  .returns__figures { gap: 14px 26px; }
  .returns__fig-val { font-size: 24px; }
  .returns__fig-label { line-height: 1.4; }
}
