/* ============================================================
   SkinSignal / the landing's creators and affiliates section
   index.html #affiliates. The copy on the left (~0.8fr); on the right
   (~1.2fr), the reward showcase: WashedWally's emblem + calling card, a
   made-up example creator (and said to be), his creator identity, and
   how it works. js/affiliates.js fills the faint cards behind.

   RESTRAINED. Gold is the prestige accent, blue a whisper; no green, no
   red. A little gold light behind the emblem, a little blue under the
   card, faint real cards behind the composition. No glow on every edge.
   ============================================================ */

.af {
  --af-gold: #e4ae39;
  --af-blue: #6a9fff;
  --af-ink: #f1f3f6;
  --af-ink-2: #b9bfca;
  --af-ink-3: #8a919e;
  --af-line: rgba(96, 140, 220, 0.16);
  --pad: clamp(20px, 3.8vw, 76px);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(72px, 6.4vw, 120px) 0 clamp(64px, 5.6vw, 108px);
  background:
    radial-gradient(32% 44% at 64% 30%, rgba(228, 174, 57, var(--amb-gold, 0.07)), rgba(228, 174, 57, 0) 72%),
    radial-gradient(36% 50% at 80% 64%, rgba(61, 127, 255, var(--amb-blue, 0.08)), rgba(61, 127, 255, 0) 72%),
    #05080d;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.af__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(32px, 4vw, 80px);
  padding: 0 var(--pad);
}

/* The panels' material: a faint grain, barely there. */
.af-reward,
.af-id,
.af-how {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.012) 0 2px, rgba(255, 255, 255, 0) 2px 6px),
    linear-gradient(180deg, rgba(14, 21, 36, 0.96) 0%, rgba(8, 12, 20, 0.97) 100%);
}

/* ============================================================
   THE COPY
   ============================================================ */
