/* Portfolio: project pages, /portfolio, /portfolio-category/<slug>/ (inc/portfolio.php, T-5224).
   Pink paper and white type as on /servizi; client work is always full colour (never screened or tinted).
   No content is hidden before JS runs; assets/js/pages/portfolio.js adds the filter and motion.
   Class names avoid ad-block words (pubblicita, banner, sponsor, promo, adv, ads). */

/* ---------- 0. Shell ---------- */
body.cj-pf,
body.cj-pf #main-container,
body.cj-pf #main { background-color: var(--cj-pink); }
body.cj-pf #main { color: var(--cj-white); }

.cj-pf-page {
	width: var(--cj-page);
	margin-inline: auto;
	padding-block: var(--cj-atl-top) 0;
	color: var(--cj-white);
}
.cj-pf-page :is(h1, h2, h3, h4, p, dt, dd, li, figcaption) { color: inherit; }
.cj-pf-page a { color: inherit; }
.cj-pf-page :focus-visible { outline: 2px solid var(--cj-white); outline-offset: 3px; }

/* SplitText line masks (portfolio.js): room for descenders, without moving the layout. */
.cj-pf .cj-line-mask { padding-bottom: 0.2em; margin-bottom: -0.2em; }

/* ---------- 0b. Project pages: lights-out zone (Stefano 2026-11-10) ----------
   Pink head, the work on dark, pink again at «Altri progetti». portfolio.js drives --cj-pf-bg from the scroll
   (html.cj-pf-dim). Without it (no JS, reduced motion) the stage is a static full-bleed dark band. */
body.cj-pf--single { --cj-pf-dark: var(--cj-anthracite); --cj-pf-bg: var(--cj-pink); }
body.cj-pf--single,
body.cj-pf--single #main-container,
body.cj-pf--single #main { background-color: var(--cj-pf-bg); }
html body.cj-pf--single .ct-header [data-row*="middle"],
html body.cj-pf--single .ct-header [data-sticky*="fixed"] [data-row*="middle"] {
	background-color: color-mix(in srgb, var(--cj-pf-bg) 55%, transparent) !important; /* Additional CSS pins it to pink */
}
.cj-pf-stage {
	padding-block: clamp(2.5rem, 7vh, 5rem) 1px;
	margin-bottom: clamp(3rem, 8vh, 6rem);
	background: var(--cj-pf-dark);
	box-shadow: 0 0 0 100vmax var(--cj-pf-dark); /* full bleed without overflow */
	clip-path: inset(0 -100vmax);
}
html.cj-pf-dim .cj-pf-stage { background: none; box-shadow: none; clip-path: none; }
/* Text on the dark stage: #e6e7e9 (13.2:1 on #1e2022), not pure white (Critic r1). */
body:is(.cj-pf-bg--sfuma, .cj-pf-bg--scuro) .cj-pf-stage { color: #e6e7e9; }
/* Quieter type so the work leads (Stefano 2026-11-11): body grey #b4b7bb (8.1:1), labels and headings #cfd1d4
   (10.7:1), both above AAA 7:1; links stay #e6e7e9 as the active cue; hairlines drop to 20% white. */
body:is(.cj-pf-bg--sfuma, .cj-pf-bg--scuro) .cj-pf-stage .cj-pf-body { color: #b4b7bb; border-top-color: rgba(255, 255, 255, 0.2); }
body:is(.cj-pf-bg--sfuma, .cj-pf-bg--scuro) .cj-pf-stage :is(.cj-pf-label, .cj-pf-body__content :is(h2, h3, h4)) { color: #cfd1d4; }
body:is(.cj-pf-bg--sfuma, .cj-pf-bg--scuro) .cj-pf-stage .cj-pf-body__content a { color: #e6e7e9; }
body:is(.cj-pf-bg--sfuma, .cj-pf-bg--scuro) .cj-pf-stage .cj-pf-body__content :is(hr, .wp-block-separator) { border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.2); }
/* White paper variant: the work on white, type in anthracite. */
body.cj-pf-bg--bianco { --cj-pf-dark: var(--cj-white); }
body.cj-pf-bg--bianco .cj-pf-stage { color: var(--cj-anthracite); }
body.cj-pf-bg--bianco .cj-pf-stage .cj-pf-body { border-top-color: rgba(30, 32, 34, 0.25); }
/* Images on a white ground (renders, logos) sit on a white mat on dark, instead of glowing as bare rectangles. */
body:not(.cj-pf-bg--bianco) .cj-pf-stage .cj-pf-onwhite { background: #fff; padding: clamp(10px, 2.2vw, 32px); border-radius: 4px; }
body:not(.cj-pf-bg--bianco) .cj-pf-stage .cj-pf-onwhite img { border-radius: 0; }

/* ---------- 1. Head: eyebrow, H1, standfirst, facts ---------- */
.cj-pf-head { margin-bottom: clamp(2.5rem, 7vh, 5rem); }
.cj-pf-eyebrow,
.cj-pf-label {
	margin: 0 0 1.25rem;
	font-size: 0.8rem;
	font-weight: 700; /* small-print rule */
	line-height: 1.3;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.cj-pf-eyebrow a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.6); }
.cj-pf-eyebrow a:is(:hover, :focus-visible) { border-bottom-color: currentColor; }
.cj-pf-eyebrow span { margin-inline: 0.35em; }

.cj-pf-page :is(.cj-pf-title, .cj-pf-h1) {
	margin: 0 0 var(--cj-atl-gap);
	font-size: var(--cj-h1-size);
	font-weight: 700;
	line-height: 0.92;
	letter-spacing: -0.035em;
	text-transform: none;
	overflow-wrap: break-word;
	hyphens: manual;
}
.cj-pf-title__client,
.cj-pf-title__project { display: block; }
.cj-pf-page .cj-pf-title__project {
	margin-top: 0.12em;
	font-size: 0.5em;
	font-weight: 500;
	line-height: 1.02;
	letter-spacing: -0.02em;
}
.cj-pf-page .cj-pf-standfirst {
	max-width: var(--cj-standfirst-measure);
	margin: 0 0 clamp(2rem, 5vh, 3rem);
	font-size: var(--cj-standfirst-size);
	font-weight: 500;
	line-height: var(--cj-standfirst-leading);
	letter-spacing: var(--cj-standfirst-tracking);
}
.cj-pf-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
	gap: 1.25rem clamp(1rem, 2.5vw, 2.5rem);
	margin: 0;
}
.cj-pf-facts > div { padding-top: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.55); }
.cj-pf-facts dt { margin: 0 0 0.3rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.cj-pf-facts dd { margin: 0; font-size: 1.125rem; font-weight: 500; line-height: 1.35; }
.cj-pf-facts dd a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.6); }
.cj-pf-facts dd a:is(:hover, :focus-visible) { border-bottom-color: currentColor; }
.cj-pf-more { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin: 0; font-size: 1.125rem; font-weight: 700; }
.cj-pf-more a { text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 0.1em; }
.cj-pf-more a::after { content: " →"; }

