/* Heuristic — infografías de contenido.
   Mismo sistema que heuristic-motion: easing cubic-bezier(.2,0,0,1), trazo de 1px,
   loops de 6–9 s. El JS de motion marca .hx-in al entrar en pantalla. */

.hx-info {
	position: relative;
	font-family: 'Aeonik', sans-serif;
	color: #2b2b2b;
	background: #f2f6f2;
	border-radius: 8px;
	padding: 22px;
	overflow: hidden;
}

/* Retícula de fondo, como en los mocks */
.hx-info::before {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: linear-gradient(to right, rgba(19, 122, 58, .07) 1px, transparent 1px);
	background-size: 40px 100%;
}

.hx-info > * {
	position: relative;
}

/* ------------------------------------------------ capas de defensa */

.hx-info-sec {
	display: flex;
	align-items: center;
	gap: 26px;
}

.hx-sec-rings {
	position: relative;
	flex: 0 0 auto;
	width: 132px;
	height: 132px;
	display: grid;
	place-items: center;
}

/* Tres aros de 1px: se cierran de fuera hacia dentro. Sin relleno ni difuminado. */
.hx-sec-ring {
	position: absolute;
	border: 1px solid rgba(19, 122, 58, .35);
	border-radius: 8px;
	opacity: 0;
	transform: scale(1.18);
	transition: opacity 520ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1)),
	            transform 520ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
}

.hx-sec-ring:nth-child(1) { inset: 0; }
.hx-sec-ring:nth-child(2) { inset: 20px; border-color: rgba(19, 122, 58, .5); }
.hx-sec-ring:nth-child(3) { inset: 40px; border-color: rgba(168, 206, 58, .85); }

.hx-in .hx-sec-ring,
.hx-info-sec.hx-in .hx-sec-ring {
	opacity: 1;
	transform: scale(1);
}

/* De fuera a dentro: 0 · 140 · 280 ms. La lectura es «capa sobre capa». */
.hx-info-sec.hx-in .hx-sec-ring:nth-child(2) { transition-delay: 140ms; }
.hx-info-sec.hx-in .hx-sec-ring:nth-child(3) { transition-delay: 280ms; }

.hx-sec-core {
	width: 44px;
	height: 44px;
	border-radius: 6px;
	background: #137a3a;
	display: grid;
	place-items: center;
	box-shadow: 0 8px 20px rgba(0, 26, 13, .18);
}

.hx-sec-legend {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.hx-sec-legend li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	opacity: 0;
	transform: translateX(-8px);
	transition: opacity 420ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1)),
	            transform 420ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
	transition-delay: calc(160ms + var(--i) * 140ms);
}

.hx-info-sec.hx-in .hx-sec-legend li {
	opacity: 1;
	transform: none;
}

.hx-sec-mark {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	display: grid;
	place-items: center;
	background: #ffffff;
	border: 1px solid #e4e8e4;
	border-radius: 6px;
}

.hx-sec-legend strong {
	display: block;
	font-size: 13px;
	font-weight: 500;
	line-height: 18px;
}

.hx-sec-legend em {
	display: block;
	font-size: 12px;
	font-style: normal;
	line-height: 18px;
	color: #5a605a;
}

/* ------------------------------------------------ red multi-sede */

.hx-info-voip {
	height: 190px;
	padding: 0;
}

.hx-voip-wires {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* La llamada: guion corto que recorre el camino, primero entrada y luego salida */
.hx-voip-flow path {
	stroke-dasharray: 18 200;
	stroke-dashoffset: 218;
	animation: hx-voipflow 4s var(--hx-ease, cubic-bezier(.2, 0, 0, 1)) infinite;
	animation-delay: var(--d, 0s);
}

@keyframes hx-voipflow {
	0%        { stroke-dashoffset: 218; opacity: 0; }
	12%       { opacity: 1; }
	55%       { stroke-dashoffset: 0; opacity: 1; }
	68%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

.hx-voip-node {
	position: absolute;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 11px;
	background: #ffffff;
	border: 1px solid #e4e8e4;
	border-radius: 6px;
	box-shadow: 0 8px 20px rgba(0, 26, 13, .08);
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	transform: translate(-50%, -50%);
}

.hx-voip-node.is-a   { left: 19.4%; top: 73.3%; }
.hx-voip-node.is-b   { left: 80.6%; top: 73.3%; }

.hx-voip-node.is-hub {
	left: 50%;
	top: 34.7%;
	background: #137a3a;
	border-color: #137a3a;
	color: #ffffff;
}

/* El hub late justo cuando la llamada pasa por él */
.hx-voip-node.is-hub::after {
	content: '';
	position: absolute;
	inset: -1px;
	border: 1px solid rgba(19, 122, 58, .45);
	border-radius: 7px;
	animation: hx-hub 4s var(--hx-ease, cubic-bezier(.2, 0, 0, 1)) infinite;
	animation-delay: .9s;
}

@keyframes hx-hub {
	0%        { transform: scale(1); opacity: .6; }
	60%, 100% { transform: scale(1.16); opacity: 0; }
}

/* ------------------------------------------------ sellos de certificación */

.hx-info-iso {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

/* A ancho de contenido (1280) los cinco sellos ocupan un tercio y dejaban 600px de
   vacío a la derecha. La etiqueta con `margin-right: auto` empuja los sellos al
   otro extremo y la franja se lee como una fila, no como un bloque descolgado. */
.hx-iso-label {
	margin-right: auto;
	font-family: 'Akkurat Mono', ui-monospace, monospace;
	font-size: 11px;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: #5a605a;
}

.hx-iso-seal {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 13px;
	background: #ffffff;
	border: 1px solid #e4e8e4;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	/* Ahora es un `<a>` al PDF del certificador, no un `<span>`: hay que reponer color y
	   quitar el subrayado, y darle estado de foco visible porque es navegable. */
	color: #2b2b2b;
	text-decoration: none;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 420ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1)),
	            transform 420ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1)),
	            border-color 420ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
	transition-delay: calc(var(--i) * 90ms);
}

