/*--------------------------------------------------------------
# Testimonials Section
# Centered heading + brand marquee + photo/quote slider + nav arrows.
# Matches the reference design: large rounded card container with
# scrolling logos on top and a two-column testimonial below.
--------------------------------------------------------------*/

/* ── Section wrapper ── */
.testimonials {
	background: var(--tpp-white);
	padding: 100px 0 80px;
	overflow: hidden;
}

/* ── Container ── */
.testimonials__container {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}

/* ── Section heading ── */
.testimonials__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);
	text-align: center;
	margin: 0 0 56px;

	/* Scroll-reveal animation */
	opacity: 0;
	transform: translateY(32px);
	transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
				transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.testimonials__title.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* The heading's two lines (Owen's wording, 25 Nov 2026). Each is its own
   block, balanced, so when a line is too long for the screen it splits
   evenly instead of leaving one word alone: "Testimonials: real / member
   experiences" on tablets and phones, plus "that drive / real confidence"
   on the narrowest phones. Blocks rather than a <br />, because Chrome
   doesn't balance text that comes after a forced line break. From 992px
   each line fits whole, so the heading is exactly two lines. */
.testimonials__title-line {
	display: block;
	text-wrap: balance;
}

/* ──────────────────────────────────────────────
   Card wrapper — the big rounded container
   that holds both the marquee and the slider
   ────────────────────────────────────────────── */
