.nffat-home-reviews {
	display: flex;
	flex-direction: column;
	gap: 48px;
	padding: 96px calc(var(--wp--style--root--padding-right) + 40px) 104px calc(var(--wp--style--root--padding-left) + 40px);
}

.nffat-home-reviews > *,
.nffat-home-reviews__head > *,
.nffat-home-reviews__rating > *,
.nffat-home-reviews__carousel > *,
.nffat-home-reviews__track > *,
.nffat-home-reviews__slide > *,
.nffat-home-reviews__review > *,
.nffat-home-reviews__who > *,
.nffat-home-reviews__controls > *,
.nffat-home-reviews__arrows > * {
	margin: 0;
}

.nffat-home-reviews__title {
	font-size: var(--wp--preset--font-size--3-xl);
	letter-spacing: -0.021em;
	color: var(--wp--preset--color--ink);
}

.nffat-home-reviews__rating {
	display: flex;
	align-items: center;
	gap: 12px;
}

.nffat-home-reviews__stars {
	display: flex;
	gap: 4px;
	color: var(--wp--preset--color--magenta);
}

.nffat-home-reviews__star {
	width: 26px;
	height: 25px;
}

.nffat-home-reviews__rating-label {
	font-size: 16px;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.nffat-home-reviews__carousel {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.nffat-home-reviews__track {
	display: grid;
	height: 480px;
	border-radius: var(--nffat-radius-card);
	touch-action: pan-y;
}

.nffat-home-reviews__track:focus-visible {
	outline-offset: 6px;
}

/* All slides share one cell so the track is as tall as the longest review and never jumps. */
.nffat-home-reviews__slide {
	grid-area: 1 / 1;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	min-width: 0;
	overflow: hidden;
	border-radius: var(--nffat-radius-card);
	visibility: hidden;
}

.nffat-home-reviews__slide.is-active,
.nffat-home-reviews__slide.is-leaving {
	visibility: visible;
}

.nffat-home-reviews__slide.is-active {
	z-index: 1;
}

/* The photo fills its column but never sets the card height; the review text does. */
.nffat-home-reviews__photo {
	position: relative;
	grid-area: 1 / 1;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: var(--wp--preset--color--teal-900);
}

/* The incoming photo grows from the side it enters on, pushing the old one out the other side. */
[data-direction="next"] .is-active .nffat-home-reviews__photo,
[data-direction="prev"] .is-leaving .nffat-home-reviews__photo {
	justify-self: end;
}

[data-direction="next"] .is-leaving .nffat-home-reviews__photo,
[data-direction="prev"] .is-active .nffat-home-reviews__photo {
	justify-self: start;
}

.nffat-home-reviews__photo img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nffat-home-reviews__review {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	justify-content: space-between;
	gap: 28px;
	min-width: 0;
	padding: 44px 48px;
	background: var(--wp--preset--color--white);
}

.nffat-home-reviews__slide--mint .nffat-home-reviews__review { background: var(--wp--preset--color--mint); }
.nffat-home-reviews__slide--pink .nffat-home-reviews__review { background: var(--wp--preset--color--magenta-100); }
.nffat-home-reviews__slide--teal .nffat-home-reviews__review { background: var(--wp--preset--color--teal-100); }

.nffat-home-reviews__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--wp--preset--color--magenta);
	color: var(--wp--preset--color--white);
}

.nffat-home-reviews__slide--mint .nffat-home-reviews__mark { background: var(--wp--preset--color--leaf); }
.nffat-home-reviews__slide--teal .nffat-home-reviews__mark { background: var(--wp--preset--color--teal); }

.nffat-home-reviews__mark .nffat-icon {
	font-size: 24px;
}

.nffat-home-reviews__quote {
	margin: 0;
	padding: 0;
	border: 0;
}

.nffat-home-reviews__quote p {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(21px, 1.9vw, 27px);
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--ink);
	text-wrap: pretty;
}

.nffat-home-reviews__who {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	column-gap: 14px;
	row-gap: 2px;
	align-items: center;
}

.nffat-home-reviews__who .nffat-avatar {
	grid-row: span 2;
	width: 52px;
	height: 52px;
}

@media (prefers-reduced-motion: no-preference) {
	.nffat-home-reviews__carousel[data-ready] .is-active .nffat-avatar {
		animation: nffat-avatar-pop 600ms 380ms var(--nffat-ease-out) backwards;
	}

	.nffat-home-reviews__carousel[data-ready] .is-active .nffat-avatar__eyes {
		transform-origin: 32px 36px;
		animation: nffat-avatar-blink 260ms 1000ms ease-in-out;
	}
}

