/**
 * Expertise page template. The hero is the shared .page-hero and the closing
 * call to action the shared .cta, both in main.css.
 *
 * 1. Services
 * 2. Photo panel (from 960px, with JavaScript)
 */

/* 1. Services ------------------------------------------------------------- */

.expertise {
	padding: clamp(72px, 9vw, 128px) 0;
	background: var(--c-white);
}

.expertise__inner {
	display: flex;
	align-items: flex-start;
	gap: clamp(48px, 6vw, 96px);
}

.expertise-list {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.expertise-item {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: clamp(40px, 5vw, 72px) 0;
	border-bottom: 1px solid rgba(23, 34, 63, 0.14);
	scroll-margin-top: 110px;
}

.expertise-item:first-child {
	padding-top: 0;
}

.expertise-item:last-child {
	border-bottom: 0;
}

/* Upright 4:5 like the desktop panel; on tablets no taller than the screen. */
.expertise-item__media {
	position: relative;
	width: min(100%, (100vh - 200px) * 0.8);
	aspect-ratio: 4 / 5;
	margin-bottom: 8px;
	overflow: hidden;
	background: #e6e3dc;
}

.expertise-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.expertise-item__no {
	color: var(--c-gold-deep);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
}

.expertise-item__title {
	color: var(--c-navy);
	font-size: clamp(26px, 2.6vw, 36px);
	font-weight: 400;
	line-height: 1.18;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.expertise-item__text {
	color: #3f4659;
	font-size: 16px;
	line-height: 1.85;
	text-wrap: pretty;
}

.expertise-item__link {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 28px;
	margin-top: 6px;
	padding: 6px 0;
	border-bottom: 1px solid var(--c-navy);
	color: var(--c-navy);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	transition: color 0.3s, border-color 0.3s;
}

.expertise-item__link:hover {
	border-bottom-color: var(--c-gold-deep);
	color: var(--c-gold-deep);
}

/* 2. Photo panel ----------------------------------------------------------
 * The panel stays in view beside the list. Photos up to the current one are
 * shown and stacked in order, so the next one wipes up over the last; the
 * current photo also settles from a slight zoom. expertise.js sets the
 * classes, so without it each service keeps its own photo. */

.expertise-visual {
	display: none;
}

@media (min-width: 960px) {
	.js .expertise-visual {
		position: sticky;
		top: 110px;
		display: flex;
		flex: 0 0 42%;
		flex-direction: column;
		gap: 20px;
	}

	.js .expertise-item__media {
		display: none;
	}

	/* The service being read stands out; the others wait dimmed. */
	.js .expertise-item {
		justify-content: center;
		min-height: 62vh;
		opacity: 0.32;
		transition: opacity 0.6s ease;
	}

	.js .expertise-item.is-current {
		opacity: 1;
	}
}

.expertise-visual__frame {
	position: relative;
	aspect-ratio: 4 / 5;
	max-height: calc(100vh - 200px);
	overflow: hidden;
	background: #e6e3dc;
}

.expertise-visual__layer {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	clip-path: inset(100% 0 0 0);
	transition: clip-path 1s var(--ease-drawer);
}

.expertise-visual__layer.is-shown {
	z-index: 1;
	clip-path: inset(0 0 0 0);
}

.expertise-visual__layer.is-current {
	z-index: 2;
}

.expertise-visual__layer .expertise-photo {
	transform: scale(1.1);
	transition: transform 1.4s var(--ease-out);
}

.expertise-visual__layer.is-current .expertise-photo {
	transform: none;
}

.expertise-visual__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 3;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	padding: 24px 28px;
	background: linear-gradient(180deg, rgba(23, 34, 63, 0), rgba(23, 34, 63, 0.72));
}

.expertise-visual__no {
	color: var(--c-white);
	font: italic 400 clamp(56px, 5vw, 84px) / 0.85 var(--font-serif);
}

.expertise-visual__title {
	max-width: 60%;
	color: rgba(255, 255, 255, 0.9);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.45;
	text-align: right;
}

.expertise-visual__ticks {
	display: flex;
	gap: 6px;
}

.expertise-visual__ticks span {
	flex: 1;
	height: 2px;
	background: rgba(23, 34, 63, 0.14);
	transition: background-color 0.5s ease;
}

.expertise-visual__ticks .is-filled {
	background: var(--c-navy);
}

@media (prefers-reduced-motion: reduce) {
	.js .expertise-item,
	.expertise-visual__layer,
	.expertise-visual__layer .expertise-photo,
	.expertise-visual__ticks span {
		transition: none;
	}
}
