/* KairSun Referidos v3 — hero con energía y escalera legible.
 *
 * Dueño: agente Referidos. Se carga DESPUÉS de marketing.css: tokens, `.btn`,
 * `.wrap`, focos y reduced-motion global vienen de ahí; acá no se redefinen.
 *
 * Presupuesto de movimiento (duro): 3 loops infinitos, todos solo
 * transform/opacity en el compositor —
 *   1. `rf-orb` (orbes del hero a la deriva),
 *   2. `rf-float` (cluster de tokens + pet Legendary),
 *   3. `rf-cta-halo` (anillo del CTA respirando en opacity).
 * Todo lo demás es finito y único: entradas `rf-rise`/`rf-pop` al cargar,
 * progreso `rf-grow` y micro-destello `rf-sheen` al entrar en viewport con
 * `animation-timeline: view()` (con fallback a entrada al cargar si no hay
 * soporte). Anillos aurora y sellos: color estático, sin giro.
 * Con `prefers-reduced-motion: reduce` no corre ninguna animación.
 *
 * Rainbow: `conic-gradient` estático en un pseudo sobredimensionado; la
 * superficie opaca `inset: 2px` lo recorta a anillo.
 *   - Fallback sin `conic-gradient`: anillo sólido estático.
 * La superficie bajo el texto es opaca, así el contraste AA no depende del arco.
 *
 * Contador de escalones: `counter(rf-step)` en `.rf-card__top::after` y en
 * `.rf-legend__visual::after` → "1/10"…"10/10" sin tocar el HTML (ES+EN
 * quedan idénticos por construcción). Números fijos y honestos.
 *
 * Reglas duras: sin JS, sin inline, sin `!important`, fuentes locales, focus
 * visible heredado, touch ≥44, responsive 320→ultrawide.
 */

.rf-main { padding-top: 18px; padding-bottom: 10px; }

/* ---------- Anillo base ---------- */

.rf-aurora {
  --rf-alpha: 0.5;
  --rf-speed: 34s;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background-color: #0b101a;
  background-image: linear-gradient(180deg, #111726 0%, #0a0f1a 100%);
  color: var(--text);
  transition: box-shadow 0.4s ease, transform 0.3s ease;
}
.rf-aurora > * { position: relative; z-index: 1; }

.rf-aurora::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 200%;
  max-width: 1600px;
  aspect-ratio: 1;
  translate: -50% -50%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #2DD4BF 0deg,
    #38BDF8 60deg,
    #A78BFA 120deg,
    #F472B6 180deg,
    #F5C451 240deg,
    #4ADE80 300deg,
    #2DD4BF 360deg
  );
  opacity: var(--rf-alpha);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.rf-aurora::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: 0;
  border-radius: max(0px, calc(var(--radius-xl) - 2px));
  background: linear-gradient(180deg, #111726 0%, #0a0f1a 100%);
  box-shadow:
    inset 0 24px 60px -34px rgba(45, 212, 191, 0),
    inset 0 -28px 64px -38px rgba(245, 196, 81, 0),
    inset -30px 0 64px -38px rgba(167, 139, 250, 0);
  pointer-events: none;
  transition: box-shadow 0.4s ease;
}

.rf-aurora:focus-within {
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.45),
    0 0 26px rgba(45, 212, 191, 0.22),
    0 0 46px rgba(245, 196, 81, 0.14);
}
.rf-aurora:focus-within::before { opacity: 1; }
.rf-aurora:focus-within::after {
  box-shadow:
    inset 0 24px 60px -34px rgba(45, 212, 191, 0.3),
    inset 0 -28px 64px -38px rgba(245, 196, 81, 0.24),
    inset -30px 0 64px -38px rgba(167, 139, 250, 0.24);
}

