/*
 * Formaxi 2027 — componenti ed effetti.
 * I valori vengono da theme.json (--wp--preset--*, --wp--custom--*), che a sua volta
 * riprende i token del Design System. Qui non ci sono colori scritti a mano
 * tranne le trasparenze dell'ombra 3D.
 */

:root {
	--fx-bg: var(--wp--preset--color--bg);
	--fx-surface: var(--wp--preset--color--surface);
	--fx-raised: var(--wp--preset--color--surface-raised);
	--fx-line: var(--wp--preset--color--line);
	--fx-text: var(--wp--preset--color--text);
	--fx-muted: var(--wp--preset--color--text-muted);
	--fx-border: var(--wp--preset--color--border);
	--fx-brand: var(--wp--preset--color--brand);
	--fx-brand-text: var(--wp--preset--color--brand-text);
	--fx-on-brand: var(--wp--preset--color--on-brand);
	--fx-cta: var(--wp--preset--color--cta);
	--fx-on-cta: var(--wp--preset--color--on-cta);
	--fx-olive-100: var(--wp--preset--color--olive-100);
	--fx-olive-500: var(--wp--preset--color--olive-500);
	--fx-olive-700: var(--wp--preset--color--olive-700);
	--fx-olive-900: var(--wp--preset--color--olive-900);

	--fx-s2: var(--wp--preset--spacing--space-2);
	--fx-s3: var(--wp--preset--spacing--space-3);
	--fx-s4: var(--wp--preset--spacing--space-4);
	--fx-s6: var(--wp--preset--spacing--space-6);
	--fx-s8: var(--wp--preset--spacing--space-8);
	--fx-s12: var(--wp--preset--spacing--space-12);
	--fx-s16: var(--wp--preset--spacing--space-16);
	--fx-s24: var(--wp--preset--spacing--space-24);

	--fx-ease: var(--wp--custom--motion--ease, cubic-bezier(0.2, 0.8, 0.2, 1));
	--fx-perspective: var(--wp--custom--depth--perspective, 1000px);
	--fx-lift: var(--wp--custom--depth--lift, 36px);
	--fx-scale: var(--wp--custom--depth--scale, 1.035);
	--fx-tilt: var(--wp--custom--depth--tilt, 6deg);

	/* Freccia diagonale ↗ e croce + del Design System, usate come maschere. */
	--fx-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M4 12L12 4M5 4h7v7'/%3E%3C/svg%3E");
	--fx-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M7 12h10M12 7v10'/%3E%3C/svg%3E");
}

/* ---------- Tipografia: ogni misura porta con sé famiglia, interlinea e tracking ---------- */

.has-display-xl-font-size,
.has-display-lg-font-size,
.has-display-md-font-size,
.has-display-sm-font-size {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	text-transform: uppercase;
}
.has-display-xl-font-size { line-height: 0.9; }
.has-display-lg-font-size { line-height: 0.925; }
.has-display-md-font-size { line-height: 1; letter-spacing: 0.01em; }
.has-display-sm-font-size { line-height: 1.0625; letter-spacing: 0.02em; }
.has-title-font-size { font-weight: 600; line-height: 1.333; }
.has-body-lg-font-size { line-height: 1.556; }
.has-small-font-size { line-height: 1.429; }
.has-label-font-size {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	line-height: 1.333;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.wp-block-heading.has-display-xl-font-size,
.wp-block-heading.has-display-lg-font-size,
.wp-block-heading.has-display-md-font-size,
.wp-block-heading.has-display-sm-font-size {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
}
.wp-block-heading.has-label-font-size,
.wp-block-heading.has-title-font-size {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
}

/* Font del Design System su tutto il sito, anche dove il tema padre imposta il suo. */
html body,
html body :where(p, li, a, span, label, td, th, blockquote, figcaption, button, input, select, textarea, nav, .menu a) {
	font-family: var(--wp--preset--font-family--sans);
}
html body :where(h1, h2, h3, h4, h5, h6) {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
}

/* Focus: anello solido da 2px a 3px di distanza, su ogni elemento interattivo. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--fx-cta);
	outline-offset: 3px;
}

.fx-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---------- Layout ---------- */

.fx-section {
	padding-block: var(--fx-s24);
	padding-inline: var(--fx-s16);
}
.fx-band {
	background: var(--fx-surface);
	border-block: 1px solid var(--fx-line);
}
.fx-eyebrow {
	margin-block: 0 var(--fx-s6);
}

/* Motivo di croci "+" tra le sezioni, al passo di 24px. */
.fx-crosses {
	position: relative;
	min-height: calc(var(--fx-s6) * 5);
	margin-block: 0;
}
.fx-crosses::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--fx-line);
	-webkit-mask: var(--fx-plus) 0 0 / 24px 24px repeat;
	mask: var(--fx-plus) 0 0 / 24px 24px repeat;
}

