/**
 * Stili per la pagina "Come funziona" di AgriGiardiSocial.
 * Redesign fase 5, conforme al design system (ags-tokens, ags-components).
 *
 * Utilizza esclusivamente token CSS --ags-*.
 * Nessun colore esadecimale, rgb() o rgba() letterale.
 * Nessun !important.
 */

/* ==========================================================================
   HERO COME FUNZIONA
   ========================================================================== */

.cf-hero
{
	background-color: var(--ags-forest); /* ripiego se la foto non arriva */
	overflow:         hidden;
	/* Il menu trasparente è sovrapposto all'hero: sopra serve la sua altezza più un respiro vero. */
	padding-block:    calc(var(--ags-space-7) + var(--ags-space-6)) var(--ags-space-6);
	position:         relative;
}

/* Foto di sfondo su un livello proprio, così può assestarsi al caricamento. */
.cf-hero::before
{
	background-image:    var(--cf-hero-bg);
	background-position: center;
	background-size:     cover;
	content:             "";
	inset:               0;
	position:            absolute;
}

/* Velo diagonale come nell'originale: più scuro in alto per il menu
   trasparente, più leggero al centro perché le luci della foto restino
   visibili, con un alone scuro morbido dietro al testo per la leggibilità. */
.cf-hero::after
{
	background:
		radial-gradient(ellipse 60% 70% at 50% 55%, color-mix(in srgb, var(--ags-ink) 40%, transparent) 0%, transparent 72%),
		linear-gradient(
			160deg,
			color-mix(in srgb, var(--ags-forest) 80%, transparent) 0%,
			color-mix(in srgb, var(--ags-forest) 58%, transparent) 55%,
			color-mix(in srgb, var(--ags-ink) 70%, transparent) 100%
		);
	content:  "";
	inset:    0;
	position: absolute;
	z-index:  1;
}

.cf-hero .ags-container
{
	position: relative;
	z-index:  2;
}

/* Logo senza fondo, come nella home: sulla foto scura la versione trasparente si legge da sola. */
.cf-hero__logo
{
	display: block;
	height:  52px;
	margin:  0 auto var(--ags-space-3);
	width:   auto;
}

@media (max-width: 767.98px)
{
	.cf-hero
	{
		padding-top: calc(var(--ags-space-7) + var(--ags-space-4));
	}

	.cf-hero__logo
	{
		height: 44px;
	}
}

.cf-hero h1
{
	color:         var(--ags-white);
	font-size:     clamp(2rem, 1.5rem + 2.5vw, 3rem);
	font-weight:   700;
	line-height:   1.15;
	margin-bottom: var(--ags-space-2);
}

.cf-hero__subtitle
{
	color:         var(--ags-sand);
	font-size:     1.125rem;
	line-height:   1.6;
	margin-inline: auto;
	margin-bottom: var(--ags-space-5);
	max-width:     62ch;
}

.cf-hero__actions
{
	display:         flex;
	flex-wrap:       wrap;
	gap:             var(--ags-space-2);
	justify-content: center;
}

/* Azione principale chiara: sul velo verde il verde bosco del pulsante
   standard non avrebbe contrasto. */
.cf-hero__actions .btn-primary
{
	background-color: var(--ags-white);
	border-color:     var(--ags-white);
	color:            var(--ags-forest);
	font-weight:      600;
	min-height:       44px;
	padding:          10px 24px;
}

.cf-hero__actions .btn-primary:hover,
.cf-hero__actions .btn-primary:focus
{
	background-color: var(--ags-sand);
	border-color:     var(--ags-sand);
	color:            var(--ags-forest);
}

.cf-hero__actions .btn-outline-light
{
	border-color: var(--ags-sand);
	color:        var(--ags-sand);
	min-height:   44px;
	padding:      10px 24px;
}

.cf-hero__actions .btn-outline-light:hover
{
	background-color: var(--ags-sand);
	border-color:     var(--ags-sand);
	color:            var(--ags-forest);
}

/* Entrata sobria come in home: la foto si assesta, il testo sale in sequenza.
   Solo CSS, e solo per chi non ha chiesto meno movimento. */
@media (prefers-reduced-motion: no-preference)
{
	.cf-hero::before
	{
		animation: cf-hero-assesta 2.4s cubic-bezier(0.16, 1, 0.3, 1) both;
	}

	.cf-hero .ags-container > *
	{
		animation: cf-hero-sale 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
	}

	.cf-hero h1
	{
		animation-delay: 90ms;
	}

	.cf-hero__subtitle
	{
		animation-delay: 170ms;
	}

	.cf-hero__actions
	{
		animation-delay: 260ms;
	}
}

@keyframes cf-hero-assesta
{
	from
	{
		transform: scale(1.08);
	}

	to
	{
		transform: scale(1);
	}
}

@keyframes cf-hero-sale
{
	from
	{
		opacity:   0;
		transform: translateY(18px);
	}

	to
	{
		opacity:   1;
		transform: none;
	}
}

