/*--------------------------------------------------------------
# Book Travel — Baggage Claim
# Members' trip photos as suitcases going round a baggage
# carousel, each with its trip on an orange luggage tag, slipping
# out through rubber flaps at either end of the belt.
--------------------------------------------------------------*/

/* ── Section ──
   Bottom padding only: .bt-process above supplies the gap over this, and
   .bt-member-card below has no top padding, so this section's bottom padding
   is the gap above it. Steps 100 / 80 / 72 / 56px, like the rest of the page. */
.bt-claim {
	/* The theme loads no monospace font; the same system stack the other
	   concept-built sections use. */
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
	/* Smaller bags on smaller screens; js/book-travel-claim.js measures the
	   result, so nothing else needs to know. */
	--bag-scale: 1;

	background: var(--tpp-white);
	padding: 0 0 100px;
}

/* 150px wider than the page's other sections, so the belt runs a little
   longer on wide screens. On narrower ones it fills the screen inside the
   usual gutters, as the others do. The heading is centred, so it's only
   the belt (and the sign and pause button above it) that widens. */
.bt-claim__container {
	width: 100%;
	max-width: calc(var(--tpp-container-max) + 150px);
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}

.bt-claim__heading {
	text-align: center;
	font-family: var(--tpp-font-heading);
	font-size: clamp(2rem, 4.5vw + 0.5rem, 3.5rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.03em;
	color: var(--tpp-black);
	margin: 0 0 48px;
}


/* ── The sign and the pause button ── */
.bt-claim__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
}

.bt-claim__sign {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 8px 18px 8px 8px;
	border-radius: 12px;
	background: var(--tpp-black);
	color: var(--tpp-white);
	font-family: var(--mono);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.bt-claim__sign b {
	color: var(--tpp-accent);
}

.bt-claim__pict {
	display: grid;
	place-items: center;
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: var(--tpp-accent);
	color: var(--tpp-black);
}

.bt-claim__pict svg {
	width: 22px;
	height: 22px;
}

/* Two classes on the button rules: style.css styles every <button>, its
   :hover and its :focus, at up to one class plus an element. */
.bt-claim .bt-claim__pause {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--tpp-border);
	border-radius: 50%;
	background: var(--tpp-white);
	color: var(--tpp-black);
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

/* [hidden] alone loses to the display: grid above */
.bt-claim .bt-claim__pause[hidden] {
	display: none;
}

.bt-claim .bt-claim__pause:hover,
.bt-claim .bt-claim__pause:focus {
	border-color: var(--tpp-black);
}

.bt-claim .bt-claim__pause:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 3px;
}

.bt-claim__icon {
	width: 16px;
	height: 16px;
}

.bt-claim .bt-claim__icon--play,
.bt-claim.is-paused .bt-claim__icon--pause {
	display: none;
}

.bt-claim.is-paused .bt-claim__icon--play {
	display: block;
}


/* ──────────────────────────────────────────────
   The belt
   ────────────────────────────────────────────── */

.bt-claim__belt {
	position: relative;
	overflow: hidden;
	border-radius: 24px;
	background: linear-gradient(180deg, var(--tpp-off-white), var(--tpp-border-light));
}

/* A row you can scroll sideways, until js/book-travel-claim.js arms the
   section and sets it moving. The top padding is headroom for the handles. */
.bt-claim__window {
	overflow-x: auto;
	overscroll-behavior-x: contain;
	padding-top: 40px;
}

.bt-claim.is-armed .bt-claim__window {
	overflow: hidden;
}

.bt-claim__track {
	display: flex;
	width: max-content;
}

/* One loop moves the track exactly one set of bags to the left (--set,
   measured by the script), so the copy behind it lands where the first set
   began and the loop never shows a seam. */
.bt-claim.is-armed .bt-claim__track {
	animation: bt-claim-belt var(--dur, 30s) linear infinite;
	animation-play-state: paused;
}

/* .is-in-view comes and goes with the script's observer, so the belt only
   runs while it's on screen... */
.bt-claim.is-armed.is-in-view .bt-claim__track {
	animation-play-state: running;
}

/* ...and the pause button stops it (same weight, later, so it wins)... */
.bt-claim.is-armed.is-paused .bt-claim__track {
	animation-play-state: paused;
}

/* ...as does hovering, where there's a pointer to hover with. On a touch
   screen a tap would leave it stuck in :hover. */
@media (hover: hover) {
	.bt-claim.is-armed .bt-claim__belt:hover .bt-claim__track {
		animation-play-state: paused;
	}
}

@keyframes bt-claim-belt {
	to {
		transform: translateX(calc(-1 * var(--set, 50%)));
	}
}

/* Each set of bags carries its own stretch of belt, so the slats line up
   from one copy to the next and the loop stays seamless. */
