/* ==========================================================================
   Ferrari Sistemi – "immersive" pages (design experiment B)
   Big type, one idea per section, motion driven by assets/js/immersive.js.
   Without JavaScript (or with reduced motion) every element is simply shown.
   ========================================================================== */

.fs-immersive {
	--bx-display: clamp(2.6rem, 7vw, 6.2rem);
	--bx-title: clamp(1.9rem, 3.4vw, 3rem);
	--bx-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--bx-dim: #4a5258;
}

.fs-immersive .fs-section {
	padding-block: clamp(5rem, 11vw, 9rem);
}

/* Big headings never split a word: balanced lines, and on phones the sizes below keep
   even the longest German words (e.g. "Werkstattgeschichte") whole. */
.fs-bx-title,
.fs-bx-display,
.fs-expand__title,
.fs-biglist li,
.fs-chapter__title,
.fs-bx-scrub,
.fs-timeline__mark,
.fs-timeline__title,
.fs-trio__title {
	-webkit-hyphens: manual;
	hyphens: manual;
	overflow-wrap: normal;
	word-break: normal;
	text-wrap: balance;
}

.fs-bx-eyebrow {
	margin-bottom: 1.25rem;
	font-family: var(--fs-font-heading);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--fs-lime-ink);
}

.fs-section--dark .fs-bx-eyebrow {
	color: var(--fs-lime);
}

.fs-bx-title {
	max-width: 24ch;
	margin: 0 auto clamp(2.25rem, 4.5vw, 3.5rem);
	font-size: var(--bx-title);
	line-height: 1.08;
	letter-spacing: -0.025em;
	text-align: center;
}

.fs-bx-lead {
	max-width: 640px;
	margin: 1.75rem auto 0;
	font-size: clamp(1.1rem, 1.6vw, 1.35rem);
	line-height: 1.55;
	color: var(--fs-on-dark-muted);
	text-align: center;
}

.fs-bx-lead--dark {
	margin: -1.5rem auto 3rem;
	color: var(--fs-muted);
}

/* --------------------------------------------------------------------------
   Opening statement
   -------------------------------------------------------------------------- */
.fs-bx-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: calc(100svh - var(--fs-header-h) - 38px);
	overflow: hidden;
	text-align: center;
	background:
		radial-gradient(60% 55% at 50% 40%, rgba(132, 215, 73, 0.09), transparent 70%),
		var(--fs-anthracite);
}

.fs-bx-hero::before {
	content: "";
	position: absolute;
	right: -6%;
	bottom: -12%;
	width: min(52vw, 640px);
	aspect-ratio: 600 / 522;
	background: url("../images/monogramma-negativo.png") center / contain no-repeat;
	opacity: 0.05;
	pointer-events: none;
}

.fs-bx-hero::after {
	content: "";
	position: absolute;
	bottom: 2.2rem;
	left: 50%;
	width: 2px;
	height: 3.2rem;
	background: linear-gradient(var(--fs-lime), transparent);
	transform: translateX(-50%);
	animation: bx-cue 2.4s ease-in-out infinite;
}

@keyframes bx-cue {
	0%, 100% { opacity: 0.2; transform: translate(-50%, -6px); }
	50% { opacity: 1; transform: translate(-50%, 6px); }
}

.fs-bx-hero .fs-container {
	position: relative;
}

/* The opening is a core/cover block: a photo or video added in the editor runs behind the
   statement, under the same dark veil and watermark. Without media it is the plain dark band. */
.fs-bx-hero.wp-block-cover {
	justify-content: center;
	padding-inline: 0;
	color: var(--fs-on-dark);
}

.fs-bx-hero .wp-block-cover__image-background,
.fs-bx-hero .wp-block-cover__video-background {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fs-bx-hero .wp-block-cover__image-background {
	animation: fs-hero-drift 28s ease-in-out infinite alternate;
	transform-origin: 60% 40%;
}

.fs-bx-hero .wp-block-cover__background {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		radial-gradient(60% 55% at 50% 40%, rgba(132, 215, 73, 0.09), transparent 70%),
		var(--fs-anthracite) !important;
	opacity: 1 !important;
}

.fs-bx-hero:has(.wp-block-cover__image-background, .wp-block-cover__video-background) .wp-block-cover__background {
	opacity: 0.62 !important;
}

.fs-bx-hero::before {
	z-index: 2;
}

.fs-bx-hero::after {
	z-index: 3;
	display: block;
	min-height: 0;
	font-size: 0;
}

.fs-bx-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 3;
	width: 100%;
	color: inherit;
}

.fs-bx-display {
	max-width: 16ch;
	margin: 0 auto;
	font-size: var(--bx-display);
	line-height: 1.02;
	letter-spacing: -0.035em;
	color: var(--fs-white);
}

/* Word-by-word entrance of the opening statement */
.fs-fx .fs-fx-words .fs-w {
	display: inline-block;
	opacity: 0;
	transform: translateY(0.35em);
	filter: blur(6px);
	animation: bx-word 0.9s var(--bx-ease) forwards;
	animation-delay: calc(var(--i) * 70ms + 150ms);
}

@keyframes bx-word {
	to { opacity: 1; transform: none; filter: none; }
}

/* --------------------------------------------------------------------------
   Reveal on scroll (applied by JS)
   -------------------------------------------------------------------------- */
.fs-fx .fx-reveal {
	opacity: 0;
	transform: translateY(32px);
	transition: opacity 0.9s var(--bx-ease), transform 0.9s var(--bx-ease);
	transition-delay: var(--fx-delay, 0ms);
}

.fs-fx .fx-reveal.is-in {
	opacity: 1;
	transform: none;
}

/* --------------------------------------------------------------------------
   Timeline (story)
   -------------------------------------------------------------------------- */
.fs-timeline {
	--p: 0;
	/* Shared measures: the line, the dots and the year all line up from these. */
	--tl-pad: clamp(2.5rem, 6vw, 4.5rem);
	--tl-line-x: 0.65rem;
	--tl-dot: 1.1rem;
	--tl-mark: clamp(2.4rem, 5.5vw, 4rem);
	position: relative;
	max-width: 860px;
	margin: 0 auto;
	padding-left: var(--tl-pad);
}

.fs-timeline::before,
.fs-timeline::after {
	content: "";
	position: absolute;
	top: calc(var(--tl-mark) / 2);
	bottom: 0.6rem;
	left: calc(var(--tl-line-x) - 1.5px);
	width: 3px;
	border-radius: 3px;
}

.fs-timeline::before {
	background: var(--fs-border);
}

