/**
 * Our Team. Desktop: the heading on the left, held 140px from the top while the two columns of
 * people on the right scroll. Tablet and phone: heading above, still two columns.
 */

.as-team {
	display: flex;
	justify-content: center;
	padding: 196px 32px 120px;
}

.as-team__inner {
	display: flex;
	gap: 80px;
	align-items: flex-start;
	width: 100%;
	max-width: var(--as-container-narrow);
}

.as-team__intro {
	position: sticky;
	top: 140px;
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 32px;
	min-width: 0;
}

.as-team__title {
	margin: 0;
	font-size: 56px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: -0.02em;
	color: var(--as-page-ink);
}

.as-team__lead {
	max-width: 468px;
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	letter-spacing: -0.01em;
	color: var(--as-page-muted);
}

.as-team__list {
	display: grid;
	flex: 0 0 568px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.as-person {
	/* Taller crop so headshots fill the card with less empty band around them (client Nov 2026). */
	--as-card-photo-h: 400px;
}

.as-person__meta {
	display: flex;
	flex-direction: column;
}

.as-person__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-left: 24px;
}

.as-person__name,
.as-person__role {
	margin: 0;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.as-person__name {
	font-size: 18px;
	font-weight: 600;
	color: var(--as-page-ink);
}

.as-person__role {
	font-size: 14px;
	color: var(--as-page-muted);
}

@media (max-width: 1199px) {
	.as-team {
		padding: 160px 32px 96px;
	}

	.as-team__inner {
		flex-direction: column;
		gap: 48px;
		align-items: stretch;
	}

	.as-team__intro {
		position: static;
		flex: 0 0 auto;
		gap: 20px;
	}

	.as-team__list {
		flex: 0 0 auto;
	}

	.as-person {
		--as-card-photo-h: 500px;
	}
}

@media (max-width: 809px) {
	.as-team {
		padding: 128px 20px 72px;
	}

	.as-team__inner {
		gap: 40px;
	}

	.as-team__intro {
		gap: 16px;
	}

	.as-team__title {
		font-size: 40px;
	}

	.as-team__list {
		gap: 28px 12px;
	}

	.as-person {
		--as-card-photo-h: 260px;

		gap: 10px;
	}

	.as-person__text {
		padding-left: 16px;
	}

	.as-person__name {
		font-size: 15px;
	}

	.as-person__role {
		font-size: 12px;
	}
}

/*
 * The detail panel. Measured from the design with a person open: a 640px sheet fixed to the left edge,
 * padded 140/56/80, sliding in from 120px left over 300ms; the page behind is dimmed by a navy veil
 * that stops under the header, while the sheet itself covers the header.
 */
.as-person {
	position: relative;
}

.as-person__open {
	position: absolute;
	inset: 0;
	padding: 0;
	cursor: pointer;
	background: transparent;
	border: 0;
}

.as-person__open:focus-visible {
	outline: 2px solid var(--as-red);
	outline-offset: 4px;
}

.as-person-panel[hidden] {
	display: none;
}

.as-person-panel__overlay {
	position: fixed;
	inset: 0;
	z-index: 15;
	background: rgb(16 26 46 / 30%);
	opacity: 0;
	transition: opacity 0.3s ease-out;
}

.as-person-panel__sheet {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 30;
	display: flex;
	flex-direction: column;
	gap: 32px;
	align-items: flex-start;
	box-sizing: border-box;
	width: 640px;
	max-width: 100%;
	padding: 140px 56px 80px;
	overflow-y: auto;
	overscroll-behavior: contain;
	color: var(--as-page-ink);
	background: #e3e3e3;
	opacity: 0;
	transform: translateX(-120px);
	transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.as-person-panel__sheet:focus {
	outline: none;
}

.as-person-panel.is-open .as-person-panel__overlay,
.as-person-panel.is-open .as-person-panel__sheet {
	opacity: 1;
}

.as-person-panel.is-open .as-person-panel__sheet {
	transform: none;
}

.as-person-panel__back,
.as-person-panel__contact {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	box-sizing: border-box;
	color: var(--as-page-ink);
	text-decoration: none;
	cursor: pointer;
	background: transparent;
	border: 0;
	border-radius: 30px;
	box-shadow: inset 0 0 0 1px var(--as-page-ink);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.as-person-panel__back {
	padding: 14px 22px;
}

.as-person-panel__back:hover,
.as-person-panel__contact:hover {
	background: rgb(16 26 46 / 6%);
}

.as-person-panel__back:focus-visible,
.as-person-panel__contact:focus-visible {
	outline: 2px solid var(--as-red);
	outline-offset: 2px;
}

.as-person-panel__icon {
	flex: 0 0 auto;
	display: block;
}

.as-person-panel__body {
	display: flex;
	flex-direction: column;
	gap: 32px;
	align-self: stretch;
}

.as-person-panel__heading {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.as-person-panel__name {
	margin: 0;
	font-size: 56px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.as-person-panel__role {
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: -0.02em;
}

.as-person-panel__bio {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: -0.01em;
}

.as-person-panel__bio > * {
	margin: 0;
}

.as-person-panel__bio > * + * {
	margin-top: 16px;
}

.as-person-panel__bio h4 {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
}

.as-person-panel__bio h4 + ul,
.as-person-panel__bio h4 + ol {
	margin-top: 0;
}

.as-person-panel__bio ul,
.as-person-panel__bio ol {
	padding-left: 18px;
	list-style: disc;
}

.as-person-panel__contacts {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.as-person-panel__contacts:empty {
	display: none;
}

.as-person-panel__contact {
	padding: 14px 24px;
	letter-spacing: -0.01em;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
}

html.as-panel-open {
	overflow: hidden;
}

@media (max-width: 1199px) and (min-width: 810px) {
	.as-person-panel__sheet {
		width: 560px;
		padding: 120px 48px 64px;
	}
}

@media (max-width: 809px) {
	.as-person-panel__sheet {
		gap: 24px;
		width: 100%;
		padding: 96px 20px 48px;
		transform: translateX(-96px);
	}

	.as-person-panel__body {
		gap: 24px;
	}

	.as-person-panel__name {
		font-size: 36px;
	}

	.as-person-panel__contacts {
		gap: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.as-person-panel__overlay,
	.as-person-panel__sheet {
		transition: none;
	}
}