.bt-claim__set {
	position: relative;
	display: flex;
	/* Every bag stands on the belt, whatever its height */
	align-items: flex-end;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The slats, behind the bags */
.bt-claim__set::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	height: 52px;
	background: repeating-linear-gradient(90deg, #343434 0 56px, #222222 56px 58px);
}

/* The steel lip in front of them */
.bt-claim__set::after {
	content: '';
	position: absolute;
	z-index: 2;
	left: 0;
	right: 0;
	bottom: 0;
	height: 16px;
	background: linear-gradient(180deg, #CFCFCF, #8E8E8E);
	box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.25);
}

/* Rubber flaps at either end, which the bags slip through. Only once the
   belt moves: over a row you scroll yourself they'd just hide the ends. */
.bt-claim__flap {
	display: none;
	position: absolute;
	z-index: 3;
	top: 0;
	bottom: 0;
	width: 64px;
	background: repeating-linear-gradient(90deg, var(--tpp-black) 0 10px, #2A2A2A 10px 12px);
	box-shadow: inset 0 10px 0 #111111;
}

.bt-claim.is-armed .bt-claim__flap {
	display: block;
}

.bt-claim__flap--l {
	left: 0;
}

.bt-claim__flap--r {
	right: 0;
}


/* ── A bag ── */
.bt-claim__bag {
	position: relative;
	z-index: 1;
	flex: none;
	width: calc(var(--w, 220px) * var(--bag-scale));
	margin: 0 22px 40px;
}

.bt-claim__photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border: 6px solid var(--tpp-black);
	border-radius: 16px;
	background: var(--tpp-dark);
	box-shadow: 0 22px 24px -18px rgba(0, 0, 0, 0.55);
}

.bt-claim__handle {
	position: absolute;
	top: -16px;
	left: 50%;
	width: 30%;
	height: 22px;
	border: 6px solid var(--tpp-black);
	border-bottom: 0;
	border-radius: 12px 12px 0 0;
	transform: translateX(-50%);
}

/* Wheels */
.bt-claim__bag::after {
	content: '';
	position: absolute;
	left: 14%;
	right: 14%;
	bottom: -10px;
	height: 14px;
	background:
		radial-gradient(circle at 7px 7px, var(--tpp-black) 6px, transparent 6.5px) left / 14px 14px no-repeat,
		radial-gradient(circle at 7px 7px, var(--tpp-black) 6px, transparent 6.5px) right / 14px 14px no-repeat;
}

/* The luggage tag, alternately near the top and the bottom of the bag */
.bt-claim__tag {
	position: absolute;
	top: 28px;
	right: -12px;
	max-width: 160px;
	padding: 8px 12px 8px 22px;
	border-radius: 6px;
	background: var(--tpp-accent);
	color: var(--tpp-black);
	font-family: var(--mono);
	font-size: 0.625rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transform: rotate(5deg);
	box-shadow: 0 8px 14px -8px rgba(0, 0, 0, 0.45);
}

.bt-claim__bag:nth-child(even) .bt-claim__tag {
	top: auto;
	bottom: 44px;
	transform: rotate(-4deg);
}

/* The eyelet */
.bt-claim__tag::before {
	content: '';
	position: absolute;
	left: 8px;
	top: 50%;
	width: 7px;
	height: 7px;
	margin-top: -3.5px;
	border-radius: 50%;
	background: var(--tpp-off-white);
	box-shadow: inset 0 0 0 1.5px rgba(26, 26, 26, 0.35);
}


/* ──────────────────────────────────────────────
   Scroll-reveal
   .is-visible comes from js/book-travel-claim.js
   ────────────────────────────────────────────── */

.bt-claim__heading,
.bt-claim__carousel {
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.bt-claim.is-visible .bt-claim__heading,
.bt-claim.is-visible .bt-claim__carousel {
	opacity: 1;
	transform: none;
}

.bt-claim.is-visible .bt-claim__carousel {
	transition-delay: 0.12s;
}


/* ──────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────── */

/* Tablet (≤991px) */
@media screen and (max-width: 991px) {
	.bt-claim {
		padding: 0 0 80px;
	}
}

/* Mobile (≤767px) — smaller bags, closer together, narrower flaps */
@media screen and (max-width: 767px) {
	.bt-claim {
		--bag-scale: 0.82;

		padding: 0 0 72px;
	}

	.bt-claim__heading {
		font-size: clamp(1.75rem, 7vw, 2.5rem);
		margin-bottom: 32px;
	}

	.bt-claim__belt {
		border-radius: 20px;
	}

	.bt-claim__bag {
		margin: 0 16px 40px;
	}

	.bt-claim__flap {
		width: 36px;
	}
}

/* Small mobile (≤480px) */
@media screen and (max-width: 480px) {
	.bt-claim {
		--bag-scale: 0.72;

		padding: 0 0 56px;
	}

	.bt-claim__sign {
		font-size: 0.6875rem;
		letter-spacing: 0.1em;
	}

	.bt-claim__tag {
		max-width: 130px;
	}
}


/* ──────────────────────────────────────────────
   Reduced motion
   The script leaves the belt as a still row you can scroll. This covers
   the setting changing after it has already set the belt moving.
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.bt-claim__heading,
	.bt-claim__carousel,
	.bt-claim .bt-claim__pause {
		transition: none;
	}

	.bt-claim.is-armed .bt-claim__track {
		animation: none;
	}

	.bt-claim.is-armed .bt-claim__window {
		overflow-x: auto;
	}

	.bt-claim.is-armed .bt-claim__flap,
	.bt-claim .bt-claim__pause {
		display: none;
	}
}