.fs-timeline::after {
	bottom: auto;
	height: calc((100% - var(--tl-mark) / 2 - 0.6rem) * var(--p));
	background: linear-gradient(var(--fs-lime), var(--fs-lime-ink));
	transition: height 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.fs-timeline__item {
	position: relative;
	padding-bottom: clamp(3rem, 7vw, 5rem);
}

.fs-fx .fs-timeline__item.fx-reveal {
	transform: translateY(14px);
	transition-delay: 0ms !important;
}

.fs-fx .fs-timeline__item.fx-reveal.is-in {
	transform: none;
}

.fs-timeline__item:last-child {
	padding-bottom: 0;
}

.fs-timeline__item::before {
	content: "";
	position: absolute;
	z-index: 1;
	top: calc(var(--tl-mark) / 2 - var(--tl-dot) / 2);
	left: calc(var(--tl-line-x) - var(--tl-pad) - var(--tl-dot) / 2);
	box-sizing: border-box;
	width: var(--tl-dot);
	height: var(--tl-dot);
	background: var(--fs-white);
	border: 3px solid var(--fs-lime-ink);
	border-radius: 50%;
	transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.fs-fx .fs-timeline__item::before {
	border-color: var(--fs-border-strong);
}

.fs-fx .fs-timeline__item.is-lit::before {
	border-color: var(--fs-lime-ink);
	background: var(--fs-lime);
	box-shadow: 0 0 0 5px var(--fs-lime-tint);
}

.fs-timeline__mark {
	margin-bottom: 0.35rem;
	font-family: var(--fs-font-heading);
	font-size: var(--tl-mark);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--fs-lime-ink);
}

.fs-timeline__title {
	font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.fs-timeline__text {
	max-width: 560px;
	font-size: 1.08rem;
	color: var(--fs-muted);
}

/* --------------------------------------------------------------------------
   Workshop photo that opens up while scrolling
   -------------------------------------------------------------------------- */
.fs-expand {
	--p: 0;
	position: relative;
	display: grid;
	height: 190vh;
	background: var(--fs-white);
}

.fs-expand > * {
	grid-area: 1 / 1;
	align-self: start;
	position: sticky;
	top: var(--fs-header-h);
	height: calc(100svh - var(--fs-header-h));
	margin: 0;
}

.fs-expand .fs-expand__media {
	overflow: hidden;
	clip-path: inset(calc((1 - var(--p)) * 14%) calc((1 - var(--p)) * 18%) round calc((1 - var(--p)) * 28px));
	transition: clip-path 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* The "AI-generated" label follows the clip, so it stays visible while the photo opens up. */
.fs-expand .fs-expand__media .fs-ai-label {
	right: calc((1 - var(--p, 1)) * 18% + 0.6rem);
	bottom: calc((1 - var(--p, 1)) * 14% + 0.6rem);
}

.fs-expand .fs-expand__media img,
.fs-expand .fs-expand__media video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(calc(1.18 - var(--p) * 0.18));
	transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.fs-expand__title {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 1rem;
	font-size: clamp(2.4rem, 5.5vw, 4.6rem);
	line-height: 1;
	letter-spacing: -0.035em;
	text-align: center;
	color: var(--fs-white);
	text-shadow: 0 6px 40px rgba(0, 0, 0, 0.55);
	opacity: clamp(0, calc(var(--p) * 2.2 - 0.6), 1);
	pointer-events: none;
}

.fs-expand::after {
	content: "";
	grid-area: 1 / 1;
	position: sticky;
	top: var(--fs-header-h);
	height: calc(100svh - var(--fs-header-h));
	background: rgba(29, 34, 38, calc(var(--p) * 0.45));
	pointer-events: none;
	z-index: 0;
}

.fs-expand__title {
	z-index: 1;
}

/* Drone video scrubbed by the scroll (class added by immersive.js). Longer stage so the flight from
   the sign to the whole building is not rushed; --t (0→1) brings in the title at the end of the flight. */
.fs-expand.fs-expand--video {
	--t: 0;
	height: 280vh;
}

.fs-expand--video::after {
	content: none;
}

.fs-expand--video .fs-expand__media {
	background: var(--fs-anthracite);
}

/* Soft shade over the foggy sky only, so the white title reads while the building stays bright. */
.fs-expand--video .fs-expand__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(29, 34, 38, 0.62) 0%, rgba(29, 34, 38, 0.22) 38%, rgba(29, 34, 38, 0) 60%);
	opacity: var(--t);
	pointer-events: none;
}

.fs-expand--video .fs-expand__title {
	align-items: flex-start;
	padding-top: clamp(2.5rem, 9vh, 6.5rem);
	opacity: var(--t);
	transform: translateY(calc((1 - var(--t)) * 1.25rem));
}

/* Phones held upright: a 16:9 frame filling the screen would keep only a narrow slice of it, so the
   video becomes a full-width 4:3 window (its own 4:3 file) with the title below it. */
@media (max-aspect-ratio: 1/1) {
	.fs-expand.fs-expand--video {
		height: 220vh;
	}

	.fs-expand--video .fs-expand__media {
		top: calc(var(--fs-header-h) + (100svh - var(--fs-header-h) - 75vw) / 2 - 2.5rem);
		height: 75vw;
	}

	.fs-expand--video .fs-expand__media::after {
		content: none;
	}

	.fs-expand--video .fs-expand__title {
		align-items: flex-start;
		padding-top: calc((100svh - var(--fs-header-h)) / 2 + 37.5vw - 1rem);
		font-size: clamp(2rem, 9vw, 3rem);
		color: var(--fs-anthracite);
		text-shadow: none;
	}
}

/* --------------------------------------------------------------------------
   Capabilities: big words that light up one by one
   -------------------------------------------------------------------------- */
.fs-bx-capabilities {
	text-align: center;
}

.fs-bx-intro {
	max-width: 720px;
	margin: 0 auto clamp(3rem, 6vw, 4.5rem);
	font-size: clamp(1.15rem, 1.8vw, 1.45rem);
	line-height: 1.55;
	color: var(--fs-muted);
	text-align: center;
	text-wrap: balance;
}

.fs-biglist {
	margin: 0 auto clamp(4rem, 8vw, 6rem);
	padding: 0;
	list-style: none;
}

.fs-biglist li {
	margin: 0;
	padding: 0.12em 0;
	font-family: var(--fs-font-heading);
	font-size: clamp(1.9rem, 5vw, 4rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.03em;
	color: var(--fs-heading);
	transition: color 0.5s ease, opacity 0.5s ease;
}

.fs-fx .fs-biglist li {
	color: var(--fs-border-strong);
}

.fs-fx .fs-biglist li.is-lit {
	color: var(--fs-heading);
}

.fs-fx .fs-biglist li.is-lit:last-child {
	color: var(--fs-lime-ink);
}

.fs-trio {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.5rem, 4vw, 3rem);
	max-width: 1040px;
	margin: 0 auto;
	padding-top: clamp(3rem, 6vw, 4rem);
	border-top: 1px solid var(--fs-border);
	text-align: left;
}

.fs-trio__title {
	margin-bottom: 0.4rem;
	font-size: clamp(1.6rem, 2.8vw, 2.2rem);
	letter-spacing: -0.02em;
	color: var(--fs-lime-ink);
}

.fs-trio__text {
	margin: 0;
	font-size: 1.05rem;
	color: var(--fs-muted);
}

/* --------------------------------------------------------------------------
   People
   -------------------------------------------------------------------------- */
.fs-bx-people {
	background: var(--fs-surface);
}

.fs-section .fs-bx-photo {
	margin: 0;
	border-radius: 28px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(29, 34, 38, 0.18);
}

.fs-section .fs-bx-photo img {
	width: 100%;
	aspect-ratio: 16 / 8;
	object-fit: cover;
}

/* --------------------------------------------------------------------------
   Manifesto: words light up as you scroll
   -------------------------------------------------------------------------- */
.fs-bx-manifesto {
	text-align: center;
}

.fs-bx-scrub {
	max-width: 22ch;
	margin: 0 auto;
	font-family: var(--fs-font-heading);
	font-size: clamp(2rem, 4.6vw, 3.8rem);
	font-weight: 800;
	line-height: 1.16;
	letter-spacing: -0.025em;
	color: var(--fs-white);
}

.fs-fx .fs-bx-scrub .fs-w {
	color: var(--bx-dim);
	transition: color 0.35s ease;
}

.fs-fx .fs-bx-scrub .fs-w.is-lit {
	color: var(--fs-white);
}

/* --------------------------------------------------------------------------
   Journey: sticky picture, chapters scrolling beside it
   -------------------------------------------------------------------------- */
.fs-journey {
	/* Panel size follows both the window height and the column width, so the illustration is
	   never cropped (half-screen windows, small laptops, big monitors). */
	--jh: min(calc(100svh - var(--fs-header-h) - 7rem), 640px, 45vw);
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: start;
}

.fs-journey__visual {
	position: sticky;
	/* Vertically centred in the space below the header. */
	top: calc(var(--fs-header-h) + (100svh - var(--fs-header-h) - var(--jh)) / 2);
	height: var(--jh);
	border-radius: 28px;
	overflow: hidden;
	background: radial-gradient(75% 75% at 50% 42%, #263036, var(--fs-anthracite));
	box-shadow: 0 30px 80px rgba(29, 34, 38, 0.2);
}

.fs-journey__visual .fs-journey__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	opacity: 0;
	transform: scale(1.06);
	transition: opacity 0.8s ease, transform 1.2s var(--bx-ease);
}

.fs-journey__visual .fs-journey__img:first-child,
.fs-journey__visual .fs-journey__img.is-active {
	opacity: 1;
	transform: none;
}

.fs-fx .fs-journey__visual .fs-journey__img:first-child:not(.is-active) {
	opacity: 0;
}

.fs-journey__visual .fs-journey__img img,
.fs-chapter__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Copy of the chapter's picture, shown above the text when the layout is a single column. */
.fs-chapter__media {
	display: none;
}

/* Where you are in the story: a small "02 / 05" counter in the free top-left corner of every
   illustration, and a thin progress bar along the bottom edge. Neither covers the drawings. */
.fs-journey__visual::before {
	content: attr(data-step);
	position: absolute;
	top: 1.25rem;
	left: 1.25rem;
	z-index: 2;
	padding: 0.45rem 0.8rem;
	font-family: var(--fs-font-heading);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1;
	color: var(--fs-lime);
	background: rgba(21, 25, 28, 0.72);
	border: 1px solid rgba(132, 215, 73, 0.35);
	border-radius: 999px;
	backdrop-filter: blur(6px);
	font-variant-numeric: tabular-nums;
}

.fs-journey__visual::after {
	content: "";
	position: absolute;
	right: 1.5rem;
	bottom: 1.25rem;
	left: 1.5rem;
	z-index: 2;
	height: 4px;
	border-radius: 4px;
	background:
		linear-gradient(var(--fs-lime), var(--fs-lime)) 0 0 / calc(var(--journey-p, 0.2) * 100%) 100% no-repeat,
		rgba(243, 245, 242, 0.16);
	transition: background-size 0.6s var(--bx-ease);
}

.fs-chapter {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: var(--jh);
	padding: 2rem 0;
	transition: opacity 0.5s ease;
}

.fs-fx .fs-chapter {
	opacity: 0.28;
}

.fs-fx .fs-chapter.is-active {
	opacity: 1;
}

.fs-chapter__label {
	margin-bottom: 0.75rem;
	font-family: var(--fs-font-heading);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--fs-lime-ink);
}