/* ---------- 2. Hero ---------- */
.cj-pf-hero { margin: 0 0 clamp(3rem, 9vh, 6.5rem); }
.cj-pf-hero img { display: block; width: 100%; height: auto; border-radius: 4px; }
/* Layout hero (rules/06 §4): the approved SVG layout, flat on a ground, never cropped. */
img.cj-pf-layout {
	box-sizing: border-box;
	padding: clamp(1.25rem, 5%, 4rem);
	background: var(--cj-pf-ground, var(--cj-surface));
	object-fit: contain !important;
}
.cj-pf-hero img.cj-pf-layout { aspect-ratio: 16 / 9; max-height: 82vh; }

/* ---------- 3. «Il progetto»: the entry's own blocks, restyled ---------- */
.cj-pf-body {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
	column-gap: clamp(1rem, 2.5vw, 2.5rem);
	margin-bottom: clamp(3.5rem, 10vh, 7rem);
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.55);
}
.cj-pf-body > .cj-pf-label { position: sticky; top: calc(var(--header-height, 90px) + 1.5rem); align-self: start; }
.cj-pf-body__content { min-width: 0; }
.cj-pf-body__content > * { margin-block: 0 1.5rem; }
.cj-pf-body__content > :is(p, ul, ol, h2, h3, h4) { max-width: 40em; }
.cj-pf-body__content p,
.cj-pf-body__content li {
	font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
	font-weight: 450; /* Jost variable: 400 reads thin in white on pink */
	line-height: 1.6;
}
.cj-pf-body__content :is(h2, h3, h4) {
	margin-top: 2.5rem;
	font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.4rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.015em;
}
.cj-pf-body__content strong { font-weight: 700; }
.cj-pf-body__content a { text-decoration: underline; text-underline-offset: 0.18em; }
.cj-pf-body__content :is(figure, .wp-block-gallery, .wp-block-embed, .wp-block-video, .wp-block-columns) { margin-block: 2.5rem; max-width: none; }
.cj-pf-body__content img { display: block; max-width: 100%; height: auto; border-radius: 4px; }
.cj-pf-body__content .wp-block-gallery.has-nested-images { gap: clamp(0.75rem, 1.5vw, 1.25rem); }
.cj-pf-body__content .wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 4px; }
/* Captions on these entries are SEO boilerplate ("… - Communication Juice, Agenzia di …"): hidden, as before. */
.cj-pf-body__content figcaption,
.cj-pf-body__content .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { display: none; }
/* Opt-in captions (2026-11-14): blocks with class cj-pf-cap carry a written caption (what the picture is, mock-up or real, photo credit). */
.cj-pf-body__content .cj-pf-cap figcaption,
.cj-pf-body__content .cj-pf-cap.wp-block-gallery > figcaption {
	display: block;
	position: static;
	margin: 0.6rem 0 0;
	padding: 0;
	background: none;
	color: inherit;
	font-size: 0.9375rem;
	font-weight: 450;
	line-height: 1.45;
	text-align: left;
	max-width: 40em;
}
.cj-pf-body__content .cj-pf-cap.wp-block-gallery figure.wp-block-image figcaption { display: none; }
/* Marks and drawings sit on a ground from the client's palette (--cj-pf-ground, set per figure by the build
   tools; rules/06 §4 «no white boxes», Stefano 2026-11-15). White stays only as the fallback for older entries. */
