/*
 * Scoped, hand-ported CSS for the `/affiliates` marketing landing page — a 1:1
 * port of the approved Shopify-style artifact (published v16,
 * https://claude.ai/artifact/MZKUJCmnNuXsrxHqGPhC24). Kept as near-verbatim
 * plain CSS (not Tailwind-ified) because several mechanisms here — the
 * native `<select>`/`<input type=range>` skins, `details[open] summary`,
 * the `--grad` background-clip gradient text, and the per-card `--d`/
 * `--slide`/`--rot` custom properties driving the reveal animations — don't
 * translate cleanly to utility classes without drifting from the reference.
 *
 * Every selector is scoped under `.aff-page` (this page's own root class,
 * same pattern as `(marketing)/marketing.css`'s `.mkt-root`) so nothing here
 * leaks into the rest of the app. Three deliberate departures from the
 * artifact's own `\3c style>` block:
 *   1. Every `font-family:` declaration is dropped — `.dash-fonts`
 *      (globals.css) already resolves Rubik (headings) / Inter+Heebo (body)
 *      per-language for this whole route group; hardcoding "Rubik" here
 *      would render with no Hebrew glyphs at all on the Hebrew locale.
 *   2. `:root{--ink:...}` moved onto `.aff-page` — defining it on `:root`
 *      would collide with the site-wide design system's own tokens.
 *   3. `*{box-sizing}`, `html{scroll-behavior}`, `body{margin;background;
 *      color;line-height}` dropped — Tailwind's preflight (already loaded
 *      site-wide) covers box-sizing/margin; background+color+line-height
 *      are scoped onto `.aff-page` itself below instead of `body`.
 */

/* `html{scroll-behavior:smooth}` can't just move onto `.aff-page` — the
   scroller for a `#hash` jump is the document, not this div, so the
   property only takes effect on the element that's actually scrolling.
   `:has()` keeps it off every other route. */
html:has(.aff-page) {
  scroll-behavior: smooth;
}

