/* DIVICON BWA · Landing de diagnóstico (v2: flujo continuo) */

@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url("../fonts/plex/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url("../fonts/plex/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url("../fonts/plex/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/plex/ibm-plex-sans-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/plex/ibm-plex-sans-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --fondo: #f3f2f6;
  --papel: #ffffff;
  --tinta: #1b0a40;
  --texto: #3b3452;
  --gris: #6e6883;
  --suave: #e7e4ee;
  --violeta: #5016a6;
  --naranja: #fa9902;
  --naranja-claro: #fff1da;

  --display: "Plex Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --cuerpo: "Plex", system-ui, -apple-system, "Segoe UI", sans-serif;

  --margen: clamp(1.25rem, 5vw, 4.5rem);
  --ancho: 1240px;
  --arriba: 76px; /* alto del encabezado fijo */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--arriba) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--cuerpo);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  line-height: 1.55;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--tinta); }
p, ul, ol { margin: 0; }
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }

.envoltura { max-width: calc(var(--ancho) + 2 * var(--margen)); margin: 0 auto; padding: 0 var(--margen); }
.centrado { display: flex; flex-direction: column; align-items: center; text-align: center; }

.grande {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.3rem + 4.6vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
  max-width: 17ch;
}
.salto { display: block; }
.problema .grande { max-width: 22ch; }
.intro { max-width: 60ch; margin-top: 1.4rem; font-size: 1.12em; color: var(--gris); }
h3 { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 1.1rem + 0.9vw, 1.9rem); line-height: 1.08; letter-spacing: -0.005em; }

/* ---------- Encabezado fijo ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--arriba);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 max(var(--margen), calc((100vw - var(--ancho)) / 2));
  background: rgba(243, 242, 246, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.marca { font-family: var(--display); font-weight: 700; font-size: 1.55rem; letter-spacing: 0.03em; color: var(--violeta); text-decoration: none; }
.top-cta {
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  background: var(--naranja); color: var(--tinta); border-radius: 999px; padding: 0.6rem 1.25rem;
  transition: transform 0.15s;
}
.top-cta:hover { transform: translateY(-1px); }

/* ---------- Inicio ---------- */
.hero {
  padding: calc(var(--arriba) + clamp(2.5rem, 6vw, 4.5rem)) 0 0;
  background-image: radial-gradient(rgba(27, 10, 64, 0.08) 1px, transparent 1.3px);
  background-size: 16px 16px;
}
.pastilla {
  font-size: 0.92rem; font-weight: 500; color: var(--tinta);
  background: var(--papel); border: 1px solid var(--suave); border-radius: 999px; padding: 0.4rem 1rem;
  margin-bottom: 1.6rem;
}
.hero-titulo {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(3rem, 0.8rem + 7.6vw, 8.4rem);
  line-height: 0.88; letter-spacing: -0.03em;
}
.linea { display: block; overflow: hidden; padding: 0.1em 0.05em 0.16em; margin: -0.1em 0 -0.16em; }
/* Entrada del título con CSS puro: se ve aunque el JavaScript tarde o falle */
.linea > span { display: block; animation: subir 0.9s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
.linea:nth-child(2) > span { animation-delay: 0.1s; }
.linea:nth-child(3) > span { animation-delay: 0.2s; }
@keyframes subir { from { transform: translateY(105%); } to { transform: none; } }
.lead { max-width: 58ch; margin-top: 1.8rem; font-size: clamp(1.08rem, 1rem + 0.4vw, 1.3rem); line-height: 1.5; }
.lead strong { color: var(--tinta); font-weight: 600; }
.rating { margin-top: 1.1rem; font-size: 0.95rem; color: var(--gris); }
.estrellas { color: var(--naranja); letter-spacing: 0.1em; margin-right: 0.3rem; }

/* Árbol de búsquedas */
.arbol {
  position: relative;
  width: min(1080px, calc(100% - 2 * var(--margen)));
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  aspect-ratio: 1000 / 420;
}
.arbol-lineas { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ruta {
  fill: none; stroke: var(--naranja); stroke-width: 2; vector-effect: non-scaling-stroke;
  stroke-dasharray: 7 7; opacity: 0.8;
  animation: mostrar 0.6s ease 0.5s both, fluir 1.4s linear infinite;
}
@keyframes fluir { to { stroke-dashoffset: -28; } }
@keyframes mostrar { from { opacity: 0; } }
.busqueda {
  position: absolute; transform: translate(-50%, -112%);
  display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap;
  background: var(--papel); color: var(--tinta); font-size: 0.9rem; font-weight: 500;
  border-radius: 999px; padding: 0.45rem 0.9rem 0.45rem 0.7rem;
  box-shadow: 0 10px 24px -14px rgba(27, 10, 64, 0.45), 0 0 0 1px var(--suave);
  animation: chip 0.5s ease calc(0.35s + var(--i) * 0.08s) both;
}
@keyframes chip { from { opacity: 0; transform: translate(-50%, -100%); } }
.busqueda svg { width: 15px; height: 15px; fill: none; stroke: var(--gris); stroke-width: 2.2; stroke-linecap: round; }
.tache {
  position: absolute; width: 22px; height: 22px; transform: translate(-50%, -50%);
  background: var(--papel); border: 2px solid var(--naranja); border-radius: 50%;
  animation: marca 0.4s ease calc(0.8s + var(--i) * 0.08s) both;
}
@keyframes marca { from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } }
.tache::before, .tache::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; background: var(--naranja); border-radius: 2px; }
.tache::before { transform: translate(-50%, -50%) rotate(45deg); }
.tache::after { transform: translate(-50%, -50%) rotate(-45deg); }
.tache-nota { position: absolute; transform: translate(18px, -50%); font-size: 0.85rem; color: var(--gris); white-space: nowrap; }
.nodo-web {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, -50%); z-index: 1; white-space: nowrap;
  background: var(--papel); color: var(--gris); font-weight: 600; font-size: 0.95rem;
  border: 2px dashed #c9c4d6; border-radius: 999px; padding: 0.5rem 1.1rem;
}

