/* ==========================================================================
   Amperion.tech: style motywu
   --------------------------------------------------------------------------
   1. Fonty (lokalne, Archivo + JetBrains Mono, z polskimi znakami)
   2. Tokeny (kolory, typografia, odstępy, zaokrąglenia, easing)
   3. Baza i dostępność
   4. Układ i elementy wspólne (kontenery, sekcje, przyciski, glass)
   5. Nagłówek i nawigacja
   6. Strona główna: hero, partnerzy, usługi (bento), proces, realizacje
   7. CTA, nagłówki podstron
   8. O firmie
   9. Kontakt i formularz
   10. Blog, wpis, treść (prose)
   11. Stopka
   12. Animacje wejścia (scroll reveal) i ograniczony ruch

   Zasady ruchu (Emil Kowalski): animujemy tylko transform, opacity i clip-path,
   wejścia używają mocnego ease-out, hover działa tylko na urządzeniach z kursorem,
   a prefers-reduced-motion zostawia wyłącznie przejścia przezroczystości.

   System zaokrągleń: przyciski = pełna pigułka, etykiety zakresu prac = 4px,
   pola formularza = 10px, karty = 16px, duże panele i zdjęcia = 24px.
   ========================================================================== */

/* 1. Fonty ---------------------------------------------------------------- */

/* Archivo (zmienna grubość i szerokość): nagłówki w poszerzonej odmianie nawiązują
   do szerokich liter w logo AMPERION. JetBrains Mono do etykiet technicznych i numerów. */

@font-face {
	font-family: "Archivo";
	font-style: normal;
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-display: swap;
	src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Archivo";
	font-style: normal;
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-display: swap;
	src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Tokeny --------------------------------------------------------------- */

:root {
	/* Tło i powierzchnie: granatowa czerń, nigdy czysta #000. */
	--bg: #070b12;
	--bg-raised: #0a1019;
	--surface: #0d141f;
	--surface-2: #121b29;
	--line: rgb(148 178 220 / 0.12);
	--line-strong: rgb(148 178 220 / 0.22);

	/* Tekst (kontrast na --bg: 16.6:1 / 8.6:1 / 5.4:1). */
	--text: #e9eef6;
	--text-2: #a9b5c7;
	--text-3: #8190a6;

	/* Jedyny akcent: niebieski z logo. --accent do tekstu i detali (6.5:1 na tle),
	   --accent-strong jako tło przycisków z białym tekstem (5:1). */
	--accent: #3d95ff;
	--accent-strong: #1666f0;
	--accent-strong-hover: #1c6ef8;
	--accent-soft: rgb(61 149 255 / 0.12);
	--accent-line: rgb(61 149 255 / 0.4);
	--cyan: #19b6ff;

	/* Kolory stanów (tylko semantyczne: błąd / sukces formularza). */
	--danger: #ff8a8a;
	--success: #7fe0b0;

	/* Typografia. */
	--font-sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	--stretch-display: 112%;

	/* Odstępy i układ. */
	--header-h: 72px;
	--container: 1240px;
	--container-wide: 1080px;
	--container-narrow: 760px;
	--gutter: clamp(16px, 4vw, 32px);
	--section: clamp(64px, 8vw, 112px);

	/* Zaokrąglenia. */
	--r-field: 10px;
	--r-card: 16px;
	--r-panel: 24px;
	--r-pill: 999px;

	/* Easing (Emil Kowalski): mocny ease-out na wejścia, ease-in-out na ruch po ekranie. */
	--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
	--ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

	/* Warstwy (jedyne użycia z-index w motywie). */
	--z-header: 50;
	--z-nav: 49;
	--z-skip: 100;

	color-scheme: dark;
}

/* 3. Baza ----------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	-webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	min-height: 100dvh;
	background-color: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.6;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

/* Delikatna poświata u góry strony, przyklejona do widoku (nie przewija się, więc nie obciąża GPU). */
body::before {
	content: "";
	position: fixed;
	inset: 0 0 auto;
	height: 80vh;
	pointer-events: none;
	background: radial-gradient(60% 50% at 70% 0%, rgb(22 102 240 / 0.14), transparent 70%);
	z-index: -1;
}

img,
svg,
video,
canvas,
picture {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	font-weight: 600;
	font-stretch: var(--stretch-display);
	line-height: 1.12;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

p {
	margin: 0;
	text-wrap: pretty;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

[role="list"] {
	list-style: none;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

::selection {
	background: rgb(61 149 255 / 0.35);
	color: #fff;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

[id] {
	scroll-margin-top: calc(var(--header-h) + 24px);
}

.admin-bar [id] {
	scroll-margin-top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 0px) + 24px);
}

.icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

.skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: var(--z-skip);
	padding: 10px 16px;
	border-radius: var(--r-pill);
	background: var(--accent-strong);
	color: #fff;
	font-weight: 600;
	transform: translateY(-160%);
	transition: transform 200ms var(--ease-out);
}

.skip-link:focus {
	transform: translateY(0);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.site-main:focus {
	outline: none;
}

/* 4. Układ i elementy wspólne -------------------------------------------- */

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--wide {
	max-width: calc(var(--container-wide) + var(--gutter) * 2);
}

.container--narrow {
	max-width: calc(var(--container-narrow) + var(--gutter) * 2);
}

.section {
	padding-block: var(--section);
}

.section--tight {
	padding-block: clamp(40px, 6vw, 72px) var(--section);
}

.section-head {
	max-width: 720px;
	margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head--row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 32px;
	max-width: none;
}

.section-title {
	font-size: clamp(2rem, 1.35rem + 2.2vw, 3rem);
	letter-spacing: -0.028em;
	line-height: 1.05;
}

.section-lead {
	margin-top: 18px;
	max-width: 60ch;
	color: var(--text-2);
	font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
	line-height: 1.6;
}

.eyebrow {
	margin-bottom: 18px;
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Krótka linia przed nadtytułem; w sekcjach z animacją wejścia „rysuje się” od lewej. */
.eyebrow::before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 1px;
	margin-right: 12px;
	vertical-align: middle;
	background: currentColor;
	transform-origin: left;
}

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--accent);
	font-weight: 550;
}

.link-arrow .icon {
	transition: transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
	.link-arrow:hover .icon {
		transform: translateX(3px);
	}

	.link-arrow--back:hover .icon {
		transform: translateX(-3px);
	}
}

/* Przyciski: wciśnięcie skaluje do 0.97 (natychmiastowa informacja zwrotna). */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 46px;
	padding: 0 22px;
	border: 1px solid transparent;
	border-radius: var(--r-pill);
	font-size: 0.9375rem;
	font-weight: 550;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	transition:
		transform 160ms var(--ease-out),
		background-color 200ms ease,
		border-color 200ms ease,
		color 200ms ease;
}

.btn:active {
	transform: scale(0.97);
}

.btn__icon {
	width: 18px;
	height: 18px;
	transition: transform 200ms var(--ease-out);
}

.btn--sm {
	height: 40px;
	padding: 0 18px;
	font-size: 0.875rem;
}

.btn--lg {
	height: 54px;
	padding: 0 28px;
	font-size: 1rem;
}

.btn--block {
	width: 100%;
}

.btn--primary {
	background-color: var(--accent-strong);
	color: #fff;
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.2),
		0 10px 28px -12px rgb(22 102 240 / 0.7);
}

.btn--ghost {
	background-color: rgb(255 255 255 / 0.04);
	border-color: var(--line-strong);
	color: var(--text);
}

@media (hover: hover) and (pointer: fine) {
	.btn--primary:hover {
		background-color: var(--accent-strong-hover);
	}

	.btn--ghost:hover {
		background-color: rgb(255 255 255 / 0.08);
		border-color: rgb(148 178 220 / 0.34);
	}

	.btn:hover .btn__icon {
		transform: translateX(2px);
	}
}

/* Szkło (glassmorphism): rozmycie tła + cienka ramka + wewnętrzne światło na górnej krawędzi. */
.glass {
	position: relative;
	background:
		linear-gradient(180deg, rgb(255 255 255 / 0.055), rgb(255 255 255 / 0.015)),
		rgb(13 20 31 / 0.6);
	border: 1px solid var(--line);
	border-radius: var(--r-panel);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	backdrop-filter: blur(18px) saturate(140%);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.06),
		0 30px 60px -30px rgb(0 0 0 / 0.7);
}

