/* ==========================================================================
   Format pages (page-format.php). The memorable element: the banner photo is cut to the
   real proportions of the tile (60 × 120, 80 × 80 …), with its dimensions, beside the
   format in large type. Products by finish: original images, whole, never cropped.
   ========================================================================== */

.fp {
	--fp-ink: #0b0b0b;
	--fp-graphite: #151514;
	--fp-porcelain: #f4f2ee;
	--fp-paper: #fff;
	--fp-line: #e3dfd6;
	--fp-text: #55524c;
	--fp-muted: #8b877f;
	--fp-gold: #c99a3f;
	--fp-gold-soft: #e3c27a;
	--fp-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--fp-head: "Red Hat Display", var(--o-heading, sans-serif);
	font-family: var(--o-body, Arial, sans-serif);
	color: var(--fp-text);
	background: var(--fp-porcelain);
}
.fp-wrap {
	width: min(1240px, 100% - 40px);
	margin-inline: auto;
}
.fp svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.fp a:focus-visible,
.fp button:focus-visible {
	outline: 2px solid var(--fp-gold);
	outline-offset: 3px;
}

/* ------------------------------------------------------------ 1. Banner */
.fp-hero {
	position: relative;
	padding: calc(var(--header-h) + clamp(28px, 6vh, 64px)) 0 clamp(48px, 8vh, 88px);
	overflow: hidden;
	color: #fff;
	background: var(--fp-ink);
	isolation: isolate;
}
/* Faint tile joints at the format's own module. */
.fp-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	--mod: calc(var(--fw) * 2.2px);
	--modh: calc(var(--fh) * 2.2px);
	background:
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / var(--mod) var(--modh),
		linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / var(--mod) var(--modh);
	mask-image: radial-gradient(90% 90% at 80% 40%, #000, transparent 75%);
}
.fp-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	align-items: center;
	gap: clamp(32px, 5vw, 80px);
}
.fp-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: clamp(18px, 3vh, 32px);
	font-size: 14px;
	color: rgba(255, 255, 255, 0.6);
}
.fp-crumbs a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
}
.fp-crumbs a:hover {
	color: var(--fp-gold-soft);
}
.fp-hero__format {
	display: flex;
	align-items: baseline;
	gap: 0.12em;
	margin: 0;
	font-family: var(--fp-head);
	font-size: clamp(3.6rem, 1.6rem + 8vw, 9rem);
	font-weight: 700;
	line-height: 0.88;
	letter-spacing: -0.045em;
	color: #fff;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	animation: fp-rise 1s var(--fp-ease) both;
}
.fp-hero__format span {
	font-size: 0.3em;
	font-weight: 600;
	letter-spacing: 0;
	color: var(--fp-gold-soft);
}
.fp-hero__title {
	max-width: 30ch;
	margin: clamp(18px, 3vh, 28px) 0 0;
	font-family: var(--fp-head);
	font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem);
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	animation: fp-rise 1s 0.1s var(--fp-ease) both;
}
.fp-hero__lead {
	max-width: 58ch;
	margin: 14px 0 0;
	font-size: 16px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.72);
	animation: fp-rise 1s 0.18s var(--fp-ease) both;
}
.fp-hero__finishes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
	animation: fp-rise 1s 0.26s var(--fp-ease) both;
}
.fp-hero__finishes a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	transition: border-color 0.25s, background-color 0.25s;
}
.fp-hero__finishes a span {
	font-size: 12px;
	font-weight: 500;
	color: var(--fp-gold-soft);
}
.fp-hero__finishes a:hover {
	border-color: var(--fp-gold-soft);
	background: rgba(227, 194, 122, 0.1);
}
.fp-hero__count {
	margin: 18px 0 0;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.6);
}
.fp-hero__count b {
	font-family: var(--fp-head);
	font-size: 1.3rem;
	color: #fff;
}

/* The tile, to its real proportions, cut from the original banner photo, with its dimensions. */
.fp-hero__tile {
	display: grid;
	place-items: center;
	height: clamp(320px, 62vh, 580px);
	margin: 0;
	padding: 0 40px 40px 0;
}
.fp-hero__frame {
	position: relative;
	display: block;
	height: 100%;
	max-width: 100%;
	aspect-ratio: calc(var(--fw) / var(--fh));
}
.fp-hero__shape {
	position: absolute;
	inset: 0;
	background: var(--photo) 50% 50% / cover no-repeat;
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12);
	clip-path: inset(0 0 100% 0);
	animation: fp-reveal 1.4s 0.2s var(--fp-ease) forwards;
}
@keyframes fp-reveal {
	to {
		clip-path: inset(0 0 0 0);
	}
}
@keyframes fp-rise {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
}
@keyframes fp-fade {
	to {
		opacity: 1;
	}
}
/* Dimension lines: width under the tile, height along its right side. */
.fp-hero__dim {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: var(--fp-head);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--fp-gold-soft);
	white-space: nowrap;
	opacity: 0;
	animation: fp-fade 0.8s 1.3s var(--fp-ease) forwards;
}
.fp-hero__dim::before,
.fp-hero__dim::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(227, 194, 122, 0.55);
}
.fp-hero__dim--w {
	top: calc(100% + 16px);
	left: 0;
	right: 0;
}
.fp-hero__dim--h {
	top: 50%;
	left: calc(100% + 16px);
	width: calc(var(--fh) / var(--fw) * 100%);
	transform: translate(-50%, -50%) rotate(90deg);
	transform-origin: 50% 50%;
}

