/* ==========================================================================
   Block: Manifesto
   ========================================================================== */

/* Offset header (70px) + anchor menu (54px) desktop */
:root {
	--manifesto-ui-offset: 124px;
}

/* Mobile: header (70px) + anchor (36px) */
@media (max-width: 768px) {
	:root {
		--manifesto-ui-offset: 106px;
	}
}

.s4w-manifesto {
	width: 100%;
}

.s4w-manifesto__inner {
	container-type: inline-size;
	padding-top: 120px;
	padding-bottom: 120px;
	height: calc(100dvh - var(--manifesto-ui-offset));
	box-sizing: border-box;
	/* Scala base: titolo può avere fino a 4 righe * line-height 0.79 ≈ 3.16x font-size.
	   Riserviamo il 55% dell'altezza utile al titolo → base = (svh - offset) * 0.174 */
	--m-base: min(9.75cqi, calc((100dvh - var(--manifesto-ui-offset)) * 0.122));
}

.s4w-manifesto__title {
	font-family: "futura-pt-web-medium", sans-serif;
	font-weight: 400;
	font-style: normal;
	font-size: clamp(32px, var(--m-base), 189.464px);
	line-height: 0.79;
	letter-spacing: -0.06em;
	text-transform: uppercase;
	color: var(--text-main-900);
	text-align: center;
	margin: 0;
	padding: 0;
}

.s4w-manifesto__text {
	font-family: "futura-pt-web-medium", sans-serif;
	font-weight: 400;
	font-style: normal;
	font-size: clamp(20px, calc(var(--m-base) * 0.339), 64px); /* rapporto 64/189 rispetto al titolo */
	line-height: 0.96;
	letter-spacing: -0.03em;
	color: var(--text-main-900);
	text-align: center;
	margin: 0;
	padding: 0;
}

.s4w-manifesto__content-bottom {
	display: flex;
	flex-direction: column;
}

.s4w-manifesto__cta {
	margin: 0;
	padding: 0;
}

.s4w-manifesto__link {
	display: inline-flex;
	align-items: center;
	gap: 0.2em;
	font-family: "futura-pt-web-medium", sans-serif;
	font-weight: 400;
	font-style: normal;
	font-size: clamp(20px, calc(var(--m-base) * 0.339), 64px); /* rapporto 64/189 rispetto al titolo */
	line-height: 1.1;
	letter-spacing: -0.05em;
	text-transform: uppercase;
	color: var(--text-main-900);
	text-decoration: underline;
	text-decoration-color: var(--text-main-900);
	text-underline-offset: 0.1em;
	font-feature-settings: 'liga' off, 'calt' off;
}

.s4w-manifesto__link:hover {
	text-decoration: underline;
}

.s4w-manifesto__link-text {
	text-decoration: inherit;
}

.s4w-manifesto__link-icon {
	display: inline-block;
	width: 1.1em;
	height: 1.1em;
	flex-shrink: 0;
}

/* ==========================================================================
   Stile 1 — titolo left, testo+link left, spazio 450px tra titolo e testo
   ========================================================================== */
.s4w-manifesto--style-1 .s4w-manifesto__inner {
	display: flex;
	flex-direction: column;
}

.s4w-manifesto--style-1 .s4w-manifesto__title {
	text-align: left;
}

.s4w-manifesto--style-1 .s4w-manifesto__text {
	text-align: left;
}

.s4w-manifesto--style-1 .s4w-manifesto__cta {
	margin-top: 0;
}

.s4w-manifesto--style-1 .s4w-manifesto__content-bottom {
	display: flex;
	flex-direction: column;
	gap: clamp(16px, 2.5vh, 36px);
	margin-top: auto;
}

.s4w-manifesto--style-1 .s4w-manifesto__link {
	text-align: left;
	border-bottom: 1px solid var(--text-main-900);
	text-decoration: none;
}


@media (max-width: 768px) {
	.s4w-manifesto--style-1 .s4w-manifesto__content-bottom {
		gap: 24px;
	}
}

/* ==========================================================================
   Stile 2 — tutto centrato desktop, tutto sinistra mobile, spazio 640px
   ========================================================================== */
.s4w-manifesto--style-2 .s4w-manifesto__inner {
	display: flex;
	flex-direction: column;
}

.s4w-manifesto--style-2 .s4w-manifesto__content-bottom {
	display: flex;
	flex-direction: column;
	gap: clamp(16px, 2.5vh, 36px);
	align-items: center;
	margin-top: auto;
}

.s4w-manifesto--style-2 .s4w-manifesto__link {
	border-bottom: 1px solid var(--text-main-900);
	text-decoration: none;
}

@media (max-width: 768px) {
	.s4w-manifesto--style-2 .s4w-manifesto__title {
		text-align: left;
	}

	.s4w-manifesto--style-2 .s4w-manifesto__text {
		text-align: left;
	}

	.s4w-manifesto--style-2 .s4w-manifesto__content-bottom {
		align-items: flex-start;
		gap: 24px;
	}
}

/* ==========================================================================
   Stile 3 — content-bottom in alto a destra, titolo in basso con offset
   ========================================================================== */
.s4w-manifesto--style-3 .s4w-manifesto__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* Content-bottom: primo visivamente (order 1), allineato a destra */
.s4w-manifesto--style-3 .s4w-manifesto__content-bottom {
	order: 1;
	align-self: flex-end;
	width: 57.13%; /* 777px / 1360px */
	gap: clamp(16px, 2.5vh, 36px);
	align-items: flex-start;
}

