/* =====================================================================
   TURIYA FX — turiyafx.css v1.4.0
   Oxblood #903637 · Off-black #0F0E0E · Bone #EDE9E3
   Deck cinema: un progetto a pieno schermo, transizioni vanish.
   Home: hero WebGL (marchio = finestra sul collage), griglia, end credits.
   ===================================================================== */

/* ---------- Font ---------- */
@font-face {
	font-family: 'Bricolage';
	src: url('../fonts/Bricolage-Variable.woff2') format('woff2'), url('../fonts/Bricolage-Variable.ttf') format('truetype');
	font-weight: 200 800;
	font-stretch: 75% 125%;
	font-display: swap;
}

@font-face {
	font-family: 'Space Mono';
	src: url('../fonts/SpaceMono-Regular.woff2') format('woff2'), url('../fonts/SpaceMono-Regular.ttf') format('truetype');
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: 'Space Mono';
	src: url('../fonts/SpaceMono-Bold.woff2') format('woff2'), url('../fonts/SpaceMono-Bold.ttf') format('truetype');
	font-weight: 700;
	font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
	--blk: #0F0E0E;
	--blk-2: #17151A;
	--bone: #EDE9E3;
	--wht: #FFFFFF;
	--ox: #903637;
	--ox-2: #B04041;
	--ox-txt: #D4605F; /* oxblood per testo piccolo: contrasto AA su off-black */
	--dim: rgba(237, 233, 227, .55);
	--line: rgba(237, 233, 227, .12);
	--ff: 'Bricolage', 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
	--ff-mono: 'Space Mono', ui-monospace, 'Menlo', monospace;
	--pad: clamp(18px, 4vw, 56px);
	--header-h: 74px;
	--ease-snap: cubic-bezier(.72, 0, .18, 1);
	--ease-out: cubic-bezier(.16, 1, .3, 1);

	--graded-filter: saturate(1.08) contrast(1.05);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body.tfx-body {
	background: var(--blk);
	color: var(--bone);
	font-family: var(--ff);
	font-weight: 400;
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

body.tfx-lock { overflow: hidden; }

/* Il deck (Works) vive a viewport fisso; la home ha la sua chiusura */
body.tfx-page--works { overflow: hidden; height: 100vh; height: 100svh; }
body.tfx-page--home .tfx-footer,
body.tfx-page--works .tfx-footer { display: none; }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--ox); color: var(--wht); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--blk); }
::-webkit-scrollbar-thumb { background: #1e1c1c; border-radius: 99px; border: 2px solid var(--blk); }
::-webkit-scrollbar-thumb:hover { background: var(--ox); }

:focus { outline: none; }
:focus-visible { outline: 1px solid var(--ox-2); outline-offset: 4px; }

/* ---------- Grain + scanline ---------- */
.tfx-grain {
	position: fixed;
	inset: -60px;
	z-index: 3500;
	pointer-events: none;
	opacity: .06;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
	animation: tfx-grain 1.15s steps(3) infinite;
}

@keyframes tfx-grain {
	0% { transform: translate(0, 0); }
	33% { transform: translate(-22px, 14px); }
	66% { transform: translate(16px, -18px); }
	100% { transform: translate(0, 0); }
}

.tfx-scan {
	position: fixed;
	inset: 0;
	z-index: 3400;
	pointer-events: none;
	background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 3px);
	opacity: .12;
	mix-blend-mode: multiply;
}

/* ---------- Cursor ---------- */
.tfx-cursor {
	position: fixed;
	top: 0; left: 0;
	z-index: 4000;
	pointer-events: none;
	transform: translate(-200px, -200px);
	will-change: transform;
}

.tfx-cursor__ring {
	display: block;
	width: 18px; height: 18px;
	margin: -9px 0 0 -9px;
	border-radius: 50%;
	border: 1px solid var(--bone);
	mix-blend-mode: difference;
	transition: transform .3s var(--ease-out);
}

.tfx-cursor__label {
	position: absolute;
	top: 0; left: 0;
	transform: translate(-50%, -50%) scale(0);
	width: 92px; height: 92px;
	border-radius: 50%;
	background: var(--ox);
	color: var(--wht);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--ff-mono);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .2em;
	transition: transform .35s var(--ease-out);
}

.tfx-cursor.is-play .tfx-cursor__ring { transform: scale(0); }
.tfx-cursor.is-play .tfx-cursor__label { transform: translate(-50%, -50%) scale(1); }

@media (pointer: coarse) { .tfx-cursor { display: none; } }

/* ---------- Header ---------- */
.tfx-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 900;
	height: var(--header-h);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 22px;
	padding: 0 var(--pad);
	background: rgba(15, 14, 14, .58);
	-webkit-backdrop-filter: blur(30px) saturate(160%);
	backdrop-filter: blur(30px) saturate(160%);
	border-bottom: 1px solid var(--line);
}

.tfx-logo {
	height: 34px;
	width: auto;
	filter: brightness(0) invert(1);
}

.tfx-header__logo { display: inline-flex; align-items: center; transition: opacity .25s; }
.tfx-header__logo:hover { opacity: .75; }

.tfx-wordmark em { font-style: normal; color: var(--ox); font-weight: 800; }

