.case-shell {
	display: flex;
	width: min(1818px, calc(100% - 102px));
	margin: 0 auto;
	padding: 50px 0 160px;
	flex-direction: column;
	gap: 92px;
}

.case-shell > .home-header {
	width: min(1608px, 100%);
	margin: 0 auto;
}

.case-article {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.case-article__back {
	align-self: center;
	margin: 0 0 42px;
	font-size: 22px;
	font-weight: 300;
	line-height: 1;
}

.case-article__back::before {
	content: '←';
	margin-right: 12px;
}

.case-article h1 {
	width: 100%;
	margin: 0 0 55px;
	font-family: 'Bebas Neue', sans-serif;
	font-size: clamp(110px, 9.4vw, 180px);
	font-weight: 700;
	line-height: 0.82;
	text-align: center;
	text-transform: uppercase;
}

.case-article__hero {
	display: block;
	width: min(1608px, 100%);
	overflow: hidden;
	border-radius: 32px;
}

.case-article__hero img {
	display: block;
	width: 100%;
	height: auto;
}

video.case-article__hero {
	aspect-ratio: 1609 / 640;
	object-fit: cover;
}

.case-article__lead {
	display: grid;
	width: min(1608px, 100%);
	grid-template-columns: minmax(260px, 0.58fr) minmax(0, 1fr);
	column-gap: 72px;
	margin-top: 60px;
	align-items: start;
}

.case-article__task {
	display: flex;
	width: min(1060px, 100%);
	margin-top: 108px;
	flex-direction: column;
	gap: 26px;
}

.case-article__lead a {
	font-size: 30px;
	font-weight: 300;
	line-height: 1.2;
	text-decoration: underline;
	text-underline-offset: 5px;
}

.case-article__lead p,
.case-article__task p,
.case-article__content > p,
.case-article__content > .editorjs-block-background > p {
	margin: 0;
	font-size: 30px;
	font-weight: 200;
	line-height: 1.28;
}

.case-article__task h2 {
	margin: 0;
	font-family: 'Geologica', sans-serif;
	font-size: 40px;
	font-weight: 400;
	line-height: normal;
}

.case-article__content {
	display: flex;
	width: 100%;
	margin-top: 90px;
	flex-direction: column;
	align-items: center;
	gap: 92px;
}

.case-article__content > .editorjs-block-background {
	display: flex !important;
	width: 100%;
	padding-block: 92px;
	flex-direction: column;
	align-items: center;
	gap: 92px;
}

.case-article__content > .editorjs-block-background + .editorjs-block-background {
	margin-top: -92px;
	padding-top: 0;
}

.case-article__content > p,
.case-article__content > .editorjs-block-background > p {
	width: min(1060px, 100%);
}

.case-editor-image {
	width: 100%;
	margin: 0;
}

.case-editor-image--single {
	width: min(1608px, 100%);
}

.case-editor-image img {
	width: 100%;
	height: auto;
}

.case-editor-image figcaption {
	margin-top: 12px;
	font-size: 16px;
	color: #666;
}

.case-editor-gallery {
	width: min(1608px, 100%);
	position: relative;
}

.case-editor-gallery__track {
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

.case-editor-gallery__track:not(.swiper-initialized) {
	overflow-x: auto;
}

.case-editor-gallery__track .swiper-wrapper {
	transition-timing-function: linear;
}

.case-editor-gallery__slide {
	width: min(var(--gallery-width), 80vw);
	height: var(--gallery-height);
	flex-shrink: 0;
}

.case-editor-gallery__slide img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 8px;
	object-fit: cover;
}

.case-editor-gallery--auto-height .swiper-wrapper {
	align-items: flex-start;
}

.case-editor-gallery--auto-height .case-editor-gallery__slide img {
	height: auto;
}

.case-editor-gallery--phone {
	width: min(1584px, 100%);
	min-height: 655px;
}

.case-editor-gallery--phone .case-editor-gallery__track {
	position: relative;
	top: 185px;
}

.case-editor-gallery__phone {
	position: absolute;
	z-index: 2;
	top: 0;
	left: 65.3%;
	width: 296px;
	height: 644px;
	border: 10px solid #000;
	border-radius: 40px;
	pointer-events: none;
}

.case-editor-gallery__phone:not(.case-editor-gallery__phone--custom)::before {
	position: absolute;
	z-index: 2;
	top: -10px;
	left: 50%;
	width: 132px;
	height: 22px;
	border-radius: 0 0 20px 20px;
	background: #000;
	content: '';
	transform: translateX(-50%);
}

.case-editor-gallery__phone--custom {
	border: 0;
	border-radius: 0;
}

.case-editor-gallery__phone-header {
	position: absolute;
	top: 26px;
	left: 0;
	width: 100%;
	height: 53px;
	object-fit: cover;
}

.case-editor-gallery__phone-frame {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.case-next {
	display: flex;
	width: 100%;
	justify-content: center;
}

.home-v2 a.case-next__button {
	display: inline-flex;
	width: 373px;
	height: 68px;
	padding: 20px 40px;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border-radius: 200px;
	background: var(--home-accent);
	color: #fff;
	font: 400 24px/1 'TT Days Sans', sans-serif;
	white-space: nowrap;
}

.case-next__button img {
	width: 24px;
	height: 20px;
}

@media (max-width: 767px) {
	.case-shell {
		width: 100%;
		padding: 50px 20px 0;
		gap: 20px;
	}

	.case-article__back {
		display: flex;
		margin: 0 0 30px;
		align-self: center;
		align-items: center;
		font-size: 20px;
		line-height: 25px;
	}

	.case-article h1 {
		margin-bottom: 30px;
		font-size: 48px;
		line-height: 1;
	}

	.case-article__hero {
		height: 320px;
		border-radius: 32px;
	}

	.case-article__hero img {
		height: 100%;
		object-fit: cover;
	}

	video.case-article__hero {
		aspect-ratio: auto;
	}

	.case-editor-image {
		width: calc(100% + 40px);
	}

	.case-editor-image--single {
		width: 100%;
	}

	.case-editor-gallery__slide {
		width: min(var(--gallery-width), 70vw);
		height: min(var(--gallery-height), 80vh);
	}

	.case-editor-gallery--phone {
		min-height: 600px;
	}

	.case-editor-gallery__phone {
		left: 50%;
		width: min(296px, 75vw);
		height: min(644px, 570px);
		transform: translateX(-50%);
	}

	.case-article__lead {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.case-article__lead {
		margin-top: 30px;
	}

	.case-article__lead a {
		font-size: 30px;
		line-height: 1.2;
	}

	.case-article__lead p {
		font-size: 24px;
		line-height: 1.25;
	}

	.case-article__task p,
	.case-article__content > p,
	.case-article__content > .editorjs-block-background > p {
		font-size: 18px;
		line-height: 1.3;
	}

	.case-article__task {
		margin-top: 30px;
	}

	.case-article__task h2 {
		font-family: 'Geologica', sans-serif;
		font-size: 28px;
		font-weight: 400;
		line-height: 1;
		text-transform: none;
	}

	.case-article__content {
		margin-top: 30px;
		gap: 30px;
	}

	.case-article__content > .editorjs-block-background {
		padding-block: 30px;
		gap: 30px;
	}

	.case-article__content > .editorjs-block-background + .editorjs-block-background {
		margin-top: -30px;
	}

	.case-next {
		width: 100%;
	}

	.case-next__button {
		width: 350px;
		max-width: 100%;
		height: 64px;
		padding: 20px 50px;
		font: 400 20px/1 'TT Days Sans', sans-serif;
	}
}