.cj-pf-body__content .cj-pf-mark {
	display: grid;
	place-items: center;
	padding: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
	background: var(--cj-pf-ground, #fff);
	border-radius: 4px;
}
.cj-pf-body__content .cj-pf-mark img { width: min(100%, var(--cj-pf-mark-w, 420px)); height: auto; border-radius: 0; }
/* One display line per project: the motto the work was built on. */
.cj-pf-body__content > p.cj-pf-motto {
	margin-block: 2.5rem;
	max-width: 18em;
	font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3.25rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
}
.cj-pf-body__content > p.cj-pf-motto + p.cj-pf-motto-by { margin-top: -1.75rem; font-size: 1rem; }
.cj-pf-body__content .wp-block-embed__wrapper { position: relative; }
.cj-pf-body__content .wp-block-embed iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; }
.cj-pf-body__content video { width: 100%; height: auto; border-radius: 4px; }
.cj-pf-body__content .alignfull,
.cj-pf-body__content .alignwide { width: 100%; max-width: none; margin-inline: 0; }
/* Complianz placeholder for blocked embeds: readable on pink. */
.cj-pf-body__content .cmplz-blocked-content-container { border-radius: 4px; }

/* Panoramic strips (were Greenshift sliders in 30030): one image drifting sideways, see portfolio.js. */
.cj-pf-strip { overflow: hidden; border-radius: 4px; }
.cj-pf-strip img { border-radius: 0; }
.cj-pf-strip__track { display: flex; width: max-content; }
.cj-pf-strip__track img { width: auto; max-width: none; height: clamp(140px, 18vw, 280px); }

/* ---------- 4. «In evidenza» tiles ---------- */
.cj-pf-featured { margin-bottom: clamp(3.5rem, 10vh, 7rem); }
.cj-pf-tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(2rem, 5vh, 3.5rem) clamp(1rem, 2.5vw, 2.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}
.cj-pf-tile--lead,
.cj-pf-tile--close { grid-column: 1 / -1; } /* lead is big; a lone last tile closes the grid as a band (normal type) */
.cj-pf-tile--close .cj-pf-tile__media img { aspect-ratio: 21 / 9; }
.cj-pf-tile a { display: block; text-decoration: none; }
.cj-pf-tile__media { display: block; overflow: hidden; border-radius: 4px; }
.cj-pf-tile__media img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.1, 1);
}
.cj-pf-tile--lead .cj-pf-tile__media img { aspect-ratio: 16 / 9; }
.cj-pf-tile a:is(:hover, :focus-visible) .cj-pf-tile__media img { transform: scale(1.035); }
.cj-pf-tile__name { display: block; margin-top: 1rem; }
.cj-pf-tile__client { display: block; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.6rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; }
.cj-pf-tile--lead .cj-pf-tile__client { font-size: clamp(2rem, 1rem + 3.2vw, 4.25rem); }
.cj-pf-tile__project { display: block; margin-top: 0.3rem; font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem); font-weight: 500; line-height: 1.3; }