@media (hover: hover) {
  .rf-aurora:hover {
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.45),
      0 0 26px rgba(45, 212, 191, 0.22),
      0 0 46px rgba(245, 196, 81, 0.14);
  }
  .rf-aurora:hover::before { opacity: 1; }
  .rf-aurora:hover::after {
    box-shadow:
      inset 0 24px 60px -34px rgba(45, 212, 191, 0.3),
      inset 0 -28px 64px -38px rgba(245, 196, 81, 0.24),
      inset -30px 0 64px -38px rgba(167, 139, 250, 0.24);
  }
  .rf-card:hover,
  .rf-step:hover,
  .rf-how__item:hover { transform: translateY(-4px); }
  .rf-card:hover .rf-card__medal {
    border-color: rgba(245, 196, 81, 0.45);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      0 12px 24px rgba(0, 0, 0, 0.42),
      0 0 20px rgba(245, 196, 81, 0.2);
    transform: translateY(-2px) scale(1.06);
  }
  .rf-card:hover .rf-card__num {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      0 6px 14px rgba(0, 0, 0, 0.38),
      0 0 18px rgba(245, 196, 81, 0.45);
  }
}

@supports not (background: conic-gradient(from 0deg, #000, #fff)) {
  .rf-aurora { border: 2px solid rgba(45, 212, 191, 0.45); }
  .rf-aurora::before { display: none; }
  .rf-aurora::after { inset: 0; }
}

/* ---------- Hero ---------- */

.rf-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 34px;
  padding: 34px 32px 30px;
  margin: 0 0 38px;
}
.rf-hero__body { min-width: 0; }

/* Hero y CTA con más color: lavados teal/magenta/gold sobre la superficie
 * opaca (el texto nunca depende del arco; contraste AA intacto). */
