/*--------------------------------------------------------------
# Hero Section
# Since 2 Dec 2026 the photo is Owen in a cream cabin seat under three
# plane windows (owen-on-plane-windows.webp, the About hero's until
# then; the two heroes swapped pictures). The photo's top third is
# empty cream wall, so the copy sits there in dark type, with no dark
# overlay, and the orange Inner Circle card sits in the empty
# bottom-right corner. Below 1200px the copy, the photo and the card
# stack instead.
--------------------------------------------------------------*/

/* ── Hero wrapper ──
   As tall as the photo at the screen's width, so the whole picture shows
   and the empty band above the windows (the top 34% of the photo) is there
   for the copy, but capped at the screen's height, so the buttons always
   show without scrolling. The background is the photo's own top edge
   colour. */
.hero {
	/* How far the photo is moved up (computers only, 1200px and wider).
	   Bigger moves it up more; 0px puts it back. The strip this leaves at
	   the bottom falls in the white fade. */
	--hero-photo-lift: 95px;

	position: relative;
	width: 100%;
	/* The photo's shape at the screen's width (1672 x 941), but never taller
	   than the screen under the header (2 Dec 2026, Anish: the description
	   and buttons must show without scrolling). Where this cuts the hero
	   shorter than the photo, the photo's bottom is cropped.
	   A plain height, not aspect-ratio plus max-height: Safari sized the copy
	   inside (height: 100% below) by the photo's full shape and ignored the
	   limit, so on a shorter Safari window the buttons fell below the hero's
	   bottom edge and were cut off (Owen's photo, 3 Dec 2026). The three lines
	   are fallbacks: older browsers keep the last one they understand. */
	height: calc(100vw * 941 / 1672);
	height: min(calc(100vw * 941 / 1672), calc(100vh - var(--tpp-header-height)));
	height: min(calc(100vw * 941 / 1672), calc(100svh - var(--tpp-header-height)));
	min-height: 560px;
	overflow: hidden;
	background: #F3EBEA;
	color: var(--tpp-black);
}

/* ── Background image ── */
.hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.hero__bg-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Moved up by --hero-photo-lift (set on .hero above): the photo's top
	   edge sits that far above the hero's. Where the hero is cut shorter
	   than the photo, the lift uses the cropped bottom, so no gap opens. */
	object-position: center calc(var(--hero-photo-lift) * -1);
	display: block;
}

/* A light white fade over the bottom of the photo, where the description
   and buttons sit over Owen's laptop and knees: the same fade the About
   hero had over this photo (clear to 74%, white at the bottom edge). */
.hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0) 74%, rgba(255, 255, 255, 0.45) 86%, rgba(255, 255, 255, 0.9) 95%, #FFFFFF 100%);
	pointer-events: none;
}

/* ── Container ──
   Not positioned, so the card below is placed against the whole hero (the
   photo) rather than this 1400px-wide box; the copy carries its own
   position and z-index to sit above the photo. */
.hero__container {
	width: 100%;
	height: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: clamp(28px, 2.4vw, 48px) var(--tpp-container-padding) 0;
}

/* ── Content block ──
   The About hero's layout (Anish, 2 Dec 2026): the heading centred in the
   empty band above the windows, the description and buttons centred at
   the bottom, below them. The auto top margin on the description is what
   pushes it and the buttons down. The bottom padding is 2vw, the same
   3.5% of the hero's height the card keeps from the bottom edge. */
.hero__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	padding-bottom: 2vw;
	text-align: center;
}

