/*
 * Landing Mentoría V3 (Revolución Imparable) — CSS COMPARTIDO.
 * DUEÑO UNICO: Lote 0. Los lotes A/B/C lo LEEN, no lo editan (piden cambios al Lote 0).
 * Contrato: mentoria-v3/CONTRATO-lote0.md. Spec: DISENO-mentoria-v3-spec.md §2, §5, §6.
 *
 * REGLAS DE ESTE FICHERO
 *  - Todo selector empieza por #ri-design (1,1,0 con una clase; gana al CSS por página de Elementor,
 *    0,5,0-0,6,0). Doblar la clase NO basta y @layer NO sirve (spec §16.14).
 *  - Los RESETS usan :where() => especificidad (1,0,0): ganan al tema padre (Hello Elementor) y al kit,
 *    y PIERDEN contra cualquier regla de componente (#ri-design .clase = 1,1,0). Así el reset nunca
 *    mata un hover/estado legítimo del diseño.
 *  - Únicas excepciones sin #ri-design: @keyframes y html:has(body.ri-v3-page) (scroll suave).
 *  - Cero !important.
 *  - Este fichero solo se encola en páginas con widgets "ri_*" (y en la vista previa del editor).
 */

/* ---------- Scroll suave y body (solo en páginas de la landing) ---------- */
html:has(body.ri-v3-page) { scroll-behavior: smooth; }

body.ri-v3-page {
  margin: 0;
  background: var(--ri-crema);
  color: var(--ri-ink);
  font-family: 'Outfit', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Animaciones (CSS puro; el diseño no tiene reveals) ---------- */
@keyframes ri-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ri-spin    { to   { transform: rotate(360deg); } }

/* =====================================================================
 * 1. RAIZ  #ri-design  (el Container raíz de la página lleva CSS ID "ri-design")
 * ===================================================================== */
body.ri-v3-page,
#ri-design {
  /* Tokens de color (spec §2.1) */
  --ri-ink: #3A1A22;            /* tinta marrón-vino */
  --ri-rosa: #DB1F6A;
  --ri-rosa-vivo: #F0357A;
  --ri-rosa-hover: #C21860;     /* hover botón */
  --ri-rosa-link-hover: #B3155A;/* a:hover */
  --ri-naranja: #F78A20;
  --ri-naranja-texto: #E56A00;
  --ri-crema: #FBF5EC;
  --ri-crema-blanca: #FFFBF6;
  --ri-rosa-palido: #F2B8C0;
  --ri-rosa-muy-palido: #F9E3DE;
  --ri-durazno: #FBD3AE;        /* resaltado, pilar 2, cursivas CTA final */
  --ri-durazno-claro: #FBBE8F;  /* cursivas sobre oscuro, hover crema */
  --ri-blanco: #FFFFFF;
  --ri-txt: #4B2B33;            /* párrafo */
  --ri-txt-suave: #5E3A43;
  --ri-txt-tarjeta: #7A5F67;
  --ri-txt-oscuro: #F6E6E0;     /* sobre fondos oscuros */
  --ri-borde-tarjeta: #F1DDD6;
  --ri-borde-linea: #E7CFC8;
  /* Medidas */
  --ri-maxw: 1160px;
  --ri-gutter: clamp(20px, 5vw, 64px);
  --ri-pad-v: clamp(72px, 9vw, 120px);
  /* Tipografías */
  --ri-font-serif: 'Playfair Display', serif;
  --ri-font-sans: 'Outfit', sans-serif;
  --ri-font-display: 'Caprasimo', serif;
}

#ri-design {
  /* Aislamiento del contenedor raíz de Elementor (spec §6.1) */
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
  gap: 0;
  row-gap: 0;
  column-gap: 0;

  /* Lo que declara el <div> raíz del diseño */
  background: var(--ri-crema);
  color: var(--ri-ink);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;      /* el diseño no fija line-height global; Hello Elementor pone 1.5 */
  letter-spacing: normal;
  text-align: left;
  overflow-x: clip;         /* NUNCA hidden: rompe position:sticky (header, pilares, formato) */
}

/* Cadena de envoltorios de Elementor neutralizada EN EL BORDE, una vez (spec §6.1, §16.14) */
#ri-design .e-con,
#ri-design .e-con-inner,
#ri-design .elementor-widget-container,
#ri-design > .e-con-inner {
  max-width: none;
  width: 100%;
  display: block;
}
#ri-design .e-con,
#ri-design .e-con-inner {
  margin: 0;
  padding: 0;
}
/* El gap por defecto (20px) abriría una banda del color de la página entre bloques apilados a hueso
   (spec §16.13). SOLO el contenedor raíz. */
