.nffat-home-real-experience {
	display: flex;
	align-items: center;
	gap: 72px;
	padding-block: 80px;
	padding-inline: calc(var(--wp--style--root--padding-left) + 40px) calc(var(--wp--style--root--padding-right) + 40px);
}

.nffat-home-real-experience__media {
	position: relative;
	flex-shrink: 0;
	width: 600px;
	max-width: 100%;
	aspect-ratio: 1;
}

.nffat-home-real-experience__media > *,
.nffat-home-real-experience__copy > *,
.nffat-home-real-experience__tag > * {
	margin: 0;
}

.nffat-trainers__deck {
	position: absolute;
	top: 0;
	left: 0;
	width: 90%;
	height: 93.333%;
}

/* Photos stack like a hand of cards; data-pos 0 is the front card. */
.nffat-trainers__card {
	position: absolute;
	inset: 0;
	margin: 0;
	overflow: hidden;
	border-radius: var(--nffat-radius-panel);
	background: var(--wp--preset--color--teal-50);
	box-shadow: 0 30px 60px -30px rgb(4 41 39 / 0.45);
	opacity: 0;
	transition: translate 800ms var(--nffat-ease-out), rotate 800ms var(--nffat-ease-out), scale 800ms var(--nffat-ease-out), opacity 600ms var(--nffat-ease-out);
}

.nffat-trainers__card img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nffat-trainers__card[data-pos="0"] { z-index: 4; opacity: 1; rotate: -2deg; }
.nffat-trainers__card[data-pos="1"] { z-index: 3; opacity: 1; rotate: 4deg; translate: 20px 8px; scale: 0.96; }
.nffat-trainers__card[data-pos="2"] { z-index: 2; opacity: 0.85; rotate: 9deg; translate: 36px 16px; scale: 0.92; }
.nffat-trainers__card.is-leaving { z-index: 5; opacity: 0; rotate: -16deg; translate: -110% -4%; }

.nffat-home-real-experience__tag {
	position: absolute;
	top: 73.333%;
	left: 55%;
	z-index: 6;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px 24px;
	background: var(--wp--preset--color--cream);
	border-radius: var(--nffat-radius-inner);
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: -1px;
	transform: rotate(-4deg);
	transform-origin: top left;
	white-space: nowrap;
}

.nffat-home-real-experience__signature {
	/* The padding gives swashes and descenders room inside the box, because the scribble mask clips at the box edge. */
	padding: 0.2em 0.15em;
	margin: -0.2em -0.15em;
	font-family: var(--wp--preset--font-family--hand);
	font-size: 42px;
	line-height: 1;
	color: var(--wp--preset--color--magenta-700);
}

@media (prefers-reduced-motion: no-preference) {
	.nffat-home-real-experience__tag.is-in .nffat-home-real-experience__signature {
		/* Sized so the 0.15-width pen edge sits just off the left at the start and just past the right at the end. */
		mask-image: linear-gradient(90deg, #000 46.5%, transparent 53.5%);
		mask-size: 215% 100%;
		mask-repeat: no-repeat;
		animation: nffat-scribble calc(800ms * var(--nffat-speed)) cubic-bezier(0.45, 0.05, 0.55, 0.95) calc(660ms * var(--nffat-speed)) backwards;
	}
}

@keyframes nffat-scribble {
	from { mask-position: 100% 0; }
	to { mask-position: 0 0; }
}

.nffat-home-real-experience__role {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wp--preset--color--ink);
}

.nffat-home-real-experience__heart {
	position: absolute;
	top: 3.333%;
	left: 78.333%;
	z-index: 7;
	width: 10%;
	height: auto;
	padding: 0;
	color: var(--wp--preset--color--magenta);
	background: none;
	border: 0;
	cursor: pointer;
	transform: rotate(12deg);
	transform-origin: top left;
	-webkit-tap-highlight-color: transparent;
}

.nffat-home-real-experience__heart:focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 4px;
	border-radius: 8px;
}

.nffat-home-real-experience__heart-shape {
	display: block;
	width: 100%;
	height: auto;
}

.nffat-home-real-experience__count {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding-bottom: 12%;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(14px, 1.6vw, 20px);
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--cream);
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
	.nffat-home-real-experience__heart.is-beating .nffat-home-real-experience__heart-shape {
		animation: nffat-heartbeat 520ms var(--nffat-motion-ease);
	}

	.nffat-home-real-experience__heart.is-compressing .nffat-home-real-experience__heart-shape {
		animation: nffat-compress 260ms var(--nffat-motion-ease);
	}

	@media (hover: hover) and (pointer: fine) {
		.nffat-home-real-experience__heart:hover .nffat-home-real-experience__heart-shape {
			scale: 1.08;
			transition: scale 160ms var(--nffat-motion-ease);
		}
	}
}

