/* Team archive and professional profiles. Loaded only on team routes. */

/* Archive hero: compact editorial composition with no decorative media request. */
.bb-site .bb-team-archive {
	--bb-team-gutter: max(1.25rem, calc((100vw - 1200px) / 2));

	width: 100%;
	max-width: none;
	overflow: clip;
	margin: 0;
	background: var(--bb-paper);
}

.bb-site .bb-team-hero {
	position: relative;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	align-items: center;
	gap: clamp(2rem, 5vw, 5rem);
	min-height: clamp(27rem, 38vw, 31.5rem);
	padding: clamp(3.75rem, 5.5vw, 5rem) var(--bb-team-gutter);
	background:
		radial-gradient(circle at 86% 22%, rgb(242 233 168 / 82%), transparent 18rem),
		radial-gradient(circle at 5% 94%, rgb(223 233 222 / 88%), transparent 21rem),
		linear-gradient(118deg, var(--bb-paper), var(--bb-cream));
}

.bb-site .bb-team-hero::before,
.bb-site .bb-team-hero::after {
	position: absolute;
	border-radius: 50%;
	content: "";
	pointer-events: none;
}

.bb-site .bb-team-hero::before {
	top: -9rem;
	right: -7rem;
	width: clamp(22rem, 36vw, 34rem);
	aspect-ratio: 1;
	border: clamp(1.5rem, 3vw, 3rem) solid rgb(255 253 249 / 32%);
}

.bb-site .bb-team-hero::after {
	bottom: 2.5rem;
	left: calc(var(--bb-team-gutter) + min(48vw, 34rem));
	width: clamp(4.5rem, 8vw, 7rem);
	aspect-ratio: 1;
	background: rgb(49 106 102 / 10%);
}

.bb-site .bb-team-hero__copy,
.bb-site .bb-team-hero__note {
	position: relative;
	z-index: 1;
	margin: 0;
}

.bb-site .bb-team-hero__copy {
	grid-column: 1 / 8;
}

.bb-site .bb-team-hero__copy .bb-eyebrow {
	--bb-eyebrow-surface: var(--bb-petrol);
	--bb-eyebrow-ink: var(--bb-white);

	margin: 0 0 clamp(1.6rem, 3vw, 2.4rem);
}

.bb-site .bb-team-hero__copy h1 {
	max-width: 12ch;
	margin: 0;
	font-size: clamp(3.25rem, 5.1vw, 5.15rem);
	line-height: 0.95;
}

.bb-site .bb-team-hero__note {
	grid-column: 8 / -1;
	max-width: 34rem;
	padding: clamp(1.75rem, 3vw, 2.5rem);
	border: 1px solid rgb(35 78 75 / 8%);
	border-radius: 1.75rem;
	background: rgb(255 253 249 / 86%);
	box-shadow: 0 1.6rem 4rem rgb(35 78 75 / 12%);
}