.tfx-header__nav {
	display: flex;
	justify-content: center;
	gap: 34px;
	font-family: var(--ff-mono);
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.tfx-header__nav a { position: relative; padding: 6px 2px; }
.tfx-header__nav a::after {
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 1px;
	background: var(--ox);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .35s var(--ease-out);
}
.tfx-header__nav a:hover::after { transform: scaleX(1); }

.tfx-header__utils { display: flex; align-items: center; gap: 14px; justify-content: flex-end; }

.tfx-lang { display: flex; font-family: var(--ff-mono); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.tfx-lang__item { padding: 6px 8px; color: var(--dim); transition: color .2s; }
.tfx-lang__item.is-active { color: var(--bone); }
.tfx-lang__item + .tfx-lang__item { border-left: 1px solid var(--line); }
.tfx-lang__item:hover { color: var(--bone); }

.tfx-menu-toggle {
	padding: 10px 18px;
	border: 1px solid var(--line);
	border-radius: 99px;
	font-family: var(--ff-mono);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .2em;
	transition: all .25s;
	display: none;
}
@media (hover: hover) { .tfx-menu-toggle:hover { background: var(--bone); color: var(--blk); border-color: var(--bone); } }

.tfx-menu-toggle__close { display: none; }
body.tfx-menu-open .tfx-menu-toggle__open { display: none; }
body.tfx-menu-open .tfx-menu-toggle__close { display: inline; }

@media (max-width: 900px) {
	.tfx-header { grid-template-columns: 1fr auto; }
	.tfx-header__nav { display: none; }
	.tfx-menu-toggle { display: inline-block; }
	.tfx-logo { height: 28px; }
}

/* ---------- Menu overlay ---------- */
.tfx-menu {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(15, 14, 14, .82);
	-webkit-backdrop-filter: blur(30px) saturate(140%);
	backdrop-filter: blur(30px) saturate(140%);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: calc(var(--header-h) + 10px) 0 90px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .4s var(--ease-out), visibility 0s linear .4s;
}

.tfx-menu.is-open { opacity: 1; visibility: visible; transition: opacity .4s var(--ease-out); }

/* Con il menu aperto l'header resta sopra l'overlay: CLOSE sempre raggiungibile */
body.tfx-menu-open .tfx-header {
	z-index: 1100;
	background: transparent;
	border-bottom-color: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.tfx-menu__item {
	opacity: 0;
	transform: translateY(18px);
	filter: blur(6px);
}

.tfx-menu.is-open .tfx-menu__item {
	opacity: 1;
	transform: none;
	filter: none;
	transition: opacity .6s var(--ease-out), transform .7s var(--ease-out), filter .6s var(--ease-out), color .25s, padding-left .35s var(--ease-out);
}

.tfx-menu.is-open .tfx-menu__item:nth-child(2) { transition-delay: .06s, .06s, .06s, 0s, 0s; }
.tfx-menu.is-open .tfx-menu__item:nth-child(3) { transition-delay: .12s, .12s, .12s, 0s, 0s; }

.tfx-menu__item {
	display: block;
	padding: 14px var(--pad);
	border-top: 1px solid var(--line);
	font-weight: 700;
	text-transform: uppercase;
	font-size: clamp(34px, 7vw, 66px);
	line-height: 1;
	transition: color .25s, padding-left .35s var(--ease-out);
}

.tfx-menu__item:last-child { border-bottom: 1px solid var(--line); }
@media (hover: hover) { .tfx-menu__item:hover { color: var(--ox); padding-left: calc(var(--pad) + 14px); } }

.tfx-menu__foot {
	position: absolute;
	left: var(--pad); right: var(--pad); bottom: 28px;
	display: flex;
	gap: 26px;
	flex-wrap: wrap;
	font-family: var(--ff-mono);
	font-size: 12px;
	color: var(--dim);
}

/* ---------- Grade globale ---------- */
.tfx-card__vid,
.tfx-card__poster,
.tfx-viewer__stage video {
	filter: var(--graded-filter);
}

/* ---------- Utility ---------- */
.tfx-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* =====================================================================
   HOME
   ===================================================================== */

/* Palette della home: bianco e nero, come un negativo */
body.tfx-page--home {
	--h-ink: #0b0b0b;
	--h-paper: #f4f4f2;
	--h-gray: #d8d8d5;
	--h-mid: #8b8b87;
	background-color: var(--h-ink);
	transition: none;
}
body.tfx-page--home .tfx-grain,
body.tfx-page--home .tfx-scan { display: none; }

/* Header: niente vetro, si inverte sul fondo (nero su bianco, bianco su nero) */
body.tfx-page--home .tfx-header {
	background: transparent;
	border-bottom-color: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	mix-blend-mode: difference;
	transition: opacity .9s var(--ease-out), visibility 0s;
}
body.tfx-page--home .tfx-header .tfx-lang__item.is-active,
body.tfx-page--home .tfx-header__nav a { color: #fff; }
html.tfx-loading body.tfx-page--home .tfx-header { opacity: 0; visibility: hidden; }

body.tfx-page--home .tfx-cursor__label { background: var(--h-paper); color: var(--h-ink); }

/* ---------- Atto 0 — Hero WebGL ---------- */
.tfx-hero { position: relative; height: 340vh; }
.tfx-hero.is-static { height: 100vh; height: 100svh; }
.tfx-hero.is-static .tfx-hero__sticky { height: 100%; }

.tfx-hero__sticky {
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100lvh; /* mobile: copre anche lo spazio delle barre del browser quando si ritirano */
	overflow: hidden;
	background: var(--h-paper);
}

/* Video del collage: in pagina (WebKit li ferma se staccati), invisibili */
.tfx-hero__vids {
	position: absolute;
	left: 0; top: 0;
	width: 1px; height: 1px;
	overflow: hidden;
	opacity: .01;
	pointer-events: none;
}
.tfx-hero__vids video { display: block; width: 1px; height: 1px; }

.tfx-hero__gl {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	opacity: 0;
}
.tfx-hero.is-ready .tfx-hero__gl { opacity: 1; }
.tfx-hero.is-static .tfx-hero__gl { display: none; }

/* Senza WebGL: il marchio nero, fermo */
.tfx-hero__still {
	display: none;
	position: absolute;
	left: 50%;
	top: 46%;
	width: min(64vw, 129.7vh, 1024px);
	height: auto;
	transform: translate(-50%, -50%);
	filter: grayscale(1) brightness(4) invert(1);
	mix-blend-mode: multiply;
	pointer-events: none;
}
.tfx-hero.is-static .tfx-hero__still { display: block; }

/* Loader: percentuale reale delle risorse + il punto che diventerà il marchio */
.tfx-loader { display: none; position: absolute; inset: 0; pointer-events: none; }
html.tfx-loading .tfx-loader { display: block; }
.tfx-hero.is-ready .tfx-loader,
.tfx-hero.is-static .tfx-loader { display: none; }

.tfx-loader__dot {
	position: absolute;
	left: 50%;
	top: 46%;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--h-ink);
	transform: translate(-50%, -50%);
}

.tfx-loader__pct {
	position: absolute;
	top: clamp(22px, 3vw, 30px);
	right: var(--pad);
	font-family: var(--ff-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	color: var(--h-ink);
	font-variant-numeric: tabular-nums;
}

.tfx-hero__ui {
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 100vh;
	height: 100svh; /* il testo resta sopra la barra del browser */
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	padding: 0 var(--pad) clamp(22px, 4vh, 40px);
	pointer-events: none;
	color: var(--h-ink);
	opacity: calc(1 - var(--p, 0) * 9);
	transition: opacity .6s var(--ease-out);
}
html.tfx-loading .tfx-hero__ui { opacity: 0; }

.tfx-hero__line {
	max-width: 22ch;
	font-weight: 800;
	font-stretch: 80%;
	text-transform: uppercase;
	font-size: clamp(22px, 2.5vw, 40px);
	line-height: .92;
	letter-spacing: -.005em;
}

.tfx-hero__word { display: inline-block; white-space: nowrap; }
.tfx-hero__word > span { display: inline-block; opacity: 0; }
.tfx-hero__line.is-in .tfx-hero__word > span { animation: tfx-flicker .9s steps(1, end) var(--d, 0ms) forwards; }

@keyframes tfx-flicker {
	0% { opacity: 0; }
	12% { opacity: .9; }
	24% { opacity: .15; }
	40% { opacity: 1; }
	52% { opacity: .45; }
	64%, 100% { opacity: 1; }
}

.tfx-hero__scroll {
	flex: none;
	font-family: var(--ff-mono);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	pointer-events: auto;
	padding: 8px 0;
}

@media (min-width: 701px) and (max-width: 1100px) {
	.tfx-hero__still { top: 44%; width: min(88vw, 108vh); }
	.tfx-loader__dot { top: 44%; }
}

@media (max-width: 700px) {
	.tfx-hero__still { top: 42%; width: min(128vw, 90.8vh); }
	.tfx-loader__dot { top: 42%; }
	.tfx-hero__ui { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 14px; }
	.tfx-hero__line { font-size: clamp(24px, 7.4vw, 34px); }
}

/* ---------- Atto 1 — Lavori ---------- */
.tfx-works {
	position: relative;
	padding: clamp(80px, 14vh, 160px) var(--pad) clamp(140px, 22vh, 260px);
	color: #fff;
}

.tfx-works__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(40px, 6vw, 72px) clamp(16px, 1.8vw, 28px);
	align-items: start;
	padding-bottom: clamp(40px, 8vh, 140px);
	transition: opacity .26s var(--ease-out);
}
.tfx-works__grid.is-switching { opacity: 0; }

@media (min-width: 1280px) { .tfx-works__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(48px, 7vw, 96px) clamp(20px, 2.4vw, 40px); } }
@media (max-width: 1279px) { .tfx-works__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .tfx-works__grid { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; } }

.tfx-pcard {
	display: block;
	opacity: 0;
	transition: opacity 1s var(--ease-out);
	will-change: transform;
}
.tfx-pcard.is-in { opacity: 1; }
.tfx-pcard:nth-child(4n+2) { transition-delay: .08s; }
.tfx-pcard:nth-child(4n+3) { transition-delay: .16s; }
.tfx-pcard:nth-child(4n+4) { transition-delay: .24s; }

.tfx-pcard__media {
	position: relative;
	aspect-ratio: 348 / 259;
	overflow: hidden;
	background: radial-gradient(120% 90% at 50% 40%, rgba(255, 255, 255, .07), transparent 70%), #141414;
}

/* Finché non c'è un fotogramma, il marchio fa da segnaposto */
.tfx-pcard__media::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url('../img/turiya-mask-color.jpg') center / 46% auto no-repeat;
	mix-blend-mode: lighten;
	filter: grayscale(1) brightness(1.4);
	opacity: .22;
}

@media (pointer: fine) { .tfx-pcard__media { cursor: none; } }

.tfx-pcard__poster,
.tfx-pcard__vid {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .9s var(--ease-out), opacity .6s var(--ease-out);
}

.tfx-pcard__vid { opacity: 0; filter: var(--graded-filter); }
.tfx-pcard__media.has-frame .tfx-pcard__vid,
.tfx-pcard__media.is-playing .tfx-pcard__vid { opacity: 1; }

@media (hover: hover) { .tfx-pcard:hover .tfx-pcard__vid, .tfx-pcard:hover .tfx-pcard__poster { transform: scale(1.05); } }

.tfx-pcard__media::after {
	content: '';
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 0 1px rgba(237, 233, 227, 0);
	transition: box-shadow .5s var(--ease-out);
	pointer-events: none;
}
@media (hover: hover) { .tfx-pcard:hover .tfx-pcard__media::after { box-shadow: inset 0 0 0 1px rgba(237, 233, 227, .45); } }
.tfx-pcard:focus-visible .tfx-pcard__media::after { box-shadow: inset 0 0 0 1px rgba(237, 233, 227, .45); }
.tfx-pcard:focus-visible { outline-offset: 6px; }

.tfx-pcard__meta {
	display: grid;
	grid-template-columns: 73% 1fr;
	gap: 14px;
	align-items: start;
	margin-top: 12px;
}

.tfx-pcard__title {
	font-weight: 800;
	font-stretch: 80%;
	text-transform: uppercase;
	font-size: clamp(18px, 1.55vw, 24px);
	line-height: 1;
	letter-spacing: -.005em;
	color: var(--bone);
	transition: color .3s;
}

.tfx-pcard__info {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 3px;
	text-align: right;
}

.tfx-pcard__year {
	font-family: var(--ff-mono);
	font-size: 10px;
	letter-spacing: .1em;
	color: var(--dim);
}

.tfx-pcard__who { font-size: 12px; line-height: 1.25; color: var(--bone); }

/* Vista elenco */
.tfx-works__grid.is-list {
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
	padding-bottom: 0;
	border-bottom: 1px solid var(--line);
}

.tfx-works__grid.is-list .tfx-pcard__media { display: none; }

.tfx-works__grid.is-list .tfx-pcard__meta {
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	margin: 0;
	padding: clamp(16px, 2.4vh, 26px) 0;
	border-top: 1px solid var(--line);
	transition: padding-left .45s var(--ease-out);
}

.tfx-works__grid.is-list .tfx-pcard__title { font-size: clamp(28px, 4.6vw, 72px); line-height: .92; }

.tfx-works__grid.is-list .tfx-pcard__info {
	flex-direction: row;
	align-items: baseline;
	gap: clamp(18px, 4vw, 64px);
}

.tfx-works__grid.is-list .tfx-pcard__who { order: -1; font-size: 13px; color: var(--dim); }

.tfx-works__grid.is-list .tfx-pcard:hover .tfx-pcard__meta { padding-left: 18px; }
.tfx-works__grid.is-list .tfx-pcard__title { color: rgba(255, 255, 255, .55); }
.tfx-works__grid.is-list .tfx-pcard:hover .tfx-pcard__title { color: #fff; }

@media (max-width: 700px) {
	.tfx-works__grid.is-list .tfx-pcard__meta { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.tfx-works__grid.is-list .tfx-pcard__info { justify-content: flex-start; }
}

/* Anteprima che segue il cursore in vista elenco */
.tfx-works__peek {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 60;
	width: clamp(220px, 22vw, 340px);
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--blk-2);
	pointer-events: none;
	opacity: 0;
	clip-path: inset(50% 0 50% 0);
	transition: opacity .3s var(--ease-out), clip-path .45s var(--ease-out);
}
.tfx-works__peek.is-on { opacity: 1; clip-path: inset(0 0 0 0); }
.tfx-works__peek video { width: 100%; height: 100%; object-fit: cover; filter: var(--graded-filter); }

.tfx-works__more { display: flex; justify-content: center; margin-top: clamp(40px, 6vh, 80px); }

.tfx-works__all {
	font-weight: 800;
	font-stretch: 80%;
	text-transform: uppercase;
	font-size: clamp(22px, 2.2vw, 34px);
	text-decoration: underline;
	text-decoration-thickness: .07em;
	text-underline-offset: .14em;
	transition: opacity .25s;
}
.tfx-works__all:hover { opacity: .7; }

.tfx-works__toggle-corner {
	position: absolute;
	inset: -5px;
	border: 1px dashed rgba(255, 255, 255, .35);
	border-radius: 14px;
	pointer-events: none;
}

/* Interruttore griglia / elenco */
.tfx-works__toggle {
	position: fixed;
	left: 50%;
	bottom: clamp(18px, 3vh, 30px);
	z-index: 70;
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px 12px 18px;
	background: rgba(12, 11, 11, .78);
	border: 1px solid var(--line);
	border-radius: 12px;
	-webkit-backdrop-filter: blur(20px) saturate(150%);
	backdrop-filter: blur(20px) saturate(150%);
	font-family: var(--ff-mono);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--bone);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 24px);
	transition: opacity .45s var(--ease-out), transform .55s var(--ease-out), visibility 0s linear .55s, border-color .25s;
}
.tfx-works__toggle.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
	transition: opacity .45s var(--ease-out), transform .55s var(--ease-out), border-color .25s;
}
@media (hover: hover) { .tfx-works__toggle:hover { border-color: rgba(237, 233, 227, .45); } }

