/* Premium Hero */
.k-hero {
	padding-top: calc(var(--k-header-h) + clamp(40px, 7vw, 112px));
	padding-bottom: clamp(48px, 7vw, 96px);
	overflow: hidden;
	isolation: isolate;
}
.k-hero__inner { position: relative; z-index: 1; }
.k-hero__crumbs { margin-bottom: clamp(28px, 4vw, 48px); }
.k-hero__status { margin: 0 0 clamp(20px, 3vw, 32px); }
.k-hero__title { max-width: 16ch; overflow-wrap: anywhere; hyphens: manual; }
.k-hero__lead { margin-top: clamp(20px, 2.4vw, 30px); max-width: 56ch; }
.k-hero__actions { margin-top: clamp(28px, 3.2vw, 40px); }
.k-hero__note { margin: 18px 0 0; font-size: .875rem; color: var(--k-mut); }

/* Wysokości */
.k-hero--h-standard.k-hero--obraz { min-height: clamp(580px, 88svh, 880px); display: flex; align-items: flex-end; }
.k-hero--h-pelna { min-height: max(640px, 100svh); display: flex; align-items: flex-end; }
.k-hero--h-standard.k-hero--obraz > .k-hero__inner,
.k-hero--h-pelna > .k-hero__inner { width: min(100% - 2 * var(--k-gutter), var(--k-wide)); }
.k-hero--h-niska { padding-top: calc(var(--k-header-h) + clamp(28px, 4vw, 64px)); padding-bottom: clamp(40px, 5vw, 72px); }
.k-hero--h-niska .k-hero__title { font-size: clamp(2.25rem, 1.6rem + 2.8vw, 4rem); max-width: 20ch; }

/* Zdjęcie w tle */
.k-hero__bg { position: absolute; inset: 0; z-index: -1; }
.k-hero__bg .k-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; display: block; }
.k-hero--focus-prawo .k-hero__bg .k-hero__img { object-position: 72% 38%; }
.k-hero--focus-lewo .k-hero__bg .k-hero__img { object-position: 28% 38%; }
.k-theme-noc .k-hero__bg .k-hero__img,
.k-theme-glebia .k-hero__bg .k-hero__img { opacity: .66; filter: saturate(.85) contrast(1.05); }
.k-hero__shade {
	position: absolute; inset: 0;
	background:
		linear-gradient(180deg, color-mix(in srgb, var(--k-bg) 70%, transparent) 0%, color-mix(in srgb, var(--k-bg) 10%, transparent) 38%, color-mix(in srgb, var(--k-bg) 55%, transparent) 70%, var(--k-bg) 100%),
		linear-gradient(90deg, color-mix(in srgb, var(--k-bg) 60%, transparent) 0%, transparent 60%);
}
.k-hero--obraz:not(.has-image) .k-hero__bg {
	background:
		radial-gradient(90% 70% at 85% 10%, rgba(147, 165, 155, .14), transparent 60%),
		repeating-linear-gradient(118deg, transparent 0 46px, rgba(147, 165, 155, .05) 46px 47px);
}
.k-hero--obraz .k-hero__content { max-width: 880px; }

/* Tekst obok zdjęcia */
.k-hero--podzial .k-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
	gap: clamp(32px, 6vw, 96px);
	align-items: end;
}
.k-hero--podzial .k-hero__crumbs { grid-column: 1 / -1; margin-bottom: 0; }
.k-hero--podzial .k-hero__media { aspect-ratio: 4 / 5; max-height: 640px; }
.k-hero--podzial .k-hero__title { font-size: clamp(2.375rem, 1.5rem + 3vw, 4.25rem); }

/* Sam tekst (podstrony): bliżej menu, mniej pustego miejsca nad okruszkami. */
.k-hero--tekst { padding-top: calc(var(--k-header-h) + clamp(16px, 2.4vw, 36px)); padding-bottom: clamp(44px, 5.5vw, 80px); }
.k-hero--tekst .k-hero__crumbs { margin-bottom: clamp(20px, 2.6vw, 36px); }
.k-hero--tekst .k-hero__content { max-width: 960px; }

