/* ═══════════════════════════════════════════
   TALENTSHEETS — AFFILIATE PAGES
   Scoped styles for affiliates.html + affiliate-apply.html
   Reuses the site design system (styles.css tokens, .btn, nav, footer).
   All component classes are namespaced `aff-` to avoid collisions.
   ═══════════════════════════════════════════ */

.aff {
  --aff-line: var(--color-light-gray);
  --aff-brand: var(--color-blue);
  --aff-green: #26bf88;
  --aff-amber: var(--color-yellow);
  --aff-soft: var(--color-off-white);
  --aff-muted: var(--color-text-secondary);
}

.aff a:not(.btn) { color: var(--aff-brand); }

/* ── Hero band ─────────────────────────────── */
.aff-hero {
  background: linear-gradient(115deg, #F5A93C, #FCD24A, #3FB985, #5B78E6, #3FB985, #FCD24A, #F5A93C);
  background-size: 300% 300%;
  animation: aff-hero-flow 18s ease-in-out infinite;
}
@keyframes aff-hero-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .aff-hero { animation: none; }
}
.aff-hero__inner {
  padding: calc(var(--nav-height) + clamp(2.5rem, 5vw, 4rem)) 0 clamp(3.5rem, 7vw, 6rem);
  text-align: center;
  color: #fff;
}
.aff-hero__cta .btn {
  color: #fff;
  font-weight: 700;
}
.aff-hero__title {
  color: #fff;
  font-size: clamp(2.25rem, 5.2vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}
.aff-hero__sub {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.96);
  max-width: 44rem;
  margin: 1.25rem auto 1.75rem;
}
.aff-hero__cta {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}
.aff-hero__note {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.9);
  margin-top: 1.125rem;
}

/* ── Sections ──────────────────────────────── */
.aff-section { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.aff-section--soft { background: var(--aff-soft); }

/* ── Offer cards ───────────────────────────── */
.aff-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.125rem;
}
.aff-card {
  background: var(--color-white);
  border: 1px solid var(--aff-line);
  border-radius: var(--radius-lg);
  padding: 1.625rem;
  box-shadow: var(--shadow-sm);
}
.aff-card--brand { border-top: 3px solid var(--aff-brand); }
.aff-card--green { border-top: 3px solid var(--aff-green); }
.aff-card--amber { border-top: 3px solid var(--aff-amber); }
.aff-card--blue  { border-top: 3px solid #4285F4; }
.aff-card__big {
  font-size: 2.375rem;
  font-weight: 700;
  color: var(--aff-brand);
  letter-spacing: -0.03em;
  line-height: 1;
}
.aff-card h3 { margin: 0.75rem 0 0.375rem; font-size: 1.1875rem; font-weight: 600; }
.aff-card p { color: var(--aff-muted); font-size: var(--font-size-sm); }

/* ── Earnings calculator ───────────────────── */
.aff-calc {
  background: var(--color-white);
  border: 1px solid var(--aff-line);
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}
.aff-calc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.aff-calc label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: var(--font-size-sm); }
.aff-calc select {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--aff-line);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: var(--color-white);
  color: var(--color-text);
  font-family: inherit;
}
.aff-calc__rangeval { font-weight: 700; color: var(--aff-brand); }
.aff-calc input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 6px;
  background: #dfe3f0;
  margin-top: 0.875rem;
}
.aff-calc input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--aff-brand);
  cursor: pointer;
  border: 4px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.aff-calc input[type=range]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--aff-brand);
  cursor: pointer;
  border: 4px solid #fff;
}
.aff-calc__result {
  background: var(--aff-soft);
  border: 1px solid var(--aff-line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}
.aff-calc__amt {
  font-size: clamp(2.5rem, 6vw, 3.625rem);
  font-weight: 700;
  color: var(--aff-green);
  letter-spacing: -0.03em;
  line-height: 1;
}
.aff-calc__lbl { color: var(--aff-muted); font-size: var(--font-size-sm); margin-top: 0.375rem; }
.aff-calc__break {
  margin-top: 1.125rem;
  font-size: var(--font-size-sm);
  color: var(--aff-muted);
  border-top: 1px solid var(--aff-line);
  padding-top: 1rem;
}
.aff-calc__note { text-align: center; margin-top: 1.125rem; font-size: var(--font-size-xs); color: var(--aff-muted); }

/* ── How it works ──────────────────────────── */
.aff-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.375rem;
}
.aff-step__num {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--aff-brand);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.875rem;
  font-size: 1.0625rem;
}
.aff-step h3 { margin-bottom: 0.375rem; font-size: 1.1875rem; font-weight: 600; }
.aff-step p { color: var(--aff-muted); font-size: var(--font-size-sm); }

/* ── Split "what you're recommending" ──────── */
.aff-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.aff-split p { color: var(--aff-muted); margin-top: 1rem; }
.aff-feature-list { list-style: none; margin: 1.125rem 0 0; padding: 0; }
.aff-feature-list li {
  padding: 0.625rem 0 0.625rem 1.875rem;
  position: relative;
  color: var(--aff-muted);
}
.aff-feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--aff-green);
  font-weight: 800;
}
.aff-feature-list strong { color: var(--color-text); font-weight: 600; }

