/* ==========================================================================
   Página Compañía (02_COMPANIA_ESP del Figma "MiriadLanding")
   Lienzo original: 1500 px (escala 1/3 ×3). Contenido de x=48 a x=1452.
   Se carga solo en esta plantilla; depende de las variables de main.css.
   El bloque "Somos Miriad" y las cifras viven en main.css, porque la portada
   los usa igual.
   ========================================================================== */

/* --- Portada + manifiesto: comparten la foto de fondo --------------------- */

.bloque-portada {
	position: relative;
	isolation: isolate;
}

.bloque-portada__fondo {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--c-tinta) url("../img/comp-somos-fondo.webp") center top / cover no-repeat;
}
.bloque-portada__fondo::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgb(12 12 12 / 0.72) 0%, rgb(12 12 12 / 0.55) 42%, rgb(12 12 12 / 0.94) 100%);
}

.somos--portada { padding-top: clamp(150px, 14vw, 212px); }

/* --- Título con barra y flecha -------------------------------------------
   Se repite en el manifiesto (y=717) y en los seis pilares: texto a la
   izquierda, flecha naranja al final de una línea de 711 px.
   ------------------------------------------------------------------------- */

.titulo-barra {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 711px;
	margin-bottom: 1em;
	padding-bottom: 0.55em;
	font-family: var(--f-texto);
	font-size: clamp(1.25rem, 1.88vw, 1.78rem);   /* 28.5 px */
	font-weight: 400;
	line-height: 1.33;
}
.titulo-barra svg {
	width: clamp(24px, 2.2vw, 33px);
	height: clamp(24px, 2.2vw, 33px);
	flex: 0 0 auto;
	color: var(--c-naranja);
}

/* La línea es un pseudoelemento para poder desplegarla al entrar en pantalla. */
.titulo-barra { position: relative; }
.titulo-barra::after {
	content: '';
	position: absolute;
	left: 0; bottom: 0;
	width: 100%;
	height: 1.5px;
	background: var(--c-topo);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s;
}
.titulo-barra.es-visible::after { transform: scaleX(1); }
.no-js .titulo-barra::after { transform: scaleX(1); }

/* --- Manifiesto ----------------------------------------------------------- */

.manifiesto { padding-bottom: clamp(2.5rem, 4.5vw, 4.25rem); }

.manifiesto__intro {
	max-width: 1377px;
	margin-bottom: clamp(2rem, 3.4vw, 3.2rem);
	font-family: var(--f-alt);
	font-size: clamp(0.95rem, 1.27vw, 1.2rem);   /* 19.2 px */
	line-height: 1.5;
}

/* Tarjetas macizas: en el Figma son rectángulos #35332f de 405×381, radio 7. */
.creencias {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.25rem, 4.4vw, 4.125rem);   /* 66 px */
}

.creencia {
	padding: clamp(1.25rem, 2vw, 1.94rem);   /* 31 px */
	background: var(--c-marron);
	border-radius: 7px;
	transition: background 0.3s ease, transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s ease;
}
.creencia:hover {
	background: #3f3c37;
	transform: translateY(-5px);
	box-shadow: 0 16px 34px rgb(0 0 0 / 0.4);
}

.creencia__titulo {
	margin-bottom: 0.8em;
	font-size: clamp(1rem, 1.59vw, 1.5rem);   /* 24 px */
	font-weight: 600;
	line-height: 1.2;
}

.creencia__texto {
	font-size: clamp(0.875rem, 1.27vw, 1.2rem);   /* 19.2 px */
	font-weight: 400;
	line-height: 1.45;
	color: #d8d3c9;
}

/* --- Comité de dirección --------------------------------------------------
   Bloque claro: fondo topo y tipografía en negro (Figma y=1692).
   ------------------------------------------------------------------------- */

.comite {
	padding-block: clamp(2.5rem, 4.5vw, 4.25rem);
	background: var(--c-topo);
	color: var(--c-negro);
}

.comite .titulo-seccion::after { background: var(--c-negro); }

.comite__grupo + .comite__grupo { margin-top: clamp(1.5rem, 2.4vw, 2.25rem); }

.comite__titulo {
	margin-bottom: 0.7em;
	font-size: clamp(1.05rem, 1.79vw, 1.6875rem);   /* 27 px */
	font-weight: 400;
}

.personas {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.75rem, 2.98vw, 2.8rem);
}

.persona {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 87px;
	padding: 0.75rem clamp(0.75rem, 1.6vw, 1.4rem);
	background: var(--c-blanco);
	border-radius: 7px;
	transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease;
}
.persona:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgb(0 0 0 / 0.22); }

.persona__datos { display: grid; gap: 0.15em; }

.persona__nombre {
	font-family: var(--f-alt);
	font-size: clamp(0.95rem, 1.39vw, 1.313rem);   /* 21 px */
	font-weight: 700;
	line-height: 1.2;
}

.persona__cargo {
	font-family: var(--f-alt);
	font-size: clamp(0.8rem, 1.19vw, 1.125rem);   /* 18 px */
	font-weight: 400;
	line-height: 1.25;
}

