/* Hoba · mini-interfaces de "Cómo trabajamos" (25/10/2026, Parte 2 D). Van en línea solo en la home y en
   /ramirosanz (inc/funciones.php). Estado por defecto = estado final (sin JS o con movimiento reducido se ven quietas
   y completas). miniui.js pone .hm-espera a las que todavía no se vieron y .esta-viva cuando entran en pantalla. */

/* El ícono del paso pasa a ser un punto sobre la línea; la mini-interfaz va arriba de la tarjeta. */
.hv3-pasos-envoltorio--ui .hv3-paso__ic--punto {
	left: -45px;
	top: 27px;
	width: 18px;
	height: 18px;
	border-width: 3px;
}
@media (min-width: 900px) {
	.hv3-pasos-envoltorio--ui .hv3-paso__ic--punto {
		left: 0;
		top: 0;
		margin: 12px 0 25px;
	}
}
.hm-ui {
	position: relative;
	height: 104px;
	margin: -2px 0 16px;
	padding: 12px 14px;
	overflow: hidden;
	border: 1px solid var(--hv3-borde-tarjeta);
	border-radius: 14px;
	background: var(--hv3-hueso);
	text-align: left;
}

/* 1 · Diagnóstico: una ventana con la checklist que se va tildando. */
.hm-ui__barra {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 8px;
}
.hm-ui__barra i {
	width: 6px;
	height: 6px;
	border-radius: 50%; /* avoid-ai-design-ignore: K2 */
	background: #CFC6DA;
}
.hm-ui__barra span {
	margin-left: 6px;
	padding: 1px 8px;
	border-radius: 999px; /* avoid-ai-design-ignore: K2 */
	background: var(--hv3-papel);
	font-size: 0.6875rem;
	color: var(--hv3-tinta-2);
}
.hm-diag {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.hm-diag li {
	display: flex;
	align-items: center;
	gap: 8px;
}
.hm-check {
	flex: none;
	width: 12px;
	height: 12px;
	border-radius: 4px;
	background: var(--hv3-violeta);
	box-shadow: inset 0 0 0 3px var(--hv3-violeta), inset 0 0 0 5px var(--hv3-papel); /* avoid-ai-design-ignore: C5, K2 */
}
.hm-check--alerta {
	background: #C2410C;
	box-shadow: inset 0 0 0 3px #C2410C, inset 0 0 0 5px var(--hv3-papel); /* avoid-ai-design-ignore: C5, K2 */
}
.hm-linea {
	display: block;
	height: 7px;
	width: var(--w);
	border-radius: 999px; /* avoid-ai-design-ignore: K2 */
	background: #D9D2E3;
}

/* 2 · Decisión: tres plataformas, una barra cada una, y la elección "según tus números". */
.hm-plat {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	height: 62px;
	align-items: end;
}
.hm-plat__col {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	height: 100%;
	gap: 4px;
}
.hm-plat__col i {
	display: block;
	width: 100%;
	height: var(--h);
	border-radius: 6px 6px 2px 2px;
	background: linear-gradient(180deg, var(--hv3-lavanda), var(--hv3-violeta)); /* avoid-ai-design-ignore: C1 */
	transform-origin: bottom;
}
.hm-plat__col b {
	font-size: 0.625rem;
	font-weight: 800;
	color: var(--hv3-tinta-2);
	white-space: nowrap;
}
.hm-plat__chip {
	position: absolute;
	right: 10px;
	top: 8px;
	padding: 2px 8px;
	border-radius: 999px; /* avoid-ai-design-ignore: K2 */
	background: var(--hv3-noche);
	color: var(--hv3-lavanda-clara);
	font-size: 0.6875rem;
	font-weight: 700;
}

/* 3 · Ejecución: la misma tienda en escritorio y en el celular, armándose por bloques. */
.hm-disp {
	position: relative;
	height: 100%;
}
.hm-disp__laptop {
	position: absolute;
	left: 0;
	top: 2px;
	width: 74%;
	height: 74px;
	padding: 6px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: 30px 1fr;
	gap: 4px;
	border: 2px solid var(--hv3-noche);
	border-radius: 6px;
	background: var(--hv3-papel);
}
.hm-disp__celu {
	position: absolute;
	right: 0;
	top: 0;
	width: 30%;
	height: 80px;
	padding: 5px;
	display: grid;
	grid-template-rows: 22px 1fr 1fr 12px;
	gap: 3px;
	border: 2px solid var(--hv3-noche);
	border-radius: 9px;
	background: var(--hv3-papel);
}
.hm-b {
	display: block;
	border-radius: 3px;
	background: #DCD3E6;
}
.hm-b--hero {
	grid-column: 1 / -1;
	background: linear-gradient(120deg, var(--hv3-lavanda-clara), var(--hv3-lavanda)); /* avoid-ai-design-ignore: C1 */
}
.hm-b--boton {
	background: var(--hv3-violeta);
	border-radius: 999px; /* avoid-ai-design-ignore: K2 */
}

/* 4 · Medición: la conversión que sube por encima de la línea de base (sin escala ni números). */
.hm-medic {
	display: block;
	width: 100%;
	height: 78px;
}
.hm-medic__base {
	stroke: var(--hv3-tinta-2);
	stroke-width: 1.5;
	stroke-dasharray: 4 4;
	fill: none;
}
.hm-medic__curva {
	stroke: var(--hv3-violeta);
	stroke-width: 3;
	stroke-linecap: round;
	fill: none;
	stroke-dasharray: 1;
	stroke-dashoffset: 0;
}
.hm-medic__punto {
	fill: var(--hv3-violeta);
}
.hm-medic__rotulo {
	position: absolute;
	left: 14px;
	bottom: 8px;
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--hv3-tinta-2);
}