.hx-info-iso.hx-in .hx-iso-seal {
	opacity: 1;
	transform: none;
	border-color: rgba(19, 122, 58, .45);
}

.hx-iso-check {
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #e4f2e6;
	opacity: 0;
	transform: scale(.5);
	transition: opacity 300ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1)),
	            transform 300ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
	transition-delay: calc(180ms + var(--i) * 90ms);
}

.hx-info-iso.hx-in .hx-iso-check {
	opacity: 1;
	transform: none;
}

/* El sello es un enlace: se comporta como tal. La transición va sobre `background` y
   `border-color`; el `transform` lo maneja la aparición por scroll, así que no se toca
   aquí para no pelearse con ella. */
.hx-iso-seal {
	transition: background 180ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1)),
	            border-color 180ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
}

.hx-info-iso.hx-in .hx-iso-seal:hover,
.hx-info-iso.hx-in .hx-iso-seal:focus-visible {
	background: #e4f2e6;
	border-color: #137a3a;
}

.hx-iso-seal:focus-visible {
	outline: 2px solid #137a3a;
	outline-offset: 2px;
}

/* Marca de formato, en Akkurat Mono como el resto de etiquetas del sistema. */
.hx-iso-pdf {
	font-family: 'Akkurat Mono', ui-monospace, monospace;
	font-size: 9.5px;
	font-style: normal;
	letter-spacing: .04em;
	color: #5a605a;
	padding: 2px 5px;
	border: 1px solid #e4e8e4;
	border-radius: 3px;
}

.hx-iso-seal:hover .hx-iso-pdf,
.hx-iso-seal:focus-visible .hx-iso-pdf {
	color: #137a3a;
	border-color: rgba(19, 122, 58, .45);
}

/* ------------------------------------------------ ventana de respuesta */

/* Rejilla de dos columnas: etiqueta fija + carril. Cabecera, filas, escala y pie
   comparten las mismas columnas, así que todo arranca en la misma vertical —
   antes cada fila alineaba por su cuenta y quedaba descuadrado. */
.hx-info-sla {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr);
	align-items: center;
	gap: 10px 12px;
}

.hx-sla-head,
.hx-sla-foot {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 500;
}

.hx-sla-foot {
	margin-top: 2px;
	color: #137a3a;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 420ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1)),
	            transform 420ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
	transition-delay: 720ms;
}

.hx-info-sla.hx-in .hx-sla-foot {
	opacity: 1;
	transform: none;
}

/* Las filas son «display: contents»: sus dos hijos caen en las columnas del padre */
.hx-sla-row {
	display: contents;
}

.hx-sla-label {
	font-family: 'Akkurat Mono', ui-monospace, monospace;
	font-size: 10px;
	letter-spacing: .02em;
	color: #5a605a;
	text-align: right;
}

/* El hueco del mediodía leía como «barra rota». El fondo del carril es ahora una
   trama diagonal que significa «cerrado», así que el vacío dice algo (Juano,
   2026-07-29). */
.hx-sla-track {
	position: relative;
	height: 10px;
	border-radius: 2px;
	overflow: hidden;
	background-color: #eaefea;
	background-image: repeating-linear-gradient(
		45deg,
		rgba(19, 122, 58, .16) 0 1px,
		transparent 1px 5px
	);
}

/* Cada tramo crece desde su borde izquierdo: el horario «se abre» */
.hx-sla-slot {
	position: absolute;
	top: 0;
	bottom: 0;
	background: #137a3a;
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 620ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
	transition-delay: calc(var(--r) * 180ms + var(--s) * 140ms);
}

.hx-info-sla.hx-in .hx-sla-slot {
	transform: none;
}

/* Cursor: filete de 1px que recorre la franja una vez por ciclo */
.hx-sla-cursor {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background: #a8ce3a;
	animation: hx-sla-run 7s var(--hx-ease, cubic-bezier(.2, 0, 0, 1)) infinite;
}

.hx-sla-row:nth-of-type(2) .hx-sla-cursor { animation-delay: .4s; }

