/*
 * Career - Voices.
 *
 * Read from cp-all-designer css/career.css:1755, 2094-2361 and 4048-4091.
 *
 * Colour, type, sizes and the spaces between the parts arrive from the Style
 * tab and are not repeated here.
 */

.custom-career-voices {
	--custom-career-voices-per: 4;
	--custom-career-voices-cap: 410px;
	--custom-career-voices-arrow-out: 26px;
	position: relative;
	overflow: hidden;
}

/* career.css:2104-2114 — the frame the portraits are counted against */
.custom-career-voices .custom-career-voices__rail {
	--custom-career-voices-card: min(calc((100cqi - (var(--custom-career-voices-per) - 1) * var(--custom-career-rail-gap, 20px)) / var(--custom-career-voices-per)), var(--custom-career-voices-cap));
	position: relative;
	container-type: inline-size;
}

.custom-career-voices .custom-career-voices__view {
	margin-top: -12px;
	margin-bottom: -12px;
}

.custom-career-voices .custom-career-voices__track {
	gap: var(--custom-career-rail-gap, 20px);
	padding-top: 12px;
	padding-bottom: 18px;
}

/* career.css:2160-2174 — a tall portrait in the leaf's shape; reached, it lifts */
.custom-career-voices .custom-career-voices__card {
	position: relative;
	flex: 0 0 var(--custom-career-voices-card);
	aspect-ratio: 3 / 4;
	overflow: hidden;
	margin: 0;
	box-shadow: 0 6px 18px -6px rgba(22, 65, 140, 0.14);   /* --sh-sm, app.css:159 */
	transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            box-shadow 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-career-voices .custom-career-voices__card:hover {
	box-shadow: 0 18px 44px -14px rgba(22, 65, 140, 0.2);  /* --sh, app.css:160 */
	transform: translateY(-6px);
}

.custom-career-voices .custom-career-voices__photo {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center var(--custom-career-voices-focus, 22%);
	background: linear-gradient(160deg, #F3F8FD, #E3EDF9);
}

/* career.css:2191-2215 — their words rise over the portrait as it is reached */
.custom-career-voices .custom-career-voices__say {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: flex-end;
	box-sizing: border-box;
	margin: 0;
	padding: 20px 20px 112px;
	opacity: 0;
	background: linear-gradient(to top, rgba(14, 30, 84, 0.94) 30%, rgba(14, 30, 84, 0.72) 62%, rgba(14, 30, 84, 0.12));
	transition: opacity 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-career-voices .custom-career-voices__card:hover .custom-career-voices__say,
.custom-career-voices .custom-career-voices__card:focus-within .custom-career-voices__say {
	opacity: 1;
}

.custom-career-voices .custom-career-voices__quote {
	display: -webkit-box;
	overflow: hidden;
	font-weight: 300;
	font-style: normal;
	line-height: 1.7;
	letter-spacing: 0;
	quotes: "\201C" "\201D";
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 6;
}

/* a finger has no hover: the words show from the start, three lines of them */
@media (hover: none) {
	.custom-career-voices .custom-career-voices__say {
		opacity: 1;
		background: linear-gradient(to top, rgba(14, 30, 84, 0.94) 34%, rgba(14, 30, 84, 0.62) 58%, rgba(14, 30, 84, 0) 80%);
	}
	.custom-career-voices .custom-career-voices__quote {
		-webkit-line-clamp: 3;
	}
}

/* career.css:2219-2281 — the plate: a face, a name and a role */
.custom-career-voices .custom-career-voices__plate {
	position: absolute;
	right: 16px;
	bottom: 16px;
	left: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 14px 0 14px 0;          /* --r, app.css:141 */
	box-shadow: 0 8px 22px rgba(22, 65, 140, 0.16);
}

.custom-career-voices .custom-career-voices__avatar {
	position: relative;
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 50%;
	background: #F3F8FD;
}

.custom-career-voices .custom-career-voices__face {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center var(--custom-career-voices-face, 20%);
	transform: scale(var(--custom-career-voices-zoom, 1));
	transform-origin: 50% var(--custom-career-voices-face, 20%);
}

/* two lines of the role's height, whether it takes one or two */
.custom-career-voices .custom-career-voices__id {
	display: grid;
	align-content: center;
	gap: 2px;
	min-width: 0;
	min-height: 56px;                      /* career.css:2267 (21.6 + 2 + 32.4) */
}

.custom-career-voices .custom-career-voices__name {
	overflow: hidden;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.custom-career-voices .custom-career-voices__role {
	display: -webkit-box;
	overflow: hidden;
	font-weight: 400;
	line-height: 1.35;
	letter-spacing: 0;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* ------------------------------------------------------------------ */
/* The arrows — career.css:2288-2313                                   */
/* ------------------------------------------------------------------ */

.custom-career-voices .custom-career-voices__arrow {
	position: absolute;
	top: calc(var(--custom-career-voices-card) * 4 / 3 / 2);   /* the middle of a portrait */
	z-index: 3;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: var(--custom-career-voices-arrow-ink, #10305F);
	background: var(--custom-career-voices-arrow-ground, #FFFFFF);
	box-shadow: 0 6px 20px -6px rgba(14, 30, 84, 0.35), 0 0 0 2px rgba(14, 30, 84, 0.06);   /* career.css:2297 measures 1px */
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 250ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            color 250ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            opacity 250ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-career-voices .custom-career-voices__arrow--prev {
	left: calc(-1 * var(--custom-career-voices-arrow-out));
}

.custom-career-voices .custom-career-voices__arrow--next {
	right: calc(-1 * var(--custom-career-voices-arrow-out));
}

.custom-career-voices .custom-career-voices__arrow svg {
	width: 20px;
	height: 20px;
}

.custom-career-voices .custom-career-voices__arrow:hover {
	color: var(--custom-career-voices-arrow-ink-on, #FFFFFF);
	background: var(--custom-career-voices-arrow-ground-on, #10305F);
}

.custom-career-voices .custom-career-voices__arrow:active {
	transform: translateY(-50%) scale(0.94);
}

.custom-career-voices .custom-career-voices__arrow:focus-visible {
	outline: 2px solid #50A3D5;
	outline-offset: 2px;
}

.custom-career-voices .custom-career-voices__arrow[disabled] {
	opacity: 0;
	pointer-events: none;
}

/* every portrait in view: the rail centres and stands still */
.custom-career-voices .custom-career-voices__rail.is-static .custom-career-voices__arrow {
	display: none;
}

.custom-career-voices .custom-career-voices__rail.is-static .custom-career-voices__track {
	justify-content: center;
}

.custom-career-voices .custom-career-voices__rail.is-static .custom-career-voices__track::after {
	content: none;
}

/* ------------------------------------------------------------------ */
/* The dots — career.css:2315-2336                                     */
/* ------------------------------------------------------------------ */

.custom-career-voices .custom-career-voices__foot {
	display: flex;
	justify-content: center;
}

.custom-career-voices .custom-career-voices__foot[hidden] {
	display: none;
}

.custom-career-voices .custom-career-voices__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
}

.custom-career-voices .custom-career-voices__dot {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	transition: width 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-career-voices .custom-career-voices__dot::before {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 1000px;
	background: var(--custom-career-voices-dot, #B9C8DD);
	transition: width 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            background-color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-career-voices .custom-career-voices__dot:hover::before {
	background: var(--custom-career-voices-dot-hover, #50A3D5);
}

.custom-career-voices .custom-career-voices__dot.is-on {
	width: 36px;
}

.custom-career-voices .custom-career-voices__dot.is-on::before {
	width: 28px;
	background: var(--custom-career-voices-dot-on, #10305F);
}

.custom-career-voices .custom-career-voices__dot:focus-visible {
	outline: 2px solid #50A3D5;
	outline-offset: 2px;
	border-radius: 6px;
}

/* ------------------------------------------------------------------ */
/* Tablet — 768px to 1024px                                            */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	/* the name at 14: 18.9 + 2 + 32.4 */
	.custom-career-voices .custom-career-voices__id {
		min-height: 54px;
	}
}

/* ------------------------------------------------------------------ */
/* Mobile — up to 767px (career.css:2342-2361, drawn at 640)           */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	/* the face goes; the plate closes in */
	.custom-career-voices .custom-career-voices__avatar {
		display: none;
	}
	.custom-career-voices .custom-career-voices__plate {
		right: 10px;
		bottom: 10px;
		left: 10px;
		padding: 8px 10px;
	}
	.custom-career-voices .custom-career-voices__id {
		min-height: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.custom-career-voices .custom-career-voices__card,
	.custom-career-voices .custom-career-voices__say,
	.custom-career-voices .custom-career-voices__arrow {
		transition: none;
	}
	.custom-career-voices .custom-career-voices__card:hover {
		transform: none;
	}
}