/* Titolo: secondo visivamente (order 2), spazio flessibile sotto il content-bottom */
.s4w-manifesto--style-3 .s4w-manifesto__title {
	order: 2;
	text-align: left;
	width: 100%;
	margin-top: auto;
}

.s4w-manifesto--style-3 .s4w-manifesto__title-line {
	display: block;
}

.s4w-manifesto--style-3 .s4w-manifesto__title-line:nth-child(1) { padding-left: 0; }
.s4w-manifesto--style-3 .s4w-manifesto__title-line:nth-child(2) { padding-left: 1.2ch; }
.s4w-manifesto--style-3 .s4w-manifesto__title-line:nth-child(3) { padding-left: 3.6ch; }
.s4w-manifesto--style-3 .s4w-manifesto__title-line:nth-child(4) { padding-left: 8ch; }

.s4w-manifesto--style-3 .s4w-manifesto__text {
	text-align: left;
}

.s4w-manifesto--style-3 .s4w-manifesto__link {
	border-bottom: 1px solid var(--text-main-900);
	text-decoration: none;
}

@media (max-width: 768px) {
	/* Mobile: titolo in alto (order 1), content-bottom in basso (order 2) */
	.s4w-manifesto--style-3 .s4w-manifesto__title {
		order: 1;
		margin-top: 0;
		margin-bottom: 0;
	}

	.s4w-manifesto--style-3 .s4w-manifesto__title-line:nth-child(1) { font-size: 1.07em; }
	.s4w-manifesto--style-3 .s4w-manifesto__title-line:nth-child(2) { padding-left: 0; }
	.s4w-manifesto--style-3 .s4w-manifesto__title-line:nth-child(3) { padding-left: 1.1ch; font-size: 1.07em; }
	.s4w-manifesto--style-3 .s4w-manifesto__title-line:nth-child(4) { padding-left: 4.5ch; font-size: 1.07em; }

	.s4w-manifesto--style-3 .s4w-manifesto__content-bottom {
		order: 2;
		align-self: flex-start;
		width: 100%;
		gap: 24px;
		margin-top: auto;
	}
}

/* ==========================================================================
   Stile 4 — titolo con offset alternati, content-bottom in alto a destra
   ========================================================================== */
.s4w-manifesto--style-4 .s4w-manifesto__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* Content-bottom: in basso a destra */
.s4w-manifesto--style-4 .s4w-manifesto__content-bottom {
	align-self: flex-end;
	width: 57.13%; /* 777px / 1360px */
	gap: clamp(16px, 2.5vh, 36px);
	align-items: flex-start;
	margin-top: auto;
}

/* Titolo: in alto, ordine naturale del DOM */
.s4w-manifesto--style-4 .s4w-manifesto__title {
	text-align: left;
	width: 100%;
}

.s4w-manifesto--style-4 .s4w-manifesto__title-line {
	display: block;
	white-space: nowrap;
}

/* Desktop: 5 righe, riga 4+5 inline sulla stessa riga */
.s4w-manifesto--style-4 .s4w-manifesto__title-line:nth-child(1) { padding-left: 0; }
.s4w-manifesto--style-4 .s4w-manifesto__title-line:nth-child(2) { padding-left: 3.6ch; }
.s4w-manifesto--style-4 .s4w-manifesto__title-line:nth-child(3) { padding-left: 0; }
.s4w-manifesto--style-4 .s4w-manifesto__title-line:nth-child(4) { padding-left: 3.6ch; display: inline; }
.s4w-manifesto--style-4 .s4w-manifesto__title-line:nth-child(5) { display: inline; }

.s4w-manifesto--style-4 .s4w-manifesto__text {
	text-align: left;
}

.s4w-manifesto--style-4 .s4w-manifesto__link {
	border-bottom: 1px solid var(--text-main-900);
	text-decoration: none;
}

@media (max-width: 768px) {
	.s4w-manifesto--style-4 .s4w-manifesto__content-bottom {
		align-self: flex-start;
		width: 100%;
		gap: 24px;
	}

	/* Mobile: 5 righe separate con offset da Figma */
	.s4w-manifesto--style-4 .s4w-manifesto__title-line { white-space: normal; display: block; }
	.s4w-manifesto--style-4 .s4w-manifesto__title-line:nth-child(1) { padding-left: 0; }
	.s4w-manifesto--style-4 .s4w-manifesto__title-line:nth-child(2) { padding-left: 2.16ch; }
	.s4w-manifesto--style-4 .s4w-manifesto__title-line:nth-child(3) { padding-left: 0; }
	.s4w-manifesto--style-4 .s4w-manifesto__title-line:nth-child(4) { padding-left: 0; }
	.s4w-manifesto--style-4 .s4w-manifesto__title-line:nth-child(5) { padding-left: 0.65ch; }
}

/* ==========================================================================
   Responsive — Mobile (max 768px)
   ========================================================================== */
@media (max-width: 768px) {
	.s4w-manifesto__inner {
		padding-top: 80px;
		padding-bottom: 80px;
		height: calc(100dvh - var(--manifesto-ui-offset));
	}

	.s4w-manifesto__title {
		font-size: clamp(36px, 17cqi, 189.464px); /* ~64px su container 378px mobile */
		white-space: normal;
		word-break: break-word;
		overflow-wrap: break-word;
		hyphens: auto;
	}

	.s4w-manifesto__text br {
		display: none;
	}
}