#ri-design > .e-con-inner,
#ri-design .e-con.e-parent > .e-con-inner {
  gap: 0;
  row-gap: 0;
  column-gap: 0;
}
/* Cada widget a ancho completo y sin el espaciado entre widgets del kit */
#ri-design .elementor-widget,
#ri-design .elementor-widget:not(:last-child) {
  margin: 0;
  max-width: none;
  width: 100%;
}
/* La cabecera sticky necesita que su bloque contenedor sea el Container raíz (que mide toda la página):
   el widget y su wrapper se "disuelven". Funciona con y sin .elementor-widget-container (markup optimizado). */
#ri-design .elementor-widget[data-widget_type="ri_header.default"],
#ri-design .elementor-widget[data-widget_type="ri_header.default"] > .elementor-widget-container {
  display: contents;
}

/* =====================================================================
 * 2. RESETS del tema padre y del kit (especificidad 1,0,0 con :where)
 * ===================================================================== */
/* El diseño usa el box-sizing por defecto del navegador (content-box): Hello Elementor y Elementor
   ponen border-box en todo, lo que cambiaría el ancho de cualquier caja con width + padding. */
#ri-design :where(*, *::before, *::after) { box-sizing: content-box; }

#ri-design :where(h1, h2, h3, h4, h5, h6) {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  letter-spacing: normal;
  text-transform: none;
}
#ri-design :where(p, ul, ol, li, figure, blockquote, dl, dd) { margin: 0; padding: 0; }
#ri-design :where(ul, ol) { list-style: none; }
#ri-design :where(strong, b) { font-weight: 600; }
#ri-design :where(em, i) { font-style: italic; }
#ri-design :where(img) { display: block; }

/* Enlaces: a{color:var(--ri-rosa)} a:hover{color:var(--ri-rosa-link-hover)} (el hover SOLO gana si el componente no fija color) */
#ri-design :where(a) { color: var(--ri-rosa); background-color: transparent; text-decoration: underline; }
#ri-design :where(a:hover, a:active) { color: var(--ri-rosa-link-hover); }

/* Botones (Hello Elementor: border 1px #c36, color #c36, hover/focus background #c36, transition .3s) */
#ri-design :where(button, [type="button"], [type="submit"]) {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  display: inline-block;
  white-space: normal;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: none;
  box-shadow: none;
  transition: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
#ri-design :where(button:hover, button:focus, [type="button"]:hover, [type="button"]:focus, [type="submit"]:hover, [type="submit"]:focus) {
  color: inherit;
  background: none;
  text-decoration: none;
}

/* El atributo hidden debe ganar a cualquier display de componente (FAQ) */
#ri-design [hidden] { display: none; }

/* =====================================================================
 * 3. UTILIDADES
 * ===================================================================== */
/* Sección a ancho completo (el fondo llega a los bordes). Padding en border-box: equivale al width:auto del diseño. */
#ri-design .ri-section {
  box-sizing: border-box;
  width: 100%;
  padding-inline: var(--ri-gutter);
  padding-block: var(--ri-pad-v);
}
/* Contenido interior: AQUÍ y solo aquí va el max-width (spec §16.7). No añadir padding a .ri-inner. */
#ri-design .ri-inner {
  width: 100%;
  max-width: var(--ri-maxw);
  margin-inline: auto;
}
/* Secciones con ancla (header 68px) */
#ri-design .ri-anchor { scroll-margin-top: 68px; }

/* Rejilla auto-fit: <div class="ri-grid-autofit" style="--ri-min:320px;--ri-gap:16px"> */
#ri-design .ri-grid-autofit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--ri-min, 320px)), 1fr));
  gap: var(--ri-gap, 16px);
}

/* Texto */
#ri-design .ri-balance { text-wrap: balance; }
#ri-design .ri-pretty  { text-wrap: pretty; }
#ri-design .ri-nowrap  { white-space: nowrap; }

/* Kicker (rótulo pequeño en mayúsculas) */
#ri-design .ri-kicker {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ri-rosa);
  margin-bottom: 18px;
}

/* Resaltado de marcador (negrita 600 + subrayado durazno al 38 % inferior) */
#ri-design .ri-hl {
  font-weight: 600;
  color: var(--ri-ink);
  background: linear-gradient(transparent 62%, var(--ri-durazno) 62%);
}

/* Cursivas coloreadas de los titulares: <em class="ri-em ri-em--naranja"> */
#ri-design .ri-em { font-style: italic; }
#ri-design .ri-em--naranja        { color: var(--ri-naranja-texto); }
#ri-design .ri-em--rosa           { color: var(--ri-rosa); }
#ri-design .ri-em--durazno        { color: var(--ri-durazno); }   /* CTA final, pilar 1 cierre */
#ri-design .ri-em--durazno-claro  { color: var(--ri-durazno-claro); }   /* sobre fondos oscuros */

