/**
 * Team — directory (archive, market pages, Team page template) and the
 * member profile. Loaded on team views only (wc_is_team()). Reuses the
 * filter tabs from archive-hero.css and the hero's back link, eyebrow,
 * subtitle and intro from hero.css; container, chips, prose
 * (.team-biography), card frame and the accent-rule title come from
 * editorial.css. The contact panel's behaviour is assets/js/team-contact.js.
 *
 * @package GeneratePress_Child
 */

/*--------------------------------------------------------------
# Directory grid
--------------------------------------------------------------*/
/* Fixed column counts so a filtered row of two keeps card width.
   Crossfade class is set by editorial-grid.js (FADE_MS = 180). */
.team-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--editorial-gap);
	padding-block-end: var(--space-section);
	transition: opacity 180ms ease, transform 180ms ease;
}

.team-grid.is-transitioning {
	opacity: 0;
	transform: translateY(6px);
}

.team-page + .team-toolbar {
	margin-block-start: var(--space-block);
}

.team-grid__empty {
	margin-block: 0;
	padding-block-end: var(--space-section);
	color: var(--editorial-muted-text);
	font-family: var(--wc-font-serif);
	font-size: var(--editorial-font-size-lede);
}

/*--------------------------------------------------------------
# Card
--------------------------------------------------------------*/
/* Portrait optional: a small circle with the profile's pink ring at the
   top of the card. Cards stretch to the row and the link pins to the
   bottom, so a mixed row still lines up. The whole card is clickable:
   the name is a Cover link (editorial.css), its focus ring in the accent. */
.team-grid .team-card {
	--wc-cover-focus: var(--editorial-accent);
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	transition: border-color 160ms ease;
}

.team-card:is(:hover, :focus-within) {
	border-color: var(--editorial-muted);
}

.team-card:is(:hover, :focus-within) .team-card__link {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.team-card.is-hidden-by-filter {
	display: none;
}

/* Ring portrait: a circle inside a thin pink ring, on the card and the
   profile; each sets its own width and the gap inside the ring. */
:is(.team-card__media, .team-portrait) {
	display: block;
	box-sizing: border-box;
	margin: 0;
	border: 1px solid var(--editorial-brand-fill);
	border-radius: 50%;
}

/* The circle's pale pink is drawn here, not in the photo: export the
   portrait as a cut-out (transparent WebP) and the person sits on it.
   An opaque photo covers it and looks as before. --wc-portrait-bg
   overrides the colour. */
:is(.team-card__image, .team-portrait img) {
	display: block;
	background: var(--wc-portrait-bg, var(--editorial-band));
	width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	border-radius: 50%;
	object-fit: cover;
	object-position: center top;
}

.team-card__media {
	width: 7.5rem;
	margin: var(--editorial-space-md) var(--editorial-space-md) 0;
	padding: 0.3rem;
}

.team-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--editorial-space-2xs);
	padding: var(--editorial-space-md);
}

.team-card h2 {
	margin: 0;
	font-size: var(--editorial-font-size-h4);
	font-weight: 600;
	line-height: 1.15;
}

.team-card__title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--editorial-muted-text);
}

.team-card__bio {
	margin: var(--editorial-space-xs) 0 0;
	font-size: 0.95rem;
	line-height: 1.55;
}

.team-card__link {
	align-self: flex-start;
	margin-top: auto;
	padding-top: var(--editorial-space-sm);
}


/*--------------------------------------------------------------
# Profile header
--------------------------------------------------------------*/
/* Text left, portrait right, on the container with a hairline under
   both. Without a portrait the text spans the row. */
.team-profile__hero {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: var(--editorial-space-xl);
	align-items: start;
	width: var(--container-inline);
	margin-inline: auto;
	padding-block: var(--editorial-space-lg) var(--editorial-space-lg);
	border-bottom: 1px solid var(--editorial-border);
}

.team-profile__hero--no-image {
	grid-template-columns: minmax(0, 1fr);
}

.team-profile__hero-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.team-profile__hero .entry-title {
	margin: 0;
	font-size: var(--editorial-font-size-display);
	font-weight: 400;
	line-height: 1.05;
	text-align: left;
}

/* First name on one line, the rest of the name on the next. */
.team-profile__first-name,
.team-profile__last-name {
	display: block;
}

/* Job title: black tracked capitals over the Brand rule (editorial.css). */
.team-profile__hero .entry-hero__subtitle {
	margin-top: var(--editorial-space-xs);
	padding-bottom: var(--editorial-space-sm);
	color: var(--editorial-heading);
	font-size: 0.9rem;
	font-weight: 500;
	letter-spacing: 0.22em;
}

.team-profile__hero .entry-hero__intro {
	margin-top: var(--editorial-space-md);
	color: var(--editorial-text);
	font-size: var(--editorial-font-size-base);
}