/* ==========================================================================
   PASSAGGI NUMERATI (INIZIA IN 4 PASSAGGI)
   ========================================================================== */

/* Percorso a 4 passaggi: un filo verticale unisce i numeri e, dove il browser
   supporta le animazioni legate allo scorrimento, si riempie di verde mentre
   si scorre la sezione. Altrove resta il filo neutro. */
.cf-steps
{
	isolation: isolate;
	overflow:  clip; /* i passaggi entrano dai lati e la luce sfocata esce dai bordi: niente scroll */
	position:  relative;
}

/* Foglie in controluce: la foto delle luci sfocate, molto sfumata nella crema,
   appena percepibile dietro il percorso. */
.cf-steps::before
{
	background: var(--cf-luce-bg) center / cover no-repeat;
	content:    "";
	filter:     blur(24px) saturate(1.15);
	inset:      -48px;
	opacity:    0.24;
	position:   absolute;
	z-index:    -2;
}

/* Luce morbida dall'alto e dissolvenza verso la crema ai bordi della sezione. */
.cf-steps::after
{
	background:
		radial-gradient(ellipse 70% 50% at 50% 0%, color-mix(in srgb, var(--ags-white) 80%, transparent) 0%, transparent 72%),
		linear-gradient(to bottom, color-mix(in srgb, var(--ags-cream) 25%, transparent) 0%, color-mix(in srgb, var(--ags-cream) 50%, transparent) 55%, var(--ags-cream) 100%);
	content:    "";
	inset:      0;
	position:   absolute;
	z-index:    -1;
}

.cf-steps-wrap
{
	/* Ripiego prima che il JS misuri il centro dell'ultimo pallino (vedi frontend.js):
	   coincide con "top", così sul primissimo render il filo parte già dal punto giusto. */
	--cf-line-bottom: 24px;

	display:    grid;
	gap:        clamp(var(--ags-space-5), 4vw, var(--ags-space-7));
	list-style: none;
	margin:     0;
	padding:    0;
	position:   relative;
}

.cf-steps-wrap::before,
.cf-steps-wrap::after
{
	border-radius: 2px;
	bottom:        var(--cf-line-bottom);
	content:       "";
	left:          23px;
	position:      absolute;
	top:           24px;
	width:         2px;
}

.cf-steps-wrap::before
{
	background: var(--ags-border);
}

.cf-steps-wrap::after
{
	background:       var(--ags-forest);
	transform:        scaleY(0);
	transform-origin: top;
}

/* La linea temporale di scorrimento è dichiarata sul contenitore e usata dal
   filo: un elemento generato non può fare da soggetto della propria. */
@supports (animation-timeline: view())
{
	@media (prefers-reduced-motion: no-preference)
	{
		.cf-steps-wrap
		{
			view-timeline: --cf-percorso block;
		}

		/* Proprietà separate e non la forma abbreviata "animation": il minificatore
		   riordina le dichiarazioni e l'abbreviata azzererebbe la linea temporale. */
		.cf-steps-wrap::after
		{
			animation-fill-mode:       both;
			animation-name:            cf-filo;
			animation-range:           cover 15% cover 80%;
			animation-timeline:        --cf-percorso;
			animation-timing-function: linear;
		}
	}
}

@keyframes cf-filo
{
	from
	{
		transform: scaleY(0);
	}

	to
	{
		transform: scaleY(1);
	}
}

.cf-step
{
	align-items:           start;
	display:               grid;
	gap:                   var(--ags-space-4);
	grid-template-columns: 48px minmax(0, 1fr);
	position:              relative;
}

/* Numero del passaggio sul filo: verde quando il passaggio è in vista. */
.cf-step__index
{
	align-items:          center;
	background:           var(--ags-forest);
	border:               2px solid var(--ags-forest);
	border-radius:        50%;
	color:                var(--ags-white);
	display:              flex;
	font-size:            0.9375rem;
	font-variant-numeric: tabular-nums;
	font-weight:          700;
	height:               48px;
	justify-content:      center;
	position:             relative;
	transition:           background-color 0.5s var(--ags-ease-out), border-color 0.5s var(--ags-ease-out), color 0.5s var(--ags-ease-out), transform 0.6s var(--ags-ease-expo);
	width:                48px;
	z-index:              1;
}

.js-motion .cf-step:not(.is-revealed) .cf-step__index
{
	background:   var(--ags-white);
	border-color: var(--ags-border);
	color:        var(--ags-muted);
	transform:    scale(0.9);
}

.cf-step__body
{
	align-items: center;
	display:     grid;
	gap:         var(--ags-space-5);
}

@media (min-width: 992px)
{
	.cf-step__body
	{
		gap:                   clamp(var(--ags-space-5), 5vw, var(--ags-space-7));
		grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	}

	/* Ritmo alternato: l'illustrazione cambia lato a ogni passaggio. */
	.cf-step:nth-child(even) .cf-step__media
	{
		order: -1;
	}
}

/* Coreografia del passaggio: il testo arriva dal lato opposto all'illustrazione,
   l'illustrazione si ingrandisce appena, i punti dell'elenco seguono in sequenza. */