/* ---------- Pulsanti: pill, label MAIUSCOLO, freccia ---------- */

.wp-block-button .wp-block-button__link.wp-element-button {
	display: inline-flex;
	align-items: center;
	gap: var(--fx-s3);
	border-radius: var(--wp--custom--radius--pill, 999px);
	transition: filter 0.18s var(--fx-ease), background-color 0.18s var(--fx-ease);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link.wp-element-button::after {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--fx-arrow) center / contain no-repeat;
	mask: var(--fx-arrow) center / contain no-repeat;
	transition: transform 0.18s var(--fx-ease);
}
.wp-block-button .wp-block-button__link.wp-element-button:hover::after {
	transform: translate(2px, -2px);
}
.wp-block-button .wp-block-button__link.wp-element-button:hover {
	filter: brightness(1.08);
}

/* Secondario: bordo, testo, sfondo trasparente. */
.wp-block-button.is-style-outline .wp-block-button__link.wp-element-button {
	background: transparent;
	color: var(--fx-text);
	border: 1.5px solid var(--fx-border);
}
/* Marchio: azione di rilievo secondaria. */
.wp-block-button.is-style-fx-brand .wp-block-button__link.wp-element-button {
	background: var(--fx-brand);
	color: var(--fx-on-brand);
}
/* Testo: solo label con freccia. */
.wp-block-button.is-style-fx-text .wp-block-button__link.wp-element-button {
	background: transparent;
	color: var(--fx-text);
	padding-inline: 0;
	border-color: transparent;
}

/* ---------- Barra del menu ----------
   Nextawards (Personalizza) e il plugin del menu (variabili --namm-*) impongono nero, #222, verde fluo
   e tendina bianca: qui si riportano barra, voci e tendina alla palette Formaxi. */

html body .header {
	background: var(--fx-bg) !important;
	transition: background-color 0.3s var(--fx-ease);
}
/* [class] alza la specificità sopra la regola del Personalizza per i template trasparenti. */
html body[class].scroll-down .header {
	background: var(--fx-surface) !important;
}
.header .header__content {
	border-color: var(--fx-line);
}
.header nav[role="navigation"] {
	--namm-accent: var(--fx-text);
	--namm-text: var(--fx-text);
	--namm-hover: var(--fx-cta);
	--namm-bg: var(--fx-raised);
	--namm-shadow: 0 12px 32px rgb(0 0 0 / 0.5);
}
.header .menu li a {
	color: var(--fx-text);
	opacity: 1;
}
.header .menu li > a:hover,
.header .menu li.current-menu-item > a,
.header .menu li.current-menu-parent > a {
	color: var(--fx-cta);
}
/* Voci delle tendine: Nextawards le scrive in nero con ".page-template-menu-trasparent .menu li ul > li > a"
   (Home, Articoli, Piani, Area download). ul.sub-menu porta la specificità sopra quella regola. */