.tfx-works__toggle-icon {
	display: grid;
	grid-template-columns: repeat(3, 4px);
	gap: 3px;
}
.tfx-works__toggle-icon b {
	width: 4px; height: 4px;
	background: var(--bone);
	transition: transform .4s var(--ease-out), background .3s;
}
.tfx-works__toggle[aria-pressed="true"] .tfx-works__toggle-icon b { transform: scaleX(2.4); }
.tfx-works__toggle[aria-pressed="true"] .tfx-works__toggle-icon b:nth-child(3n+2),
.tfx-works__toggle[aria-pressed="true"] .tfx-works__toggle-icon b:nth-child(3n+3) { transform: scaleX(0); }

/* ---------- Atto 2 — End credits ---------- */
.tfx-roll {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: clamp(100px, 18vh, 200px) var(--pad) clamp(100px, 16vh, 180px);
	color: #fff;
}

.tfx-roll__h {
	position: relative;
	z-index: 1;
	text-align: center;
	font-weight: 800;
	font-stretch: 78%;
	text-transform: uppercase;
	font-size: clamp(44px, 9.4vw, 156px);
	line-height: .86;
	letter-spacing: -.02em;
	color: var(--bone);
	margin-bottom: clamp(56px, 11vh, 130px);
}

.tfx-roll__wall {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(clamp(120px, 15vw, 220px), 1fr));
	max-width: 1320px;
	margin: 0 auto;
	list-style: none;
}

