.sms-projects__wrap {
	--sms-list-w: 55%;
	--sms-zoom: 1.04;
	width: 100%;
	max-width: 100%;
}

.sms-projects__head {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-end;
	justify-content: space-between;
}

.sms-projects__head > * {
	min-width: 0;
}

.sms-projects__heading,
.sms-projects__intro {
	margin: 0;
	overflow-wrap: break-word;
	text-wrap: pretty;
}

/* ---------- shared media ---------- */

.sms-projects__media {
	position: relative;
	width: 100%;
	min-width: 0;
	overflow: hidden;
}

.sms-projects__figure {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	transition: opacity .6s ease;
}

.sms-projects__figure.is-active {
	position: relative;
	opacity: 1;
	height: 100%;
}

.sms-projects__figure[hidden] {
	display: none;
}

.sms-projects__panel {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.sms-projects__panel[hidden],
.sms-projects__figure[hidden],
[data-sms-panel][hidden] {
	display: none !important;
}

.sms-projects__head-left {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.sms-projects__caption-main {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
	flex: 1 1 320px;
}

.sms-projects__project-link {
	color: inherit;
	text-decoration: none;
}

.sms-projects__preview-meta {
	padding-top: 18px;
}

.sms-projects__preview-panel {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sms-projects__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.4s cubic-bezier(.2, .7, .2, 1);
}

@media (hover: hover) {
	.sms-projects__media:hover .sms-projects__figure.is-active .sms-projects__img {
		transform: scale(var(--sms-zoom));
	}
}

/* ---------- layout: stepper ---------- */

.sms-projects--stepper .sms-projects__stage {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
}

.sms-projects--stepper .sms-projects__media {
	position: absolute;
	inset: 0;
	height: 100%;
}

.sms-projects--stepper .sms-projects__figure,
.sms-projects--stepper .sms-projects__figure.is-active {
	position: absolute;
	inset: 0;
	height: 100%;
}

.sms-projects__scrim {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.sms-projects__overlay {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 24px;
	width: 100%;
	min-height: inherit;
}

.sms-projects__counter {
	align-self: flex-start;
}

.sms-projects__caption {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-end;
	justify-content: space-between;
}

.sms-projects__caption > * {
	min-width: 0;
}

.sms-projects__title {
	margin: 0;
	overflow-wrap: break-word;
	text-wrap: pretty;
}

.sms-projects__facts {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

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

.sms-projects__fact-label {
	display: block;
}

.sms-projects__fact-value {
	display: block;
	overflow-wrap: break-word;
}

.sms-projects__nav {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: none;
}

.sms-projects__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 56px;
	height: 56px;
	padding: 0;
	background: none;
	border: 1px solid currentColor;
	border-radius: 50%;
	cursor: pointer;
	appearance: none;
	line-height: 1;
	transition: color .3s ease, background-color .3s ease, border-color .3s ease;
}

.sms-projects__arrow:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 3px;
}

.sms-projects__arrow svg {
	width: 40%;
	height: auto;
	display: block;
}

.sms-projects__rail {
	display: flex;
	gap: 2px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sms-projects__dot {
	flex: 1 1 0;
	min-width: 0;
	height: 2px;
	padding: 0;
	background: currentColor;
	border: 0;
	opacity: .25;
	cursor: pointer;
	appearance: none;
	transition: opacity .3s ease;
}

.sms-projects__dot.is-active {
	opacity: 1;
}

.sms-projects__dot:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 4px;
}

/* ---------- layout: index ---------- */

.sms-projects--index .sms-projects__body {
	display: grid;
	grid-template-columns: var(--sms-list-w) minmax(0, 1fr);
	align-items: start;
	width: 100%;
}

.sms-projects--index .sms-projects__body > * {
	min-width: 0;
}

.sms-projects__rows {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sms-projects__row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 6px 20px;
	align-items: baseline;
	width: 100%;
	min-height: 44px;
	margin: 0;
	background: none;
	border: 0;
	border-radius: 0;
	text-align: left;
	cursor: pointer;
	appearance: none;
	transition: color .3s ease, background-color .3s ease;
}

.sms-projects__row:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 3px;
}

.sms-projects__row-num,
.sms-projects__row-title,
.sms-projects__row-place {
	display: block;
	min-width: 0;
	overflow-wrap: break-word;
}

.sms-projects__row-place {
	text-align: right;
}

.sms-projects__preview {
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 24px;
}

.sms-projects__preview-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

@media (max-width: 767px) {
	.sms-projects__preview {
		position: static;
	}

	.sms-projects__row {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.sms-projects__row-place {
		grid-column: 2;
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sms-projects__figure,
	.sms-projects__img,
	.sms-projects__row,
	.sms-projects__arrow {
		transition-duration: .01ms;
	}
}