.header .menu li ul.sub-menu li > a {
	color: var(--fx-text);
}
.header .menu li ul.sub-menu li > a:hover,
.header .menu li ul.sub-menu li.current-menu-item > a {
	color: var(--fx-cta);
}
.header .menu li ul.sub-menu li > a:hover {
	background: var(--fx-surface);
}
.header .namm-sub-toggle {
	color: inherit;
}
.header .namm-item-desc,
.header nav[role="navigation"] .namm-menu > li.namm-has-mega .namm-sub-dropdown > li > a {
	color: var(--fx-muted);
}
.header nav[role="navigation"] .namm-menu > li.namm-has-mega > .namm-dropdown > li {
	border-color: var(--fx-line);
}
.header .icon-hamburger span {
	background: var(--fx-text);
}
/* Desktop: nel plugin il link è display:flex e la freccia dei sottomenu va a capo sotto di lui,
   così la voce con sottomenu diventa più alta e il menu (centrato in verticale) la sposta in su.
   Link e freccia sulla stessa riga: tutte le voci principali hanno la stessa altezza.
   Le tendine sono assolute e non cambiano. */
@media (min-width: 1191px) {
	.header nav[role="navigation"] .namm-menu > li {
		display: flex;
		align-items: center;
	}
	.header nav[role="navigation"] .namm-menu > li > .namm-sub-toggle {
		display: inline-flex;
		align-items: center;
		margin-left: -12px; /* la freccia si avvicina al testo, dentro il padding del link */
	}
	.header nav[role="navigation"] .namm-menu > li.namm-has-mega > .namm-sub-toggle {
		display: none;
	}
}

/* Menu a tendina mobile di Nextawards (sotto 1190px): il padre colora voci e hamburger
   con --site-text-color, che resta nero. */
@media (max-width: 1190px) {
	.header .menu li { border-color: var(--fx-line); }
	.header nav[role="navigation"] .namm-menu .namm-sub-toggle { border-left-color: var(--fx-line); }
}

/* ---------- Template del tema padre (categorie, tag, ricerca, articolo singolo, 404) ----------
   Nextawards scrive i testi con --site-text-color (nero); i colori arrivano da Personalizza → Colori Formaxi. */

body {
	color: var(--fx-text);
}
#content :where(h1, h2, h3) a,
#content a:has(> h3) {
	color: var(--fx-text);
}
#content :where(h1, h2, h3) a:hover,
#content a:has(> h3):hover {
	color: var(--fx-cta);
}
#content :where(.meta-article, article > p, .p-2 > p) {
	color: var(--fx-muted);
}
#content :where(.meta-article, article > p, .p-2 > p) a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--fx-line);
	text-underline-offset: 3px;
}
#content :where(.meta-article, article > p, .p-2 > p) a:hover {
	color: var(--fx-cta);
}
#content .members-access-error {
	color: var(--fx-muted);
	background: var(--fx-surface);
	border: 1px solid var(--fx-line);
	padding: var(--fx-s4) var(--fx-s6);
}
.form-search {
	background: var(--fx-surface);
	border-color: var(--fx-line);
}
.form-search input[type=search],
.form-search button[type=submit] {
	color: var(--fx-text);
}

/* ---------- Area utenti: moduli Accedi, Registrati, Area personale ---------- */