@media (max-width: 781px) {
	.k-hero { padding-top: calc(var(--k-header-h) + 32px); }
	.k-hero--tekst { padding-top: calc(var(--k-header-h) + 16px); }
	.k-hero--h-standard.k-hero--obraz { min-height: min(760px, 92svh); }
	.k-hero--podzial .k-hero__inner { grid-template-columns: 1fr; }
	.k-hero--podzial .k-hero__media { aspect-ratio: 4 / 3; order: 2; }
	.k-hero__bg .k-hero__img { object-position: 60% 40%; }
}

/* Telefon i tablet: zdjęcie jako pas u góry (pod menu), tekst pod nim. Inaczej tekst zakrywałby osobę na zdjęciu. */
@media (max-width: 899px) {
	.k-hero--obraz.has-image { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding-top: 0; }
	.k-hero--obraz.has-image .k-hero__bg { position: relative; inset: auto; z-index: 0; width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: 60svh; }
	.k-hero--obraz.has-image .k-hero__bg .k-hero__img { opacity: .82; }
	.k-hero--obraz.has-image .k-hero__shade {
		background: linear-gradient(180deg, color-mix(in srgb, var(--k-bg) 72%, transparent) 0%, transparent 26%, transparent 52%, color-mix(in srgb, var(--k-bg) 70%, transparent) 80%, var(--k-bg) 100%);
	}
	.k-hero--obraz.has-image > .k-hero__inner { position: relative; z-index: 1; margin-top: -20vw; }
}
@media (min-width: 600px) and (max-width: 899px) {
	.k-hero--obraz.has-image .k-hero__bg { aspect-ratio: 16 / 10; }
	.k-hero--obraz.has-image > .k-hero__inner { margin-top: -14vw; }
}
/*
 * Telefon: przyciski kontaktu na pierwszym ekranie. Wizualnie idą zaraz pod nagłówkiem, opis pod nimi
 * (kolejność w kodzie zostaje: status, nagłówek, opis, przyciski, notka).
 */
@media (max-width: 599px) {
	.k-hero__content { display: flex; flex-direction: column; align-items: stretch; }
	.k-hero__content > .k-hero__status { order: 1; }
	.k-hero__content > .k-hero__title { order: 2; }
	.k-hero__content > .k-hero__actions { order: 3; margin-top: 22px; }
	.k-hero__content > .k-hero__note { order: 4; margin-top: 12px; }
	.k-hero__content > .k-hero__lead { order: 5; margin-top: 24px; }
	.k-hero--obraz.has-image .k-hero__bg { aspect-ratio: 4 / 3; max-height: 46svh; }
	.k-hero--obraz.has-image > .k-hero__inner { margin-top: -15vw; }
}
/* Komputer: tekst nie wchodzi na osobę po prawej stronie zdjęcia. */
@media (min-width: 900px) {
	.k-hero--obraz.has-image.k-hero--focus-prawo .k-hero__content { max-width: min(880px, 56%); }
	.k-hero--obraz.has-image.k-hero--focus-lewo .k-hero__content { margin-left: auto; max-width: min(880px, 56%); }
}

/* Jedno wejście przy załadowaniu strony. */
@media (prefers-reduced-motion: no-preference) {
	.k-hero__content > * { animation: k-hero-in .9s var(--k-ease) both; }
	.k-hero__content > :nth-child(2) { animation-delay: .08s; }
	.k-hero__content > :nth-child(3) { animation-delay: .16s; }
	.k-hero__content > :nth-child(4) { animation-delay: .24s; }
	.k-hero__content > :nth-child(5) { animation-delay: .3s; }
	@keyframes k-hero-in {
		from { opacity: 0; transform: translateY(14px); }
		to { opacity: 1; transform: none; }
	}
	/* Tytuł i wstęp (kandydaci LCP) są widoczne od pierwszej klatki: tylko ruch, bez zanikania. */
	.k-hero__content > :is(.k-hero__title, .k-hero__lead) { animation-name: k-hero-rise; }
	@keyframes k-hero-rise {
		from { transform: translateY(12px); }
		to { transform: none; }
	}
	.k-ek-preview .k-hero__content > * { animation: none; }
}