.aff-page {
  --ink: #101014;
  --paper: #ffffff;
  --cream: #f6f3ee;
  --pink: #f65bd0;
  --violet: #a855f7;
  --cyan: #22d3ee;
  --grad: linear-gradient(100deg, var(--pink) 0%, var(--violet) 55%, var(--cyan) 100%);
  --muted: #6b7280;
  --muted-dark: #9ca3af;
  --line: #e8e6e1;
  --line-dark: #2a2a32;
  --dark-card: #1b1b22;
  --dark-card-2: #202028;

  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

/* Scroll-reveal: default is visible (opacity:1) so a no-JS visitor, or the
   instant before JS attaches the observer, never sees blank sections --
   the reveal hook is what actually assigns the pre-reveal "out" state, only
   once it can also guarantee removing it. */
.aff-page .reveal.out {
  opacity: 0;
  transform: translateY(28px);
}
.aff-page .reveal {
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) {
  .aff-page .reveal,
  .aff-page .reveal.out {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Card-by-card entrance, same one-shot IntersectionObserver mechanism as
   `.reveal` above. Each card gets a small stagger via `--d` so a group
   cascades in rather than popping as one flat block. */
.aff-page .reveal-item.out {
  opacity: 0;
  transform: translateY(26px);
}
/* Audience cards get a bigger, more dramatic entrance than the generic
   fade-and-rise -- each slides in from its own side (`--slide`, set per
   card so they alternate left/right) with a slight rotation, landing flat
   and in place. Same one-shot observer mechanism, just a punchier "out"
   transform for this one group. */
.aff-page .audience-strip figure.reveal-item.out {
  transform: translateX(var(--slide, 70px)) rotate(var(--rot, 3deg));
}
.aff-page .audience-strip figure.reveal-item {
  transition:
    opacity 0.75s cubic-bezier(0.16, 0.9, 0.2, 1.08) var(--d, 0s),
    transform 0.75s cubic-bezier(0.16, 0.9, 0.2, 1.08) var(--d, 0s);
}
.aff-page .reveal-item {
  transition:
    opacity 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) var(--d, 0s),
    transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) var(--d, 0s);
}
@media (prefers-reduced-motion: reduce) {
  .aff-page .reveal-item,
  .aff-page .reveal-item.out {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/*
 * No `margin: 0` here on purpose — it was here in an earlier draft and
 * clobbered `mx-auto`/`mt-2`/`mt-4` etc. on the apply-flow card's own `<p>`/
 * `<h2>` elements (which live inside `.aff-page` too, unlike the rest of
 * this file's ported sections, none of which use those utilities): this
 * stylesheet is loaded unlayered, so it beats Tailwind's `@layer utilities`
 * regardless of specificity. Tailwind's preflight (globals.css, `@layer
 * base`) already zeroes `p`/`h1`-`h6` margins for every ported section here,
 * so dropping the override loses nothing and un-breaks the apply card.
 */
.aff-page h1,
.aff-page h2,
.aff-page h3 {
  text-wrap: balance;
  letter-spacing: -0.02em;
}
.aff-page .container {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 32px;
}
@media (max-width: 640px) {
  .aff-page .container {
    padding-inline: 20px;
  }
}
.aff-page .pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  border: 0;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease;
  /* A pill is only a pill on one line — as a flex CHILD of `header nav`
     (flex, no wrap by default) its text can otherwise break between words
     once the row gets tight (long "Become an affiliate" + the brand mark
     squeezed onto one line on a real phone, confirmed live), turning the
     999px border-radius into a broken two-line oval instead of a pill. */
  white-space: nowrap;
  flex: none;
}
.aff-page .pill-btn:hover {
  transform: translateY(-1px);
}
.aff-page .pill-btn.on-dark {
  background: #fff;
  color: var(--ink);
}
.aff-page .pill-btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

/* header */
.aff-page header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 420px) {
  /* Fallback for the narrowest real phones: if the brand mark + a
     non-wrapping pill button still don't both fit on one row, drop the
     nav onto its own row below the brand rather than clipping/overlapping
     anything — a real device at this width showed exactly that squeeze. */
  .aff-page header {
    flex-wrap: wrap;
    row-gap: 12px;
    padding: 18px 20px;
  }
}
.aff-page .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.aff-page .brand .mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: none;
}
.aff-page .brand .mark img {
  width: 26px;
  height: 26px;
}
.aff-page header nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.aff-page header nav a.login {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
@media (max-width: 600px) {
  .aff-page header nav a.login {
    display: none;
  }
  /* The hero's own CTA sits right below the fold on mobile — a second
   * "Become an affiliate" pill in the header right next to the logo reads
   * as a duplicate rather than a persistent nav action at this width. */
  .aff-page header nav .pill-btn {
    display: none;
  }
}

/* hero */
.aff-page .hero {
  text-align: center;
  padding: 44px 24px 0;
}
.aff-page .hero h1 {
  font-size: clamp(40px, 6.2vw, 74px);
  font-weight: 800;
  line-height: 1.04;
}
.aff-page .hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.aff-page .hero p.lede {
  max-width: 46ch;
  margin: 22px auto 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}
.aff-page .hero .pill-btn {
  margin-top: 30px;
  padding: 16px 30px;
  font-size: 15.5px;
}

/* audience cards -- a contained, gapped grid (not a full-bleed touching
   strip): each card is its own rounded object with breathing room around
   it, so the parallax drift and the section edges never need to hide a
   seam -- there's meant to be visible page background between cards. */
.aff-page .audience-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1560px;
  margin: 64px auto -110px;
  padding-inline: 32px;
  height: 540px;
}
.aff-page .audience-strip figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  height: 100%;
  border-radius: 20px;
  background: var(--cream);
  box-shadow:
    0 24px 48px -14px rgba(16, 16, 20, 0.32),
    0 2px 8px rgba(16, 16, 20, 0.08);
}
/* Parallax drift lives on this wrapper (JS sets a CLAMPED translateX,
   bounded by each card's own `data-speed` regardless of how far you keep
   scrolling -- see use-reveal.ts's `useParallaxDrift` doc comment for why
   an earlier unbounded version blew past the image's own oversize margin
   and exposed the card's background). Two separate elements (this wrapper
   for scroll-drift, the <img> for hover-zoom) so the two transforms
   compose instead of one clobbering the other. */