.fx-form {
	display: grid;
	gap: var(--fx-s4);
	max-width: 36rem;
}
.fx-form p {
	margin: 0;
}
.fx-form label {
	display: block;
	margin-block-end: var(--fx-s2);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--fx-text);
}
.fx-form :is(input[type=text], input[type=email], input[type=password], select) {
	width: 100%;
	padding: 12px 14px;
	background: var(--fx-bg);
	color: var(--fx-text);
	border: 1.5px solid var(--fx-olive-700);
	border-radius: var(--wp--custom--radius--sm, 4px);
	font: inherit;
}
.fx-form :is(input, select):focus {
	border-color: var(--fx-cta);
	outline: none;
}
.fx-form input:disabled {
	opacity: 0.6;
}
.fx-form__riga {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
	gap: var(--fx-s4);
}
.fx-form__scelta label,
.fx-form .login-remember label {
	display: flex;
	gap: var(--fx-s2);
	align-items: flex-start;
	font-weight: 400;
	letter-spacing: 0;
	color: var(--fx-muted);
}
.fx-form__scelta input {
	margin-block-start: 4px;
	accent-color: var(--fx-cta);
}
.fx-form__nota {
	font-weight: 400;
	color: var(--fx-muted);
}
.fx-form__trappola {
	position: absolute;
	left: -9999px;
}
.fx-form .login-submit input[type=submit] {
	padding: 14px 28px;
	border: 0;
	border-radius: 999px;
	background: var(--fx-cta);
	color: var(--fx-on-cta);
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}
.fx-form__link {
	margin-block-start: var(--fx-s4);
	color: var(--fx-muted);
}
.fx-form__link a {
	color: var(--fx-cta);
}
.fx-avviso {
	max-width: 36rem;
	padding: var(--fx-s4) var(--fx-s6);
	border-left: 3px solid var(--fx-cta);
	background: var(--fx-surface);
	color: var(--fx-text);
}
.fx-avviso--errore {
	border-left-color: var(--wp--preset--color--danger, #f0735a);
}
.fx-avviso a {
	color: var(--fx-cta);
}
.fx-area {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
	gap: var(--fx-s12);
}
.fx-lista-download {
	list-style: none;
	margin: 0 0 var(--fx-s6);
	padding: 0;
}
.fx-lista-download li {
	display: flex;
	justify-content: space-between;
	gap: var(--fx-s4);
	padding-block: var(--fx-s3);
	border-bottom: 1px solid var(--fx-line);
}
.fx-lista-download span {
	color: var(--fx-muted);
	white-space: nowrap;
}

/* ---------- Hero ---------- */

.fx-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: min(88vh, 860px);
	background: var(--fx-bg);
	overflow: clip;
}
.fx-hero__inner {
	width: 100%;
	max-width: var(--wp--style--global--content-size, 1200px);
	margin-inline: auto;
}

/* Titolo con blocchi di colore: il testo si fonde dove li incrocia. Misure in em, così
   la composizione scala con il titolo fluido. */
.fx-hero__title {
	position: relative;
	width: fit-content;
	max-width: 100%;
	font-size: var(--wp--preset--font-size--display-xl);
	margin-block-end: var(--fx-s8);
}
.fx-hero__title::before,
.fx-hero__title::after {
	content: "";
	position: absolute;
	z-index: 0;
	pointer-events: none;
}
.fx-hero__title::before {
	width: 1.2em;
	height: 1.9em;
	right: -0.6em;
	top: 0.35em;
	background: var(--fx-cta);
	box-shadow: var(--wp--preset--shadow--glow-cta); /* l'unico alone ammesso, dietro l'elemento hero */
}
.fx-hero__title::after {
	width: 1.6em;
	height: 1.9em;
	right: -2.2em;
	top: -0.55em;
	background: var(--fx-olive-500);
}
.fx-hero__lead {
	max-width: 36rem;
	margin-block: 0 var(--fx-s8);
}

/* ---------- Campo animato (classe "fx-pitch" sul gruppo, disegnato da formaxi-pitch.js) ---------- */

