/* ==========================================================================
   Homepage, right under the hero (template-parts/home-original.php):
   - .hx-claims: the two original distinctions as a dark credentials band that continues the hero;
   - .hx-film: "Excellence et Innovation dans le Carrelage" + the original film, set like a laid
     slab (offset gold joint frame) with its own quiet controls. Behaviour: assets/js/home-intro.js.
   ========================================================================== */

.hx-claims,
.hx-film {
	--hx-ink: #12110f;
	--hx-text: #4f4b45;
	--hx-gold: #c99a3f;
	--hx-gold-soft: #e3c27a;
	--hx-line: rgba(255, 255, 255, 0.12);
	--hx-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--hx-gutter: clamp(16px, 4vw, 56px);
}

/* ------------------------------------------------------------ Distinctions band */
.hx-claims {
	position: relative;
	background: var(--hx-ink);
	color: #fff;
	isolation: isolate;
}
/* Tile joints, faint, as on a polished floor seen from above. */
.hx-claims::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 160px 100%,
		radial-gradient(60% 140% at 50% 0%, rgba(201, 154, 63, 0.16), transparent 70%);
}
.hx-claims__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 var(--hx-gutter);
	list-style: none;
}
.hx-claim {
	display: flex;
	align-items: center;
	gap: clamp(16px, 2vw, 26px);
	padding: clamp(26px, 3.4vw, 42px) clamp(8px, 3vw, 48px);
	margin: 0;
}
.hx-claim + .hx-claim {
	border-left: 1px solid var(--hx-line);
}
.hx-claim__icon {
	flex: none;
	width: clamp(40px, 3.6vw, 52px);
	height: auto;
	fill: none;
	stroke: var(--hx-gold-soft);
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.hx-claim__icon .hx-fill {
	fill: var(--hx-gold-soft);
	stroke: none;
}
.hx-claim__icon .hx-thin {
	stroke-dasharray: 2 3;
	opacity: 0.6;
}
.hx-claim p {
	margin: 0;
	max-width: 30ch;
	font-family: var(--o-heading, "Red Hat Display", sans-serif);
	font-size: clamp(1.02rem, 0.9rem + 0.45vw, 1.3rem);
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.005em;
	color: #fff;
	text-wrap: balance;
}

/* ------------------------------------------------------------ Excellence + film */
.hx-film {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	align-items: center;
	gap: clamp(32px, 5vw, 80px);
	padding: clamp(64px, 9vw, 128px) 0 clamp(64px, 9vw, 120px) max(var(--hx-gutter), (100% - 1320px) / 2);
	background: #fff;
}
.hx-film__text {
	max-width: 440px;
	justify-self: end;
}
.hx-film .o-headline {
	margin: 0;
	font-size: clamp(2rem, 1.3rem + 2.2vw, 3.1rem);
	line-height: 1.05;
	letter-spacing: -0.03em;
	text-wrap: balance;
}
.hx-film__text p {
	margin: 26px 0 0;
	font-size: 16px;
	line-height: 1.75;
	color: var(--hx-text);
}

/* The film bleeds to the right edge of the page; the gold frame is the joint of a slab laid
   slightly off its neighbour. */
.hx-film__media {
	position: relative;
	margin: 0;
	padding: 0 0 22px 22px;
}
.hx-film__frame {
	position: absolute;
	inset: 22px 0 0 0;
	border: 1px solid var(--hx-gold);
	border-right: 0;
	border-radius: 6px 0 0 6px;
	pointer-events: none;
	transform: translate(-22px, 0);
}
.hx-film__screen {
	position: relative;
	overflow: hidden;
	border-radius: 6px 0 0 6px;
	background: #000;
	box-shadow: 0 40px 70px -40px rgba(18, 17, 15, 0.55);
}
.hx-film__screen video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* Controls: one quiet strip at the bottom, always visible on touch, on hover / focus otherwise. */
.hx-film__bar {
	position: absolute;
	inset: auto 0 0 0;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 28px 14px 12px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
	transition: opacity 0.35s, transform 0.45s var(--hx-ease);
}
.hx-film__btn {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.25s, color 0.25s;
}
.hx-film__btn:hover {
	background: rgba(255, 255, 255, 0.14);
}
.hx-film__btn:focus-visible {
	outline: 2px solid var(--hx-gold-soft);
	outline-offset: 2px;
}
.hx-film__btn svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.hx-film__btn .hx-i-play {
	fill: currentColor;
	stroke: none;
}
.hx-film__btn .hx-i-play,
.hx-film__media.is-paused .hx-i-pause,
.hx-film__btn .hx-i-on,
.hx-film__media.has-sound .hx-i-off {
	display: none;
}
.hx-film__media.is-paused .hx-i-play,
.hx-film__media.has-sound .hx-i-on {
	display: inline;
}
.hx-film__progress {
	position: relative;
	flex: 1;
	height: 2px;
	margin: 0 8px;
	background: rgba(255, 255, 255, 0.25);
}
.hx-film__progress span {
	position: absolute;
	inset: 0;
	background: var(--hx-gold-soft);
	transform: scaleX(var(--p, 0));
	transform-origin: left;
}
@media (hover: hover) and (pointer: fine) {
	.hx-film__media:not(.is-paused) .hx-film__bar {
		opacity: 0;
		transform: translateY(8px);
	}
	.hx-film__media:hover .hx-film__bar,
	.hx-film__media:focus-within .hx-film__bar {
		opacity: 1;
		transform: none;
	}
}

/* Entrance, once (home-intro.js adds .is-in). */
.hx-js .hx-claim {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.8s var(--hx-ease), transform 0.9s var(--hx-ease);
	transition-delay: calc(var(--i) * 120ms);
}
.hx-js .hx-claims.is-in .hx-claim {
	opacity: 1;
	transform: none;
}
.hx-js .hx-film__frame {
	opacity: 0;
	transform: translate(0, -22px);
	transition: opacity 0.6s, transform 1.2s var(--hx-ease) 0.15s;
}
.hx-js .hx-film.is-in .hx-film__frame {
	opacity: 1;
	transform: translate(-22px, 0);
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1024px) {
	.hx-film {
		grid-template-columns: minmax(0, 1fr);
		padding-right: var(--hx-gutter);
	}
	.hx-film__text {
		justify-self: start;
		max-width: 620px;
	}
	.hx-film__frame,
	.hx-film__screen {
		border-radius: 6px;
	}
	.hx-film__frame {
		border-right: 1px solid var(--hx-gold);
	}
}
@media (max-width: 767px) {
	.hx-claims__list {
		grid-template-columns: minmax(0, 1fr);
	}
	.hx-claim {
		padding: 22px 4px;
	}
	.hx-claim + .hx-claim {
		border-left: 0;
		border-top: 1px solid var(--hx-line);
	}
	.hx-film__media {
		padding: 0 0 14px 14px;
	}
	.hx-film__frame {
		inset: 14px 0 0 0;
	}
	.hx-js .hx-film.is-in .hx-film__frame,
	.hx-film__frame {
		transform: translate(-14px, 0);
	}
	.hx-film__bar {
		padding: 20px 6px 4px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.hx-js .hx-claim,
	.hx-js .hx-film__frame,
	.hx-film__bar {
		transition: none;
	}
	.hx-js .hx-claim {
		opacity: 1;
		transform: none;
	}
	.hx-js .hx-film__frame {
		opacity: 1;
		transform: translate(-22px, 0);
	}
}