.rf-hero.rf-aurora::after {
  background:
    radial-gradient(60% 90% at 8% 0%, rgba(45, 212, 191, 0.12), transparent 65%),
    radial-gradient(55% 85% at 96% 12%, rgba(244, 114, 182, 0.1), transparent 65%),
    radial-gradient(70% 90% at 50% 115%, rgba(245, 196, 81, 0.12), transparent 68%),
    linear-gradient(180deg, #131a2b 0%, #0a0f1a 100%);
}
.rf-cta.rf-aurora::after {
  background:
    radial-gradient(55% 80% at 50% 120%, rgba(245, 196, 81, 0.12), transparent 66%),
    radial-gradient(50% 70% at 92% 0%, rgba(45, 212, 191, 0.1), transparent 65%),
    linear-gradient(180deg, #121829 0%, #0a0f1a 100%);
}

/* Capas del cuadro: cielo, horizonte y nebulosas. Estáticas o con deriva
 * lenta; viven debajo del contenido (z-index 0 vs. hijos en z-index 1). */
.rf-cine__sky,
.rf-cine__horizon,
.rf-cine__nebula {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}
.rf-cine__sky {
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 9% 18%, rgba(248, 250, 252, 0.85), transparent 62%),
    radial-gradient(1.2px 1.2px at 22% 64%, rgba(45, 212, 191, 0.75), transparent 62%),
    radial-gradient(1.6px 1.6px at 38% 28%, rgba(248, 250, 252, 0.7), transparent 62%),
    radial-gradient(1.1px 1.1px at 52% 76%, rgba(255, 215, 119, 0.7), transparent 62%),
    radial-gradient(1.4px 1.4px at 67% 16%, rgba(248, 250, 252, 0.75), transparent 62%),
    radial-gradient(1.2px 1.2px at 79% 58%, rgba(167, 139, 250, 0.75), transparent 62%),
    radial-gradient(1.5px 1.5px at 91% 36%, rgba(248, 250, 252, 0.6), transparent 62%),
    radial-gradient(1px 1px at 45% 46%, rgba(248, 250, 252, 0.5), transparent 62%),
    radial-gradient(38% 46% at 10% 6%, rgba(45, 212, 191, 0.2), transparent 70%),
    radial-gradient(42% 50% at 90% 10%, rgba(244, 114, 182, 0.16), transparent 70%),
    radial-gradient(46% 55% at 84% 90%, rgba(167, 139, 250, 0.2), transparent 70%),
    radial-gradient(40% 48% at 16% 94%, rgba(56, 189, 248, 0.14), transparent 70%),
    radial-gradient(54% 42% at 50% 110%, rgba(245, 196, 81, 0.14), transparent 72%);
  opacity: 0.9;
}
.rf-cine__horizon {
  left: -12%;
  right: -12%;
  bottom: -58%;
  height: 96%;
  border-radius: 50%;
  background: radial-gradient(
    50% 50% at 50% 50%,
    rgba(245, 196, 81, 0.3),
    rgba(245, 196, 81, 0.08) 52%,
    transparent 72%
  );
  opacity: 0.85;
}
.rf-cine__horizon::before {
  content: "";
  position: absolute;
  inset: 4% 7%;
  border-radius: 50%;
  border-top: 1px solid rgba(255, 215, 119, 0.4);
}
.rf-cine__nebula {
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.62;
}
.rf-cine__nebula--teal {
  top: -26%;
  left: -12%;
  background: radial-gradient(circle at 50% 50%, rgba(45, 212, 191, 0.42), transparent 66%);
}
.rf-cine__nebula--violet {
  right: -10%;
  bottom: -30%;
  background: radial-gradient(circle at 50% 50%, rgba(167, 139, 250, 0.38), transparent 66%);
}

/* Lockup de marca: sello con anillo punteado giratorio + Kairós + Sun. */
.rf-lockup {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 16px;
}
.rf-lockup__seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(245, 196, 81, 0.38);
  background:
    radial-gradient(120% 120% at 30% 18%, rgba(255, 255, 255, 0.16), transparent 60%),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 22px rgba(0, 0, 0, 0.38);
}
.rf-lockup__seal::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(245, 196, 81, 0.42);
}
.rf-lockup__mark {
  width: 27px;
  height: 27px;
  object-fit: contain;
}
.rf-lockup__word {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rf-lockup__etym {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.rf-lockup__kairos { color: var(--gold-hi); }
.rf-lockup__plus { color: var(--mastery); }
.rf-lockup__sun { color: var(--gold-base); }
.rf-lockup__tag {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rf-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 196, 81, 0.38);
  background: rgba(245, 196, 81, 0.1);
  color: var(--gold-hi);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rf-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-base);
  box-shadow: 0 0 8px rgba(245, 196, 81, 0.55);
}
.rf-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.005em;
  margin: 0 0 12px;
  text-wrap: balance;
}
.rf-hero__lead {
  margin: 0 0 20px;
  max-width: 56ch;
  color: var(--text-2);
  font-size: 1.04rem;
  line-height: 1.6;
  text-wrap: pretty;
}
.rf-hero__lead strong { color: var(--text); }
.rf-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.rf-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
}
.rf-fact {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 600;
}
.rf-fact--lock {
  position: relative;
  border-color: rgba(245, 196, 81, 0.4);
  background: rgba(245, 196, 81, 0.08);
  color: var(--gold-base);
  box-shadow: 0 0 12px rgba(245, 196, 81, 0.12);
}
.rf-hero__tokens {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.rf-hero__tokens::before {
  content: "";
  position: absolute;
  inset: -26px -18px;
  border-radius: 50%;
  background: radial-gradient(60% 70% at 50% 50%, rgba(245, 196, 81, 0.16), transparent 70%);
  pointer-events: none;
}
.rf-token {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, 0.16), transparent 62%),
    rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 24px rgba(0, 0, 0, 0.35);
}
.rf-token img { width: 36px; height: 36px; }