@keyframes nffat-heartbeat {
	0%, 100% { scale: 1; }
	15% { scale: 1.22; }
	30% { scale: 1; }
	45% { scale: 1.14; }
}

@keyframes nffat-compress {
	0%, 100% { scale: 1; }
	30% { scale: 1.06 0.82; }
}

.nffat-home-real-experience__copy {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: flex-start;
	gap: 28px;
	min-width: 0;
}

.nffat-home-real-experience__title {
	font-size: var(--nffat-title-home);
	line-height: 1.016;
	letter-spacing: -0.022em;
	color: var(--wp--preset--color--ink);
}

.nffat-home-real-experience__smiley {
	display: inline-block;
	width: 0.8em;
	height: 0.8em;
	margin-left: 0.08em;
	vertical-align: -0.06em;
	color: var(--wp--preset--color--magenta);
	rotate: 8deg;
}

@media (prefers-reduced-motion: no-preference) {
	.nffat-home-real-experience__smiley path {
		stroke-dasharray: 1;
		animation: nffat-smiley-draw calc(var(--draw, 700ms) * var(--nffat-speed)) var(--nffat-motion-ease-in-out) backwards;
		animation-play-state: paused;
	}

	.is-in > .nffat-home-real-experience__smiley path {
		animation-play-state: running;
	}

	.nffat-home-real-experience__smiley path:nth-child(1) { --draw: 600ms; animation-delay: calc(500ms * var(--nffat-speed)); }
	.nffat-home-real-experience__smiley path:nth-child(2) { --draw: 160ms; animation-delay: calc(1000ms * var(--nffat-speed)); }
	.nffat-home-real-experience__smiley path:nth-child(3) { --draw: 160ms; animation-delay: calc(1120ms * var(--nffat-speed)); }
	.nffat-home-real-experience__smiley path:nth-child(4) { --draw: 360ms; animation-delay: calc(1240ms * var(--nffat-speed)); }
}

@keyframes nffat-smiley-draw {
	from { stroke-dashoffset: 1; }
	to { stroke-dashoffset: 0; }
}

.nffat-home-real-experience__quote {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	max-width: 638px;
	margin-left: -2px;
	padding: 4px 0 4px 24px;
	--quote-bar-delay: 1000ms;
	--quote-type-start: 1300ms;
	--quote-type-step: 18ms;
}

.nffat-home-real-experience__quote::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: var(--wp--preset--color--magenta);
	transform-origin: top;
}

@media (prefers-reduced-motion: no-preference) {
	.nffat-home-real-experience__quote.is-in::before {
		animation: nffat-quote-bar 900ms var(--nffat-motion-ease-in-out) var(--quote-bar-delay) backwards;
	}

	.nffat-type-char {
		opacity: 0;
	}

	.is-in .is-on .nffat-type-char {
		opacity: 1;
		animation: nffat-type-char 1ms linear calc(var(--quote-type-start) + var(--i) * var(--quote-type-step)) backwards;
	}

	.nffat-home-real-experience__quote.is-in cite {
		animation: nffat-rise 700ms var(--nffat-motion-ease) calc(var(--quote-type-start) + var(--type-count, 0) * var(--quote-type-step)) backwards;
	}
}

@keyframes nffat-quote-bar {
	from { scale: 1 0; }
}

@keyframes nffat-type-char {
	from { opacity: 0; }
}

.nffat-home-real-experience__quote > * {
	margin: 0;
}

.nffat-home-real-experience__quote {
	position: relative;
}

.nffat-home-real-experience__quote p {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(20px, 2vw, 24px);
	line-height: 1.29;
	color: var(--wp--preset--color--ink);
}

.nffat-home-real-experience__quote cite {
	display: block;
	font-size: 14px;
	font-style: normal;
	font-weight: 600;
	color: var(--wp--preset--color--ink-muted);
}

@media (max-width: 1099px) {
	.nffat-home-real-experience {
		flex-direction: column;
		align-items: stretch;
		gap: 56px;
	}

	.nffat-home-real-experience__media {
		align-self: flex-start;
	}
}

@media (max-width: 699px) {
	.nffat-home-real-experience {
		gap: 28px;
		padding-block: 56px;
		padding-inline: var(--wp--style--root--padding-left) var(--wp--style--root--padding-right);
	}

	/* Lets the heading leave the copy column so it can sit above the photos. */
	.nffat-home-real-experience__copy {
		display: contents;
	}

	.nffat-home-real-experience__copy > * {
		order: 1;
		align-self: flex-start;
	}

	.nffat-home-real-experience__copy > h2 {
		order: -1;
	}

	.nffat-home-real-experience__media {
		margin-block: 4px 12px;
	}

	.nffat-trainers__card {
		border-radius: var(--nffat-radius-card);
	}

	.nffat-home-real-experience__tag {
		left: auto;
		right: 0;
		padding: 10px 16px;
		border-radius: 18px;
		transform-origin: top right;
	}

	.nffat-home-real-experience__signature {
		font-size: 30px;
	}

	.nffat-home-real-experience__role {
		font-size: 12px;
	}

	.nffat-home-real-experience__copy {
		gap: 24px;
	}

	.nffat-home-real-experience__quote {
		margin-left: 0;
		padding-left: 18px;
	}
}