.tfx-roll__cell {
	display: flex;
	align-items: center;
	justify-content: center;
	height: clamp(92px, 12vw, 160px);
	padding: 0 clamp(10px, 2vw, 28px);
}

.tfx-roll__logo {
	width: auto;
	max-width: 100%;
	max-height: 76px;
	opacity: 0;
}

.tfx-roll__cell.is-mono .tfx-roll__logo {
	opacity: calc(.16 + .84 * var(--lit, 0));
	transform: scale(calc(.97 + .06 * var(--lit, 0)));
}

.tfx-roll__cell.is-raw .tfx-roll__logo {
	opacity: calc(.4 + .6 * var(--lit, 0));
	max-height: 56px;
	padding: 8px 14px;
	background: var(--bone);
	border-radius: 8px;
}

.tfx-roll.is-still .tfx-roll__cell { --lit: .85; }

/* Fascio del proiettore */
.tfx-roll__beam {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 0;
	width: 1000px;
	height: 1000px;
	margin: -500px 0 0 -500px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .04) 30%, rgba(255, 255, 255, 0) 62%);
	pointer-events: none;
	will-change: transform;
}
.tfx-roll.is-still .tfx-roll__beam { display: none; }

/* ---------- Studio — la sezione chiara ---------- */
.tfx-studio {
	position: relative;
	overflow: hidden;
	color: var(--h-ink);
	padding: clamp(110px, 20vh, 220px) var(--pad) clamp(120px, 22vh, 240px);
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='12'%3E%3Cpath d='M.5 0v6' stroke='%230b0b0b' stroke-opacity='.4'/%3E%3C/svg%3E"),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='12'%3E%3Cpath d='M.5 0v6' stroke='%230b0b0b' stroke-opacity='.4'/%3E%3C/svg%3E"),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='12'%3E%3Cpath d='M.5 0v6' stroke='%230b0b0b' stroke-opacity='.4'/%3E%3C/svg%3E");
	background-repeat: repeat-y;
	background-size: 1px 12px;
	background-position: 25% 0, 50% 0, 75% 0;
}

.tfx-studio__topo {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(150vw, 2000px);
	transform: translate(-50%, -50%);
	opacity: 0;
	transition: opacity 1.2s var(--ease-out);
	pointer-events: none;
}
.tfx-studio__topo img { width: 100%; height: auto; opacity: .38; }
.tfx-studio.is-lit .tfx-studio__topo { opacity: 1; }

.tfx-studio__in { position: relative; max-width: 1400px; margin: 0 auto; }

.tfx-studio__lbl {
	font-family: var(--ff-mono);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	margin-bottom: 18px;
}

.tfx-studio__line {
	max-width: 1180px;
	font-weight: 800;
	font-stretch: 80%;
	text-transform: uppercase;
	font-size: clamp(30px, 4.7vw, 78px);
	line-height: .93;
	letter-spacing: -.01em;
	text-align: justify;
	text-align-last: left;
	hyphens: manual;
}

.tfx-studio__about {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 18px clamp(16px, 2vw, 32px);
	margin-top: clamp(48px, 9vh, 100px);
}
.tfx-studio__about p {
	grid-column: span 4;
	font-size: clamp(16px, 1.2vw, 19px);
	line-height: 1.5;
}
.tfx-studio__about p:first-child { grid-column: 2 / span 4; }
.tfx-studio__family {
	font-family: var(--ff-mono);
	font-size: 12px !important;
	letter-spacing: .04em;
	line-height: 1.6 !important;
	align-self: end;
}
.tfx-studio__family a { text-decoration: underline; text-underline-offset: 3px; }

.tfx-studio__h {
	margin: clamp(120px, 22vh, 240px) 0 0 clamp(0px, 9vw, 140px);
	max-width: 15ch;
	font-weight: 800;
	font-stretch: 80%;
	text-transform: uppercase;
	font-size: clamp(30px, 4.4vw, 72px);
	line-height: .93;
	letter-spacing: -.01em;
}

.tfx-studio__cards {
	position: relative;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	grid-template-rows: auto auto;
	margin-top: clamp(40px, 8vh, 90px);
	min-height: 520px;
}

.tfx-scard {
	position: relative;
	padding: clamp(22px, 2.6vw, 36px);
	background: var(--h-gray);
	transition: transform .8s var(--ease-out);
}
.tfx-scard:hover { transform: none !important; }

.tfx-scard::before,
.tfx-scard::after {
	content: '';
	position: absolute;
	width: 5px;
	height: 5px;
	background: var(--h-ink);
}
.tfx-scard::before { left: -2px; top: -2px; }
.tfx-scard::after { right: -2px; bottom: -2px; }

.tfx-scard__k {
	font-family: var(--ff-mono);
	font-size: 10px;
	letter-spacing: .12em;
	text-transform: uppercase;
	margin-bottom: 18px;
}

.tfx-scard ul { display: grid; gap: 2px; }
.tfx-scard__svcs { gap: 12px !important; }
.tfx-scard__svcs li { display: grid; gap: 3px; }
.tfx-scard__svcs span {
	font-family: var(--ff);
	font-weight: 400;
	font-stretch: 100%;
	text-transform: none;
	font-size: 13px;
	line-height: 1.35;
	opacity: .78;
}
.tfx-scard li,
.tfx-scard__run {
	font-weight: 800;
	font-stretch: 82%;
	text-transform: uppercase;
	font-size: clamp(14px, 1.15vw, 18px);
	line-height: 1.12;
}

.tfx-scard--svc {
	grid-column: 2 / span 4;
	grid-row: 1 / span 2;
	align-self: center;
	z-index: 2;
	background: #f6efec;
	margin-top: 120px;
}
.tfx-scard--brands {
	grid-column: 6 / span 4;
	grid-row: 1;
	z-index: 1;
	transform: rotate(-1.2deg);
}
.tfx-scard--artists {
	grid-column: 2 / span 8;
	grid-row: 3;
	margin-top: -30px;
	z-index: 3;
	transform: rotate(1.6deg);
	background: #c9c9c6;
}
.tfx-scard--artists .tfx-scard__run { font-size: clamp(16px, 1.6vw, 24px); max-width: 60ch; }

.tfx-studio__sq {
	position: absolute;
	width: 16px;
	height: 16px;
	border: 1px solid var(--h-ink);
	opacity: .55;
}
.tfx-studio__sq--1 { right: 6%; top: 4%; }
.tfx-studio__sq--2 { left: 1%; bottom: 18%; }
.tfx-studio__sq--3 { right: 22%; bottom: -6%; }