@keyframes rf-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
/* Loop 1/3 — orbes del hero a la deriva (solo transform). */
@keyframes rf-orb {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(9%, 7%, 0); }
}
/* Loop 3/3 — pulso suave del CTA: solo opacity + scale (compositor). */
@keyframes rf-cta-halo {
  0%, 100% { opacity: 0.45; scale: 1; }
  50% { opacity: 0.85; scale: 1.015; }
}
@keyframes rf-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes rf-pop {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes rf-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(var(--rf-frac, 1)); }
}
@keyframes rf-sheen {
  0%, 70% { transform: translateX(-180%) rotate(18deg); opacity: 0; }
  78% { opacity: 0.9; }
  92%, 100% { transform: translateX(280%) rotate(18deg); opacity: 0; }
}

/* ---------- Secciones ---------- */

.rf-section { margin: 0 0 42px; scroll-margin-top: 124px; }
.rf-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  color: var(--mastery);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
/* Hairline teal→gold: el kicker pide atención sin gastar un loop. */
.rf-kicker::before {
  content: "";
  flex: none;
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--mastery), var(--gold-base));
}
.rf-section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.rf-section__sub {
  margin: 0 0 20px;
  max-width: 58ch;
  color: var(--text-2);
  line-height: 1.55;
}
.rf-fine {
  margin: 14px 0 0;
  max-width: 72ch;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}
.rf-fine strong { color: var(--text-2); }
.rf-fine--guest { display: flex; align-items: flex-start; gap: 8px; }
.rf-fine--guest img { width: 16px; height: 16px; margin-top: 3px; flex: none; }

/* ---------- Cómo se gana (tira gráfica, 3 pasos fijos) ---------- */

.rf-how {
  list-style: none;
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
}
.rf-how__item {
  --rf-alpha: 0.42;
  --rf-speed: 5.5s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
}
.rf-how__num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-deep));
  color: var(--gold-ink);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 6px 14px rgba(0, 0, 0, 0.38),
    0 0 14px rgba(245, 196, 81, 0.25);
}
.rf-how__txt {
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.5;
}
.rf-how__txt strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}
@media (min-width: 640px) {
  .rf-how::before {
    content: "";
    position: absolute;
    top: 33px;
    left: 6%;
    right: 6%;
    height: 2px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(45, 212, 191, 0.4),
      rgba(245, 196, 81, 0.4),
      transparent
    );
    pointer-events: none;
  }
}

/* ---------- Riel de la escalera (1→10) ---------- */

.rf-rail {
  position: relative;
  height: 8px;
  margin: 2px 0 20px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
}
.rf-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    90deg,
    rgba(2, 13, 26, 0.6) 0 1px,
    transparent 1px 10%
  );
  pointer-events: none;
}
.rf-rail__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mastery), var(--gold-base));
  box-shadow: 0 0 16px rgba(245, 196, 81, 0.35);
  transform-origin: left center;
  transform: scaleX(1);
}
.rf-rail__cap {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  translate: 0 -50%;
  border-radius: 50%;
  border: 1px solid rgba(245, 196, 81, 0.5);
  background: #0b101a;
  color: var(--gold-hi);
  font-family: var(--display);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
}
.rf-rail__cap--start { left: -5px; }
.rf-rail__cap--end { right: -5px; }

/* ---------- Escalera visual ---------- */