/* ------------------------------------------------------------ 2. Formats to scale */
.fp-formats {
	border-bottom: 1px solid var(--fp-line);
	background: var(--fp-paper);
}
.fp-formats ul {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	margin-block: 0;
	padding: 18px 0 14px;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}
.fp-formats ul::-webkit-scrollbar {
	display: none;
}
.fp-formats a {
	display: grid;
	justify-items: center;
	gap: 8px;
	min-width: 64px;
	padding: 4px;
	color: var(--fp-text);
	text-decoration: none;
}
.fp-formats__shape {
	width: calc(var(--w) * 0.62px);
	height: calc(var(--h) * 0.62px);
	border: 1.5px solid #cfc8ba;
	background: var(--fp-porcelain);
	transition: border-color 0.3s, background-color 0.3s, transform 0.4s var(--fp-ease);
	transform-origin: 50% 100%;
}
.fp-formats__label {
	font-family: var(--fp-head);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}
.fp-formats a:hover .fp-formats__shape {
	border-color: var(--fp-ink);
	transform: translateY(-3px);
}
.fp-formats a[aria-current] {
	color: var(--fp-ink);
}
.fp-formats a[aria-current] .fp-formats__shape {
	border-color: var(--fp-gold);
	background: var(--fp-gold);
}

/* ------------------------------------------------------------ 3. Story */
.fp-story {
	padding: clamp(56px, 8vw, 110px) 0;
}
.fp-story__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	align-items: center;
	gap: clamp(32px, 5vw, 80px);
}
.fp-story__tagline {
	margin: 0;
	font-family: var(--fp-head);
	font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.7rem);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.015em;
	color: var(--fp-ink);
	text-wrap: balance;
}
.fp-story__photos {
	position: relative;
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	align-items: end;
	gap: 16px;
}
.fp-story__photo {
	margin: 0;
	overflow: hidden;
	border-radius: 6px;
}
.fp-story__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.fp-story__photo--1 {
	aspect-ratio: 4 / 5;
}
.fp-story__photo--2 {
	aspect-ratio: 3 / 4;
	margin-bottom: 12%;
}

/* ------------------------------------------------------------ 4. Collection */
.fp-collection {
	padding-bottom: clamp(56px, 8vw, 110px);
}
.fp-tabs {
	position: sticky;
	top: var(--mh-compact, 60px);
	z-index: 20;
	border-block: 1px solid var(--fp-line);
	background: rgba(244, 242, 238, 0.92);
	backdrop-filter: blur(10px);
}
.fp-tabs ul {
	display: flex;
	gap: 6px;
	margin-block: 0;
	padding: 10px 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}