/* Title */
.hero__title {
	max-width: 1080px;
	font-family: var(--tpp-font-heading);
	font-size: clamp(2.5rem, 4.4vw, 4.5rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.025em;
	color: var(--tpp-black);
	margin: 0;
	text-wrap: balance;

	/* Entrance animation */
	opacity: 0;
	transform: translateY(30px);
	animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

/* The heading's second line, in the quieter grey the About heading's
   second line had (2 Dec 2026, Anish). 5:1 on the cream wall. */
.hero__title-accent {
	display: block;
	color: var(--tpp-text-light);
}

/* Subtitle */
/* Narrower than the About description was (33% of the screen), so it
   ends left of the orange card in the bottom-right corner. The white halo,
   as on the About hero, keeps it readable over Owen's laptop and knees. */
.hero__subtitle {
	font-family: var(--tpp-font-body);
	font-size: clamp(0.95rem, 0.5vw + 0.6rem, 1.0625rem);
	font-weight: 400;
	line-height: 1.65;
	color: var(--tpp-text);
	text-shadow: 0 0 2px #FFFFFF, 0 0 8px rgba(255, 255, 255, 0.95), 0 0 16px rgba(255, 255, 255, 0.85);
	margin: auto 0 20px;
	/* 33% of the screen, or less where the card's 380px minimum would
	   reach it (it must end 12px left of the card). */
	max-width: min(33vw, calc(95vw - 784px));
	/* Even lines: Owen's shorter strap line (3 Dec 2026) left "planes!"
	   alone on a third line at 1200px. */
	text-wrap: balance;

	/* Entrance animation */
	opacity: 0;
	transform: translateY(30px);
	animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

/* Actions wrapper */
.hero__actions {
	justify-content: center;
	/* Two buttons side by side, wrapping when the row runs out of room.
	   On phones .btn-hero goes full width, so they simply stack. The default
	   stretch keeps both pills the same height, though only the first
	   carries the 16px arrow. */
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	opacity: 0;
	transform: translateY(30px);
	animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

/* Hero CTA button */
.btn-hero {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--tpp-font-body);
	font-size: 0.938rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	padding: 16px 32px;
	border-radius: var(--tpp-radius-pill);
	/* Orange: the hero's key button (white until 29 Nov 2026) */
	border: 1.5px solid var(--tpp-accent);
	background: var(--tpp-accent);
	color: var(--tpp-black);
	cursor: pointer;
	transition: all var(--tpp-transition);
	white-space: nowrap;
}

.btn-hero:visited,
.btn-hero:focus,
.btn-hero:active {
	color: var(--tpp-black);
}

.btn-hero:hover {
	background: var(--tpp-accent-dark);
	border-color: var(--tpp-accent-dark);
	color: var(--tpp-black);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.btn-hero:hover:visited {
	color: var(--tpp-black);
}

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

/* Secondary hero button — outlined in black on the pale photo (it was a
   white outline on the old dark one), so Join Membership Now keeps the
   lead. The text colour is restated for every state with two classes, as
   style.css sets link states to `color: inherit`. */
.btn-hero.btn-hero--outline {
	background: transparent;
	border-color: rgba(26, 26, 26, 0.45);
}

.btn-hero.btn-hero--outline,
.btn-hero.btn-hero--outline:visited,
.btn-hero.btn-hero--outline:hover,
.btn-hero.btn-hero--outline:hover:visited,
.btn-hero.btn-hero--outline:focus,
.btn-hero.btn-hero--outline:active {
	color: var(--tpp-black);
}

.btn-hero.btn-hero--outline:hover {
	background: rgba(26, 26, 26, 0.05);
	border-color: var(--tpp-black);
	box-shadow: none;
}

.btn-arrow {
	transition: transform var(--tpp-transition);
	flex-shrink: 0;
}

.btn-hero:hover .btn-arrow {
	transform: translateX(4px);
}

/* ── Bottom feature card with accordion slider ──
   In the photo's empty bottom-right corner: right of Owen's laptop (which
   ends 68% across) and below the third window (which ends 68% down). Its
   size follows the screen's width, like the photo's, so it stays there. */
.hero__cards {
	position: absolute;
	right: 2.5%;
	bottom: 3.5%;
	/* 30% of the screen (it was 27%, a little cramped; Anish, 2 Dec). It
	   starts 67.5% across, just right of the description (which ends at
	   66.5%). */
	width: clamp(380px, 30vw, 580px);
	z-index: 2;

	/* Entrance animation */
	opacity: 0;
	transform: translateY(30px);
	animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.65s forwards;
}

/* The single orange card container */
/* position: relative so the stretched link below is bounded by the card.
   No offsets, so nothing moves — it only establishes the containing block. */
.hero__feature-card {
	position: relative;
	background: var(--tpp-accent);
	color: var(--tpp-black);
	border-radius: 22px;
	padding: 10px;
	display: flex;
	align-items: stretch;
	gap: 0;
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.3);
	transition: box-shadow var(--tpp-transition);
}

/* ── Stretched link ──
   Same technique as .services-grid__cta: the anchor sits on the title, but a
   transparent ::after covers the whole card so anywhere on it is clickable.
   Inheriting colour and dropping the underline keeps the card looking exactly
   as it did. */
.hero__feature-link {
	color: inherit;
	text-decoration: none;
}

.hero__feature-link:hover,
.hero__feature-link:visited,
.hero__feature-link:hover:visited {
	color: inherit;
}

.hero__feature-link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

/* Focus ring stays on the title text. Putting it on the card via :has() would
   frame the hit area more accurately, but that would mean suppressing the
   outline here — and on any browser without :has() support the suppression
   would apply while the replacement did not, leaving keyboard users with no
   indicator at all. */
.hero__feature-link:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 3px;
	border-radius: 2px;
}

.hero__feature-card:hover {
	box-shadow: 0 16px 48px rgba(255, 153, 0, 0.25);
}

/* ── Accordion image slider ── */
/* Wide and low, so the open photo is about the photos' own 3:2 shape and
   the closed strips are wide enough to show a face (2 Dec 2026, Anish: the
   photos weren't fitting; at half the card the open one was near square).
   The height is also capped by the screen's height: on short screens the
   hero is cut shorter, and a shorter card keeps clear of the third window. */
.hero__slider {
	display: flex;
	gap: 6px;
	/* As tall as the card's text (stretch), and never shorter than this. */
	align-self: stretch;
	min-height: clamp(104px, min(8.6vw, 17svh), 168px);
	flex: 0 0 54%;
	max-width: 320px;
	border-radius: 10px;
	overflow: hidden;
}

/* Individual slide panel */
/* z-index lifts the slides above the stretched link's overlay (z-index: 1), so
   clicking a slide still expands it via js/hero-slider.js instead of following
   the link. Everywhere else on the card falls through to the link. */
.hero__slide {
	flex: 0.4;
	min-width: 0;
	border-radius: 12px;
	overflow: hidden;
	cursor: pointer;
	position: relative;
	z-index: 2;
	transition: flex 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Active (expanded) slide */
.hero__slide--active {
	flex: 2;
}

/* Slide image */
.hero__slide-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 12px;
	transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero__slide--active .hero__slide-img {
	transform: scale(1);
}

.hero__slide:not(.hero__slide--active) .hero__slide-img {
	transform: scale(1.15);
}

/* Subtle inactive overlay for depth */
.hero__slide::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.12);
	opacity: 1;
	transition: opacity 0.5s ease;
	pointer-events: none;
}

.hero__slide--active::after {
	opacity: 0;
}

/* ── Feature text body (right side) ──
   The icon sits beside the title and the description wraps under both,
   which keeps the card short enough for the photo's empty corner. */
.hero__feature-body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	align-content: center;
	gap: 6px 8px;
	padding: 10px 12px 10px 16px;
	flex: 1;
	min-width: 0;
	overflow: hidden;
}