.fx-pitch {
	position: relative;
	isolation: isolate;
}
.fx-pitch__canvas {
	position: absolute;
	inset-block: 0;
	right: 0;
	z-index: 0;
	width: min(55%, 820px);
	height: 100%;
	pointer-events: none;
	/* Sfuma verso il testo a sinistra. */
	-webkit-mask-image: linear-gradient(to right, transparent, #000 35%);
	mask-image: linear-gradient(to right, transparent, #000 35%);
}
.fx-pitch > :not(.fx-pitch__canvas) {
	position: relative;
	z-index: 1;
}

/* ---------- Striscia servizi ---------- */

.fx-strip {
	background: var(--fx-surface);
	border-block: 1px solid var(--fx-line);
	padding-block: var(--fx-s12);
	padding-inline: var(--fx-s16);
}
.fx-strip__item {
	position: relative;
	padding: var(--fx-s8) var(--fx-s6);
	background: var(--fx-surface);
}
.fx-strip__item > * {
	margin-block: 0;
}
.fx-strip__item > * + * {
	margin-block-start: var(--fx-s3);
}
.fx-strip__item::before {
	content: "";
	position: absolute;
	top: var(--fx-s3);
	right: var(--fx-s3);
	width: 24px;
	height: 24px;
	background: var(--fx-line);
	-webkit-mask: var(--fx-plus) center / contain no-repeat;
	mask: var(--fx-plus) center / contain no-repeat;
}
.fx-icon {
	display: block;
	width: 32px;
	height: 32px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	color: var(--fx-brand-text);
	margin-block-end: var(--fx-s6);
}

/* ---------- Card di accesso ai contenuti ---------- */

.fx-card {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--fx-s3);
	aspect-ratio: 3 / 4;
	padding: var(--fx-s4);
	border-radius: var(--wp--custom--radius--sm, 4px);
}
.fx-card > * {
	margin: 0;
}
.fx-card a {
	color: inherit;
	text-decoration: none;
}
/* Tutta la card è cliccabile dal titolo. */
.fx-card a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.fx-cards {
	margin-block-start: var(--fx-s12);
}
.fx-card--brand { background: var(--fx-brand); color: var(--fx-on-brand); }
.fx-card--olive { background: var(--fx-olive-700); color: var(--fx-olive-100); }
.fx-card--raised {
	background: var(--fx-raised);
	color: var(--fx-text);
	border: 1.5px solid var(--fx-border);
}

/* Card di contenuto (articoli e piani nei blocchi Query, file dell'area download): in colonna,
   titolo in alto, poi data e sottotitolo, foto in fondo allineata tra le card della stessa riga.
   Le card della Home (fx-card senza Query) restano affiancate in 3:4. */
.wp-block-post-template > li {
	display: flex;
}
:is(.wp-block-post-template .fx-card, .fx-card--content) {
	flex: 1;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	aspect-ratio: auto;
	gap: var(--fx-s3);
}
.wp-block-post-template .fx-card > .wp-block-post-title { order: 1; }
.wp-block-post-template .fx-card > :is(.wp-block-post-date, .wp-block-post-terms) { order: 2; color: var(--fx-muted); }
.wp-block-post-template .fx-card > .wp-block-post-excerpt { order: 3; color: var(--fx-muted); }
.wp-block-post-template .fx-card > .wp-block-post-excerpt p { margin: 0; }
.wp-block-post-template .fx-card > .wp-block-post-featured-image {
	order: 4;
	margin-block-start: auto;
	padding-block-start: var(--fx-s2);
}
/* La proporzione si sceglie nel blocco "Immagine in evidenza" (Rapporto d'aspetto). */
.wp-block-post-template .fx-card > .wp-block-post-featured-image img {
	width: 100%;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--sm, 4px);
}
.fx-card--content > .wp-block-buttons {
	margin-block-start: auto;
	position: relative;
	z-index: 1; /* il pulsante Scarica resta cliccabile sopra il link della card */
}

/* Cerchio di azione: bordo a riposo, si riempie di lime quando la card è attiva. */
.fx-go {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1.5px solid currentColor;
	transition: background-color 0.2s var(--fx-ease), color 0.2s var(--fx-ease), border-color 0.2s var(--fx-ease);
}
.fx-go::before {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--fx-arrow) center / contain no-repeat;
	mask: var(--fx-arrow) center / contain no-repeat;
}
.fx-card:is(:hover, :focus-within) .fx-go {
	background: var(--fx-cta);
	border-color: var(--fx-cta);
	color: var(--fx-on-cta);
}