@media (prefers-reduced-transparency: reduce) {
	.glass {
		background: var(--surface);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}

/* Efekt „spotlight”: ramka i tło karty podświetlają się pod kursorem.
   Pozycję (--mx, --my) ustawia JS bezpośrednio na karcie, nie na rodzicu,
   żeby nie przeliczać stylów całego drzewa. */
[data-spotlight] {
	position: relative;
	isolation: isolate;
}

@media (hover: hover) and (pointer: fine) {
	[data-spotlight]::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: -1;
		border-radius: inherit;
		background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgb(61 149 255 / 0.1), transparent 45%);
		opacity: 0;
		transition: opacity 300ms ease;
		pointer-events: none;
	}

	[data-spotlight]::after {
		content: "";
		position: absolute;
		inset: -1px;
		border-radius: inherit;
		padding: 1px;
		background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgb(61 149 255 / 0.65), transparent 60%);
		-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
		-webkit-mask-composite: xor;
		mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
		opacity: 0;
		transition: opacity 300ms ease;
		pointer-events: none;
	}

	[data-spotlight]:hover::before,
	[data-spotlight]:hover::after {
		opacity: 1;
	}
}

/* 5. Nagłówek i nawigacja ------------------------------------------------- */

.scroll-sentinel {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 8px;
	pointer-events: none;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: var(--z-header);
	height: var(--header-h);
	isolation: isolate;
}

/* Zalogowany użytkownik: nagłówek przykleja się pod paskiem administracyjnym WordPressa, a nie pod nim.
   Bez tego po przewinięciu pasek zasłaniał górną połowę menu i kliknięcia trafiały w pasek
   (menu „nie reagowało”, dopóki strona nie wróciła na samą górę).
   Poniżej 601px pasek WordPressa przewija się razem ze stroną, więc nagłówek wraca do top: 0. */
.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

/* Dwie warstwy tła, przenikające się przez opacity (nie animujemy samego backdrop-filter):
   ::after  – na szczycie strony: lekko przezroczyste szkło, które wtapia się w baner,
   ::before – po przewinięciu i przy otwartym menu: czarne tło. */
.site-header::before,
.site-header::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	transition: opacity 320ms ease;
}

.site-header::before {
	background: rgb(3 5 9 / 0.94);
	border-bottom: 1px solid rgb(255 255 255 / 0.07);
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	backdrop-filter: blur(16px) saturate(140%);
	opacity: 0;
}

.site-header::after {
	background: linear-gradient(180deg, rgb(7 11 18 / 0.34), rgb(7 11 18 / 0.1));
	border-bottom: 1px solid rgb(255 255 255 / 0.06);
	-webkit-backdrop-filter: blur(10px) saturate(130%);
	backdrop-filter: blur(10px) saturate(130%);
}

.site-header[data-scrolled]::before,
.nav-open .site-header::before {
	opacity: 1;
}

.site-header[data-scrolled]::after,
.nav-open .site-header::after {
	opacity: 0;
}

@media (prefers-reduced-transparency: reduce) {
	.site-header::before {
		background: #030509;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}

	.site-header::after {
		background: rgb(7 11 18 / 0.8);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}

/* Pasek postępu przewijania na dolnej krawędzi nagłówka (tylko przeglądarki z animacjami
   sterowanymi przewijaniem; reszta go po prostu nie pokazuje). */
.site-header__progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: linear-gradient(90deg, var(--accent-strong), var(--accent));
	transform: scaleX(0);
	transform-origin: left;
	opacity: 0;
	transition: opacity 320ms ease;
	pointer-events: none;
}

@supports (animation-timeline: scroll()) {
	@media (prefers-reduced-motion: no-preference) {
		.site-header__progress {
			animation: scroll-progress linear both;
			animation-timeline: scroll(root);
		}

		.site-header[data-scrolled] .site-header__progress {
			opacity: 1;
		}

		.nav-open .site-header[data-scrolled] .site-header__progress {
			opacity: 0;
		}
	}
}

@keyframes scroll-progress {
	to {
		transform: scaleX(1);
	}
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	height: 100%;
}

.brand {
	display: inline-flex;
	flex: none;
	margin-right: auto;
	border-radius: 6px;
}

.brand__img {
	width: auto;
	height: 32px;
}

.brand--footer .brand__img {
	height: 40px;
}

@media (min-width: 640px) {
	.brand--header .brand__img {
		height: 36px;
	}
}

.nav__list {
	list-style: none;
}

.nav__list a {
	position: relative;
	display: inline-flex;
	align-items: center;
	color: var(--text-2);
	font-size: 0.9375rem;
	font-weight: 500;
	transition: color 200ms ease;
}

.nav__list .current-menu-item > a,
.nav__list a[aria-current="page"] {
	color: var(--text);
}

.site-header__cta {
	display: none;
}

@media (min-width: 640px) {
	.site-header__cta {
		display: inline-flex;
	}
}

.nav-toggle {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-right: -8px;
	border: 0;
	border-radius: var(--r-pill);
	background: transparent;
	transition: transform 160ms var(--ease-out);
}

.nav-toggle:active {
	transform: scale(0.94);
}

.nav-toggle__bars {
	position: relative;
	width: 20px;
	height: 12px;
}

.nav-toggle__bars span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 1.5px;
	border-radius: 2px;
	background: var(--text);
	transition: transform 260ms var(--ease-out);
}

.nav-toggle__bars span:first-child {
	top: 0;
}

.nav-toggle__bars span:last-child {
	bottom: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child {
	transform: translateY(5.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child {
	transform: translateY(-5.25px) rotate(-45deg);
}

/* Mobile i tablet: menu jako panel pod nagłówkiem. */
@media (max-width: 1179px) {
	.nav {
		position: fixed;
		inset: var(--header-h) 0 0;
		z-index: var(--z-nav);
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		gap: 32px;
		padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
		background: rgb(3 5 9 / 0.96);
		-webkit-backdrop-filter: blur(20px) saturate(150%);
		backdrop-filter: blur(20px) saturate(150%);
		overflow-y: auto;
		overscroll-behavior: contain;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		/* Zamknięcie szybsze niż otwarcie. */
		transition:
			opacity 160ms ease,
			transform 200ms var(--ease-out),
			visibility 0s linear 200ms;
	}

	@media (min-width: 601px) {
		.admin-bar .nav {
			top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 32px));
		}
	}

	.nav-open .nav {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		transition:
			opacity 220ms ease,
			transform 320ms var(--ease-drawer),
			visibility 0s;
	}

	.nav__list {
		display: flex;
		flex-direction: column;
	}

	.nav__list li {
		border-bottom: 1px solid var(--line);
	}

	.nav__list a {
		width: 100%;
		min-height: 60px;
		color: var(--text);
		font-size: clamp(1.25rem, 1rem + 1.2vw, 1.625rem);
		font-weight: 550;
		letter-spacing: -0.02em;
	}

	/* Pozycje menu wjeżdżają kaskadowo (40ms odstępu). */
	.nav__list li {
		opacity: 0;
		transform: translateY(8px);
		transition: opacity 200ms ease, transform 300ms var(--ease-out);
	}

	.nav-open .nav__list li {
		opacity: 1;
		transform: translateY(0);
	}

	.nav-open .nav__list li:nth-child(1) { transition-delay: 40ms; }
	.nav-open .nav__list li:nth-child(2) { transition-delay: 80ms; }
	.nav-open .nav__list li:nth-child(3) { transition-delay: 120ms; }
	.nav-open .nav__list li:nth-child(4) { transition-delay: 160ms; }
	.nav-open .nav__list li:nth-child(5) { transition-delay: 200ms; }
	.nav-open .nav__list li:nth-child(6) { transition-delay: 240ms; }

	.nav__mobile-extra {
		display: grid;
		gap: 16px;
	}

	.nav__phone {
		display: inline-flex;
		align-items: center;
		gap: 12px;
		color: var(--text-2);
		font-family: var(--font-mono);
		font-size: 1.0625rem;
	}

	.nav__phone .icon {
		color: var(--accent);
	}

	html.nav-open {
		overflow: hidden;
	}
}

/* Desktop: menu w jednej linii. */
@media (min-width: 1180px) {
	.nav-toggle,
	.nav__mobile-extra {
		display: none;
	}

	.nav__list {
		display: flex;
		align-items: center;
		gap: 30px;
	}

	.nav__list a {
		height: var(--header-h);
	}

	/* Wskaźnik aktywnej pozycji: linia wyrastająca od środka. */
	.nav__list a::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: 18px;
		height: 1.5px;
		border-radius: 2px;
		background: var(--accent);
		transform: scaleX(0);
		transition: transform 240ms var(--ease-out);
	}

	.nav__list .current-menu-item > a::after,
	.nav__list a[aria-current="page"]::after {
		transform: scaleX(1);
	}

	.site-header__cta {
		margin-left: 8px;
	}
}