/* Formularios (el de arriba cuelga del árbol con la misma línea) */
.hero-form { display: flex; flex-direction: column; align-items: center; }
.hero .hero-form { padding-top: 3.5rem; padding-bottom: clamp(4rem, 8vw, 6rem); background: linear-gradient(var(--naranja), var(--naranja)) center top / 2px 3.5rem no-repeat; }
.form {
  position: relative; z-index: 1;
  width: min(720px, 100%);
  background: var(--papel); color: var(--tinta);
  border-radius: 26px; padding: clamp(1.4rem, 3vw, 2.2rem);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 0.9rem;
  box-shadow: 0 30px 70px -35px rgba(27, 10, 64, 0.45), 0 0 0 1px var(--suave);
}
.campo { display: flex; flex-direction: column; gap: 0.35rem; text-align: left; }
.campo.ancho, .form .boton, .form-nota { grid-column: 1 / -1; }
.campo label { font-size: 0.88rem; font-weight: 600; }
.campo input, .campo select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--tinta);
  background: var(--fondo); border: 2px solid transparent; border-radius: 12px; padding: 0.75rem 0.85rem;
  transition: border-color 0.15s, background-color 0.15s;
}
.campo input::placeholder { color: #a39eb4; }
.campo input:focus, .campo select:focus { outline: none; border-color: var(--violeta); background: #fff; }
.campo select {
  appearance: none; padding-right: 2.4rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--tinta) 50%), linear-gradient(135deg, var(--tinta) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat;
}
.boton {
  font: inherit; font-family: var(--display); font-weight: 700; font-size: 1.3rem;
  background: var(--naranja); color: var(--tinta); border: 0; border-radius: 999px;
  padding: 1rem 1.5rem; margin-top: 0.4rem; cursor: pointer; transition: transform 0.15s, background-color 0.15s;
}
.boton:hover { background: #ffab24; }
.boton:active { transform: scale(0.98); }
.boton:disabled { opacity: 0.7; cursor: progress; }
.form-nota { font-size: 0.85rem; color: var(--gris); line-height: 1.45; text-align: center; }
.directo { margin-top: 1.1rem; font-size: 0.95rem; color: var(--gris); text-align: center; }
.directo a { color: var(--tinta); font-weight: 600; text-decoration: underline; text-decoration-color: var(--naranja); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.directo a:hover { color: var(--violeta); }

/* ---------- La línea que recorre la página ---------- */
.flujo { position: relative; }
.flujo-linea { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: rgba(250, 153, 2, 0.22); z-index: 0; }
.flujo-avance { position: absolute; left: 0; top: 0; width: 100%; height: var(--avance, 0%); background: var(--naranja); }
.flujo-avance::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--naranja); box-shadow: 0 0 0 5px rgba(250, 153, 2, 0.2); }
.bloque { position: relative; z-index: 1; padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
/* Los títulos tapan la línea para que se lean limpios */
.flujo .centrado > * { background: var(--fondo); padding: 0.3rem 0.8rem; }
.flujo .centrado > .intro { margin-top: 0.8rem; }

/* Fotos: recuadro de reserva mientras no se suben */
.foto {
  position: relative; margin: 0; overflow: hidden; border-radius: 20px;
  background: repeating-linear-gradient(-45deg, rgba(27, 10, 64, 0.05) 0 12px, transparent 12px 24px), var(--suave);
}
.foto img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; will-change: transform; }
.foto-vacia { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; padding: 1rem; text-align: center; font-size: 0.82rem; color: var(--gris); }
.foto img + .foto-vacia { display: none; }
.foto-vacia b { overflow-wrap: anywhere; }

/* ---------- 2. Señales, colgando de la línea ---------- */
.senales { list-style: none; display: flex; flex-direction: column; gap: clamp(2.5rem, 5vw, 4rem); margin-top: clamp(3rem, 6vw, 4.5rem); }
.senal { display: grid; grid-template-columns: 1fr 76px 1fr; align-items: center; }
.senal-nodo {
  grid-column: 2; justify-self: center; width: 60px; height: 60px; border-radius: 18px;
  background: var(--papel); box-shadow: 0 0 0 1px var(--suave), 0 12px 24px -16px rgba(27, 10, 64, 0.5);
  display: grid; place-items: center;
}
.senal-nodo svg { width: 28px; height: 28px; fill: none; stroke: var(--violeta); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.senal-texto { grid-row: 1; position: relative; max-width: 30rem; display: flex; flex-direction: column; gap: 0.5rem; }
.senal:nth-child(odd) .senal-texto { grid-column: 1; justify-self: end; text-align: right; padding-right: 2.5rem; }
.senal:nth-child(even) .senal-texto { grid-column: 3; justify-self: start; padding-left: 2.5rem; }
.senal-texto::before { content: ""; position: absolute; top: 50%; width: 2rem; border-top: 2px dashed rgba(250, 153, 2, 0.7); }
.senal:nth-child(odd) .senal-texto::before { right: 0; }
.senal:nth-child(even) .senal-texto::before { left: 0; }
.senal-texto p { color: var(--gris); }

/* ---------- 3. Lo que cuesta ---------- */
.costo-tarjeta {
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0; max-width: 1000px;
  background: var(--papel); border-radius: 30px; padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: 0 0 0 1px var(--suave), 0 30px 60px -40px rgba(27, 10, 64, 0.4);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start;
}
.costo-texto { font-size: 1.12em; }
.cuenta-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.cuenta label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.92rem; font-weight: 600; color: var(--tinta); }
.cuenta input {
  font: inherit; font-family: var(--display); font-weight: 600; font-size: 1.9rem; color: var(--tinta);
  background: transparent; border: 0; border-bottom: 3px solid var(--suave); border-radius: 0; padding: 0.15rem 0; width: 100%;
}
.cuenta input::placeholder { color: #c3bed1; }
.cuenta input:focus { outline: none; border-bottom-color: var(--naranja); }
.cuenta-resultado { margin-top: 1.6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; }
#cTotal { font-family: var(--display); font-weight: 700; font-size: clamp(3.2rem, 2rem + 5vw, 6.4rem); line-height: 0.9; letter-spacing: -0.03em; color: var(--violeta); font-variant-numeric: tabular-nums; }
#cTexto { font-weight: 500; color: var(--tinta); }
.flujo .costo .centrado > .decision {
  margin-top: clamp(2.5rem, 5vw, 3.5rem); max-width: 44ch; padding: 1.1rem 1.5rem;
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.35rem); line-height: 1.4; color: var(--tinta);
  background: var(--naranja-claro); border: 1.5px solid rgba(250, 153, 2, 0.6); border-radius: 18px;
}
.decision strong { font-weight: 600; }

/* ---------- 4. Qué hacemos (banda oscura) ---------- */
.rescate {
  margin: clamp(2rem, 5vw, 4rem) var(--margen);
  background: var(--tinta); color: rgba(255, 255, 255, 0.8); border-radius: 40px;
  overflow: hidden;
}
.rescate h2, .rescate h3 { color: #fff; }
.flujo .rescate .centrado > * { background: none; }
.rescate .intro { color: rgba(255, 255, 255, 0.7); }
.rescate-fila {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem);
  max-width: calc(var(--ancho) + 2 * var(--margen)); margin: clamp(2.5rem, 5vw, 3.5rem) auto 0; padding: 0 clamp(1.25rem, 4vw, 3.5rem);
}
.rescate-tarjeta { display: flex; flex-direction: column; gap: 0.8rem; }
.rescate-tarjeta p { color: rgba(255, 255, 255, 0.72); }
.foto-tarjeta { aspect-ratio: 4 / 3; margin-bottom: 0.6rem; background-color: rgba(255, 255, 255, 0.07); background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 0 12px, transparent 12px 24px); }
.foto-tarjeta .foto-vacia { color: rgba(255, 255, 255, 0.55); }