.nffat-type-word {
	display: inline-block;
}

.nffat-trainers__brief:not(.is-on) {
	display: none;
}

/* After the first trainer, briefs type straight away instead of waiting for the section's entrance. */
.nffat-home-real-experience.has-rotated .nffat-home-real-experience__quote {
	--quote-type-start: 0ms;
	--quote-type-step: 12ms;
}

/* Five faces show at a time; the current trainer sits first and slides out to the left as the next one comes in. */
.nffat-trainers__rail {
	--avatar: 56px;
	--avatar-gap: 10px;
	width: calc(5 * var(--avatar) + 4 * var(--avatar-gap) + 12px);
	max-width: 100%;
	margin-left: -6px !important;
	padding: 6px;
	overflow: hidden;
	-webkit-mask: linear-gradient(90deg, #000 80%, transparent);
	mask: linear-gradient(90deg, #000 80%, transparent);
}

.nffat-trainers__avatars {
	display: flex;
	gap: var(--avatar-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.nffat-trainers__avatars.is-sliding {
	transition: translate 700ms var(--nffat-ease-out);
}

.nffat-trainers__avatar {
	display: block;
	width: var(--avatar);
	height: var(--avatar);
	padding: 0;
	border: 0;
	border-radius: 50%;
	overflow: hidden;
	background: var(--wp--preset--color--teal-50);
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 300ms var(--nffat-ease-out), box-shadow 300ms var(--nffat-ease-out), scale 160ms var(--nffat-ease-out);
}

.nffat-trainers__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nffat-trainers__avatar[aria-current="true"] {
	opacity: 1;
	box-shadow: 0 0 0 3px var(--wp--preset--color--cream), 0 0 0 5px var(--wp--preset--color--magenta-100);
}

@property --nffat-trainer-timer {
	syntax: "<angle>";
	inherits: false;
	initial-value: 0deg;
}

.nffat-trainers__avatars > li {
	position: relative;
}

/* The ring fills around the current face; when it closes, the next trainer comes in. */
.nffat-trainers__avatars > li:has([aria-current="true"])::after {
	content: "";
	position: absolute;
	inset: -5px;
	border-radius: 50%;
	background: conic-gradient(var(--wp--preset--color--magenta) var(--nffat-trainer-timer), transparent 0);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
	pointer-events: none;
	animation: nffat-trainer-timer 10s linear forwards paused;
}

.is-playing .nffat-trainers__avatars > li:has([aria-current="true"])::after {
	animation-play-state: running;
}

@keyframes nffat-trainer-timer {
	to { --nffat-trainer-timer: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
	.nffat-trainers__avatars > li:has([aria-current="true"])::after {
		animation: none;
		--nffat-trainer-timer: 360deg;
	}
}

.nffat-trainers__controls {
	display: flex;
	align-items: center;
	gap: 6px;
	max-width: calc(100% + 6px);
	margin-left: -6px;
}

.nffat-trainers__controls .nffat-trainers__rail {
	flex: 0 1 auto;
	min-width: 0;
	margin-left: 0 !important;
}

.nffat-trainers__step {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1.5px solid var(--wp--preset--color--line);
	border-radius: 50%;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	transition: border-color 200ms var(--nffat-ease-out), background-color 200ms var(--nffat-ease-out), color 200ms var(--nffat-ease-out), scale 160ms var(--nffat-ease-out);
}

.nffat-trainers__step svg {
	width: 16px;
	height: 16px;
}

.nffat-trainers__step--back svg {
	rotate: 180deg;
}

.nffat-trainers__step:active {
	scale: 0.92;
}

.nffat-trainers__step:focus-visible {
	outline: 3px solid var(--wp--preset--color--magenta);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.nffat-trainers__step:hover {
		border-color: var(--wp--preset--color--magenta);
		background: var(--wp--preset--color--magenta);
		color: var(--wp--preset--color--white);
	}
}

.nffat-trainers__avatar:active {
	scale: 0.94;
}

@media (hover: hover) and (pointer: fine) {
	.nffat-trainers__avatar:hover {
		opacity: 1;
	}
}

@media (max-width: 699px) {
	.nffat-trainers__rail {
		--avatar: 48px;
		--avatar-gap: 8px;
	}
}
