/*
 * Technical Committee members (prototype committee.html "committee-members"): rule, heading, then a grid of portrait
 * cards (Query Loop of Committee, by Order). Click opens the biography pop-up (assets/js/team.js builds a <dialog> from
 * the hidden .committee-bio in each card). The UK/US switch is not built (plan §15).
 * Outer Group: section-committee-members is-style-committee-members, backing = off-white (the next section); the
 * surface is white. The Testimonials pattern is placed inside the surface, under the grid.
 */
.section-committee-members > * {
	border-bottom-left-radius: var(--wp--custom--radius--section);
	border-bottom-right-radius: var(--wp--custom--radius--section);
}

.section-committee-members hr.wp-block-separator.committee-members__rule {
	width: 100%;
	max-width: none;
	height: 1px;
	margin: 0 0 40px;
	border: 0;
	background: color-mix(in srgb, var(--wp--preset--color--charcoal) 20%, transparent);
	opacity: 1;
}

.section-committee-members .section-committee-testimonials {
	margin-top: 36px;
}

.wp-block-query.committee-grid {
	margin-top: 50px;
}

.committee-grid .wp-block-post-template {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (width >= 640px) {
	.committee-grid .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (width >= 1024px) {
	.committee-grid .wp-block-post-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.committee-grid .wp-block-post {
	cursor: pointer;
}

/* The card */
.committee-card {
	position: relative;
	aspect-ratio: 419 / 500;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--charcoal);
}

.committee-card > .wp-block-post-featured-image {
	height: 100%;
	margin: 0;
}

.committee-card > .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 500ms var(--wp--custom--ease);
}

.committee-grid .wp-block-post:hover .committee-card > .wp-block-post-featured-image img,
.committee-grid .wp-block-post:focus-within .committee-card > .wp-block-post-featured-image img {
	transform: scale(1.05);
}

/* charcoal scrim from the bottom, gone by 32% up (prototype .portrait-scrim) */
.committee-card::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 10px;
	pointer-events: none;
	background: linear-gradient(0deg, var(--wp--preset--color--charcoal) 0%, color-mix(in srgb, var(--wp--preset--color--charcoal) 0%, transparent) 32%);
}

/* frosted name plate (prototype .glass-panel) */
.committee-card__plate {
	position: absolute;
	inset-inline: 20px;
	bottom: 15px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 19px 21px;
	border-radius: var(--wp--custom--radius--card);
	background: rgba(255, 255, 255, 0.01);
	-webkit-backdrop-filter: blur(50px);
	backdrop-filter: blur(50px);
}

.committee-card__top {
	display: flex;
	align-items: flex-end;
	gap: 10px;
}

.committee-card__top > * {
	margin: 0;
}

.committee-card__top .wp-block-post-title {
	transition: color 300ms var(--wp--custom--ease);
}

.committee-grid .wp-block-post:hover .committee-card__top .wp-block-post-title,
.committee-grid .wp-block-post:focus-within .committee-card__top .wp-block-post-title {
	color: var(--wp--preset--color--salmon) !important;
}

.committee-card__role:empty {
	display: none;
}

.committee-card hr.wp-block-separator.committee-card__rule {
	width: 100%;
	max-width: none;
	height: 1px;
	margin: 0;
	border: 0;
	background: rgba(255, 255, 255, 0.3);
	opacity: 1;
}

.committee-card__bottom {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 30px;
}

.committee-card__credential {
	min-width: 0;
	margin: 0;
}

