/* Site footer (inc/footer.php), Stefano 2026-11-10: structured, quiet, enterprise.
   Ground: brand shade-20 (#cc005f). White on it is 5.4:1, so small print can stay at weight 500
   (on full pink it would have to be bold). The MAXI wordmark is white, cut by the bottom edge at ~40% of its height.
   Grid: the theme container (1290px), 12 columns; hairlines in white at 35%. */

/* The Additional CSS frost (pink 55% + blur) is for the header; the footer is solid. #footer#footer beats it. */
#footer#footer {
	background-color: var(--cj-pink-20) !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

.cj-ft {
	--cj-ft-rule: rgb(255 255 255 / 0.35);
	--cj-ft-gutter: clamp(20px, 6vw, 40px);
	--cj-ft-gap: clamp(24px, 3vw, 48px);
	--cj-ft-nav-gap: clamp(64px, 8vw, 120px);
	position: relative;
	overflow: hidden;
	padding-top: clamp(72px, 10vw, 152px);
	font-family: var(--cj-font);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.55;
	color: var(--cj-white);
}
.cj-ft__inner {
	width: min(100% - 2 * var(--cj-ft-gutter), var(--theme-normal-container-max-width, 1290px));
	margin-inline: auto;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--cj-ft-gap);
}
.cj-ft p { margin: 0; }
.cj-ft a,
.cj-ft .cj-consent-link {
	color: inherit;
	text-decoration: none;
	font-weight: inherit;
	/* underline that draws in from the left */
	background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0% 1px;
	transition: background-size 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cj-ft a:is(:hover, :focus-visible),
.cj-ft .cj-consent-link:is(:hover, :focus-visible) { background-size: 100% 1px; }
.cj-ft :focus-visible { outline: 2px solid var(--cj-white); outline-offset: 3px; }

/* Labels: the ATL small caps. */
.cj-ft__h {
	margin: 0 0 1.25rem;
	font-family: var(--cj-font);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--cj-white);
	opacity: 0.75;
}

/* Lead: claim and CTA, left; contacts, right. */
.cj-ft__lead { grid-column: 1 / span 6; }
/* The lead band is its own two-part section (claim | address), not the sitemap's four columns:
   the address block sits centred in the right half, both ways. */
.cj-ft__claim {
	max-width: 17ch;
	font-size: clamp(1.75rem, 1.1rem + 2.2vw, 3.25rem);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.015em;
	text-wrap: balance;
}
.cj-ft__cta { margin-top: clamp(28px, 3vw, 40px) !important; }
html body .cj-ft .cj-ft__cta a.cj-btn { /* beats base.css html body :is(…, a.cj-btn) */
	--cj-btn-wipe: var(--cj-pink);
	background-size: 0% 100%, auto; /* the slab, not the underline */
	transition: background-size 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.3s;
}
html body .cj-ft .cj-ft__cta a.cj-btn:is(:hover, :focus-visible) { background-size: 100% 100%, auto; }
/* Contacts as a ledger (Stefano 2026-11-10: "still feels unfinished", no icons): label | value rows
   between hairlines, the same rule as the sitemap, so the block belongs to the footer's line system. */
.cj-ft__contact {
	grid-column: 7 / -1;
	justify-self: center;
	align-self: center;
	width: min(100%, 30rem);
	font-style: normal;
	font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
	line-height: 1.4;
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	column-gap: clamp(24px, 3vw, 48px);
	border-bottom: 1px solid var(--cj-ft-rule);
}
.cj-ft__contact-group {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: subgrid;
	align-items: baseline;
	padding-block: clamp(16px, 1.6vw, 22px);
	border-top: 1px solid var(--cj-ft-rule);
}
.cj-ft__contact .cj-ft__h { margin: 0; }
/* The band's two halves, marked: a hairline on the midline, from the claim's cap height down to the rule,
   where it meets the sitemap's top border in a T. */
.cj-ft__divider {
	grid-column: 7;
	grid-row: 1;
	justify-self: start;
	align-self: stretch;
	width: 0;
	margin-left: calc(var(--cj-ft-gap) / -2);
	margin-top: 0.3em; /* ≈ the claim's cap line */
	margin-bottom: calc(-1 * var(--cj-ft-nav-gap));
	border-left: 1px solid var(--cj-ft-rule);
	font-size: clamp(1.75rem, 1.1rem + 2.2vw, 3.25rem);
}
.cj-ft__lead, .cj-ft__contact { grid-row: 1; }

