/* ==========================================================================
   Hero podstrony — Figma 1:982: 1440×500, zdjęcie + gradient od lewej,
   okruszki, H1 48/60, opcjonalny opis, przycisk + telefon w kółku
   ========================================================================== */
.section--page_hero {
	--page-hero-crumb: #d1d5db;                         /* okruszki (Figma) */
	position: relative;
	padding-block: 0;
	background: var(--color-navy);
	color: #fff;
	overflow: hidden;
}

.page-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 420px;
}

.page-hero__media {
	position: absolute;
	inset: 0;
	background: var(--color-navy);
}

.page-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	/* Telefon: tekst zajmuje całą szerokość — mocniejsze przyciemnienie także po prawej. */
	background: linear-gradient(to right, rgba(16, 36, 58, 0.95) 30%, rgba(16, 36, 58, 0.78));
}

@media (min-width: 768px) {
	.page-hero__media::after {
		background: linear-gradient(to right, rgba(16, 36, 58, 0.95) 30%, rgba(16, 36, 58, 0.6));
	}
}

.page-hero__parallax {
	position: absolute;
	inset: 0;
}

.page-hero__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.page-hero__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
	padding-block: 3.5rem;
}

/* Okruszki */
.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: var(--page-hero-crumb);
}

.breadcrumbs__item {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.breadcrumbs__link {
	color: inherit;
	text-decoration: none;
	transition: color var(--transition);
}

.breadcrumbs__link:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.breadcrumbs__link:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

.breadcrumbs__sep {
	flex: none;
	width: 6.25px;
	height: 10px;
}

.breadcrumbs__current {
	font-weight: 500;
	color: #fff;
}

/* Nagłówek */
.page-hero__heading {
	max-width: 672px;
	margin: 0;
	font-size: clamp(2rem, 2.4vw + 1.25rem, 3rem);
	line-height: 1.25;
	letter-spacing: -0.0273em;
	color: #fff;
	overflow-wrap: break-word;
}

/* Opis pod H1 (pole „Opis pod tytułem”) — 16 px pod nagłówkiem (gap kontenera 24 px − 8 px). */
.page-hero__lead {
	max-width: 672px;
	margin: 0;
	font-size: clamp(1.125rem, 0.5vw + 1rem, 1.25rem);
	line-height: 1.625; /* 32.5px */
	color: #d1d5db;
	overflow-wrap: break-word;
}

.page-hero__heading + .page-hero__lead {
	margin-top: -0.5rem;
}

/* Przycisk + telefon */
.page-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	padding-top: 0.5rem;
}

.page-hero .page-hero__button {
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.page-hero__phone {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	color: #fff;
	text-decoration: none;
}

.page-hero__phone-icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	transition: background-color var(--transition), color var(--transition);
}

.page-hero__phone-svg {
	width: 16px;
	height: 16px;
}

.page-hero__phone-text {
	display: flex;
	flex-direction: column;
}

.page-hero__phone-label {
	font-size: 0.75rem;
	line-height: 1rem;
	color: var(--color-text-subtle);
}

.page-hero__phone-number {
	font-weight: 700;
	line-height: 1.5rem;
	white-space: nowrap;
	transition: color var(--transition);
}

.page-hero__phone:hover .page-hero__phone-icon {
	background: var(--color-accent);
}

.page-hero__phone:hover .page-hero__phone-number {
	color: var(--color-accent);
}

.page-hero__phone:focus-visible {
	outline: 3px solid var(--color-accent);
	outline-offset: 4px;
	border-radius: var(--radius-sm);
}

@media (max-width: 479px) {
	.page-hero__button {
		flex: 1 1 100%;
	}
}

@media (min-width: 768px) {
	.page-hero {
		min-height: 460px;
	}

	.page-hero__actions {
		gap: 1rem;
	}
}

@media (min-width: 1024px) {
	.page-hero {
		min-height: 500px;
	}

	.page-hero__inner {
		padding-block: 4rem;
	}
}

/* ==========================================================================
   Wariant niski (pole „Wysokość” = compact) — Figma 107:242 (O nas): 1440×400,
   zdjęcie 40% na granacie + gradient 90% → 0, okruszki 16 px nad H1 60/75.
   Wysokość i kolor okruszków wspólne z wariantem „intro” (niżej).
   ========================================================================== */
.page-hero--compact,
.page-hero--intro {
	--page-hero-half: 200px;
	--page-hero-crumb: #e5e7eb;
	min-height: 300px;
}

.page-hero--compact .breadcrumbs__current {
	color: var(--color-accent);
}

.page-hero--compact .page-hero__image {
	opacity: 0.4;
}

.page-hero--compact .page-hero__media::after {
	background: linear-gradient(to right, rgba(16, 36, 58, 0.9), rgba(16, 36, 58, 0));
}

.page-hero--compact .page-hero__inner {
	gap: 1rem;
}

.page-hero--compact .page-hero__heading {
	max-width: none;
	font-size: var(--fs-h1);
	line-height: 1.25;
}

.page-hero--compact .page-hero__lead {
	margin-top: 0;
}

@media (min-width: 768px) {
	.page-hero--compact,
	.page-hero--intro {
		min-height: 360px;
	}
}

@media (min-width: 1024px) {
	.page-hero--compact,
	.page-hero--intro {
		min-height: 400px;
	}
}

