/* Operativa — roadmap de adopción: quiz y página de gracias.
   Se apoya en home.css (tokens, botones, marca). */

.rm-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fbfbf8;
}

.rm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 3vw, 2.25rem);
}
.rm-back {
  font-size: 0.92rem;
  color: var(--text-3);
  text-decoration: none;
}
.rm-back:hover { color: var(--ink); }

.rm-main {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding: 0 clamp(1.25rem, 4vw, 2.75rem) 4rem;
}
.rm-main section { padding-block: 0; }

/* ---------- Entrada ---------- */

.rm-intro {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  min-height: calc(100vh - 9rem);
}
.rm-intro > * { min-width: 0; }
.rm-intro h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.04;
}
.rm-lede {
  margin-top: 1.2rem;
  font-size: 1.13rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 46ch;
}

/* La escalera de etapas sobre el paisaje de la marca */
.rm-ladder {
  position: relative;
  margin: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 4.6;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  background:
    url("hills.svg") bottom / 100% 42% no-repeat,
    linear-gradient(180deg, #7b90d6 0%, #a9bce7 34%, #dcdef1 52%, #f4cfd8 66%, #f2e3d8 76%);
  box-shadow: var(--shadow-card);
}
.rm-ladder ol {
  list-style: none;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  margin-top: 2.4rem;
}
.rm-ladder li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: max-content;
  padding: 0.5rem 1rem 0.5rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  font-size: 0.95rem;
  font-weight: 560;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 15, 18, 0.06);
}
.rm-ladder li span {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.rm-ladder li:nth-child(2) { margin-left: 6%; }
.rm-ladder li:nth-child(3) { margin-left: 12%; }
.rm-ladder li:nth-child(4) { margin-left: 18%; }
.rm-ladder li:nth-child(5) { margin-left: 24%; }
.rm-ladder li:nth-child(6) { margin-left: 30%; }
.rm-ladder li:nth-child(7) { margin-left: 36%; }
.rm-note {
  position: absolute;
  top: 1.3rem;
  right: 1.6rem;
  font-family: var(--font-hand);
  font-size: 1.55rem;
  color: #ffffff;
  transform: rotate(-4deg);
}

/* Variantes del test A/B: solo se ve la que eligió el script del <head> */
html[data-variant="a-promesa"] [data-v="b-pregunta"],
html[data-variant="b-pregunta"] [data-v="a-promesa"] { display: none; }

.rm-bullets {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin: 1.6rem 0 2rem;
  max-width: 48ch;
}
.rm-bullets li {
  position: relative;
  padding-left: 1.7rem;
  font-weight: 500;
  line-height: 1.45;
}
.rm-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%235551E0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}
.rm-meta {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-3);
}

/* Variante A: páginas reales del PDF, apiladas */
.rm-stack {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 4.6;
  border-radius: var(--radius-xl);
  background:
    url("hills.svg") bottom / 100% 36% no-repeat,
    linear-gradient(180deg, #7b90d6 0%, #a9bce7 34%, #dcdef1 52%, #f4cfd8 66%, #f2e3d8 76%);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.rm-stack img {
  position: absolute;
  width: 46%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(15, 15, 18, 0.12), 0 22px 44px rgba(15, 15, 18, 0.22);
}
.rm-stack-back { left: 8%; top: 17%; transform: rotate(-7deg); }
.rm-stack-mid { left: 46%; top: 15%; transform: rotate(6deg); }
.rm-stack-front { left: 27%; top: 11%; }
.rm-note--ink { color: #ffffff; }

/* ---------- Debajo del pliegue ---------- */

.rm-inside,
.rm-why,
.rm-close {
  max-width: 1100px;
  margin: clamp(4rem, 9vw, 7rem) auto 0;
}
.rm-why > *,
.rm-close > * { max-width: 760px; }
.rm-inside h2,
.rm-why h2,
.rm-close h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.rm-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2.2rem;
}
.rm-tiles figure,
.rm-poster { margin: 0; }
.rm-tiles img,
.rm-poster img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  background: #ffffff;
}
.rm-tiles figcaption,
.rm-poster figcaption {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-2);
}
.rm-poster { margin-top: 2rem; max-width: 720px; }

.rm-why h2 { margin-bottom: 1.4rem; }
.rm-why p {
  font-size: 1.13rem;
  line-height: 1.6;
  margin-top: 0.9rem;
  color: var(--text);
}
.rm-source {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-3);
}

.rm-close { padding-bottom: 2rem; }
.rm-close h2 { margin-bottom: 1.6rem; }
.rm-ps {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-2);
}

/* ---------- Preguntas ---------- */

.rm-quiz,
.rm-contact {
  max-width: 680px;
  margin-inline: auto;
  padding-top: clamp(1.5rem, 6vh, 4rem);
}
.rm-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.rm-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.rm-count {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.rm-question fieldset { border: 0; min-width: 0; }
.rm-question legend { padding: 0; }
.rm-q-title {
  margin-top: 1.6rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.rm-hint {
  margin-top: 0.6rem;
  color: var(--text-3);
}
.rm-options {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.6rem;
}
.rm-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.rm-option:hover { border-color: rgba(15, 15, 18, 0.45); }
.rm-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rm-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.rm-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.rm-key {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  font-size: 0.78rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.rm-option:has(input:checked) .rm-key {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}
.rm-label { font-weight: 500; line-height: 1.35; }

.rm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.6rem;
}
.rm-prev {
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text-3);
  cursor: pointer;
  padding: 0.4rem 0;
}
.rm-prev:hover { color: var(--ink); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ---------- Contacto ---------- */

.rm-contact h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.rm-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.8rem;
}
.rm-field { display: grid; gap: 0.4rem; }
.rm-field span { font-size: 0.9rem; font-weight: 560; }
.rm-field input,
.rm-field select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #ffffff;
  font: inherit;
  color: var(--ink);
}
.rm-field input:focus,
.rm-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.rm-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.rm-consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-2);
}
.rm-consent input {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
  flex: none;
}
.rm-error {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: #fbe9e7;
  color: #b42318;
  font-size: 0.92rem;
}

/* ---------- Gracias ---------- */

.rm-thanks {
  max-width: 640px;
  margin-inline: auto;
  padding-top: clamp(2rem, 10vh, 6rem);
  text-align: center;
}
.rm-thanks h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.rm-thanks .rm-lede { margin-inline: auto; }
.rm-next {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--border);
  text-align: left;
}
.rm-next h2 { font-size: 1.35rem; font-weight: 560; letter-spacing: -0.01em; }
.rm-next p { margin: 0.6rem 0 1.3rem; color: var(--text-2); }

@media (max-width: 860px) {
  .rm-intro { grid-template-columns: 1fr; min-height: 0; padding-top: 1.5rem; }
  .rm-ladder { aspect-ratio: auto; min-height: 420px; }
  .rm-stack { aspect-ratio: 4 / 3.6; }
  /* En el celular el botón va arriba del pliegue: primero la acción, después los bullets */
  .rm-intro-copy { display: flex; flex-direction: column; align-items: flex-start; }
  .rm-intro-copy .rm-lede { margin-bottom: 1.4rem; }
  .rm-intro-copy .btn { order: 1; }
  .rm-intro-copy .rm-meta { order: 2; }
  .rm-intro-copy .rm-bullets { order: 3; margin: 1.8rem 0 0; }
  .rm-tiles { grid-template-columns: repeat(2, 1fr); }
}
