/**
 * Testimonials — template-parts/testimonials.php, front-page.php only,
 * directly after the pricing section.
 *
 * Reused as-is, nothing redefined except the card radius (bumped to
 * radius-xl to match the hero section's photo rounding): color/spacing/
 * type/shadow tokens, .container, .section, .card (base only — no
 * .card--hover, see below), .section-label, .visually-hidden. Avatar
 * color variants reuse
 * the semantic accent/info/success tokens via color-mix(), same
 * technique as .badge's variants in main.css. No new tokens.
 *
 * No .card--hover here on purpose: these cards are informational, not
 * clickable — letting the quote content do the work instead of adding
 * motion with nothing to click.
 *
 * Avatars are SHARP (radius-sm), not circular — Midnight Broadcast uses
 * full circles here; this theme already made the same sharp-over-circular
 * call for the hero's play-icon chip and how-it-works' icon-ring, so a
 * circular avatar would be the one inconsistent shape on the page.
 */

.testimonials__header {
	max-width: 60ch;
	margin-inline: auto;
	margin-bottom: var(--space-9);
	text-align: center;
}

.testimonials__subcopy {
	margin-top: var(--space-4);
	font-size: var(--fs-md);
	line-height: var(--lh-md);
}

/* =========================================================
   Grid (desktop) / carousel (mobile) — see the template's docblock for
   the "peek of the next card" bleed technique: the scroll track breaks
   out of .container's padding via a negative margin equal to that
   padding, then re-applies the same padding as its own inline padding,
   so cards still align with the container's content edge while the
   overflow genuinely reaches the viewport edge.
   ========================================================= */

.testimonials__grid {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	gap: var(--space-4);
	padding-inline: var(--container-padding-inline);
	margin-inline: calc(var(--container-padding-inline) * -1);
	padding-bottom: var(--space-2); /* room for the focus-visible outline on a scrolled-to card */
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.testimonials__grid::-webkit-scrollbar {
	display: none;
}

.testimonial-card {
	scroll-snap-align: start;
	flex: 0 0 85%;
	min-width: 0;
	border-radius: var(--radius-xl);
}

@media (min-width: 640px) {
	.testimonial-card {
		flex-basis: 60%;
	}
}

@media (min-width: 1024px) {
	.testimonials__grid {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		overflow-x: visible;
		padding-inline: 0;
		margin-inline: 0;
		padding-bottom: 0;
	}

	.testimonial-card {
		flex-basis: auto;
	}
}

/* =========================================================
   Card content — <blockquote> needs its browser-default margin/indent
   reset before anything else here applies.
   ========================================================= */

.testimonial-card__quote {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	height: 100%;
}

.testimonial-card__stars {
	display: inline-flex;
	gap: 1px;
}

.testimonial-card__star--filled {
	color: var(--color-accent);
}

.testimonial-card__star--empty {
	color: var(--color-border-strong);
}

.testimonial-card__quote p {
	flex: 1;
	margin: 0;
	color: var(--color-text);
	font-size: var(--fs-base);
	line-height: var(--lh-base);
}

.testimonial-card__author {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin: 0;
	padding-top: var(--space-4);
	border-top: 1px solid var(--color-border);
}

.testimonial-card__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: var(--radius-sm);
	font-family: var(--font-display);
	font-weight: var(--fw-black);
	font-size: var(--fs-md);
}

.testimonial-card__avatar--accent {
	background: color-mix(in srgb, var(--color-accent) 22%, var(--color-surface-2));
	color: var(--color-accent-strong);
}

.testimonial-card__avatar--info {
	background: color-mix(in srgb, var(--color-info) 22%, var(--color-surface-2));
	color: var(--color-info);
}

.testimonial-card__avatar--success {
	background: color-mix(in srgb, var(--color-success) 22%, var(--color-surface-2));
	color: var(--color-success);
}

.testimonial-card__identity {
	display: flex;
	flex-direction: column;
}

.testimonial-card__name {
	font-style: normal;
	font-weight: var(--fw-semibold);
	color: var(--color-text);
	font-size: var(--fs-sm);
}

.testimonial-card__context {
	font-size: var(--fs-xs);
	color: var(--color-text-faint);
}
