/* Projects Swiper + lightbox */

.emm-gallery {
	--emm-slide-max: 606px;
	--emm-slide-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.emm-gallery__panel {
	overflow: hidden;
}

.emm-gallery__panel--3d {
	overflow: visible;
}

.emm-gallery__swiper {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	padding-bottom: 40px;
}

.emm-gallery__swiper--3d {
	overflow: visible;
	padding: 12px 36px 48px;
}

.emm-gallery__swiper .swiper-slide {
	height: auto;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	align-items: stretch;
	overflow: hidden;
	border-radius: var(--emm-radius-img);
}

.emm-gallery__swiper .emm-lightbox-item {
	position: relative;
	display: block;
	width: 100%;
	max-width: min(100%, var(--emm-slide-max));
	height: auto;
	aspect-ratio: 303 / 228;
	overflow: hidden;
	border-radius: var(--emm-radius-img);
	background: var(--emm-white);
	cursor: zoom-in;
}

.emm-gallery__swiper .emm-lightbox-item img,
.emm-gallery__swiper img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	aspect-ratio: auto;
	object-fit: cover;
	border-radius: inherit;
}

.emm-gallery[data-emm-swiper-motion="subtle"] .emm-gallery__swiper .emm-lightbox-item img,
.emm-gallery[data-emm-swiper-motion="kenburns"] .emm-gallery__swiper .emm-lightbox-item img,
.emm-gallery[data-emm-swiper-motion="rise"] .emm-gallery__swiper .emm-lightbox-item img {
	transition: transform 500ms var(--emm-slide-ease);
}

.emm-gallery[data-emm-swiper-motion="subtle"] .emm-gallery__swiper .emm-lightbox-item:hover img,
.emm-gallery[data-emm-swiper-motion="subtle"] .emm-gallery__swiper .emm-lightbox-item:focus-visible img,
.emm-gallery[data-emm-swiper-motion="kenburns"] .emm-gallery__swiper .emm-lightbox-item:hover img,
.emm-gallery[data-emm-swiper-motion="kenburns"] .emm-gallery__swiper .emm-lightbox-item:focus-visible img,
.emm-gallery[data-emm-swiper-motion="rise"] .emm-gallery__swiper .emm-lightbox-item:hover img,
.emm-gallery[data-emm-swiper-motion="rise"] .emm-gallery__swiper .emm-lightbox-item:focus-visible img {
	transform: scale(1.035);
}

.emm-gallery[data-emm-swiper-motion="kenburns"] .swiper-slide-active .emm-lightbox-item img {
	animation: emm-slide-ken 14s var(--emm-slide-ease) infinite alternate;
}

.emm-gallery[data-emm-swiper-motion="rise"] .swiper-slide {
	transition: transform 520ms var(--emm-slide-ease), opacity 520ms var(--emm-slide-ease);
	transform: scale(0.97);
	opacity: 0.78;
}

.emm-gallery[data-emm-swiper-motion="rise"] .swiper-slide-active {
	transform: scale(1);
	opacity: 1;
	z-index: 1;
}

@keyframes emm-slide-ken {
	from {
		transform: scale(1);
	}

	to {
		transform: scale(1.06);
	}
}

.emm-lightbox-item {
	cursor: zoom-in;
}

.emm-lightbox-item img {
	width: 100%;
	height: 100%;
	aspect-ratio: 303 / 228;
	object-fit: cover;
	border-radius: var(--emm-radius-img);
}

.emm-about__photo .emm-lightbox-item,
.emm-feature__media .emm-lightbox-item {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	border-radius: inherit;
	z-index: 0;
}

.emm-about__photo .emm-lightbox-item img,
.emm-feature__media .emm-lightbox-item img {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
	transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.emm-about__photo .emm-lightbox-item:hover img,
.emm-about__photo .emm-lightbox-item:focus-visible img,
.emm-feature__media .emm-lightbox-item:hover img,
.emm-feature__media .emm-lightbox-item:focus-visible img {
	transform: scale(1.03);
}

.emm-gallery__nav {
	position: absolute;
	top: calc(50% - 20px);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--emm-gold-grad);
	color: var(--emm-white);
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(16, 24, 40, 0.18);
	transition: transform 280ms var(--emm-slide-ease, cubic-bezier(0.22, 1, 0.36, 1)), opacity 280ms ease;
}

.emm-gallery__nav:hover,
.emm-gallery__nav:focus-visible {
	transform: scale(1.08);
}