.bb-site .bb-team-hero__kicker {
	margin: 0 0 0.85rem;
	color: var(--bb-petrol);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.bb-site .bb-team-hero__note .has-lead-font-size {
	margin: 0;
	color: var(--bb-muted);
	font-size: clamp(1.05rem, 1.25vw, 1.18rem);
	line-height: 1.72;
}

/* A uniform 4+3 editorial roster: premium through rhythm, photography and restraint. */
.bb-site .bb-team-roster {
	position: relative;
	margin: 0;
	padding: clamp(4.5rem, 6.5vw, 6.5rem) var(--bb-team-gutter) clamp(5rem, 7vw, 7rem);
	background:
		radial-gradient(circle at 92% 8%, rgb(242 233 168 / 42%), transparent 23rem),
		radial-gradient(circle at 5% 90%, rgb(49 106 102 / 9%), transparent 25rem),
		linear-gradient(145deg, #f5f2e8, #e9f0e9);
}

.bb-site .bb-team-roster__intro {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	align-items: end;
	gap: clamp(2rem, 5vw, 5rem);
	max-width: 1200px;
	margin: 0 auto clamp(3.5rem, 6vw, 5.5rem);
}

.bb-site .bb-team-roster__heading {
	grid-column: 1 / 8;
	margin: 0;
}

.bb-site .bb-team-roster__heading .bb-eyebrow {
	--bb-eyebrow-surface: var(--bb-petrol);
	--bb-eyebrow-ink: var(--bb-white);

	margin: 0 0 1.4rem;
}

.bb-site .bb-team-roster__heading h2 {
	max-width: 13ch;
	margin: 0;
	color: var(--bb-petrol-dark);
	font-size: clamp(2.7rem, 4.4vw, 4.35rem);
	line-height: 0.98;
}

.bb-site .bb-team-roster__lead {
	grid-column: 8 / -1;
	max-width: 38ch;
	margin: 0;
	color: var(--bb-muted);
	font-size: clamp(1rem, 1.2vw, 1.12rem);
	line-height: 1.75;
}

.bb-site .bb-team-roster > .wp-block-query {
	max-width: 1200px;
	margin: 0 auto;
}

.bb-site .bb-team-archive .bb-content-grid {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: clamp(1.25rem, 2vw, 1.75rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.bb-site .bb-team-archive .bb-content-grid > li {
	display: flex;
	grid-column: span 2;
	min-width: 0;
}

.bb-site .bb-team-archive .bb-content-grid > li:nth-child(5) {
	grid-column: 2 / span 2;
}

.bb-site .bb-team-archive .bb-content-grid > li:nth-child(6) {
	grid-column: 4 / span 2;
}

.bb-site .bb-team-archive .bb-content-grid > li:nth-child(7) {
	grid-column: 6 / span 2;
}

.bb-site .bb-team-archive .bb-content-card {
	position: relative;
	display: flex;
	overflow: hidden;
	width: 100%;
	min-width: 0;
	height: 100%;
	flex-direction: column;
	margin: 0;
	padding: 0;
	border: 1px solid rgb(35 78 75 / 10%);
	border-radius: 1.5rem;
	background: rgb(255 253 249 / 94%);
	box-shadow: 0 1.15rem 2.75rem rgb(35 78 75 / 10%);
	transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

/* Override the global editorial colour rotation: every person receives one equal card. */
.bb-site .bb-team-archive .bb-content-grid > li .bb-content-card {
	background: rgb(255 253 249 / 94%);
	color: var(--bb-ink);
}

.bb-site .bb-team-archive .bb-content-card::before,
.bb-site .bb-team-archive .bb-content-card::after {
	display: none;
}

.bb-site .bb-team-archive .wp-block-post-featured-image {
	position: relative;
	overflow: hidden;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: var(--bb-sage);
	box-shadow: none;
}

.bb-site .bb-team-archive .wp-block-post-featured-image a {
	display: block;
	height: 100%;
}

.bb-site .bb-team-archive .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 18%;
	border-radius: 0;
	transition: transform 480ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.bb-site .bb-team-archive .bb-team-card__body {
	position: relative;
	display: flex;
	width: 100%;
	min-height: 13.25rem;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: clamp(1.35rem, 2vw, 1.7rem);
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	text-align: center;
}

.bb-site .bb-team-archive .wp-block-post-title {
	max-width: none;
	margin: 0 0 0.7rem;
	font-size: clamp(1.35rem, 1.75vw, 1.7rem);
	line-height: 1.08;
	text-align: center;
}

.bb-site .bb-team-archive .wp-block-post-title a {
	color: var(--bb-petrol-dark);
	text-decoration: none;
}

.bb-site .bb-team-archive .wp-block-post-excerpt {
	margin: 0;
	color: var(--bb-muted);
	font-size: 0.91rem;
	line-height: 1.58;
	text-align: center;
}

.bb-site .bb-team-archive .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.bb-site .bb-team-archive .wp-block-post-excerpt__more-text {
	display: none;
}

.bb-site .bb-team-archive .bb-team-card__link {
	display: inline-flex;
	align-items: center;
	align-self: center;
	gap: 0.7rem;
	margin-top: auto;
	padding-top: 1.35rem;
	color: var(--bb-petrol-dark);
	font-size: 0.88rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-decoration: none;
}

.bb-site .bb-team-archive .bb-team-card__link::after {
	display: inline-grid;
	width: 2rem;
	aspect-ratio: 1;
	place-items: center;
	border-radius: 50%;
	background: var(--bb-petrol);
	color: var(--bb-white);
	content: "↗";
	font-size: 0.75rem;
	transition: transform 180ms ease;
}

.bb-site .bb-team-archive .bb-content-card:hover .wp-block-post-featured-image img,
.bb-site .bb-team-archive .bb-content-card:focus-within .wp-block-post-featured-image img {
	transform: scale(1.035);
}

.bb-site .bb-team-archive .bb-content-card:hover .bb-team-card__body,
.bb-site .bb-team-archive .bb-content-card:focus-within .bb-team-card__body {
	box-shadow: none;
}

.bb-site .bb-team-archive .bb-content-card:hover,
.bb-site .bb-team-archive .bb-content-card:focus-within {
	border-color: rgb(49 106 102 / 24%);
	box-shadow: 0 1.6rem 3.5rem rgb(35 78 75 / 16%);
	transform: translateY(-0.35rem);
}

.bb-site .bb-team-archive .bb-content-card:hover .bb-team-card__link::after,
.bb-site .bb-team-archive .bb-content-card:focus-within .bb-team-card__link::after {
	transform: translate(0.12rem, -0.12rem);
}

@supports (animation-timeline: view()) {
	.bb-site .bb-team-archive .bb-content-grid > li {
		animation: bb-team-card-reveal linear both;
		animation-timeline: view();
		animation-range: entry 4% cover 25%;
	}
}

@keyframes bb-team-card-reveal {
	from {
		opacity: 0;
		transform: translateY(2rem);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Singular profiles: work now without portraits and adapt automatically when approved portraits arrive. */
.bb-site .bb-team-profile {
	--bb-team-gutter: max(1.25rem, calc((100vw - 1200px) / 2));

	width: 100%;
	max-width: none;
	margin: 0;
	padding: clamp(4.5rem, 7vw, 6.5rem) var(--bb-team-gutter);
	background:
		radial-gradient(circle at 91% 8%, rgb(242 233 168 / 64%), transparent 21rem),
		radial-gradient(circle at 6% 92%, rgb(223 233 222 / 78%), transparent 23rem),
		linear-gradient(120deg, var(--bb-paper), var(--bb-cream));
}

.bb-site .bb-team-profile .bb-profile-grid {
	display: grid;
	grid-template-columns: minmax(18rem, 0.72fr) minmax(0, 1.28fr);
	align-items: start;
	gap: clamp(2.5rem, 6vw, 6rem);
	max-width: 1200px;
	margin: 0 auto;
}

.bb-site .bb-team-profile .bb-profile-grid > .wp-block-column {
	min-width: 0;
}

.bb-site .bb-team-profile .bb-profile-grid > .wp-block-column:first-child:empty {
	display: none;
}

.bb-site .bb-team-profile .bb-profile-grid > .wp-block-column:first-child:empty + .wp-block-column {
	grid-column: 1 / -1;
	width: 100%;
	max-width: 880px;
	margin-inline: auto;
}

.bb-site .bb-team-profile .bb-profile-grid > .wp-block-column:last-child {
	padding: clamp(2rem, 4.5vw, 4rem);
	border-radius: 2rem;
	background: rgb(255 253 249 / 88%);
	box-shadow: 0 1.8rem 5rem rgb(35 78 75 / 13%);
}

.bb-site .bb-team-profile .wp-block-post-featured-image {
	margin: 0;
}

.bb-site .bb-team-profile .wp-block-post-featured-image img {
	border-radius: 2rem;
	box-shadow: 0 1.8rem 4.5rem rgb(35 78 75 / 18%);
}

.bb-site .bb-team-profile .bb-eyebrow {
	--bb-eyebrow-surface: var(--bb-petrol);
	--bb-eyebrow-ink: var(--bb-white);

	margin-bottom: 1.3rem;
}

.bb-site .bb-team-profile .wp-block-post-title {
	max-width: 13ch;
	margin-bottom: 0.5em;
	font-size: clamp(3rem, 4.8vw, 5rem);
	line-height: 0.95;
}

.bb-site .bb-team-profile .wp-block-post-excerpt {
	max-width: 58ch;
	color: var(--bb-muted);
	font-size: clamp(1.1rem, 1.4vw, 1.25rem);
	line-height: 1.72;
}

.bb-site .bb-team-profile .wp-block-post-content {
	max-width: 62ch;
	margin-top: clamp(2rem, 4vw, 3rem);
	color: var(--bb-ink);
	font-size: 1.05rem;
	line-height: 1.82;
}

.bb-site .bb-team-profile .wp-block-post-content > * + * {
	margin-top: 1.25em;
}

.bb-site .bb-team-profile .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: clamp(2rem, 4vw, 3rem);
}

.bb-site .bb-team-profile .wp-block-button:first-child .wp-block-button__link {
	background: var(--bb-petrol-dark);
	color: var(--bb-white);
}

.bb-site .bb-team-profile .wp-block-button.is-style-outline .wp-block-button__link {
	border-color: rgb(49 106 102 / 30%);
	background: transparent;
	color: var(--bb-petrol-dark);
}

@media (max-width: 1020px) {
	.bb-site .bb-team-hero {
		gap: 2rem;
	}

	.bb-site .bb-team-hero__copy {
		grid-column: 1 / 8;
	}

	.bb-site .bb-team-hero__note {
		grid-column: 8 / -1;
		padding: 1.6rem;
	}

	.bb-site .bb-team-roster__heading {
		grid-column: 1 / 7;
	}

	.bb-site .bb-team-roster__lead {
		grid-column: 7 / -1;
	}

	.bb-site .bb-team-archive .bb-content-grid > li {
		grid-column: span 4;
	}

	.bb-site .bb-team-archive .bb-content-grid > li:nth-child(5),
	.bb-site .bb-team-archive .bb-content-grid > li:nth-child(6) {
		grid-column: span 4;
	}

	.bb-site .bb-team-archive .bb-content-grid > li:nth-child(7) {
		grid-column: 3 / span 4;
	}

	.bb-site .bb-team-profile .bb-profile-grid {
		grid-template-columns: minmax(15rem, 0.65fr) minmax(0, 1.35fr);
		gap: 2rem;
	}
}

@media (max-width: 720px) {
	.bb-site .bb-team-hero {
		display: block;
		min-height: 0;
		padding-block: 3.75rem;
	}

	.bb-site .bb-team-hero__copy h1 {
		font-size: clamp(2.8rem, 12vw, 4rem);
	}

	.bb-site .bb-team-hero__note {
		max-width: none;
		margin-top: 2rem;
		padding: 1.55rem;
		border-radius: 1.5rem;
	}

	.bb-site .bb-team-hero::after {
		display: none;
	}

	.bb-site .bb-team-roster {
		padding-block: 4rem 5rem;
	}

	.bb-site .bb-team-roster__intro {
		display: block;
		margin-bottom: 3rem;
	}

	.bb-site .bb-team-roster__heading h2 {
		font-size: clamp(2.55rem, 11vw, 3.65rem);
	}

	.bb-site .bb-team-roster__lead {
		max-width: none;
		margin-top: 1.6rem;
	}

	.bb-site .bb-team-archive .bb-content-grid {
		grid-template-columns: 1fr;
		gap: 2.25rem;
	}

	.bb-site .bb-team-archive .bb-content-grid > li,
	.bb-site .bb-team-archive .bb-content-grid > li:nth-child(5),
	.bb-site .bb-team-archive .bb-content-grid > li:nth-child(6),
	.bb-site .bb-team-archive .bb-content-grid > li:nth-child(7) {
		grid-column: 1;
	}

	.bb-site .bb-team-archive .bb-content-card {
		width: min(100%, 24rem);
		margin-inline: auto;
	}

	.bb-site .bb-team-archive .wp-block-post-featured-image {
		border-radius: 0;
	}

	.bb-site .bb-team-archive .bb-team-card__body {
		min-height: 13rem;
		border-radius: 0;
	}

	.bb-site .bb-team-profile {
		padding-block: 3.75rem;
	}

	.bb-site .bb-team-profile .bb-profile-grid {
		display: block;
	}

	.bb-site .bb-team-profile .bb-profile-grid > .wp-block-column:first-child:not(:empty) {
		max-width: 27rem;
		margin: 0 auto 2rem;
	}

	.bb-site .bb-team-profile .bb-profile-grid > .wp-block-column:last-child {
		padding: 1.75rem;
		border-radius: 1.5rem;
	}

	.bb-site .bb-team-profile .wp-block-post-title {
		font-size: clamp(2.75rem, 11vw, 4rem);
	}
}

@media (max-width: 480px) {
	.bb-site .bb-team-hero__copy h1 {
		font-size: clamp(2.65rem, 12.5vw, 3.6rem);
	}

	.bb-site .bb-team-archive .bb-team-card__body {
		width: 100%;
		padding: 1.55rem;
	}

	.bb-site .bb-team-profile .bb-profile-grid > .wp-block-column:last-child {
		padding: 1.55rem;
	}

	.bb-site .bb-team-profile .wp-block-buttons,
	.bb-site .bb-team-profile .wp-block-button,
	.bb-site .bb-team-profile .wp-block-button__link {
		width: 100%;
	}

	.bb-site .bb-team-profile .wp-block-button__link {
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bb-site .bb-team-archive .bb-content-grid > li {
		animation: none;
	}

	.bb-site .bb-team-archive .wp-block-post-featured-image img,
	.bb-site .bb-team-archive .bb-content-card,
	.bb-site .bb-team-archive .bb-team-card__link::after {
		transition: none;
	}
}