@media (min-width: 1180px) and (hover: hover) and (pointer: fine) {
	.nav__list a:hover {
		color: var(--text);
	}
}

/* 6. Strona główna -------------------------------------------------------- */

/* Hero: baner na pełną szerokość
   Telefon i tablet: zdjęcie u góry (pod półprzezroczystym nagłówkiem), tekst pod nim z płynnym przejściem.
   Szeroki ekran: zdjęcie na całym tle, tekst po lewej na tle nieba.

   Scena (.hero__scene) ma proporcje zdjęcia 1671×941 i jest kadrowana jak object-fit: cover
   z punktem ostrości --fx/--fy (left/top + translate o ten sam procent). Dzięki temu warstwa SVG
   z przepływem energii zawsze pokrywa się ze świecącymi przewodami na zdjęciu. */
.hero {
	/* Na telefonie scena jest wyższa niż kadr: dolna część zdjęcia (rośliny na pierwszym planie)
	   wypada poza kadr, a dom jest większy. */
	--scene-ratio: 2.1423; /* 1671 / 780 */
	--fx: 72%;
	--fy: 0%;
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-rows: minmax(clamp(240px, 38svh, 80vw), 1fr) auto;
	min-height: 100vh;
	min-height: 100svh;
	margin-top: calc(var(--header-h) * -1);
	overflow: hidden;
}

.hero__stage {
	position: relative;
	grid-area: 1 / 1;
	container-type: size;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 98%);
	mask-image: linear-gradient(to bottom, #000 60%, transparent 98%);
}

/* Przyciemnienie pod nagłówkiem: menu jest czytelne niezależnie od kadru. */
.hero__stage::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgb(4 7 12 / 0.6), transparent calc(var(--header-h) * 2.2));
	pointer-events: none;
}

.hero__scene {
	position: absolute;
	left: var(--fx);
	top: var(--fy);
	width: max(100cqw, 100cqh * var(--scene-ratio));
	aspect-ratio: 1671 / 941;
	translate: calc(var(--fx) * -1) calc(var(--fy) * -1);
}

.hero__scene picture,
.hero__img {
	display: block;
	width: 100%;
	height: 100%;
}

.hero__flow {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}

/* Impulsy i pierścienie są niewidoczne bez animacji (ograniczony ruch = samo zdjęcie). */
.flow__lines path {
	fill: none;
	stroke: #e2f3ff;
	stroke-width: 5;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 0.2 2;
	stroke-dashoffset: 0.2;
	opacity: 0;
	filter: drop-shadow(0 0 6px rgb(61 149 255)) drop-shadow(0 0 2px rgb(160 210 255));
}

.flow__nodes circle {
	fill: none;
	stroke: #7cc4ff;
	stroke-width: 2.5;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
}

.hero__inner {
	position: relative;
	grid-area: 2 / 1;
	margin-top: calc(clamp(40px, 9svh, 96px) * -1);
	padding-bottom: clamp(32px, 6svh, 64px);
}

/* Krótka linia nad nagłówkiem, jak na projekcie. */
.hero__copy::before {
	content: "";
	display: block;
	width: 40px;
	height: 2px;
	margin-bottom: 22px;
	border-radius: 2px;
	background: var(--accent);
	transform-origin: left;
}

.hero__title {
	font-size: clamp(2.25rem, 1.15rem + 3.1vw, 3.5rem);
	font-weight: 640;
	font-stretch: 110%;
	line-height: 1.04;
	letter-spacing: -0.032em;
	text-wrap: balance;
}

.hero__line {
	display: block;
}

.hero__line--accent {
	color: var(--accent);
}

.hero__lead {
	max-width: 50ch;
	margin-top: 22px;
	color: var(--text-2);
	font-size: clamp(1rem, 0.95rem + 0.35vw, 1.1875rem);
	line-height: 1.55;
	text-wrap: pretty;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
}

@media (max-width: 639px) {
	.hero__actions .btn {
		flex: 1 1 100%;
	}
}

/* Szeroki ekran (laptop, monitor): zdjęcie na całe tło, tekst po lewej.
   Węższe proporcje (tablet poziomo, wysokie okno) zostają przy układzie pionowym,
   bo dom na zdjęciu wszedłby pod tekst. */
@media (min-width: 1024px) and (min-aspect-ratio: 3 / 2) {
	.hero {
		--scene-ratio: 1.7757; /* 1671 / 941 */
		--fx: 40%;
		--fy: 50%;
		grid-template-rows: 1fr;
		min-height: 0;
		/* Co najmniej wysokość ekranu, ale na niskich, szerokich ekranach pełna wysokość zdjęcia
		   (56.31vw = 941 / 1671), żeby nie przycinać nieba, na którym stoi tekst. */
		height: clamp(600px, max(100vh, 56.31vw), 1200px);
		height: clamp(600px, max(100svh, 56.31vw), 1200px);
	}

	.hero__stage {
		position: absolute;
		inset: 0;
		-webkit-mask-image: none;
		mask-image: none;
	}

	/* Lewa strona przyciemniona pod tekstem, dół łagodnie przechodzi w tło strony. */
	.hero__stage::after {
		background:
			linear-gradient(90deg, rgb(7 11 18 / 0.72) 0%, rgb(7 11 18 / 0.42) 30%, rgb(7 11 18 / 0) 56%),
			linear-gradient(180deg, rgb(4 7 12 / 0.6) 0, transparent calc(var(--header-h) * 2.2), transparent 82%, rgb(7 11 18 / 0.92) 100%);
	}

	/* Tekst zaczyna się wysoko, na tle nieba: dom zaczyna się mniej więcej w 40% szerokości,
	   a w ok. 63% wysokości zdjęcia jest napis „Magazyn energii”. */
	.hero__inner {
		grid-area: 1 / 1;
		align-self: start;
		max-width: none;
		margin: 0;
		/* Do ok. 1500px tekst jest wyrównany z logo; na szerszych monitorach zostaje bliżej lewej
		   krawędzi (najwyżej 12% szerokości), bo zdjęcie skaluje się razem z ekranem i dom by pod niego wszedł. */
		padding-top: calc(var(--header-h) + clamp(28px, 7vh, 120px));
		padding-left: min(max(var(--gutter), (100% - var(--container)) / 2), 12%);
	}

	.hero__copy {
		max-width: min(40rem, 52vw);
		text-shadow: 0 1px 28px rgb(0 0 0 / 0.45);
	}

	.hero__title {
		font-size: clamp(2.5rem, 0.9rem + 2.6vw, 3.5rem);
	}

	.hero__lead {
		max-width: min(31rem, 37vw);
		margin-top: 18px;
		font-size: clamp(1rem, 0.6rem + 0.55vw, 1.1875rem);
	}

	.hero__actions {
		margin-top: 26px;
	}
}