/* ---------- 5. Big-type list ---------- */
.cj-pf-all { margin-bottom: clamp(3.5rem, 10vh, 7rem); }
.cj-pf-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid rgba(255, 255, 255, 0.55); }
.cj-pf-row { position: relative; border-top: 1px solid rgba(255, 255, 255, 0.55); }
.cj-pf-row a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 0.5rem 2rem;
	padding: clamp(1rem, 2.4vh, 1.6rem) 0;
	text-decoration: none;
}
.cj-pf-row__client {
	font-size: clamp(1.6rem, 1rem + 2.4vw, 3.6rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.025em;
}
.cj-pf-row__project {
	margin-left: 0.35em;
	font-size: clamp(1.125rem, 0.9rem + 0.9vw, 1.75rem);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
}
.cj-pf-row__meta { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.cj-pf-row__name { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.1, 1); }
/* Desktop: the project's picture surfaces on hover/focus, full colour. */
.cj-pf-row__thumb {
	position: absolute;
	z-index: 2;
	top: 50%;
	right: clamp(8rem, 16vw, 14rem);
	width: clamp(240px, 26vw, 400px);
	opacity: 0;
	--cj-tilt: -2.5deg;
	transform: translateY(-50%) scale(0.86) rotate(calc(var(--cj-tilt) * 3.2)); /* swings in from a steeper angle and settles */
	transition: opacity 0.2s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
}
.cj-pf-row:nth-child(even) .cj-pf-row__thumb { --cj-tilt: 2.5deg; } /* rows alternate the lean */
.cj-pf-row__thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 24px 48px -18px rgba(80, 0, 35, 0.55); }
@media (hover: hover) and (min-width: 900px) {
	.cj-pf-row a:is(:hover, :focus-visible) .cj-pf-row__thumb { opacity: 1; transform: translateY(-50%) scale(1) rotate(var(--cj-tilt)); }
	.cj-pf-row a:is(:hover, :focus-visible) .cj-pf-row__name { transform: translateX(0.4rem); }
}
.cj-pf-empty { margin: 0 0 4rem; font-size: 1.25rem; font-weight: 500; }