@media (max-width: 900px) {
	.tfx-studio { background-position: 50% 0, 50% 0, 50% 0; }
	.tfx-studio__h { margin-left: 0; }
	.tfx-studio__about { grid-template-columns: minmax(0, 1fr); }
	.tfx-studio__about p, .tfx-studio__about p:first-child { grid-column: auto; }
	.tfx-studio__cards { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
	.tfx-scard--svc { margin-top: 0; }
	.tfx-scard--artists { margin-top: 0; }
	.tfx-studio__sq { display: none; }
}

/* ---------- Chiusura: la bobina ---------- */
.tfx-finale {
	position: relative;
	height: 100vh;
	height: 100svh;
	min-height: 560px;
	overflow: hidden;
	color: #fff;
}

.tfx-finale__gl {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	cursor: grab;
	touch-action: pan-y;
}
.tfx-finale__gl.is-grabbing { cursor: grabbing; }

.tfx-finale__side {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--ff-mono);
	font-size: 10px;
	letter-spacing: .12em;
	text-transform: uppercase;
	pointer-events: none;
}
.tfx-finale__side--l { left: var(--pad); }
.tfx-finale__side--r { right: var(--pad); }

.tfx-finale__cta {
	position: absolute;
	left: 50%;
	top: 64%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	pointer-events: none;
	z-index: 2;
}

.tfx-finale__talk,
.tfx-finale__work {
	font-weight: 800;
	font-stretch: 80%;
	text-transform: uppercase;
	font-size: clamp(32px, 4.2vw, 66px);
	line-height: .96;
	letter-spacing: -.005em;
	white-space: nowrap;
}

.tfx-finale__work {
	pointer-events: auto;
	text-decoration: underline;
	text-decoration-thickness: .07em;
	text-underline-offset: .12em;
	transition: opacity .25s;
}
.tfx-finale__work:hover { opacity: .7; }

.tfx-finale__legal {
	position: absolute;
	left: var(--pad);
	right: var(--pad);
	bottom: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 24px;
	padding: 22px 0;
	border-top: 1px dashed rgba(255, 255, 255, .4);
	font-family: var(--ff-mono);
	font-size: 10px;
	letter-spacing: .08em;
	color: rgba(255, 255, 255, .7);
}
.tfx-finale__legal nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.tfx-finale__legal a { transition: color .2s; }
.tfx-finale__legal a:hover { color: #fff; }

@media (max-width: 900px) {
	.tfx-finale { height: 100svh; min-height: 520px; }
	.tfx-finale__side { display: none; }
	.tfx-finale__cta { top: 58%; }
	.tfx-finale__legal { justify-content: flex-start; }
	.tfx-contact { padding-bottom: 180px; }
}

/* =====================================================================
   CIAK — contatti (modale in home, pagina Contact)
   ===================================================================== */
.tfx-sb {
	--ink: #0b0b0b;
	--paper: #f4f4f2;
	position: relative;
	width: min(1040px, 100%);
	max-height: 100%;
	display: flex;
	flex-direction: column;
	color: var(--ink);
	transform-origin: 50% 0;
}

.tfx-sb { opacity: 0; transform: translateY(70px) rotateX(28deg) scale(.95); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); }
.tfx-sb.is-in { opacity: 1; transform: none; }

@keyframes tfx-sb-in {
	0% { opacity: 0; transform: translateY(70px) rotateX(34deg) scale(.94); }
	100% { opacity: 1; transform: none; }
}

/* Le due stecche del ciak */
.tfx-sb__clapper { position: relative; flex: none; height: 74px; }

.tfx-sb__stick {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 34px;
	border: 2px solid var(--ink);
	background: repeating-linear-gradient(-55deg, var(--ink) 0 22px, var(--paper) 22px 44px);
}

.tfx-sb__stick--top {
	bottom: 38px;
	transform-origin: 2px 100%;
	transform: rotate(-11deg);
	background: repeating-linear-gradient(55deg, var(--ink) 0 22px, var(--paper) 22px 44px);
}

.tfx-sb.is-clap .tfx-sb__stick--top { animation: tfx-clap .62s cubic-bezier(.7, 0, .2, 1) .1s forwards; }
.tfx-sb.is-clap .tfx-sb__board { animation: tfx-jolt .3s ease-out .5s; }

@keyframes tfx-clap {
	0% { transform: rotate(-11deg); }
	45% { transform: rotate(-24deg); }
	80% { transform: rotate(0deg); }
	88% { transform: rotate(-1.4deg); }
	100% { transform: rotate(0deg); }
}

@keyframes tfx-jolt {
	0%, 100% { transform: none; }
	35% { transform: translateY(3px); }
}

.tfx-sb__board {
	min-height: 0;
	overflow-y: auto;
	background: var(--paper);
	border: 2px solid var(--ink);
	border-top: 0;
}

.tfx-sb__cell {
	position: relative;
	padding: 14px 18px 16px;
	border-right: 1px solid var(--ink);
	border-bottom: 1px solid var(--ink);
}

.tfx-sb__k {
	display: block;
	margin-bottom: 8px;
	font-family: var(--ff-mono);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	opacity: .7;
}

.tfx-sb__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--ink); }
.tfx-sb__head .tfx-sb__cell { border-bottom: 0; }
.tfx-sb__head .tfx-sb__cell--title { border-right: 0; }

.tfx-sb__h {
	font-weight: 800;
	font-stretch: 78%;
	text-transform: uppercase;
	font-size: clamp(34px, 5.4vw, 80px);
	line-height: .86;
	letter-spacing: -.015em;
}

