/**
 * Block: Page header, rotating team.
 *
 * Builds on .ci-pagehead (block-ci-page-hero.css). Proportions come from a
 * 725px aside: five 125px headshots with 25px gaps, and a crew of up to seven
 * 92px headshots per row with 13.5px gaps.
 */

.ci-pagehead.ci-crewhero .ci-pagehead__inner {
	grid-template-columns: minmax(0, 1fr);
	gap: 3rem;
}

/* Slide text: every version shares one grid cell, so the block never changes height. */
.ci-crewhero__accent,
.ci-crewhero__lead {
	display: grid;
}

.ci-crewhero__accent > *,
.ci-crewhero__lead > * {
	grid-area: 1 / 1;
}

.ci-crewhero__accent > :not(.is-active),
.ci-crewhero__lead > :not(.is-active) {
	visibility: hidden;
}

.ci-crewhero__accent em {
	display: block;
	color: var(--wp--preset--color--sky);
	font-style: normal;
}

/* The crew. */
.ci-crew {
	width: 100%;
	max-width: 45.3125rem;
}

.ci-crew__featured {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0 3.45%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ci-crew__person {
	margin: 0;
}

.ci-crew img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: top;
	background-color: rgb(255 255 255 / .06);
	filter: grayscale(1);
	transition: filter .5s var(--ci-ease);
}

.ci-crew__person:hover img {
	filter: none;
}

.ci-crew__person figcaption {
	display: grid;
	gap: .125rem;
	padding-top: .625rem;
	line-height: 1.3;
}

.ci-crew__person strong {
	color: var(--wp--preset--color--white);
	font-size: .8125rem;
	font-weight: 600;
}

.ci-crew__person figcaption span {
	color: rgb(255 255 255 / .65);
	font-size: .6875rem;
}

.ci-crew__stage {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 1.86%;
	margin: 1.5625rem 0 0;
	padding: 0;
	list-style: none;
}

.ci-crew__tile[hidden] {
	display: none;
}

/* With the script running, tiles are placed by transform. */
.ci-crew__stage.is-live {
	position: relative;
	display: block;
	height: var(--ci-crew-height, 15rem);
}

.ci-crew__stage.is-live .ci-crew__tile {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--ci-crew-tile, 13%);
	will-change: transform, opacity;
}

/* Pause / play with a ring that fills over each slide. */
.ci-crew__toggle {
	position: relative;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: 1.25rem 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--wp--preset--color--white);
	cursor: pointer;
}

.ci-crew__toggle[hidden] {
	display: none;
}

.ci-crew__toggle::before,
.ci-crew__toggle::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 2px;
	height: .625rem;
	background-color: currentcolor;
	transform: translateY(-50%);
}

.ci-crew__toggle::before {
	left: calc(50% - 4px);
}

.ci-crew__toggle::after {
	left: calc(50% + 2px);
}

.ci-crew__toggle[aria-pressed="true"]::before {
	left: calc(50% - 3px);
	width: 0;
	height: 0;
	border-block: 5px solid transparent;
	border-inline-start: 8px solid currentcolor;
	background: none;
}

.ci-crew__toggle[aria-pressed="true"]::after {
	display: none;
}

.ci-crew__toggle:focus-visible {
	outline: var(--ci-focus);
	outline-offset: 3px;
}

.ci-crew__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.ci-crew__ring circle {
	fill: none;
	stroke: rgb(255 255 255 / .25);
	stroke-width: 1.5;
}

.ci-crew__ring .ci-crew__progress {
	stroke: var(--wp--preset--color--sky);
	stroke-dasharray: 100;
	stroke-dashoffset: calc(100 - var(--ci-crew-progress, 0) * 100);
}

@media (max-width: 599px) {
	.ci-crew__person figcaption {
		display: none;
	}
}

@media (min-width: 1200px) {
	.ci-pagehead.ci-crewhero .ci-pagehead__inner {
		grid-template-columns: minmax(28rem, 1fr) minmax(0, 45.3125rem);
		gap: 4rem;
	}

	.ci-crewhero .ci-pagehead__title {
		max-width: none;
		font-size: clamp(2.375rem, 3.6vw, 3.75rem);
	}
}
