/* Home (page-home.php). Brand tokens from tokens.css.
   Rules (Stefano 2026-11-11): no black text on #ff0077; no translucent white (hollow outline instead);
   «now» objects carry .cj-live-dot (base.css). */

.cj-hm-page {
	--hm-gutter: clamp(16px, 4vw, 48px);
	--hm-stroke: max(1px, 0.016em);
	width: min(100% - 2 * var(--hm-gutter), 1290px);
	margin-inline: auto;
	color: var(--cj-white);
	font-family: var(--cj-font);
}

/* Shared section furniture */
.cj-hm-page > section { padding-block: clamp(4rem, 12vh, 9rem); }
.cj-hm-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--cj-white);
	margin-bottom: clamp(1.5rem, 4vh, 3rem);
}
.cj-hm-page .cj-hm-eyebrow {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--cj-white);
}
.cj-hm-say > .cj-hm-eyebrow,
.cj-hm-clients > .cj-hm-eyebrow {
	padding-top: 0.75rem;
	border-top: 1px solid var(--cj-white);
	margin-bottom: clamp(1.5rem, 4vh, 3rem);
}
.cj-hm-asof { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--cj-white); }

/* 2. Cosa facciamo: one sentence. Words start hollow and fill white on scroll (assets/js/pages/home.js).
   Without JS or with reduced motion the sentence is solid white. Links: no underline; hover = hollow. */
.cj-hm-say__text {
	margin: 0;
	max-width: 22ch;
	font-size: clamp(2rem, 1rem + 4.4vw, 5.25rem);
	font-weight: 600;
	line-height: 1.04;
	letter-spacing: -0.025em;
	color: var(--cj-white);
	-webkit-text-stroke: var(--hm-stroke) var(--cj-white);
}
/* Hover goes hollow via the fill colour, never via `color: transparent`: on a :visited link Chrome paints with the
   visited colour's RGB and the unvisited alpha, so a stroke that falls back to currentColor (transparent =
   rgba(0,0,0,0)) turned BLACK on hover (Stefano 2026-11-12). The stroke is declared on the link itself so its
   visited counterpart is white too. */
.cj-hm-say__text a { color: inherit; text-decoration: none; }
.cj-hm-say__text a,
.cj-hm-say__text a * { -webkit-text-stroke-color: var(--cj-white); }
.cj-hm-say__text a:is(:hover, :focus-visible),
.cj-hm-say__text a:is(:hover, :focus-visible) * { -webkit-text-fill-color: transparent; }
.cj-hm-say__sign {
	margin: clamp(2rem, 6vh, 4rem) 0 0;
	font-size: clamp(1.125rem, 0.9rem + 0.9vw, 1.75rem);
	font-weight: 500;
	color: var(--cj-white);
}
.cj-hm-say__sign .battito-pulse { display: inline-block; font-style: normal; font-weight: 800; transform-origin: center; }

/* 3. Lavori: a strip of three, then the button. Phone: the same three in a step-scrolling strip. */
.cj-hm-work__strip {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 28px);
}
.cj-hm-tile a { display: block; color: var(--cj-white); text-decoration: none; }
.cj-hm-tile__media { display: block; overflow: hidden; background: var(--cj-pink-20); }
.cj-hm-tile__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cj-hm-tile a:is(:hover, :focus-visible) img { transform: scale(1.04); }
.cj-hm-tile__meta {
	display: block;
	margin-top: 0.75rem;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cj-white);
}
.cj-hm-tile__name {
	display: block;
	margin-top: 0.25rem;
	font-size: clamp(1rem, 0.92rem + 0.35vw, 1.25rem);
	font-weight: 600;
	line-height: 1.25;
}
.cj-hm-tile a:is(:hover, :focus-visible) .cj-hm-tile__name { text-decoration: underline; text-underline-offset: 0.2em; }
.cj-hm-work__more { margin: clamp(1.75rem, 4vh, 2.5rem) 0 0; }

/* 4. Noi, in numeri (La goccia) */
.cj-hm-data__h {
	margin: 0 0 clamp(1rem, 3vh, 2rem);
	max-width: 28ch;
	font-size: clamp(2rem, 1rem + 4vw, 4.75rem);
	font-weight: 600;
	line-height: 1.02;
	letter-spacing: -0.025em;
	color: var(--cj-white);
}
/* one sentence per line: two lines, not three, so heading and drop fit one screen (pages/home.js fitFig) */
.cj-hm-data__h span { display: block; text-wrap: balance; }
.cj-hm-fig { position: relative; margin: 0; container-type: inline-size; }
.cj-hm-fig canvas { display: block; }
.cj-hm-fig .cjv-ov { position: absolute; inset: 0; pointer-events: none; }
.cj-hm-fig .cjv-ov span { position: absolute; white-space: nowrap; line-height: 1; color: var(--cj-white); font-weight: 600; }
/* The opening (pages/home.js): the wordmark over the figure, zoomed into the dot on the j. The frame is the figure. */
.cj-hm-zoom { position: absolute; inset: 0; overflow: hidden; pointer-events: none; color: var(--cj-white); }
.cj-hm-zoom[hidden] { display: none; }
.cj-hm-zoom svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.cj-hm-nums {
	list-style: none;
	margin: clamp(1.5rem, 4vh, 3rem) 0 0;
	padding: 1rem 0 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	border-top: 1px solid var(--cj-white);
}
.cj-hm-nums li { font-size: 1rem; font-weight: 600; line-height: 1.35; color: var(--cj-white); }
.cj-hm-nums b {
	display: block;
	margin-bottom: 0.25rem;
	font-size: clamp(2.25rem, 1.4rem + 3vw, 4.5rem);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}
.cj-hm-data__hint {
	margin: clamp(1.75rem, 4vh, 2.5rem) 0 0;
	max-width: 44ch;
	font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
	font-weight: 500;
	line-height: 1.4;
	color: var(--cj-white);
}
.cj-hm-data__more { margin: clamp(2rem, 5vh, 3rem) 0 0; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* 6. CTA (cj_pf_cta) */
.cj-hm-page .cj-pf-cta { padding-block: clamp(4rem, 12vh, 9rem); border-top: 1px solid var(--cj-white); }
.cj-hm-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-white);
}
.cj-hm-page .cj-pf-cta p { margin: 0; }

@media (max-width: 699px) {
	/* step-scrolling strip: one tile per step, the next one peeking */
	.cj-hm-work__strip {
		display: flex;
		gap: 12px;
		margin-inline: calc(-1 * var(--hm-gutter));
		padding-inline: var(--hm-gutter);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--hm-gutter);
		overscroll-behavior-x: contain;
		scrollbar-width: none;
	}
	.cj-hm-work__strip::-webkit-scrollbar { display: none; }
	.cj-hm-tile { flex: 0 0 80%; scroll-snap-align: start; }
	.cj-hm-nums { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
	@media (prefers-reduced-motion: reduce) {
	.cj-hm-tile__media img { transition: none; }
	.cj-hm-work__strip { scroll-behavior: auto; }
}
