/**
 * Team page ("Team final" 1278:210, mobile 1986:941).
 * Loads after components.css on the page with the slug "team" only.
 */

/* ------------------------------------------------------------------ Hero */
.team-banner .page-banner__text {
	max-width: 750px;
}

/* ------------------------------------------------- The People Behind band */
.team-people {
	--art-w: clamp(350px, 230px + 30vw, 587px);
	padding-top: 40px;
	background: linear-gradient(90deg, rgba(84, 162, 217, 0.09) 0%, rgba(255, 255, 255, 0.43) 100%);
}

.team-people__inner {
	display: grid;
	justify-items: center;
	gap: clamp(28px, 20px + 2vw, 40px);
}

.team-people__body {
	text-align: center;
}

.team-people__title {
	font-size: var(--fs-h2);
	font-weight: 500;
	line-height: 1.21;
}

.team-people__body p {
	max-width: 780px;
	margin-top: 12px;
	font-size: clamp(13px, 12.2px + 0.2vw, 16px);
	line-height: 1.514;
	text-wrap: pretty;
}

.team-people__media {
	width: min(100%, var(--art-w));
	/* The illustration hangs over the bottom of the band by 81 of its 414 px, as in the design. */
	margin-bottom: calc(min(100vw - 2 * var(--gutter), var(--art-w)) * -0.138);
}

.team-people__media img {
	width: 100%;
}

@media (min-width: 1024px) {
	.team-people {
		--art-w: clamp(420px, 60px + 27.5vw, 587px);
		padding-top: 23px;
	}

	.team-people__inner {
		grid-template-columns: minmax(0, 780px) auto;
		justify-content: space-between;
		justify-items: stretch;
		align-items: center;
	}

	.team-people__body {
		text-align: left;
	}

	.team-people__body p {
		max-width: none;
	}

	.team-people__media {
		width: var(--art-w);
		margin-bottom: calc(var(--art-w) * -0.138);
	}
}

/* --------------------------------------------------- Our Expert Team Members */
.team-members {
	padding-top: clamp(64px, 50px + 3.5vw, 131px);
	padding-bottom: var(--section-y);
	/* Two soft blue glows behind the grid (Ellipses 22 and 23). */
	background:
		radial-gradient(circle at 29.7% clamp(400px, 34vw, 664px), rgba(84, 162, 217, 0.16) 0, rgba(84, 162, 217, 0) clamp(260px, 23vw, 440px)),
		radial-gradient(circle at 65.3% clamp(900px, 60vw, 1164px), rgba(84, 162, 217, 0.16) 0, rgba(84, 162, 217, 0) clamp(260px, 23vw, 440px));
}

.team-members__title {
	margin-bottom: clamp(28px, 22px + 1.5vw, 50px);
	font-size: var(--fs-h2);
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-wrap: balance;
}

.team-grid {
	display: grid;
	gap: clamp(36px, 28px + 2vw, 58px);
	justify-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* One card: photo clipped to a rounded rectangle, dark fade at the bottom,
   name and role on top, and a thin black outline offset down and right. */
.team-card {
	--offset: 6px;
	--radius: 21.7px;
	position: relative;
	width: min(100% - var(--offset), clamp(300px, 81vw, 420px));
	margin: 0 var(--offset) var(--offset) 0;
}

.team-card::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
	border: 1px solid var(--c-black);
	border-radius: calc(var(--radius) + 6px);
	transform: translate(var(--offset), var(--offset));
	pointer-events: none;
}

.team-card__inner {
	position: relative;
	overflow: hidden;
	aspect-ratio: 325 / 372;
	border-radius: var(--radius);
	background: #e9e9e9;
}

.team-card__inner::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40.224%, #000 118.66%);
}

.team-card__photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.team-card__text {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	padding: 0 clamp(20px, 6vw, 42px) clamp(22px, 6vw, 27px);
	color: var(--c-white);
}

.team-card__name {
	font-size: clamp(24px, 20.8px + 0.8vw, 32px);
	font-weight: 600;
	line-height: 1.2;
	color: var(--c-white);
}

.team-card__role {
	font-family: var(--f-head);
	font-size: clamp(17px, 14.9px + 0.53vw, 25px);
	line-height: 1.2;
}

@media (min-width: 768px) {
	.team-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.team-card {
		--offset: 8px;
		width: calc(100% - var(--offset));
		margin-bottom: 0;
	}

	.team-card__inner {
		aspect-ratio: 367 / 431.4;
	}

	.team-card__text {
		padding: 0 clamp(20px, 2.2vw, 41px) clamp(20px, 1.6vw, 27px);
	}

	.team-card__name {
		font-size: clamp(22px, 15px + 0.9vw, 32px);
	}

	.team-card__role {
		font-size: clamp(16px, 10px + 0.78vw, 25px);
	}
}

/* Desktop: the first two members on large cards side by side, then rows of three. */
@media (min-width: 1024px) {
	.team-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		column-gap: clamp(30px, 3.1vw, 60px);
		max-width: 1231px;
		margin-inline: auto;
	}

	.team-card {
		grid-column: span 2;
		width: calc(100% - var(--offset));
	}

	.team-card--lg {
		--offset: 11px;
		--radius: 27px;
		/* 456 of the 580 px half-row in the design. */
		width: 78.6%;
		margin-right: 0;
		grid-column: span 3;
	}

	.team-card--lg:nth-child(1) {
		justify-self: end;
	}

	.team-card--lg:nth-child(2) {
		justify-self: start;
	}

	.team-card--lg:only-child {
		grid-column: 2 / span 4;
		justify-self: center;
	}

	.team-card--lg .team-card__inner {
		aspect-ratio: 456 / 536;
	}

	.team-card--lg .team-card__text {
		padding: 0 clamp(20px, 2.2vw, 42px) clamp(20px, 1.4vw, 25px);
	}
}

/* Button under the grid: "JOIN OUR TEAMS" on desktop, "Get Started Today" on phones (as designed). */
.team-members__actions {
	display: flex;
	justify-content: center;
	margin-top: clamp(40px, 30px + 2.5vw, 50px);
}

.team-members__btn--desktop {
	display: none;
}

.team-members__btn--mobile {
	box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
	.team-members__btn--desktop {
		display: inline-flex;
		text-transform: uppercase;
		font-weight: 700;
	}

	.team-members__btn--mobile {
		display: none;
	}
}