/* Link columns between two hairlines. */
.cj-ft__nav {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: var(--cj-ft-gap);
	row-gap: 48px;
	margin-top: var(--cj-ft-nav-gap);
	padding-block: clamp(40px, 5vw, 64px);
	border-top: 1px solid var(--cj-ft-rule);
	border-bottom: 1px solid var(--cj-ft-rule);
}
.cj-ft__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.55rem;
}
.cj-ft__list li { margin: 0; }
.cj-ft .cj-consent-link {
	padding: 0;
	border: 0;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

/* Legal identity: one quiet line, dot-separated, groups wrap whole. */
.cj-ft__legal {
	grid-column: 1 / -1;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1.5rem 3rem;
	padding-block: 24px;
	font-size: 0.8125rem;
	opacity: 0.85;
}
/* Every group starts with its dot; the row is shifted left by one dot slot and that slot is clipped,
   so whichever group starts a line shows no dot. */
.cj-ft__identity {
	--cj-ft-dot: 1.6em;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0;
	margin-inline-start: calc(-1 * var(--cj-ft-dot)) !important;
	clip-path: inset(0 0 0 var(--cj-ft-dot));
}
.cj-ft__identity span { white-space: nowrap; }
.cj-ft__break { flex-basis: 100%; height: 0; } /* two rows: who and where · register and capital */
.cj-ft__identity span::before { content: "·"; display: inline-block; width: var(--cj-ft-dot); text-align: center; }
.cj-ft__top { flex: none; }
/* Printer's mark (cj-credits, 2026-11-15): the cjuice.it bug before «Torna su», linking to /colophon/.
   currentColor = the footer's white: never dark on pink. No lift, no translucent dimming beyond the row's own. */
.cj-ft__end { flex: none; display: flex; align-items: center; gap: 1.5rem; }
.cj-ft__sign { display: inline-block; line-height: 0; color: inherit; }
.cj-ft__sign .cj-mark-svg { display: block; height: 16px; width: auto; }

/* MAXI wordmark: full container width, sitting on the bottom edge, its lower part off stage. */
.cj-ft__mark {
	width: min(100% - 2 * var(--cj-ft-gutter), var(--theme-normal-container-max-width, 1290px));
	margin: clamp(24px, 5vw, 72px) auto 0;
	/* 40% of the wordmark's height below the edge: the whole word is cut, not just the j's descender */
	margin-bottom: calc(-0.4 * min(100vw - 2 * var(--cj-ft-gutter), var(--theme-normal-container-max-width, 1290px)) * 18 / 159);
	color: var(--cj-white);
	line-height: 0;
	pointer-events: none;
	user-select: none;
}
.cj-ft__mark svg { display: block; width: 100%; height: auto; overflow: visible; }
.cj-ft__mark svg path { fill: currentColor; } /* a page-level inline `path { fill: #fff }` would make it white */

/* Tablet */
@media (max-width: 999.98px) {
	.cj-ft__lead { grid-column: 1 / -1; }
	.cj-ft__divider { display: none; }
	.cj-ft__contact { grid-row: 2; }
	/* stacked: the sitemap's top rule closes the ledger (no double hairline) */
	.cj-ft__contact { grid-column: 1 / -1; justify-self: start; margin-top: 56px; border-bottom: 0; }
	.cj-ft__nav { margin-top: 0; }
	.cj-ft__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phone */
@media (max-width: 599.98px) {
	.cj-ft__legal { flex-direction: column; align-items: flex-start; }
	.cj-ft__identity { flex-direction: column; margin-inline-start: 0 !important; clip-path: none; }
	.cj-ft__identity span::before { content: none; }
	.cj-ft__identity span { white-space: normal; }
	/* Menus, one per band, Agenzia first; each list on its own grid (Stefano 2026-11-10). */
	.cj-ft__nav { grid-template-columns: 1fr; row-gap: 44px; }
	.cj-ft__nav .cj-ft__col:nth-child(2) { order: -1; }
	.cj-ft__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 0.7rem; }
	#cj-ft-social + .cj-ft__list, .cj-ft__list[aria-labelledby="cj-ft-social"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	/* Servizi (Stefano 2026-11-10): every label in its column on one line; PR moved last, on a full row */
	.cj-ft__list[aria-labelledby="cj-ft-servizi"] li { white-space: nowrap; }
	.cj-ft__list li:has(> a[href$="#pr-ufficio-stampa"]) { order: 1; grid-column: 1 / -1; }
	/* one line, equal padding, scaled with the screen: 15px at 390, 12.5px at 320 */
	html body .cj-ft .cj-ft__cta a.cj-btn { max-width: 100%; box-sizing: border-box; padding-inline: 15px; font-size: min(1rem, 3.9vw); white-space: nowrap; }
	/* the wordmark runs past the side margins: a statement, not a cropped logo */
	.cj-ft__mark {
		--cj-ft-mark-w: 108vw; /* the c and the e half off stage, no letter lost */
		width: var(--cj-ft-mark-w);
		margin-inline: calc((100vw - var(--cj-ft-mark-w)) / 2);
		margin-bottom: calc(-0.33 * var(--cj-ft-mark-w) * 18 / 159); /* a third trimmed: more letter shows */
	}
	.cj-ft__break { display: none; }
}

/* Motion: one move only. The wordmark climbs out of the bottom edge into its crop as the footer arrives
   (scroll-driven where supported: Chromium, Safari 26). Elsewhere, and with reduced motion, it just sits there. */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.cj-ft__mark svg {
			animation: cj-ft-mark linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 55%; /* 40% is off stage: entry never gets past ~60% */
		}
	}
}
@keyframes cj-ft-mark {
	from { transform: translateY(70%); }
	to { transform: none; }
}
/* Small phones (< 375px): the menus one step smaller, so the two-column Servizi labels stay on one line. */
@media (max-width: 374.98px) {
	.cj-ft__list { font-size: 0.875rem; }
}
/* 320-class phones (< 350px): two Servizi labels can't fit side by side; one column there only, PR still last. */
@media (max-width: 349.98px) {
	.cj-ft__list[aria-labelledby="cj-ft-servizi"] { grid-template-columns: 1fr; }
}