.fs-chapter__title {
	margin-bottom: 1.5rem;
	font-size: clamp(2rem, 3.6vw, 3rem);
	line-height: 1.08;
	letter-spacing: -0.025em;
}

.fs-chapter .fs-checklist li {
	font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Numbers
   -------------------------------------------------------------------------- */
.fs-counts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2rem;
	text-align: center;
}

.fs-count {
	margin: 0;
	font-family: var(--fs-font-heading);
	font-size: clamp(3.4rem, 8vw, 6rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--fs-lime);
	font-variant-numeric: tabular-nums;
}

.fs-count__label {
	max-width: 220px;
	margin: 0.75rem auto 0;
	font-size: 1.02rem;
	color: var(--fs-on-dark-muted);
}

/* Separate dark bands that follow each other on Servizi and Pipeline */
.fs-bx-numbers + .fs-bx-manifesto,
.fs-bx-manifesto + .fs-cta {
	border-top: 1px solid var(--fs-anthracite-700);
}

/* --------------------------------------------------------------------------
   Contatti (version B): big tappable contact lines, three steps, the map
   -------------------------------------------------------------------------- */

/* On the contact page the opening is compact, so phone and email are visible without scrolling. */
.fs-immersive .fs-bx-hero:has(+ .fs-bx-contact) {
	--bx-display: clamp(2rem, 4.4vw, 3.6rem);
	min-height: 0;
	padding-block: clamp(2.25rem, 4.5vw, 3.75rem);
}

.fs-bx-hero:has(+ .fs-bx-contact) .fs-bx-display {
	max-width: 22ch;
}

.fs-bx-hero:has(+ .fs-bx-contact)::after {
	display: none;
}

.fs-bx-hero:has(+ .fs-bx-contact) .fs-bx-lead {
	margin-top: 1.1rem;
	font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.fs-immersive .fs-bx-contact {
	padding-block: clamp(1.75rem, 3.5vw, 3rem) clamp(3rem, 6vw, 5rem);
}

.fs-immersive .fs-contact {
	max-width: 1100px;
}

.fs-immersive .fs-contact__grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 clamp(2rem, 5vw, 4rem);
	margin: 0;
	border-top: 1px solid var(--fs-border);
}

.fs-immersive .fs-contact__item {
	position: relative;
	gap: 0.6rem;
	padding: clamp(1.75rem, 3.5vw, 2.5rem) 0;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--fs-border);
	border-radius: 0;
	box-shadow: none;
}

.fs-immersive .fs-contact__icon {
	display: none;
}

.fs-immersive .fs-contact__label {
	font-size: 0.82rem;
	letter-spacing: 0.16em;
	color: var(--fs-lime-ink);
}