/* Drugi przycisk na zdjęciu: szkło zamiast pustego obrysu, żeby był czytelny na każdym tle. */
.hero .btn--ghost {
	background-color: rgb(7 11 18 / 0.42);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

/* Wejście hero przy ładowaniu: czysty CSS (bez JS), jednorazowe, więc może trwać dłużej niż typowe UI. */
@media (prefers-reduced-motion: no-preference) {
	.hero__scene {
		animation: scene-in 1800ms var(--ease-out) both;
	}

	.hero__copy::before {
		animation: rule-in 900ms var(--ease-out) 60ms both;
	}

	[data-hero-line] {
		animation: hero-in 900ms var(--ease-out) both;
	}

	.hero__title [data-hero-line]:nth-child(1) { animation-delay: 120ms; }
	.hero__title [data-hero-line]:nth-child(2) { animation-delay: 200ms; }
	.hero__lead[data-hero-line] { animation-delay: 300ms; }
	.hero__actions[data-hero-line] { animation-delay: 380ms; }

	/* Przepływ energii rusza, gdy zdjęcie już „usiadło”. Każda ścieżka ma własny rytm (--t, --d). */
	.flow__lines path {
		animation: flow-pulse var(--t, 2.8s) cubic-bezier(0.45, 0, 0.55, 1) calc(1.4s + var(--d, 0s)) infinite;
	}

	.flow__nodes circle {
		animation: node-ping 3.2s var(--ease-out) calc(1.2s + var(--d, 0s)) infinite;
	}

	/* Poza ekranem animacje stoją (atrybut ustawia main.js). */
	.hero[data-paused] .flow__lines path,
	.hero[data-paused] .flow__nodes circle {
		animation-play-state: paused;
	}
}

/* Paralaksa przy przewijaniu: zdjęcie przesuwa się wolniej niż treść i lekko gaśnie.
   Animacja sterowana przewijaniem działa na kompozytorze; przeglądarki bez wsparcia pokazują statyczne zdjęcie. */
@supports (animation-timeline: scroll()) {
	@media (prefers-reduced-motion: no-preference) {
		.hero__stage {
			animation: hero-parallax linear both;
			animation-timeline: scroll(root);
			animation-range: 0 100vh;
		}
	}
}

@keyframes hero-in {
	from {
		opacity: 0;
		transform: translateY(14px);
		filter: blur(6px);
	}
}

@keyframes scene-in {
	from {
		opacity: 0;
		transform: scale(1.06);
	}
}

@keyframes rule-in {
	from {
		transform: scaleX(0);
	}
}

@keyframes flow-pulse {
	0% {
		stroke-dashoffset: 0.2;
		opacity: 0;
	}
	10% {
		opacity: 1;
	}
	62% {
		opacity: 1;
	}
	72%,
	100% {
		stroke-dashoffset: -1;
		opacity: 0;
	}
}

@keyframes node-ping {
	0% {
		opacity: 0.75;
		transform: scale(1);
	}
	55%,
	100% {
		opacity: 0;
		transform: scale(1.55);
	}
}

@keyframes hero-parallax {
	to {
		transform: translateY(16%);
		opacity: 0.55;
	}
}

/* Partnerzy */
.partners {
	padding-block: clamp(40px, 6vw, 72px);
	border-block: 1px solid var(--line);
	background: linear-gradient(180deg, var(--bg-raised), transparent);
}

.partners__inner {
	display: grid;
	gap: 28px;
	align-items: center;
}

.partners__title {
	color: var(--text-2);
	font-size: 1.0625rem;
	font-weight: 500;
	letter-spacing: -0.01em;
}

.partners__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

/* Jasne kafle: loga partnerów mają ciemne i czerwone elementy, które giną na granatowym tle. */
.partners__item {
	display: grid;
	place-items: center;
	height: 96px;
	padding: 16px 24px;
	border-radius: var(--r-card);
	background: #e4eaf2;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6);
}

.partners__item img {
	width: auto;
	max-width: 100%;
	max-height: 56px;
	object-fit: contain;
	filter: grayscale(1) contrast(1.05);
	opacity: 0.78;
	transition: filter 300ms ease, opacity 300ms ease;
}

/* Pionowe logo (Szpital Podolany) potrzebuje więcej wysokości, żeby było czytelne. */
.partners__item--tall {
	padding-block: 10px;
}

.partners__item--tall img {
	max-height: 76px;
}

@media (hover: hover) and (pointer: fine) {
	.partners__item:hover img {
		filter: none;
		opacity: 1;
	}
}

/* Nieparzysta liczba logo na telefonie: ostatnie zajmuje cały wiersz. */
.partners__item:last-child:nth-child(odd) {
	grid-column: 1 / -1;
}

.partners__more {
	margin-top: 10px;
	font-size: 0.9375rem;
}

@media (min-width: 640px) {
	.partners__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.partners__item:last-child:nth-child(odd) {
		grid-column: auto;
	}
}

@media (min-width: 1100px) {
	.partners__inner {
		grid-template-columns: 180px 1fr;
		gap: 48px;
	}

	.partners__list {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 16px;
	}
}

/* Usługi: bento z pięcioma komórkami (dokładnie tyle, ile filarów). */
.bento {
	display: grid;
	gap: 16px;
}

.service {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	background: var(--surface);
	overflow: hidden;
}

.service__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--surface-2);
}

/* Zdjęcie zawsze wypełnia kontener (także gdy karta rozciąga się w poziomie lub pionie). */
.service__media picture,
.project__media picture,
.project__media > img,
.story__media picture {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.story__media {
	position: relative;
}

.service__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 700ms var(--ease-out);
}

.service__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, rgb(13 20 31 / 0.9));
}

@media (hover: hover) and (pointer: fine) {
	.service:hover .service__media img {
		transform: scale(1.04);
	}
}

.service__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: clamp(24px, 3vw, 32px);
}

.service__icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-bottom: 20px;
	border: 1px solid var(--accent-line);
	border-radius: 12px;
	background: var(--accent-soft);
	color: var(--accent);
}

.service__icon .icon {
	width: 24px;
	height: 24px;
}

.service__label {
	margin-bottom: 10px;
	color: var(--text-3);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.service__title {
	font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
	letter-spacing: -0.025em;
}

.service__text {
	margin-top: 12px;
	color: var(--text-2);
	font-size: 0.975rem;
	line-height: 1.65;
}

.service__points {
	display: grid;
	gap: 10px;
	margin-top: 22px;
	padding-top: 22px;
	border-top: 1px solid var(--line);
	list-style: none;
}

.service__points li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	color: var(--text-2);
	font-size: 0.9rem;
	line-height: 1.45;
}

.service__points .icon {
	width: 18px;
	height: 18px;
	margin-top: 1px;
	color: var(--accent);
}

/* Zróżnicowane tła komórek bez zdjęć (nie pięć identycznych kart). */
.service--fotowoltaika {
	background:
		radial-gradient(120% 90% at 100% 0%, rgb(25 182 255 / 0.16), transparent 55%),
		var(--surface);
}

.service--klimatyzacja-pompy-ciepla {
	background:
		radial-gradient(110% 90% at 0% 100%, rgb(22 102 240 / 0.2), transparent 60%),
		var(--surface);
}

.service--inteligentne-rozwiazania {
	background:
		radial-gradient(70% 140% at 100% 50%, rgb(22 102 240 / 0.14), transparent 65%),
		linear-gradient(120deg, var(--surface-2), var(--surface));
}

