/* Portada: el producto a la vista */

.heroe {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 92px) 0 clamp(56px, 7vw, 96px);
}
.heroe::before,
.heroe::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.heroe::before { width: 560px; height: 560px; left: -180px; top: -240px; background: var(--mancha-azul); }
.heroe::after { width: 460px; height: 460px; right: -140px; top: 40px; background: var(--mancha-naranja); }

.heroe-rejilla {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.heroe .titular {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.5rem, 3.4vw + 1.1rem, 4.125rem);
}
.heroe .bajada { margin: 22px 0 0; max-width: 31rem; }

.heroe-botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.heroe-notas {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--texto-suave);
  font-size: 0.9375rem;
  font-weight: 500;
}
.heroe-notas li { display: inline-flex; align-items: center; gap: 7px; }
.heroe-notas svg { color: #16A34A; }

.heroe-demo, .solucion-demo { margin: 0; position: relative; min-width: 0; }

/* Ventana de demostración */
.ventana {
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--sombra-ventana);
}
.ventana-barra {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: var(--superficie-2);
  border-bottom: 1px solid var(--borde);
}
.ventana-barra i { width: 10px; height: 10px; border-radius: 50%; background: var(--borde-fuerte); }
.ventana-dir {
  margin-left: 10px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  font-size: 0.8125rem;
  color: var(--texto-suave);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ventana-cuerpo { padding: 18px; }

.indicadores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.indicador { background: var(--superficie-2); border-radius: 12px; padding: 12px; min-width: 0; }
.indicador > span { display: block; font-size: 0.75rem; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.indicador b { display: block; font-size: clamp(1.125rem, 1.2vw + 0.8rem, 1.5rem); font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.indicador em { font-style: normal; font-size: 0.75rem; font-weight: 600; color: var(--ok-texto); }

.grafico { display: block; width: 100%; height: auto; margin-top: 16px; }
.grafico line { stroke: var(--grafico-linea); }
.grafico .col { fill: var(--grafico-col); transform-box: fill-box; transform-origin: 50% 100%; }
.grafico .col.actual { fill: var(--primario); }
.grafico text { font: 500 10px var(--cuerpo); fill: var(--grafico-texto); text-anchor: middle; }
.grafico text.actual { fill: var(--vinculo); font-weight: 600; }

.flotante {
  position: absolute;
  left: -18px;
  bottom: -66px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 290px;
  padding: 12px 16px;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  font-size: 0.875rem;
  line-height: 1.35;
}
.flotante b { display: block; font-weight: 600; }
.flotante small { color: var(--texto-suave); font-size: 0.75rem; }
.flotante-punto { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 0 5px rgba(234, 88, 12, 0.18); }

/* Soluciones */
.soluciones { display: grid; gap: clamp(56px, 9vw, 120px); padding-top: clamp(16px, 3vw, 40px); padding-bottom: clamp(56px, 8vw, 104px); }

.solucion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
}
.solucion.invertida .solucion-texto { order: 2; }

.ceja {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--acento-fondo);
  border: 1px solid var(--acento-borde);
  color: var(--acento-texto);
  font-size: 0.8125rem;
  font-weight: 600;
}

.solucion h2 {
  font-family: var(--titulos);
  font-weight: 400;
  font-size: clamp(1.75rem, 2vw + 1.1rem, 2.625rem);
  line-height: 1.12;
  margin: 14px 0 12px;
  text-wrap: balance;
}
.solucion-texto > p { margin: 0; max-width: 33rem; color: var(--texto-suave); font-size: 1.0625rem; text-wrap: pretty; }

.puntos { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.puntos li { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.puntos svg { flex: none; margin-top: 4px; color: var(--primario-claro); }

.mapa { display: block; width: 100%; height: auto; }
.m-fondo { fill: var(--mapa-fondo); }
.m-parque { fill: var(--mapa-parque); }
.m-calles { stroke: var(--mapa-calle); }
.m-base { fill: var(--mapa-base); }
.parada circle { fill: var(--tarjeta); stroke: var(--primario-claro); stroke-width: 3; }
.parada text { font: 600 12px var(--cuerpo); fill: var(--vinculo); text-anchor: middle; dominant-baseline: central; }
.parada.hecha circle { fill: #16A34A; stroke: #fff; }
.parada.hecha text { fill: #fff; }

.renglones { display: grid; }
.ventana-cuerpo.renglones { padding-top: 6px; padding-bottom: 6px; }
.renglon {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--borde);
  font-size: 0.9375rem;
}
.renglon:first-child { border-top: 0; }
.renglon > span:first-child, .renglon > b:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.renglon-2 { grid-template-columns: minmax(0, 1fr) auto; }
.renglon-3 { grid-template-columns: minmax(0, 1fr) auto auto; }
.renglon-3 b { font-weight: 600; font-variant-numeric: tabular-nums; }
.renglon-4 { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
.renglon-4 b { font-weight: 600; }
.renglon-4 > span:nth-child(2) { color: var(--texto-suave); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.renglon-4 > span:nth-child(4):empty { display: none; }
.renglon .suave { color: var(--texto-suave); }
.renglon .aviso { color: var(--aviso-texto); font-weight: 600; }

.nivel { height: 8px; border-radius: 999px; background: var(--borde); overflow: hidden; }
.nivel span { display: block; height: 100%; border-radius: 999px; background: var(--primario); }
.nivel .n-bajo { width: 14%; background: #DC2626; }
.nivel .n-bajo2 { width: 24%; background: #DC2626; }
.nivel .n-medio { width: 44%; background: var(--acento); }
.nivel .n-bien { width: 84%; }
.nivel .n-bien2 { width: 66%; }

.franja { display: flex; gap: 3px; height: 16px; border-radius: 999px; overflow: hidden; }
.franja span:nth-child(1) { flex: 52; background: #16A34A; }
.franja span:nth-child(2) { flex: 24; background: var(--primario); }
.franja span:nth-child(3) { flex: 15; background: var(--acento); }
.franja span:nth-child(4) { flex: 9; background: #DC2626; }

.leyenda { list-style: none; margin: 12px 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8125rem; color: var(--texto-suave); }
.leyenda li { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 9px; height: 9px; border-radius: 50%; }
.l-1 { background: #16A34A; } .l-2 { background: var(--primario); } .l-3 { background: var(--acento); } .l-4 { background: #DC2626; }

/* Teléfono */
.telefono-zona { display: flex; justify-content: center; padding: 12px 0; }
.telefono-zona::before {
  content: "";
  position: absolute;
  inset: 8% 12%;
  border-radius: 40px;
  background: linear-gradient(140deg, rgba(37, 99, 235, 0.16), rgba(234, 88, 12, 0.12));
}
.telefono {
  position: relative;
  width: min(292px, 82vw);
  padding: 10px;
  border-radius: 38px;
  background: var(--tel-marco);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.28);
}
.telefono-pantalla { background: var(--tarjeta); border-radius: 29px; overflow: hidden; }
.tel-cab { background: var(--primario); color: #fff; padding: 18px 18px 16px; }
.tel-cab small { display: block; font-size: 0.75rem; opacity: 0.9; }
.tel-cab strong { display: block; font-size: 1.125rem; font-weight: 600; margin-top: 2px; }
.avance { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.3); margin-top: 12px; overflow: hidden; }
.avance span { display: block; height: 100%; width: 40%; border-radius: 999px; background: #fff; transition: width 400ms ease; }

.tel-lista { list-style: none; margin: 0; padding: 10px 10px 14px; display: grid; gap: 8px; }
.tel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--borde);
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.3;
  transition: background-color 250ms ease;
}
.tel-item small { display: block; font-size: 0.75rem; color: var(--texto-suave); }
.tel-nombre { min-width: 0; flex: 1; font-weight: 500; transition: color 250ms ease; }
.tel-cant { font-weight: 600; }
.casilla {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--borde-fuerte);
  color: transparent;
  transition: background-color 250ms ease, border-color 250ms ease, color 250ms ease;
}
.casilla svg { width: 14px; height: 14px; }
.tel-item.hecho { background: var(--ok-fondo); }
.tel-item.hecho .casilla { background: #16A34A; border-color: #16A34A; color: #fff; }
.tel-item.hecho .tel-nombre { color: var(--texto-suave); }

/* Catálogo, pasos y cierre */
.titulo-seccion {
  font-family: var(--titulos);
  font-weight: 400;
  font-size: clamp(1.75rem, 2vw + 1.1rem, 2.5rem);
  line-height: 1.12;
  text-align: center;
  margin: 0 0 26px;
  text-wrap: balance;
}

.tambien { padding-bottom: clamp(56px, 8vw, 104px); }
.nube { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nube li {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.como { padding-bottom: clamp(56px, 8vw, 104px); }
.pasos-g { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.paso-g { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 18px; padding: 26px 24px; }
.numero-g {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--primario);
  color: #fff;
  font-family: var(--titulos);
  font-size: 1.375rem;
}
.paso-g h3 { margin: 16px 0 6px; font-size: 1.1875rem; font-weight: 600; }
.paso-g p { margin: 0; color: var(--texto-suave); }

.cierre {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(40px, 7vw, 76px) 24px;
  margin-bottom: clamp(48px, 7vw, 88px);
  border-radius: 28px;
  background: var(--cierre-fondo);
  border: 1px solid var(--cierre-borde);
  color: #fff;
}
.cierre::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -200px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.55);
  filter: blur(90px);
}
.cierre > * { position: relative; }
.cierre h2 {
  font-family: var(--titulos);
  font-weight: 400;
  font-size: clamp(1.875rem, 2.6vw + 1.1rem, 3rem);
  line-height: 1.1;
  margin: 0 auto;
  max-width: 18ch;
  text-wrap: balance;
}
.cierre p { margin: 14px 0 26px; color: #CBD5E1; font-size: 1.0625rem; }
.boton-claro { background: #fff; color: #0F172A; }
.boton-claro:hover { background: #E2E8F0; }
.cierre :focus-visible { outline-color: #fff; }

/* Movimiento: solo cuando hay JavaScript y la persona no pidió reducirlo */
.js .revelar { opacity: 0; transform: translateY(20px); transition: opacity 600ms ease, transform 600ms ease; }
.js .revelar.visto { opacity: 1; transform: none; }
.js .grafico .col { transform: scaleY(0); }
.js .visto .grafico .col { animation: crecer 900ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.js .visto .grafico .col:nth-of-type(2) { animation-delay: 70ms; }
.js .visto .grafico .col:nth-of-type(3) { animation-delay: 140ms; }
.js .visto .grafico .col:nth-of-type(4) { animation-delay: 210ms; }
.js .visto .grafico .col:nth-of-type(5) { animation-delay: 280ms; }
.js .visto .grafico .col:nth-of-type(6) { animation-delay: 350ms; }
.js .visto .grafico .col:nth-of-type(7) { animation-delay: 420ms; }
@keyframes crecer { to { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  .js .revelar { opacity: 1; transform: none; }
  .js .grafico .col { transform: none; animation: none !important; }
}

@media (max-width: 900px) {
  .heroe-rejilla, .solucion { grid-template-columns: 1fr; }
  .solucion.invertida .solucion-texto { order: 0; }
  .heroe .titular { max-width: 14ch; }
  .flotante { left: 12px; }
  .heroe-demo { margin-bottom: 66px; }
  .pasos-g { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 640px) {
  .heroe-botones .boton { flex: 1 1 100%; }
  .ventana-cuerpo { padding: 14px; }
  .indicadores { gap: 6px; }
  .indicador { padding: 10px 8px; }
  .cierre .boton { width: 100%; }
}

/* Página de productos */
.heroe-corto { padding-bottom: clamp(32px, 5vw, 56px); }
.heroe-centro { position: relative; z-index: 1; text-align: center; }
.heroe-centro .titular { margin: 16px auto 0; max-width: 16ch; }
.heroe-centro .bajada { margin: 20px auto 0; max-width: 36rem; }
.heroe-centro .heroe-botones { justify-content: center; }
.producto-cta { margin-top: 24px; }
.producto-cta form { margin: 0; }
.renglon small { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--texto-suave); font-size: 0.8125rem; font-weight: 400; }
.renglon b { font-weight: 600; }
.flotante-derecha { left: auto; right: 12px; }
.demo-grupo { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 4px; color: var(--texto-suave); font-size: 0.875rem; }
.demo-grupo b { color: var(--texto); font-variant-numeric: tabular-nums; }
.demo-grupo b.malo { color: var(--mal-texto); }
.demo-talonario { margin: 16px 0 10px; padding-top: 14px; border-top: 1px solid var(--borde); }
@media (max-width: 900px) {
  .flotante-derecha { right: 12px; }
  .solucion-demo:has(.flotante) { margin-bottom: 66px; }
}
@media (max-width: 640px) {
  .heroe-centro .heroe-botones .boton { flex: 1 1 100%; }
  .producto-cta .boton { width: 100%; }
}

/* Encabezado de la página de productos: una tarjeta por producto, que baja a su sección */
.indice-productos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 840px;
  margin: 36px auto 0;
  text-align: left;
}
.indice-tarjeta {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: 18px;
  box-shadow: var(--sombra-hoja);
  transition: border-color 160ms ease, transform 160ms ease;
}
.indice-tarjeta:hover { border-color: var(--primario-claro); transform: translateY(-2px); }
.indice-icono {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--azul-fondo);
  color: var(--primario-claro);
}
.indice-texto { display: grid; gap: 4px; min-width: 0; }
.indice-texto b { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.indice-texto > span { color: var(--texto-suave); font-size: 0.9375rem; }
.indice-texto .indice-ver {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--vinculo);
  font-weight: 600;
}
.indice-tarjeta:hover .indice-ver svg { transform: translateX(3px); }
.indice-ver svg { transition: transform 160ms ease; }
@media (max-width: 640px) {
  .indice-productos { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .indice-tarjeta { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .indice-tarjeta:hover, .indice-tarjeta:hover .indice-ver svg { transform: none; }
}