/* ---------- 6. Discipline filter ---------- */
.cj-pf-filter { margin-bottom: clamp(2.5rem, 7vh, 4.5rem); }
.cj-pf-filter ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.cj-pf-filter a {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4em;
	padding: 0.55em 0.8em;
	border: 1.5px solid rgba(255, 255, 255, 0.75);
	border-radius: 4px;
	font-size: 0.75rem; /* one row at laptop widths (Stefano 2026-11-10) */
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.cj-pf-filter a:is(:hover, :focus-visible) { border-color: var(--cj-white); }
.cj-pf-page .cj-pf-filter a[aria-current] { background: var(--cj-white); border-color: var(--cj-white); color: var(--cj-pink); }

/* ---------- 7. Other projects ---------- */
.cj-pf-next { margin-bottom: clamp(3.5rem, 10vh, 7rem); padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.55); }
.cj-pf-next ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2.5rem); margin: 0; padding: 0; list-style: none; }
.cj-pf-next a { display: block; text-decoration: none; }
.cj-pf-next__dir { display: block; margin-bottom: 0.75rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.cj-pf-next__item--prev .cj-pf-next__dir::before { content: "← "; }
.cj-pf-next__item--next .cj-pf-next__dir::after { content: " →"; }
.cj-pf-next__media { display: block; overflow: hidden; border-radius: 4px; }
.cj-pf-next__media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.1, 1); }
.cj-pf-next a:is(:hover, :focus-visible) img { transform: scale(1.035); }
.cj-pf-next__name { display: block; margin-top: 0.9rem; }
.cj-pf-next__client { display: block; font-size: clamp(1.4rem, 1rem + 1.4vw, 2.4rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.cj-pf-next__project { display: block; margin-top: 0.25rem; font-size: 1.125rem; font-weight: 500; }

/* ---------- 7b. «Su Squeeze»: news posts about this job (single-portfolio.php, inc/news.php) ---------- */
/* Hotel colophon (cj_pf_stay): one line after the work, on the page colour: white in every state. */
.cj-pf-stay { margin: 0 0 clamp(2.5rem, 7vh, 4.5rem); padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.55); color: var(--cj-white); font-size: clamp(1.15rem, 1rem + 0.5vw, 1.5rem); font-weight: 500; line-height: 1.35; }
.cj-pf-stay a { color: var(--cj-white); font-weight: 700; white-space: nowrap; text-decoration: none; border-bottom: 2px solid currentColor; }
.cj-pf-stay a:is(:hover, :focus-visible) { color: var(--cj-white); border-bottom-color: transparent; }
.cj-pf-stay a::after { content: " \2197"; font-weight: 400; }
.cj-pf-news { margin-bottom: clamp(3.5rem, 10vh, 7rem); padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.55); }
.cj-pf-news ul { margin: 0; padding: 0; list-style: none; }
.cj-pf-news li + li { margin-top: 0.75rem; }
.cj-pf-news a { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; text-decoration: none; }
.cj-pf-news time { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.cj-pf-news__title { font-size: clamp(1.3rem, 1rem + 1vw, 2rem); font-weight: 700; line-height: 1.1; border-bottom: 2px solid transparent; }
.cj-pf-news a:is(:hover, :focus-visible) .cj-pf-news__title { border-bottom-color: currentColor; }

/* ---------- 8. CTA band (white paper, pink type), as on the service pages ---------- */
.cj-pf-page .cj-pf-cta {
	margin-bottom: clamp(3rem, 8vh, 5rem);
	padding: clamp(3rem, 10vh, 6.5rem) clamp(16px, 6vw, 96px);
	border-radius: 4px;
	background: var(--cj-white);
	color: var(--cj-pink);
	--cj-btn-bg: var(--cj-pink); --cj-btn-fg: var(--cj-white); --cj-btn-wipe: var(--cj-pink-40); --cj-btn-wipe-fg: var(--cj-white);
}
.cj-pf-page .cj-pf-cta h2 { margin: 0 0 clamp(1.75rem, 4vh, 2.75rem); max-width: 16ch; font-size: clamp(2.25rem, 1rem + 5vw, 6rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--cj-pink); }
.cj-pf-cta p { margin: 0; }

/* ---------- 9. Tablet and phone ---------- */
@media (max-width: 899.98px) {
	.cj-pf-body { grid-template-columns: minmax(0, 1fr); }
	.cj-pf-body > .cj-pf-label { position: static; }
	.cj-pf-row a {
		grid-template-columns: 88px minmax(0, 1fr);
		grid-template-areas: "thumb name" "thumb meta";
		align-items: center;
		gap: 0.3rem 1rem;
	}
	.cj-pf-row__name { grid-area: name; }
	.cj-pf-row__meta { grid-area: meta; white-space: normal; }
	.cj-pf-row__thumb { grid-area: thumb; position: static; width: 88px; opacity: 1; transform: none; transition: none; }
	.cj-pf-row__thumb img { aspect-ratio: 1; box-shadow: none; }
	.cj-pf-row__project { display: block; margin: 0.2rem 0 0; }
}
@media (max-width: 599.98px) {
	.cj-pf-tiles,
	.cj-pf-next ul { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.cj-pf-page *,
	.cj-pf-page *::before,
	.cj-pf-page *::after { transition: none !important; }
	.cj-pf-tile a:is(:hover, :focus-visible) .cj-pf-tile__media img,
	.cj-pf-next a:is(:hover, :focus-visible) img { transform: none; }
}

/* ---------- 3d. Live 3D scenes in «Il progetto» (plugin cjuiceit-3d-scene, Stefano 2026-11-12) ----------
   The client's scene keeps its own panel and colours (package theme); the stage greys must not reach its copy.
   Step headings are h3 here (under «Il progetto»): give them the plugin's h2 look. */
.cj-pf-body__content > :is(.cj3d, .cj-pf-film) { margin-block: 0.5rem 2.5rem; border-radius: 4px; overflow: hidden; }
.cj-pf-body__content > .cj-pf-film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #f2f3f5; }
/* From 900px the scene takes the full width of the body grid (both columns), so the plugin can set copy beside the
   machine as on the client's page. 100% = the content column (9fr): full = 100% × 12/9 + gap. It sits above the
   sticky «Il progetto» label, which slides under the panel. */
@media (min-width: 900px) {
	.cj-pf-body__content > :is(.cj3d, .cj-pf-film) {
		--cj-pf-gap: clamp(1rem, 2.5vw, 2.5rem);
		position: relative;
		z-index: 1;
		width: calc(100% * 4 / 3 + var(--cj-pf-gap));
		max-width: none;
		margin-left: calc(-100% / 3 - var(--cj-pf-gap)) !important;
	}
}
body .cj-pf-stage .cj-pf-body__content .cj3d .cj3d-copy :is(h3, h4) { color: var(--cj3d-ink); }
body .cj-pf-stage .cj-pf-body__content .cj3d .cj3d-copy :is(p, li) { color: var(--cj3d-muted); }
body .cj-pf-stage .cj-pf-body__content .cj3d :is(button, a) { color: var(--cj3d-ink); }
.cj-pf-body__content .cj3d .cj3d-copy h3 { max-width: none; font-size: clamp(24px, 2.6vw, 36px); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.6em; }
.cj-pf-body__content .cj3d .cj3d-copy h3::after { content: ""; display: block; width: 48px; height: 3px; margin-top: 0.5em; background: var(--cj3d-accent); }

/* Tall layouts side by side (stand columns, pages): whole, never cropped, kept narrow (portfolio-batch2.php cjh_panels). */
.cj-pf-body__content .cj-pf-panels { max-width: 620px; margin-inline: auto; }
.cj-pf-body__content .cj-pf-panels img { height: auto !important; object-fit: contain !important; border-radius: 0; }

/* Layout rows on a brand ground (cjh_panels with a ground). */
.cj-pf-body__content .wp-block-gallery.cj-pf-grounded { background: var(--cj-pf-ground); padding: clamp(1rem, 4vw, 3rem); border-radius: 4px; }

/* Credits (inc/portfolio.php cj_pf_credits): role and names, quiet, after the text. */
.cj-pf-credits { margin: 0 0 clamp(2.5rem, 7vh, 4.5rem); padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.55); color: var(--cj-white); }
.cj-pf-credits dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1.25rem 2rem; margin: 1rem 0 0; }
.cj-pf-credits__row { display: grid; gap: 0.25rem; align-content: start; }
.cj-pf-credits dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.cj-pf-credits dd { margin: 0; font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem); font-weight: 500; line-height: 1.35; }