/* ---------- Banner largo ---------- */

.fx-banner {
	background: var(--fx-olive-900);
	color: var(--fx-olive-100);
	padding-block: var(--fx-s24);
	padding-inline: var(--fx-s16);
}
.fx-banner .wp-block-columns {
	align-items: center;
	gap: var(--fx-s12);
	margin-block: 0;
}
.fx-banner p {
	color: var(--fx-olive-100);
	margin-block: 0 var(--fx-s6);
}
.fx-banner .wp-block-heading {
	margin-block: 0;
}

/* ---------- Newsletter ---------- */

.fx-newsletter {
	padding-block: var(--fx-s12);
	padding-inline: var(--fx-s16);
	border-top: 1px solid var(--fx-line);
}
.fx-newsletter .wp-block-columns {
	align-items: center;
	margin-block: 0;
}
.fx-newsletter .wp-block-heading,
.fx-newsletter p {
	margin-block: 0;
}
.fx-newsletter form {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fx-s3);
}
/* Il campo pill vale anche per il modulo di un plugin newsletter inserito qui dentro. */
.fx-newsletter :is(input[type="email"], input[type="text"]) {
	flex: 1 1 16rem;
	min-height: 52px;
	padding: 0 var(--fx-s6);
	border: 1.5px solid var(--fx-border);
	border-radius: 999px;
	background: transparent;
	color: var(--fx-text);
	font: inherit;
}
.fx-newsletter ::placeholder {
	color: var(--fx-muted);
	opacity: 1;
}
.fx-newsletter :is(button, input[type="submit"]) {
	min-height: 52px;
	padding: 0 var(--fx-s6);
	border: 1.5px solid transparent;
	border-radius: 999px;
	background: var(--fx-brand);
	color: var(--fx-on-brand);
	font: 600 12px/16px var(--wp--preset--font-family--sans);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
}

/* ---------- Footer a quattro colonne ---------- */

.fx-footer {
	background: var(--fx-surface);
	border-top: 1px solid var(--fx-line);
	padding-block: var(--fx-s12);
	padding-inline: var(--fx-s16);
	font-size: var(--wp--preset--font-size--small);
	color: var(--fx-muted);
}
.fx-footer .wp-block-columns {
	gap: var(--fx-s12);
	margin-block: 0;
}
.fx-footer .wp-block-heading {
	margin-block: 0 var(--fx-s4);
	color: var(--fx-brand-text);
}
.fx-footer .wp-block-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--fx-s2);
}
.fx-footer a {
	color: var(--fx-muted);
	text-decoration: none;
}
.fx-footer a:hover {
	color: var(--fx-text);
}
.fx-footer__logo img {
	display: block;
	width: 180px;
	height: auto;
	margin-block-end: var(--fx-s4);
}

/* ======================================================================
   EFFETTO 1 — Hover 3D e pop-out ("Pop-out 3D" nel pannello Stili)
   transform: perspective + translateZ + scale + inclinazione, con box-shadow dinamico.
   formaxi-fx.js passa la posizione del mouse in --fx-px / --fx-py (da -1 a 1).
   ====================================================================== */

.is-style-fx-pop {
	--fx-px: 0;
	--fx-py: 0;
	position: relative;
	transform-style: preserve-3d;
	transform: perspective(var(--fx-perspective)) translateZ(0) scale(1) rotateX(0deg) rotateY(0deg);
	box-shadow: 0 0 0 1px var(--fx-line);
	transition:
		transform 0.35s var(--fx-ease),
		box-shadow 0.35s var(--fx-ease),
		opacity 0.3s var(--fx-ease);
	will-change: transform;
}
.is-style-fx-pop > * {
	transition: transform 0.35s var(--fx-ease);
}