@media (min-width: 680px) {
	.bento {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.service--elektryka,
	.service--inteligentne-rozwiazania {
		grid-column: 1 / -1;
	}
}

@media (min-width: 680px) and (max-width: 1023px) {
	.service--elektryka {
		flex-direction: row;
	}

	.service--elektryka .service__media {
		flex: 0 0 44%;
		aspect-ratio: auto;
	}
}

@media (min-width: 1024px) {
	.bento {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	/* Układ:  [ Elektryka (4) ][ Smart Dom ]
	           [ PV (2) ][ HVAC (2) ][ (2, 2 rzędy) ]
	           [ Inne rozwiązania (6)              ] */
	.service--elektryka {
		grid-column: 1 / 5;
		grid-row: 1;
		flex-direction: row;
	}

	.service--elektryka .service__media {
		flex: 0 0 46%;
		aspect-ratio: auto;
	}

	.service--elektryka .service__media::after {
		background: linear-gradient(90deg, transparent 50%, rgb(13 20 31 / 0.85));
	}

	.service--smart-dom {
		grid-column: 5 / 7;
		grid-row: 1 / 3;
	}

	/* Wysoka karta: zdjęcie rośnie i wypełnia wolne miejsce nad treścią. */
	.service--smart-dom .service__media {
		flex: 1 1 auto;
		aspect-ratio: auto;
		min-height: 240px;
	}

	.service--smart-dom .service__body {
		flex: 0 0 auto;
	}

	.service--fotowoltaika {
		grid-column: 1 / 3;
		grid-row: 2;
	}

	.service--klimatyzacja-pompy-ciepla {
		grid-column: 3 / 5;
		grid-row: 2;
	}

	.service--inteligentne-rozwiazania {
		grid-column: 1 / 7;
		grid-row: 3;
	}

	.service--inteligentne-rozwiazania .service__body {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) minmax(0, 0.9fr);
		column-gap: 32px;
		align-items: start;
	}

	.service--inteligentne-rozwiazania .service__icon {
		grid-row: 1 / 4;
		margin-bottom: 0;
	}

	.service--inteligentne-rozwiazania .service__label,
	.service--inteligentne-rozwiazania .service__title,
	.service--inteligentne-rozwiazania .service__text {
		grid-column: 2;
	}

	.service--inteligentne-rozwiazania .service__points {
		grid-column: 3;
		grid-row: 1 / 4;
		margin-top: 0;
		padding-top: 0;
		padding-left: 32px;
		border-top: 0;
		border-left: 1px solid var(--line);
		align-self: stretch;
		align-content: center;
	}
}

/* Proces: linia „pod napięciem” wypełnia się przy wejściu sekcji w widok,
   a węzły zapalają się kolejno (kolejność etapów = sens animacji). */
.services {
	padding-bottom: calc(var(--section) * 0.6);
}

.process {
	background: linear-gradient(180deg, transparent, var(--bg-raised) 30%, var(--bg-raised) 70%, transparent);
}

.process__steps {
	--node: 14px;
	position: relative;
	display: grid;
	gap: 36px;
	list-style: none;
	padding-left: 36px;
}

.process__steps::before,
.process__steps::after {
	content: "";
	position: absolute;
	left: calc(var(--node) / 2 - 0.5px);
	top: 6px;
	bottom: 6px;
	width: 1px;
	background: var(--line-strong);
}

.process__steps::after {
	width: 2px;
	left: calc(var(--node) / 2 - 1px);
	background: linear-gradient(180deg, var(--cyan), var(--accent-strong));
	transform: scaleY(var(--fill, 1));
	transform-origin: top;
}

.process__step {
	position: relative;
}

.process__node {
	position: absolute;
	top: 4px;
	left: -36px;
	width: var(--node);
	height: var(--node);
	border: 1px solid var(--accent);
	border-radius: 50%;
	background: var(--accent-strong);
	box-shadow: 0 0 0 5px rgb(61 149 255 / 0.14);
}

.process__title {
	font-size: 1.125rem;
	letter-spacing: -0.02em;
}

.process__text {
	margin-top: 8px;
	max-width: 36ch;
	color: var(--text-2);
	font-size: 0.95rem;
	line-height: 1.6;
}

@media (min-width: 960px) {
	.process__steps {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 28px;
		padding-left: 0;
		padding-top: 44px;
	}

	.process__steps::before,
	.process__steps::after {
		top: calc(var(--node) / 2 - 0.5px);
		bottom: auto;
		left: 0;
		right: 0;
		width: auto;
		height: 1px;
	}

	.process__steps::after {
		top: calc(var(--node) / 2 - 1px);
		height: 2px;
		background: linear-gradient(90deg, var(--cyan), var(--accent-strong));
		transform: scaleX(var(--fill, 1));
		transform-origin: left;
	}

	.process__node {
		top: -44px;
		left: 0;
	}
}

/* Stan przed animacją (tylko gdy działa JS i użytkownik nie ogranicza ruchu). */
@media (prefers-reduced-motion: no-preference) {
	.js [data-process] {
		--fill: 0;
	}

	.js [data-process]::after {
		transition: transform 1600ms var(--ease-in-out);
	}

	.js [data-process].is-visible {
		--fill: 1;
	}

	.js [data-process] .process__node {
		border-color: var(--line-strong);
		background: var(--bg);
		box-shadow: 0 0 0 0 rgb(61 149 255 / 0);
		transition:
			background-color 300ms ease,
			border-color 300ms ease,
			box-shadow 500ms var(--ease-out);
		transition-delay: calc(var(--i) * 300ms + 120ms);
	}

	.js [data-process].is-visible .process__node {
		border-color: var(--accent);
		background: var(--accent-strong);
		box-shadow: 0 0 0 5px rgb(61 149 255 / 0.14);
	}

	.js [data-process] .process__title,
	.js [data-process] .process__text {
		opacity: 0;
		transform: translateY(8px);
		transition: opacity 500ms ease, transform 600ms var(--ease-out);
		transition-delay: calc(var(--i) * 300ms + 180ms);
	}

	.js [data-process].is-visible .process__title,
	.js [data-process].is-visible .process__text {
		opacity: 1;
		transform: none;
	}
}

/* Realizacje */
.projects__grid {
	display: grid;
	gap: 16px;
}

.project {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	background: var(--surface);
	overflow: hidden;
}

.project__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--surface-2);
}

.project__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 700ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
	.project[data-spotlight]:hover .project__media img {
		transform: scale(1.04);
	}
}

.project__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: clamp(24px, 3vw, 32px);
}

.project__type {
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.project__title {
	font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
	letter-spacing: -0.025em;
}

/* Cała karta klikalna przez link w tytule (jeden link = czytelne dla czytników ekranu). */
.project__title a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.project__subtitle {
	display: block;
	margin-top: 6px;
	color: var(--text-3);
	font-size: 0.6em;
	font-weight: 500;
	letter-spacing: -0.01em;
}

.project__excerpt {
	color: var(--text-2);
	font-size: 0.975rem;
	line-height: 1.65;
}

.project__scope {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
}

/* Zakres prac: proste prostokątne etykiety (jak opisy na tabliczkach w rozdzielnicy). */
.project__scope li {
	padding: 6px 10px;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: rgb(255 255 255 / 0.035);
	color: var(--text-2);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.35;
}

.project__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
	color: var(--accent);
	font-size: 0.9rem;
	font-weight: 550;
}

.project__more .icon {
	transition: transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
	.project:hover .project__more .icon {
		transform: translate(2px, -2px);
	}
}

@media (min-width: 800px) {
	.projects__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.project--featured {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
		border-radius: var(--r-panel);
	}

	.project--featured .project__media {
		aspect-ratio: auto;
		min-height: 420px;
	}

	.project--featured .project__body {
		justify-content: center;
		padding: clamp(32px, 4vw, 56px);
	}

	.project--featured .project__title {
		font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.25rem);
	}
}