/* Market chips: soft filled, no border (two classes to beat .wc-chips li). */
.team-profile__markets {
	margin-top: var(--editorial-space-md);
	gap: 0.6em;
}

.team-profile__hero .team-profile__markets li {
	padding: 0.55em 1.1em;
	border-color: transparent;
	background: var(--editorial-band);
	color: var(--editorial-heading);
	letter-spacing: 0.14em;
}

.team-profile__hero .team-profile__markets li:is(:hover, :focus-within) {
	background: color-mix(in srgb, var(--editorial-brand-fill) 30%, var(--editorial-band));
}

/* Portrait: a circle with a thin pink ring, centred beside the text. */
/* As tall as the text column: portrait at the top, LinkedIn at the bottom. */
.team-profile__hero-media {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-self: stretch;
	justify-self: start;
	width: min(100%, 22rem);
}

.team-portrait {
	width: 100%;
	padding: 0.5rem;
}

/* "Connect on LinkedIn" under the market chips and again after the
   Reach out panel: a small glyph and the label. */
.team-linkedin {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin-top: var(--editorial-space-md);
	color: var(--editorial-heading);
	font-family: var(--wc-font-sans);
	font-size: 0.9rem;
	text-decoration: none;
}

.team-linkedin__icon {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 3px;
	background: var(--editorial-accent);
	color: var(--editorial-on-accent);
}

.team-linkedin__icon svg {
	width: 0.75rem;
	height: 0.75rem;
}

/* At the foot of the portrait column, centred on the portrait. */
.team-profile__hero-media .team-linkedin {
	margin: var(--editorial-space-sm) auto 0;
	display: flex;
	justify-content: center;
}

.team-profile__aside .team-linkedin {
	align-self: flex-start;
	margin-top: 0;
}

.team-linkedin:is(:hover, :focus-visible) {
	color: var(--editorial-heading);
}

.team-linkedin:is(:hover, :focus-visible) .team-linkedin__label {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/*--------------------------------------------------------------
# Profile columns
--------------------------------------------------------------*/
/* Profile left (55), experience right (45), a hairline between them
   running the full height, one --editorial-space-lg on each side of it;
   stacked below 900 with the line turned horizontal. */
.team-profile__layout {
	display: flex;
	gap: var(--editorial-space-lg);
	align-items: stretch;
	padding-block: var(--editorial-space-lg) var(--space-block);
}

.team-profile__main,
.team-profile__aside {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.team-profile__main {
	flex: 55 1 0;
	gap: var(--editorial-space-md);
}

.team-profile__aside {
	flex: 45 1 0;
	gap: var(--editorial-space-lg);
	padding-inline-start: var(--editorial-space-lg);
	border-inline-start: 1px solid var(--editorial-border);
}

.team-profile__layout--single .team-profile__main {
	max-width: var(--content-reading);
}

/* "Profile" / "Experience across leading brands": serif, no rule. */
.team-profile__title {
	margin: 0;
	font-size: var(--editorial-font-size-h3);
	font-weight: 400;
	line-height: 1.15;
}

.team-biography {
	width: auto;
	margin: 0;
}

.team-biography > :first-child {
	margin-top: 0;
}

/*--------------------------------------------------------------
# Languages
--------------------------------------------------------------*/
/* Icon in a soft disc, tracked label, a hairline, then the list. */
.team-languages {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--editorial-space-sm);
	margin: var(--editorial-space-sm) 0 0;
	font-family: var(--wc-font-sans);
}

.team-languages__icon {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: color-mix(in srgb, var(--editorial-brand-fill-alt) 45%, var(--editorial-page));
	color: var(--editorial-heading);
}

.team-languages__label {
	padding-inline-end: var(--editorial-space-sm);
	border-inline-end: 1px solid var(--editorial-border);
	color: var(--editorial-heading);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.team-languages__list {
	font-size: var(--editorial-font-size-base);
}

/*--------------------------------------------------------------
# Brand logos
--------------------------------------------------------------*/
.team-brands {
	display: flex;
	flex-direction: column;
	gap: var(--editorial-space-sm);
}

.team-brands__lede {
	margin: 0;
	color: var(--editorial-text);
	font-size: var(--editorial-font-size-base);
}

/* Three per row in fixed cells (90px tall, the logo fitted into a 60px
   box) so the brands read at one size whatever the files are. A hairline
   between neighbours: every cell draws a left border and the list is
   shifted a pixel left inside a clipping wrapper, so the first column's
   line falls outside and is never seen. */
.team-brands__wall {
	overflow: hidden;
	margin-top: var(--editorial-space-2xs);
}

.team-brands__logos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--editorial-space-md) 0;
	margin: 0 0 0 -1px;
	padding: 0;
	list-style: none;
}

.team-brands__item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 90px;
	padding: 14px;
	border-inline-start: 1px solid var(--editorial-border);
}

.team-brands__link {
	display: block;
	width: 100%;
	transition: transform 200ms ease;
}