.tfx-sb__info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tfx-sb__info .tfx-sb__cell:last-child { border-right: 0; }
.tfx-sb__info p { font-weight: 700; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.tfx-sb__info a { text-decoration: underline; text-underline-offset: 3px; }
.tfx-sb__info a:hover { text-decoration-thickness: 2px; }

.tfx-sb__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tfx-sb__field { display: block; cursor: text; transition: background .2s; }
.tfx-sb__field:nth-child(2) { border-right: 0; }
.tfx-sb__field--notes { grid-column: 1 / -1; border-right: 0; }
.tfx-sb__field:focus-within { background: #e6e6e2; }

.tfx-sb__field input,
.tfx-sb__field textarea {
	width: 100%;
	padding: 2px 0;
	background: transparent;
	border: 0;
	color: var(--ink);
	font: inherit;
	font-size: 18px;
	font-weight: 600;
	resize: vertical;
}
.tfx-sb__field input:focus,
.tfx-sb__field textarea:focus { outline: none; }

.tfx-sb__foot { display: grid; grid-template-columns: auto auto minmax(0, 1fr); }
.tfx-sb__scene { min-width: 120px; border-bottom: 0; }
.tfx-sb__scene b { font-family: var(--ff-mono); font-size: 26px; font-weight: 700; }

.tfx-sb__roll {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 76px;
	background: var(--paper);
	color: var(--ink);
	border-left: 1px solid var(--ink);
	font-family: var(--ff-mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .26em;
	text-transform: uppercase;
	transition: background .2s, color .2s, gap .25s var(--ease-out);
}
.tfx-sb__roll i { font-style: normal; font-size: 16px; }
@media (hover: hover) { .tfx-sb__roll:hover { background: var(--ink); color: var(--paper); gap: 22px; } }
.tfx-sb__roll:focus-visible { background: var(--ink); color: var(--paper); gap: 22px; }

.tfx-sb__notice { padding: 14px 18px; border-bottom: 1px solid var(--ink); font-weight: 700; }
.tfx-sb__notice--ok { background: var(--ink); color: var(--paper); }
.tfx-sb__notice--err { background: #f1d9d9; }

.tfx-sb :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Sezione Contact: il ciak al centro, note legali in fondo */
.tfx-contact {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100svh;
	padding: calc(var(--header-h) + 4vh) var(--pad) 120px;
	perspective: 1400px;
	overflow: hidden; /* il ciak in prospettiva non allarga la pagina su mobile */
	color: #fff;
}

@media (max-width: 760px) {
	.tfx-sb__clapper { height: 58px; }
	.tfx-sb__stick { height: 26px; }
	.tfx-sb__stick--top { bottom: 30px; }
	.tfx-sb__info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tfx-sb__info .tfx-sb__cell:nth-child(2n) { border-right: 0; }
	.tfx-sb__fields { grid-template-columns: minmax(0, 1fr); }
	.tfx-sb__field { border-right: 0; }
	.tfx-sb__foot { grid-template-columns: 1fr 1fr; }
	.tfx-sb__scene:nth-child(2) { border-right: 0; }
	.tfx-sb__roll { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ink); }
	.tfx-sb__h { font-size: clamp(28px, 8.4vw, 40px); }
}

@media (prefers-reduced-motion: reduce) {
	.tfx-hero__word > span { opacity: 1; }
	.tfx-sb { opacity: 1; transform: none; }
}

/* ---------- DECK CINEMA ---------- */
.tfx-deck {
	position: fixed;
	inset: 0;
	background: var(--blk);
	overflow: hidden;
	touch-action: none;
}

.tfx-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transform: scale(1.05);
	filter: blur(26px);
	transition:
		opacity .95s var(--ease-out),
		transform .95s var(--ease-out),
		filter .95s var(--ease-out),
		visibility 0s linear .95s;
}

.tfx-slide.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
	filter: none;
	z-index: 2;
	transition:
		opacity .95s var(--ease-out),
		transform .95s var(--ease-out),
		filter .95s var(--ease-out);
}

.tfx-slide.is-leaving {
	opacity: 0;
	visibility: visible;
	transform: scale(1.06);
	filter: blur(30px) brightness(1.25);
	z-index: 3;
	transition:
		opacity .95s var(--ease-out),
		transform .95s var(--ease-out),
		filter .95s var(--ease-out);
}

.tfx-card__media {
	position: absolute;
	inset: 0;
	background: var(--blk-2);
	overflow: hidden;
	cursor: none;
}

@media (pointer: coarse) { .tfx-card__media { cursor: pointer; } }

.tfx-card__vid,
.tfx-card__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tfx-card__poster { z-index: 2; transition: opacity .5s; }
.tfx-slide.is-playing .tfx-card__poster { opacity: 0; }

.tfx-card__ph {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		linear-gradient(160deg, rgba(144, 54, 55, .12), transparent 55%),
		var(--blk-2);
}

.tfx-card__ph span {
	font-family: var(--ff-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .3em;
	color: var(--dim);
}

.tfx-card__veil {
	position: absolute;
	inset: 0;
	z-index: 3;
	background: linear-gradient(180deg, rgba(0,0,0,.32) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.05) 55%, rgba(0,0,0,.72) 100%);
	pointer-events: none;
}

/* Dettagli slide — stagger all'attivazione */
.tfx-slide__info {
	position: absolute;
	left: var(--pad); right: var(--pad);
	bottom: clamp(42px, 8vh, 88px);
	z-index: 4;
	pointer-events: none;
}

.tfx-slide__meta {
	display: flex;
	gap: 18px;
	align-items: center;
	font-family: var(--ff-mono);
	font-size: 11px;
	letter-spacing: .18em;
	margin-bottom: 14px;
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .7s var(--ease-out) .25s, transform .7s var(--ease-out) .25s;
}

.tfx-slide__meta b { color: var(--ox-txt); font-weight: 700; }
.tfx-slide__meta i { font-style: normal; color: var(--dim); }

.tfx-slide__title {
	font-weight: 800;
	font-stretch: 80%;
	text-transform: uppercase;
	font-size: clamp(32px, 6.6vw, 108px);
	line-height: .9;
	letter-spacing: .09em;
	color: var(--bone);
	opacity: 0;
	transform: translateY(26px);
	filter: blur(10px);
	transition: opacity .8s var(--ease-out) .35s, transform .8s var(--ease-out) .35s, filter .8s var(--ease-out) .35s, letter-spacing 1.2s var(--ease-out) .35s;
}

.tfx-slide__client {
	margin-top: 12px;
	font-family: var(--ff-mono);
	font-size: 12px;
	letter-spacing: .18em;
	color: var(--bone);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .7s var(--ease-out) .45s, transform .7s var(--ease-out) .45s;
}

.tfx-slide.is-active .tfx-slide__meta,
.tfx-slide.is-active .tfx-slide__title,
.tfx-slide.is-active .tfx-slide__client {
	opacity: 1;
	transform: none;
	filter: none;
}

.tfx-slide.is-active .tfx-slide__title { letter-spacing: -.014em; }

.tfx-slide.is-active .tfx-slide__client { opacity: .8; }

/* UI del deck */
.tfx-deck__ui {
	position: absolute;
	inset: 0;
	z-index: 10;
	pointer-events: none;
}

.tfx-deck__counter {
	position: absolute;
	right: var(--pad);
	bottom: clamp(42px, 8vh, 88px);
	display: flex;
	align-items: baseline;
	gap: 10px;
	font-family: var(--ff-mono);
	letter-spacing: .12em;
}

.tfx-deck__counter #tfx-deck-cur { font-size: clamp(22px, 2.6vw, 34px); font-weight: 700; color: var(--bone); }
.tfx-deck__counter i { font-style: normal; color: var(--dim); }
.tfx-deck__counter span:last-child { font-size: 13px; color: var(--dim); }

.tfx-deck__hint {
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	font-family: var(--ff-mono);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .3em;
	color: rgba(237, 233, 227, .5);
	animation: tfx-hint 2.4s ease-in-out infinite;
}

.tfx-deck__hint--touch { display: none; }
@media (pointer: coarse) {
	.tfx-deck__hint--fine { display: none; }
	.tfx-deck__hint--touch { display: inline; }
}

@keyframes tfx-hint {
	0%, 100% { opacity: .45; }
	50% { opacity: 1; }
}

.tfx-deck__navs {
	position: absolute;
	right: var(--pad);
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: auto;
}

.tfx-deck__nav {
	width: 46px; height: 46px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: rgba(0, 0, 0, .3);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	color: var(--bone);
	font-size: 16px;
	transition: background .25s, border-color .25s, color .25s;
}

@media (hover: hover) { .tfx-deck__nav:hover { background: var(--ox); border-color: var(--ox); color: var(--wht); } }

@media (max-width: 900px) {
	.tfx-deck__navs { display: none; }
}

@media (max-width: 600px) {
	.tfx-slide__title,
	.tfx-slide__client { padding-right: 100px; }
}

/* End credits slide */
.tfx-slide--end { background: var(--blk); cursor: default; }

.tfx-end {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 26px;
	padding: calc(var(--header-h) + 20px) var(--pad) 60px;
	text-align: center;
	overflow-y: auto;
}

.tfx-end::before {
	content: '';
	position: absolute;
	left: 50%; top: 50%;
	width: 90vmax; height: 90vmax;
	transform: translate(-50%, -50%);
	background: radial-gradient(circle, rgba(144, 54, 55, .18) 0%, transparent 55%);
	filter: blur(60px);
	pointer-events: none;
}

.tfx-end > * { position: relative; }

.tfx-end__logo {
	height: clamp(60px, 11vh, 110px);
	width: auto;
	filter: brightness(0) invert(1);
}

.tfx-end__logos {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 26px 40px;
	max-width: 900px;
	margin-top: 8px;
}

.tfx-end__logoimg {
	height: 56px;
	width: auto;
	background: var(--bone);
	padding: 10px 16px;
	border-radius: 8px;
	transition: transform .3s var(--ease-out);
}

.tfx-end__logoimg:hover { transform: translateY(-3px); }

.tfx-end__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 26px;
	margin-top: 14px;
	max-width: 860px;
	font-family: var(--ff-mono);
	font-size: 10px;
	letter-spacing: .16em;
	color: var(--dim);
	pointer-events: auto;
}