.fs-immersive .fs-contact__value {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: clamp(1.6rem, 3.4vw, 2.7rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: var(--fs-heading);
	overflow-wrap: normal;
	transition: color var(--fs-ease);
}

.fs-immersive .fs-contact__value::after {
	content: "→";
	font-size: 0.7em;
	color: var(--fs-lime-ink);
	opacity: 0;
	transform: translateX(-8px);
	transition: opacity var(--fs-ease), transform var(--fs-ease);
}

.fs-immersive .fs-contact__value:hover {
	color: var(--fs-lime-ink);
}

.fs-immersive .fs-contact__value:hover::after {
	opacity: 1;
	transform: none;
}

/* Address: secondary to phone and email, centred on a row of its own. */
.fs-immersive .fs-contact__item:nth-child(n + 3) .fs-contact__value {
	font-size: clamp(1.15rem, 1.8vw, 1.45rem);
	font-weight: 700;
	letter-spacing: -0.01em;
}

.fs-immersive .fs-contact__item:last-child:nth-child(odd) {
	grid-column: 1 / -1;
	align-items: center;
	text-align: center;
}

.fs-immersive .fs-contact__hours {
	justify-content: center;
	gap: 0.75rem;
	margin-top: 2rem;
	padding: 0;
	background: none;
	border: 0;
	text-align: center;
	color: var(--fs-muted);
}

.fs-immersive .fs-contact__hours .fs-contact__icon {
	display: grid;
	width: auto;
	height: auto;
	color: var(--fs-lime-ink);
	background: none;
}

.fs-immersive .fs-contact__hours strong {
	display: inline;
	margin-right: 0.5rem;
}

.fs-bx-howto {
	background: var(--fs-surface);
}

.fs-trio--steps {
	border-top: 0;
	padding-top: 0;
}

.fs-trio--steps .fs-trio__title {
	color: var(--fs-heading);
}

.fs-immersive .fs-bx-map {
	padding-top: clamp(4rem, 8vw, 6rem);
}

.fs-immersive .fs-map {
	max-width: 1100px;
	margin-top: 0;
}

.fs-immersive .fs-map__title {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	letter-spacing: -0.02em;
}

.fs-immersive .fs-map__frame {
	height: clamp(340px, 42vw, 540px);
	border-radius: 28px;
}

@media (max-width: 700px) {
	.fs-immersive .fs-contact__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.fs-immersive .fs-contact__value {
		font-size: clamp(1.3rem, 6.2vw, 1.8rem);
	}

	.fs-immersive .fs-contact__item:nth-child(n + 3) .fs-contact__value {
		font-size: clamp(1.05rem, 4.6vw, 1.25rem);
	}

	.fs-immersive .fs-contact__item {
		padding-block: 1.15rem;
	}

	.fs-immersive .fs-bx-contact {
		padding-top: 1.25rem;
	}

	.fs-immersive .fs-contact__hours {
		flex-direction: column;
	}
}

/* --------------------------------------------------------------------------
   Openings: home (with buttons) and compact (catalogue)
   -------------------------------------------------------------------------- */
.fs-bx-hero .wp-block-buttons,
.fs-bx-manifesto .wp-block-buttons {
	justify-content: center;
	margin-top: 2.25rem;
}

.fs-immersive .fs-bx-hero--compact {
	--bx-display: clamp(2.2rem, 4.8vw, 4rem);
	min-height: 0;
	padding-block: clamp(2.5rem, 5vw, 4.25rem);
}

.fs-bx-hero--compact::after {
	display: none;
}

.fs-bx-hero--compact .fs-bx-display {
	max-width: 22ch;
}

/* --------------------------------------------------------------------------
   Home: the two divisions as yin and yang
   Light Alimentare, dark Pipeline. The seam is a thin lime line that, halfway down, draws a tall,
   soft S like a stroke of a fine pen (no necks, oval bellies, slanted spine: chosen by the owner
   over the logo's geometric S, which looked like two puzzle pieces), so the dark half reaches into
   the upper counter of the S and the light half into the lower one. The line draws itself once the halves have met and glows softly
   while a half is hovered. The split position is a registered property so it can glide: the dark
   half sweeps in on load, and the hovered half grows while the other one steps back. On phones the
   halves stack and the same line runs across, turned on its side.
   -------------------------------------------------------------------------- */
.fs-yy {
	--yy-shift: 5%;
	--yy-dur: 1s;
	--yy-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--yy-u: clamp(30px, 3.3vw, 54px);
	--yy-line: 2.5px;
	--yy-far: clamp(1.5rem, 5vw, 5rem);
	--yy-near: calc(var(--yy-u) * var(--yy-reach) + var(--yy-shift) + 1.5rem);
	/* Geometry of the S box, in modules: width, height, x of the top and bottom tails, reach from the centre. */
	--yy-bw: 3.6;
	--yy-bh: 12;
	--yy-xt: 2.6;
	--yy-xb: 1;
	--yy-reach: 1.1;
	--yy-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3.6 12'%3E%3Cpath d='M2.6 0C2.6 2.6 .7 2.4 .7 4.4C.7 5.5 1.2 5.6 1.8 6C2.4 6.4 2.9 6.5 2.9 7.6C2.9 9.6 1 9.4 1 12H3.6V0Z' fill='%231d2226'/%3E%3C/svg%3E");
	--yy-stroke: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3.6 12'%3E%3Cpath d='M2.6 0C2.6 2.6 .7 2.4 .7 4.4C.7 5.5 1.2 5.6 1.8 6C2.4 6.4 2.9 6.5 2.9 7.6C2.9 9.6 1 9.4 1 12' fill='none' stroke='%2384d749' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
	--yy-mob: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 3.6'%3E%3Cpath d='M0 2.6C2.6 2.6 2.4 0.7 4.4 0.7C5.5 0.7 5.6 1.2 6 1.8C6.4 2.4 6.5 2.9 7.6 2.9C9.6 2.9 9.4 1 12 1V3.6H0Z' fill='%231d2226'/%3E%3Cpath d='M0 2.6C2.6 2.6 2.4 0.7 4.4 0.7C5.5 0.7 5.6 1.2 6 1.8C6.4 2.4 6.5 2.9 7.6 2.9C9.6 2.9 9.4 1 12 1' fill='none' stroke='%2384d749' stroke-width='2.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: auto 1fr;
	min-height: calc(100svh - var(--fs-header-h) - 38px);
	overflow: hidden;
	background: var(--fs-surface);
}

.fs-immersive .fs-yy {
	padding-block: 0;
}

/* The dark half: the S box in the middle (dark to the right of the line), dark to the right of
   the top tail above it and of the bottom tail below it, and dark beyond the box at every height.
   Each layer covers only its own band, so no dark ever reaches into a belly of the S on the light side.
   Both pseudo-elements have width: 100% so percentage translate3d() shifts by % of the section on the GPU
   with sub-pixel precision instead of snapping layout left/right in 1px steps. */
.fs-yy::before,
.fs-yy::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(50% - var(--yy-u) * var(--yy-bw) / 2);
	width: 100%;
	z-index: -1;
	pointer-events: none;
	transform: translate3d(0, 0, 0);
	backface-visibility: hidden;
	will-change: transform;
	transition: transform var(--yy-dur) var(--yy-ease);
}

.fs-yy::before {
	background:
		var(--yy-dark) left center / calc(var(--yy-u) * var(--yy-bw)) calc(var(--yy-u) * var(--yy-bh)) no-repeat,
		linear-gradient(90deg, transparent calc(var(--yy-u) * var(--yy-xt)), var(--fs-anthracite) 0) left top / 100% calc(50% - var(--yy-u) * var(--yy-bh) / 2 + 1px) no-repeat,
		linear-gradient(90deg, transparent calc(var(--yy-u) * var(--yy-xb)), var(--fs-anthracite) 0) left bottom / 100% calc(50% - var(--yy-u) * var(--yy-bh) / 2 + 1px) no-repeat,
		linear-gradient(90deg, transparent calc(var(--yy-u) * var(--yy-bw) - 1px), var(--fs-anthracite) 0);
}

/* The lime line on top of the seam: tail, S, tail. Same layer as the dark half (painted after it),
   so the title and the content stay above the line. */
.fs-yy::after {
	background:
		var(--yy-stroke) left center / calc(var(--yy-u) * var(--yy-bw)) calc(var(--yy-u) * var(--yy-bh)) no-repeat,
		linear-gradient(90deg, transparent calc(var(--yy-u) * var(--yy-xt) - var(--yy-line) / 2), var(--fs-lime) 0 calc(var(--yy-u) * var(--yy-xt) + var(--yy-line) / 2), transparent 0) left top / calc(var(--yy-u) * var(--yy-bw)) calc(50% - var(--yy-u) * var(--yy-bh) / 2 + 1px) no-repeat,
		linear-gradient(90deg, transparent calc(var(--yy-u) * var(--yy-xb) - var(--yy-line) / 2), var(--fs-lime) 0 calc(var(--yy-u) * var(--yy-xb) + var(--yy-line) / 2), transparent 0) left bottom / calc(var(--yy-u) * var(--yy-bw)) calc(50% - var(--yy-u) * var(--yy-bh) / 2 + 1px) no-repeat;
	filter: drop-shadow(0 0 4px rgb(186 248 2 / 0.35));
}

/* The title straddles the split: the difference blend turns it dark on light and light on dark. */
.fs-yy .fs-yy__title {
	grid-column: 1 / -1;
	justify-self: center;
	margin: clamp(2rem, 4vw, 3rem) 0 0;
	padding-inline: var(--fs-gutter);
	font-size: clamp(0.85rem, 1.1vw, 1rem);
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-align: center;
	text-transform: uppercase;
	color: var(--fs-white);
	mix-blend-mode: difference;
}