/* ---------- Botón CTA (spec §2.5). SIN transición: el cambio es instantáneo ---------- */
#ri-design .ri-btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  line-height: normal;
  cursor: pointer;
  transition: none;
}
#ri-design .ri-btn--rosa,
#ri-design .ri-btn--crema,
#ri-design .ri-btn--crema-lg,
#ri-design .ri-btn--franja {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  gap: 12px;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: clamp(13.5px, 3.6vw, 15px);
  letter-spacing: .07em;
  padding: clamp(17px, 4.4vw, 20px) clamp(22px, 5.6vw, 34px);
}
#ri-design .ri-btn--rosa {
  background: var(--ri-rosa);
  color: var(--ri-blanco);
  box-shadow: 0 14px 30px -12px rgba(219, 31, 106, .6);
}
#ri-design .ri-btn--rosa:hover { transform: translateY(-2px); background: var(--ri-rosa-hover); color: var(--ri-blanco); }

#ri-design .ri-btn--crema {
  background: var(--ri-crema);
  color: var(--ri-ink);
}
#ri-design .ri-btn--crema:hover { transform: translateY(-2px); background: var(--ri-durazno-claro); color: var(--ri-ink); }

#ri-design .ri-btn--crema-lg {
  background: var(--ri-crema);
  color: var(--ri-ink);
  font-weight: 700;
  font-size: clamp(14px, 3.8vw, 17px);
  padding: clamp(19px, 4.8vw, 24px) clamp(24px, 6vw, 46px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5);
}
#ri-design .ri-btn--crema-lg:hover { transform: translateY(-2px); background: var(--ri-durazno-claro); color: var(--ri-ink); }

/* Franja oscura de «resultados»: rosa, sin sombra, hover naranja con texto tinta */
#ri-design .ri-btn--franja {
  position: relative;
  background: var(--ri-rosa);
  color: var(--ri-blanco);
}
#ri-design .ri-btn--franja:hover { transform: translateY(-2px); background: var(--ri-naranja); color: var(--ri-ink); }

/* Cabecera: pastilla compacta, hover naranja SIN desplazamiento */
#ri-design .ri-btn--header {
  display: inline-block;
  flex: none;
  box-sizing: content-box;
  max-width: none;
  background: var(--ri-rosa);
  color: var(--ri-blanco);
  font-size: 13px;
  letter-spacing: .09em;
  padding: 12px 20px;
}
#ri-design .ri-btn--header:hover { background: var(--ri-naranja); color: var(--ri-ink); }

/* ---------- Polaroid + cinta (cerca y comunidad) ---------- */
#ri-design .ri-polaroid { position: relative; background: var(--ri-blanco); }
#ri-design .ri-polaroid--lg {                 /* cerca */
  padding: 14px 14px 56px;
  box-shadow: 0 40px 70px -30px rgba(58, 26, 34, .6);
}
#ri-design .ri-polaroid--sm {                 /* comunidad */
  padding: 10px 10px 38px;
  box-shadow: 0 22px 40px -18px rgba(58, 26, 34, .5);
}
#ri-design .ri-tape {
  position: absolute;
  left: 50%;
  transform: rotate(-3deg);
}
#ri-design .ri-tape--lg { top: -16px; width: 110px; height: 30px; margin-left: -55px; background: rgba(247, 138, 32, .7); }
#ri-design .ri-tape--sm { top: -12px; width: 70px;  height: 24px; margin-left: -35px; background: rgba(247, 138, 32, .55); }

/* ---------- Marquesinas y sello (animación CSS pura) ----------
 * <div class="ri-marquee"><div class="ri-marquee__track" style="--ri-marquee-dur:38s">
 *   <div class="ri-marquee__group">…</div><div class="ri-marquee__group" aria-hidden="true">…(idéntico)</div></div></div>
 * El -50 % mueve exactamente un grupo => bucle sin salto. El grupo debe ser MÁS ancho que el viewport. */
#ri-design .ri-marquee { overflow: hidden; }
#ri-design .ri-marquee__track {
  display: flex;
  width: max-content;
  animation: ri-marquee var(--ri-marquee-dur, 40s) linear infinite;
}
#ri-design .ri-marquee__group { display: flex; flex: none; align-items: center; }
#ri-design .ri-spin {
  transform-origin: 50% 50%;
  animation: ri-spin var(--ri-spin-dur, 20s) linear infinite;
}
/* Mejora de accesibilidad invisible para el resto: pausa la animación si el sistema lo pide.
   (El diseño no lo contempla; spec §5.1 / §9.11.) */
@media (prefers-reduced-motion: reduce) {
  #ri-design .ri-marquee__track,
  #ri-design .ri-spin { animation-play-state: paused; }
}

/* ---------- Vídeo clic-para-reproducir (lo usa ri-landing.js al crear el iframe) ----------
 * Caja: <div class="ri-video__stage" data-ri-video data-ri-yt="ID" …>  (ver contrato) */
#ri-design .ri-video__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
}
#ri-design .ri-video__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
/* Vídeos verticales en reproductor horizontal (Ana, Gabriela): iframe al 316 % centrado */
#ri-design .ri-video__iframe--crop {
  inset: auto;
  top: 0;
  right: auto;
  bottom: auto;
  left: 50%;
  width: 316%;
  max-width: none;
  height: 100%;
  transform: translateX(-50%);
}
