/*
 * Pie de página (ADR-046; antes blanco de 12px, ADR-039, y gris-500, ADR-033).
 * Solo var(--cys-*) y color-mix() sobre tokens: los únicos literales son los
 * cortes de @media (las variables no valen en condiciones de @media) y el
 * grosor de borde de 1px (mismo criterio que header.css y components.css).
 */

/* Fondo gris-900 liso (2026-10-19, pedido de Samuel: tenía demasiado
   verde). Sin manchas, sin degradado hacia acento-900 y sin el
   desvanecido superior (dejaba una franja turbia, como en Nosotros): borde
   nítido con un filete acento-600, el único verde del pie. Sin la imagen del fondo continuo (ADR-046: llevaba el LCP de la
   portada a 1440 de ~840 a ~1500ms). Sin backdrop-filter ni animación. */
.cys-footer {
	position: relative;
	isolation: isolate;
	background-color: var(--cys-color-gris-900);
	/* Fondo gris-900 con los dibujos del fondo continuo en verde
	   (::before, 2026-10-20). */
	/* Sin filete arriba (2026-10-20, pedido de Samuel). */
	color: var(--cys-color-neutro-200);
	font-size: var(--cys-text-base);
	line-height: var(--cys-text-base-line-height);
}

/* Cuatro columnas: una en celular, dos desde 48rem, cuatro desde 64rem. */
.cys-footer__interior {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--cys-space-10);
	width: 100%;
	max-width: var(--cys-container-max-width);
	margin-inline: auto;
	padding-inline: var(--cys-contenedor-relleno);
	padding-top: var(--cys-space-14);
	padding-bottom: var(--cys-space-12);
}

.cys-footer p {
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

.cys-footer__columna {
	display: flex;
	flex-direction: column;
	gap: var(--cys-space-3);
	min-width: 0;
}

.cys-footer__marca {
	display: flex;
	align-items: center;
	gap: var(--cys-space-3);
}

.cys-footer__logo {
	width: auto;
	height: var(--cys-space-12);
	flex-shrink: 0;
}

.cys-footer__razon-social {
	font-weight: var(--cys-font-weight-bold);
	color: var(--cys-color-neutro-0);
}

/* Razón social con «Laboratorio de metrología» debajo, más pequeño. */
.cys-footer__nombre {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cys-footer__descriptor {
	font-size: var(--cys-text-sm);
	line-height: var(--cys-text-sm-line-height);
	color: var(--cys-color-neutro-200);
}

.cys-footer__texto {
	max-width: var(--cys-ancho-lectura);
}

.cys-footer__dato--cifra {
	font-family: var(--cys-font-mono);
	font-variant-numeric: tabular-nums;
}

/* Contacto: cada línea lleva su ícono (teléfono, WhatsApp, correo, Instagram).
   El correo va en una sola línea: es largo y partirlo a media palabra lo
   hace ilegible (el resto del pie sí parte con overflow-wrap: anywhere). */
.cys-footer__dato--icono {
	display: flex;
	align-items: center;
	gap: var(--cys-space-2);
}

.cys-footer__dato--icono .cys-icono {
	flex-shrink: 0;
	color: var(--cys-color-neutro-0);
}

.cys-footer .cys-footer__dato--correo,
.cys-footer__dato--correo .cys-footer__enlace {
	overflow-wrap: normal;
	white-space: nowrap;
}

/* Títulos de columna en neutro-0 (antes verde claro): los distingue el
   peso, no el color. */
.cys-footer__rotulo {
	font-weight: var(--cys-font-weight-bold);
	color: var(--cys-color-neutro-0);
}

.cys-footer__menu {
	display: flex;
	flex-direction: column;
	gap: var(--cys-space-1);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cys-footer__menu li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: var(--cys-space-2);
	min-width: 0;
}

.cys-footer__codigo {
	font-family: var(--cys-font-mono);
	font-size: var(--cys-text-sm);
	line-height: var(--cys-text-sm-line-height);
	color: var(--cys-color-neutro-200);
}

/* Enlaces: neutro-0 y siempre subrayados; hover con subrayado grueso (sin
   cambiar a verde); foco neutro-0. En celular, área táctil de 44px. */
.cys-footer__enlace {
	display: inline-flex;
	align-items: center;
	min-height: var(--cys-tap-min);
	color: var(--cys-color-neutro-0);
	text-decoration: underline;
	text-underline-offset: var(--cys-space-1);
}

.cys-footer__enlace:hover {
	color: var(--cys-color-neutro-0);
	text-decoration-thickness: var(--cys-space-05);
}

.cys-footer :focus-visible {
	outline-color: var(--cys-color-neutro-0);
}

/* Franja inferior: derechos y texto de acreditación (sin sello). */
.cys-footer__franja {
	border-top: 1px solid color-mix(in srgb, var(--cys-color-neutro-0) 12%, transparent);
}

.cys-footer__franja-interior {
	display: flex;
	flex-direction: column;
	gap: var(--cys-space-3);
	max-width: var(--cys-container-max-width);
	margin-inline: auto;
	padding-inline: var(--cys-contenedor-relleno);
	padding-block: var(--cys-space-6);
}

.cys-footer__acreditacion .cys-footer__enlace {
	margin-inline-start: var(--cys-space-1);
}

/* En pantallas muy angostas el correo sí puede partirse: mejor eso que
   desbordar la página. */
@media (max-width: 24rem) {
	.cys-footer .cys-footer__dato--correo,
	.cys-footer__dato--correo .cys-footer__enlace {
		overflow-wrap: anywhere;
		white-space: normal;
	}
}

@media (min-width: 48rem) {
	.cys-footer__interior {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--cys-space-12);
		padding-top: var(--cys-space-20);
	}

	/* En escritorio el enlace vuelve al alto de su línea. */
	.cys-footer__enlace {
		min-height: 0;
	}
}

@media (min-width: 64rem) {
	.cys-footer__interior {
		/* Última columna (contacto) con el ancho de su contenido, hasta 24rem,
		   para que el correo quepa en una línea. */
		grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)) fit-content(24rem);
	}

	.cys-footer__franja-interior {
		flex-direction: row;
		justify-content: space-between;
		align-items: baseline;
		gap: var(--cys-space-8);
	}

	.cys-footer__acreditacion {
		text-align: center;
	}
}

/* Los dibujos del fondo continuo en verde, como en Nosotros del inicio
   (2026-10-20, pedido de Samuel; reemplaza los punticos): la imagen,
   colocada igual que en .cys-fondo, invertida y teñida; en modo screen el
   casi negro no aclara el gris y solo se suman los trazos. La imagen es la
   misma del fondo de las páginas: ya está en caché. Decorativa, debajo
   del contenido. */
.cys-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: var(--cys-fondo-portada-base);
	background-image: var(--cys-fondo-portada);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center bottom;
	background-attachment: fixed;
	filter: invert(1) contrast(1.8) sepia(1) hue-rotate(55deg) saturate(3);
	mix-blend-mode: screen;
	pointer-events: none;
}

@media (max-width: 63.9375rem), (hover: none) {
	.cys-footer::before {
		background-image: var(--cys-fondo-portada-movil);
		background-size: 100% auto;
		background-position: center top;
		background-repeat: repeat-y;
		background-attachment: scroll;
	}
}
