/* =====================================================================
   REWARDS — referral / coupon pages
   ===================================================================== */

.rw-hero {
  padding: 40px 0 24px;
  display: grid;
  gap: 16px;
}
.rw-hero h1 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 380;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--lumen);
  margin: 0;
  text-wrap: balance;
}
.rw-hero h1 em {
  font-style: italic;
  background: var(--duotone);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rw-hero .lead {
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--lumen-2);
  max-width: 640px;
  line-height: 1.5;
}

/* Index page — three big route tiles */
.rw-routes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-5);
}
.rw-route {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  padding: var(--s-5);
  border-radius: var(--r-3);
  text-decoration: none;
  color: var(--lumen);
  border-bottom: 0;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  transition: transform var(--dur-base) var(--ease-out);
}
.rw-route:hover { transform: translateY(-2px); border-bottom: 0; }
.rw-route::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: var(--duotone);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  z-index: 0;
  border-radius: inherit;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 1px;
}
.rw-route:hover::before { opacity: 0.7; }
.rw-route > * { position: relative; z-index: 1; }

.rw-route .num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: var(--tr-mono-up);
  text-transform: uppercase;
  color: var(--violet);
}
.rw-route h3 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 380;
  font-size: 38px;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0;
  color: var(--lumen);
}
.rw-route h3 em {
  font-style: italic;
  color: var(--amber);
}
.rw-route .desc {
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--lumen-2);
  line-height: 1.5;
}
.rw-route .meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tr-mono-up);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.rw-route .arrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: var(--tr-mono-up);
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rw-route .arrow .arr {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  transition: transform var(--dur-quick) var(--ease-out);
}
.rw-route:hover .arrow .arr { transform: translateX(4px); }

@media (max-width: 880px) {
  .rw-routes { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────────
   REFERRAL LIST — common to banking / cards / coupons
   ───────────────────────────────────────────────────────────────── */
.rw-section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-top: var(--s-5);
  margin-bottom: var(--s-4);
}
.rw-section-head h2 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 380;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--lumen);
  text-wrap: balance;
}
.rw-section-head h2 em { color: var(--amber); font-style: italic; }
.rw-section-head .stamp-line {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-xs);
  letter-spacing: var(--tr-mono-up);
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: right;
}

.rw-list {
  display: grid;
  gap: 14px;
}
.rw-card {
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  gap: 22px;
  padding: 22px 24px;
  border-radius: var(--r-3);
  align-items: center;
  text-decoration: none;
  color: var(--lumen);
  border-bottom: 0;
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-quick) var(--ease-out);
}
.rw-card:hover { transform: translateY(-1px); border-bottom: 0; }

/* Image-mark variant — rendered when a product has an actual artwork to show
   (credit cards, app icons). Replaces the colored letter tile. */
.rw-mark.m-img {
  width: 110px;
  height: 70px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--hairline);
  padding: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.rw-mark.m-img::after { display: none; }
.rw-mark.m-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.rw-mark.m-img.m-square {
  width: 70px;
  height: 70px;
  border-radius: 14px;
  padding: 8px;
}

/* Benefit bullets — "what you get" list under the description */
.rw-body .benefits {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.rw-body .benefits li {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--lumen-2);
  padding-left: 16px;
  position: relative;
}
.rw-body .benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 8px var(--violet-glow);
}
.rw-body .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tr-mono-up);
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: 6px;
}
.rw-body .meta .af { color: var(--amber); }

