/* ============================================================================
 * reto.css — landing /reto/ (fase119c, rediseño «lemme live», Jean 2026-09-07).
 * Referencia: degradado pastel de página, texto serif grande centrado, UN botón pastilla, fotos que se funden con el
 * fondo. Sin tarjetas rectangulares: las secciones son texto sobre el degradado separadas por aire y hairlines.
 * Carga después de home.css (tokens --violet-*, --reto-*, --reto-font, --paso-rosa) y guia.css (cabecera y pie).
 * Animación: entrada del hero (`.rh-in`, fill backwards) y revelado por scroll (`.rv` → `.is-in`, IO en js/reto.js);
 * sin JS o con reduced-motion todo se ve directo. Solo transform/opacity.
 * ==========================================================================*/
:root {
  /* degradado de página: rosa pálido → lavanda → celeste (mismos tonos que las fotos de Higgsfield para que se fundan) */
  --reto-g1: color-mix(in srgb, var(--paso-rosa) 42%, #fff);
  --reto-g2: color-mix(in srgb, var(--violet-200) 55%, #fff);
  --reto-g3: color-mix(in srgb, #bcd3f1 60%, #fff);
  --reto-line: color-mix(in srgb, var(--violet-900) 14%, transparent);
  --reto-ink-soft: var(--ink-2);
}
.reto-body { overflow-x: clip; background: linear-gradient(180deg, var(--reto-g1) 0%, var(--reto-g2) 46%, var(--reto-g3) 100%); }
.reto-body .guide-head { background: color-mix(in srgb, #fff 55%, transparent); border-bottom-color: color-mix(in srgb, #fff 45%, transparent); }
.reto-main { padding: clamp(28px, 4vw, 56px) 0 clamp(56px, 7vw, 100px); }
.reto-wrap { width: min(880px, calc(100% - 36px)); margin: 0 auto; text-align: center; }
.reto-h2 { margin: 0; font: 600 clamp(28px, 3.6vw, 46px)/1.12 var(--reto-font); color: var(--ink); letter-spacing: -.01em; text-wrap: balance; }
.reto-lead { margin: 12px auto 0; max-width: 56ch; font: 400 clamp(16px, 1.3vw, 20px)/1.55 var(--reto-font); color: var(--reto-ink-soft); text-wrap: balance; }
.reto-note { margin: 10px auto 0; max-width: 60ch; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ---------- botón pastilla (uno solo, como el «Learn More») ---------- */
.reto-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 13px 38px; border: 0; border-radius: var(--ctl-r);
  background: var(--violet-600); color: var(--reto-btn-ink); font: 600 18px/1 var(--reto-font); text-decoration: none; cursor: pointer;
  box-shadow: none; transition: transform var(--t-press) var(--ease-out), background-color var(--t-fb) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .reto-btn:hover { background: var(--violet-700); } }
.reto-btn:active { transform: scale(.97); }
.reto-btn[aria-busy="true"] { pointer-events: none; opacity: .75; }
.reto-btn--ghost { background: color-mix(in srgb, #fff 70%, transparent); color: var(--violet-700); box-shadow: none; }
.reto-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px; color: var(--violet-700); font: 600 17px/1 var(--reto-font); text-decoration: none; }
.reto-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.reto-btn:focus-visible, .reto-link:focus-visible, .reto-prod:focus-within { outline: 3px solid var(--violet-600); outline-offset: 3px; }

/* ---------- hero ---------- */
/* ⚠️ La cabecera canónica (`.guide-nav`, guia.css) es `position: fixed`, así que el hero necesita
   dejarle su hueco o el kicker queda debajo del cristal. Hasta el 2026-09-09 esta página llevaba la
   cabecera VIEJA (`.guide-head`), que era estática y ocupaba su sitio en el flujo — pero al
   centralizar las tres barras el 2026-09-07 sus reglas se retiraron de guia.css y aquí nadie lo
   notó: el <header> se quedó SIN layout ninguno y en el iPhone de Jean salía el logo desbordado,
   los enlaces pegados («InicioTiendaBlogSobre míMi pedido») y el botón del carrito encima del
   texto. /reto/ era la única de las 32 páginas que seguía con la vieja. */
.reto-hero { text-align: center; padding-top: clamp(78px, 9vw, 104px); }
.reto-hero-txt { position: relative; z-index: 1; }
.reto-kicker { margin: 0; font: 700 12px/1 "Nunito Sans", system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--violet-700); }
.reto-hero h1 { margin: 14px auto 0; max-width: 22ch; font: 500 clamp(30px, 4.6vw, 58px)/1.1 var(--reto-font); color: var(--ink); letter-spacing: -.015em; text-wrap: balance; }
.reto-sub { margin: 16px auto 0; max-width: 40ch; font: 400 clamp(17px, 1.5vw, 23px)/1.4 var(--reto-font); color: var(--reto-ink-soft); }
.reto-sub b { color: var(--violet-700); font-weight: 600; }
.reto-cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 22px; margin-top: 24px; }
.reto-estado { margin: 16px auto 0; font: 600 14px/1.5 "Nunito Sans", system-ui, sans-serif; color: var(--violet-700); }
.reto-estado.is-off { color: var(--muted); }
.reto-hero-art { position: relative; width: min(980px, 100%); margin: clamp(-6px, -1vw, -18px) auto 0; }
/* La foto trae el mismo degradado que la página y se funde por una elipse. ⚠️ Los radios DEBEN ser
   ≤50%: el degradado acaba en `transparent` al 100% de SU radio, así que con radios de 62%/64% el
   borde del box se alcanzaba cuando la máscara aún era medio opaca y la foto quedaba como un
   RECTÁNGULO duro pegado sobre el fondo (bug real 2026-09-07: «las imágenes se ven cuadradas»).
   Una sola definición para las tres fotos = misma caída en toda la página. */
.reto-hero-img, .reto-como-art img, .reto-final-img {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 46%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 46%, rgba(0, 0, 0, 0) 100%); }
.reto-hero-img { display: block; width: 100%; height: auto; }
.reto-hero-gato { position: absolute; left: clamp(4px, 6%, 70px); bottom: 10%; width: clamp(96px, 16%, 170px); height: auto; filter: drop-shadow(0 12px 18px rgba(58, 47, 102, .22)); animation: reto-float 5.2s ease-in-out infinite; }
@keyframes reto-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
.rh-in { animation: reto-in .7s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: var(--d, 0ms); }   /* fill backwards: el estado final es el natural */
@keyframes reto-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- tramos: tres cifras separadas por hairlines ---------- */
.reto-tramos { margin-top: clamp(28px, 4vw, 56px); }
.reto-tramo-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(18px, 2.4vw, 30px); }
.reto-tramo { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px clamp(10px, 2vw, 26px); border-left: 1px solid var(--reto-line); }
.reto-tramo:first-child { border-left: 0; }
.reto-tramo b { font: 500 clamp(44px, 6.4vw, 80px)/1 var(--reto-font); color: var(--violet-700); letter-spacing: -.03em; }
.reto-tramo-t { font: 600 clamp(15px, 1.2vw, 18px)/1.3 var(--reto-font); color: var(--ink); text-wrap: balance; }
.reto-tramo small { font-size: 14px; line-height: 1.5; color: var(--reto-ink-soft); text-wrap: balance; }

/* ---------- cómo funciona: foto fundida + cuatro líneas ---------- */
.reto-como { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(14px, 3vw, 40px); margin-top: clamp(40px, 6vw, 80px); width: min(1040px, calc(100% - 36px)); text-align: left; }
.reto-como-art img { display: block; width: 100%; height: auto; }
.reto-como-txt .reto-h2 { text-align: left; }
.reto-pasos { list-style: none; counter-reset: paso; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.reto-pasos li { counter-increment: paso; position: relative; padding-left: 46px; font: 400 clamp(16px, 1.25vw, 19px)/1.5 var(--reto-font); color: var(--reto-ink-soft); }
.reto-pasos li b { color: var(--ink); font-weight: 600; }
.reto-pasos li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, #fff 70%, transparent); color: var(--violet-700); font: 600 15px/1 var(--reto-font); }

/* ---------- registro ---------- */
.reto-registro { margin-top: clamp(40px, 6vw, 80px); }
.reto-form { width: min(560px, 100%); margin: 22px auto 0; text-align: left; }
.reto-f { display: grid; gap: 12px; }
.reto-lbl { display: block; margin-top: 4px; font: 600 14px/1.3 "Nunito Sans", system-ui, sans-serif; color: var(--ink); }
.reto-in { width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid color-mix(in srgb, var(--violet-300) 70%, #fff); border-radius: 16px;
  background: color-mix(in srgb, #fff 82%, transparent); color: var(--ink); font: 500 17px/1.3 "Nunito Sans", system-ui, sans-serif; transition: border-color var(--t-fb) var(--ease-out), box-shadow var(--t-fb) var(--ease-out); }
.reto-in:focus { outline: 0; border-color: var(--violet-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet-600) 18%, transparent); }
.reto-in.is-bad { border-color: var(--danger, #c0392b); }
.reto-code { text-transform: uppercase; letter-spacing: .22em; font: 700 22px/1.2 ui-monospace, Menlo, monospace; text-align: center; }
.reto-hint { margin: -4px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.reto-hint.is-ok { color: var(--violet-700); font-weight: 700; }
.reto-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 6px; }
.reto-actions .reto-btn { flex: 1 1 220px; }
.reto-ped { margin: 0; font: 600 16px/1.4 var(--reto-font); color: var(--ink); }
.reto-prods { display: grid; gap: 8px; }
.reto-prod { display: grid; grid-template-columns: auto 64px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px 10px 12px; border-radius: 16px; border: 1.5px solid transparent; background: color-mix(in srgb, #fff 62%, transparent); cursor: pointer; transition: border-color var(--t-fb) var(--ease-out), background var(--t-fb) var(--ease-out); }
.reto-prod:has(input:checked) { border-color: var(--violet-600); background: color-mix(in srgb, #fff 88%, transparent); }
.reto-prod.is-off { opacity: .55; cursor: not-allowed; }
.reto-prod input { accent-color: var(--violet-600); width: 18px; height: 18px; }
.reto-prod img, .reto-prod .noimg { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; background: var(--violet-100); }
.reto-prod .t { display: grid; gap: 2px; font-size: 14px; line-height: 1.35; color: var(--reto-ink-soft); }
.reto-prod .t b { color: var(--ink); font-size: 15px; }
.reto-chk { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--reto-ink-soft); }
.reto-chk input { flex: none; margin-top: 3px; width: 18px; height: 18px; accent-color: var(--violet-600); }
.reto-cap { min-height: 66px; }
.reto-cap:empty { display: none; }
.reto-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.reto-msg { margin: 0; padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, #fff 80%, transparent); font-size: 14px; line-height: 1.5; color: var(--ink); }
.reto-msg.is-bad { background: color-mix(in srgb, var(--danger, #c0392b) 12%, #fff); }
.reto-msg[hidden] { display: none !important; }
/* listo */
.reto-listo { text-align: center; }
.reto-listo-code { margin: 8px 0 4px; font: 700 clamp(34px, 5vw, 46px)/1.2 ui-monospace, Menlo, monospace; letter-spacing: .12em; color: var(--violet-700); }
.reto-listo p { margin: 8px auto 0; max-width: 46ch; font: 400 16px/1.55 var(--reto-font); color: var(--reto-ink-soft); }
.reto-listo p b { color: var(--ink); font-weight: 600; }
.reto-listo .reto-actions { justify-content: center; margin-top: 16px; }

/* ---------- ranking / bases / faq ---------- */
.reto-ranking, .reto-bases, .reto-faq { margin-top: clamp(40px, 6vw, 80px); }
.reto-rk-wrap { overflow-x: auto; margin-top: 16px; }
.reto-rk { width: 100%; border-collapse: collapse; font-size: 15px; text-align: left; }
.reto-rk th, .reto-rk td { padding: 11px 8px; border-bottom: 1px solid var(--reto-line); }
.reto-rk th { font: 800 12px/1 "Nunito Sans", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.reto-rk td b { color: var(--ink); }
.reto-rk a { color: var(--violet-700); font-weight: 700; }
.reto-rk-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, #fff 70%, transparent); color: var(--violet-700); font: 800 12px/1 "Nunito Sans", sans-serif; }
.reto-rk-tag.p3 { background: var(--violet-600); color: #fff; }
.reto-bases ul { margin: 18px 0 0; padding: 0; list-style: none; text-align: left; display: grid; }
.reto-bases li { padding: 12px 0; border-top: 1px solid var(--reto-line); font-size: 15px; line-height: 1.6; color: var(--reto-ink-soft); }
.reto-bases li:last-child { border-bottom: 1px solid var(--reto-line); }
.reto-bases li b { color: var(--ink); }
.reto-bases a { color: var(--violet-700); font-weight: 700; }
.reto-q { padding: 14px 0; border-top: 1px solid var(--reto-line); text-align: left; }
.reto-q:last-child { border-bottom: 1px solid var(--reto-line); }
.reto-faq .reto-h2 { margin-bottom: 14px; }
.reto-q h3 { margin: 0; font: 600 clamp(17px, 1.4vw, 20px)/1.3 var(--reto-font); color: var(--ink); }
.reto-q p { margin: 6px 0 0; font-size: 15px; line-height: 1.6; color: var(--reto-ink-soft); }
.reto-final { margin-top: clamp(40px, 6vw, 72px); display: grid; justify-items: center; gap: 14px; }
.reto-final-img { display: block; width: min(520px, 100%); height: auto; }

/* ---------- revelado por scroll ---------- */
html.rv-ready .rv { opacity: 0; transform: translateY(16px); transition: opacity .6s ease-out, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
html.rv-ready .rv.is-in { opacity: 1; transform: none; }

/* ---------- responsive (tiers del repo: ≤720 · 721–900 · ≥901) ---------- */
@media (max-width: 900px) {
  .reto-como { grid-template-columns: 1fr; text-align: center; }
  .reto-como-txt .reto-h2 { text-align: center; }
  .reto-como-art { max-width: 520px; margin: 0 auto; }
  .reto-pasos { text-align: left; }
}
@media (max-width: 720px) {
  .reto-hero h1 { font-size: clamp(28px, 8vw, 34px); }
  .reto-tramo-row { grid-template-columns: 1fr; }
  .reto-tramo { border-left: 0; border-top: 1px solid var(--reto-line); padding: 16px 8px; }
  .reto-tramo:first-child { border-top: 0; }
  .reto-hero-gato { left: 0; bottom: 4%; width: 24%; }
  .reto-cta { flex-direction: column; }
  .reto-cta .reto-btn { width: min(100%, 320px); }
}
@media (prefers-reduced-motion: reduce) {
  .rh-in, .reto-hero-gato { animation: none; }
  .reto-btn:hover { transform: none; }
  html.rv-ready .rv { opacity: 1; transform: none; transition: none; }
}