.team-brands__link:is(:hover, :focus-visible) {
	transform: scale(1.04);
}

.team-brands__logos img {
	display: block;
	width: 100%;
	height: 60px;
	object-fit: contain;
}

/*--------------------------------------------------------------
# Quote
--------------------------------------------------------------*/
/* A pull quote after the biography, before Languages: a pink rule on
   the left, italic serif, no background. */
.team-quote {
	margin: var(--editorial-space-sm) 0 0;
	padding: var(--editorial-space-2xs) 0 var(--editorial-space-2xs) var(--editorial-space-md);
	border-left: 2px solid var(--editorial-brand-fill);
	background: none;
	color: var(--editorial-heading);
	font-family: var(--wc-font-serif);
	font-size: var(--editorial-font-size-lede);
	font-style: italic;
	line-height: 1.45;
}

.team-quote p {
	margin: 0;
}

.team-quote p::before { content: "\201C"; }
.team-quote p::after  { content: "\201D"; }

/*--------------------------------------------------------------
# Contact card
--------------------------------------------------------------*/
/* A soft grey panel: "Let's build what's next" on the left, the Reach
   out button on the right; the form expands underneath, inside it. */
.team-contact {
	padding: var(--editorial-space-md) var(--editorial-space-lg);
	background: var(--editorial-surface);
}

.team-contact__card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--editorial-space-sm) var(--editorial-space-md);
}

/* The title gives way first (wrapping to two lines) so the button keeps the right side. */
.team-contact__title {
	flex: 1 1 9rem;
	min-width: 0;
	margin: 0;
	color: var(--editorial-heading);
	font-family: var(--wc-font-serif);
	font-size: var(--editorial-font-size-h4);
	font-weight: 400;
	line-height: 1.15;
}

/* The toggle is the Soft button (editorial.css, with Fluent's submit),
   a size smaller here. */
button.team-contact__button {
	flex: 0 0 auto;
	padding: 1.1em 2em;
	font-size: 0.8rem;
	white-space: nowrap;
	cursor: pointer;
}

/* Expands by animating the row from 0fr to 1fr (keep 280ms in step with
   ANIM_MS in team-contact.js); [hidden] is set once it has closed. */
.team-contact__panel {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: grid-template-rows 280ms ease, opacity 280ms ease;
}

.team-contact__panel.is-open {
	grid-template-rows: 1fr;
	opacity: 1;
}

.team-contact__panel[hidden] {
	display: none;
}

.team-contact__panel-inner {
	min-height: 0;
	overflow: hidden;
}

/* Room for focus rings inside the clipped panel. */
.team-contact__form {
	margin: var(--editorial-space-md) 3px 3px;
}

.team-contact__form-title {
	margin: 0 0 var(--editorial-space-sm);
	font-size: var(--editorial-font-size-h5);
}

.team-contact__form-title[hidden] {
	display: none;
}

/* Fluent Forms: the shared look is in editorial.css; the narrow panel
   stacks the Name | Email container and keeps a compact button. */
.team-contact .fluentform .ff-t-container {
	display: block;
}

.team-contact .fluentform .ff-btn-submit:not(.ff_btn_no_style) {
	padding: 0.9em 1.8em;
	font-size: 0.85rem;
}

/*--------------------------------------------------------------
# Related members
--------------------------------------------------------------*/
.team-related {
	padding-block: var(--space-block) 0;
}

.team-profile__back {
	width: var(--container-inline);
	margin: var(--space-block) auto 0;
	padding-top: var(--editorial-space-md);
	border-top: 1px solid var(--editorial-border);
	font-size: 0.9rem;
}

.team-profile__back a {
	color: var(--editorial-muted-text);
	text-decoration: none;
}

.team-profile__back a:is(:hover, :focus-visible) {
	color: var(--editorial-heading);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.team-related > h2 {
	font-size: var(--editorial-font-size-h3);
}

.team-grid--related {
	width: 100%;
}

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

	.team-profile__hero {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--editorial-space-lg);
	}

	.team-profile__hero-media {
		justify-self: start;
		width: min(100%, 18rem);
	}

	.team-profile__layout {
		flex-direction: column;
		gap: var(--space-block);
	}

	.team-profile__main,
	.team-profile__aside {
		flex: none;
	}

	.team-profile__aside {
		padding-inline-start: 0;
		padding-top: var(--space-block);
		border-inline-start: 0;
		border-top: 1px solid var(--editorial-border);
	}
}

@media ( max-width: 600px ) {
	.team-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.team-contact__card {
		align-items: flex-start;
		flex-direction: column;
	}

	.team-contact__title {
		flex-basis: auto; /* in a column the basis would be a height */
	}
}

@media ( max-width: 480px ) {
	.team-brands__logos {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: var(--editorial-space-sm);
	}

	.team-brands__item {
		min-height: 4.5rem;
	}
}