.emm-gallery__nav:active {
	transform: scale(0.94);
}

.emm-gallery__nav[hidden] {
	display: none;
}

.emm-gallery__prev {
	left: 8px;
}

.emm-gallery__next {
	right: 8px;
}

.emm-gallery__swiper--3d .swiper-slide {
	overflow: visible;
}

.emm-gallery__nav.swiper-button-lock,
.emm-gallery__nav.swiper-button-disabled {
	opacity: 0;
	pointer-events: none;
}

.emm-gallery__dots {
	position: relative;
	margin-top: 8px;
	text-align: center;
}

.emm-gallery__dots[hidden] {
	display: none;
}

.emm-gallery__dots .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: #d0d5dd;
	opacity: 1;
	border-radius: 4px;
	transition:
		width 280ms var(--emm-slide-ease, cubic-bezier(0.22, 1, 0.36, 1)),
		background-color 280ms ease;
}

.emm-gallery__dots .swiper-pagination-bullet-active {
	width: 18px;
	background: var(--emm-gold);
}

@media (min-width: 1025px) {
	.emm-gallery[data-emm-swiper-desktop="0"] .emm-gallery__nav,
	.emm-gallery[data-emm-swiper-desktop="0"] .emm-gallery__dots {
		display: none;
	}

	.emm-gallery[data-emm-swiper-desktop="0"] .emm-gallery__swiper {
		overflow: visible;
		padding-bottom: 0;
	}

	.emm-gallery[data-emm-swiper-desktop="0"] .swiper-wrapper {
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
		transform: none !important;
	}

	.emm-gallery[data-emm-swiper-desktop="0"] .swiper-slide {
		width: auto !important;
		margin: 0 !important;
	}

	.emm-gallery[data-emm-swiper-desktop="0"] .emm-lightbox-item {
		max-width: none;
	}
}

@media (min-width: 1322px) {
	.emm-gallery[data-emm-swiper-desktop="0"] .swiper-wrapper {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 24px;
	}
}

.emm-reviews__carousel {
	position: relative;
	max-width: var(--emm-content-wide);
	margin: 0 auto;
	width: 100%;
}

.emm-reviews__swiper {
	width: 100%;
	overflow: hidden;
	padding: 8px 4px 48px;
}

@media (min-width: 1025px) {
	.emm-reviews__swiper {
		padding-inline: 52px;
	}
}

.emm-reviews__swiper--3d {
	overflow: visible;
	padding-inline: 36px;
}

.emm-reviews__swiper .swiper-slide {
	height: auto;
	display: flex;
	box-sizing: border-box;
}

.emm-reviews__swiper .emm-quote {
	width: 100%;
	max-width: none;
	height: 100%;
}

.emm-reviews .emm-gallery__prev {
	left: 0;
}

.emm-reviews .emm-gallery__next {
	right: 0;
}

