/* ==========================================================
   Pàgines interiors (Qui som, Valors, Matèries): capçalera terracota amb etiqueta, títol i
   text (opcionalment amb foto) i introducció (template-parts/intro.php)
   ========================================================== */

.page-head {
	position: relative;
	overflow: hidden;
	background: var(--terracota);
	color: var(--ivori);
	padding: clamp(56px, 9vw, 110px) 0 clamp(56px, 8vw, 96px);
}

/* Arc decoratiu, el mateix motiu que la franja de xifres */
.page-head::after {
	content: "";
	position: absolute;
	right: -80px;
	bottom: -300px;
	width: 520px;
	height: 640px;
	border: 1px solid rgba(233, 227, 217, .12);
	border-radius: 999px 999px 0 0;
	pointer-events: none;
}

.page-head .wrap {
	position: relative;
}

.page-head__title {
	max-width: 20ch;
	font-size: clamp(2.4rem, 5vw, 4rem);
	color: var(--ivori);
	margin-bottom: 1.75rem;
}

.page-head__text {
	max-width: 56ch;
	font-size: 1.1rem;
	line-height: 1.7;
	opacity: .9;
}

.page-head__text p + p {
	margin-top: 1em;
}

/* ---------- Baixa (textos legals): menys alçada i títol més petit ---------- */
.page-head--compact {
	padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 56px);
}

.page-head--compact .page-head__title {
	max-width: 26ch;
	font-size: clamp(2rem, 4vw, 3rem);
	margin-bottom: 1rem;
}

.page-head__meta {
	font-size: .85rem;
	opacity: .75;
}

/* ---------- Amb foto: ocupa la meitat dreta i es fon amb el terracota per l'esquerra ---------- */
.page-head--image::after {
	display: none;
}

.page-head__media {
	position: absolute;
	inset: 0 0 0 auto;
	width: 55%;
}

.page-head__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.page-head__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, var(--terracota) 0%, rgba(101, 42, 31, .75) 35%, rgba(101, 42, 31, .25) 100%);
}

.page-head--image .page-head__title,
.page-head--image .page-head__text {
	max-width: min(46ch, 50%);
}

.page-head--image .page-head__title {
	max-width: min(18ch, 50%);
}

/* Mòbil i tauleta: la foto passa a fons de tota la capçalera, molt enfosquida */
@media (max-width: 900px) {
	.page-head__media {
		width: 100%;
	}

	.page-head__media::after {
		background: rgba(101, 42, 31, .82);
	}

	.page-head--image .page-head__title,
	.page-head--image .page-head__text {
		max-width: none;
	}
}

/* ---------- Introducció: el primer paràgraf a l'esquerra, més gran i amb la tipografia dels
   títols; la resta a la dreta, en una segona fila (en esglaó) ---------- */
.intro {
	padding: clamp(64px, 9vw, 104px) 0 0;
}

.intro__grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: clamp(24px, 3vw, 40px) clamp(40px, 6vw, 96px);
}

.intro__lead {
	font-family: var(--font-titol);
	font-size: clamp(1.35rem, 2.2vw, 1.75rem);
	line-height: 1.45;
	color: var(--terracota);
}

.intro__text {
	grid-column: 2;
	grid-row: 2;
	max-width: 46ch;
	font-size: 1.05rem;
	line-height: 1.75;
	color: rgba(34, 34, 34, .8);
}

.intro__text p + p {
	margin-top: 1em;
}

@media (max-width: 900px) {
	.intro__grid {
		grid-template-columns: 1fr;
	}

	.intro__text {
		grid-column: 1;
	}
}