/* LinkedIn mark over an arrow: decoration, the whole card is the button */
.committee-card__icons {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.committee-card__icons::before,
.committee-card__icons::after {
	content: "";
	background: var(--wp--preset--color--white);
	-webkit-mask: center / contain no-repeat;
	mask: center / contain no-repeat;
}

.committee-card__icons::before {
	width: 21px;
	height: 21px;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Cpath fill-rule='evenodd' d='M0.412 7.068l4.168 0 0 13.93-4.17 0 0.002-13.93z m2.058-7.068c0.67 0 1.31 0.264 1.784 0.735 0.47229 0.46994 0.73782 1.10874 0.73782 1.775 0 0.66626-0.26553 1.30506-0.73782 1.775-0.47423 0.47104-1.11559 0.73528-1.784 0.735-1.39 0-2.47-1.127-2.47-2.51 0-1.383 1.08-2.51 2.47-2.51m4.582 7.068l4.117 0 0 1.947c0.43693-0.64779 1.02661-1.17806 1.717-1.544 0.69213-0.3657 1.4632-0.55658 2.246-0.556l1.133 0c2.625 0 4.735 2.151 4.735 4.712l0 9.374-4.117 0 0-7.53c-0.051-1.588-1.132-2.817-2.728-2.817-1.596 0-2.934 1.229-2.986 2.818l0 7.528-4.117 0 0-13.932z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Cpath fill-rule='evenodd' d='M0.412 7.068l4.168 0 0 13.93-4.17 0 0.002-13.93z m2.058-7.068c0.67 0 1.31 0.264 1.784 0.735 0.47229 0.46994 0.73782 1.10874 0.73782 1.775 0 0.66626-0.26553 1.30506-0.73782 1.775-0.47423 0.47104-1.11559 0.73528-1.784 0.735-1.39 0-2.47-1.127-2.47-2.51 0-1.383 1.08-2.51 2.47-2.51m4.582 7.068l4.117 0 0 1.947c0.43693-0.64779 1.02661-1.17806 1.717-1.544 0.69213-0.3657 1.4632-0.55658 2.246-0.556l1.133 0c2.625 0 4.735 2.151 4.735 4.712l0 9.374-4.117 0 0-7.53c-0.051-1.588-1.132-2.817-2.728-2.817-1.596 0-2.934 1.229-2.986 2.818l0 7.528-4.117 0 0-13.932z'/%3E%3C/svg%3E");
}

.committee-card__icons::after {
	width: 20px;
	height: 20px;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
}

/* The biography: read by team.js, shown in the pop-up only */
.committee-bio {
	display: none;
}

/* The pop-up (built by team.js, appended to <body>; prototype .bio-dialog) */
.bio-dialog {
	width: 92vw;
	max-width: 900px;
	padding: 0;
	border: 0;
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--charcoal);
	opacity: 0;
	transform: translateY(12px);
}

.bio-dialog::backdrop {
	background: rgba(48, 59, 56, 0.62);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.bio-dialog[open] {
	opacity: 1;
	transform: none;
	transition: opacity 260ms var(--wp--custom--ease), transform 260ms var(--wp--custom--ease), overlay 260ms allow-discrete, display 260ms allow-discrete;
}

@starting-style {
	.bio-dialog[open] {
		opacity: 0;
		transform: translateY(12px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bio-dialog,
	.bio-dialog[open] {
		transition: none;
		transform: none;
	}
}

.bio-dialog__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.bio-dialog__photo {
	display: none;
	align-self: start;
}

.bio-dialog__photo img {
	display: block;
	width: 100%;
	aspect-ratio: 419 / 500;
	object-fit: cover;
}

@media (width >= 640px) {
	.bio-dialog__grid {
		grid-template-columns: 240px minmax(0, 1fr);
	}

	.bio-dialog__photo {
		display: block;
	}
}

.bio-dialog__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 30px;
}

.bio-dialog__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}

.bio-dialog__title {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 5px;
}

.bio-dialog__name {
	font-size: var(--wp--preset--font-size--text-4);
	font-weight: 400;
	line-height: 1.1;
}

.bio-dialog__credential {
	color: color-mix(in srgb, var(--wp--preset--color--charcoal) 70%, transparent);
	font-size: var(--wp--preset--font-size--text-8);
	font-weight: 600;
	line-height: 1.3;
}

.bio-dialog__close {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--charcoal);
	border-radius: var(--wp--custom--radius--btn);
	background: none;
	color: var(--wp--preset--color--charcoal);
	cursor: pointer;
	transition: background-color 300ms var(--wp--custom--ease), color 300ms var(--wp--custom--ease);
}

.bio-dialog__close:hover,
.bio-dialog__close:focus-visible {
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--cream);
}

.bio-dialog__rule {
	width: 100%;
	height: 1px;
	margin: 0;
	border: 0;
	background: var(--wp--preset--color--greige);
}

.bio-dialog__text {
	display: flex;
	flex-direction: column;
	gap: 16px;
	font-size: var(--wp--preset--font-size--text-8);
	line-height: 1.3;
}

.bio-dialog__text > * {
	margin: 0;
}

.bio-dialog__soon {
	color: color-mix(in srgb, var(--wp--preset--color--charcoal) 70%, transparent);
	font-size: var(--wp--preset--font-size--text-10);
	font-weight: 600;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
}

.bio-dialog__quote {
	margin: 8px 0 0;
	padding-left: 20px;
	border-left: 2px solid var(--wp--preset--color--coral);
	font-size: var(--wp--preset--font-size--text-7);
	font-style: italic;
	line-height: 1.3;
}

.bio-dialog__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	font-size: var(--wp--preset--font-size--text-10);
	font-weight: 600;
}
