/*--------------------------------------------------------------
# Book Travel — Lie-flat Seat
# One photo of the seat, with four numbered spots on it. Each
# brings up a short note in a frosted card over the photo, and
# the notes step through on their own while it's on screen.
--------------------------------------------------------------*/

/* ── Section ──
   Bottom padding only: .bt-member-card above supplies the gap over this, and
   .bt-cta 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-lie-flat {
	/* 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;
	--spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--ease: cubic-bezier(0.22, 1, 0.36, 1);

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

.bt-lie-flat__container {
	width: 100%;
	max-width: var(--tpp-container-max);
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}

.bt-lie-flat__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 photo and its spots
   ────────────────────────────────────────────── */

.bt-lie-flat__seat {
	position: relative;
	max-width: 1080px;
	margin: 0 auto;
}

.bt-lie-flat__photo {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1672 / 941;
	border-radius: 28px;
	background: var(--tpp-dark);
	box-shadow: 0 40px 70px -48px rgba(0, 0, 0, 0.5);
}

.bt-lie-flat__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* A spot sits centred on its --x / --y, a percentage of the photo. 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-lie-flat .bt-lie-flat__spot {
	position: absolute;
	left: var(--x);
	top: var(--y);
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.bt-lie-flat .bt-lie-flat__spot:focus-visible {
	outline: 2px solid var(--tpp-white);
	outline-offset: 2px;
}

/* The pulse. It only runs during the tour: on screen, not paused, and not
   yet taken over by a pick (.is-in-view, .is-paused and .is-manual all come
   from js/book-travel-lie-flat.js), so it never carries on indefinitely.
   Off, rather than paused, the rest of the time, so no ring is left frozen
   halfway out. */
.bt-lie-flat__spot::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(255, 153, 0, 0.4);
	opacity: 0;
	transform: scale(0.6);
}

.bt-lie-flat.is-in-view:not(.is-paused):not(.is-manual) .bt-lie-flat__spot::before {
	animation: bt-lie-flat-pulse 2.4s ease-out infinite;
}

@keyframes bt-lie-flat-pulse {
	from {
		opacity: 0.9;
		transform: scale(0.6);
	}

	to {
		opacity: 0;
		transform: scale(1.9);
	}
}

.bt-lie-flat__dot {
	position: absolute;
	inset: 7px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--tpp-accent);
	color: var(--tpp-black);
	font-family: var(--mono);
	font-size: 0.625rem;
	font-weight: 700;
	line-height: 1;
	box-shadow:
		0 0 0 3px rgba(26, 26, 26, 0.3),
		0 4px 10px rgba(0, 0, 0, 0.3);
	transition:
		background 0.25s ease,
		color 0.25s ease,
		transform 0.3s var(--spring);
}

.bt-lie-flat .bt-lie-flat__spot:hover .bt-lie-flat__dot {
	transform: scale(1.12);
}

.bt-lie-flat .bt-lie-flat__spot[aria-pressed="true"] .bt-lie-flat__dot {
	background: var(--tpp-black);
	color: var(--tpp-accent);
	box-shadow:
		0 0 0 3px var(--tpp-accent),
		0 4px 10px rgba(0, 0, 0, 0.3);
}


/* ──────────────────────────────────────────────
   The note
   ────────────────────────────────────────────── */

/* Frosted, over the photo's bottom-left corner. All four notes share one
   grid cell, so the box is always the size of the longest. */
.bt-lie-flat__note {
	position: absolute;
	left: 24px;
	bottom: 24px;
	display: grid;
	max-width: 340px;
	padding: 16px 18px 18px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.88);
	-webkit-backdrop-filter: blur(12px) saturate(160%);
	backdrop-filter: blur(12px) saturate(160%);
	box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.45);
	text-align: left;
}

/* Only the active note shows. visibility, not just opacity, so a screen
   reader only finds that one. The outgoing note goes quickly, the incoming
   one rises in. */
.bt-lie-flat__card {
	grid-area: 1 / 1;
	visibility: hidden;
	opacity: 0;
	transform: translateY(6px);
	transition:
		opacity 0.2s ease,
		transform 0.2s ease,
		visibility 0s linear 0.2s;
}

.bt-lie-flat__card.is-active {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition:
		opacity 0.45s var(--ease) 0.1s,
		transform 0.45s var(--ease) 0.1s,
		visibility 0s linear 0s;
}

.bt-lie-flat__count {
	display: block;
	font-family: var(--mono);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tpp-text-light);
}

.bt-lie-flat__title {
	display: block;
	margin-top: 4px;
	font-family: var(--tpp-font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--tpp-black);
}

.bt-lie-flat__text {
	margin: 4px 0 0;
	font-family: var(--tpp-font-body);
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--tpp-text);
}


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

.bt-lie-flat__heading,
.bt-lie-flat__seat {
	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-lie-flat.is-visible .bt-lie-flat__heading,
.bt-lie-flat.is-visible .bt-lie-flat__seat {
	opacity: 1;
	transform: none;
}

.bt-lie-flat.is-visible .bt-lie-flat__seat {
	transition-delay: 0.12s;
}


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

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

/* Mobile (≤767px) — the note moves under the photo */
@media screen and (max-width: 767px) {
	.bt-lie-flat {
		padding: 0 0 72px;
	}

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

	.bt-lie-flat__photo {
		border-radius: 20px;
	}

	.bt-lie-flat__note {
		position: static;
		max-width: none;
		margin-top: 14px;
		background: var(--tpp-off-white);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		box-shadow: 0 0 0 1px var(--tpp-border-light);
	}
}

/* Small mobile (≤480px) — smaller spots on a smaller photo */
@media screen and (max-width: 480px) {
	.bt-lie-flat {
		padding: 0 0 56px;
	}

	.bt-lie-flat .bt-lie-flat__spot {
		width: 30px;
		height: 30px;
		margin: -15px 0 0 -15px;
	}

	.bt-lie-flat__dot {
		inset: 6px;
		font-size: 0.5625rem;
	}
}


/* ──────────────────────────────────────────────
   Reduced motion
   The script runs no tour; this takes out the pulse and the fades.
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.bt-lie-flat__heading,
	.bt-lie-flat__seat,
	.bt-lie-flat__card,
	.bt-lie-flat__card.is-active,
	.bt-lie-flat__dot {
		transition: none;
	}

	/* The second selector matches the tour's own rule, so this wins even if
	   the setting changes after the tour has started. */
	.bt-lie-flat__spot::before,
	.bt-lie-flat.is-in-view:not(.is-paused):not(.is-manual) .bt-lie-flat__spot::before {
		animation: none;
	}
}