.aff-page .px-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.aff-page .audience-strip img {
  position: absolute;
  left: -6%;
  top: 0;
  width: 112%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.05);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.aff-page .audience-strip figure:hover img {
  transform: scale(1.04);
}
.aff-page .audience-strip figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 20px 20px 22px;
  background: linear-gradient(to top, rgba(10, 10, 14, 0.82), rgba(10, 10, 14, 0) 65%);
  color: #fff;
}
.aff-page .audience-strip figcaption b {
  display: block;
  font-weight: 700;
  font-size: 17px;
}
.aff-page .audience-strip figcaption span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: #e4e2ea;
  line-height: 1.4;
}
@media (max-width: 860px) {
  .aff-page .audience-strip {
    grid-template-columns: repeat(2, 1fr);
    height: auto;
    margin-bottom: -80px;
  }
  .aff-page .audience-strip figure {
    height: 340px;
  }
}
@media (max-width: 640px) {
  .aff-page .audience-strip {
    padding-inline: 20px;
  }
}
@media (max-width: 479px) {
  .aff-page .audience-strip {
    grid-template-columns: 1fr;
  }
}

/* dark zone: calculator + benefits */
.aff-page .dark-zone {
  background: var(--ink);
  color: #fff;
  padding: 152px 0 104px;
}
.aff-page .dark-zone h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
}
.aff-page .calc-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}
@media (max-width: 860px) {
  .aff-page .calc-grid {
    grid-template-columns: 1fr;
  }
}
.aff-page .calc-card {
  background: var(--dark-card);
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  padding: 36px;
}
.aff-page .calc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: #c9c7d1;
}
.aff-page .calc-row b {
  color: #fff;
  font-size: 15px;
}
.aff-page input[type='range'] {
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: #33333d;
  margin: 18px 0 8px;
  cursor: pointer;
}
.aff-page input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid var(--violet);
  cursor: pointer;
}
.aff-page input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid var(--violet);
  cursor: pointer;
}
.aff-page .earn-line {
  font-size: 13.5px;
  color: #9c9aa6;
  margin-top: 2px;
}
.aff-page .earn-line b {
  color: var(--cyan);
}
.aff-page .select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}
.aff-page select {
  appearance: none;
  background: var(--dark-card-2);
  color: #fff;
  border: 1px solid var(--line-dark);
  padding: 9px 34px 9px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23ffffff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
[dir='rtl'] .aff-page select {
  padding: 9px 14px 9px 34px;
  background-position: left 14px center;
}
.aff-page .result {
  margin-top: 20px;
}
.aff-page .result .label {
  font-size: 13.5px;
  color: #c9c7d1;
}
.aff-page .result .amount {
  font-weight: 800;
  font-size: clamp(38px, 4.2vw, 52px);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
  display: inline-block;
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1.4),
    opacity 0.2s ease;
}
.aff-page .result .amount.pulse {
  transform: scale(1.055);
  opacity: 0.85;
}
.aff-page .calc-fine {
  margin-top: 18px;
  font-size: 11.5px;
  color: #75737e;
  line-height: 1.5;
  border-top: 1px solid var(--line-dark);
  padding-top: 14px;
}
.aff-page .no-cap-card {
  background: var(--dark-card);
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.aff-page .no-cap-card h3 {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
}
.aff-page .no-cap-card p {
  font-size: 14px;
  color: #c9c7d1;
  line-height: 1.55;
}

.aff-page .benefit-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 900px) {
  .aff-page .benefit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 479px) {
  .aff-page .benefit-grid {
    grid-template-columns: 1fr;
  }
}
.aff-page .benefit-card {
  background: var(--dark-card);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 26px;
  transition:
    transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1),
    border-color 0.3s ease,
    background 0.3s ease;
}
.aff-page .benefit-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--dark-card-2);
}
.aff-page .benefit-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(246, 91, 208, 0.18), rgba(34, 211, 238, 0.18));
  border: 1px solid var(--line-dark);
  margin-bottom: 18px;
}
.aff-page .benefit-icon svg {
  width: 19px;
  height: 19px;
  stroke: #fff;
}
.aff-page .benefit-card h4 {
  font-weight: 700;
  font-size: 15.5px;
  margin-bottom: 6px;
}
.aff-page .benefit-card p {
  font-size: 13px;
  color: #9c9aa6;
  line-height: 1.5;
}