@media (min-width: 1100px) {
	.projects__grid--archive {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* 7. CTA i nagłówki podstron --------------------------------------------- */

.cta-band {
	padding-bottom: var(--section);
}

.cta-band__panel {
	display: grid;
	gap: 28px;
	padding: clamp(32px, 5vw, 64px);
	overflow: hidden;
}

.cta-band__panel::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: radial-gradient(60% 120% at 100% 0%, rgb(22 102 240 / 0.28), transparent 60%);
	pointer-events: none;
}

/* Animowane ścieżki prądu (canvas, main.js), widoczne głównie po prawej stronie panelu. */
.cta-band__circuit {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 75%);
	mask-image: linear-gradient(90deg, transparent 20%, #000 75%);
}

.cta-band__title {
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
	letter-spacing: -0.035em;
	line-height: 1.08;
}

.cta-band__text {
	margin-top: 14px;
	max-width: 52ch;
	color: var(--text-2);
	font-size: 1.0625rem;
}

.cta-band__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

@media (min-width: 960px) {
	.cta-band__panel {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: 48px;
	}
}

@media (max-width: 639px) {
	.cta-band__actions .btn {
		flex: 1 1 100%;
	}
}

.page-hero {
	position: relative;
	isolation: isolate;
	padding-block: clamp(56px, 9vw, 112px) clamp(40px, 6vw, 72px);
	overflow: hidden;
}

.page-hero__glow {
	position: absolute;
	inset: -40% -10% auto;
	z-index: -1;
	height: 140%;
	background: radial-gradient(40% 50% at 20% 40%, rgb(22 102 240 / 0.2), transparent 70%);
	-webkit-mask-image: radial-gradient(ellipse 60% 55% at 25% 50%, #000 10%, transparent 75%);
	mask-image: radial-gradient(ellipse 60% 55% at 25% 50%, #000 10%, transparent 75%);
	pointer-events: none;
}

.page-hero__title {
	max-width: 20ch;
	font-size: clamp(2.25rem, 1.35rem + 3.2vw, 3.75rem);
	font-weight: 640;
	line-height: 1.06;
	letter-spacing: -0.03em;
}

.page-hero__subtitle {
	display: block;
	margin-top: 10px;
	color: var(--text-3);
	font-size: 0.45em;
	font-weight: 500;
	letter-spacing: -0.015em;
}

.page-hero__lead {
	max-width: 60ch;
	margin-top: 22px;
	color: var(--text-2);
	font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
	line-height: 1.6;
}

.page-hero .project__scope {
	margin-top: 26px;
}

.page-hero--404 {
	min-height: 60vh;
	display: grid;
	align-items: center;
}

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
	color: var(--text-3);
	font-family: var(--font-mono);
	font-size: 0.8rem;
}

.breadcrumbs a {
	transition: color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
	.breadcrumbs a:hover {
		color: var(--text);
	}
}

/* 8. O firmie ------------------------------------------------------------- */

.story__grid {
	display: grid;
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
}

.story__copy .section-title {
	margin-bottom: 28px;
}

.story__media {
	margin: 0;
	aspect-ratio: 16 / 11;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-panel);
	overflow: hidden;
}

.story__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (min-width: 960px) {
	.story__grid {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	}
}

.about-services {
	padding-top: 0;
}

.about-services__list {
	display: grid;
	gap: 12px;
	list-style: none;
}

.about-services__item a {
	position: relative;
	display: grid;
	gap: 6px;
	height: 100%;
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	background: var(--surface);
	transition: border-color 200ms ease, background-color 200ms ease, transform 160ms var(--ease-out);
}

.about-services__item a:active {
	transform: scale(0.98);
}

.about-services__icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin-bottom: 14px;
	border-radius: 10px;
	background: var(--accent-soft);
	color: var(--accent);
}

.about-services__label {
	color: var(--text-3);
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.about-services__title {
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.about-services__arrow {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 18px;
	height: 18px;
	color: var(--text-3);
	transition: transform 200ms var(--ease-out), color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
	.about-services__item a:hover {
		border-color: var(--line-strong);
		background: var(--surface-2);
	}

	.about-services__item a:hover .about-services__arrow {
		color: var(--accent);
		transform: translate(2px, -2px);
	}
}

@media (min-width: 640px) {
	.about-services__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.about-services__list {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

.approach__list {
	display: grid;
}

.approach__item {
	display: grid;
	gap: 14px 32px;
	padding-block: 32px;
	border-top: 1px solid var(--line);
}

.approach__icon {
	color: var(--accent);
}

.approach__icon .icon {
	width: 32px;
	height: 32px;
}

.approach__title {
	font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
	letter-spacing: -0.025em;
}

.approach__text {
	max-width: 62ch;
	color: var(--text-2);
	font-size: 1.0625rem;
	line-height: 1.7;
}

@media (min-width: 900px) {
	.approach__item {
		grid-template-columns: 56px minmax(0, 0.8fr) minmax(0, 1.2fr);
		align-items: start;
	}
}

.mission {
	padding-top: 0;
}

.mission__grid {
	display: grid;
	gap: 16px;
}

.mission__panel {
	padding: clamp(28px, 4vw, 48px);
	border-radius: var(--r-panel);
}

.mission__panel--vision {
	border: 1px solid var(--accent-line);
	background:
		radial-gradient(90% 120% at 100% 100%, rgb(25 182 255 / 0.18), transparent 60%),
		linear-gradient(160deg, rgb(22 102 240 / 0.22), rgb(13 20 31 / 0.9));
}

.mission__title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 1.5rem;
	letter-spacing: -0.025em;
}

.mission__title .icon {
	width: 28px;
	height: 28px;
	color: var(--accent);
}

.mission__text {
	margin-top: 18px;
	color: var(--text-2);
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
	line-height: 1.7;
}

.mission__panel--vision .mission__text {
	color: var(--text);
}

@media (min-width: 900px) {
	.mission__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.reasons {
	padding-top: 0;
}

.reasons__grid {
	display: grid;
	gap: 40px;
}

.reasons__list {
	display: grid;
	gap: 14px;
	list-style: none;
}

.reasons__list li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 20px 22px;
	border-radius: var(--r-card);
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--text);
	font-size: 1rem;
	line-height: 1.5;
}

.reasons__list .icon {
	width: 22px;
	height: 22px;
	color: var(--accent);
}

@media (min-width: 640px) {
	.reasons__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.reasons__grid {
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
		gap: 64px;
	}

	.reasons__head {
		position: sticky;
		top: calc(var(--header-h) + 32px);
		align-self: start;
	}
}

/* 8a. Partnerzy ---------------------------------------------------------- */

.partner-list {
	padding-top: 0;
	padding-bottom: calc(var(--section) / 2);
}

/* Każdy partner: po lewej logo na jasnym kaflu i branża, po prawej opis i zakres współpracy. */
.partner {
	display: grid;
	gap: 24px;
	padding-block: clamp(36px, 5vw, 56px);
	border-top: 1px solid var(--line);
}

.partner:last-child {
	border-bottom: 1px solid var(--line);
}

.partner__logo {
	display: grid;
	place-items: center;
	height: 128px;
	padding: 20px 28px;
	border-radius: var(--r-card);
	background: #e4eaf2;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6);
}

.partner__logo img {
	width: auto;
	max-width: min(100%, 220px);
	max-height: 64px;
	object-fit: contain;
}

.partner__logo--tall {
	padding-block: 12px;
}

.partner__logo--tall img {
	max-height: 100px;
}

.partner__meta {
	margin-top: 14px;
	color: var(--text-3);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	line-height: 1.6;
	text-transform: uppercase;
}

.partner__name {
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
	letter-spacing: -0.03em;
	line-height: 1.1;
}

.partner__about,
.partner__work {
	max-width: 68ch;
	color: var(--text-2);
	font-size: 1.0625rem;
	line-height: 1.65;
}

.partner__about {
	margin-top: 14px;
}

.partner__label {
	margin-top: 26px;
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.partner__work {
	margin-top: 10px;
	color: var(--text);
}

.partner .project__scope {
	margin-top: 22px;
}

.partner__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 28px;
	margin-top: 26px;
}

.partner__site {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--text-2);
	font-family: var(--font-mono);
	font-size: 0.875rem;
	transition: color 200ms ease;
}

.partner__site .icon {
	width: 16px;
	height: 16px;
	transition: transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
	.partner__site:hover {
		color: var(--text);
	}

	.partner__site:hover .icon {
		transform: translate(2px, -2px);
	}
}

@media (min-width: 900px) {
	.partner {
		grid-template-columns: 280px minmax(0, 1fr);
		gap: 56px;
	}

	/* Logo i branża zostają w widoku, gdy czytasz dłuższy opis. */
	.partner__aside {
		position: sticky;
		top: calc(var(--header-h) + 32px);
		align-self: start;
	}
}

/* 9. Kontakt i formularz -------------------------------------------------- */

.contact {
	padding-top: clamp(8px, 2vw, 24px);
}

.contact__grid {
	display: grid;
	gap: 24px;
	align-items: start;
}

.contact__aside {
	display: grid;
	gap: 24px;
}

@media (min-width: 1024px) {
	.contact__grid {
		grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
		gap: 32px;
	}

	.contact__aside {
		position: sticky;
		top: calc(var(--header-h) + 24px);
	}
}

.person {
	padding: clamp(24px, 3.5vw, 36px);
}

.person__intro {
	color: var(--text-2);
	font-size: 1rem;
	line-height: 1.6;
}

.person__id {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-top: 24px;
}

.person__avatar {
	display: grid;
	place-items: center;
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: linear-gradient(140deg, var(--cyan), var(--accent-strong));
	color: #fff;
	font-weight: 650;
	letter-spacing: 0.02em;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3);
}

.person__name {
	font-size: 1.375rem;
	letter-spacing: -0.025em;
}

.person__role {
	margin-top: 2px;
	color: var(--text-3);
	font-size: 0.9rem;
}

.person__channels {
	display: grid;
	gap: 10px;
	margin-top: 24px;
	list-style: none;
}