/* Film hero (cj_pf_hero_video): the broadcast advert at full width, click to play with sound. */
.cj-pf-hero .cj-pf-hero__video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 82vh; background: #000; border-radius: 4px; object-fit: contain; }

/* ---------- Facts rail (variant B; Stefano + Creator Critic, 2026-11-18, 05-critique/portfolio-facts-rail-r1) ----------
   On large screens, after the poster, the head facts repeat in the body's left column in place of «Il progetto»
   (kept in the page, visually hidden, for the section's name and the outline). Same component as the head facts: no
   new size, colour or face, never brighter than the body copy. Pinned only when the viewport is tall enough. */
.cj-pf-rail { display: none; }
@media (min-width: 1200px) {
	.cj-pf-body--rail > .cj-pf-label {
		position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden;
		clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
	}
	.cj-pf-body--rail > .cj-pf-rail {
		display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem;
		grid-column: 1; grid-row: 1; align-self: start; color: inherit;
	}
	.cj-pf-body--rail > .cj-pf-body__content { grid-column: 2; }
	.cj-pf-rail > div { border-top-color: color-mix(in srgb, currentColor 30%, transparent); }
	.cj-pf-rail > div:first-child { border-top: 0; padding-top: 0; } /* one line only: the section's own rule */
	.cj-pf-rail dd a { border-bottom-color: color-mix(in srgb, currentColor 45%, transparent); }
	.cj-pf-rail__svc { display: block; width: fit-content; }
	.cj-pf-rail__svc + .cj-pf-rail__svc { margin-top: 0.35rem; }
}
@media (min-width: 1200px) and (min-height: 760px) {
	.cj-pf-body--rail > .cj-pf-rail { position: sticky; top: calc(var(--header-height, 90px) + 1.5rem); }
}
/* Entries whose 3D scene or film breaks out across both columns (above, from 900px) keep the plain «Il progetto»
   label: the blocks would slide over the rail, pinned or not (render r2, Sillem). */
@media (min-width: 1200px) {
	.cj-pf-body--rail:has(> .cj-pf-body__content > :is(.cj3d, .cj-pf-film)) > .cj-pf-rail { display: none; }
	.cj-pf-body--rail:has(> .cj-pf-body__content > :is(.cj3d, .cj-pf-film)) > .cj-pf-label {
		position: sticky; top: calc(var(--header-height, 90px) + 1.5rem); width: auto; height: auto; margin: 0 0 1.25rem;
		overflow: visible; clip: auto; clip-path: none; white-space: normal;
	}
}
