/*--------------------------------------------------------------
# Services Grid Section
# 3 cards top row, 3 cards bottom row. Each card is tinted and carries
# a travel cutout that floats up on hover.
--------------------------------------------------------------*/

/* ── Section ── */
.services-grid {
	padding: 100px 0 120px;
	overflow: hidden;
}

/* With the logo strip straight after it (the current homepage order), 70px
   at every width, and the strip adds no margin of its own there (see
   social-proof.css). About, below the strip, starts with the same 70px (see
   about.css). Its two-class specificity outranks the breakpoint paddings,
   so this one rule covers every width. */
.services-grid:has(+ .social-proof) {
	padding-bottom: 70px;
}

/* The same with "Seats members booked" straight after it (the homepage order
   since 30 Nov 2026): 70px here, and that section adds its own top padding
   (member-seats.css). */
.services-grid:has(+ .seats) {
	padding-bottom: 70px;
}

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

	/* Scroll-reveal */
	opacity: 0;
	transform: translateY(32px);
	transition:
		opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.services-grid__container.is-visible {
	opacity: 1;
	transform: translateY(0);
}


/* ── Header ── */
.services-grid__header {
	text-align: center;
	margin-bottom: 56px;
}

.services-grid__title {
	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 16px;
}



/* ──────────────────────────────────────────────
   Grid Rows
   ────────────────────────────────────────────── */

.services-grid__row {
	display: grid;
	gap: 20px;
}

.services-grid__row--top {
	grid-template-columns: 1fr;
	margin-bottom: 20px;
}

.services-grid__row--bottom {
	grid-template-columns: 1fr;
}


/* ──────────────────────────────────────────────
   Card
   Each card has its own tint (--tint) and accent
   (--deep), set by a services-grid__card--{tone}
   class, plus a travel cutout on the right that
   floats up on hover.
   ────────────────────────────────────────────── */