.af__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 clamp(14px, 1.2vw, 20px);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: clamp(12px, 0.78vw, 14px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--af-blue);
}
.af__rule { display: block; width: 36px; height: 2px; background: var(--af-gold); }
.af__open { color: #f5d78a; }
.af__eyebrow span[aria-hidden="true"]:not(.af__rule) { color: var(--af-ink-3); }

.af__title {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 800;
  font-size: clamp(36px, 2.9vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--af-ink);
}
.af__line { display: block; white-space: nowrap; }
.af__line--gold {
  color: var(--af-gold);
  background: linear-gradient(180deg, #f6d27a 0%, #e8b544 52%, #c98a1c 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.af__body {
  max-width: 560px;
  margin: clamp(16px, 1.4vw, 22px) 0 0;
  font-family: var(--font-body);
  font-size: clamp(15px, 1vw, 18.5px);
  line-height: 1.55;
  color: var(--af-ink-2);
}
.af__body--second { margin-top: 12px; color: var(--af-ink-3); }

.af__benefits {
  display: grid;
  margin: clamp(24px, 2.2vw, 34px) 0 clamp(26px, 2.4vw, 36px);
  padding: 0;
  list-style: none;
}
.af-ben {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: clamp(12px, 1vw, 16px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.af-ben:first-child { border-top: 0; padding-top: 0; }
.af-ben__icon {
  flex: none;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--af-gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.af-ben__icon--steam { color: var(--af-gold); width: 26px; height: 26px; margin: 2px; }
.af-ben__text {
  font-family: var(--font-body);
  font-size: clamp(13.5px, 0.84vw, 15.5px);
  line-height: 1.45;
  color: var(--af-ink-2);
}
.af-ben__text b {
  display: block;
  margin-bottom: 3px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: clamp(12.5px, 0.78vw, 14px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--af-ink);
}

/* Outranks .cta--lg in css/buttons.css, which loads last. */
.af .af__cta {
  height: clamp(52px, 3.3vw, 62px);
  padding: 0 clamp(24px, 1.8vw, 32px);
  font-size: clamp(15px, 0.98vw, 17.5px);
}


.af__micro {
  margin: 16px 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--af-ink-3);
}

/* ============================================================
   THE SHOWCASE
   ============================================================ */
.af__art { position: relative; isolation: isolate; min-width: 0; }

.af__atmo { position: absolute; inset: -6% -4% -6% 0; z-index: 0; pointer-events: none; overflow: hidden; }
.af__ghost {
  position: absolute;
  width: 46%;
  aspect-ratio: 3 / 1;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.14;
  filter: saturate(0.8) brightness(0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.af__ghost picture,
.af__ghost img { display: block; width: 100%; height: 100%; object-fit: contain; }
.af__ghost--1 { right: -8%; top: 0; rotate: 10deg; }
.af__ghost--2 { left: 4%; bottom: 36%; rotate: -8deg; }

.af__rewards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) auto minmax(0, 1.18fr);
  align-items: stretch;
  gap: clamp(10px, 1vw, 18px);
}

.af-reward {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: clamp(16px, 1.3vw, 24px);
  border-radius: 14px;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: translate var(--hover-dur, 200ms) var(--ease), border-color var(--hover-dur, 200ms) ease, box-shadow var(--hover-dur, 200ms) ease;
}
.af-reward--emblem { border: 1px solid rgba(228, 174, 57, 0.5); }
.af-reward--card { border: 1px solid rgba(76, 141, 255, 0.4); justify-content: center; }
.af-reward:hover {
  translate: 0 var(--hover-lift, -2px);
  box-shadow: 0 34px 64px -32px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.af-reward--emblem:hover { border-color: rgba(228, 174, 57, 0.68); }
.af-reward--card:hover { border-color: rgba(76, 141, 255, 0.58); }

.af-reward figcaption { display: flex; flex-direction: column; gap: 4px; }
.af-reward__k {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: clamp(12px, 0.76vw, 14px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--af-ink);
}
.af-reward--emblem .af-reward__k { color: #f5d78a; }
.af-reward__ex {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--af-blue);
}

.af-reward__emblem {
  position: relative;
  display: block;
  width: min(82%, 240px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.af-reward__emblem::before {
  content: "";
  position: absolute;
  inset: 8%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(240, 180, 41, 0.22), rgba(240, 180, 41, 0) 75%);
  filter: blur(8px);
}
.af-reward__emblem picture,
.af-reward__emblem img,
.af-id__emblem picture,
.af-id__emblem img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.7)); }

.af-reward__card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 1;
  border: 1px solid rgba(240, 180, 41, 0.7);
  border-radius: 8px;
  overflow: hidden;
  background: #0b0e14;
  box-shadow: 0 22px 40px -18px rgba(0, 0, 0, 0.95), 0 18px 40px -22px rgba(61, 127, 255, 0.45);
}
.af-reward__card picture,
.af-reward__card img { display: block; width: 100%; height: 100%; object-fit: contain; }

.af__plus {
  align-self: center;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 2vw, 40px);
  line-height: 1;
  color: var(--af-gold);
}

/* ---------- The example creator: the joke and the label, together ---------- */
.af-wally {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: clamp(18px, 1.6vw, 24px) 0 0;
}
.af-wally__tag {
  flex: none;
  padding: 4px 10px;
  border: 1px solid rgba(106, 159, 255, 0.45);
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--af-blue);
  background: rgba(61, 127, 255, 0.07);
}
.af-wally__line {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 700;
  font-size: clamp(17px, 1.2vw, 22px);
  line-height: 1.25;
  color: var(--af-ink);
}
.af-wally__you {
  font-weight: 800;
  color: var(--af-gold);
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(228, 174, 57, 0.28);
}

.af__explain {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 8px 0 clamp(18px, 1.6vw, 26px);
  font-family: var(--font-body);
  font-size: clamp(12.5px, 0.76vw, 14px);
  line-height: 1.5;
  color: var(--af-ink-3);
}

/* ---------- The creator identity: the example creator's, tagged Example ---------- */
.af-id {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: clamp(14px, 1.2vw, 22px) clamp(16px, 1.4vw, 26px);
  border: 1px solid var(--af-line);
  border-radius: 14px;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.95);
}
.af-id__main { display: flex; align-items: center; gap: clamp(14px, 1.3vw, 24px); min-width: 0; }
.af-id__emblem { flex: none; display: block; width: clamp(76px, 5.6vw, 104px); aspect-ratio: 1 / 1; }
.af-id__text { min-width: 0; }
.af-id__k {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--af-blue);
}
.af-id__ex {
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid rgba(106, 159, 255, 0.4);
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  vertical-align: 1px;
}
.af-id__set {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 800;
  font-size: clamp(18px, 1.3vw, 24px);
  line-height: 1.1;
  color: var(--af-ink);
}
.af-id__items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 6px 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--af-ink-2);
}
.af-id__items span[aria-hidden] { color: var(--af-gold); }
.af-id__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--af-ink-3);
}
.af-id__excl {
  padding: 3px 9px;
  border: 1px solid rgba(228, 174, 57, 0.5);
  border-radius: 999px;
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f5d78a;
  background: rgba(228, 174, 57, 0.06);
}
.af-id__steam {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 230px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.4;
  color: var(--af-ink-3);
}
.af-id__steam svg { flex: none; width: 22px; height: 22px; color: #c9d2e3; }
.af-id__steam b { display: block; font-weight: 600; color: var(--af-ink-2); }

/* ---------- How it works ---------- */
.af-how {
  position: relative;
  z-index: 1;
  margin-top: clamp(12px, 1vw, 16px);
  padding: clamp(14px, 1.2vw, 22px) clamp(16px, 1.4vw, 26px);
  border: 1px solid var(--af-line);
  border-radius: 14px;
}
.af-how__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--af-ink-2);
}
.af-how__head::after { content: ""; width: 56px; height: 1px; background: rgba(106, 159, 255, 0.6); }
.af-how__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.af-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 clamp(14px, 1.2vw, 22px) 0 0;
  font-family: var(--font-body);
  font-size: clamp(12.5px, 0.76vw, 14px);
  line-height: 1.45;
  color: var(--af-ink-3);
}
.af-step + .af-step { padding-left: clamp(14px, 1.2vw, 22px); border-left: 1px solid rgba(255, 255, 255, 0.05); }
.af-step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 34px;
  width: 14px;
  height: 14px;
  background: rgba(106, 159, 255, 0.8);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h10M9 4.5 12.5 8 9 11.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h10M9 4.5 12.5 8 9 11.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.af-step__top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.af-step__n { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; font-size: clamp(16px, 1.1vw, 20px); color: var(--af-blue); }
