/* A single work: the images carry the page, the data stays quiet. */

.xfb-work {
	max-width: 82rem;
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
}

.xfb-work__title {
	font-size: clamp(1.9rem, 4vw, 3rem);
	font-weight: 400;
	letter-spacing: -0.01em;
	margin: 0 0 1.5rem;
}

.xfb-work__text {
	max-width: 38rem;
	margin-bottom: 2.5rem;
	line-height: 1.7;
}

/* Gallery ------------------------------------------------------------- */

.xfb-gallery__stage {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.xfb-gallery__frame {
	position: relative;
	flex: 1;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #f4f4f2;
}

.xfb-gallery__slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	transition: opacity 420ms ease;
	pointer-events: none;
}

.xfb-gallery__slide.is-active {
	opacity: 1;
	pointer-events: auto;
}

.xfb-gallery__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.xfb-gallery__nav {
	flex: 0 0 auto;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	background: transparent;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	opacity: 0.45;
	transition: opacity 180ms ease;
}

.xfb-gallery__nav:hover,
.xfb-gallery__nav:focus-visible {
	opacity: 1;
}

.xfb-gallery__counter {
	margin: 0.9rem 0 0;
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	opacity: 0.55;
	text-align: center;
}

.xfb-gallery__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

.xfb-gallery__thumb {
	width: 5rem;
	height: 3.5rem;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	opacity: 0.42;
	transition: opacity 200ms ease;
}

.xfb-gallery__thumb.is-active,
.xfb-gallery__thumb:hover,
.xfb-gallery__thumb:focus-visible {
	opacity: 1;
}

.xfb-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Siblings ------------------------------------------------------------ */

.xfb-work__siblings {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
	margin-top: clamp(3rem, 7vw, 5.5rem);
	padding-top: 1.75rem;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.xfb-work__sibling {
	text-decoration: none;
	color: inherit;
	display: grid;
	gap: 0.3rem;
}

.xfb-work__sibling--next {
	text-align: right;
}

.xfb-work__sibling span {
	font-size: 0.66rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.5;
}

.xfb-work__sibling strong {
	font-weight: 400;
	font-size: 1.05rem;
}

@media (max-width: 640px) {
	.xfb-gallery__nav {
		width: 2rem;
		font-size: 1.5rem;
	}

	.xfb-gallery__thumb {
		width: 3.75rem;
		height: 2.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.xfb-gallery__slide {
		transition: none;
	}
}

/* Header of a work, in the order the studio asked for:
   código · nombre · ubicación · texto · tags · crédito, then the photos. */

.xfb-work__code {
	font-size: 0.7rem;
	letter-spacing: 0.16em;
	opacity: 0.5;
	margin: 0 0 0.6rem;
}

.xfb-work__location {
	font-size: 0.95rem;
	opacity: 0.7;
	margin: 0 0 1.75rem;
}

.xfb-work__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.75rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
}

.xfb-work__tags a {
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	color: inherit;
	opacity: 0.6;
}

.xfb-work__tags a:hover {
	opacity: 1;
}

.xfb-work__credit {
	font-size: 0.78rem;
	opacity: 0.6;
	margin: 0 0 1.5rem;
}