/* ── Terms in brief ────────────────────────── */
.aff-terms {
  background: var(--aff-soft);
  border: 1px solid var(--aff-line);
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 2.125rem);
}
.aff-terms h3 { font-size: 1.375rem; font-weight: 700; }
.aff-terms__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.875rem;
  margin: 1rem 0 0;
  padding: 0;
}
.aff-terms__list li {
  padding-left: 1.5rem;
  position: relative;
  font-size: var(--font-size-sm);
  color: var(--aff-muted);
}
.aff-terms__list li::before {
  content: "•";
  position: absolute;
  left: 0.375rem;
  color: var(--aff-brand);
  font-weight: 800;
}
.aff-terms__list strong { color: var(--color-text); }

/* ── Final CTA band ────────────────────────── */
.aff-cta {
  background: linear-gradient(115deg, #5B78E6 0%, #3FB985 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 5vw, 3.75rem) clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}
.aff-cta h2 { color: #fff; }
.aff-cta p { color: rgba(255, 255, 255, 0.92); max-width: 35rem; margin: 1rem auto 1.875rem; font-size: 1.125rem; }
.aff-cta .btn { background: #fff; color: var(--aff-brand); border-color: #fff; }
.aff-cta .btn:hover { background: #eef1ff; border-color: #eef1ff; }
.aff-cta__sub { font-size: var(--font-size-sm); color: rgba(255, 255, 255, 0.85); margin-top: 1.125rem; }

/* ═══════════════════════════════════════════
   APPLICATION PAGE
   ═══════════════════════════════════════════ */
.aff-apply { max-width: 760px; padding-top: var(--nav-height); }
.aff-intro { text-align: center; padding: clamp(2.5rem, 5vw, 3rem) 0 1.25rem; }
.aff-intro p { color: var(--aff-muted); font-size: 1.125rem; max-width: 35rem; margin: 0.875rem auto 0; }

.aff-panel {
  background: var(--color-white);
  border: 1px solid var(--aff-line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 1.75rem);
  margin: 1.125rem 0;
  box-shadow: var(--shadow-sm);
}
.aff-panel h2 { font-size: 1.375rem; font-weight: 700; margin-bottom: 0.375rem; }

/* Agreement scroll box */
.aff-agreement {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--aff-line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  background: var(--aff-soft);
  font-size: 0.84rem;
  color: #33404f;
}
.aff-agreement h3 { font-size: 0.94rem; margin: 1rem 0 0.25rem; color: var(--color-text); font-weight: 700; }
.aff-agreement h3:first-child { margin-top: 0; }
.aff-agreement p { margin-bottom: 0.25rem; }
.aff-agreement table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.8rem; }
.aff-agreement td { border: 1px solid var(--aff-line); padding: 0.375rem 0.625rem; }
.aff-agreement td:first-child { font-weight: 600; width: 38%; background: #fff; }

/* Form */
.aff-form label { display: block; font-weight: 600; font-size: var(--font-size-sm); margin: 1rem 0 0.375rem; }
.aff-req { color: var(--color-red); }
.aff-form input[type=text],
.aff-form input[type=email],
.aff-form input[type=url],
.aff-form select {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--aff-line);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: #fff;
  color: var(--color-text);
  font-family: inherit;
}
.aff-form input:focus,
.aff-form select:focus {
  outline: none;
  border-color: var(--aff-brand);
  box-shadow: 0 0 0 3px rgba(90, 132, 240, 0.15);
}
.aff-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem; }
.aff-hint { font-size: var(--font-size-sm); color: var(--aff-muted); margin-top: 0.375rem; }
.aff-codewrap input { text-transform: uppercase; }
.aff-codestate { font-size: var(--font-size-sm); margin-top: 0.375rem; font-weight: 600; min-height: 18px; }
.aff-codestate.is-ok { color: var(--aff-green); }
.aff-codestate.is-bad { color: var(--color-red); }
.aff-codeprev { font-size: var(--font-size-sm); color: var(--aff-muted); margin-top: 0.25rem; }
.aff-taxdl {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #e7f6ee;
  color: #0a6b38;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-sm);
  margin-top: 0.5rem;
}
.aff-fileinput { margin-top: 0.625rem; font-size: var(--font-size-sm); }
.aff-check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.125rem;
  background: var(--aff-soft);
  border-radius: var(--radius-md);
  padding: 0.875rem;
}
.aff-check input { margin-top: 0.25rem; width: 18px; height: 18px; flex-shrink: 0; }
.aff-check label { margin: 0; font-weight: 500; font-size: 0.9rem; color: #33404f; }
.aff-formerror {
  color: var(--color-red);
  background: #fdecea;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.875rem;
  margin-top: 1rem;
  font-size: var(--font-size-sm);
  display: none;
}
.aff-submit { margin-top: 1.5rem; }

/* Success modal */
.aff-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 50;
}
.aff-overlay.is-open { display: flex; }
.aff-modal {
  background: #fff;
  border-radius: var(--radius-xl);
  max-width: 440px;
  padding: 2.25rem;
  text-align: center;
}
.aff-modal__tick {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e7f6ee;
  color: var(--aff-green);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.125rem;
}
.aff-modal h2 { font-size: 1.5rem; margin-bottom: 0.625rem; }
.aff-modal p { color: var(--aff-muted); font-size: var(--font-size-base); }

/* ── Responsive ────────────────────────────── */
@media (max-width: 760px) {
  .aff-calc__grid,
  .aff-split { grid-template-columns: 1fr; gap: 1.75rem; }
  .aff-terms__list { grid-template-columns: 1fr; }
  .aff-row { grid-template-columns: 1fr; }
}