.hero__feature-icon {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.hero__feature-icon svg {
	width: 22px;
	height: 22px;
	stroke: var(--tpp-black);
}

.hero__feature-title {
	font-family: var(--tpp-font-heading);
	font-size: clamp(0.95rem, 0.9vw + 0.2rem, 1.15rem);
	font-weight: 700;
	line-height: 1.25;
	margin: 0;
	color: var(--tpp-black);
	flex: 1;
	min-width: 0;
}

.hero__feature-desc {
	font-family: var(--tpp-font-body);
	font-size: clamp(0.72rem, 0.4vw + 0.4rem, 0.8rem);
	font-weight: 400;
	line-height: 1.5;
	/* 80%, so it clears 4.5:1 on the orange card (68% did on the old lime) */
	color: rgba(26, 26, 26, 0.8);
	margin: 0;
	flex: 0 0 100%;
}

/* ── Slide progress indicator dots ── */
.hero__slider-dots {
	display: flex;
	gap: 6px;
	margin-top: 14px;
}

.hero__slider-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(26, 26, 26, 0.2);
	transition: all 0.4s ease;
}

.hero__slider-dot--active {
	width: 20px;
	border-radius: 3px;
	background: var(--tpp-black);
}

/* ── Entrance animation keyframes ── */
@keyframes heroFadeUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* ──────────────────────────────────────────────
   Below 1200px: the heading, the photo, then the description, buttons
   and card
   The About layout in a single column: the heading on the cream above
   the photo (the photo's top edge is the same cream, so the two run
   together), the description and buttons on white below it, then the
   card. `display: contents` on the container and the content block lets
   the heading, photo, description, buttons and card be ordered as one
   column.
   ────────────────────────────────────────────── */

