/*--------------------------------------------------------------
# About — Boarding Passes
# Centered heading over a row of boarding-pass tickets: a seat photo
# on top, a perforated stub below carrying the route, cabin and
# points. A slider on every screen size (since 29 Nov 2026): one row
# that snaps ticket by ticket, with arrows and a progress bar under it.
--------------------------------------------------------------*/

/* ── Section ── */
.about-beds {
	/* Bottom padding only — .about-story above already ends on 120–140px,
	   and .about-socials below adds 50px of its own. */
	padding: 0 0 120px;
	overflow: hidden;
}

/* ── Container ── */
.about-beds__container {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}


/* ──────────────────────────────────────────────
   Heading
   ────────────────────────────────────────────── */

.about-beds__heading {
	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);
	text-align: center;
	margin: 0 0 56px;
}


/* ──────────────────────────────────────────────
   Scroll-reveal
   ────────────────────────────────────────────── */

.about-beds__heading {
	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);
}

.about-beds.is-visible .about-beds__heading {
	opacity: 1;
	transform: translateY(0);
}

/* Tickets fade in one after another. Fade only: the scrolling row
   clips anything moving up or down inside it. */
.about-beds__item {
	opacity: 0;
	transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-beds.is-visible .about-beds__item {
	opacity: 1;
	transition-delay: calc(0.16s + var(--ticket-index, 0) * 0.08s);
}


/* ──────────────────────────────────────────────
   Slider
   One row that snaps ticket by ticket. It starts at the content's left
   edge and runs to the screen's right edge (the negative right margin is
   the gap between the container and the screen), so the next ticket
   peeks in; the matching right padding lets the last ticket finish level
   with the content's right edge. .about-beds has overflow: hidden, which
   trims the overhang. No JS needed to scroll: the arrows and the bar
   below are extras (js/about-beds-reveal.js).
   ────────────────────────────────────────────── */

.about-beds__list {
	display: flex;
	gap: 20px;
	list-style: none;
	margin: 0 calc(50% - 50vw) 0 0;
	padding: 0 calc(50vw - 50%) 0 0;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.about-beds__list::-webkit-scrollbar {
	display: none;
}

.about-beds__list:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 6px;
	border-radius: 18px;
}

/* About three and a half across on a desktop, the last one peeking. */
.about-beds__item {
	flex: 0 0 min(360px, 27vw);
	min-width: 0;
	scroll-snap-align: start;
}


/* ── Controls: shown once the row is wider than the screen ── */
.about-beds__controls {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 32px;
}

.about-beds.has-overflow .about-beds__controls {
	display: flex;
}

.about-beds__arrow {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--tpp-border);
	border-radius: 50%;
	background: transparent;
	color: var(--tpp-black);
	cursor: pointer;
	transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.about-beds__arrow:hover:not(:disabled) {
	background: var(--tpp-black);
	border-color: var(--tpp-black);
	color: var(--tpp-white);
}

.about-beds__arrow:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 3px;
}

.about-beds__arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

/* How far along the row you are: the orange part is the stretch on screen */
.about-beds__progress {
	position: relative;
	width: 180px;
	height: 4px;
	border-radius: 4px;
	background: var(--tpp-border-light);
	overflow: hidden;
}

.about-beds__progress-bar {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--bar-left, 0%);
	width: var(--bar-width, 40%);
	border-radius: 4px;
	background: var(--tpp-black);
	transition: left 0.15s linear;
}


/* ──────────────────────────────────────────────
   Ticket
   Built like the stub under the story photo: each side notch is a
   quarter-circle bite off the photo's bottom corner plus one off the
   stub's top corner, meeting at the seam as a semicircle. Each half
   cuts only its own corners, so neither depends on the other's height.
   ────────────────────────────────────────────── */

.about-beds__ticket {
	--ticket-notch: 10px;
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	border-radius: 16px;
	overflow: hidden;
}