.persona__avatar {
	width: 48px;
	height: 48px;
	flex: 0 0 auto;
	color: var(--c-marron);
	transition: color 0.3s ease;
}
.persona:hover .persona__avatar { color: var(--c-naranja); }

/* --- Pilares --------------------------------------------------------------
   Bloque marrón que llega hasta el pie (Figma y=2715).
   ------------------------------------------------------------------------- */

.pilares {
	padding-block: clamp(2.5rem, 4.5vw, 4.25rem);
	background: var(--c-marron);
}

.pilares__intro {
	max-width: 1336px;
	margin-bottom: clamp(2rem, 3.3vw, 3.1rem);
	font-size: var(--fs-intro);
	line-height: 1.33;
}

.pilar + .pilar { margin-top: clamp(2.5rem, 5.3vw, 5rem); }

/* El ancla de cada pilar queda bajo la cabecera fija si no se compensa. */
.pilar { scroll-margin-top: 110px; }

.pilar__texto {
	max-width: 1392px;
	margin-bottom: 1.4em;
	font-family: var(--f-alt);
	font-size: clamp(0.9rem, 1.27vw, 1.2rem);   /* 19.2 px */
	font-weight: 400;
	line-height: 1.5;
}
.pilar__texto--ligero { font-weight: 300; }
.pilar__texto > * + * { margin-top: 1em; }

.lista-puntos { display: grid; gap: 0.4em; margin-top: 0.8em; }
.lista-puntos li { position: relative; padding-left: 1.2em; }
.lista-puntos li::before {
	content: '';
	position: absolute;
	left: 0; top: 0.6em;
	width: 6px; height: 6px;
	background: var(--c-naranja);
	border-radius: 50%;
}

.pilar__subtitulo {
	margin: 1.6em 0 1em;
	font-size: clamp(1rem, 1.4vw, 1.32rem);
	font-weight: 600;
	color: var(--c-arena);
}

/* 01 · unidades productivas
   Figma: 338×400, radio 9, foto con velo #0f0f0f (80 % la primera, 50 % el
   resto) y el rótulo centrado sobre la tarjeta. */
.unidades {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-top: clamp(1.5rem, 2.7vw, 2.5rem);
}

.unidad {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 338 / 400;
	padding: clamp(0.75rem, 1.5vw, 1.4rem);
	border-radius: var(--radio);
	overflow: hidden;
	text-align: center;
	transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.4s ease;
}
.unidad:hover { transform: translateY(-8px); box-shadow: 0 18px 38px rgb(0 0 0 / 0.45); }

.unidad__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.unidad:hover .unidad__img { transform: scale(1.07); }

.unidad::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	/* El velo va igual de oscuro en las cuatro: antes solo lo llevaba la primera
	   porque era la única con descripción, y sobre foto clara el texto de las
	   otras tres no se leería. */
	background: rgb(15 15 15 / 0.78);
	transition: background 0.4s ease;
}
.unidad:hover::before { background: rgb(15 15 15 / 0.68); }

.unidad__cuerpo { position: relative; }

.unidad__titulo {
	font-size: clamp(1rem, 2.18vw, 2.06rem);   /* 33 px */
	font-weight: 500;
	line-height: 1.1;
}

.unidad__texto {
	margin-top: 0.9em;
	font-family: var(--f-alt);
	font-size: clamp(0.8rem, 1.08vw, 1.02rem);   /* 16.3 px */
	line-height: 1.5;
}

/* El enlace hereda de .link-arrow, pensado para el pie: allí va alineado a la
   izquierda y con el cuerpo de un texto destacado, que dentro de una tarjeta de
   338 px se saldría. Aquí se centra con la tarjeta y baja a su escala. */
.unidad__enlace {
	justify-content: center;
	gap: 0.7em;
	margin-top: 1.2em;
	font-size: clamp(0.8rem, 1.08vw, 1.02rem);
}
.unidad__enlace img { width: 20px; }
.unidad__enlace:hover { color: var(--c-naranja); }

/* 02 · emplazamientos: mapa a la izquierda y rejilla de sedes a la derecha */
.emplazamientos {
	display: grid;
	grid-template-columns: minmax(0, 34%) minmax(0, 66%);
	gap: clamp(1.5rem, 3vw, 2.8rem);
	align-items: start;
	margin-top: clamp(1.5rem, 2.7vw, 2.5rem);
}

.mapa { margin: 0; }
.mapa img { width: 100%; }

.sedes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.25rem, 2.9vw, 2.7rem);
}

.sede {
	padding-top: 1rem;
	border-top: 1.5px solid var(--c-topo);
	transition: border-color 0.3s ease;
}
.sede:hover { border-color: var(--c-naranja); }

.sede__nombre {
	font-family: var(--f-alt);
	font-size: clamp(0.9rem, 1.27vw, 1.2rem);   /* 19.2 px */
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.02em;
}

.sede__dato {
	margin-top: 0.5em;
	font-size: clamp(0.8rem, 0.79vw, 0.8rem);   /* 12 px */
	font-weight: 700;
	line-height: 1.33;
}