.rf-ladder {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  counter-reset: rf-step;
}
.rf-card {
  --rf-alpha: 0.42;
  --rf-speed: 5.5s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 170px;
  padding: 16px;
  border-radius: 18px;
  counter-increment: rf-step;
}
.rf-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.rf-card__num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, var(--gold-hi), var(--gold-base) 55%, var(--gold-deep));
  color: var(--gold-ink);
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 6px 14px rgba(0, 0, 0, 0.38);
  transition: box-shadow 0.25s ease;
}
.rf-card__for {
  margin: 10px 0 0 auto;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: right;
}
/* Contador visual del escalón: "1/10"…"10/10" vía counter(). */
.rf-card__top::after {
  content: counter(rf-step) "/10";
  margin: 10px 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rf-card__icons {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  margin: 2px 0 auto;
}
.rf-card__medal {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  flex: none;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(120% 120% at 30% 18%, rgba(255, 255, 255, 0.16), transparent 62%),
    rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 20px rgba(0, 0, 0, 0.32),
    0 0 18px rgba(45, 212, 191, 0.12);
}
.rf-card__medal::after {
  content: "";
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-180%) rotate(18deg);
  opacity: 0;
  pointer-events: none;
}
.rf-card__medal img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.rf-card__medal--sm {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}
.rf-card__medal--sm img {
  width: 28px;
  height: 28px;
}
.rf-card__medal--tree {
  border-radius: 50%;
  background:
    radial-gradient(110% 110% at 32% 22%, rgba(45, 212, 191, 0.28), transparent 60%),
    rgba(255, 255, 255, 0.05);
}
.rf-card__medal--tree img {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* Barra de avance del escalón: 1/10 … 9/10, por posición.
 * `scaleX` en vez de `width`: crece en el compositor y no relayout. */
.rf-card__meter {
  display: block;
  height: 5px;
  margin-top: auto;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.rf-card__meter::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mastery), var(--gold-base));
  box-shadow: 0 0 10px rgba(245, 196, 81, 0.35);
  transform: scaleX(var(--rf-frac, 1));
  transform-origin: left center;
}
.rf-card:nth-child(1) { --rf-frac: 0.1; }
.rf-card:nth-child(2) { --rf-frac: 0.2; }
.rf-card:nth-child(3) { --rf-frac: 0.3; }
.rf-card:nth-child(4) { --rf-frac: 0.4; }
.rf-card:nth-child(5) { --rf-frac: 0.5; }
.rf-card:nth-child(6) { --rf-frac: 0.6; }
.rf-card:nth-child(7) { --rf-frac: 0.7; }
.rf-card:nth-child(8) { --rf-frac: 0.8; }
.rf-card:nth-child(9) { --rf-frac: 0.9; }
.rf-card__reward {
  margin: 0;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
}
.rf-card__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

/* Final de la escalera: skin Legendary (banner completo). */
.rf-card--legend {
  --rf-alpha: 0.6;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 22px;
  min-height: 0;
  padding: 20px 22px;
}
.rf-legend__visual {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rf-legend__visual::after {
  content: counter(rf-step) "/10";
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rf-card__pet {
  width: 96px;
  height: auto;
  aspect-ratio: 640 / 602;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.45));
}
.rf-legend__copy { min-width: 0; }
.rf-legend__copy h3 {
  margin: 2px 0 6px;
  font-size: 1.08rem;
  line-height: 1.25;
}
.rf-legend__copy p {
  margin: 0;
  max-width: 62ch;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.5;
}
/* Enlace dentro de un párrafo: subrayado además del color (link-in-text-block). */
.rf-legend__copy p a {
  color: var(--gold-hi);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.rf-legend__copy p a:hover {
  color: var(--gold-base);
  text-decoration-thickness: 2px;
}
.rf-card__tag {
  justify-self: end;
  max-width: 15rem;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 196, 81, 0.4);
  background: rgba(245, 196, 81, 0.1);
  color: var(--gold-hi);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

/* ---------- Canje ---------- */

.rf-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
}
.rf-step {
  --rf-alpha: 0.42;
  --rf-speed: 5.5s;
  padding: 18px 18px 20px;
  border-radius: 18px;
}
.rf-step__num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0 0 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-deep));
  color: var(--gold-ink);
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(245, 196, 81, 0.25);
}
.rf-step h3 { margin: 0 0 6px; font-size: 1rem; }
.rf-step p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- CTA ---------- */

.rf-cta {
  --rf-alpha: 0.55;
  margin: 0 0 30px;
  padding: 30px 28px;
  text-align: center;
  scroll-margin-top: 124px;
}
.rf-cta h2 {
  margin: 0 auto 10px;
  max-width: 32ch;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
  line-height: 1.26;
  letter-spacing: 0.005em;
}
.rf-cta p {
  margin: 0 auto 20px;
  max-width: 56ch;
  color: var(--text-2);
  line-height: 1.55;
}
.rf-cta__fine {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

/* ---------- Vuelta calma a la home ---------- */

.rf-back {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.rf-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  color: var(--text-2);
}
.rf-back a:hover {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.05);
}
.rf-back span[aria-hidden] { opacity: 0.5; }