.testimonials__card-wrap {
	background: var(--tpp-sky-tint); /* sky since 29 Nov 2026 (was the warm off-white) */
	border: 1px solid var(--tpp-sky-line);
	border-radius: 28px;
	padding: 32px 40px 48px;
	overflow: hidden;

	/* Scroll-reveal animation */
	opacity: 0;
	transform: translateY(32px);
	transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s,
				transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.testimonials__card-wrap.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ──────────────────────────────────────────────
   Brand / Partner marquee
   ────────────────────────────────────────────── */
.testimonials__marquee {
	position: relative;
	overflow: hidden;
	padding: 16px 0 32px;
	border-bottom: 1px solid var(--tpp-border-light);
	margin-bottom: 36px;

	/* Gradient fade edges */
	-webkit-mask-image: linear-gradient(
		to right,
		transparent 0%,
		black 8%,
		black 92%,
		transparent 100%
	);
	mask-image: linear-gradient(
		to right,
		transparent 0%,
		black 8%,
		black 92%,
		transparent 100%
	);
}

.testimonials__marquee-track {
	display: flex;
	align-items: center;
	gap: 150px;
	width: max-content;
	animation: testimonials-marquee 45s linear infinite;
}

.testimonials__marquee:hover .testimonials__marquee-track {
	animation-play-state: paused;
}

@keyframes testimonials-marquee {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

/* Brand name items */
.testimonials__brand {
	font-family: var(--tpp-font-heading);
	font-size: 1.1rem;
	font-weight: 500;
	color: var(--tpp-text-light);
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	user-select: none;
	letter-spacing: -0.01em;
}

.testimonials__brand--bold {
	font-weight: 700;
	color: var(--tpp-black);
}

.testimonials__brand--medium {
	font-weight: 600;
	color: var(--tpp-text);
}

.testimonials__brand--light {
	font-weight: 400;
	color: var(--tpp-text-light);
}

.testimonials__brand--icon {
	font-weight: 600;
	color: var(--tpp-text);
}

.testimonials__brand--icon svg {
	flex-shrink: 0;
}

/* ──────────────────────────────────────────────
   Testimonial Slider
   ────────────────────────────────────────────── */
.testimonials__slider {
	position: relative;
	min-height: 280px;
	background-color: #fff;
	border-radius: 20px;
}

.testimonials__slide {
	display: none;
	grid-template-columns: 280px 1fr;
	gap: 40px;
	align-items: center;
	opacity: 0;
	transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.testimonials__slide--active {
	display: grid;
	opacity: 1;
}

/* Slide-in animations for directional transitions */
.testimonials__slide--entering-left {
	display: grid;
	animation: testimonials-slide-left 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.testimonials__slide--entering-right {
	display: grid;
	animation: testimonials-slide-right 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes testimonials-slide-left {
	from {
		opacity: 0;
		transform: translateX(60px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes testimonials-slide-right {
	from {
		opacity: 0;
		transform: translateX(-60px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* ── Photo ── */
.testimonials__photo-wrap {
	width: 100%;
	aspect-ratio: 4 / 5;
	border-radius: 16px;
	overflow: hidden;
	background: #e8e2f4;
}

.testimonials__photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.testimonials__slide:hover .testimonials__photo {
	transform: scale(1.03);
}

/* ── Quote body (right column) ── */
.testimonials__quote-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

/* Brand label above quote */
.testimonials__quote-brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--tpp-font-heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--tpp-black);
	margin-bottom: 16px;
}

.testimonials__quote-brand-icon {
	flex-shrink: 0;
	color: var(--tpp-blue);
}

/* Quote text */
.testimonials__quote {
	margin: 0;
	padding: 0;
	border: none;
}

.testimonials__quote p {
	font-family: var(--tpp-font-body);
	font-size: clamp(1rem, 1.5vw + 0.25rem, 1.25rem);
	font-weight: 400;
	line-height: 1.65;
	color: var(--tpp-text);
	margin: 0 0 24px;
}

/* Author attribution */
.testimonials__author {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
}

.testimonials__author-name {
	font-family: var(--tpp-font-heading);
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--tpp-black);
}

.testimonials__author-role {
	font-family: var(--tpp-font-body);
	font-size: 0.9rem;
	font-weight: 400;
	color: var(--tpp-text-light);
}

/* Comma separator */
.testimonials__author-name::after {
	content: ',';
}

/* ──────────────────────────────────────────────
   Navigation arrows
   ────────────────────────────────────────────── */
/* Single rounded box wrapping both arrows */
.testimonials__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	margin: 52px auto 0;
	border: 1px solid var(--tpp-border-light);
	border-radius: 16px;
	overflow: hidden;
}

.testimonials__nav.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.testimonials__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 38px;
	border: none;
	background: transparent;
	color: var(--tpp-black);
	cursor: pointer;
	transition: background-color var(--tpp-transition), color var(--tpp-transition);
}

.testimonials__arrow:hover {
	background: var(--tpp-off-white);
}

.testimonials__arrow:active {
	background: var(--tpp-border-light);
}

.testimonials__arrow:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: -2px;
}

.testimonials__arrow svg {
	flex-shrink: 0;
}

/* ──────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────── */

/* Tablet (≥768px) */
@media screen and (min-width: 768px) {
	.testimonials {
		padding: 120px 0 100px;
	}

	.testimonials__card-wrap {
		border-radius: 32px;
		padding: 36px 48px 56px;
	}

	.testimonials__title {
		margin-bottom: 64px;
	}
}

/* Desktop (≥992px) */
@media screen and (min-width: 992px) {
	.testimonials__slide {
		grid-template-columns: 300px 1fr;
		gap: 48px;
	}

	.testimonials__slider {
		min-height: 320px;
	}
}

/* Large desktop (≥1280px) */
@media screen and (min-width: 1280px) {
	.testimonials {
		padding: 140px 0 120px;
	}

	.testimonials__title {
		margin-bottom: 72px;
	}

	.testimonials__card-wrap {
		padding: 40px 56px 60px;
	}

	.testimonials__slide {
		grid-template-columns: 340px 1fr;
		gap: 56px;
	}
}

/* Mobile adjustments (≤767px) */
@media screen and (max-width: 767px) {
	.testimonials {
		padding: 72px 0 56px;
	}

	.testimonials__title {
		font-size: clamp(1.75rem, 7vw, 2.5rem);
		margin-bottom: 36px;
	}

	.testimonials__card-wrap {
		border-radius: 20px;
		padding: 24px 20px 36px;
	}

	.testimonials__marquee {
		padding: 12px 0 24px;
		margin-bottom: 28px;
	}

	.testimonials__marquee-track {
		gap: 32px;
	}

	.testimonials__brand {
		font-size: 0.95rem;
	}

	/* Stack photo above quote on mobile */
	.testimonials__slide {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	/* Full width of the slide. The slide is a single 1fr column at this
	   width, so clearing the cap lets the photo span it edge to edge;
	   .testimonials__photo is already object-fit: cover, so the crop
	   follows rather than distorting. */
	.testimonials__photo-wrap {
		max-width: none;
		width: 100%;
		aspect-ratio: 1 / 1;
	}

	/* Small inset so the quote does not sit flush with the now full-width
	   photo above it. */
	.testimonials__quote-body {
		padding-left: 15px;
		padding-right: 15px;
		padding-bottom: 15px;
	}

	.testimonials__slider {
		min-height: auto;
	}

	.testimonials__nav {
		margin-top: 28px;
	}

	/* 46×38 is under the 44px touch minimum the rest of the theme holds to
	   (.menu-toggle is 44×44). Height is what was short. */
	.testimonials__arrow {
		width: 52px;
		height: 44px;
	}
}

/* Small mobile (≤480px) */
@media screen and (max-width: 480px) {
	.testimonials__card-wrap {
		border-radius: 18px;
		padding: 20px 16px 32px;
	}

	.testimonials__photo-wrap {
		max-width: none;
		border-radius: 14px;
	}

	.testimonials__quote p {
		font-size: 0.95rem;
		margin-bottom: 20px;
	}

	.testimonials__quote-brand {
		font-size: 0.95rem;
		margin-bottom: 12px;
	}

	.testimonials__marquee-track {
		gap: 24px;
	}

	.testimonials__brand {
		font-size: 0.875rem;
	}

	.testimonials__arrow {
		width: 48px;
		height: 44px;
	}
}