/* ---------- Animación (solo con movimiento permitido) ---------- */
@media (prefers-reduced-motion: no-preference) {
	.hm-espera .hm-check { transform: scale(0); }
	.hm-espera .hm-linea { width: 0; }
	.hm-espera .hm-plat__col i { transform: scaleY(0); }
	.hm-espera .hm-plat__chip { opacity: 0; }
	.hm-espera .hm-b { opacity: 0; transform: scale(0.7); }
	.hm-espera .hm-disp__celu { opacity: 0; transform: translateY(14px); }
	.hm-espera .hm-medic__curva { stroke-dashoffset: 1; }
	.hm-espera .hm-medic__punto { opacity: 0; }

	.esta-viva .hm-check { animation: hm-pop 0.4s var(--hv3-salida) calc(0.25s + var(--i) * 0.35s) both; }
	.esta-viva .hm-linea { animation: hm-ancho 0.6s var(--hv3-salida) calc(0.1s + var(--i) * 0.35s) both; }
	.esta-viva .hm-plat__col i { animation: hm-sube 0.7s var(--hv3-salida) calc(0.15s + var(--i) * 0.18s) both; }
	.esta-viva .hm-plat__col:nth-child(2) i { animation: hm-sube 0.7s var(--hv3-salida) 0.33s both, hm-resalta 1.6s ease 1.1s 1 both; }
	.esta-viva .hm-plat__chip { animation: hm-aparece 0.5s ease 1.4s both; }
	.esta-viva .hm-b { animation: hm-bloque 0.45s var(--hv3-salida) calc(0.15s + var(--i) * 0.16s) both; }
	.esta-viva .hm-disp__celu { animation: hm-celu 0.6s var(--hv3-salida) 0.25s both; }
	.esta-viva .hm-medic__curva { animation: hm-traza 1.6s var(--hv3-salida) 0.2s both; }
	.esta-viva .hm-medic__punto { animation: hm-aparece 0.4s ease 1.7s both; }
}
@keyframes hm-pop { from { transform: scale(0); } 70% { transform: scale(1.25); } to { transform: scale(1); } }
@keyframes hm-ancho { from { width: 0; } to { width: var(--w); } }
@keyframes hm-sube { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes hm-resalta { 0%, 100% { filter: none; } 40% { filter: brightness(1.18) saturate(1.2); } }
@keyframes hm-aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes hm-bloque { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes hm-celu { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hm-traza { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