/* ---------- 5. Así funciona: tarjetas que se apilan ---------- */
.pila { list-style: none; margin-top: clamp(2.5rem, 5vw, 3.5rem); display: flex; flex-direction: column; align-items: center; }
.paso {
  position: sticky; top: calc(var(--arriba) + 24px + var(--n) * 26px);
  width: min(1000px, 100%); margin-bottom: 14vh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center;
  background: var(--papel); border-radius: 30px; padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 0 0 1px var(--suave), 0 -18px 40px -30px rgba(27, 10, 64, 0.5);
  transform-origin: center top; transition: filter 0.2s;
}
.paso:last-child { margin-bottom: 0; }
.paso:nth-child(2) .foto-paso { order: -1; }
.paso-texto { display: flex; flex-direction: column; gap: 0.8rem; padding: clamp(0.5rem, 2vw, 1.5rem); }
.paso-texto p { color: var(--gris); max-width: 36ch; }
.paso-n {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--naranja); color: var(--tinta); font-family: var(--display); font-weight: 700; font-size: 1.4rem;
  margin-bottom: 0.4rem;
}
.foto-paso { aspect-ratio: 10 / 7; }

/* ---------- 6. Para quién ---------- */
.quien-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1rem, 2.5vw, 1.8rem); max-width: 1000px; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.quien-tarjeta { border-radius: 30px; padding: clamp(1.6rem, 3.5vw, 2.6rem); display: flex; flex-direction: column; gap: 1.3rem; }
.quien-si { background: var(--papel); box-shadow: 0 0 0 1px var(--suave), 0 30px 60px -40px rgba(27, 10, 64, 0.4); }
.quien-no { background: #e9e7ef; }
.quien-tarjeta h3 { font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.8rem); padding-bottom: 1rem; border-bottom: 1px solid var(--suave); }
.quien-no h3 { color: #6a6480; border-bottom-color: #d8d4e1; }
.quien-tarjeta ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.quien-tarjeta li { display: grid; grid-template-columns: 34px 1fr; gap: 0.9rem; align-items: start; }
.quien-tarjeta li svg { width: 34px; height: 34px; padding: 7px; border-radius: 10px; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.quien-si li svg { background: var(--naranja-claro); stroke: #d17b00; }
.quien-si li { color: var(--tinta); }
.quien-no li svg { background: #dcd8e4; stroke: #857f99; }
.quien-no li, .quien-no p { color: #6a6480; }
.quien-no p { font-size: 0.95rem; border-top: 1px solid #d8d4e1; padding-top: 1rem; }

/* ---------- 7. Preguntas ---------- */
.faq-lista {
  max-width: 860px; margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  background: var(--papel); border-radius: 28px; padding: 0.4rem clamp(1.25rem, 3vw, 2.2rem);
  box-shadow: 0 0 0 1px var(--suave);
}
.faq-lista details + details { border-top: 1px solid var(--suave); }
.faq-lista summary {
  list-style: none; cursor: pointer; position: relative; padding: 1.35rem 2.8rem 1.35rem 0;
  font-family: var(--display); font-weight: 600; font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem); line-height: 1.2; color: var(--tinta);
}
.faq-lista summary::-webkit-details-marker { display: none; }
.faq-lista summary::after {
  content: ""; position: absolute; right: 0.2rem; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%;
  background:
    linear-gradient(var(--tinta), var(--tinta)) center / 12px 2px no-repeat,
    linear-gradient(var(--tinta), var(--tinta)) center / 2px 12px no-repeat,
    var(--fondo);
  transition: transform 0.25s;
}
.faq-lista details[open] summary::after { transform: rotate(45deg); }
.faq-lista details p { padding: 0 2.8rem 1.4rem 0; color: var(--texto); max-width: 62ch; }

/* ---------- 8. Cierre ---------- */
.cierre { overflow: hidden; padding-bottom: clamp(5rem, 10vw, 8rem); }
.cierre-titulo { font-family: var(--display); font-weight: 700; font-size: clamp(2.9rem, 1rem + 6vw, 7rem); line-height: 0.9; letter-spacing: -0.025em; max-width: 16ch; }
.cierre .lead { margin-top: 1rem; }
.cierre .hero-form { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.estampas { position: absolute; inset: 0; pointer-events: none; }
.estampa {
  position: absolute; width: clamp(150px, 14vw, 210px); aspect-ratio: 4 / 3;
  border: 8px solid var(--papel); border-radius: 10px;
  box-shadow: 0 20px 40px -22px rgba(27, 10, 64, 0.55);
  transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot));
}
.estampa .foto-vacia { font-size: 0.7rem; }
.e1 { --rot: -8deg; left: 5%; top: 9%; }
.e2 { --rot: 7deg; right: 6%; top: 7%; }
.e3 { --rot: 5deg; left: 7%; top: 52%; }
.e4 { --rot: -6deg; right: 5%; top: 56%; }

/* ---------- Pie ---------- */
.pie { border-top: 1px solid var(--suave); padding: 2rem 0 2.5rem; font-size: 0.92rem; color: var(--gris); }
.pie strong { color: var(--tinta); font-family: var(--display); font-size: 1.1rem; letter-spacing: 0.02em; margin-right: 0.5rem; }
.pie-grid { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; }
.pie-links { display: flex; gap: 1.5rem; }
.pie-links a { text-decoration: none; }
.pie-links a:hover { color: var(--tinta); text-decoration: underline; }

/* ---------- Botón flotante (celular) ---------- */
.flotante {
  position: fixed; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 25;
  display: none; text-align: center; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem;
  background: var(--naranja); color: var(--tinta); border-radius: 999px; padding: 0.95rem 1rem;
  box-shadow: 0 16px 40px -12px rgba(27, 10, 64, 0.5);
}

/* ---------- Tabletas ---------- */
@media (max-width: 1100px) {
  .e3, .e4 { display: none; }
  .e1 { top: 3%; left: 2%; }
  .e2 { top: 3%; right: 2%; }
  .cierre-cabeza { padding-top: 6rem; }
}
@media (max-width: 900px) {
  .costo-tarjeta, .paso, .quien-grid { grid-template-columns: minmax(0, 1fr); }
  .paso:nth-child(2) .foto-paso { order: 0; }
  .rescate-fila {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; scrollbar-width: none;
  }
  .rescate-fila::-webkit-scrollbar { display: none; }
  .rescate-tarjeta { scroll-snap-align: start; }
  /* Señales: una debajo de otra, centradas sobre la línea */
  .senal { grid-template-columns: 1fr; justify-items: center; gap: 1rem; }
  .senal-nodo { grid-column: 1; grid-row: 1; }
  .senal:nth-child(odd) .senal-texto, .senal:nth-child(even) .senal-texto {
    grid-column: 1; grid-row: 2; justify-self: center; text-align: center; padding: 0.8rem 1rem; background: var(--fondo);
  }
  .senal-texto::before { display: none; }
}

/* ---------- Celulares ---------- */
@media (max-width: 640px) {
  :root { --arriba: 64px; }
  .top-cta { padding: 0.5rem 1rem; font-size: 0.88rem; }
  .form { grid-template-columns: 1fr; border-radius: 22px; }
  .arbol { aspect-ratio: 1000 / 760; }
  .b-lejos { display: none; }
  .busqueda { font-size: 0.78rem; padding: 0.35rem 0.7rem 0.35rem 0.55rem; }
  .tache-nota { display: none; }
  .cuenta-campos { grid-template-columns: 1fr; }
  .rescate { margin-left: 0.75rem; margin-right: 0.75rem; border-radius: 30px; }
  .paso { top: calc(var(--arriba) + 12px + var(--n) * 18px); margin-bottom: 10vh; }
  .estampas { display: none; }
  .pastilla { font-size: 0.8rem; padding: 0.35rem 0.85rem; }
  .foto-paso { aspect-ratio: 16 / 9; }
  .cierre-cabeza { padding-top: 0; }
  .flotante:not([hidden]) { display: block; }
  .pie { padding-bottom: 6.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .linea > span, .busqueda, .tache, .ruta { animation: none; }
  [data-parallax] { transform: none !important; }
}