.tfx-end__legal a { transition: color .2s; }
.tfx-end__legal a:hover { color: var(--ox-2); }

/* ---------- Pills / Viewer ---------- */
.tfx-pill {
	padding: 12px 22px;
	border: 1px solid rgba(237, 233, 227, .3);
	border-radius: 99px;
	background: rgba(0, 0, 0, .35);
	-webkit-backdrop-filter: blur(18px) saturate(150%);
	backdrop-filter: blur(18px) saturate(150%);
	font-family: var(--ff-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--bone);
	transition: background .25s, border-color .25s, color .25s, transform .25s;
}
@media (hover: hover) { .tfx-pill:hover { background: var(--bone); border-color: var(--bone); color: var(--blk); transform: translateY(-1px); } }
.tfx-pill--acc { background: var(--ox); border-color: var(--ox); color: var(--wht); }
@media (hover: hover) { .tfx-pill--acc:hover { background: var(--bone); border-color: var(--bone); color: var(--blk); } }

.tfx-cta {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 16px 24px;
	border: 1px solid var(--bone);
	border-radius: 99px;
	background: rgba(0, 0, 0, .28);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	font-family: var(--ff-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: lowercase;
	pointer-events: auto;
	transition: background .3s, color .3s, border-color .3s, gap .3s;
}

.tfx-cta em { font-style: normal; transition: transform .3s var(--ease-out); }
@media (hover: hover) { .tfx-cta:hover { background: var(--ox); border-color: var(--ox); color: var(--wht); gap: 22px; } }
@media (hover: hover) { .tfx-cta:hover em { transform: translateX(4px); } }

.tfx-viewer {
	position: fixed;
	inset: 0;
	z-index: 2200;
	background: var(--blk);
	opacity: 0;
	visibility: hidden;
	transition: opacity .4s var(--ease-out), visibility 0s linear .4s;
}

.tfx-viewer.is-open { opacity: 1; visibility: visible; transition: opacity .4s var(--ease-out); }

.tfx-viewer__stage { position: absolute; inset: 0; }
.tfx-viewer__stage video { width: 100%; height: 100%; object-fit: contain; background: var(--blk); }

.tfx-viewer__stage { touch-action: none; }
.tfx-viewer__stage video { transition: opacity .35s var(--ease-out); }

/* Caricamento: poster subito, poi una spia REC finché il video non parte */
.tfx-viewer__load {
	position: absolute;
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	display: none;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-radius: 99px;
	background: rgba(0, 0, 0, .55);
	font-family: var(--ff-mono);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .24em;
	color: var(--bone);
	pointer-events: none;
}
.tfx-viewer__load i { width: 7px; height: 7px; border-radius: 50%; background: var(--ox-2); animation: tfx-rec 1s steps(2, end) infinite; }
.tfx-viewer.is-loading .tfx-viewer__load { display: inline-flex; }
@keyframes tfx-rec { 50% { opacity: .15; } }

/* Tocco sul video: play / pausa con un lampo al centro */
.tfx-viewer__flash {
	position: absolute;
	left: 50%; top: 50%;
	width: 74px; height: 74px;
	margin: -37px 0 0 -37px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .5);
	display: grid;
	place-items: center;
	font-size: 20px;
	color: #fff;
	opacity: 0;
	pointer-events: none;
}
.tfx-viewer__flash.is-on { animation: tfx-flash .6s var(--ease-out); }
@keyframes tfx-flash { 0% { opacity: 1; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.25); } }

.tfx-viewer__top {
	position: absolute;
	left: 0; right: 0; top: 0;
	z-index: 7;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	padding: calc(env(safe-area-inset-top, 0px) + 22px) var(--pad) 40px;
	background: linear-gradient(rgba(0, 0, 0, .45), transparent);
	pointer-events: none;
	transition: opacity .45s var(--ease-out);
}

.tfx-viewer__title {
	flex: 1;
	min-width: 0;
	padding-top: 8px;
	font-weight: 800;
	font-stretch: 80%;
	text-transform: uppercase;
	font-size: clamp(20px, 3vw, 42px);
	line-height: .95;
	text-shadow: 0 4px 30px rgba(0, 0, 0, .6);
}

.tfx-viewer__close {
	flex: none;
	width: 46px; height: 46px;
	border-radius: 50%;
	border: 1px solid rgba(237, 233, 227, .28);
	background: rgba(12, 11, 11, .55);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	color: var(--bone);
	font-size: 15px;
	pointer-events: auto;
	transition: background .25s, color .25s, border-color .25s;
}
@media (hover: hover) { .tfx-viewer__close:hover { background: var(--ox); border-color: var(--ox); color: var(--wht); } }

/* Inattivo mentre il video gira: interfaccia via, resta solo il film */
.tfx-viewer.is-idle .tfx-viewer__top,
.tfx-viewer.is-idle .tfx-transport { opacity: 0; pointer-events: none; }
.tfx-viewer.is-idle .tfx-viewer__close { pointer-events: none; }
.tfx-viewer.is-idle { cursor: none; }

.tfx-credits {
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: min(480px, 92vw);
	z-index: 8;
	background: rgba(15, 14, 14, .58);
	-webkit-backdrop-filter: blur(30px) saturate(160%);
	backdrop-filter: blur(30px) saturate(160%);
	border-left: 1px solid var(--line);
	padding: 96px 40px 40px;
	transform: translateX(102%);
	transition: transform .55s var(--ease-out);
	overflow-y: auto;
}

.tfx-credits.is-open { transform: none; }

.tfx-credits h3 {
	font-weight: 800;
	font-stretch: 80%;
	font-size: 24px;
	margin-bottom: 28px;
	text-transform: uppercase;
}

.tfx-credits li {
	display: flex;
	justify-content: space-between;
	gap: 18px;
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
	opacity: 0;
	transform: translateX(24px);
	transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
	transition-delay: calc(var(--i, 0) * 55ms);
	font-size: 14px;
}

.tfx-credits.is-open li { opacity: 1; transform: none; }

.tfx-credits li b {
	font-family: var(--ff-mono);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--ox-txt);
	flex: 0 0 46%;
}

/* ---------- Pagine statiche ---------- */
.tfx-page { padding-top: var(--header-h); min-height: 100vh; }

.tfx-pagehead { padding: clamp(28px, 6vh, 64px) var(--pad) clamp(16px, 3vh, 34px); }
.tfx-pagehead h1 {
	font-weight: 800;
	font-stretch: 80%;
	text-transform: uppercase;
	font-size: clamp(34px, 5.6vw, 84px);
	line-height: .95;
}