.af-step__top svg { width: 30px; height: 30px; fill: none; stroke: var(--af-gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.af-step b {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: clamp(11.5px, 0.72vw, 13px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--af-ink);
}

/* ============================================================
   MOTION, only when asked for (js/affiliates.js arms it)
   Once in, then still.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .af.is-armed .af__copy > * { opacity: 0; translate: 0 var(--reveal-rise, 12px); }
  .af.is-armed .af-reward { opacity: 0; translate: 0 var(--reveal-rise, 12px); }
  .af.is-armed .af__plus,
  .af.is-armed .af-wally,
  .af.is-armed .af__explain,
  .af.is-armed .af-id,
  .af.is-armed .af-how { opacity: 0; }

  .af.is-in .af__copy > * {
    opacity: 1;
    translate: 0 0;
    transition: opacity var(--reveal-fade, 550ms) ease, translate var(--reveal-dur, 650ms) var(--ease);
  }
  .af.is-in .af__copy > .af__title { transition-delay: 60ms; }
  .af.is-in .af__copy > .af__body { transition-delay: 120ms; }
  .af.is-in .af__copy > .af__benefits { transition-delay: 180ms; }
  .af.is-in .af__copy > .af__cta,
  .af.is-in .af__copy > .af__micro { transition-delay: 240ms; }
  .af.is-in .af-reward {
    opacity: 1;
    translate: 0 0;
    transition: opacity var(--reveal-fade, 550ms) ease 160ms, translate var(--reveal-dur, 650ms) var(--ease) 160ms;
  }
  .af.is-in .af-reward--card { transition-delay: 240ms; }
  .af.is-in .af-reward:hover { transition-delay: 0ms; transition-duration: var(--hover-dur, 200ms); }
  .af.is-in .af__plus,
  .af.is-in .af-wally,
  .af.is-in .af__explain,
  .af.is-in .af-id,
  .af.is-in .af-how { opacity: 1; transition: opacity var(--reveal-fade, 550ms) ease 380ms; }
  .af.is-in .af-how { transition-delay: 460ms; }
}

/* ============================================================
   NARROWER SCREENS
   ============================================================ */
@media (max-width: 1399px) {
  .af-id { grid-template-columns: minmax(0, 1fr); }
  .af-id__steam { max-width: none; }
}

/* STACKED: the copy, then the showcase. */
@media (max-width: 1099px) {
  .af__inner { grid-template-columns: minmax(0, 1fr); }
  .af__line { white-space: normal; }
  .af__copy { max-width: 660px; }
}

/* PHONES: the rewards one under another, the "+" turned into a joint
   between them; the cards stay 3:1; identity and steps stack. */
@media (max-width: 699px) {
  .af__rewards { grid-template-columns: minmax(0, 1fr); }
  .af__plus { justify-self: center; }
  .af-reward__emblem { width: min(56%, 200px); }
  .af-id__main { flex-direction: column; align-items: flex-start; }
  .af-how__steps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .af-step + .af-step { padding-left: 0; border-left: 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
  .af-step:not(:last-child)::after { display: none; }
  .af__ghost { width: 70%; }
  .af .af__cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .af__copy > *, .af-reward, .af__plus, .af-wally, .af__explain, .af-id, .af-how { transition: none; }
  .af-reward:hover { translate: none; }
}