.js-motion .cf-step .cf-step__content,
.js-motion .cf-step .cf-step__media,
.js-motion .cf-step .cf-step__features li
{
	opacity:    0;
	transition: opacity 0.7s var(--ags-ease-out), transform 0.9s var(--ags-ease-expo);
}

.js-motion .cf-step .cf-step__content
{
	transform: translateY(24px);
}

.js-motion .cf-step .cf-step__media
{
	transform: scale(0.92);
}

.js-motion .cf-step .cf-step__features li
{
	transform: translateY(12px);
}

@media (min-width: 992px)
{
	.js-motion .cf-step .cf-step__content
	{
		transform: translateX(-32px);
	}

	.js-motion .cf-step:nth-child(even) .cf-step__content
	{
		transform: translateX(32px);
	}
}

.js-motion .cf-step.is-revealed .cf-step__content,
.js-motion .cf-step.is-revealed .cf-step__media,
.js-motion .cf-step.is-revealed .cf-step__features li
{
	opacity:   1;
	transform: none;
}

.js-motion .cf-step.is-revealed .cf-step__media
{
	transition-delay: 120ms;
}

.js-motion .cf-step.is-revealed .cf-step__features li:nth-child(1)
{
	transition-delay: 260ms;
}

.js-motion .cf-step.is-revealed .cf-step__features li:nth-child(2)
{
	transition-delay: 340ms;
}

.js-motion .cf-step.is-revealed .cf-step__features li:nth-child(3)
{
	transition-delay: 420ms;
}

.cf-step__title
{
	color:         var(--ags-ink);
	font-size:     clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
	font-weight:   700;
	line-height:   1.3;
	margin-bottom: var(--ags-space-2);
}

.cf-step__text
{
	color:         var(--ags-muted);
	font-size:     0.9375rem;
	line-height:   1.5;
	margin-bottom: var(--ags-space-2);
}

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

.cf-step__features li
{
	align-items: flex-start;
	color:       var(--ags-ink);
	display:     flex;
	font-size:   0.875rem;
	gap:         var(--ags-space-2);
	line-height: 1.45;
}

.cf-step__features li i
{
	color:       var(--ags-green);
	flex-shrink: 0;
	font-size:   0.875rem;
	margin-top:  4px;
}

.cf-step__icon-wrap
{
	align-items:      center;
	aspect-ratio:     1 / 1;
	background-color: var(--ags-sand);
	border-radius:    var(--ags-radius-container);
	display:          flex;
	justify-content:  center;
	margin:           0 auto;
	max-width:        200px;
	padding:          var(--ags-space-4);
	width:            100%;
}

.cf-step__icon-wrap img
{
	height:     auto;
	max-height: 120px;
	-o-object-fit: contain;
	   object-fit: contain;
	width:      75%;
}

/* ==========================================================================
   TIPOLOGIE UTENTI (CHI PUÒ ISCRIVERSI)
   ========================================================================== */

/* Fascia verde bosco: la siepe fotografica leggermente sfocata sotto un velo
   scuro con due bagliori tenui. Unico stacco scuro voluto a metà pagina. */
.cf-community
{
	background-color: var(--ags-forest); /* ripiego se la foto non arriva */
	isolation:        isolate;
	overflow:         clip;
	position:         relative;
}

.cf-community::before
{
	background: var(--cf-foglie-bg) center 35% / cover no-repeat;
	content:    "";
	filter:     blur(1.5px);
	inset:      -16px;
	position:   absolute;
	transform:  scale(1.12);
	z-index:    -2;
}

.cf-community::after
{
	background:
		radial-gradient(ellipse 55% 80% at 12% 0%, color-mix(in srgb, var(--ags-green) 42%, transparent) 0%, transparent 70%),
		radial-gradient(ellipse 45% 70% at 92% 100%, color-mix(in srgb, var(--ags-moss) 24%, transparent) 0%, transparent 70%),
		linear-gradient(color-mix(in srgb, var(--ags-forest) 58%, transparent), color-mix(in srgb, var(--ags-ink) 72%, transparent));
	content:    "";
	inset:      0;
	position:   absolute;
	z-index:    -1;
}

/* Parallasse leggera: lo sfondo scorre un po' più lento della pagina, solo dove
   esiste l'animazione legata allo scorrimento. Proprietà separate perché il
   minificatore riordina le dichiarazioni. */
@supports (animation-timeline: view())
{
	@media (prefers-reduced-motion: no-preference)
	{
		.cf-community
		{
			view-timeline: --cf-comunita block;
		}

		.cf-community::before
		{
			animation-fill-mode:       both;
			animation-name:            cf-parallasse;
			animation-range:           cover;
			animation-timeline:        --cf-comunita;
			animation-timing-function: linear;
		}
	}
}

@keyframes cf-parallasse
{
	from
	{
		transform: translateY(-6%) scale(1.12);
	}

	to
	{
		transform: translateY(6%) scale(1.12);
	}
}

