/**
 * Chapter marquee (dual CSS infinite scroll, no JS).
 * Top row: scrolls visually to the right. Bottom row: scrolls visually to the left.
 */

.fld-chapter-marquee-section {
	background-color: var(--black, #000);
	color: var(--white, #fff);
	overflow: hidden;
}

.fld-chapter-marquee-section__intro {
	margin-bottom: 1.75rem;
}

.fld-chapter-marquee-section__heading {
	font-size: clamp(1.25rem, 1rem + 1.2vw, 2.25rem);
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0;
	color: var(--white, #fff);
}

.fld-chapter-marquee-section__tagline {
	margin: 0.65rem 0;
	max-width: 36rem;
	margin-left: auto;
	margin-right: auto;
	font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.0625rem);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.02em;
	text-transform: none;
	font-style: italic;
	color: var(--offwhite, #b9b9b9);
}

.fld-chapter-marquee-section__intro > .fld-chapter-marquee-section__tagline:first-child {
	margin-top: 0;
}

.fld-chapter-marquee-section__content {
	margin: 1rem 0 0;
	max-width: 42rem;
	margin-left: auto;
	margin-right: auto;
	font-size: 1rem;
	line-height: 1.65;
	text-align: center;
	color: rgba(255, 255, 255, 0.88);
	text-transform: none;
}

.fld-chapter-marquee-section__intro > .fld-chapter-marquee-section__content:first-child {
	margin-top: 0;
}

.fld-chapter-marquee-section__content p {
	margin: 0;
}

.fld-chapter-marquee-section__content p + p {
	margin-top: 1rem;
}

.fld-chapter-marquee-wrap {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
}

.fld-chapter-marquee {
	display: flex;
	width: max-content;
	gap: 1.25rem;
	will-change: transform;
}

/* Top: translate -50% → 0 (cards move right) */
.fld-chapter-marquee--top {
	animation: fld-chapter-marquee-right 58s linear infinite;
}

/* Bottom: translate 0 → -50% (cards move left); slight horizontal offset like reference */
.fld-chapter-marquee--bottom {
	margin-left: clamp(-5rem, -12vw, -11.25rem);
	animation: fld-chapter-marquee-left 64s linear infinite;
}

.fld-chapter-marquee-track {
	display: flex;
	gap: 1.25rem;
}

.fld-chapter-marquee__item {
	width: clamp(260px, 28vw, 360px);
	aspect-ratio: 1390 / 952;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.fld-chapter-marquee__media {
	position: relative;
	width: 100%;
	height: 100%;
}

/* Bottom fade so white labels stay readable on bright photos */
.fld-chapter-marquee__media::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 42%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.2) 45%, transparent 100%);
	pointer-events: none;
	z-index: 0;
}

.fld-chapter-marquee__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	position: relative;
	z-index: 0;
}

.fld-chapter-marquee__label {
	position: absolute;
	right: 0.65rem;
	bottom: 0.55rem;
	left: 0.65rem;
	margin: 0;
	padding: 0;
	z-index: 1;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: clamp(0.7rem, 0.65rem + 0.2vw, 0.8125rem);
	font-weight: 500;
	letter-spacing: 0.03em;
	color: #fff;
	text-align: right;
	line-height: 1.25;
	text-shadow:
		0 0 1px rgba(0, 0, 0, 0.9),
		0 1px 3px rgba(0, 0, 0, 0.85);
	pointer-events: none;
}

.fld-chapter-marquee-section--chapter-gallery .fld-chapter-marquee__media::after,
.fld-chapter-marquee-section--chapter-gallery .fld-chapter-marquee__label {
	display: none;
}

.fld-chapter-marquee-section--chapter-gallery .fld-chapter-marquee-wrap {
	gap: 0;
}

.fld-chapter-marquee-section__footer {
	margin-top: 2.25rem;
}

@keyframes fld-chapter-marquee-left {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

@keyframes fld-chapter-marquee-right {
	from {
		transform: translateX(-50%);
	}
	to {
		transform: translateX(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.fld-chapter-marquee--top,
	.fld-chapter-marquee--bottom {
		animation: none;
	}
}