@media screen and (max-width: 1199px) {
	.hero {
		height: auto;
		min-height: 0;
		display: flex;
		flex-direction: column;
	}

	.hero__container,
	.hero__content {
		display: contents;
	}

	.hero__title {
		order: 1;
		align-self: center;
		max-width: 760px;
		padding: 56px var(--tpp-container-padding) 8px;
		font-size: clamp(2.1rem, 4.6vw + 0.4rem, 3.25rem);
		text-align: center;
	}

	/* The photo, in the page flow under the heading. Taller than the photo's
	   own shape on phones, so Owen stays a good size: the sides are what
	   get cut, and 38% keeps him (33–42% across) and the middle window. */
	.hero__bg {
		order: 2;
		position: relative;
		inset: auto;
		height: clamp(300px, 56vw, 560px);
		overflow: hidden;
	}

	/* Painted 28% taller than its box and anchored at the bottom, so most
	   of the photo's empty wall above the windows is cropped. */
	.hero__bg-img {
		position: absolute;
		bottom: 0;
		left: 0;
		height: 128%;
		/* Not the desktop lift: here the photo sits in its own box under
		   the heading, anchored at its bottom. */
		object-position: 38% 100%;
	}

	.hero__subtitle {
		order: 3;
		max-width: none;
		margin: 0;
		padding: 24px max(var(--tpp-container-padding), calc((100% - 600px) / 2)) 24px;
		background: var(--tpp-white);
		text-align: center;
		text-shadow: none;
	}

	.hero__actions {
		order: 4;
		padding: 0 var(--tpp-container-padding);
		background: var(--tpp-white);
	}

	.hero__cards {
		order: 5;
		position: static;
		width: auto;
		padding: 32px var(--tpp-container-padding) 40px;
		background: var(--tpp-white);
		display: flex;
		justify-content: center;
	}

	.hero__feature-card {
		width: 100%;
		max-width: 560px;
	}
}

/* Mobile (≤767px) */
@media screen and (max-width: 767px) {
	.hero__title {
		padding-top: 40px;
		font-size: clamp(2rem, 8vw, 2.75rem);
	}

	.hero__subtitle {
		font-size: 0.95rem;
	}

	.btn-hero {
		padding: 14px 28px;
		font-size: 0.875rem;
		width: 100%;
		justify-content: center;
	}

	.hero__cards {
		/* The band is page background now, not a floating element — fading
		   it in would flash through. The entrance moves to the card. */
		opacity: 1;
		transform: none;
		animation: none;
	}

	/* Stack the orange card vertically on mobile */
	.hero__feature-card {
		flex-direction: column;
		border-radius: 16px;
		padding: 10px;
		gap: 0;

		opacity: 0;
		transform: translateY(30px);
		animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.65s forwards;
	}

	/* max-width: none releases the 280px cap so the accordion spans the
	   full card once it is stacked. */
	.hero__slider {
		gap: 6px;
		width: 100%;
		max-width: none;
		flex: none;
		height: 132px;
	}

	/* Row + wrap: the icon and title share the first line, and the
	   description is forced onto its own line beneath them. */
	.hero__feature-body {
		min-width: 0;
		padding: 18px 16px 14px;
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
		gap: 10px 16px;
		justify-content: flex-start;
	}

	.hero__feature-icon {
		width: 40px;
		height: 40px;
		margin-bottom: 0;
		flex-shrink: 0;
	}

	.hero__feature-icon svg {
		width: 26px;
		height: 26px;
	}

	.hero__feature-title {
		font-size: 1.15rem;
		margin-bottom: 0;
	}

	/* A full-width basis cannot share a line with the icon and title, so it
	   wraps onto the next one. */
	.hero__feature-desc {
		flex: 0 0 100%;
		font-size: 0.8rem;
	}
}

/* Small mobile (≤480px) */
@media screen and (max-width: 480px) {
	.hero__title {
		padding: 32px 16px 4px;
	}

	.hero__subtitle {
		padding: 20px 16px;
	}

	.hero__actions {
		padding: 0 16px;
	}

	.hero__cards {
		padding: 26px 16px 28px;
	}

	.hero__slider {
		height: 112px;
	}

	.hero__feature-body {
		padding: 14px 14px 12px;
		gap: 8px 12px;
	}

	.hero__feature-card {
		border-radius: 14px;
	}

	.hero__slide {
		border-radius: 10px;
	}

	.hero__slide-img {
		border-radius: 10px;
	}
}

/* Reduced motion: no entrance movement */
@media (prefers-reduced-motion: reduce) {
	.hero__title,
	.hero__subtitle,
	.hero__actions,
	.hero__cards,
	.hero__feature-card {
		opacity: 1;
		transform: none;
		animation: none;
	}
}