.emm-reviews[data-emm-swiper-motion="subtle"] .swiper-slide,
.emm-reviews__carousel[data-emm-swiper-motion="subtle"] .swiper-slide {
	transition: transform 500ms var(--emm-slide-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.emm-reviews__carousel[data-emm-swiper-motion="rise"] .swiper-slide {
	transition: transform 520ms var(--emm-slide-ease, cubic-bezier(0.22, 1, 0.36, 1)), opacity 520ms ease;
	transform: scale(0.97);
	opacity: 0.82;
}

.emm-reviews__carousel[data-emm-swiper-motion="rise"] .swiper-slide-active {
	transform: scale(1);
	opacity: 1;
}

body.emm-lightbox-open {
	overflow: hidden;
}

.emm-lightbox {
	--emm-lb-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--emm-lb-ms: 360ms;
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	padding-top: max(24px, env(safe-area-inset-top));
	padding-right: max(24px, env(safe-area-inset-right));
	padding-bottom: max(24px, env(safe-area-inset-bottom));
	padding-left: max(24px, env(safe-area-inset-left));
	box-sizing: border-box;
}

.emm-lightbox[hidden] {
	display: none;
}

.emm-lightbox__backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	padding: 0;
	background: rgba(16, 10, 12, 0.92);
	cursor: pointer;
	opacity: 0;
	transition: opacity var(--emm-lb-ms) ease;
}

.emm-lightbox.is-open .emm-lightbox__backdrop {
	opacity: 1;
}

.emm-lightbox__close {
	position: absolute;
	top: max(16px, env(safe-area-inset-top));
	right: max(16px, env(safe-area-inset-right));
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: var(--emm-white);
	cursor: pointer;
	opacity: 0;
	transform: translate(6px, -6px) scale(0.92);
	transition:
		opacity var(--emm-lb-ms) var(--emm-lb-ease),
		transform var(--emm-lb-ms) var(--emm-lb-ease),
		background-color var(--emm-duration) var(--emm-ease),
		background-image var(--emm-duration) var(--emm-ease);
}

.emm-lightbox.is-open .emm-lightbox__close {
	opacity: 1;
	transform: none;
	transition-delay: 80ms;
}

.emm-lightbox.is-open .emm-lightbox__close:hover,
.emm-lightbox.is-open .emm-lightbox__close:focus-visible,
.emm-lightbox.is-open .emm-lightbox__close:active {
	transition-delay: 0ms;
}

.emm-lightbox__close svg {
	display: block;
	transition: transform var(--emm-lb-ms) var(--emm-lb-ease);
}

.emm-lightbox__close:hover,
.emm-lightbox__close:focus-visible {
	background-image: var(--emm-gold-grad);
	background-color: transparent;
	color: var(--emm-white);
	transform: scale(1.06);
}

.emm-lightbox__close:hover svg,
.emm-lightbox__close:focus-visible svg {
	transform: rotate(90deg);
}

.emm-lightbox__close:active {
	transform: scale(0.94);
}

.emm-lightbox__close:focus-visible,
.emm-lightbox__ctrl:focus-visible {
	outline: 2px solid var(--emm-gold);
	outline-offset: 2px;
}

.emm-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 0;
	padding-inline: 52px;
	box-sizing: border-box;
}

.emm-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: fit-content;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	opacity: 0;
	transform: translateY(16px) scale(0.975);
	transition:
		opacity 420ms var(--emm-lb-ease),
		transform 420ms var(--emm-lb-ease);
}

.emm-lightbox.is-open .emm-lightbox__figure {
	opacity: 1;
	transform: none;
	transition-delay: 50ms;
}

.emm-lightbox__frame {
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: 100%;
	min-height: 0;
}

.emm-lightbox__shot {
	position: relative;
	display: inline-block;
	max-width: 100%;
	line-height: 0;
}

.emm-lightbox__shot img {
	display: block;
	width: auto;
	height: auto;
	max-width: min(100%, calc(100vw - 48px - 104px));
	max-height: calc(100dvh - 48px - 72px);
	object-fit: contain;
	border-radius: var(--emm-radius-img);
	background: var(--emm-black);
	transition:
		opacity 280ms var(--emm-lb-ease),
		transform 320ms var(--emm-lb-ease),
		width 320ms var(--emm-lb-ease),
		height 320ms var(--emm-lb-ease),
		filter 320ms ease;
}

.emm-lightbox__shot img:not(.is-sized) {
	transition-property: opacity, transform, filter;
}

.emm-lightbox__shot img.is-drag {
	transition: none;
	transform: translateX(var(--emm-lb-drag, 0px));
}

.emm-lightbox__shot img.is-leaving {
	opacity: 0;
	transform: translateX(var(--emm-lb-out, -28px));
	filter: blur(4px);
}

.emm-lightbox__shot img.is-enter {
	opacity: 0;
	transform: translateX(var(--emm-lb-in, 28px));
	filter: blur(4px);
}

.emm-lightbox__meta {
	flex: 0 0 auto;
	width: 100%;
	margin-top: 16px;
	text-align: center;
	font-family: var(--emm-font);
	line-height: 1.4;
	opacity: 0;
	transform: translateY(8px);
	transition:
		opacity 360ms var(--emm-lb-ease),
		transform 360ms var(--emm-lb-ease);
}

.emm-lightbox.is-open .emm-lightbox__meta {
	opacity: 1;
	transform: none;
	transition-delay: 140ms;
}

.emm-lightbox__meta.is-swap {
	opacity: 0;
	transform: translateY(6px);
	transition-delay: 0ms;
	transition-duration: 180ms;
}

.emm-lightbox__caption {
	margin: 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
}

.emm-lightbox__caption[hidden] {
	display: none;
}

.emm-lightbox__counter {
	margin: 8px 0 0;
	color: var(--emm-muted-3);
	font-size: 13px;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: 0.06em;
	font-variant-numeric: tabular-nums;
}

