/*
 * Affiliate Program page — scoped stylesheet, loaded only by /affiliate-program/.
 * Every selector is prefixed with `.affiliate-page` so it can't affect other pages.
 * Section shell (wrap/sec/sec-head/reveal/faq) mirrors trust.css so the two
 * standalone pages read as one family; header, footer and buttons stay with
 * the shared theme.
 */
.affiliate-page {
  --wash: #EEFCFF;
  --wash2: #F4FBFE;
  --muted: #5a6472;
  --line: rgba(17, 2, 41, .08);
  --af-primary: #5FC2E4;
  --af-primary-dark: #4AACCE;
  --af-primary-light: #7FCFEA;
  --af-primary-deep: #2E93AE;
  --af-ink: #110229;
  --af-ok: #16a36a;
  --af-hold: #d99a1e;
  --af-ease: cubic-bezier(.4, 0, .2, 1);
  --af-ease-out: cubic-bezier(.16, 1, .3, 1);
  --af-shadow-card: 0 1px 2px rgba(17, 2, 41, .04), 0 12px 32px rgba(17, 2, 41, .07);
  --af-shadow-lift: 0 2px 6px rgba(17, 2, 41, .05), 0 26px 60px rgba(17, 2, 41, .12);
  color: var(--af-ink);
}
.affiliate-page h1, .affiliate-page h2, .affiliate-page h3 { text-wrap: balance; margin: 0; }
.affiliate-page p { margin: 0; text-wrap: pretty; }
.affiliate-page .wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.affiliate-page .sec { padding: 110px 0; position: relative; }
.affiliate-page .sec-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.affiliate-page .sec-title { font-size: clamp(30px, 3.9vw, 46px); font-weight: 600; line-height: 1.06; letter-spacing: -.028em; margin-top: 0; }
.affiliate-page .sec-sub { font-size: clamp(15.5px, 1.5vw, 17.5px); color: #56626e; margin-top: 14px; line-height: 1.6; max-width: 620px; margin-left: auto; margin-right: auto; }
.affiliate-page .sec--wash { background: var(--wash); }
.affiliate-page .sec--wash2 { background: linear-gradient(180deg, #fff 0%, var(--wash2) 100%); }
.affiliate-page .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--af-ease-out), transform .7s var(--af-ease-out); }
.affiliate-page .reveal.in { opacity: 1; transform: none; }
.affiliate-page .reveal.d1 { transition-delay: .08s; }
.affiliate-page .reveal.d2 { transition-delay: .16s; }
.affiliate-page .reveal.d3 { transition-delay: .24s; }

/* Buttons (extend the theme's .btn-primary / .btn-secondary) */
.affiliate-page .af-btn { font-weight: 500; padding: 15px 26px; }
.affiliate-page .af-btn--ghost { background: #fff; }
.affiliate-page .af-btn--light { background: #fff; color: var(--af-ink); }
.affiliate-page .af-btn--light:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .22); }

/* ---------------- HERO ---------------- */
.affiliate-page .af-hero { padding: 34px 0 88px; background: radial-gradient(900px 440px at 78% 0%, rgba(95, 194, 228, .24), transparent 65%), linear-gradient(180deg, #fff 0%, var(--wash2) 100%); overflow: hidden; }
.affiliate-page .af-crumbs { font-size: 13.5px; color: var(--muted); }
.affiliate-page .af-crumbs ol { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.affiliate-page .af-crumbs li + li::before { content: "/"; margin-right: 10px; color: #b8c2ca; }
.affiliate-page .af-crumbs a:hover { color: var(--af-primary-dark); }
.affiliate-page .af-crumbs [aria-current] { color: var(--af-ink); font-weight: 500; }

.affiliate-page .af-hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 64px; align-items: center; margin-top: 46px; }
.affiliate-page .af-eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--af-primary-deep); background: rgba(95, 194, 228, .14); border: 1px solid rgba(95, 194, 228, .4); padding: 6px 14px; border-radius: 999px; }
.affiliate-page .af-hero__title { font-size: clamp(34px, 4.4vw, 56px); font-weight: 600; line-height: 1.05; letter-spacing: -.032em; margin-top: 20px; }
.affiliate-page .af-hero__lede { font-size: clamp(16px, 1.6vw, 18.5px); color: #56626e; line-height: 1.6; margin-top: 22px; max-width: 580px; }
.affiliate-page .af-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.affiliate-page .af-hero__login { font-size: 14.5px; color: var(--muted); margin-top: 18px; }
.affiliate-page .af-hero__login a { color: var(--af-primary-deep); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* Portal preview card */
.affiliate-page .af-hero__art { position: relative; }
.affiliate-page .af-hero__art::before { content: ""; position: absolute; inset: 8% -6% -8% 10%; background: linear-gradient(135deg, var(--af-primary-light), var(--af-primary-deep)); border-radius: 32px; opacity: .22; transform: rotate(3deg); }
.affiliate-page .af-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--af-shadow-lift); }
.affiliate-page .af-card__head { display: flex; align-items: center; justify-content: space-between; }
.affiliate-page .af-card__label { font-size: 14px; font-weight: 600; }
.affiliate-page .af-card__chip { font-size: 12px; font-weight: 600; color: var(--af-ok); background: rgba(22, 163, 106, .1); border-radius: 999px; padding: 4px 10px; }
.affiliate-page .af-card__link { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 10px 10px 14px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 13px; color: #334155; }
.affiliate-page .af-card__link > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.affiliate-page .af-card__link b { color: var(--af-primary-deep); font-weight: 600; }
.affiliate-page .af-card__copy { flex-shrink: 0; font-family: inherit; font-size: 12px; font-weight: 600; color: #fff; background: var(--af-ink); border-radius: 8px; padding: 6px 10px; }
.affiliate-page .af-card__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.affiliate-page .af-card__kpis div { background: linear-gradient(160deg, var(--wash) 0%, #fff 100%); border: 1px solid rgba(95, 194, 228, .3); border-radius: 14px; padding: 12px 14px; }
.affiliate-page .af-card__kpis small { display: block; font-size: 12px; color: var(--muted); }
.affiliate-page .af-card__kpis b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.affiliate-page .af-ledger { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; }
.affiliate-page .af-ledger li { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line); font-size: 14px; }
.affiliate-page .af-ledger em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.affiliate-page .af-ledger b { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.affiliate-page .af-dot { width: 8px; height: 8px; border-radius: 50%; }
.affiliate-page .af-dot--ok { background: var(--af-ok); }
.affiliate-page .af-dot--hold { background: var(--af-hold); }

/* Terms strip */
.affiliate-page .af-terms { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--af-shadow-card); }
.affiliate-page .af-terms li { padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; }
.affiliate-page .af-terms li + li { border-left: 1px solid var(--line); }
.affiliate-page .af-terms b { font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.024em; line-height: 1.1; color: var(--af-primary-deep); }
.affiliate-page .af-terms span { font-size: 14px; color: var(--muted); }

@media (max-width: 960px) {
  .affiliate-page .af-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .affiliate-page .af-hero__art { max-width: 520px; }
  .affiliate-page .af-terms { grid-template-columns: repeat(2, 1fr); }
  .affiliate-page .af-terms li:nth-child(3) { border-left: none; }
  .affiliate-page .af-terms li:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .affiliate-page .af-hero__cta .af-btn { flex: 1 1 100%; }
  .affiliate-page .af-card { padding: 18px; }
  .affiliate-page .af-card__kpis b { font-size: 18px; }
  .affiliate-page .af-ledger li { grid-template-columns: 10px 1fr auto; }
  .affiliate-page .af-ledger em { display: none; }
  .affiliate-page .af-terms li { padding: 18px 16px; }
}

/* ---------------- HOW IT WORKS ---------------- */
.affiliate-page .af-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.affiliate-page .af-step { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px 24px 28px; box-shadow: var(--af-shadow-card); }
.affiliate-page .af-step__n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--af-ink); color: #fff; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 14px; font-weight: 600; }
.affiliate-page .af-step h3 { font-size: 19px; font-weight: 600; letter-spacing: -.014em; margin-top: 20px; }
.affiliate-page .af-step p { font-size: 15px; color: var(--muted); line-height: 1.55; margin-top: 8px; }
@media (max-width: 960px) { .affiliate-page .af-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .affiliate-page .af-steps { grid-template-columns: 1fr; } }

/* ---------------- CALCULATOR ---------------- */
.affiliate-page .af-calc { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.affiliate-page .af-calc__copy .sec-title, .affiliate-page .af-calc__copy .sec-sub { text-align: left; margin-left: 0; }
.affiliate-page .af-fine { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-top: 18px; max-width: 460px; }
.affiliate-page .af-calc__card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 32px; box-shadow: var(--af-shadow-lift); }
.affiliate-page .af-field + .af-field { margin-top: 28px; }
.affiliate-page .af-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.affiliate-page .af-field label { font-size: 15px; font-weight: 500; }
.affiliate-page .af-field output { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.affiliate-page .af-field input[type="range"] { --fill: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 16px 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--af-primary-dark) 0 var(--fill), #E2E8F0 var(--fill) 100%); cursor: pointer; }
.affiliate-page .af-field input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--af-primary-deep); box-shadow: 0 2px 8px rgba(17, 2, 41, .18); }
.affiliate-page .af-field input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--af-primary-deep); box-shadow: 0 2px 8px rgba(17, 2, 41, .18); }
.affiliate-page .af-field input[type="range"]:focus-visible { outline: 2px solid var(--af-primary); outline-offset: 6px; }
.affiliate-page .af-result { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; margin-top: 32px; }
.affiliate-page .af-result > div { border-radius: 16px; padding: 16px 18px; background: var(--wash2); border: 1px solid rgba(95, 194, 228, .3); }
.affiliate-page .af-result small { display: block; font-size: 13px; color: var(--muted); }
.affiliate-page .af-result b { display: block; font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -.024em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.affiliate-page .af-result .af-result__total { background: linear-gradient(140deg, #08303e 0%, #0E5266 55%, #2E93AE 100%); border-color: transparent; color: #fff; }
.affiliate-page .af-result .af-result__total small { color: rgba(255, 255, 255, .75); }
@media (max-width: 900px) {
  .affiliate-page .af-calc { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .affiliate-page .af-calc__card { padding: 24px 20px; }
}

/* ---------------- WHO IT'S FOR ---------------- */
.affiliate-page .af-fit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.affiliate-page .af-fit__item { position: relative; padding: 26px 24px 26px 28px; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color .25s var(--af-ease), box-shadow .25s var(--af-ease); }
.affiliate-page .af-fit__item::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--af-primary-light), var(--af-primary-deep)); }
.affiliate-page .af-fit__item:hover { border-color: rgba(95, 194, 228, .5); box-shadow: var(--af-shadow-card); }
.affiliate-page .af-fit__item h3 { font-size: 17px; font-weight: 600; letter-spacing: -.012em; line-height: 1.3; }
.affiliate-page .af-fit__item p { font-size: 14.5px; color: var(--muted); line-height: 1.55; margin-top: 8px; }
@media (max-width: 960px) { .affiliate-page .af-fit { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .affiliate-page .af-fit { grid-template-columns: 1fr; } }

/* ---------------- PAYOUTS + RULES ---------------- */
.affiliate-page .af-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.affiliate-page .af-pay__main .sec-title, .affiliate-page .af-pay__main .sec-sub { text-align: left; margin-left: 0; }
.affiliate-page .af-methods { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.affiliate-page .af-methods li { font-size: 15px; font-weight: 500; padding: 12px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--af-shadow-card); }
.affiliate-page .af-pay__rules { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 32px 34px; box-shadow: var(--af-shadow-card); }
.affiliate-page .af-pay__rules h3 { font-size: 20px; font-weight: 600; letter-spacing: -.016em; }
.affiliate-page .af-pay__rules ul { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.affiliate-page .af-pay__rules li { position: relative; padding-left: 30px; font-size: 15px; color: #56626e; line-height: 1.55; }
.affiliate-page .af-pay__rules li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, #7FCFEA, #4AACCE); }
.affiliate-page .af-pay__rules li::after { content: ""; position: absolute; left: 5px; top: 9px; width: 6px; height: 3.5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.affiliate-page .af-pay__rules li b { color: var(--af-ink); font-weight: 600; }
@media (max-width: 900px) {
  .affiliate-page .af-pay { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .affiliate-page .af-pay__rules { padding: 26px 22px; }
}

/* ---------------- FAQ (same as trust.css) ---------------- */
.affiliate-page .faq { background: linear-gradient(180deg, #fff 0%, var(--wash2) 100%); }
.affiliate-page .faq__list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.affiliate-page .faq__item { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .25s, box-shadow .25s; }
.affiliate-page .faq__item:hover { border-color: rgba(95, 194, 228, .45); }
.affiliate-page .faq__item[open] { border-color: rgba(95, 194, 228, .5); box-shadow: 0 10px 30px rgba(17, 2, 41, .06); }
.affiliate-page .faq__q { list-style: none; cursor: pointer; padding: 18px 22px; font-size: 16px; font-weight: 600; color: var(--af-ink); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.affiliate-page .faq__q::-webkit-details-marker { display: none; }
.affiliate-page .faq__q .ico { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; background: linear-gradient(135deg, rgba(95, 194, 228, .18), rgba(74, 172, 206, .08)); border: 1px solid rgba(95, 194, 228, .4); display: grid; place-items: center; color: var(--af-primary-dark); transition: transform .3s var(--af-ease); }
.affiliate-page .faq__item[open] .faq__q .ico { transform: rotate(135deg); }
.affiliate-page .faq__q .ico svg { width: 16px; height: 16px; }
.affiliate-page .faq__a { padding: 0 22px 20px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* ---------------- FINAL CTA ---------------- */
.affiliate-page .af-final-sec.sec { padding-top: 0; background: var(--wash2); }
.affiliate-page .af-final { display: flex; align-items: center; justify-content: space-between; gap: 32px; max-width: 1040px; margin: 0 auto; padding: 48px 52px; border-radius: 28px; color: #fff; background: radial-gradient(520px 260px at 90% 10%, rgba(127, 207, 234, .35), transparent 70%), linear-gradient(140deg, #08303e 0%, #0E5266 50%, #2E93AE 100%); }
.affiliate-page .af-final h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); font-weight: 600; letter-spacing: -.026em; line-height: 1.1; }
.affiliate-page .af-final p { font-size: 16px; color: rgba(255, 255, 255, .78); line-height: 1.55; margin-top: 10px; max-width: 520px; }
.affiliate-page .af-final__cta { display: flex; flex-direction: column; align-items: center; gap: 12px; flex-shrink: 0; }
.affiliate-page .af-final__login { font-size: 14.5px; color: rgba(255, 255, 255, .85); text-decoration: underline; text-underline-offset: 3px; }
.affiliate-page .af-final__login:hover { color: #fff; }
@media (max-width: 760px) {
  .affiliate-page .af-final { flex-direction: column; align-items: flex-start; padding: 32px 26px; }
  .affiliate-page .af-final__cta { align-items: stretch; width: 100%; }
}

@media (max-width: 700px) { .affiliate-page .sec { padding: 76px 0; } }

@media (prefers-reduced-motion: reduce) {
  .affiliate-page .reveal { opacity: 1; transform: none; }
  .affiliate-page * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