.channel-row {
	display: flex;
	gap: 10px;
	align-items: stretch;
}

.channel {
	display: flex;
	flex: 1;
	min-width: 0;
	gap: 14px;
	align-items: center;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	background: rgb(255 255 255 / 0.02);
	transition: border-color 200ms ease, background-color 200ms ease, transform 160ms var(--ease-out);
}

.channel:active {
	transform: scale(0.98);
}

.channel__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--accent-soft);
	color: var(--accent);
}

.channel__text {
	display: grid;
	min-width: 0;
}

.channel__label {
	color: var(--text-3);
	font-size: 0.78rem;
}

/* Adres e-mail musi być widoczny w całości: zawija się zamiast ucinać wielokropkiem. */
.channel__value {
	font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
	font-weight: 550;
	font-variant-numeric: tabular-nums;
	overflow-wrap: break-word;
}

@media (max-width: 479px) {
	.channel-row {
		flex-direction: column;
	}

	.copy-btn {
		min-height: 44px;
	}
}

@media (hover: hover) and (pointer: fine) {
	.channel:hover {
		border-color: var(--accent-line);
		background: var(--accent-soft);
	}
}

/* Kopiowanie e-maila: etykieta zmienia się z rozmyciem (blur maskuje podmianę tekstu). */
.copy-btn {
	flex: none;
	min-width: 92px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	background: rgb(255 255 255 / 0.02);
	color: var(--text-2);
	font-size: 0.85rem;
	font-weight: 550;
	transition: transform 160ms var(--ease-out), border-color 200ms ease, color 200ms ease;
}

.copy-btn:active {
	transform: scale(0.96);
}

.copy-btn__label {
	display: inline-block;
	transition: filter 200ms ease, opacity 200ms ease;
}

.copy-btn.is-swapping .copy-btn__label {
	filter: blur(3px);
	opacity: 0;
}

.copy-btn.is-copied {
	border-color: var(--accent-line);
	color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
	.copy-btn:hover {
		color: var(--text);
		border-color: var(--line-strong);
	}
}

.person__hours {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-top: 18px;
	color: var(--text-3);
	font-size: 0.9rem;
}

.prepare {
	padding: 4px 8px;
}

.prepare__title {
	font-size: 1.0625rem;
	letter-spacing: -0.015em;
}

.prepare__list {
	display: grid;
	gap: 14px;
	margin-top: 18px;
	list-style: none;
}

.prepare__list li {
	display: flex;
	gap: 12px;
	color: var(--text-2);
	font-size: 0.95rem;
	line-height: 1.5;
}

.prepare__list .icon {
	width: 20px;
	height: 20px;
	margin-top: 1px;
	color: var(--accent);
}

.form {
	display: grid;
	gap: 22px;
	padding: clamp(24px, 4vw, 44px);
}

.form__title {
	font-size: clamp(1.5rem, 1.25rem + 0.8vw, 1.875rem);
	letter-spacing: -0.03em;
}

.form__hint {
	margin-top: -14px;
	color: var(--text-3);
	font-size: 0.875rem;
}

.form__row {
	display: grid;
	gap: 22px;
}

@media (min-width: 640px) {
	.form__row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px;
	}
}

.form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.field {
	display: grid;
	gap: 8px;
	align-content: start;
}

.field__label {
	color: var(--text);
	font-size: 0.875rem;
	font-weight: 550;
}

.field__label span {
	color: var(--accent);
}

/* 16px w polach = iOS nie powiększa strony przy fokusie. */
.field__input {
	width: 100%;
	min-height: 50px;
	padding: 12px 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-field);
	background: rgb(7 11 18 / 0.55);
	color: var(--text);
	font-size: 16px;
	line-height: 1.4;
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field__input--area {
	min-height: 150px;
	resize: vertical;
}

.field__input:hover {
	border-color: rgb(148 178 220 / 0.34);
}

.field__input:focus {
	outline: none;
	border-color: var(--accent);
	background: rgb(7 11 18 / 0.8);
	box-shadow: 0 0 0 3px rgb(61 149 255 / 0.25);
}

.field__input[aria-invalid="true"] {
	border-color: var(--danger);
}

.field__input[aria-invalid="true"]:focus {
	box-shadow: 0 0 0 3px rgb(255 138 138 / 0.22);
}

.field__select {
	position: relative;
}

.field__select select {
	appearance: none;
	padding-right: 44px;
	cursor: pointer;
}

.field__select select option {
	background: var(--surface);
}

.field__select::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 18px;
	width: 8px;
	height: 8px;
	border-right: 1.5px solid var(--text-2);
	border-bottom: 1.5px solid var(--text-2);
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

.field__help {
	color: var(--text-3);
	font-size: 0.8125rem;
}

.field__error {
	color: var(--danger);
	font-size: 0.8125rem;
	font-weight: 500;
}

.field__error:empty {
	display: none;
}

.field--check {
	grid-template-columns: auto 1fr;
	column-gap: 12px;
	align-items: start;
}

.field--check label {
	color: var(--text-2);
	font-size: 0.9rem;
	line-height: 1.5;
	cursor: pointer;
}

.field--check label a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.field--check .field__error {
	grid-column: 2;
}

.check {
	appearance: none;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	margin: 0;
	border: 1px solid var(--line-strong);
	border-radius: 6px;
	background: rgb(7 11 18 / 0.55);
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}

.check::after {
	content: "";
	width: 6px;
	height: 11px;
	margin-top: -2px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg) scale(0.6);
	opacity: 0;
	transition: transform 200ms var(--ease-out), opacity 160ms ease;
}

.check:checked {
	border-color: var(--accent-strong);
	background: var(--accent-strong);
}

.check:checked::after {
	transform: rotate(45deg) scale(1);
	opacity: 1;
}

.check:active {
	transform: scale(0.92);
}

.check[aria-invalid="true"] {
	border-color: var(--danger);
}

.form__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 20px;
	align-items: center;
}

.form__submit {
	min-width: 220px;
}

.form__submit .btn__content {
	display: inline-block;
	transition: filter 200ms ease, opacity 200ms ease;
}

.form__submit.is-swapping .btn__content {
	filter: blur(3px);
	opacity: 0.4;
}

.form__submit[disabled] {
	cursor: progress;
	opacity: 0.85;
}

.form__status {
	flex: 1 1 240px;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.form__status:empty {
	display: none;
}

.form__status[data-state="success"] {
	color: var(--success);
}

.form__status[data-state="error"] {
	color: var(--danger);
}

@media (max-width: 639px) {
	.form__submit {
		width: 100%;
	}
}

/* 10. Blog, wpis, treść --------------------------------------------------- */

.posts__grid {
	display: grid;
	gap: 16px;
}

.post-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	background: var(--surface);
	overflow: hidden;
}

.post-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--surface-2);
}

.post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 700ms var(--ease-out);
}

.post-card__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--accent);
	background: radial-gradient(circle at 50% 50%, rgb(22 102 240 / 0.22), transparent 70%);
}

.post-card__placeholder .icon {
	width: 40px;
	height: 40px;
}

@media (hover: hover) and (pointer: fine) {
	.post-card:hover .post-card__media img {
		transform: scale(1.04);
	}
}

.post-card__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
	padding: clamp(22px, 3vw, 30px);
}

.post-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	color: var(--text-3);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
}

.post-card__meta span {
	color: var(--accent);
}

.post-card__title {
	font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.post-card__title a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.post-card__excerpt {
	color: var(--text-2);
	font-size: 0.95rem;
	line-height: 1.6;
}

.post-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 8px;
	color: var(--accent);
	font-size: 0.875rem;
	font-weight: 550;
}

.post-card__more .icon {
	width: 16px;
	height: 16px;
	transition: transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
	.post-card:hover .post-card__more .icon {
		transform: translateX(3px);
	}
}

@media (min-width: 720px) {
	.posts__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.post-card--featured {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
		border-radius: var(--r-panel);
	}

	.post-card--featured .post-card__media {
		aspect-ratio: auto;
		min-height: 360px;
	}

	.post-card--featured .post-card__body {
		justify-content: center;
		padding: clamp(28px, 4vw, 52px);
	}

	.post-card--featured .post-card__title {
		font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.125rem);
		letter-spacing: -0.03em;
		line-height: 1.12;
	}

	.post-card--featured .post-card__more {
		margin-top: 12px;
	}
}