.about-beds__photo,
.about-beds__stub {
	-webkit-mask:
		radial-gradient(circle var(--ticket-notch) at 0 var(--ticket-notch-y), transparent 98%, #000) left / 51% 100% no-repeat,
		radial-gradient(circle var(--ticket-notch) at 100% var(--ticket-notch-y), transparent 98%, #000) right / 51% 100% no-repeat;
	mask:
		radial-gradient(circle var(--ticket-notch) at 0 var(--ticket-notch-y), transparent 98%, #000) left / 51% 100% no-repeat,
		radial-gradient(circle var(--ticket-notch) at 100% var(--ticket-notch-y), transparent 98%, #000) right / 51% 100% no-repeat;
}


/* ── Seat photo ── */
.about-beds__photo {
	--ticket-notch-y: 100%;
	position: relative;
	flex-shrink: 0;
	aspect-ratio: 4 / 3;
	background: var(--tpp-dark);
}

.about-beds__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.about-beds__photo--placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.45);
}


/* ── Stub ── */
.about-beds__stub {
	--ticket-notch-y: 0;
	position: relative;
	flex: 1;
	padding: 20px 18px 18px;
	background: var(--tpp-black);
}

/* Perforation along the seam, stopping short of the notches */
.about-beds__stub::before {
	content: "";
	position: absolute;
	top: 0;
	right: calc(var(--ticket-notch) + 6px);
	left: calc(var(--ticket-notch) + 6px);
	border-top: 2px dashed rgba(255, 255, 255, 0.3);
}

.about-beds__label {
	margin: 0;
	font-family: var(--tpp-font-body);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}


/* ── Route ── */
.about-beds__route {
	display: grid;
	grid-template-columns: auto minmax(28px, 1fr) auto;
	grid-template-areas:
		"from-label .      to-label"
		"from-place flight to-place";
	align-items: center;
	gap: 6px 10px;
	margin: 0;
}

.about-beds__place {
	font-family: var(--tpp-font-heading);
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--tpp-white);
}

/* City names rather than airport codes — sized down so both ends fit */
.about-beds__ticket--names .about-beds__place {
	font-size: 1.125rem;
	line-height: 1.25;
}

.about-beds__label--from { grid-area: from-label; }
.about-beds__place--from { grid-area: from-place; }
.about-beds__label--to { grid-area: to-label; }
.about-beds__place--to { grid-area: to-place; }

.about-beds__label--to,
.about-beds__place--to {
	text-align: right;
}

/* Flight path: a hairline either side of the plane */
.about-beds__flight {
	grid-area: flight;
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--tpp-accent);
}

.about-beds__flight::before,
.about-beds__flight::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(255, 255, 255, 0.2);
}

/* Glides in from the left once its ticket has landed */
.about-beds__plane {
	display: block;
	flex-shrink: 0;
	opacity: 0;
	transform: translateX(-14px);
	transition:
		opacity 0.5s ease,
		transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-beds.is-visible .about-beds__plane {
	opacity: 1;
	transform: none;
	transition-delay: calc(0.5s + var(--ticket-index, 0) * 0.08s);
}


/* ── Cabin and points ── */
.about-beds__details {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	margin: 16px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.about-beds__detail {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.about-beds__detail--points {
	text-align: right;
}

.about-beds__value {
	margin: 0;
	font-family: var(--tpp-font-heading);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--tpp-white);
}


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

/* Tablet (≤991px) — about two and a half across */
@media screen and (max-width: 991px) {
	.about-beds__list {
		gap: 16px;
	}

	.about-beds__item {
		flex-basis: min(320px, 42vw);
	}

	.about-beds__heading {
		margin-bottom: 40px;
	}
}

/* Mobile (≤767px) */
@media screen and (max-width: 767px) {
	.about-beds {
		padding: 0 0 80px;
	}

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

	/* ── Row ──
	   Edge to edge on a phone: negative margins cancel the container
	   padding on both sides, and scroll-padding puts the snap position
	   back at the content edge. */
	.about-beds__list {
		gap: 12px;
		scroll-padding-left: var(--tpp-container-padding);
		margin-left: calc(var(--tpp-container-padding) * -1);
		margin-right: calc(var(--tpp-container-padding) * -1);
		padding-left: var(--tpp-container-padding);
		padding-right: var(--tpp-container-padding);
	}

	/* Capped so tickets keep their shape on wider phones; the remainder
	   leaves the next one peeking, which is what signals the row scrolls. */
	.about-beds__item {
		flex: 0 0 min(78%, 300px);
	}

	.about-beds__controls {
		margin-top: 24px;
	}

	.about-beds__progress {
		width: 120px;
	}
}


/* ──────────────────────────────────────────────
   Reduced motion
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.about-beds__heading,
	.about-beds__item,
	.about-beds__plane,
	.about-beds__progress-bar {
		transition: none;
	}

	.about-beds__list {
		scroll-behavior: auto;
	}

	.about-beds.is-visible .about-beds__item,
	.about-beds.is-visible .about-beds__plane {
		transition-delay: 0s;
	}
}
