/* ==========================================================================
   Библиотека блоков кейса портфолио (single-portfolio.php)
   Все размеры/отступы намеренно опираются на переменные и типографику,
   уже заданные в frontend/css/style.css и style.css — новых токенов не вводим.
   ========================================================================== */

.case-block {
	position: relative;
	padding: 60px 0;
	overflow: hidden;
}

.case-block--full-bleed {
	padding-left: 0;
	padding-right: 0;
}

/* -------------------- reveal-эффект (см. portfolio-effects.js) -------------------- */
.case-block--reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .6s ease, transform .6s ease;
	will-change: opacity, transform;
}
.case-block--reveal[data-reveal="fade"] {
	transform: none;
}
.case-block--reveal[data-reveal="scale"] {
	transform: scale(.94);
}
.case-block--reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.case-block--reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* -------------------- hero -------------------- */
.case-block--hero {
	min-height: 70vh;
	display: flex;
	align-items: flex-end;
	color: #fff;
	padding-bottom: 60px;
}
.case-block__media--bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}
.case-block__bg-img,
.case-block__bg-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.case-block--hero .case-block__hero-text {
	position: relative;
	z-index: 1;
}
.case-block--hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 55%);
	z-index: 0;
}
.case-block__eyebrow {
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: 14px;
	opacity: .8;
	margin-bottom: 12px;
}
.case-block__title {
	font-size: clamp(28px, 4vw, 48px);
	line-height: 1.1;
	margin-bottom: 16px;
}

/* -------------------- divider -------------------- */
.case-block--divider {
	background: #111;
	color: #fff;
	text-align: center;
	padding: 90px 0;
}
.case-block__divider-inner {
	max-width: 760px;
	margin: 0 auto;
}
.case-block__divider-logo {
	max-height: 48px;
	margin-bottom: 24px;
}
.case-block__divider-text {
	font-size: clamp(22px, 3vw, 34px);
	line-height: 1.3;
}
.case-block__divider-caption {
	margin-top: 12px;
	opacity: .7;
	font-size: 14px;
}

/* -------------------- stats -------------------- */
.case-block__stats-list {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
}
.case-block__stats-list p {
	flex: 1 1 200px;
	margin: 0;
}
.case-block__stats-list p strong {
	display: block;
	font-size: clamp(32px, 4vw, 56px);
	line-height: 1;
	margin-bottom: 8px;
}

/* -------------------- text / two_col / credits -------------------- */
.case-block__text-col {
	max-width: 760px;
}
.case-block--text .case-block__text-col {
	margin: 0 auto;
	text-align: center;
}
.case-block--text.case-block--text-left .case-block__text-col {
	margin: 0;
	text-align: left;
}
.case-block--mirrored .case-block__media-col {
	order: -1;
}

/* -------------------- quote -------------------- */
.case-block--quote {
	text-align: center;
}
.case-block__quote-text {
	max-width: 820px;
	margin: 0 auto;
	font-size: clamp(22px, 3vw, 32px);
	line-height: 1.4;
	font-style: normal;
}
.case-block__quote-author {
	display: block;
	margin-top: 16px;
	font-style: normal;
	opacity: .7;
}

/* -------------------- image_full / gallery -------------------- */
.case-block__full-img {
	display: block;
	width: 100%;
	height: auto;
}
.case-block__caption {
	margin-top: 12px;
	font-size: 14px;
	opacity: .7;
}
.case-block__gallery-img img {
	width: 100%;
	height: auto;
	display: block;
}
.case-block__media-single {
	max-width: 100%;
	height: auto;
}

/* -------------------- video -------------------- */
.case-block__video {
	display: block;
	width: 100%;
	height: auto;
}

/* -------------------- before / after -------------------- */
.case-block__compare {
	position: relative;
	overflow: hidden;
	max-width: 100%;
}
.case-block__compare-before,
.case-block__compare-after {
	display: block;
	width: 100%;
	height: auto;
}
.case-block__compare-after-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
	clip-path: inset(0 50% 0 0);
}
.case-block__compare-range {
	position: absolute;
	bottom: 16px;
	left: 5%;
	width: 90%;
}

/* -------------------- device_frame -------------------- */
.case-block__device-frame {
	position: relative;
	margin: 0 auto;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: top center;
	max-width: 900px;
}
.case-block--device-phone .case-block__device-frame {
	max-width: 320px;
}
.case-block__device-screen {
	display: block;
	width: 100%;
	height: auto;
}

/* -------------------- лёгкий параллакс: см. data-parallax в JS -------------------- */
[data-parallax] {
	will-change: transform;
}