.tfx-eyebrow {
	font-family: var(--ff-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: var(--ox-txt);
	margin-bottom: 22px;
}

.tfx-sec__head { padding: clamp(40px, 8vh, 90px) var(--pad) clamp(16px, 3vh, 30px); }

.tfx-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ---------- Doc ---------- */
.tfx-doc { padding: 20px var(--pad) 100px; max-width: 860px; color: rgba(237, 233, 227, .85); }
.tfx-doc h2, .tfx-doc h3 { margin: 34px 0 14px; font-weight: 800; font-stretch: 80%; text-transform: uppercase; }
.tfx-doc p, .tfx-doc ul, .tfx-doc ol { margin-bottom: 16px; }
.tfx-doc ul { list-style: disc; padding-left: 22px; }
.tfx-doc a { color: var(--ox-txt); text-decoration: underline; }

/* ---------- Footer (pagine statiche) ---------- */
.tfx-footer { border-top: 1px solid var(--line); background: var(--blk); overflow: hidden; }

.tfx-footer__word {
	padding: clamp(30px, 6vh, 60px) var(--pad) 0;
	font-weight: 800;
	font-stretch: 80%;
	text-transform: uppercase;
	font-size: clamp(44px, 9vw, 148px);
	line-height: .9;
	letter-spacing: -.015em;
	color: var(--bone);
}

.tfx-footer__word em { font-style: normal; color: var(--ox); }

.tfx-footer__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	padding: clamp(30px, 5vh, 50px) var(--pad) clamp(40px, 7vh, 70px);
	font-family: var(--ff-mono);
	font-size: 13px;
	line-height: 22px;
	color: rgba(237, 233, 227, .8);
}

.tfx-footer__label { font-size: 11px; font-weight: 700; letter-spacing: .28em; color: var(--dim); margin-bottom: 10px; }
.tfx-footer__col a { transition: color .2s; }
.tfx-footer__col a:hover { color: var(--ox-2); }
.tfx-footer__col--credit a { color: var(--bone); }

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


/* ---------- Veil — vanish tra le pagine ---------- */
.tfx-veil {
	position: fixed;
	inset: 0;
	z-index: 5000;
	background: var(--blk);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .42s var(--ease-out), visibility 0s linear .42s;
}

.tfx-veil.is-on {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity .42s var(--ease-out);
}

body.tfx-exiting main,
body.tfx-exiting .tfx-deck { filter: blur(10px); transition: filter .42s var(--ease-out); }

/* ---------- Transport da suite (viewer) ---------- */
.tfx-transport {
	position: absolute;
	left: 50%;
	bottom: 26px;
	transform: translateX(-50%);
	z-index: 9;
	display: flex;
	align-items: center;
	max-width: calc(100vw - 2 * var(--pad));
	background: rgba(12, 11, 11, .72);
	border: 1px solid var(--line);
	border-radius: 12px;
	-webkit-backdrop-filter: blur(24px) saturate(150%);
	backdrop-filter: blur(24px) saturate(150%);
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

.tfx-tr__btn {
	padding: 15px 18px;
	font-family: var(--ff-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	color: var(--bone);
	border-left: 1px solid var(--line);
	transition: background .2s, color .2s;
	white-space: nowrap;
}

.tfx-tr__btn:first-child { border-left: 0; }
@media (hover: hover) { .tfx-tr__btn:hover { background: var(--bone); color: var(--blk); } }

.tfx-tr__tc {
	padding: 15px 14px;
	font-family: var(--ff-mono);
	font-size: 11px;
	letter-spacing: .1em;
	color: var(--ox-txt);
	border-left: 1px solid var(--line);
	white-space: nowrap;
}

.tfx-tr__tc--dim { color: var(--dim); }

.tfx-tr__track {
	position: relative;
	flex: 1;
	min-width: 140px;
	height: 100%;
	min-height: 44px;
	cursor: pointer;
	border-left: 1px solid var(--line);
	touch-action: none;
}

.tfx-tr__track::before {
	content: '';
	position: absolute;
	left: 12px; right: 12px; top: 50%;
	height: 3px;
	margin-top: -1.5px;
	background: rgba(237, 233, 227, .18);
	border-radius: 99px;
}

.tfx-tr__fill {
	position: absolute;
	left: 12px; top: 50%;
	height: 3px;
	margin-top: -1.5px;
	width: 0%;
	max-width: calc(100% - 24px);
	background: var(--ox-2);
	border-radius: 99px;
	box-shadow: 0 0 10px rgba(176, 64, 65, .6);
	pointer-events: none;
}

.tfx-transport { transition: opacity .45s var(--ease-out); }

@media (max-width: 760px) {
	.tfx-tr__tc--dim { display: none; }
	.tfx-tr__btn { padding: 14px 12px; }
	/* Mobile: barra a tutta larghezza sopra la home indicator, niente tagli */
	.tfx-transport {
		left: var(--pad);
		right: var(--pad);
		bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
		transform: none;
		max-width: none;
	}
	.tfx-tr__track { min-width: 0; }
	.tfx-tr__btn--fs { padding-left: 14px; padding-right: 14px; }
	.tfx-credits { width: 100%; padding: calc(env(safe-area-inset-top, 0px) + 84px) var(--pad) calc(env(safe-area-inset-bottom, 0px) + 40px); border-left: 0; }
	.tfx-credits__close { top: calc(env(safe-area-inset-top, 0px) + 22px); right: var(--pad); width: 46px; height: 46px; }
}
@media (max-width: 520px) {
	.tfx-transport .tfx-tr__tc { display: none; }
	.tfx-tr__btn { padding: 15px 11px; letter-spacing: .1em; }
}

/* Credits: chiusura sempre raggiungibile */
.tfx-credits__close {
	position: absolute;
	top: 20px; right: 20px;
	width: 42px; height: 42px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: rgba(0, 0, 0, .3);
	color: var(--bone);
	font-size: 15px;
	transition: background .25s, color .25s, border-color .25s;
}

@media (hover: hover) { .tfx-credits__close:hover { background: var(--ox); border-color: var(--ox); color: var(--wht); } }

/* ---------- Counter tick ---------- */
#tfx-deck-cur.tick { animation: tfx-tick .45s var(--ease-out); }

@keyframes tfx-tick {
	0% { opacity: 0; transform: translateY(12px); filter: blur(4px); }
	100% { opacity: 1; transform: none; filter: none; }
}

/* ---------- Riduzione movimento ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.tfx-grain { animation: none; }
	.tfx-slide, .tfx-slide__meta, .tfx-slide__title, .tfx-slide__client { opacity: 1; transform: none; filter: none; }
	.tfx-svc__body p { max-height: none; opacity: 1; }
	.tfx-slide { visibility: hidden; }
	.tfx-slide.is-active { visibility: visible; }
	html { scroll-behavior: auto; }
}

/* Viewer inattivo: sparisce anche il cursore custom */
body:has(.tfx-viewer.is-idle) .tfx-cursor { opacity: 0; }

/* ---------- Mobile: rifiniture v1.7 ---------- */
@media (max-width: 700px) {
	.tfx-studio__line { text-align: left; }
}
/* Menu aperto in home: niente fusione "difference", CLOSE nitido */
body.tfx-menu-open.tfx-page--home .tfx-header { mix-blend-mode: normal; }
/* Touch: feedback al tocco al posto dell'hover (che su iOS resta "appiccicato") */
@media (hover: none) {
	.tfx-menu-toggle:active,
	.tfx-tr__btn:active,
	.tfx-viewer__close:active,
	.tfx-credits__close:active,
	.tfx-works__toggle:active,
	.tfx-deck__nav:active { opacity: .6; }
	.tfx-pcard:active .tfx-pcard__media { transform: scale(.985); }
	.tfx-pcard__media { transition: transform .25s var(--ease-out); }
}