@media (min-width: 1100px) {
	.posts__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.pagination {
	margin-top: 48px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	color: var(--text-2);
	font-family: var(--font-mono);
	font-size: 0.875rem;
	transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}

.pagination .page-numbers.current {
	border-color: var(--accent-strong);
	background: var(--accent-strong);
	color: #fff;
}

@media (hover: hover) and (pointer: fine) {
	.pagination a.page-numbers:hover {
		border-color: var(--line-strong);
		color: var(--text);
	}
}

.empty {
	display: grid;
	justify-items: center;
	gap: 12px;
	max-width: 560px;
	margin-inline: auto;
	padding: clamp(32px, 6vw, 64px);
	text-align: center;
}

.empty__icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin-bottom: 8px;
	border-radius: 50%;
	background: var(--accent-soft);
	color: var(--accent);
}

.empty__icon .icon {
	width: 28px;
	height: 28px;
}

.empty__title {
	font-size: 1.5rem;
}

.empty__text {
	color: var(--text-2);
	margin-bottom: 12px;
}

/* Wpis */
.article__header {
	padding-bottom: clamp(32px, 5vw, 56px);
}

.article__title {
	font-size: clamp(2rem, 1.25rem + 2.8vw, 3.25rem);
	font-weight: 640;
	line-height: 1.1;
	letter-spacing: -0.028em;
}

.article__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-top: 22px;
	color: var(--text-3);
	font-family: var(--font-mono);
	font-size: 0.8rem;
}

.article__meta a {
	color: var(--accent);
}

.article__lead {
	margin-top: 26px;
	color: var(--text-2);
	font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
	line-height: 1.6;
}

.article__media {
	margin-block: 0 clamp(40px, 6vw, 72px);
}

.article__media img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-panel);
}

.article__footer {
	margin-top: 56px;
	padding-block: 32px var(--section);
	border-top: 1px solid var(--line);
}

/* Treść z edytora (wpisy, strony, realizacje). */
.prose {
	color: var(--text-2);
	font-size: 1.0625rem;
	line-height: 1.78;
}

.prose > * + * {
	margin-top: 1.25em;
}

.prose--lead {
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
}

.prose h2 {
	margin-top: 2.2em;
	color: var(--text);
	font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
	letter-spacing: -0.03em;
}

.prose h3 {
	margin-top: 1.8em;
	color: var(--text);
	font-size: 1.25rem;
}

.prose h2 + *,
.prose h3 + * {
	margin-top: 0.7em;
}

.prose strong {
	color: var(--text);
	font-weight: 600;
}

.prose a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.prose ul,
.prose ol {
	display: grid;
	gap: 0.7em;
	padding-left: 1.4em;
}

.prose ul li::marker {
	color: var(--accent);
}

.prose ol li::marker {
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.9em;
}

.prose blockquote {
	margin-inline: 0;
	padding: 4px 0 4px 24px;
	border-left: 2px solid var(--accent);
	color: var(--text);
	font-size: 1.1875rem;
}

.prose img,
.prose .wp-block-image img {
	border-radius: var(--r-card);
}

.prose figcaption {
	margin-top: 10px;
	color: var(--text-3);
	font-size: 0.875rem;
	text-align: center;
}

/* Znacznik brakujących danych w polityce prywatności ([uzupełnij: ...]). */
.prose mark.placeholder {
	padding: 1px 6px;
	border-radius: 4px;
	background: rgb(255 200 80 / 0.16);
	color: #ffd27a;
	font-family: var(--font-mono);
	font-size: 0.85em;
}

.prose hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin-block: 2.5em;
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.prose th,
.prose td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.prose th {
	color: var(--text);
}

/* Galeria w realizacjach (blok Galeria z Gutenberga). */
.prose .wp-block-gallery.has-nested-images {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 12px;
}

.prose .wp-block-gallery.has-nested-images figure.wp-block-image {
	width: 100% !important;
	margin: 0 !important;
}

.prose .wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.case__content {
	max-width: none;
}

.case__content > p {
	max-width: 68ch;
}

/* 11. Stopka -------------------------------------------------------------- */

.site-footer {
	border-top: 1px solid var(--line);
	background: linear-gradient(180deg, var(--bg-raised), var(--bg));
	padding-block: clamp(56px, 7vw, 88px) 28px;
}

.site-footer__grid {
	display: grid;
	gap: 40px;
}

.site-footer__tagline {
	max-width: 36ch;
	margin-top: 20px;
	color: var(--text-3);
	font-size: 0.95rem;
	line-height: 1.6;
}

.site-footer__heading {
	margin-bottom: 18px;
	color: var(--text);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0;
}

.site-footer__links,
.site-footer__contact {
	display: grid;
	gap: 12px;
	list-style: none;
}

.site-footer__links a,
.site-footer__contact a,
.site-footer__static {
	display: inline-flex;
	gap: 10px;
	align-items: flex-start;
	color: var(--text-2);
	font-size: 0.95rem;
	line-height: 1.45;
	transition: color 200ms ease;
}

.site-footer__contact span {
	min-width: 0;
	overflow-wrap: break-word;
}

.site-footer__contact .icon {
	width: 18px;
	height: 18px;
	margin-top: 1px;
	color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
	.site-footer__links a:hover,
	.site-footer__contact a:hover {
		color: var(--text);
	}
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px 24px;
	margin-top: clamp(48px, 6vw, 72px);
	padding-top: 24px;
	border-top: 1px solid var(--line);
	color: var(--text-3);
	font-size: 0.85rem;
}

.site-footer__bottom a {
	transition: color 200ms ease;
}

.site-footer__nip {
	margin-left: 12px;
}

@media (hover: hover) and (pointer: fine) {
	.site-footer__bottom a:hover {
		color: var(--text);
	}
}

@media (min-width: 640px) {
	.site-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.site-footer__grid {
		grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
		gap: 48px;
	}
}

/* 12. Animacje wejścia przy przewijaniu ----------------------------------- */

/* Elementy są ukryte tylko wtedy, gdy działa JS (klasa .js na <html>),
   więc bez JS cała treść jest od razu widoczna. */
@media (prefers-reduced-motion: no-preference) {
	.js [data-reveal] {
		opacity: 0;
		transform: translateY(18px);
		transition:
			opacity 700ms var(--ease-out) var(--reveal-delay, 0ms),
			transform 800ms var(--ease-out) var(--reveal-delay, 0ms);
	}

	.js [data-reveal].is-visible {
		opacity: 1;
		transform: none;
	}

	.js [data-reveal] .eyebrow::before {
		transform: scaleX(0);
		transition: transform 900ms var(--ease-out) calc(var(--reveal-delay, 0ms) + 250ms);
	}

	.js [data-reveal].is-visible .eyebrow::before {
		transform: none;
	}

	/* Zdjęcia odsłaniane od dołu przez clip-path (bez zmiany układu strony). */
	.js [data-clip-reveal] img {
		clip-path: inset(0 0 100% 0);
		transform: scale(1.08);
		transition:
			clip-path 1100ms var(--ease-in-out) calc(var(--reveal-delay, 0ms) + 80ms),
			transform 1400ms var(--ease-out) calc(var(--reveal-delay, 0ms) + 80ms);
	}

	/* Przejście ze stanu docelowego: bez opóźnienia dla transform, żeby późniejszy
	   hover (powiększenie zdjęcia) reagował od razu. */
	.js .is-visible [data-clip-reveal] img,
	.js [data-clip-reveal].is-visible img {
		clip-path: inset(0 0 0 0);
		transform: none;
		transition:
			clip-path 1100ms var(--ease-in-out) calc(var(--reveal-delay, 0ms) + 80ms),
			transform 900ms var(--ease-out);
	}
}

/* Ograniczony ruch: zostają tylko łagodne przejścia przezroczystości. */
@media (prefers-reduced-motion: reduce) {
	.js [data-reveal] {
		opacity: 0;
		transition: opacity 400ms ease;
	}

	.js [data-reveal].is-visible {
		opacity: 1;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
	}

	.nav,
	.nav__list li,
	.service__media img,
	.project__media img,
	.post-card__media img {
		transform: none !important;
	}
}