.fs-yy__half {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
	padding-block: clamp(2rem, 5vh, 3.5rem) clamp(3rem, 8vh, 5rem);
	text-align: center;
}

.fs-yy__half > :not(.fs-yy__bg) {
	position: relative;
	transform: translate3d(0, 0, 0);
	backface-visibility: hidden;
	will-change: transform, opacity;
	transition: opacity var(--yy-dur) var(--yy-ease), transform var(--yy-dur) var(--yy-ease);
}

/* The photo of each half, whole and uncropped, standing on the bottom edge and fading upwards
   into the background. It is placed against the section (the halves are not positioned) with a
   fixed layout box so its mask is never re-rasterized; the img glides via GPU transform so it
   follows the split and never crosses the S, while the "AI-generated" label stays crisp. */
.fs-yy .fs-yy__bg {
	position: absolute;
	bottom: 0;
	z-index: -2;
	margin: 0;
	pointer-events: none;
}

.fs-yy__half--food .fs-yy__bg {
	left: 0;
	right: calc(50% + var(--yy-u) * var(--yy-reach) + 1rem);
}

.fs-yy__half--pipeline .fs-yy__bg {
	left: calc(50% + var(--yy-u) * var(--yy-reach) + 1rem);
	right: 0;
	z-index: 0;
}

/* Both photos share one frame (the ratio of the Pipeline photo), so they show at the same size:
   a wider picture is zoomed in to fill it, cropped evenly at the sides, never at the bottom. */
.fs-yy .fs-yy__bg img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1024 / 572;
	max-height: 68svh;
	object-fit: cover;
	object-position: 50% 100%;
	opacity: var(--yy-bg-opacity);
	-webkit-mask-image: linear-gradient(transparent, #000 38%), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	-webkit-mask-composite: source-in;
	mask-image: linear-gradient(transparent, #000 38%), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-composite: intersect;
	transform: translate3d(0, 0, 0) scale(1);
	backface-visibility: hidden;
	will-change: transform, opacity;
	transition: transform var(--yy-dur) var(--yy-ease), opacity var(--yy-dur) var(--yy-ease);
}

.fs-yy__half--food .fs-yy__bg img {
	transform-origin: 0% 100%;
}

.fs-yy__half--pipeline .fs-yy__bg img {
	transform-origin: 100% 100%;
}

.fs-yy__half--food {
	--yy-bg-opacity: 0.9;
}

/* Real photo: shown with its own colours, like the food one (no grey/dark filter). */
.fs-yy__half--pipeline {
	--yy-bg-opacity: 0.9;
}

/* The label goes in the outer corner of each half, away from the S. */
.fs-yy__half--food .fs-yy__bg .fs-ai-label {
	right: auto;
	left: 0.6rem;
}

.fs-yy__half--food {
	padding-inline: var(--yy-far) var(--yy-near);
}

.fs-yy__half--pipeline {
	padding-inline: var(--yy-near) var(--yy-far);
	color: var(--fs-on-dark-muted);
}

.fs-yy__half .fs-bx-eyebrow {
	margin-bottom: 1rem;
}

.fs-yy__half--pipeline .fs-bx-eyebrow {
	color: var(--fs-lime);
}

.fs-yy__claim {
	max-width: 12ch;
	margin: 0;
	font-family: var(--fs-font-heading);
	font-size: clamp(2.2rem, 4.6vw, 4.4rem);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.035em;
	color: var(--fs-heading);
	-webkit-hyphens: manual;
	hyphens: manual;
	overflow-wrap: normal;
	text-wrap: balance;
}

.fs-yy__half--pipeline .fs-yy__claim {
	color: var(--fs-white);
}

/* What each division does, as small pills */
/* JS gives both lists the height of the taller one, so the strips below start on the same line;
   the pills stay centred in that space instead of stretching. */
.fs-yy__steps {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-content: center;
	align-items: center;
	gap: 0.5rem;
	max-width: 36rem;
	margin: 1.75rem 0 0;
	padding: 0;
	list-style: none;
}

.fs-yy__steps li {
	margin: 0;
	padding: 0.35rem 0.85rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--fs-text);
	background: rgba(245, 247, 244, 0.85);
	border: 1px solid var(--fs-border-strong);
	border-radius: 999px;
}

.fs-yy__half--pipeline .fs-yy__steps li {
	color: var(--fs-on-dark);
	background: rgba(29, 34, 38, 0.85);
	border-color: rgba(255, 255, 255, 0.2);
}

/* The products / applications strip: a wrapped list, turned into a slow marquee by JS. */
.fs-yy__strip {
	width: 100%;
	max-width: 36rem;
	margin: 1.75rem 0 2rem;
	overflow: hidden;
}

.fs-yy__strip.is-running {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.fs-yy__ticker {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
	padding: 0;
	font-family: var(--fs-font-heading);
	font-size: clamp(1.05rem, 1.4vw, 1.25rem);
	font-weight: 700;
	line-height: 1.6;
	list-style: none;
	color: var(--fs-muted);
}

/* The food photo is shown at full colour, so its strip uses dark ink and a strong light halo to stay readable. */
.fs-yy__half--food .fs-yy__ticker {
	color: #0d1012;
	text-shadow: 0 0 8px var(--fs-white), 0 0 16px var(--fs-white), 0 0 24px var(--fs-white);
}

.fs-yy__half--pipeline .fs-yy__ticker {
	color: var(--fs-white);
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85), 0 0 18px rgba(21, 25, 28, 0.9);
}

.fs-yy__ticker li {
	margin: 0;
	white-space: nowrap;
}

.fs-yy__ticker li:not(:last-child)::after,
.fs-yy__strip.is-running .fs-yy__ticker li::after {
	content: "·";
	margin-inline: 0.7rem;
	color: var(--fs-lime-ink);
}

.fs-yy__half--pipeline .fs-yy__ticker li::after {
	color: var(--fs-lime);
}

.fs-yy__strip.is-running .fs-yy__ticker {
	flex-wrap: nowrap;
	justify-content: flex-start;
	width: max-content;
	animation: yy-marquee var(--yy-duration, 60s) linear infinite;
}

.fs-yy__half--pipeline .fs-yy__strip.is-running .fs-yy__ticker {
	animation-direction: reverse;
}

@keyframes yy-marquee {
	to { transform: translateX(-50%); }
}

/* Eyebrows and claims line up at the top, the two buttons at the bottom. */
.fs-yy .wp-block-buttons {
	justify-content: center;
	margin-top: auto;
}

/* Entrance: the dark half sweeps in from the right and meets the light one.
   Uses the independent `translate` property so it composes smoothly with hover `transform`. */
.fs-fx .fs-yy::before {
	animation: yy-meet 1.4s var(--bx-ease) 0.1s backwards;
}

@keyframes yy-meet {
	from { translate: 50% 0; }
	to { translate: 0 0; }
}

/* The photos follow the split, so they appear only once the two halves have met. */
.fs-fx .fs-yy .fs-yy__bg {
	animation: yy-photo 1s ease 1s backwards;
}

@keyframes yy-photo {
	from { opacity: 0; }
}

/* The line draws itself from top to bottom once the halves have met. */
.fs-fx .fs-yy::after {
	animation: yy-meet 1.4s var(--bx-ease) 0.1s backwards, yy-draw 1.6s var(--bx-ease) 1.1s backwards;
}

@keyframes yy-draw {
	from { clip-path: inset(0 0 100% 0); }
	to { clip-path: inset(0); }
}

