/*--------------------------------------------------------------
# Membership — What Your Membership Unlocks
# Centered heading over four ticket-style cards: an image above a
# perforated stub carrying the perk and its member price. Four
# across on desktop, two by two below 992px.
--------------------------------------------------------------*/

/* ── Section wrapper ──
   The same padding as .m-cmp above and .m-vplate below. */
.m-unlocks {
	padding: 60px 0 100px;
	overflow: hidden;
}

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


/* ──────────────────────────────────────────────
   Header — the page's heading + subtitle pair
   (see .m-faq__header)
   ────────────────────────────────────────────── */

.m-unlocks__header {
	text-align: center;
	margin-bottom: 40px;
}

.m-unlocks__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);
	margin: 0 0 12px;
}

.m-unlocks__subtitle {
	font-family: var(--tpp-font-body);
	font-size: 0.9rem;
	font-weight: 400;
	line-height: 1.6;
	color: var(--tpp-text-light);
	margin: 0;
}


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

.m-unlocks__header,
.m-unlocks__note {
	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);
}

.m-unlocks.is-visible .m-unlocks__header,
.m-unlocks.is-visible .m-unlocks__note {
	opacity: 1;
	transform: translateY(0);
}

/* The footnote follows the last ticket in */
.m-unlocks.is-visible .m-unlocks__note {
	transition-delay: 0.56s;
}

/* Tickets land one after another… */
.m-unlocks__item {
	opacity: 0;
	transform: translateY(20px);
	transition:
		opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.m-unlocks.is-visible .m-unlocks__item {
	opacity: 1;
	transform: translateY(0);
	transition-delay: calc(0.16s + var(--card-index, 0) * 0.08s);
}

/* …and each perforation runs across once its ticket has landed */
.m-unlocks__stub::before {
	clip-path: inset(0 100% 0 0);
	transition: clip-path 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.m-unlocks.is-visible .m-unlocks__stub::before {
	clip-path: inset(0);
	transition-delay: calc(0.4s + var(--card-index, 0) * 0.08s);
}


/* ──────────────────────────────────────────────
   List
   ────────────────────────────────────────────── */

/* Two by two; four across from 992px (see Responsive). */
.m-unlocks__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 74px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.m-unlocks__item {
	min-width: 0;
}


/* ──────────────────────────────────────────────
   Ticket
   Built like the About page's boarding passes (.about-beds__ticket):
   each side notch is a quarter-circle bite off the icon half'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.
   ────────────────────────────────────────────── */

.m-unlocks__ticket {
	--ticket-notch: 10px;
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 16px;
	overflow: hidden;
}

.m-unlocks__top,
.m-unlocks__stub {
	background: var(--tpp-black);
	-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;
}


/* ── Icon half ──
   A fixed height, so the seams line up across a row whatever the copy
   below them runs to. The tag sits on its own row and the image centres
   in the space beneath it, so the two can't collide however narrow the
   card gets. */
.m-unlocks__top {
	--ticket-notch-y: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-shrink: 0;
	height: 160px;
	padding: 12px 12px 8px;
}

.m-unlocks__tag {
	align-self: flex-end;
	padding: 3px 10px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--tpp-radius-pill);
	font-family: var(--tpp-font-body);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.75);
}

/* A landscape box, which shows the three wide images and the tall luggage
   at about the same visual size */
.m-unlocks__icon {
	width: 200px;
	max-width: 100%;
	height: 110px;
	margin: auto 0;
}

/* Contained, so each image shows whole whatever its proportions */
.m-unlocks__icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}


/* ── Stub ── */
.m-unlocks__stub {
	--ticket-notch-y: 0;
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 22px 20px 20px;
}

/* Perforation along the seam, stopping short of the notches */
.m-unlocks__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);
}

.m-unlocks__title {
	font-family: var(--tpp-font-heading);
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--tpp-white);
	text-wrap: balance;
	margin: 0 0 8px;
}

.m-unlocks__desc {
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.65);
	margin: 0 0 20px;
}

/* Pinned to the foot of the stub, so the price lines align across a row */
.m-unlocks__price {
	margin: auto 0 0;
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.65);
}

/* The struck and member prices never split across lines */
.m-unlocks__price-deal {
	white-space: nowrap;
}

.m-unlocks__price-was {
	margin-right: 2px;
	color: rgba(255, 255, 255, 0.45);
}

.m-unlocks__price-now {
	font-weight: 700;
	color: var(--tpp-white);
}


/* ── Footnote ── */
.m-unlocks__note {
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--tpp-text-light);
	text-align: center;
	margin: 24px 0 0;
}


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

/* Desktop (≥992px) — four across */
@media screen and (min-width: 992px) {
	.m-unlocks__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Tablet and below (≤991px) */
@media screen and (max-width: 991px) {
	.m-unlocks {
		padding: 40px 0 64px;
	}
}

/* Mobile (≤767px) — still two by two, so everything steps down a size */
@media screen and (max-width: 767px) {
	.m-unlocks {
		padding: 0 0 64px;
	}

	.m-unlocks__header {
		margin-bottom: 28px;
	}

	.m-unlocks__list {
		gap: 10px;
	}

	.m-unlocks__ticket {
		--ticket-notch: 8px;
		border-radius: 14px;
	}

	.m-unlocks__top {
		height: 124px;
		padding: 8px 8px 6px;
	}

	.m-unlocks__tag {
		padding: 2px 8px;
		font-size: 0.6875rem;
	}

	.m-unlocks__icon {
		width: 96px;
		height: 72px;
	}

	.m-unlocks__stub {
		padding: 16px 14px 14px;
	}

	.m-unlocks__stub::before {
		right: calc(var(--ticket-notch) + 4px);
		left: calc(var(--ticket-notch) + 4px);
	}

	/* Eases down on the narrowest phones, where "Bonus.Vacations" would
	   otherwise be wider than its card */
	.m-unlocks__title {
		font-size: clamp(0.8125rem, 4vw, 0.9375rem);
		overflow-wrap: break-word;
		margin-bottom: 6px;
	}

	.m-unlocks__desc {
		font-size: 0.8125rem;
		margin-bottom: 14px;
	}

	/* Too narrow for one line: the figures on top, the rest beneath,
	   the same way on all four cards */
	.m-unlocks__price {
		font-size: 0.8125rem;
	}

	.m-unlocks__price-after {
		display: block;
	}

	.m-unlocks__note {
		margin-top: 20px;
		font-size: 0.8125rem;
	}
}


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

@media (prefers-reduced-motion: reduce) {

	.m-unlocks__header,
	.m-unlocks__note,
	.m-unlocks__item,
	.m-unlocks__stub::before {
		transition: none;
	}
}