/*
 * Leadership team grid inside the business "Our Genius" leadership popup.
 *
 * Ported from the main site: src/scss/blocks/team.scss, src/scss/utils/ui/decor-dots.scss
 * and the h1 / textL / textM typography mixins.
 *
 * Unit conversion: the main site's design frame has 1rem = 10px, this site's has 1rem = 16px,
 * so every main-site rem value is multiplied by 0.625 (e.g. 14.4rem -> 9rem, 6.1rem -> 3.8125rem).
 * Breakpoint: the main site's mobile max-width (1023.5px) is this site's 959px.
 * Fonts come from the existing Typekit "abolition" and Google "IBM Plex Sans" links in index.html.
 */

/* ------------------------------------------------------------------ popup container */

.business-our-genius-leadership__container {
	padding: 4.5rem 1rem 2.5rem;
}

@media screen and (min-width: 960px), print {
	.business-our-genius-leadership__container {
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 4.75rem 3.5rem 5.0625rem;
	}
}

/* ------------------------------------------------------------------------ decor dots */

.decor_dots {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-template-rows: repeat(2, 1fr);
	gap: 0.25rem;
	width: 0.75rem;
	height: 0.75rem;
}

.decor_dots__item {
	width: 0.25rem;
	height: 0.25rem;
	background: #c9c9c9;
}

.decor_dots__item:nth-child(1) {
	justify-self: start;
	align-self: start;
}

.decor_dots__item:nth-child(2) {
	justify-self: end;
	align-self: start;
}

.decor_dots__item:nth-child(3) {
	justify-self: start;
	align-self: end;
}

.decor_dots__item:nth-child(4) {
	justify-self: end;
	align-self: end;
}

/* ---------------------------------------------------------------------------- team */

.team__in {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.team__header {
	display: flex;
	justify-content: space-between;
	gap: 3.125rem;
	width: 100%;
	margin-bottom: 2.0625rem;
}

.team__decor_dots {
	flex-shrink: 0;
	margin-top: 0.25rem;
}

.team__title {
	color: #f9f9f9;
}

.team__title h2 {
	margin-top: -0.25rem;

	font-family: abolition, sans-serif;
	font-weight: 400;
	font-size: 4rem;
	line-height: 1;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.team__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.3125rem;
	width: 100%;
}

.team__member {
	width: 100%;
	max-width: 31.25rem;
}

.team__member_link {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	width: 100%;
}

.team__member_image__overlay {
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 31.25rem;
	aspect-ratio: 1;

	border: 1px solid rgba(249, 249, 249, 0.15);
	clip-path: polygon(0.375rem 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0.375rem);
}

.team__member_image__overlay::before {
	content: '';
	position: absolute;
	z-index: 1;
	top: 0;
	left: 0;
	width: 0;
	height: 0;

	border-bottom: 0.375rem solid transparent;
	border-left: 0.375rem solid rgba(249, 249, 249, 0.15);
}

.team__member_image_w {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;

	user-select: none;
}

.team__member_image_w::before {
	content: '';
	position: absolute;
	z-index: -1;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;

	background-image: url('../images/team/team-bg.svg');
	background-size: contain;
	background-position: bottom;
	background-repeat: no-repeat;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.team__member_image_w::after {
	content: '';
	position: absolute;
	z-index: 1;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 30%;

	background: linear-gradient(180deg, rgba(255, 209, 22, 0) 0%, rgba(255, 209, 22, 0.25) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.team__member_image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.team__member_content {
	display: flex;
	flex-direction: column;
	gap: 0.3125rem;
	padding: 0 0.9375rem;
}

.team__member_name {
	font-family: 'IBM Plex Sans', sans-serif;
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 1.35;
	letter-spacing: 0;
	color: #f9f9f9;

	transition: color 0.3s ease;
}

.team__member_position {
	font-family: 'IBM Plex Sans', sans-serif;
	font-weight: 500;
	font-size: 1rem;
	line-height: 1.375;
	letter-spacing: 0;
	color: rgba(249, 249, 249, 0.6);

	transition: color 0.3s ease;
}

@media (hover: hover) {
	.team__member_link:hover .team__member_name {
		color: #ffd116;
	}

	.team__member_link:hover .team__member_position {
		color: #f9f9f9;
	}

	.team__member_link:hover .team__member_image_w::before,
	.team__member_link:hover .team__member_image_w::after {
		opacity: 1;
	}
}

@media screen and (min-width: 960px), print {
	.team__header {
		margin-bottom: 1.5625rem;
	}

	.team__decor_dots {
		margin-top: 0.6875rem;
	}

	.team__title h2 {
		margin-top: -0.5625rem;
		font-size: 9rem;
	}

	.team__content {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: stretch;
		/* team.scss says space-between; the live site overrides it with Additional CSS so that an
		   incomplete last row (8 members = 3 + 3 + 2) stays left-aligned instead of splitting apart */
		justify-content: flex-start;
		gap: 3.8125rem 0.9375rem;
	}

	.team__member {
		width: calc(100% / 3 - 0.625rem);
		max-width: none;
	}

	.team__member_image__overlay {
		max-width: none;
		clip-path: polygon(0.5625rem 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0.5625rem);
	}

	.team__member_image__overlay::before {
		border-bottom-width: 0.5rem;
		border-left-width: 0.5rem;
	}
}