/* ---------- Footer sin estilos inline ---------- */

.rf-footer-email { margin-top: 12px; }
.rf-footer-legal { margin-top: 28px; display: block; }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .rf-hero {
    grid-template-columns: 1fr;
    padding: 26px 20px 24px;
  }
  .rf-hero__tokens { justify-content: flex-start; }
  .rf-aurora::before { width: 250%; }
  .rf-cine__nebula { width: 64%; }
}

@media (max-width: 700px) {
  .rf-card--legend {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .rf-card__tag { justify-self: start; }
}

@media (max-width: 420px) {
  .rf-card { padding: 14px; }
  .rf-card__medal {
    width: 54px;
    height: 54px;
  }
  .rf-card__medal img {
    width: 34px;
    height: 34px;
  }
  .rf-card__meter { height: 4px; }
  .rf-card--legend { padding: 16px; }
  .rf-lockup__seal { width: 42px; height: 42px; }
  .rf-lockup__mark { width: 24px; height: 24px; }
  .rf-rail__cap { width: 20px; height: 20px; }
}

/* ---------- Movimiento ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* Loops 1–2/3 (solo transform): orbes a la deriva + flotación. */
  .rf-cine__nebula--teal { animation: rf-orb 44s ease-in-out infinite alternate; }
  .rf-cine__nebula--violet { animation: rf-orb 56s ease-in-out infinite alternate-reverse; }
  .rf-token { animation: rf-float 7s ease-in-out infinite; }
  .rf-token:nth-child(2) { animation-delay: -2.4s; }
  .rf-token:nth-child(3) { animation-delay: -4.8s; }
  .rf-card__pet { animation: rf-float 6.5s ease-in-out infinite; }
  /* Loop 3/3: pulso suave del CTA (solo opacity + scale). */
  .rf-cta.rf-aurora::before { animation: rf-cta-halo 3.4s ease-in-out infinite; }
  .rf-card__medal {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  }

  /* Entradas: una sola vez, fill `backwards` para no bloquear el hover. */
  .rf-lockup { animation: rf-rise 0.6s var(--ease-out) backwards; }
  .rf-pill { animation: rf-rise 0.6s var(--ease-out) 0.06s backwards; }
  .rf-hero h1 { animation: rf-rise 0.7s var(--ease-out) 0.12s backwards; }
  .rf-hero__lead { animation: rf-rise 0.7s var(--ease-out) 0.18s backwards; }
  .rf-hero__actions { animation: rf-rise 0.7s var(--ease-out) 0.24s backwards; }
  .rf-facts { animation: rf-rise 0.7s var(--ease-out) 0.3s backwards; }
  .rf-hero__tokens { animation: rf-rise 0.9s var(--ease-out) 0.2s backwards; }
  .rf-section h2,
  .rf-kicker,
  .rf-section__sub { animation: rf-rise 0.7s var(--ease-out) backwards; }
  .rf-card,
  .rf-step,
  .rf-how__item { animation: rf-pop 0.6s var(--ease-out) backwards; }
  .rf-card:nth-child(1) { animation-delay: 0.05s; }
  .rf-card:nth-child(2) { animation-delay: 0.12s; }
  .rf-card:nth-child(3) { animation-delay: 0.19s; }
  .rf-card:nth-child(4) { animation-delay: 0.26s; }
  .rf-card:nth-child(5) { animation-delay: 0.33s; }
  .rf-card:nth-child(6) { animation-delay: 0.4s; }
  .rf-card:nth-child(7) { animation-delay: 0.47s; }
  .rf-card:nth-child(8) { animation-delay: 0.54s; }
  .rf-card:nth-child(9) { animation-delay: 0.61s; }
  .rf-card:nth-child(10) { animation-delay: 0.68s; }
  .rf-step:nth-child(1) { animation-delay: 0.1s; }
  .rf-step:nth-child(2) { animation-delay: 0.18s; }
  .rf-step:nth-child(3) { animation-delay: 0.26s; }
  .rf-how__item:nth-child(1) { animation-delay: 0.08s; }
  .rf-how__item:nth-child(2) { animation-delay: 0.16s; }
  .rf-how__item:nth-child(3) { animation-delay: 0.24s; }
  .rf-card .rf-card__meter::before {
    animation: rf-grow 1.1s var(--ease-out) backwards;
  }
  .rf-card:nth-child(1) .rf-card__meter::before { animation-delay: 0.25s; }
  .rf-card:nth-child(2) .rf-card__meter::before { animation-delay: 0.32s; }
  .rf-card:nth-child(3) .rf-card__meter::before { animation-delay: 0.39s; }
  .rf-card:nth-child(4) .rf-card__meter::before { animation-delay: 0.46s; }
  .rf-card:nth-child(5) .rf-card__meter::before { animation-delay: 0.53s; }
  .rf-card:nth-child(6) .rf-card__meter::before { animation-delay: 0.6s; }
  .rf-card:nth-child(7) .rf-card__meter::before { animation-delay: 0.67s; }
  .rf-card:nth-child(8) .rf-card__meter::before { animation-delay: 0.74s; }
  .rf-card:nth-child(9) .rf-card__meter::before { animation-delay: 0.81s; }
  /* Micro-destello de medallones: una sola vez al cargar (fallback). */
  .rf-card__medal::after { animation: rf-sheen 1.6s ease-in-out 0.9s backwards; }
  .rf-card:nth-child(2n) .rf-card__medal::after { animation-delay: 1.1s; }
  .rf-card:nth-child(3n) .rf-card__medal::after { animation-delay: 1.3s; }
  .rf-card:nth-child(5n) .rf-card__medal::after { animation-delay: 1.5s; }
}