.sede__texto {
	margin-top: 0.35em;
	font-size: clamp(0.8rem, 0.79vw, 0.8rem);
	font-weight: 400;
	line-height: 1.33;
}

/* 03 · programas de escalado
   Figma: tarjetas claras de 318×396, radio 8, con la foto a sangre abajo. */
.programas {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1rem, 2.2vw, 2.06rem);
}

.programa {
	display: flex;
	flex-direction: column;
	padding: clamp(1rem, 1.2vw, 1.13rem) clamp(0.75rem, 0.8vw, 0.75rem) 0;
	background: #d8d3c9;
	border-radius: 8px;
	overflow: hidden;
	color: var(--c-negro);
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s ease;
}
.programa:hover { transform: translateY(-5px); box-shadow: 0 16px 32px rgb(0 0 0 / 0.35); }

.programa__titulo {
	font-size: clamp(1rem, 1.6vw, 1.51rem);   /* 24.2 px */
	font-weight: 600;
	line-height: 1.16;
}

.programa__dato {
	margin-top: 0.6em;
	font-size: clamp(0.8rem, 0.74vw, 0.8rem);   /* 11.2 px */
	font-weight: 400;
	line-height: 1.36;
}

.programa__texto {
	margin-top: 0.7em;
	padding-bottom: 1rem;
	font-size: clamp(0.8rem, 0.74vw, 0.8rem);
	line-height: 1.36;
}

/* Sangra hasta los bordes de la tarjeta, compensando su padding lateral. */
.programa__img {
	width: calc(100% + 2 * clamp(0.75rem, 0.8vw, 0.75rem));
	margin: auto clamp(-0.75rem, -0.8vw, -0.75rem) 0;
	aspect-ratio: 318 / 246;
	object-fit: cover;
}

/* 04 · ecosistema */
.ecosistema {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1.25rem, 3vw, 2.8rem);
}

.eco__titulo {
	min-height: 3.4em;
	font-size: clamp(0.95rem, 1.79vw, 1.6875rem);   /* 27 px */
	font-weight: 600;
	line-height: 1.15;
}

.eco__texto {
	margin-top: 0.9em;
	padding-top: 0.9em;
	border-top: 1.5px solid var(--c-blanco);
	font-size: clamp(0.8rem, 1.27vw, 1.2rem);   /* 19.2 px */
	line-height: 1.45;
	color: var(--c-arena);
}

/* 05 · creación de empleo
   Diagrama central y tres rótulos alrededor (Figma y=6093). */
.empleo {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(1.25rem, 2.5vw, 2.4rem);
	align-items: center;
	margin-top: clamp(1.5rem, 2.7vw, 2.5rem);
}

.empleo__diagrama { width: 100%; }

.empleo__columna { display: grid; gap: clamp(1.5rem, 3.2vw, 3rem); }

.empleo__item--izquierda { text-align: right; }

.empleo__titulo {
	font-family: var(--f-alt);
	font-size: clamp(0.9rem, 1.27vw, 1.2rem);   /* 19.2 px */
	font-weight: 700;
	line-height: 1.45;
}

.empleo__texto {
	margin-top: 0.4em;
	font-size: clamp(0.8rem, 0.99vw, 0.94rem);   /* 15 px */
	line-height: 1.33;
}

/* 06 · calidad: tarjetas claras de 439×144, radio 7 */
.calidad {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.25rem, 2.5vw, 2.35rem);
}

.calidad__item {
	padding: clamp(1rem, 1.27vw, 1.19rem) clamp(1rem, 1.5vw, 1.4rem);
	background: var(--c-topo);
	border-radius: 7px;
	color: var(--c-negro);
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s ease;
}
.calidad__item:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgb(0 0 0 / 0.4); }

.calidad__titulo {
	font-size: clamp(1rem, 1.72vw, 1.625rem);   /* 26 px */
	font-weight: 600;
	line-height: 1.15;
}

.calidad__texto {
	margin-top: 0.55em;
	font-size: clamp(0.8rem, 0.99vw, 0.94rem);   /* 15 px */
	line-height: 1.27;
}

/* --- Adaptación a pantallas menores --------------------------------------- */

@media (max-width: 1100px) {
	.creencias,
	.personas,
	.unidades,
	.programas,
	.ecosistema { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.emplazamientos { grid-template-columns: 1fr; }
	.mapa { max-width: 420px; margin-inline: auto; }

	.sedes { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.eco__titulo { min-height: 0; }

	/* El diagrama pasa arriba y los tres rótulos debajo, ya sin lados. */
	.empleo {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}
	.empleo__diagrama { grid-column: 1 / -1; order: -1; max-width: 480px; margin-inline: auto; }
	.empleo__item--izquierda { text-align: left; }
	.empleo__columna { gap: clamp(1.25rem, 2.5vw, 2.4rem); }
}

@media (max-width: 700px) {
	.creencias,
	.personas,
	.unidades,
	.sedes,
	.programas,
	.ecosistema,
	.calidad { grid-template-columns: 1fr; }

	.empleo { grid-template-columns: 1fr; }
}