.emm-lightbox__counter[hidden] {
	display: none;
}

.emm-lightbox__counter em {
	font-style: normal;
	color: var(--emm-gold);
	font-weight: 700;
	display: inline-block;
	transition: transform 280ms var(--emm-lb-ease);
}

.emm-lightbox__counter.is-tick em {
	transform: scale(1.18);
}

.emm-lightbox__ctrl {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-image: var(--emm-gold-grad);
	color: var(--emm-white);
	cursor: pointer;
	box-shadow: var(--emm-shadow-card);
	opacity: 0;
	transition:
		opacity var(--emm-lb-ms) var(--emm-lb-ease),
		transform var(--emm-lb-ms) var(--emm-lb-ease);
}

.emm-lightbox__ctrl--prev {
	left: -52px;
	transform: translate(-14px, -50%);
}

.emm-lightbox__ctrl--next {
	right: -52px;
	transform: translate(14px, -50%);
}

.emm-lightbox.is-open .emm-lightbox__ctrl--prev,
.emm-lightbox.is-open .emm-lightbox__ctrl--next {
	opacity: 1;
	transform: translateY(-50%);
}

.emm-lightbox.is-open .emm-lightbox__ctrl--prev {
	transition-delay: 120ms;
}

.emm-lightbox.is-open .emm-lightbox__ctrl--next {
	transition-delay: 160ms;
}

.emm-lightbox.is-open .emm-lightbox__ctrl--prev:hover,
.emm-lightbox.is-open .emm-lightbox__ctrl--prev:focus-visible {
	transform: translateY(-50%) scale(1.08);
	transition-delay: 0ms;
}

.emm-lightbox.is-open .emm-lightbox__ctrl--next:hover,
.emm-lightbox.is-open .emm-lightbox__ctrl--next:focus-visible {
	transform: translateY(-50%) scale(1.08);
	transition-delay: 0ms;
}

.emm-lightbox.is-open .emm-lightbox__ctrl--prev:active,
.emm-lightbox.is-open .emm-lightbox__ctrl--next:active,
.emm-lightbox.is-open .emm-lightbox__ctrl.is-press {
	transform: translateY(-50%) scale(0.92);
	transition-duration: 80ms;
}

@media (max-width: 1024px) {
	.emm-lightbox {
		padding: 16px;
		padding-top: max(16px, env(safe-area-inset-top));
		padding-right: max(16px, env(safe-area-inset-right));
		padding-bottom: max(16px, env(safe-area-inset-bottom));
		padding-left: max(16px, env(safe-area-inset-left));
	}

	.emm-lightbox__dialog {
		padding-inline: 8px;
	}

	.emm-lightbox__shot img {
		max-width: min(100%, calc(100vw - 32px - 16px));
		max-height: calc(100dvh - 32px - 72px);
	}

	.emm-lightbox__ctrl--prev {
		left: 8px;
	}

	.emm-lightbox__ctrl--next {
		right: 8px;
	}
}

@media (max-width: 640px) {
	.emm-gallery__prev {
		left: 0;
	}

	.emm-gallery__next {
		right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.emm-lightbox,
	.emm-lightbox__backdrop,
	.emm-lightbox__close,
	.emm-lightbox__figure,
	.emm-lightbox__shot img,
	.emm-lightbox__meta,
	.emm-lightbox__ctrl,
	.emm-lightbox__counter em {
		transition: none !important;
		filter: none !important;
		animation: none !important;
	}

	.emm-gallery__swiper .emm-lightbox-item img,
	.emm-gallery__nav,
	.emm-gallery__dots .swiper-pagination-bullet,
	.emm-gallery[data-emm-swiper-motion="rise"] .swiper-slide {
		transition: none !important;
		animation: none !important;
	}

	.emm-gallery[data-emm-swiper-motion="rise"] .swiper-slide,
	.emm-gallery[data-emm-swiper-motion="rise"] .swiper-slide-active {
		transform: none;
		opacity: 1;
	}

	.emm-lightbox__figure,
	.emm-lightbox__close,
	.emm-lightbox__close svg,
	.emm-lightbox__meta,
	.emm-lightbox__ctrl--prev,
	.emm-lightbox__ctrl--next {
		opacity: 1;
		transform: none;
	}

	.emm-lightbox.is-open .emm-lightbox__ctrl--prev,
	.emm-lightbox.is-open .emm-lightbox__ctrl--next {
		transform: translateY(-50%);
	}
}