.cf-community .ags-section__title
{
	color: var(--ags-white);
}

.cf-community .ags-section__lead
{
	color: color-mix(in srgb, var(--ags-sand) 88%, transparent);
}

/* Sul fondo scuro le card bianche si staccano con l'ombra, non con il bordo. */
.cf-community .cf-type-card
{
	border-color: transparent;
	box-shadow:   0 12px 32px -20px color-mix(in srgb, var(--ags-ink) 70%, transparent);
}

.cf-community .cf-type-card:hover
{
	border-color: transparent;
	box-shadow:   0 26px 48px -24px color-mix(in srgb, var(--ags-ink) 85%, transparent);
}

.cf-type-card
{
	background-color: var(--ags-white);
	border:           1px solid var(--ags-border);
	border-radius:    var(--ags-radius-container);
	display:          flex;
	flex-direction:   column;
	height:           100%;
	padding:          var(--ags-space-4);
	text-align:       center;
	transition:       border-color 0.3s var(--ags-ease-out), box-shadow 0.4s var(--ags-ease-out), transform 0.4s var(--ags-ease-out);
}

.cf-type-card:hover
{
	border-color: var(--ags-moss);
	box-shadow:   0 16px 32px -18px color-mix(in srgb, var(--ags-forest) 35%, transparent);
	transform:    translateY(-4px);
}

.cf-type-card__icon
{
	align-items:      center;
	background-color: var(--ags-green-soft);
	border-radius:    var(--ags-radius-control);
	color:            var(--ags-forest);
	display:          inline-flex;
	font-size:        1.75rem;
	height:           64px;
	justify-content:  center;
	margin:           0 auto var(--ags-space-3);
	width:            64px;
}

/* Al passaggio l'icona si riempie di verde bosco. */
.cf-type-card__icon
{
	transition: background-color 0.3s var(--ags-ease-out), color 0.3s var(--ags-ease-out), transform 0.5s var(--ags-ease-expo);
}

.cf-type-card:hover .cf-type-card__icon
{
	background-color: var(--ags-forest);
	color:            var(--ags-white);
	transform:        scale(1.06);
}

.cf-type-card h3
{
	color:         var(--ags-ink);
	font-size:     1.1875rem;
	font-weight:   700;
	margin-bottom: var(--ags-space-1);
}

.cf-type-card p
{
	color:       var(--ags-muted);
	font-size:   0.875rem;
	line-height: 1.55;
	margin:      0;
}

/* Le parole chiave restano leggibili anche a lettura veloce: colore del brand,
   niente maiuscolo per non gridare in mezzo a un testo discorsivo. */
.cf-type-card__kw
{
	color:       var(--ags-forest);
	font-weight: 700;
}

/* ==========================================================================
   PERCHÉ AGRIGIARDISOCIAL
   ========================================================================== */

/* Griglia asimmetrica a quattro celle: foto con il titolo della sezione e tre
   vantaggi su superfici diverse (verde bosco, verde tenue, sabbia). Mobile:
   una colonna; tablet: foto a tutta larghezza e vantaggi su due colonne. */
.cf-bento
{
	display:               grid;
	gap:                   var(--ags-space-3);
	grid-template-columns: minmax(0, 1fr);
}

.cf-bento__cell
{
	border-radius: var(--ags-radius-container);
	overflow:      hidden;
	position:      relative;
}

.cf-bento__photo
{
	align-items: flex-end;
	display:     flex;
	isolation:   isolate;
	margin:      0;
	min-height:  340px;
}

.cf-bento__photo img
{
	height:     100%;
	inset:      0;
	-o-object-fit: cover;
	   object-fit: cover;
	position:   absolute;
	transition: transform 1.6s var(--ags-ease-expo);
	width:      100%;
	z-index:    -2;
}

/* Velo dal basso: il titolo resta leggibile, la parte alta della foto resta viva. */
.cf-bento__photo::after
{
	background: linear-gradient(to top, color-mix(in srgb, var(--ags-ink) 88%, transparent) 0%, color-mix(in srgb, var(--ags-ink) 40%, transparent) 55%, transparent 100%);
	content:    "";
	inset:      0;
	position:   absolute;
	z-index:    -1;
}

.cf-bento__intro
{
	padding: clamp(var(--ags-space-4), 4vw, var(--ags-space-6));
}

.cf-bento__title
{
	color:         var(--ags-white);
	font-size:     clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
	line-height:   1.15;
	margin:        0 0 var(--ags-space-2);
	max-width:     16ch;
}

.cf-bento__lead
{
	color:     color-mix(in srgb, var(--ags-white) 90%, transparent);
	margin:    0;
	max-width: 46ch;
}

.cf-bento__benefit
{
	display:        flex;
	flex-direction: column;
	gap:            var(--ags-space-2);
	padding:        clamp(var(--ags-space-4), 3vw, var(--ags-space-5));
	transition:     box-shadow 0.4s var(--ags-ease-out), transform 0.4s var(--ags-ease-out);
}