/* ==========================================================================
   Wariant niski z opisem (pole „Wysokość” = intro) — Figma 1:1964 (Kontakt): 1440×400,
   zdjęcie 50% + gradient 95% → 70%, okruszki 14/21 (bieżąca biała) 24 px nad H1 48/60,
   opis 20/32.5 16 px pod H1.
   ========================================================================== */
.page-hero--intro .page-hero__image {
	opacity: 0.5;
}

.page-hero--intro .page-hero__media::after {
	background: linear-gradient(to right, rgba(16, 36, 58, 0.95), rgba(16, 36, 58, 0.7));
}

.page-hero--intro .breadcrumbs {
	line-height: 1.3125rem; /* 21px */
}

.page-hero--intro .page-hero__heading {
	max-width: none;
	font-size: clamp(2.25rem, 2.5vw + 1.25rem, 3rem);
	line-height: 1.25; /* 60px */
}

/* ==========================================================================
   Wyróżniona część H1 (pole „Nagłówek — wyróżniona część”) — Figma 1:1216:
   Lexend Black 48/48 w kolorze akcentu, 18 px pod białymi liniami.
   ========================================================================== */
.page-hero__accent-mask {
	margin-top: 0.375em;
}

.page-hero__line--accent {
	display: block;
	font-size: 0.8em;
	line-height: 1;
	letter-spacing: -0.0234em;
	color: var(--color-accent);
}

/* Plakietka obok przycisku — Figma 1:1224: kreska 20% bieli, kółko 48 px (10% bieli), tekst 16/20 Medium. */
.page-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	margin: 0;
	font-weight: 500;
	line-height: 1.25;
	color: #fff;
}

.page-hero__badge-icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
}

.page-hero__badge-img {
	display: block;
	width: 22.5px;
	height: 20px;
	object-fit: contain;
}

@media (min-width: 480px) {
	.page-hero__button + .page-hero__badge,
	.page-hero__phone + .page-hero__badge {
		margin-left: 0.5rem;
		padding-left: 1.5rem;
		border-left: 1px solid rgba(255, 255, 255, 0.2);
	}
}

/* ==========================================================================
   Wariant bardzo wysoki (pole „Wysokość” = tall) — Figma 1:1196 (Przewierty HDD): 1440×600,
   gradient 95% (do 35%) → 40%, H1 60/75 + wyróżnienie 48/48, opis 20/32.5 do 576 px.
   ========================================================================== */
.page-hero--tall {
	--page-hero-half: 300px;
}

/* 864 px: „Instalacje Światłowodowe i” (Figma 29:69, pole 800 px dla Inter 56) w Lexend 60 ma ~847 px —
   przy 768 px pierwszy wiersz łamał się na trzy. Krótsze tytuły (Przewierty, Prace ziemne) bez zmian. */
.page-hero--tall .page-hero__heading {
	max-width: 864px;
	font-size: clamp(2.25rem, 3.4vw + 1.25rem, 3.75rem);
	line-height: 1.25; /* 75px */
	letter-spacing: -0.0234em;
}

.page-hero--tall .page-hero__lead {
	max-width: 576px;
	margin-top: 0;
	padding-top: 0.5rem;
	color: #e5e7eb;
}

.page-hero--tall .page-hero__actions {
	padding-top: 1rem;
}

/* Przycisk 18/28 Bold wersalikami, padding 20/40 (Figma 1:1220). */
@media (min-width: 768px) {
	.page-hero--tall .page-hero__button {
		padding: 1.25rem 2.5rem;
		font-size: 1.125rem;
		line-height: 1.75rem;
		letter-spacing: 0.025em;
		text-transform: uppercase;
	}
}

@media (min-width: 768px) {
	.page-hero--tall .page-hero__media::after {
		background: linear-gradient(to right, rgba(16, 36, 58, 0.95) 35%, rgba(16, 36, 58, 0.4));
	}
}

@media (min-width: 1024px) {
	.page-hero--tall {
		min-height: 600px;
	}

	.page-hero--tall .page-hero__inner {
		padding-block: 3rem;
	}
}

/* ==========================================================================
   Animacja wejścia (silnik: assets/js/reveal.js + animations.css)
   Zdjęcie: zoom-out przy załadowaniu + paralaksa (desktop) na .page-hero__parallax.
   Okruszki (fade + blur) → H1 linie zza maski → przycisk i telefon kaskadowo.
   ========================================================================== */
@keyframes optitek-page-hero-image-in {
	from {
		transform: scale(1.12);
	}
}

.has-reveal .page-hero__image {
	animation: optitek-page-hero-image-in 1.3s var(--ease-soft) both;
}

@media (min-width: 1024px) {
	/*
	 * Paralaksa (data-parallax="-0.15") — jak w hero strony głównej: odejmujemy przesunięcie
	 * spoczynkowe (--page-hero-half = połowa wysokości sekcji: 250px, warianty niskie 200px), więc na górze strony zdjęcie stoi jak w projekcie,
	 * a odsłonięta górna krawędź chowa się pod przyklejonym nagłówkiem.
	 */
	.has-reveal .page-hero__parallax[data-parallax] {
		transform: translate3d(0, max(0px, var(--parallax-y, 0px) - max(0px, 0.15 * (50vh - var(--header-height) - var(--page-hero-half, 250px)))), 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.has-reveal .page-hero__image,
	.has-reveal .page-hero__parallax[data-parallax] {
		animation: none;
		transform: none;
	}

	.breadcrumbs__link,
	.page-hero__phone-icon,
	.page-hero__phone-number {
		transition: none;
	}
}
