/*
 * Testimonials. Desktop: Homepage "Frame 94" (820px card with two cards stacked behind it).
 */

.syb-testimonials {
	padding-block: 48px;
}

.syb-testimonials--bg-sky {
	background: linear-gradient(180deg, var(--c-white) 0%, #e9f5ff 100%);
}

.syb-testimonials--bg-soft {
	background: var(--c-soft);
}

.syb-testimonials .syb-head__title {
	max-width: none;
}

/* One quote */

.syb-quote {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
	padding: 20px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
}

/* White, unless the card carries one of the colours of builder.css (syb-tone-*). */
.syb-quote:not([class*="syb-tone-"]) {
	background: var(--c-white);
}

.syb-quote__text {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	color: #575870;
	font-size: 16px;
	font-weight: 500;
	line-height: 26px;
}

.syb-quote__by {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-top: 20px;
	border-top: 1px solid #dfdfdf;
}

.syb-quote__logo {
	flex: none;
	width: 96px;
	height: 44px;
	overflow: hidden;
	border-radius: var(--radius-sm);
}

.syb-quote__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.syb-quote__who {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.syb-quote__who strong {
	color: var(--c-ink);
	font-size: 18px;
	font-weight: 700;
	line-height: 26px;
}

.syb-quote__who span {
	color: #575870;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

/* Layout: stacked slider */

.syb-quote-stack {
	width: min(100%, 820px);
	margin-inline: auto;
	padding-top: 31px;
}

.syb-quote-stack__deck {
	position: relative;
}

/* The two cards peeking out behind the active one. */
.syb-quote-stack__deck::before,
.syb-quote-stack__deck::after {
	content: "";
	position: absolute;
	height: 80px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--c-white);
	box-shadow: var(--shadow-md);
}

.syb-quote-stack__deck::before {
	inset: -31px 6.8% auto;
}

.syb-quote-stack__deck::after {
	inset: -16px 4.4% auto;
}

/* Every card lies in the same place; the deck is as tall as its tallest card. */
.syb-quote-stack__deck {
	display: grid;
}

/*
 * A card waiting in the deck: invisible, tucked a little higher and smaller, where the
 * first card peeking out behind sits. The active card comes forward from there; the card
 * that was on top (is-leaving) sinks to the back of the deck and fades.
 */
.syb-quote-stack .syb-quote {
	position: relative;
	z-index: 1;
	grid-area: 1 / 1;
	align-self: start;
	box-shadow: var(--shadow-xl);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-16px) scale(0.955);
	transform-origin: 50% 0;
	pointer-events: none;
}

.syb-quote-stack .syb-quote.is-active {
	z-index: 3;
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
	transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.08s, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.08s;
}

.syb-quote-stack .syb-quote.is-leaving {
	z-index: 2;
	opacity: 0;
	visibility: visible;
	transform: translateY(-31px) scale(0.91);
	transition: opacity 0.45s cubic-bezier(0.23, 1, 0.32, 1), transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-reduced-motion: reduce) {
	.syb-quote-stack .syb-quote,
	.syb-quote-stack .syb-quote.is-leaving {
		transform: none;
	}

	.syb-quote-stack .syb-quote.is-active,
	.syb-quote-stack .syb-quote.is-leaving {
		transition: opacity 0.2s ease;
	}
}

.syb-quote-stack__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 20px;
}

.syb-slider-btn {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--c-border);
	border-radius: 50%;
	background: var(--c-white);
	color: var(--c-ink);
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.syb-slider-btn:hover {
	border-color: var(--c-primary);
	color: var(--c-blue);
}