.fp-tabs a {
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 0 18px;
	border-radius: 999px;
	font-family: var(--fp-head);
	font-size: 15px;
	font-weight: 600;
	color: var(--fp-text);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.25s, color 0.25s;
}
.fp-tabs a:hover {
	color: var(--fp-ink);
	background: #fff;
}
.fp-tabs a.is-on {
	background: var(--fp-ink);
	color: #fff;
}
.fp-finish {
	padding-top: clamp(40px, 5vw, 72px);
	scroll-margin-top: calc(var(--mh-compact, 60px) + 64px);
}
.fp-finish__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--fp-line);
}
.fp-finish__title {
	margin: 0;
	font-family: var(--fp-head);
	font-size: clamp(2rem, 1.3rem + 2.4vw, 3.4rem);
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: 0.04em;
	color: var(--fp-ink);
}
.fp-finish__count {
	margin: 0;
	font-size: 14px;
	color: var(--fp-muted);
}
.fp-grid {
	display: grid;
	/* Narrow tiles get more columns, wide ones fewer (--stage = width / height of the images). */
	grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(110px + 160px * var(--stage))), 1fr));
	gap: clamp(14px, 1.8vw, 24px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.fp-item {
	display: flex;
}
.fp-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--fp-line);
	border-radius: 6px;
	background: var(--fp-paper);
	font: inherit;
	text-align: left;
	color: inherit;
	cursor: pointer;
	transition: transform 0.5s var(--fp-ease), box-shadow 0.5s var(--fp-ease), border-color 0.3s;
}
.fp-card.is-static {
	cursor: default;
}
/* The original image, whole, at its own proportions (never cropped). */
.fp-card__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: var(--stage);
	padding: clamp(14px, 1.6vw, 22px);
	background: #ebe9e4;
}
.fp-card__stage img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	box-shadow: 0 14px 24px -16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.04);
	transition: transform 0.7s var(--fp-ease);
}
.fp-card__info {
	display: grid;
	gap: 3px;
	padding: 14px 16px 16px;
}
.fp-card__name {
	font-family: var(--fp-head);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--fp-ink);
}
.fp-card__meta {
	font-size: 13px;
	color: var(--fp-muted);
}
.fp-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	font-size: 14px;
	font-weight: 700;
	color: var(--fp-ink);
}
.fp-card__cta svg {
	width: 16px;
	height: 16px;
	transition: transform 0.4s var(--fp-ease);
}
@media (hover: hover) and (pointer: fine) {
	.fp-card:not(.is-static):hover {
		border-color: #d4ccbd;
		box-shadow: 0 22px 40px -26px rgba(11, 11, 11, 0.45);
		transform: translateY(-4px);
	}
	.fp-card:not(.is-static):hover .fp-card__stage img {
		transform: translateY(-4px);
	}
	.fp-card:not(.is-static):hover .fp-card__cta {
		color: #8a6a26;
	}
	.fp-card:not(.is-static):hover .fp-card__cta svg {
		transform: translateX(4px);
	}
}

/* ------------------------------------------------------------ 5. Exclusivité clients */
.fp-exclusive {
	padding: clamp(56px, 7vw, 96px) 0;
	color: #fff;
	background: var(--fp-ink);
}
.fp-exclusive__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px 40px;
}
.fp-exclusive__title {
	margin: 0;
	font-family: var(--fp-head);
	font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.2rem);
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #fff;
}
.fp-exclusive__text {
	grid-column: 1;
	margin: 0;
	font-size: 17px;
	color: rgba(255, 255, 255, 0.72);
}
.fp-exclusive__btn {
	grid-column: 2;
	grid-row: 1 / span 2;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 26px;
	border: 0;
	border-radius: 999px;
	background: var(--fp-gold-soft);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	color: var(--fp-ink);
	cursor: pointer;
	transition: background-color 0.25s, transform 0.4s var(--fp-ease);
}
.fp-exclusive__btn:hover {
	background: #fff;
}
.fp-exclusive__btn:hover svg {
	transform: translateX(4px);
}
.fp-exclusive__btn svg {
	transition: transform 0.4s var(--fp-ease);
}

/* Reveal (assets/js/format.js) */
.fp-js [data-fp-reveal] {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.8s var(--fp-ease), transform 0.9s var(--fp-ease);
	transition-delay: calc(var(--i, 0) * 70ms);
}
.fp-js [data-fp-reveal].is-in {
	opacity: 1;
	transform: none;
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1023px) {
	.fp-hero__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.fp-hero__tile {
		height: auto;
		justify-items: center;
	}
	/* Width from the available height, never wider than the column (keeps the real proportions). */
	.fp-hero__frame {
		height: auto;
		width: min(100%, calc(min(52vh, 460px) * var(--fw) / var(--fh)));
	}
	.fp-story__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.fp-tabs {
		top: calc(var(--mh-utility, 40px) + var(--mh-compact, 60px));
	}
	.fp-finish {
		scroll-margin-top: calc(var(--mh-utility, 40px) + var(--mh-compact, 60px) + 64px);
	}
}
@media (max-width: 639px) {
	.fp-wrap {
		width: calc(100% - 32px);
	}
	.fp-hero__format {
		font-size: clamp(3rem, 1rem + 13vw, 5rem);
	}
	.fp-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.fp-card__info {
		padding: 12px;
	}
	.fp-card__name {
		font-size: 0.98rem;
	}
	.fp-formats ul {
		margin-inline: -16px;
		padding-inline: 16px;
		justify-content: flex-start;
	}
	.fp-exclusive__inner {
		grid-template-columns: minmax(0, 1fr);
	}
	.fp-exclusive__btn {
		grid-column: 1;
		grid-row: auto;
		justify-self: start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fp *,
	.fp *::before,
	.fp *::after {
		animation: none !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}
	.fp-hero__shape {
		clip-path: none;
	}
	.fp-hero__dim {
		opacity: 1;
	}
	.fp-hero__shape {
		clip-path: none;
	}
}