.cf-bento__benefit:hover
{
	box-shadow: 0 18px 36px -20px color-mix(in srgb, var(--ags-forest) 45%, transparent);
	transform:  translateY(-4px);
}

/* Icona in alto, testo in basso: la cella respira anche quando è alta. */
.cf-bento__icon
{
	border-radius: var(--ags-radius-control);
	display:       inline-grid;
	font-size:     1.25rem;
	height:        48px;
	margin-bottom: auto;
	place-items:   center;
	transition:    transform 0.5s var(--ags-ease-expo);
	width:         48px;
}

.cf-bento__benefit:hover .cf-bento__icon
{
	transform: translateY(-2px) scale(1.06);
}

/* Titolo e testo raggruppati (serve al layout compatto su mobile): stessa distanza che
   avevano come figli diretti della cella. */
.cf-bento__text
{
	display:        flex;
	flex-direction: column;
	gap:            var(--ags-space-2);
}

.cf-bento__benefit h3
{
	font-size:   clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
	font-weight: 700;
	line-height: 1.25;
	margin:      var(--ags-space-3) 0 0;
}

.cf-bento__benefit p
{
	font-size:   0.9375rem;
	line-height: 1.6;
	margin:      0;
}

.cf-bento__benefit--forest
{
	background: var(--ags-forest);
}

.cf-bento__benefit--forest h3
{
	color: var(--ags-white);
}

.cf-bento__benefit--forest p
{
	color: color-mix(in srgb, var(--ags-sand) 90%, transparent);
}

.cf-bento__benefit--forest .cf-bento__icon
{
	background: color-mix(in srgb, var(--ags-white) 14%, transparent);
	color:      var(--ags-white);
}

.cf-bento__benefit--soft
{
	background: var(--ags-green-soft);
}

.cf-bento__benefit--sand
{
	background: var(--ags-sand);
	border:     1px solid var(--ags-border);
}

.cf-bento__benefit--soft h3,
.cf-bento__benefit--sand h3,
.cf-bento__benefit--soft p,
.cf-bento__benefit--sand p
{
	color: var(--ags-ink);
}

.cf-bento__benefit--soft .cf-bento__icon,
.cf-bento__benefit--sand .cf-bento__icon
{
	background: var(--ags-white);
	color:      var(--ags-forest);
}