/* Progreso al entrar: riel + barras + destello atados al scroll con
 * `animation-timeline: view()` — eficiente (solo transform/opacity, una
 * pasada). Sin soporte, vale el fallback de entrada al cargar de arriba.
 * Los `animation-delay` del fallback se anulan acá (misma especificidad,
 * posterior en cascada) para que el progreso mapee limpio al scroll. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rf-rail__fill {
      animation: rf-grow 1s var(--ease-out) both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }
    .rf-ladder .rf-card .rf-card__meter::before {
      animation: rf-grow 1s var(--ease-out) both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
      animation-delay: 0s;
    }
    .rf-ladder .rf-card .rf-card__medal::after {
      animation: rf-sheen 1.6s ease-in-out both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
      animation-delay: 0s;
    }
  }
}

/* Reduce Motion: todo estático, sin elevación ni transiciones. */
@media (prefers-reduced-motion: reduce) {
  .rf-aurora,
  .rf-aurora::before,
  .rf-aurora::after,
  .rf-aurora:hover,
  .rf-aurora:hover::after,
  .rf-aurora:focus-within,
  .rf-aurora:focus-within::after { transition: none; }
  .rf-card:hover,
  .rf-step:hover,
  .rf-how__item:hover { transform: none; }
  .rf-card__medal { transform: none; transition: none; }
  .rf-cine__nebula,
  .rf-token,
  .rf-card__pet,
  .rf-card__medal::after,
  .rf-rail__fill,
  .rf-cta.rf-aurora::before,
  .rf-lockup,
  .rf-pill,
  .rf-hero h1,
  .rf-hero__lead,
  .rf-hero__actions,
  .rf-facts,
  .rf-hero__tokens,
  .rf-section h2,
  .rf-kicker,
  .rf-section__sub,
  .rf-how__item,
  .rf-card,
  .rf-step,
  .rf-card .rf-card__meter::before {
    animation: none;
  }
  .rf-card__medal::after { opacity: 0; }
}
