/*
 * Reviews / testimonials band — template-parts/section-testimonials.php.
 *
 * Only the band itself is styled here: its background, its heading block and
 * the grid gap. The cards inside it are the shared .card--testimonial variant
 * and are styled in assets/css/cards.css, so none of those rules are repeated.
 *
 * Every colour, size, space, radius and duration is a design token, so a
 * [data-theme="dark"] remap of the role tokens recolours the whole band with no
 * extra rules. Mobile-first: one column by default, two from 40em and three
 * from 64em, inherited from the shared .card-grid.
 */

.hcr-reviews {
	color: var(--color-text);
}

/*
 * The default tone. The band sits on the warm surface token so it reads as a
 * distinct section between two page-background sections, which is what keeps
 * the home page from being one flat stack.
 */
.hcr-reviews--surface {
	background: var(--color-surface);
}

/*
 * The dark tone, for a page that needs the reviews to be the contrast beat.
 * Text roles are remapped on the band itself rather than hardcoded, so the
 * cards keep coming from the token system.
 */
.hcr-reviews--dark {
	background: var(--color-surface-dark);
	color: var(--color-neutral-50);
}

.hcr-reviews--dark .hcr-reviews__title {
	color: var(--color-neutral-50);
}

.hcr-reviews--dark .hcr-reviews__text {
	color: var(--color-neutral-300);
}

.hcr-reviews--dark .hcr-reviews__eyebrow {
	color: var(--color-accent-300);
}

/* ------------------------------------------------------------- the header --- */

.hcr-reviews__head {
	max-width: var(--container-narrow);
	margin: 0 0 var(--space-10);
}

.hcr-reviews__eyebrow {
	margin: 0 0 var(--space-3);
	color: var(--color-primary-600);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
	letter-spacing: var(--letter-wide);
	text-transform: uppercase;
}

.hcr-reviews__title {
	margin: 0;
	color: var(--color-text);
	font-family: var(--font-heading);
	font-size: var(--text-3xl);
	font-weight: var(--weight-bold);
	letter-spacing: var(--letter-tight);
	line-height: var(--leading-snug);
	text-wrap: balance;
}

.hcr-reviews__text {
	margin: var(--space-4) 0 0;
	max-width: var(--measure);
	color: var(--color-text-muted);
	font-family: var(--font-body);
	font-size: var(--text-lg);
	line-height: var(--leading-normal);
}

/* --------------------------------------------------------------- the grid --- */

.hcr-reviews__grid {
	gap: var(--space-6);
}

/*
 * Editorial rather than a tidy 1/1/1: from the desktop breakpoint the first
 * review is given the wider column, matching the asymmetric direction in
 * DESIGN.md. Applied only to a row of exactly three, so a section asked for two
 * or four reviews keeps the even columns the shared .card-grid already gives it.
 * Below the breakpoint the shared rules stand unchanged.
 */
@media (min-width: 64em) {
	.hcr-reviews__grid:has(> .card:nth-child(3):last-child) {
		grid-template-columns: 1.2fr 1fr 1fr;
	}
}