.services-grid__card {
	--tint: var(--tpp-off-white);
	--deep: var(--tpp-black);

	display: flex;
	flex-direction: column;
	gap: 0;
	min-height: 280px;
	/* The right 40% is left clear for the cutout. */
	padding: 32px 40% 32px 28px;
	background: var(--tint);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 20px;
	position: relative;
	overflow: hidden;
	isolation: isolate;
	cursor: pointer;
	transition:
		transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.services-grid__card:hover {
	transform: translateY(-5px);
	box-shadow: 0 14px 35px -16px rgba(0, 0, 0, 0.18);
}

/* Keyboard focus lands on the stretched CTA; show it on the whole card. */
.services-grid__card:focus-within {
	outline: 3px solid var(--tpp-accent-dark);
	outline-offset: 3px;
}

/* ── Tones ── */
.services-grid__card--accent { --tint: var(--tpp-accent-tint); --deep: var(--tpp-accent-dark); }
.services-grid__card--sky   { --tint: var(--tpp-sky-tint); --deep: var(--tpp-blue); }
.services-grid__card--peach { --tint: #FFF0E3; --deep: #E2762E; }
.services-grid__card--teal  { --tint: #E8F6FA; --deep: #2A93AE; }
.services-grid__card--sand  { --tint: #F6F0E6; --deep: #A57B39; }
.services-grid__card--dark  { --tint: var(--tpp-black); --deep: var(--tpp-accent); }


/* ── Travel cutout ── */
.services-grid__art {
	position: absolute;
	z-index: -1;
	right: -6%;
	top: 50%;
	width: 52%;
	height: auto;
	pointer-events: none;
	transform: translateY(-50%) rotate(-6deg);
	filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.18));
	transition:
		translate 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
		rotate 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
		scale 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* The hover lift uses the separate translate / rotate / scale properties,
   which add to the resting transform. That keeps it the same at every
   breakpoint, and reduced motion can switch it off with one rule. */
.services-grid__card:hover .services-grid__art {
	translate: 0 -8%;
	rotate: 8deg;
	scale: 1.08;
}


/* ── Icon ── */
.services-grid__icon {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	background: rgba(255, 255, 255, 0.75);
	border-radius: 16px;
	color: var(--deep);
	margin-bottom: 22px;
}

.services-grid__card--dark .services-grid__icon {
	background: rgba(255, 255, 255, 0.1);
}


/* ── Card Title ── */
.services-grid__card-title {
	font-family: var(--tpp-font-heading);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--tpp-black);
	margin: 0 0 8px;
}

.services-grid__card--dark .services-grid__card-title {
	color: var(--tpp-white);
}


/* ── Card Description ── */
.services-grid__card-desc {
	font-family: var(--tpp-font-body);
	font-size: 0.9rem;
	font-weight: 400;
	line-height: 1.6;
	color: var(--tpp-text-light);
	margin: 0 0 22px;
	flex: 1;
}

.services-grid__card--dark .services-grid__card-desc {
	color: rgba(255, 255, 255, 0.65);
}


/* ── CTA ──
   A black pill with an orange arrow chip, so it reads as a button. */
.services-grid__cta {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 8px 8px 18px;
	border-radius: var(--tpp-radius-pill);
	background: var(--tpp-black);
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--tpp-white);
	text-decoration: none;
}

/* Stretched link — makes entire card clickable */
/* Restated for every link state: style.css sets a:hover, a:visited and
   a:focus to color: inherit, which outranks one class, and the ::after
   below makes the whole card the link, so hovering anywhere on a card
   turned this label grey on black (fixed 29 Nov 2026). */
.services-grid__cta:visited,
.services-grid__cta:hover,
.services-grid__cta:focus,
.services-grid__cta:active {
	color: var(--tpp-white);
}

.services-grid__cta::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

.services-grid__cta-arrow {
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	flex: none;
	border-radius: 50%;
	background: var(--tpp-accent);
	color: var(--tpp-black);
	transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.services-grid__card:hover .services-grid__cta-arrow {
	transform: rotate(-45deg);
}

/* Inverted on the dark card, so the button still stands out. */
.services-grid__card--dark .services-grid__cta {
	background: var(--tpp-accent);
	color: var(--tpp-black);
}

.services-grid__card--dark .services-grid__cta-arrow {
	background: var(--tpp-black);
	color: var(--tpp-accent);
}


/* ── Card without a description ── */
/* The Credit Cards card is a title and a button only — Owen's rule for
   anything card-related. The description's flex: 1 is what normally pushes
   the button to the bottom of the card, so without one the button's own
   auto margin does it, keeping it level with its neighbours. The title
   restores the gap the description's bottom margin would leave, which
   is all that separates them on mobile, where there is no space to fill. */
.services-grid__card--no-desc .services-grid__card-title {
	margin-bottom: 22px;
}

.services-grid__card--no-desc .services-grid__cta {
	margin-top: auto;
}


/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
	.services-grid__card,
	.services-grid__art,
	.services-grid__cta-arrow {
		transition: none;
	}

	.services-grid__card:hover {
		transform: none;
	}

	.services-grid__card:hover .services-grid__art {
		translate: none;
		rotate: none;
		scale: none;
	}
}


/* ──────────────────────────────────────────────
   Responsive — Tablet (≥768px)
   ────────────────────────────────────────────── */

@media screen and (min-width: 768px) {
	.services-grid__row--top {
		grid-template-columns: repeat(3, 1fr);
	}

	/* Three and three since the Merch card went, so both rows share one
	   column grid from tablet up. */
	.services-grid__row--bottom {
		grid-template-columns: repeat(3, 1fr);
	}
}


/* ──────────────────────────────────────────────
   Responsive — Desktop (≥992px)
   ────────────────────────────────────────────── */

@media screen and (min-width: 992px) {
	.services-grid__card {
		padding: 36px 40% 36px 32px;
	}
}


/* ──────────────────────────────────────────────
   Responsive — Three narrow columns (768–1199px)
   Below 1200px a card is too narrow to give the
   cutout its 40% column, so the cutout moves up
   into the top-right corner, beside the icon, and
   the text takes the full width.
   ────────────────────────────────────────────── */

@media screen and (min-width: 768px) and (max-width: 1199px) {
	.services-grid__card {
		padding-right: 28px;
	}

	.services-grid__art {
		top: 14px;
		right: 10px;
		width: 42%;
		max-height: 96px;
		object-fit: contain;
		object-position: right top;
		transform: rotate(-6deg);
	}
}


/* ──────────────────────────────────────────────
   Responsive — Large Desktop (≥1280px)
   ────────────────────────────────────────────── */

@media screen and (min-width: 1280px) {
	.services-grid {
		padding: 120px 0;
	}

	/* When How It Works comes straight after, its own top padding takes this
	   gap instead (see how-it-works.css). Keyed to the neighbour rather than
	   the page order, so the gap holds wherever the grid sits. */
	.services-grid:has(+ .hiw) {
		padding-bottom: 0;
	}
}


/* ──────────────────────────────────────────────
   Responsive — Mobile (≤767px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 767px) {
	.services-grid {
		padding: 64px 0 80px;
	}

	.services-grid__header {
		margin-bottom: 40px;
	}

	.services-grid__card {
		min-height: 0;
		padding: 28px 38% 28px 24px;
	}

	.services-grid__art {
		right: -4%;
		width: 44%;
	}

	.services-grid__row {
		gap: 14px;
	}

	.services-grid__row--top {
		margin-bottom: 14px;
	}

	.services-grid__icon {
		width: 48px;
		height: 48px;
		border-radius: 12px;
		margin-bottom: 16px;
	}
}

/* ──────────────────────────────────────────────
   Responsive — Small mobile (≤480px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 480px) {
	.services-grid__card {
		padding: 24px 36% 24px 20px;
		border-radius: 16px;
	}

	.services-grid__card-desc {
		margin-bottom: 16px;
	}

	/* Keeps step with the description's margin just above. */
	.services-grid__card--no-desc .services-grid__card-title {
		margin-bottom: 16px;
	}

	.services-grid__card-title {
		font-size: 1.25rem;
	}
}