@keyframes nffat-avatar-pop {
	0% { opacity: 0; scale: 0.3; rotate: -20deg; }
	60% { opacity: 1; scale: 1.12; rotate: 6deg; }
	100% { scale: 1; rotate: 0deg; }
}

@keyframes nffat-avatar-blink {
	50% { scale: 1 0.1; }
}

.nffat-home-reviews__name {
	align-self: end;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wp--preset--color--ink);
}

.nffat-home-reviews__course {
	align-self: start;
	font-size: 15px;
	line-height: 1.3;
	color: var(--wp--preset--color--ink-muted);
}

.nffat-home-reviews__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.nffat-home-reviews__actions {
	margin: 0;
}

.nffat-home-reviews__arrows {
	display: flex;
	gap: 12px;
}

.nffat-home-reviews__arrow {
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	padding: 0;
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-size: 22px;
	cursor: pointer;
	transition: background-color 200ms var(--nffat-ease-out), color 200ms var(--nffat-ease-out), border-color 200ms var(--nffat-ease-out), opacity 200ms, transform 160ms var(--nffat-ease-out);
}

.nffat-home-reviews__arrow--next {
	position: relative;
}

.nffat-home-reviews__ring {
	position: absolute;
	inset: -2px;
	width: calc(100% + 4px);
	height: calc(100% + 4px);
	rotate: -90deg;
	pointer-events: none;
}

.nffat-home-reviews__ring circle {
	fill: none;
	stroke: var(--wp--preset--color--magenta);
	stroke-width: 3;
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
}

.nffat-home-reviews__carousel[data-autoplay="counting"] .nffat-home-reviews__ring circle {
	animation: nffat-review-countdown var(--nffat-autoplay-ms, 7000ms) linear forwards;
}

.nffat-home-reviews__carousel[data-paused] .nffat-home-reviews__ring circle {
	animation-play-state: paused;
}

@keyframes nffat-review-countdown {
	to { stroke-dashoffset: 0; }
}

.nffat-home-reviews__pause {
	display: none;
	place-items: center;
	align-self: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	transition: background-color 200ms var(--nffat-ease-out), transform 160ms var(--nffat-ease-out);
}

.nffat-home-reviews__carousel[data-autoplay] .nffat-home-reviews__pause {
	display: grid;
}

.nffat-home-reviews__pause:active {
	transform: scale(0.94);
}

.nffat-home-reviews__pause svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.nffat-home-reviews__play-icon,
.nffat-home-reviews__pause[aria-pressed="true"] .nffat-home-reviews__pause-icon {
	display: none;
}

.nffat-home-reviews__pause[aria-pressed="true"] .nffat-home-reviews__play-icon {
	display: inline;
}

.nffat-home-reviews__arrow--prev .nffat-icon {
	rotate: 180deg;
}

.nffat-home-reviews__arrow:active:not(:disabled) {
	transform: scale(0.94);
}

.nffat-home-reviews__arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

@media (hover: hover) {
	.nffat-home-reviews__pause:hover {
		background: rgb(18 23 26 / 0.08);
	}

	.nffat-home-reviews__arrow .nffat-icon {
		transition: translate 300ms var(--nffat-ease-out);
	}

	.nffat-home-reviews__arrow:hover:not(:disabled) {
		border-color: var(--wp--preset--color--magenta);
		background: var(--wp--preset--color--magenta);
		color: var(--wp--preset--color--white);
	}

	.nffat-home-reviews__arrow--next:hover:not(:disabled) .nffat-icon {
		translate: 3px 0;
	}

	.nffat-home-reviews__arrow--prev:hover:not(:disabled) .nffat-icon {
		translate: -3px 0;
	}
}

@media (max-width: 1099px) {
	.nffat-home-reviews {
		padding-block: 72px 80px;
	}

	.nffat-home-reviews__review {
		padding: 36px;
	}
}

@media (max-width: 699px) {
	.nffat-home-reviews {
		gap: 32px;
		padding: 56px var(--wp--style--root--padding-right) 64px var(--wp--style--root--padding-left);
	}

	.nffat-home-reviews__track {
		height: auto;
	}

	.nffat-home-reviews__slide {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: 220px auto;
	}

	.nffat-home-reviews__review {
		padding: 28px 24px 32px;
	}

	.nffat-home-reviews__controls {
		flex-wrap: wrap;
		gap: 20px;
	}

	.nffat-home-reviews__arrows {
		margin-left: auto;
	}

	.nffat-home-reviews__arrow {
		width: 52px;
		height: 52px;
	}
}