/* who it's for + stats (cream) */
.aff-page .cream-section {
  background: var(--cream);
  padding: 96px 0;
}
.aff-page .who-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 860px) {
  .aff-page .who-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
.aff-page .who-list {
  border-top: 1px solid var(--line);
}
.aff-page .who-row {
  display: flex;
  gap: 16px;
  padding: 20px 6px;
  margin: 0 -6px;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
  transition:
    background 0.25s ease,
    padding-inline-start 0.25s ease;
}
.aff-page .who-row:hover {
  background: rgba(16, 16, 20, 0.035);
  padding-inline-start: 14px;
}
.aff-page .who-row .dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 8px;
  background: var(--grad);
  transition: transform 0.25s ease;
}
.aff-page .who-row:hover .dot {
  transform: scale(1.5);
}
.aff-page .who-row b {
  display: block;
  font-weight: 700;
  font-size: 16px;
}
.aff-page .who-row span {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.aff-page .stat-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: center;
}
.aff-page .stat .n {
  font-weight: 800;
  font-size: 44px;
  letter-spacing: -0.03em;
}
.aff-page .stat .l {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

/* start earning (3 steps) */
.aff-page .steps-section {
  padding: 96px 0;
}
.aff-page .steps-row {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 760px) {
  .aff-page .steps-row {
    grid-template-columns: 1fr;
  }
}
.aff-page .step b.num {
  font-weight: 800;
  font-size: 14px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.aff-page .step h4 {
  margin-top: 10px;
  font-weight: 700;
  font-size: 19px;
}
.aff-page .step p {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* faq */
.aff-page .faq-section {
  background: var(--cream);
  padding: 96px 0 104px;
}
.aff-page .faq-list {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.aff-page .faq-list details {
  border-bottom: 1px solid var(--line);
}
.aff-page .faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.2s ease;
}
.aff-page .faq-list summary:hover {
  color: var(--violet);
}
.aff-page .faq-list summary::-webkit-details-marker {
  display: none;
}
.aff-page .faq-list summary .icon {
  font-size: 20px;
  color: var(--muted);
  flex: 0 0 auto;
  margin-inline-start: 16px;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1.3);
}
.aff-page .faq-list details[open] summary .icon {
  transform: rotate(45deg);
}
.aff-page .faq-list p {
  padding: 0 4px 22px;
  max-width: 70ch;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* footer */
.aff-page footer {
  background: var(--ink);
  color: #fff;
  padding: 72px 0 32px;
}
.aff-page .foot-top {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 760px) {
  .aff-page .foot-top {
    grid-template-columns: repeat(2, 1fr);
  }
}
.aff-page .foot-top h5 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b8994;
  margin-bottom: 16px;
}
.aff-page .foot-top a {
  display: block;
  color: #d6d4dd;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 11px;
}
.aff-page .foot-top a:hover {
  color: #fff;
}
.aff-page .foot-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #8b899d;
}
@media (max-width: 600px) {
  .aff-page .foot-bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