@media (hover: hover) and (min-width: 901px) {
	.fs-yy:has(.fs-yy__half--food:hover, .fs-yy__half--food:focus-within)::before,
	.fs-yy:has(.fs-yy__half--food:hover, .fs-yy__half--food:focus-within)::after {
		transform: translate3d(var(--yy-shift), 0, 0);
	}

	.fs-yy:has(.fs-yy__half--pipeline:hover, .fs-yy__half--pipeline:focus-within)::before,
	.fs-yy:has(.fs-yy__half--pipeline:hover, .fs-yy__half--pipeline:focus-within)::after {
		transform: translate3d(calc(-1 * var(--yy-shift)), 0, 0);
	}

	.fs-yy:has(.fs-yy__half--food:hover, .fs-yy__half--food:focus-within) .fs-yy__half--food > :not(.fs-yy__bg) {
		transform: translate3d(0.55rem, 0, 0);
	}

	.fs-yy:has(.fs-yy__half--pipeline:hover, .fs-yy__half--pipeline:focus-within) .fs-yy__half--pipeline > :not(.fs-yy__bg) {
		transform: translate3d(-0.55rem, 0, 0);
	}

	.fs-yy:has(.fs-yy__half--food:hover) .fs-yy__half--pipeline > :not(.fs-yy__bg) {
		opacity: 0.45;
		transform: translate3d(0.55rem, 0, 0);
	}

	.fs-yy:has(.fs-yy__half--pipeline:hover) .fs-yy__half--food > :not(.fs-yy__bg) {
		opacity: 0.45;
		transform: translate3d(-0.55rem, 0, 0);
	}

	.fs-yy__half--food:hover .fs-yy__bg img,
	.fs-yy__half--food:focus-within .fs-yy__bg img {
		transform: translate3d(2%, 0, 0) scale(1.04);
	}

	.fs-yy__half--pipeline:hover .fs-yy__bg img,
	.fs-yy__half--pipeline:focus-within .fs-yy__bg img {
		transform: translate3d(-2%, 0, 0) scale(1.04);
	}

	.fs-yy:has(.fs-yy__half--food:hover, .fs-yy__half--food:focus-within) .fs-yy__half--pipeline .fs-yy__bg img {
		transform: translate3d(4%, 0, 0) scale(0.93);
	}

	.fs-yy:has(.fs-yy__half--pipeline:hover, .fs-yy__half--pipeline:focus-within) .fs-yy__half--food .fs-yy__bg img {
		transform: translate3d(-4%, 0, 0) scale(0.93);
	}

	.fs-yy__half--food:hover {
		--yy-bg-opacity: 0.999;
	}

	.fs-yy__half--pipeline:hover {
		--yy-bg-opacity: 0.999;
	}
}