@media (hover: hover) and (pointer: fine) {
	.is-style-fx-pop:is(:hover, :focus-within) {
		z-index: 3;
		transform:
			perspective(var(--fx-perspective))
			translateZ(var(--fx-lift))
			scale(var(--fx-scale))
			rotateX(calc(var(--fx-py) * var(--fx-tilt) * -1))
			rotateY(calc(var(--fx-px) * var(--fx-tilt)));
		/* L'ombra si sposta dalla parte opposta al puntatore, come una luce sopra la card. */
		box-shadow:
			calc(var(--fx-px) * -28px) calc(var(--fx-py) * -28px + 32px) 64px -12px rgba(0, 0, 0, 0.8),
			0 0 0 1px rgba(139, 146, 92, 0.55);
		box-shadow:
			calc(var(--fx-px) * -28px) calc(var(--fx-py) * -28px + 32px) 64px -12px rgba(0, 0, 0, 0.8),
			0 0 0 1px color-mix(in srgb, var(--fx-brand) 55%, transparent);
	}
	/* Il contenuto sporge ancora di più dalla card. */
	.is-style-fx-pop:is(:hover, :focus-within) > .wp-block-heading {
		transform: translateZ(32px);
	}
	.is-style-fx-pop:is(:hover, :focus-within) > .fx-go {
		transform: translateZ(48px);
	}
}

/* Le card vicine si abbassano e sbiadiscono mentre una è sollevata. */
@media (hover: hover) and (pointer: fine) {
	.fx-pop-group:has(.is-style-fx-pop:hover) .is-style-fx-pop:not(:hover) {
		opacity: 0.55;
		transform: perspective(var(--fx-perspective)) translateZ(-12px) scale(0.985) rotateX(0deg) rotateY(0deg);
	}
}

/* ======================================================================
   EFFETTO 2 — Testi d'impatto ("Testo a fusione" nel pannello Stili)
   mix-blend-mode: difference con il lime del Design System:
   - su nero resta lime (13:1)
   - su un blocco lime diventa nero (13:1)
   - su oliva 900 diventa un verde-lime chiaro (6,5:1)
   Da usare solo su fondi scuri o lime, non su oliva 500/700 né su avorio.
   ====================================================================== */

.is-style-fx-blend:is(h1, h2, h3, h4, h5, h6, p) {
	position: relative;
	z-index: 2;
	color: var(--fx-cta);
	mix-blend-mode: difference;
}

/* ---------- Movimento ridotto ---------- */

@media (prefers-reduced-motion: reduce) {
	.is-style-fx-pop,
	.is-style-fx-pop > *,
	.fx-go,
	.wp-block-button .wp-block-button__link.wp-element-button,
	.wp-block-button .wp-block-button__link.wp-element-button::after {
		transition: none;
	}
	.is-style-fx-pop:is(:hover, :focus-within),
	.is-style-fx-pop:is(:hover, :focus-within) > * {
		transform: none;
	}
	.fx-pop-group:has(.is-style-fx-pop:hover) .is-style-fx-pop:not(:hover) {
		transform: none;
	}
}

/* Nell'editor niente inclinazione: si lavora sui blocchi, non sull'effetto. */
.editor-styles-wrapper .is-style-fx-pop,
.editor-styles-wrapper .is-style-fx-pop:hover,
.editor-styles-wrapper .is-style-fx-pop > * {
	transform: none !important;
}

/* ---------- Mobile ---------- */

@media (max-width: 781px) {
	.fx-hero { min-height: 0; }
	.fx-pitch__canvas { width: 100%; opacity: 0.3; -webkit-mask-image: none; mask-image: none; }
	.fx-hero__title::after { display: none; }
	.fx-hero__title::before { right: -0.3em; width: 0.9em; }
	.fx-card:not(.wp-block-post-template .fx-card, .fx-card--content) { aspect-ratio: 4 / 3; }
	.fx-footer__logo img { width: 150px; }
}
