/*
 * Pin-spacer (ScrollTrigger): keep above the fixed ship (z-index:0 on body).
 * Do not use a very high value — siblings after this wrapper (e.g. CTA) need to stack above.
 */
.pin-spacer:has(> .block-statek-scroll) {
	z-index: 2;
}

/* ── Pinned section ── */
.block-statek-scroll {
	--weblance-kicker-gap: 20px;
	--weblance-kicker-offset: calc(var(--weblance-kicker-width, 40px) + var(--weblance-kicker-gap));
	position: relative;
	z-index: 1;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	box-sizing: border-box;
	margin: 0;
	background: transparent;
	isolation: isolate;
}

/* ── Background media (video/gif/img) ── */
.block-statek-scroll__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	opacity: 0.1;
	-webkit-mask-image: linear-gradient(to bottom, transparent 0%, #fff 18%, #fff 82%, transparent 100%);
	mask-image: linear-gradient(to bottom, transparent 0%, #fff 18%, #fff 82%, transparent 100%);
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.block-statek-scroll__bg img,
.block-statek-scroll__bg video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── Content wrapper (copy top-right, stats bottom-right) ── */
.block-statek-scroll__content {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10vh;
	align-items: flex-end;
	padding: 10vh var(--calc-padding);
	box-sizing: border-box;
	pointer-events: none;
}

.block-statek-scroll__copy,
.block-statek-scroll__stats {
	pointer-events: auto;
}

/* Wrapper copy + boczny kicker (jak Etapy etap 2: kreska od lewego dołu → kicker po prawej stronie copy). */
.block-statek-scroll__copy-outer {
	position: relative;
	align-self: flex-end;
	max-width: 50%;
	width: 100%;
}

.block-statek-scroll__copy-outer .block-statek-scroll__copy {
	max-width: 100%;
}

.block-statek-scroll__copy-outer--kicker-right {
	margin-right: var(--weblance-kicker-offset);
}

.block-statek-scroll__copy-outer--kicker-right .weblance-copy-side-kicker {
	left: calc(100% + 20px);
}

/* ── Copy (top-right): kreska od lewego dolnego rogu — na zewnątrz w lewo i w górę ── */
.block-statek-scroll__copy {
	position: relative;
	overflow: visible;
	max-width: 50%;
	text-align: right;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 0 0 30px;
	border-bottom: 2px solid #fff;
}

.block-statek-scroll__copy::after {
	content: "";
	position: absolute;
	width: 300px;
	height: 2px;
	background: #fff;
	pointer-events: none;
	z-index: 2;
	left: 0;
	bottom: 0;
	transform-origin: 0 100%;
	transform: rotate(-150deg);
}

.block-statek-scroll__heading {
	margin: 0;
	color: #fff;
	font-size: var(--font-size-h1);
	font-weight: 400;
	line-height: 1.15;
}

.block-statek-scroll__heading p { margin: 0; }

.block-statek-scroll__heading strong {
	position: relative;
	display: inline-block;
	font-weight: 700;
	font-style: italic;
	z-index: 1;
}

.block-statek-scroll__heading strong::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10%;
	height: 0.5em;
	background-image: url("/wp-content/themes/weblance/assets/images/hero-strong-underline.svg");
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-position: center;
	pointer-events: none;
	z-index: -1;
}

.block-statek-scroll__text {
	color: rgba(255, 255, 255, 0.85);
	font-size: var(--font-size-normal);
	line-height: 1.6;
}

.block-statek-scroll__text p { margin: 0 0 8px; }
.block-statek-scroll__text p:last-child { margin-bottom: 0; }

/* ── Buttons ── */
.block-statek-scroll__buttons {
	margin-top: 4px;
	justify-content: flex-end;
}

.block-statek-scroll__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border-radius: 100px;
	text-decoration: none;
	font-size: var(--font-size-normal);
	font-weight: 400;
}

.block-statek-scroll__btn--secondary {
	border: 2px solid #ffffff33;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.04);
	box-shadow: 4px 4px 12.9px 0 rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

/* ── Stats (bottom-right) ── */
.block-statek-scroll__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 60px;
	justify-content: flex-end;
}

.block-statek-scroll__stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: right;
}

.block-statek-scroll__stat-value {
	font-size: 50px;
	font-weight: 700;
	font-family: "Unbounded", sans-serif;
	color: #fff;
	line-height: 1;
}

.block-statek-scroll__stat-label {
	font-size: var(--font-size-h6);
	color: #fff;
	line-height: 1.4;
}

/* ── Ship (fixed, JS controls all positioning via GSAP x/y/xPercent/yPercent) ── */
.block-statek-scroll__ship {
	position: fixed;
	z-index: 0;
	pointer-events: none;
	left: 50%;
	top: 50%;
	visibility: hidden;
	will-change: transform;
}

.block-statek-scroll__ship img {
	display: block;
	width: 400px;
	height: auto;
	object-fit: contain;
}

/* ── Ship lane (mobile only, hidden on desktop) ── */
.block-statek-scroll__ship-lane {
	display: none;
}

/* ── Responsive ── */
@media (max-width: 1023px) {
	.block-statek-scroll__copy,
	.block-statek-scroll__copy-outer { max-width: 55%; }
	.block-statek-scroll__ship { width: 45%; }
}

@media (max-width: 767px) {
	.block-statek-scroll {
		--weblance-kicker-width: 30px;
		height: auto;
		overflow: visible;
	}

	.block-statek-scroll__content {
		height: auto;
		align-items: flex-start;
		padding: 48px var(--calc-padding);
		gap: 40px;
	}

	.block-statek-scroll__copy,
	.block-statek-scroll__copy-outer {
		max-width: 100%;
	}

	.block-statek-scroll__copy-outer {
		align-self: stretch;
	}

	.block-statek-scroll__copy-outer--kicker-right {
		width: calc(100% - var(--weblance-kicker-offset));
	}

	.block-statek-scroll__copy {
		text-align: left;
	}

	/* Ta sama kreska co desktop: lewy dół copy → w lewo i w górę */
	.block-statek-scroll__copy::after {
		left: 0;
		transform-origin: 0 100%;
		transform: rotate(-150deg);
	}

	.block-statek-scroll__buttons {
		justify-content: flex-start;
	}

	.block-statek-scroll__stats {
		justify-content: flex-start;
		gap: 32px;
	}

	.block-statek-scroll__stat {
		text-align: left;
	}

	.block-statek-scroll__stat-value {
		font-size: 40px;
	}

	.block-statek-scroll__stat-label {
		font-size: var(--font-size-normal);
	}

	/* Ten sam statek co desktop (fixed + przekątna w JS); pas tylko layout — ukryty. */
	.block-statek-scroll__ship-lane {
		display: none;
	}

	.block-statek-scroll__ship img {
		width: 200px;
		max-width: 50vw;
	}
}