@media (max-width: 900px) {
	.fs-yy {
		--yy-u: 14px;
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		min-height: 0;
	}

	.fs-yy::before,
	.fs-yy::after {
		display: none;
	}

	/* Stacked halves: each photo sits in its own half. */
	.fs-yy__half {
		position: relative;
	}

	.fs-yy__half--food .fs-yy__bg,
	.fs-yy__half--pipeline .fs-yy__bg {
		right: 0;
		left: 0;
	}

	/* The food photo stops above the line across the seam. */
	.fs-yy__half--food .fs-yy__bg {
		bottom: calc(var(--yy-u) * var(--yy-bw));
	}

	.fs-yy .fs-yy__title {
		color: var(--fs-heading);
		mix-blend-mode: normal;
	}

	.fs-yy__half--food,
	.fs-yy__half--pipeline {
		padding-inline: var(--fs-gutter);
		padding-bottom: 4.5rem;
	}

	.fs-yy__half--pipeline {
		background: var(--fs-anthracite);
	}

	/* The same line across the seam, turned on its side: light above, dark below. */
	.fs-yy__half--pipeline::before {
		content: "";
		position: absolute;
		bottom: calc(100% - 1px);
		left: 0;
		right: 0;
		height: calc(var(--yy-u) * var(--yy-bw));
		background:
			var(--yy-mob) center / calc(var(--yy-u) * var(--yy-bh)) 100% no-repeat,
			linear-gradient(transparent calc(var(--yy-u) * var(--yy-xt) - var(--yy-line) / 2), var(--fs-lime) 0 calc(var(--yy-u) * var(--yy-xt) + var(--yy-line) / 2), var(--fs-anthracite) 0) left / calc(50% - var(--yy-u) * var(--yy-bh) / 2 + 1px) 100% no-repeat,
			linear-gradient(transparent calc(var(--yy-u) * var(--yy-xb) - var(--yy-line) / 2), var(--fs-lime) 0 calc(var(--yy-u) * var(--yy-xb) + var(--yy-line) / 2), var(--fs-anthracite) 0) right / calc(50% - var(--yy-u) * var(--yy-bh) / 2 + 1px) 100% no-repeat;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fs-yy,
	.fs-yy::before,
	.fs-yy::after,
	.fs-yy__half > *,
	.fs-yy .fs-yy__bg,
	.fs-yy .fs-yy__bg img {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   Featured machines inside immersive pages
   -------------------------------------------------------------------------- */
.fs-bx-featured .fs-carousel {
	margin-bottom: 2rem;
}

.fs-immersive .fs-machine-card__link {
	border-radius: 20px;
}

/* Photos fill the journey panel (illustrations stay whole). */
.fs-journey--photos .fs-journey__visual .fs-journey__img img,
.fs-journey--photos .fs-chapter__media img {
	object-fit: cover;
}

/* Machine renders on white (Alimentare): light panel, whole machine visible, never cropped. */
.fs-journey--renders .fs-journey__visual,
.fs-journey--renders .fs-chapter__media {
	background: var(--fs-white, #fff);
	box-shadow: 0 30px 80px rgba(29, 34, 38, 0.12);
	outline: 1px solid rgba(29, 34, 38, 0.08);
	outline-offset: -1px;
}

.fs-journey--renders .fs-journey__visual .fs-journey__img img,
.fs-journey--renders .fs-chapter__media img {
	box-sizing: border-box;
	padding: clamp(1.75rem, 4vw, 3.5rem) clamp(1.25rem, 3vw, 2.5rem);
	object-fit: contain;
}

.fs-journey--renders .fs-journey__visual::after,
.fs-journey--collage .fs-journey__visual::after {
	background:
		linear-gradient(var(--fs-lime), var(--fs-lime)) 0 0 / calc(var(--journey-p, 0.2) * 100%) 100% no-repeat,
		rgba(29, 34, 38, 0.12);
}

/* Machine collage (Alimentare): three to five machine cards scattered on a drawing-table grid.
   Cards are sized on the panel's shorter side (cqmin) so they never spill out of wide or tall panels.
   With motion the cards of the active chapter land one after another. */
.fs-journey--collage .fs-journey__visual,
.fs-journey--collage .fs-chapter__media {
	background:
		linear-gradient(rgba(29, 34, 38, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
		linear-gradient(90deg, rgba(29, 34, 38, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
		#f1f3f1;
	box-shadow: 0 30px 80px rgba(29, 34, 38, 0.12);
	outline: 1px solid rgba(29, 34, 38, 0.08);
	outline-offset: -1px;
}

.fs-collage,
.fs-journey--collage .fs-chapter__media {
	container-type: size;
}

.fs-journey--collage .fs-chapter__media {
	position: relative;
}

.fs-collage__item {
	--w: 50;
	position: absolute;
	left: var(--x);
	top: var(--y);
	width: calc(var(--w) * 1cqmin);
	margin: 0;
	padding: clamp(6px, 1.6cqmin, 12px);
	background: var(--fs-white);
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(29, 34, 38, 0.08), 0 18px 40px rgba(29, 34, 38, 0.16);
	transform: rotate(var(--r));
}

.fs-journey__visual .fs-collage .fs-collage__item img,
.fs-chapter__media .fs-collage__item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	padding: 0;
	object-fit: contain;
}

/* Model code as a small tag in the top corner: card tops are never covered by the neighbours. */
.fs-collage__item figcaption {
	position: absolute;
	top: clamp(8px, 2.2cqmin, 16px);
	left: clamp(8px, 2.2cqmin, 16px);
	margin: 0;
	padding: 0.3em 0.75em;
	background: rgba(241, 243, 241, 0.92);
	border-radius: 999px;
	line-height: 1.2;
	font-family: var(--fs-font-heading);
	font-size: clamp(0.62rem, 2.1cqmin, 0.8rem);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-align: left;
	color: var(--fs-muted);
}

.fs-collage__item:nth-child(1) { --x: 6%; --y: 14%; --w: 54; --r: -3deg; --dx: -14cqmin; --dy: 6cqmin; z-index: 2; }
.fs-collage__item:nth-child(2) { --x: 52%; --y: 8%; --w: 43; --r: 3.5deg; --dx: 14cqmin; --dy: -8cqmin; z-index: 1; }
.fs-collage__item:nth-child(3) { --x: 45%; --y: 46%; --w: 49; --r: -1.5deg; --dx: 16cqmin; --dy: 10cqmin; z-index: 3; }
.fs-collage__item:nth-child(4) { --x: 8%; --y: 56%; --w: 40; --r: 2.5deg; --dx: -12cqmin; --dy: 14cqmin; z-index: 4; }

/* Five cards: two on top, one in the middle, two below. ":nth-child(k):nth-last-child(n-k+1)" = card k of n,
   so the layout follows the number of cards an editor leaves in the group. Each caption stays uncovered. */
.fs-collage__item:nth-child(1):nth-last-child(5) { --x: 5%; --y: 11%; --w: 44; --r: -3deg; --dx: -14cqmin; --dy: -6cqmin; z-index: 1; }
.fs-collage__item:nth-child(2):nth-last-child(4) { --x: 53%; --y: 6%; --w: 42; --r: 3deg; --dx: 14cqmin; --dy: -8cqmin; z-index: 2; }
.fs-collage__item:nth-child(3):nth-last-child(3) { --x: 28%; --y: 35%; --w: 44; --r: -1deg; --dx: 0cqmin; --dy: 12cqmin; z-index: 3; }
.fs-collage__item:nth-child(4):nth-last-child(2) { --x: 4%; --y: 62%; --w: 41; --r: 2.5deg; --dx: -14cqmin; --dy: 12cqmin; z-index: 4; }
.fs-collage__item:nth-child(5):nth-last-child(1) { --x: 54%; --y: 60%; --w: 42; --r: -2.5deg; --dx: 14cqmin; --dy: 14cqmin; z-index: 5; }

/* Three cards: a larger staggered trio. */
.fs-collage__item:nth-child(1):nth-last-child(3) { --x: 5%; --y: 10%; --w: 52; --r: -3deg; --dx: -14cqmin; --dy: -6cqmin; z-index: 1; }
.fs-collage__item:nth-child(2):nth-last-child(2) { --x: 47%; --y: 29%; --w: 48; --r: 3deg; --dx: 16cqmin; --dy: 4cqmin; z-index: 2; }
.fs-collage__item:nth-child(3):nth-last-child(1) { --x: 12%; --y: 56%; --w: 50; --r: -1.5deg; --dx: -10cqmin; --dy: 14cqmin; z-index: 3; }

.fs-fx .fs-journey__visual .fs-collage__item {
	opacity: 0;
	transform: translate(var(--dx), var(--dy)) rotate(calc(var(--r) * 3)) scale(0.92);
	transition:
		opacity 0.5s ease calc(var(--i, 0) * 110ms),
		transform 0.9s var(--bx-ease) calc(var(--i, 0) * 110ms);
}

.fs-fx .fs-journey__visual .fs-collage.is-active .fs-collage__item {
	opacity: 1;
	transform: rotate(var(--r));
}

.fs-collage__item:nth-child(2) { --i: 1; }
.fs-collage__item:nth-child(3) { --i: 2; }
.fs-collage__item:nth-child(4) { --i: 3; }
.fs-collage__item:nth-child(5) { --i: 4; }

/* The collage panel itself must not zoom: only the cards move. */
.fs-journey--collage .fs-journey__visual .fs-journey__img {
	transform: none;
}

.fs-chapter .wp-block-buttons {
	margin-top: 1.75rem;
}

/* Any number of counters fills the row evenly. */
.fs-counts {
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* --------------------------------------------------------------------------
   Pipeline: product spotlights
   -------------------------------------------------------------------------- */
.fs-bx-spotlight .fs-split {
	gap: clamp(2.5rem, 6vw, 6rem);
}

.fs-spotlight__model {
	font-size: 1.1rem;
}

.fs-spotlight__title {
	margin-bottom: 1.25rem;
	font-size: clamp(1.9rem, 3.2vw, 2.8rem);
	line-height: 1.05;
	letter-spacing: -0.03em;
}

.fs-spotlight__text {
	font-size: 1.12rem;
	line-height: 1.6;
	color: var(--fs-muted);
}

.fs-bx-spotlight .fs-split .fs-split__media {
	border-radius: 28px;
	box-shadow: 0 30px 80px rgba(29, 34, 38, 0.22);
}

/* --------------------------------------------------------------------------
   Catalogue inside the immersive layout: segmented filters, softer cards
   -------------------------------------------------------------------------- */
.fs-immersive .fs-bx-catalog {
	padding-top: clamp(2.5rem, 5vw, 4rem);
}

.fs-immersive .fs-catalog__filters {
	gap: 0.35rem;
	width: fit-content;
	max-width: 100%;
	margin: 0 auto 3rem;
	padding: 0.35rem;
	background: var(--fs-surface);
	border: 1px solid var(--fs-border);
	border-radius: 999px;
}

.fs-immersive .fs-filter {
	padding: 0.6rem 1.2rem;
	background: transparent;
	border: 0;
	border-radius: 999px;
	box-shadow: none;
}

.fs-immersive .fs-filter:hover {
	color: var(--fs-anthracite);
	background: var(--fs-white);
}

.fs-immersive .fs-filter.is-active {
	color: var(--fs-anthracite);
	background: var(--fs-lime);
	box-shadow: 0 4px 14px rgba(86, 117, 0, 0.25);
}

.fs-immersive .fs-machine-grid {
	gap: 1.5rem;
}

@media (max-width: 900px) {
	.fs-immersive .fs-catalog__filters {
		border-radius: 22px;
	}
}

/* --------------------------------------------------------------------------
   Pledges: two commitments side by side (Servizi)
   -------------------------------------------------------------------------- */
.fs-pledges {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(2.5rem, 6vw, 5.5rem);
	max-width: 1100px;
	margin: 0 auto;
}

.fs-pledge {
	padding-top: clamp(1.75rem, 3vw, 2.5rem);
	border-top: 3px solid var(--fs-lime);
}

.fs-pledge__text {
	margin: 0;
	font-family: var(--fs-font-heading);
	font-size: clamp(1.4rem, 2.2vw, 1.9rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.015em;
	color: var(--fs-anthracite);
	text-wrap: pretty;
}

@media (max-width: 800px) {
	.fs-pledges {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* --------------------------------------------------------------------------
   Heritage: the historical mark fades into today's logo (Chi siamo)
   Static layout: the two logos side by side. With motion: one stage, sticky while scrolling.
   -------------------------------------------------------------------------- */
.fs-heritage {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: clamp(2.5rem, 6vw, 5.5rem);
	align-items: center;
}

.fs-heritage__title {
	margin-bottom: 1.25rem;
	font-size: var(--bx-title);
	line-height: 1.08;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.fs-heritage__text {
	max-width: 52ch;
	font-size: clamp(1.05rem, 1.4vw, 1.2rem);
	line-height: 1.65;
	color: var(--fs-muted);
}

.fs-heritage__stage {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2rem;
	align-items: center;
}

.fs-heritage__item {
	margin: 0;
	text-align: center;
}

.fs-heritage__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	margin: 0 0 1.25rem;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	background: var(--fs-white);
	border: 1px solid var(--fs-border);
	border-radius: 22px;
	box-shadow: var(--fs-shadow-lift);
}

.fs-heritage__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 150px;
	height: auto;
	object-fit: contain;
}

.fs-heritage__caption {
	margin: 0;
	font-family: var(--fs-font-heading);
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--fs-lime-ink);
}

.fs-fx .fs-bx-heritage {
	padding-block: 0;
}

.fs-fx .fs-bx-heritage > .fs-container {
	height: 175vh;
}

.fs-fx .fs-heritage {
	position: sticky;
	top: var(--fs-header-h);
	min-height: calc(100svh - var(--fs-header-h));
	padding-block: 3rem;
}

.fs-fx .fs-heritage__stage {
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	max-width: 520px;
	width: 100%;
	justify-self: center;
}

.fs-fx .fs-heritage__item {
	grid-area: 1 / 1;
	transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.fs-fx .fs-heritage__item--then {
	opacity: clamp(0, calc((0.56 - var(--p, 0)) * 3.4), 1);
	transform: translateY(calc(var(--p, 0) * -8px)) scale(calc(1 - var(--p, 0) * 0.04));
}

.fs-fx .fs-heritage__item--now {
	opacity: clamp(0, calc((var(--p, 0) - 0.40) * 3.4), 1);
	transform: translateY(calc((1 - var(--p, 0)) * 8px)) scale(calc(0.96 + var(--p, 0) * 0.04));
}

/* Variant without today's logo: the historical mark alone, on a brushed-steel machine plate.
   With motion the plate settles flat while scrolling, then a streak of light runs across it. */
.fs-heritage--plate .fs-heritage__stage {
	grid-template-columns: minmax(0, 1fr);
	max-width: 520px;
	width: 100%;
	justify-self: center;
	perspective: 1200px;
}

.fs-heritage__item--plate {
	--screw: #7d8380 0, #aab0ac 3px, #e6e9e6 4px, rgba(29, 34, 38, 0.22) 5.5px, transparent 6.5px;
	position: relative;
	overflow: hidden;
	padding: clamp(2.1rem, 4vw, 2.75rem) clamp(1.9rem, 4vw, 2.6rem) clamp(1.3rem, 3vw, 1.7rem);
	border: 1px solid #b7bcb9;
	border-radius: 16px;
	background:
		radial-gradient(circle at 18px 18px, var(--screw)),
		radial-gradient(circle at calc(100% - 18px) 18px, var(--screw)),
		radial-gradient(circle at 18px calc(100% - 18px), var(--screw)),
		radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--screw)),
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 1px, rgba(0, 0, 0, 0.03) 1px 2px, transparent 2px 4px),
		linear-gradient(180deg, #f2f4f2 0%, #d3d7d4 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.95),
		inset 0 -1px 0 rgba(0, 0, 0, 0.08),
		0 26px 60px rgba(29, 34, 38, 0.18);
	transform-origin: 50% 100%;
}

.fs-heritage__item--plate .fs-heritage__logo {
	min-height: 0;
	margin: 0 0 1.1rem;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.fs-heritage__item--plate .fs-heritage__logo img {
	max-height: 170px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.fs-heritage__item--plate .fs-heritage__caption {
	font-size: 0.78rem;
	letter-spacing: 0.24em;
	color: #59605d;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.fs-heritage__item--plate::after {
	content: "";
	position: absolute;
	inset: -20% -60%;
	background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.5) 50%, transparent 58%);
	opacity: 0;
	pointer-events: none;
}

.fs-fx .fs-heritage__item--plate {
	transform:
		translateY(calc((1 - clamp(0, var(--p, 0) * 2.9, 1)) * 34px))
		rotateX(calc((1 - clamp(0, var(--p, 0) * 2.9, 1)) * 16deg))
		scale(calc(0.97 + clamp(0, var(--p, 0) * 2.9, 1) * 0.03));
}

.fs-fx .fs-heritage__item--plate::after {
	opacity: 1;
	transform: translateX(calc(-32% + clamp(0, (var(--p, 0) - 0.3) / 0.6, 1) * 64%));
}

@media (max-width: 900px) {
	.fs-heritage {
		grid-template-columns: minmax(0, 1fr);
		gap: 2.5rem;
	}

	.fs-fx .fs-heritage {
		align-content: center;
	}

	.fs-fx .fs-heritage__stage {
		max-width: 420px;
	}
}

/* --------------------------------------------------------------------------
   Responsive & reduced motion
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
	.fs-immersive {
		--bx-display: clamp(2rem, 9.6vw, 2.6rem);
		--bx-title: clamp(1.6rem, 7.2vw, 1.9rem);
	}

	.fs-chapter__title {
		font-size: clamp(1.6rem, 7.4vw, 2rem);
	}

	.fs-biglist li {
		font-size: clamp(1.5rem, 7.2vw, 1.9rem);
	}

	.fs-bx-scrub {
		font-size: clamp(1.5rem, 7vw, 2rem);
	}

	.fs-timeline {
		--tl-mark: clamp(2rem, 9vw, 2.4rem);
	}
}

@media (max-width: 900px) {
	.fs-journey {
		grid-template-columns: minmax(0, 1fr);
	}

	.fs-journey__visual {
		display: none;
	}

	.fs-chapter__media {
		display: block;
		width: 100%;
		max-width: 560px;
		aspect-ratio: 1 / 1;
		max-height: 70svh;
		margin: 0 0 1.75rem;
		border-radius: 22px;
		overflow: hidden;
		background: radial-gradient(75% 75% at 50% 42%, #263036, var(--fs-anthracite));
	}

	.fs-chapter {
		min-height: 0;
		padding: 1.5rem 0 2.5rem;
		border-bottom: 1px solid var(--fs-border);
	}

	.fs-fx .fs-chapter {
		opacity: 1;
	}

	.fs-trio,
	.fs-counts {
		grid-template-columns: minmax(0, 1fr);
	}

	.fs-counts {
		gap: 2.75rem;
	}

	.fs-expand {
		height: 150vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fs-fx .fx-reveal,
	.fs-fx .fs-fx-words .fs-w {
		opacity: 1;
		transform: none;
		filter: none;
		animation: none;
	}

	.fs-expand {
		height: auto;
	}

	.fs-expand > *,
	.fs-expand::after {
		position: relative;
		top: 0;
		height: 70vh;
	}

	.fs-expand .fs-expand__media {
		clip-path: none;
	}

	.fs-expand .fs-expand__media .fs-ai-label {
		right: 0.6rem;
		bottom: 0.6rem;
	}

	.fs-expand .fs-expand__media img {
		transform: none;
	}

	.fs-expand__title {
		opacity: 1;
	}

	.fs-fx .fs-biglist li,
	.fs-fx .fs-bx-scrub .fs-w {
		color: inherit;
	}

	.fs-bx-hero::after {
		animation: none;
	}
}