@media (min-width: 768px)
{
	.cf-bento
	{
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cf-bento__photo,
	.cf-bento__benefit--forest
	{
		grid-column: 1 / -1;
	}

	.cf-bento__photo
	{
		min-height: 380px;
	}
}

@media (min-width: 992px)
{
	.cf-bento
	{
		grid-template-columns: repeat(12, minmax(0, 1fr));
	}

	.cf-bento__photo
	{
		grid-column: 1 / span 6;
		grid-row:    1 / span 2;
		min-height:  540px;
	}

	.cf-bento__benefit--forest
	{
		grid-column: 7 / span 6;
	}

	.cf-bento__benefit--soft
	{
		grid-column: 7 / span 3;
	}

	.cf-bento__benefit--sand
	{
		grid-column: 10 / span 3;
	}
}

/* Entrata: le celle salgono in sequenza e la foto si assesta. Un'animazione
   con riempimento solo iniziale lascia libero il sollevamento al passaggio. */
.js-motion .cf-bento:not(.is-revealed) .cf-bento__cell
{
	opacity: 0;
}

.js-motion .cf-bento:not(.is-revealed) .cf-bento__photo img
{
	transform: scale(1.08);
}

.js-motion .cf-bento.is-revealed .cf-bento__cell
{
	animation: cf-bento-entra 0.8s var(--ags-ease-expo) backwards;
}

.js-motion .cf-bento.is-revealed .cf-bento__cell:nth-child(2)
{
	animation-delay: 120ms;
}

.js-motion .cf-bento.is-revealed .cf-bento__cell:nth-child(3)
{
	animation-delay: 220ms;
}

.js-motion .cf-bento.is-revealed .cf-bento__cell:nth-child(4)
{
	animation-delay: 320ms;
}

@keyframes cf-bento-entra
{
	from
	{
		opacity:   0;
		transform: translateY(28px);
	}

	to
	{
		opacity:   1;
		transform: none;
	}
}

/* ==========================================================================
   BOX CTA FINALE
   ========================================================================== */

/* Pannello verde bosco al posto del riquadro bianco piatto: stesso linguaggio
   delle celle scure del bento sopra, così la sezione chiude con energia invece
   che spegnersi su un bianco su bianco. */
.cf-cta-box
{
	background:
		radial-gradient(ellipse 90% 80% at 18% -10%, color-mix(in srgb, var(--ags-moss) 38%, transparent) 0%, transparent 60%),
		linear-gradient(155deg, var(--ags-forest) 0%, color-mix(in srgb, var(--ags-ink) 55%, var(--ags-forest)) 100%);
	border:           1px solid color-mix(in srgb, var(--ags-white) 14%, transparent);
	border-radius:    var(--ags-radius-container);
	box-shadow:       0 32px 64px -30px color-mix(in srgb, var(--ags-ink) 60%, transparent);
	margin-inline:    auto;
	max-width:        760px;
	padding:          var(--ags-space-6) var(--ags-space-4);
	position:         relative;
	text-align:       center;
}

.cf-cta-box__icon
{
	align-items:      center;
	background:       color-mix(in srgb, var(--ags-white) 14%, transparent);
	border-radius:    50%;
	color:             var(--ags-white);
	display:          inline-flex;
	font-size:        1.5rem;
	height:           56px;
	justify-content:  center;
	margin-bottom:    var(--ags-space-3);
	width:            56px;
}

.cf-cta-box h3
{
	color:         var(--ags-white);
	font-size:     clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
	font-weight:   700;
	margin-bottom: var(--ags-space-2);
}

.cf-cta-box p
{
	color:         color-mix(in srgb, var(--ags-sand) 92%, transparent);
	font-size:     1rem;
	line-height:   1.6;
	margin-inline: auto;
	margin-bottom: var(--ags-space-4);
	max-width:     54ch;
}

/* Sul verde bosco il pulsante torna bianco, come nell'hero e nel banner della
   home: stessa convenzione in tutta l'app per i CTA su fondo scuro. */
.cf-cta-box .btn-primary
{
	align-items:      center;
	background-color: var(--ags-white);
	border-color:     var(--ags-white);
	color:            var(--ags-forest);
	display:          inline-flex;
	font-weight:      600;
	justify-content:  center;
	min-height:       48px;
	padding-inline:   var(--ags-space-5);
	text-align:       center;
}

.cf-cta-box .btn-primary:hover,
.cf-cta-box .btn-primary:focus
{
	background-color: var(--ags-sand);
	border-color:     var(--ags-sand);
	color:            var(--ags-forest);
}

/* ==========================================================================
   RESPONSIVE & MOVIMENTO RIDOTTO
   ========================================================================== */

@media (max-width: 767.98px)
{
	.cf-step
	{
		gap:                   var(--ags-space-3);
		grid-template-columns: 40px minmax(0, 1fr);
	}

	.cf-step__index
	{
		height: 40px;
		width:  40px;
	}

	.cf-steps-wrap::before,
	.cf-steps-wrap::after
	{
		left: 19px;
		top:  20px;
	}

	.cf-hero__subtitle
	{
		font-size: 1rem;
	}

	/* ---------- Etichette di sezione ---------- */

	/* A 13px l'etichetta sopra il titolo spariva: su mobile diventa una pastiglia verde,
	   stessa per tutte le sezioni della pagina che la usano. */
	.cf-steps .ags-section__eyebrow,
	.cf-why .ags-section__eyebrow
	{
		background:    var(--ags-green-soft);
		border-radius: 999px;
		color:         var(--ags-forest);
		display:       inline-block;
		font-size:     0.9375rem;
		font-weight:   700;
		margin-bottom: var(--ags-space-2);
		padding:       6px 16px;
	}

	/* ---------- Passaggi ---------- */

	.cf-step__body
	{
		gap: var(--ags-space-4);
	}

	.cf-step__title
	{
		margin-bottom: var(--ags-space-1);
	}

	/* I tre punti di ogni passaggio diventano etichette brevi: si leggono con uno sguardo. */
	.cf-step__tags
	{
		display:    flex;
		flex-wrap:  wrap;
		gap:        6px;
		list-style: none;
		margin:     0;
		padding:    0;
	}

	.cf-step__tags li
	{
		background:    var(--ags-green-soft);
		border-radius: var(--ags-radius-control);
		color:         var(--ags-forest);
		font-size:     0.8125rem;
		font-weight:   600;
		line-height:   1.4;
		padding:       4px 10px;
	}

	.js-motion .cf-step .cf-step__tags li
	{
		opacity:    0;
		transform:  translateY(8px);
		transition: opacity 0.5s var(--ags-ease-out), transform 0.7s var(--ags-ease-expo);
	}

	.js-motion .cf-step.is-revealed .cf-step__tags li
	{
		opacity:   1;
		transform: none;
	}

	.js-motion .cf-step.is-revealed .cf-step__tags li:nth-child(1) { transition-delay: 220ms; }
	.js-motion .cf-step.is-revealed .cf-step__tags li:nth-child(2) { transition-delay: 280ms; }
	.js-motion .cf-step.is-revealed .cf-step__tags li:nth-child(3) { transition-delay: 340ms; }
	.js-motion .cf-step.is-revealed .cf-step__tags li:nth-child(4) { transition-delay: 400ms; }

	/* L'illustrazione si allarga fino al bordo sinistro del passaggio (colonna del
	   pallino compresa): centrata così, sta al centro dello schermo e non della colonna
	   di testo, che è spostata a destra dal filo. */
	.cf-step__media
	{
		margin-inline-start: calc(-1 * (40px + var(--ags-space-3)));
	}

	.cf-step__icon-wrap
	{
		box-shadow: 0 18px 36px -26px color-mix(in srgb, var(--ags-forest) 55%, transparent);
		max-width:  140px;
	}

	/* Ingresso dell'illustrazione quando arriva lei in vista, non quando entra il
	   passaggio: il riquadro sale e si apre, il disegno dentro si assesta subito dopo. */
	.js-motion .cf-step__icon-wrap[data-reveal-mobile]
	{
		opacity:    0;
		transform:  translateY(32px) scale(0.86);
		transition: opacity 0.6s var(--ags-ease-out), transform 0.9s var(--ags-ease-expo);
	}

	.js-motion .cf-step__icon-wrap[data-reveal-mobile] img
	{
		opacity:    0;
		transform:  scale(0.7) rotate(-8deg);
		transition: opacity 0.6s var(--ags-ease-out) 0.18s, transform 1s var(--ags-ease-expo) 0.18s;
	}

	.js-motion .cf-step__icon-wrap[data-reveal-mobile].is-revealed,
	.js-motion .cf-step__icon-wrap[data-reveal-mobile].is-revealed img
	{
		opacity:   1;
		transform: none;
	}

	/* ---------- Chi può iscriversi ---------- */

	/* Su una colonna la comparsa di gruppo animava le ultime card fuori schermo: ogni
	   card entra da sola quando arriva in vista, alternando sinistra e destra. */
	.js-motion .cf-community [data-reveal-stagger] > *
	{
		opacity:    1;
		transform:  none;
		transition: none;
	}

	.js-motion .cf-type-card[data-reveal-mobile]
	{
		opacity:    0;
		transform:  translateX(-64px);
		transition: opacity 0.7s var(--ags-ease-out), transform 1s var(--ags-ease-expo), border-color 0.3s var(--ags-ease-out), box-shadow 0.4s var(--ags-ease-out);
	}

	.js-motion .cf-community .row > :nth-child(even) .cf-type-card[data-reveal-mobile]
	{
		transform: translateX(64px);
	}

	.js-motion .cf-type-card[data-reveal-mobile].is-revealed,
	.js-motion .cf-community .row > :nth-child(even) .cf-type-card[data-reveal-mobile].is-revealed
	{
		opacity:   1;
		transform: none;
	}

	.js-motion .cf-type-card[data-reveal-mobile] .cf-type-card__icon
	{
		transform: scale(0.6);
	}

	.js-motion .cf-type-card[data-reveal-mobile].is-revealed .cf-type-card__icon
	{
		transform:        none;
		transition-delay: 0.2s;
	}

	/* ---------- Perché AgriGiardiSocial ---------- */

	/* Gerarchia chiara: la foto con il titolo resta una card grande e scura, i tre
	   vantaggi diventano righe compatte e chiare con l'icona a sinistra. */
	.cf-bento__photo
	{
		box-shadow:    0 30px 60px -32px color-mix(in srgb, var(--ags-ink) 75%, transparent);
		margin-bottom: var(--ags-space-3);
		min-height:    420px;
	}

	.cf-bento__title
	{
		font-size: 2rem;
	}

	.cf-bento__lead
	{
		font-size:   1.0625rem;
		line-height: 1.5;
	}

	.cf-bento__benefit,
	.cf-bento__benefit--forest,
	.cf-bento__benefit--soft,
	.cf-bento__benefit--sand
	{
		align-items:           center;
		background:            var(--ags-white);
		border:                1px solid var(--ags-border);
		display:               grid;
		gap:                   var(--ags-space-3);
		grid-template-columns: 48px minmax(0, 1fr);
		padding:               var(--ags-space-3);
	}

	.cf-bento__icon,
	.cf-bento__benefit--forest .cf-bento__icon,
	.cf-bento__benefit--soft .cf-bento__icon,
	.cf-bento__benefit--sand .cf-bento__icon
	{
		background:    var(--ags-green-soft);
		color:         var(--ags-forest);
		margin-bottom: 0;
	}

	.cf-bento__text
	{
		gap: 2px;
	}

	.cf-bento__benefit h3,
	.cf-bento__benefit--forest h3
	{
		color:     var(--ags-ink);
		font-size: 1.0625rem;
		margin:    0;
	}

	.cf-bento__benefit p,
	.cf-bento__benefit--forest p
	{
		color:       var(--ags-muted);
		font-size:   0.875rem;
		line-height: 1.5;
	}

	/* Parole chiave: grassetto del brand su una fascia di evidenziatore alta e tenue. Una
	   linea sottile sotto la parola si leggerebbe come un link. */
	.cf-bento__kw
	{
		background:            linear-gradient(transparent 45%, color-mix(in srgb, var(--ags-moss) 24%, transparent) 45%, color-mix(in srgb, var(--ags-moss) 24%, transparent) 92%, transparent 92%);
		border-radius:         3px;
		box-decoration-break:  clone;
		color:                 var(--ags-forest);
		font-weight:           700;
		padding-inline:        2px;
		-webkit-box-decoration-break: clone;
	}

	.cf-bento__photo .cf-bento__kw
	{
		background: linear-gradient(transparent 45%, color-mix(in srgb, var(--ags-moss) 55%, transparent) 45%, color-mix(in srgb, var(--ags-moss) 55%, transparent) 92%, transparent 92%);
		color:      var(--ags-white);
	}

	/* Ingresso cella per cella: la foto si apre dal basso mentre l'immagine si
	   assesta e il testo sale; i vantaggi salgono e l'icona si accende subito dopo. */
	.js-motion .cf-bento .cf-bento__cell[data-reveal-mobile]
	{
		animation:  none;
		opacity:    0;
		transform:  translateY(40px) scale(0.96);
		transition: opacity 0.7s var(--ags-ease-out), transform 1s var(--ags-ease-expo), clip-path 1.1s var(--ags-ease-expo);
	}

	.js-motion .cf-bento .cf-bento__photo[data-reveal-mobile]
	{
		clip-path: inset(22% 0 0 0 round var(--ags-radius-container));
	}

	.js-motion .cf-bento .cf-bento__cell[data-reveal-mobile].is-revealed
	{
		opacity:   1;
		transform: none;
	}

	.js-motion .cf-bento .cf-bento__photo[data-reveal-mobile].is-revealed
	{
		clip-path: inset(0 round var(--ags-radius-container));
	}

	.js-motion .cf-bento .cf-bento__photo[data-reveal-mobile] img
	{
		transform: scale(1.18);
	}

	.js-motion .cf-bento .cf-bento__photo[data-reveal-mobile].is-revealed img
	{
		transform: none;
	}

	.js-motion .cf-bento .cf-bento__photo[data-reveal-mobile] .cf-bento__intro > *
	{
		opacity:    0;
		transform:  translateY(18px);
		transition: opacity 0.6s var(--ags-ease-out), transform 0.9s var(--ags-ease-expo);
	}

	.js-motion .cf-bento .cf-bento__photo[data-reveal-mobile].is-revealed .cf-bento__intro > *
	{
		opacity:          1;
		transform:        none;
		transition-delay: 0.3s;
	}

	.js-motion .cf-bento .cf-bento__photo[data-reveal-mobile].is-revealed .cf-bento__intro > * + *
	{
		transition-delay: 0.42s;
	}

	.js-motion .cf-bento .cf-bento__benefit[data-reveal-mobile] .cf-bento__icon
	{
		opacity:    0;
		transform:  scale(0.5);
		transition: opacity 0.5s var(--ags-ease-out) 0.2s, transform 0.8s var(--ags-ease-expo) 0.2s;
	}

	.js-motion .cf-bento .cf-bento__benefit[data-reveal-mobile].is-revealed .cf-bento__icon
	{
		opacity:   1;
		transform: none;
	}
}

/* Pallini sincronizzati con il riempimento del filo: ognuno si accende nel punto di
   scorrimento in cui il verde lo raggiunge e si spegne se si torna su. Senza questo
   si accenderebbero all'ingresso in vista, quindi prima dell'arrivo del filo.
   Il filo avanza fra cover 15% e cover 80%; frontend.js scrive in --cf-soglia la
   frazione di filo (0-1) che separa il primo pallino da quello corrente. */
@supports (animation-timeline: view())
{
	@media (prefers-reduced-motion: no-preference)
	{
		.js-motion .cf-step .cf-step__index
		{
			animation-fill-mode:       both;
			animation-name:            cf-pallino-acceso;
			animation-range:           cover calc(14.6% + 65% * var(--cf-soglia, 0)) cover calc(15.4% + 65% * var(--cf-soglia, 0));
			animation-timeline:        --cf-percorso;
			animation-timing-function: linear;
		}
	}
}

@keyframes cf-pallino-acceso
{
	from
	{
		background:   var(--ags-white);
		border-color: var(--ags-border);
		color:        var(--ags-muted);
		transform:    scale(0.9);
	}

	to
	{
		background:   var(--ags-forest);
		border-color: var(--ags-forest);
		color:        var(--ags-white);
		transform:    none;
	}
}

@media (prefers-reduced-motion: reduce)
{
	.cf-step__index,
	.cf-type-card,
	.cf-type-card__icon,
	.cf-bento__benefit,
	.cf-bento__icon,
	.cf-bento__photo img
	{
		transition: none;
	}

	.cf-type-card:hover,
	.cf-type-card:hover .cf-type-card__icon,
	.cf-bento__benefit:hover,
	.cf-bento__benefit:hover .cf-bento__icon
	{
		transform: none;
	}
}

/**
 * SEZIONE FINALE E FOOTER (solo ospiti)
 *
 * La siepe del footer è trasparente fra le foglie e normalmente lascia vedere
 * il crema di fondo del sito: funziona perché quasi ovunque la sezione sopra
 * il footer è chiara. Qui, per gli ospiti, la sezione prima del footer è
 * .ags-section--sand (sabbia), un tono diverso dal crema: senza questa regola
 * si vedrebbe una riga più chiara proprio al confine tra le due sezioni.
 */
.ags-section--sand + footer.ags-footer--dark
{
	background-color: var(--ags-sand);
}