.rw-mark {
  width: 64px; height: 64px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 400;
  font-size: 32px;
  color: #fff;
  letter-spacing: -0.04em;
  position: relative;
  overflow: hidden;
}
.rw-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 60%);
  pointer-events: none;
}
.rw-mark.m-violet { background: linear-gradient(135deg, #8b5cff, #4c1d95); }
.rw-mark.m-amber  { background: linear-gradient(135deg, #ffb454, #b56708); color: #2a1208; }
.rw-mark.m-cyan   { background: linear-gradient(135deg, #6ee7ff, #1e6e8c); color: #0a1f2c; }
.rw-mark.m-rose   { background: linear-gradient(135deg, #ff6e9c, #b51a4a); }
.rw-mark.m-mono   { background: linear-gradient(135deg, #2a2a35, #0a0a12); border: 1px solid var(--hairline-strong); }
.rw-mark.m-emerald{ background: linear-gradient(135deg, #34d399, #166534); color: #062118; }
.rw-mark.m-mid    { background: linear-gradient(135deg, #4a5568, #1a202c); }
.rw-mark.m-sand   { background: linear-gradient(135deg, #ffd28a, #c47a18); color: #2a1a04; }

.rw-body { display: grid; gap: 6px; min-width: 0; }
.rw-body .brand {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tr-mono-up);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.rw-body .name {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 380;
  font-size: 24px;
  line-height: 1.05;
  color: var(--lumen);
  letter-spacing: -0.02em;
}
.rw-body .name em { color: var(--amber); font-style: italic; }
.rw-body .desc {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--lumen-3);
  line-height: 1.45;
}

.rw-bonus {
  text-align: right;
  display: grid;
  gap: 4px;
  white-space: nowrap;
}
.rw-bonus .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tr-mono-up);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.rw-bonus .amt {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 380;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--lumen);
  font-variant-numeric: tabular-nums;
}
.rw-bonus .amt em { color: var(--amber); font-style: italic; }
.rw-bonus .amt .small { font-size: 0.55em; color: var(--lumen-3); margin-left: 2px; }

.rw-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--tr-mono-up);
  text-transform: uppercase;
  background: transparent;
  color: var(--lumen);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  padding: 12px 18px;
  white-space: nowrap;
  transition: all var(--dur-quick) var(--ease-out);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-strong);
}
.rw-cta:hover {
  background: var(--duotone);
  border-color: transparent;
  color: #fff;
  border-bottom-color: transparent;
  transform: translateY(-1px);
}

@media (max-width: 880px) {
  .rw-card { grid-template-columns: 80px 1fr; padding: 18px; gap: 16px; }
  .rw-mark { width: 56px; height: 56px; font-size: 26px; }
  .rw-mark.m-img { width: 80px; height: 52px; }
  .rw-mark.m-img.m-square { width: 56px; height: 56px; }
  .rw-bonus, .rw-cta { grid-column: 2; text-align: left; }
  .rw-bonus { display: flex; gap: 12px; align-items: baseline; }
  .rw-cta { width: max-content; }
}

/* ─────────────────────────────────────────────────────────────────
   COUPON CARD — variant
   ───────────────────────────────────────────────────────────────── */
.rw-coupon {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 18px;
  padding: 18px 0 18px 22px;
  border-radius: var(--r-3);
  align-items: center;
  position: relative;
  overflow: hidden;
}
.rw-coupon-code {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255,180,84,0.12);
  border: 1px dashed rgba(255,180,84,0.4);
  color: var(--amber-bright);
  padding: 10px 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--dur-quick) var(--ease-out);
}
html[data-aesthetic="paper"] .rw-coupon-code {
  background: rgba(196,122,24,0.08);
  border-color: rgba(196,122,24,0.5);
  color: var(--amber);
}
.rw-coupon-code:hover { background: rgba(255,180,84,0.18); border-style: solid; }
.rw-coupon-code .copy-tip {
  font-size: 10px;
  letter-spacing: var(--tr-mono-up);
  color: var(--fg-faint);
  font-weight: 400;
}
.rw-coupon-code.is-copied {
  background: rgba(255,180,84,0.25);
  border-style: solid;
}

.rw-tear {
  position: absolute;
  top: 50%;
  right: 200px;
  bottom: 50%;
  border-left: 2px dashed rgba(255,180,84,0.25);
  transform: translateY(-50%);
  height: 80%;
}

@media (max-width: 880px) {
  .rw-coupon { grid-template-columns: 56px 1fr; padding-right: 16px; }
  .rw-coupon-code { grid-column: 2; }
  .rw-tear { display: none; }
}

/* ─────────────────────────────────────────────────────────────────
   FINE PRINT
   ───────────────────────────────────────────────────────────────── */
.rw-fineprint {
  margin-top: var(--s-6);
  padding: var(--s-4);
  border-radius: var(--r-3);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}
.rw-fineprint strong {
  color: var(--lumen-2);
  font-weight: 500;
  font-family: var(--font-mono);
}

/* Stat row across rewards index */
.rw-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-5);
}
.rw-stat {
  padding: var(--s-4);
  border-radius: var(--r-3);
  display: grid;
  gap: 4px;
}
.rw-stat .num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 380;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--lumen);
  font-variant-numeric: tabular-nums;
}
.rw-stat .num em { color: var(--amber); font-style: italic; }
.rw-stat .label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-xs);
  letter-spacing: var(--tr-mono-up);
  text-transform: uppercase;
  color: var(--fg-muted);
}
@media (max-width: 720px) {
  .rw-stat-row { grid-template-columns: 1fr; }
  .rw-stat .num { font-size: 42px; }
}