.syb-slider-count {
	min-width: 48px;
	color: #575870;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* Layout: grid */

.syb-quote-grid {
	display: grid;
	gap: 16px;
}

.syb-quote-grid .syb-quote {
	justify-content: space-between;
}

/* Layout: one feature card */

.syb-quote--feature {
	gap: 28px;
	padding: 28px 24px;
	border: 0;
	border-radius: var(--radius-lg);
	background-position: right -120px bottom -180px;
}

.syb-quote--feature .syb-quote__text {
	color: var(--c-white);
	font-size: 18px;
	line-height: 28px;
}

.syb-quote--feature .syb-quote__by {
	border-top-color: rgba(255, 255, 255, 0.24);
}

.syb-quote--feature .syb-quote__who strong,
.syb-quote--feature .syb-quote__who span {
	color: var(--c-white);
}

@media (min-width: 768px) {
	.syb-testimonials {
		padding-block: 80px;
	}

	.syb-testimonials .syb-head {
		margin-bottom: 29px;
	}

	/* 24px in the design, where the 1px border is drawn inside the card. */
	.syb-quote {
		padding: 23px;
	}

	.syb-quote__text {
		gap: 28px;
		font-size: 18px;
		line-height: 28px;
	}

	.syb-quote__by {
		gap: 17px;
	}

	.syb-quote__logo {
		width: 142px;
		height: 61px;
	}

	.syb-quote__who strong {
		font-size: 20px;
		line-height: 30px;
	}

	.syb-quote-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	.syb-quote--feature {
		padding: 48px;
	}

	.syb-quote--feature .syb-quote__text {
		max-width: 760px;
		font-size: 22px;
		line-height: 34px;
	}
}

@media (min-width: 1100px) {
	.syb-quote-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Quote mark and the small tile used when a quote has no logo */

.syb-quote__mark {
	color: var(--c-primary);
}

.syb-quote__badge {
	display: grid;
	flex: none;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 10px;
	background: var(--c-tile);
	color: var(--c-blue);
	font-size: 13px;
	font-weight: 600;
	line-height: 18px;
}

/* Layout: first quote large (coloured card), the others stacked beside it.
   Desktop: Partners & Clients "Testimonials" (610px feature card, two 610px cards). */

.syb-quote-spot {
	display: grid;
	gap: 16px;
}

.syb-quote-spot__col {
	display: grid;
	gap: 16px;
}

.syb-quote-spot .syb-quote {
	box-shadow: var(--shadow-md);
}

.syb-quote--card,
.syb-quote--spot {
	padding: 24px;
	border-radius: var(--radius-md);
}

.syb-quote--card .syb-quote__logo,
.syb-quote--spot .syb-quote__logo {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	background: var(--c-white);
}

.syb-quote--card .syb-quote__by {
	padding-top: 20px;
	border-top-color: #e6e8f2;
}

.syb-quote--card .syb-quote__who strong,
.syb-quote--spot .syb-quote__who strong {
	font-size: 18px;
	font-weight: 600;
	line-height: 24px;
}

.syb-quote--card .syb-quote__who span,
.syb-quote--spot .syb-quote__who span {
	font-weight: 400;
}

.syb-quote--spot {
	justify-content: space-between;
	gap: 32px;
	border: 0;
	border-radius: var(--radius-lg);
	background-position: 290px 170px;
}

.syb-quote--spot .syb-quote__mark {
	color: #8fb9ff;
}

.syb-quote--spot .syb-quote__text {
	color: var(--c-white);
	font-size: 18px;
	line-height: 28px;
}

.syb-quote--spot .syb-quote__by {
	padding-top: 0;
	border-top: 0;
}

.syb-quote--spot .syb-quote__who strong {
	color: var(--c-white);
}

.syb-quote--spot .syb-quote__who span {
	color: #c9cdf0;
}

.syb-quote--spot .syb-quote__badge {
	background: rgba(255, 255, 255, 0.14);
	color: var(--c-white);
}

@media (min-width: 768px) {
	.syb-testimonials--spotlight {
		padding-block: 96px;
	}

	.syb-testimonials--spotlight .syb-head {
		gap: 14px;
		margin-bottom: 40px;
	}

	.syb-quote--card {
		padding: 27px;
	}

	.syb-quote--spot {
		padding: 32px;
	}

	.syb-quote--spot .syb-quote__text {
		font-size: 22px;
		line-height: 34px;
	}
}

@media (min-width: 1000px) {
	.syb-quote-spot {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}

	.syb-quote-spot__col {
		gap: 20px;
	}
}

/* Feature card as on "For Billers > Testimonial": quote mark, large quote, name with initials tile. */

.syb-quote--feature .syb-quote__mark {
	color: var(--c-white);
}

.syb-quote--feature .syb-quote__by {
	padding-top: 0;
	border-top: 0;
}

.syb-quote--feature .syb-quote__badge {
	background: rgba(255, 255, 255, 0.14);
	color: var(--c-white);
}

.syb-quote--feature .syb-quote__who {
	gap: 2px;
}

.syb-quote--feature .syb-quote__who strong {
	font-size: 18px;
	font-weight: 600;
	line-height: 24px;
}

.syb-quote--feature .syb-quote__who span {
	color: #c9cdf0;
	font-weight: 400;
}

.syb-quote--feature.syb-tone-navy {
	background-position: right -210px top -170px;
}

.syb-quote--feature[class*="syb-tone-"] {
	box-shadow: inset 0 4px 4px rgba(255, 255, 255, 0.25);
}

@media (min-width: 768px) {
	.syb-quote--feature {
		gap: 28px;
		padding: 40px;
	}

	.syb-quote--feature .syb-quote__text {
		max-width: 740px;
	}

	.syb-quote--feature .syb-quote__by {
		gap: 14px;
	}
}