@keyframes hx-sla-run {
	0%        { left: 0; opacity: 0; }
	8%        { opacity: 1; }
	52%       { left: 100%; opacity: 1; }
	60%, 100% { left: 100%; opacity: 0; }
}

/* Leyenda: sin ella la trama sigue siendo un jeroglífico */
.hx-sla-legend > span:last-child {
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: 'Akkurat Mono', ui-monospace, monospace;
	font-size: 9px;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: #8a8f8a;
}

.hx-sla-key {
	width: 14px;
	height: 8px;
	border-radius: 2px;
	flex: 0 0 auto;
}

.hx-sla-key.is-open {
	background: #137a3a;
}

.hx-sla-key.is-closed {
	margin-left: 10px;
	background-color: #eaefea;
	background-image: repeating-linear-gradient(
		45deg,
		rgba(19, 122, 58, .16) 0 1px,
		transparent 1px 5px
	);
}

/* Escala horaria: una marca por corte del horario, con su filete de 1px hasta el
   carril, para que se vea que la barra empieza y acaba justo ahí. */
.hx-sla-ticks {
	position: relative;
	height: 20px;
}

.hx-sla-ticks > i {
	position: absolute;
	top: 8px;
	transform: translateX(-50%);
	padding-top: 0;
	font-family: 'Akkurat Mono', ui-monospace, monospace;
	font-size: 9px;
	letter-spacing: .02em;
	color: #8a8f8a;
	white-space: nowrap;
}

.hx-sla-ticks > i::before {
	content: '';
	position: absolute;
	left: 50%;
	top: -7px;
	width: 1px;
	height: 5px;
	background: #c9d4c9;
}

/* Los extremos se alinean al borde del carril, no centrados sobre él */
.hx-sla-ticks > i:first-child { transform: none; }
.hx-sla-ticks > i:first-child::before { left: 0; }
.hx-sla-ticks > i:last-child  { transform: translateX(-100%); }
.hx-sla-ticks > i:last-child::before { left: auto; right: 0; }

/* ------------------------------------------------ migración por fases */

.hx-info-mig {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hx-mig-head {
	font-size: 12px;
	font-weight: 500;
}

/* Rejilla de cuatro columnas con todo centrado: el riel va de centro de punto a
   centro de punto (12,5 % a cada lado), que es lo que estaba descuadrado. */
.hx-mig-steps {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.hx-mig-steps li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 9px;
	text-align: center;
}

.hx-mig-rail {
	position: absolute;
	top: 4px;
	left: 12.5%;
	right: 12.5%;
	height: 1px;
	background: #dfe6df;
	z-index: 0;
}

.hx-mig-progress {
	display: block;
	height: 1px;
	width: 0;
	background: linear-gradient(to right, #137a3a, #a8ce3a);
	transition: width 1400ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
}

.hx-info-mig.hx-in .hx-mig-progress {
	width: 100%;
}

.hx-mig-dot {
	position: relative;
	z-index: 1;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid #c9d4c9;
	transition: border-color 300ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1)),
	            background-color 300ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
	transition-delay: calc(var(--i) * 340ms);
}

.hx-info-mig.hx-in .hx-mig-dot {
	border-color: #137a3a;
	background: #a8ce3a;
}

.hx-mig-icon {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	background: #ffffff;
	border: 1px solid #e4e8e4;
	border-radius: 6px;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 380ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1)),
	            transform 380ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
	transition-delay: calc(var(--i) * 340ms);
}

.hx-mig-label {
	font-size: 12px;
	font-weight: 500;
	opacity: 0;
	transition: opacity 380ms var(--hx-ease, cubic-bezier(.2, 0, 0, 1));
	transition-delay: calc(120ms + var(--i) * 340ms);
}

.hx-info-mig.hx-in .hx-mig-icon {
	opacity: 1;
	transform: none;
}

.hx-info-mig.hx-in .hx-mig-label {
	opacity: 1;
}

.hx-mig-note {
	font-family: 'Akkurat Mono', ui-monospace, monospace;
	font-size: 10px;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: #5a605a;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 767px) {
	.hx-info-sec {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
	}

	.hx-info-voip {
		height: 210px;
	}

	.hx-voip-node {
		font-size: 11px;
		padding: 7px 9px;
	}

	.hx-mig-steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 18px;
	}

	/* Con dos columnas el riel uniría filas distintas */
	.hx-mig-rail {
		display: none;
	}

	.hx-info-sla {
		grid-template-columns: 30px minmax(0, 1fr);
	}
}

/* ------------------------------------------------------- accesibilidad */

@media (prefers-reduced-motion: reduce) {
	.hx-sec-ring,
	.hx-sec-legend li,
	.hx-iso-seal,
	.hx-iso-check,
	.hx-sla-slot,
	.hx-sla-foot,
	.hx-mig-icon,
	.hx-mig-label,
	.hx-mig-progress,
	.hx-mig-dot {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.hx-mig-progress { width: 100%; }
	.hx-sla-cursor,
	.hx-voip-node.is-hub::after { display: none; }
	.hx-voip-flow path { stroke-dashoffset: 0; opacity: .7; animation: none; }
}
