/*
 * Planto — warianty bloków (Style w panelu bloku) i sekcje wzorców.
 * Tokeny z theme.json; bez !important i bez wartości spoza systemu.
 */

/* ---------- Akapit ---------- */

/* Etykieta: tylko tam, gdzie identyfikuje (kod, styl, kategoria, nazwa lokalizacji). */
.is-style-etykieta {
	font-size: var(--wp--preset--font-size--s);
	font-weight: 500;
	letter-spacing: var(--wp--custom--tekst--rozstrzelenie);
	text-transform: uppercase;
	color: var(--wp--preset--color--grafit);
}

.is-style-etykieta a {
	color: inherit;
	text-decoration: none;
}

.has-rama-background-color .is-style-etykieta,
.has-rama-background-color.is-style-etykieta {
	color: var(--wp--preset--color--jasny-na-ciemnym);
}

.is-style-lead,
.is-style-lead p {
	font-size: var(--wp--preset--font-size--l);
	line-height: 1.6;
	max-width: 46rem;
}

/* Odpowiedź na początku podstrony (pierwszy akapit treści): większa i lżejsza, pod H1 na tej samej osi. */
.wp-block-post-content > .is-style-lead:first-child {
	margin-top: 0;
	color: var(--wp--preset--color--rama);
	font-weight: 300;
	line-height: 1.5;
}

@media (min-width: 48rem) {
	.wp-block-post-content > .is-style-lead:first-child {
		font-size: var(--wp--preset--font-size--xl);
		line-height: 1.45;
	}
}

.wp-block-post-excerpt.is-style-lead {
	color: inherit;
}

.wp-block-post-excerpt.is-style-lead .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.is-style-kod {
	margin: 0;
	font-size: var(--wp--preset--font-size--ekspozycja);
	font-weight: 200;
	line-height: 0.9;
	letter-spacing: 0.1em;
}

/* ---------- Obraz i galeria ---------- */

/* Podpis magazynowy: jak etykieta na próbniku w studiu — krótka kreska w kolorze dębu i opis. */
/* Zwykły tekst (nie flex): link i dalszy ciąg podpisu „, styl Noir" płyną w jednym wierszu bez odstępu. */
.is-style-podpis-magazynowy figcaption,
.is-style-podpis-magazynowy .wp-element-caption {
	position: relative;
	margin-top: 0.75rem;
	padding-left: 2.25rem;
	text-align: left;
}

.is-style-podpis-magazynowy figcaption::before,
.is-style-podpis-magazynowy > .wp-element-caption::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.7em;
	width: 1.5rem;
	height: 2px;
	background: var(--wp--preset--color--dab);
}

.wp-block-gallery.is-style-podpis-magazynowy .wp-block-image figcaption {
	position: static;
	padding: 0;
	background: none;
	color: var(--wp--preset--color--grafit);
	font-size: var(--wp--preset--font-size--s);
	max-height: none;
}

.wp-block-gallery.is-style-podpis-magazynowy .wp-block-image figcaption::before {
	display: none;
}

/* Plansza na ciemnym tle: jedno pionowe zdjęcie na antracycie — jak w karcie realizacji. */
.wp-block-image.is-style-na-ciemnym {
	padding: var(--wp--preset--spacing--70) clamp(var(--wp--preset--spacing--margines), 12vw, 15rem);
	background: var(--wp--preset--color--rama);
	color: var(--wp--preset--color--jasny-na-ciemnym);
	border-radius: 0;
}

.wp-block-image.is-style-na-ciemnym img {
	display: block;
	max-height: 86vh;
	width: auto;
	margin-inline: auto;
	border-radius: var(--wp--custom--krawedz);
}

.wp-block-image.is-style-na-ciemnym figcaption {
	text-align: center;
	color: inherit;
}

/* Galerie: szczelina jak między frontami, zdjęcia przycięte równo. */
.wp-block-gallery.has-nested-images figure.wp-block-image img {
	border-radius: var(--wp--custom--krawedz);
}

/* ---------- Grupy (boksy) ---------- */

.is-style-w-skrocie {
	padding-block: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--rama);
	border-bottom: 1px solid var(--wp--preset--color--rama);
}

.is-style-w-skrocie > :first-child {
	margin-top: 0;
}

.is-style-w-skrocie > :last-child {
	margin-bottom: 0;
}

.is-style-definicja {
	padding-block: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--rama);
	border-bottom: 1px solid var(--wp--preset--color--rama);
}

.is-style-definicja > * {
	margin-block: 0.5rem;
}

.is-style-definicja dfn,
.is-style-definicja strong:first-child {
	font-style: normal;
	font-size: var(--wp--preset--font-size--l);
	font-weight: 400;
}

.is-style-uwaga {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border-left: 2px solid var(--wp--preset--color--dab);
	background: var(--wp--preset--color--konglomerat);
	font-size: var(--wp--preset--font-size--s);
}

.is-style-uwaga > * {
	margin-block: 0;
}

/* Karta z linkiem: zdjęcie, nazwa, opis — cała karta klikalna przez link w nazwie. */
.is-style-karta {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
}

.is-style-karta > * {
	margin: 0;
}

.is-style-karta .wp-block-image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--wp--preset--color--konglomerat);
}

.is-style-karta .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Karta bez zdjęcia w rzędzie kart ze zdjęciami: puste pole w proporcji zdjęcia, żeby tytuły stały w jednej linii. */
.planto-karty:has(.wp-block-image) > .is-style-karta:not(:has(> .wp-block-image))::before {
	content: "";
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--konglomerat);
	border-radius: var(--wp--custom--krawedz);
}

.is-style-karta h3 a,
.is-style-karta h2 a {
	text-decoration: none;
}

.is-style-karta h3 a::after,
.is-style-karta h2 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.is-style-karta:hover h3 a,
.is-style-karta:focus-within h3 a,
.is-style-karta:hover h2 a,
.is-style-karta:focus-within h2 a {
	text-decoration: underline;
}

.is-style-karta:focus-within {
	outline: 2px solid var(--wp--preset--color--rama);
	outline-offset: 6px;
}

.is-style-karta :focus-visible {
	outline: none;
}

/* ---------- Listy ---------- */

.is-style-kreska {
	padding-left: 0;
	list-style: none;
	border-top: 1px solid var(--wp--preset--color--posadzka);
}

.is-style-kreska > li {
	position: relative;
	margin: 0;
	padding: 0.75rem 0 0.75rem 1.75rem;
	border-bottom: 1px solid var(--wp--preset--color--posadzka);
}

.is-style-kreska > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: calc(0.75rem + 0.8em);
	width: 0.75rem;
	height: 1px;
	background: currentColor;
}

/*
 * „Zobacz również": lista na końcu strony pisana większym krojem (nie drobne wersaliki). Przy najechaniu
 * tekst przesuwa się, a z lewej wysuwa się kreska w kolorze dąb — jak listwa uchwytu przy froncie.
 * Kolumny liczy wspólna zasada siatek (niżej): 3 linki → trzy kolumny, 4 → 2 × 2 albo cztery.
 */
.is-style-linki {
	column-gap: var(--wp--preset--spacing--50);
	padding-left: 0;
	list-style: none;
	border-top: 1px solid var(--wp--preset--color--rama);
}

.is-style-linki > li {
	margin: 0;
	overflow: hidden;
	border-bottom: 1px solid var(--wp--preset--color--posadzka);
}

.is-style-linki a {
	position: relative;
	display: block;
	padding: var(--wp--preset--spacing--40) 2.25rem var(--wp--preset--spacing--40) 0;
	font-size: var(--wp--preset--font-size--l);
	font-weight: 300;
	line-height: 1.3;
	text-decoration: none;
	transition: transform var(--wp--custom--ruch--krotki) var(--wp--custom--ruch--krzywa);
}

.is-style-linki a::before {
	content: "";
	position: absolute;
	left: -2.25rem;
	top: 50%;
	width: 1.5rem;
	height: 2px;
	background: var(--wp--preset--color--dab);
}

.is-style-linki a:hover,
.is-style-linki a:focus-visible {
	transform: translateX(2.25rem);
}

@media (prefers-reduced-motion: reduce) {
	.is-style-linki a {
		transition: none;
	}
}

/* ---------- Przyciski ---------- */

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: currentColor;
	border: 1px solid currentColor;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--rama);
	color: var(--wp--preset--color--bialy-mat);
	border-color: var(--wp--preset--color--rama);
}

.has-rama-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--bialy-mat);
	color: var(--wp--preset--color--rama);
	border-color: var(--wp--preset--color--bialy-mat);
}

.wp-block-button.is-style-jasny > .wp-block-button__link {
	background: var(--wp--preset--color--bialy-mat);
	color: var(--wp--preset--color--rama);
	border-color: var(--wp--preset--color--bialy-mat);
}

.wp-block-button.is-style-jasny > .wp-block-button__link:hover {
	background: var(--wp--preset--color--konglomerat);
	border-color: var(--wp--preset--color--konglomerat);
	color: var(--wp--preset--color--rama);
}

.wp-block-button.is-style-tekstowy > .wp-block-button__link {
	padding: 0.25rem 0;
	background: transparent;
	color: inherit;
	border: 0;
	border-radius: 0;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.35em;
}

.wp-block-button.is-style-tekstowy > .wp-block-button__link:hover {
	background: transparent;
	color: inherit;
	text-decoration-color: var(--wp--preset--color--dab);
	text-decoration-thickness: 2px;
}

.planto-stopka .wp-block-button.is-style-tekstowy > .wp-block-button__link,
.planto-menu .wp-block-button.is-style-tekstowy > .wp-block-button__link {
	font-size: var(--wp--preset--font-size--s);
	letter-spacing: 0.04em;
	text-transform: none;
	font-weight: 400;
}

/* ---------- Sekcje wzorców ---------- */

.planto-sekcja {
	padding-block: var(--wp--preset--spacing--70);
}

/* Zdjęcia tła w sekcjach z układem „constrained” muszą zignorować szerokość treści. */
.planto-hero-start > .wp-block-image,
.planto-produkcja > .wp-block-image,
.planto-zaproszenie-start > .wp-block-image {
	max-width: none;
	width: auto;
	margin-inline: 0;
}

/*
 * Sekcje-plansze (flex w kolumnie): automatyczne marginesy układu „constrained" wyłączają rozciąganie
 * we flexie, więc dzieci brały szerokość z treści — siatka faktów w produkcji wystawała i była ucinana.
 */
.planto-hero-start > :not(.wp-block-image),
.planto-produkcja > :not(.wp-block-image),
.planto-zaproszenie-start > :not(.wp-block-image) {
	width: 100%;
}

.planto-sekcja__naglowek {
	margin-bottom: var(--wp--preset--spacing--60);
}

.planto-sekcja__naglowek > * {
	margin-block: 0;
}

.planto-sekcja__naglowek > * + * {
	margin-top: var(--wp--preset--spacing--30);
}


/* Hero strony głównej: pełne zdjęcie, hasło w lewym dolnym rogu. */
.planto-hero-start {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: min(100svh, 64rem);
	margin-top: 0;
	padding-bottom: var(--wp--preset--spacing--60);
	overflow: hidden;
	background: var(--wp--preset--color--rama);
	color: var(--wp--preset--color--bialy-mat);
}

/* Na telefonie i tablecie dół ekranu zajmuje pasek „Zadzwoń / Napisz" — hero kończy się nad nim. */
@media (max-width: 61.99rem) {
	.planto-hero-start {
		min-height: min(calc(100svh - var(--wp--custom--pasek-mobilny--wysokosc)), 64rem);
	}
}

.planto-hero-start > .wp-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
}

.planto-hero-start > .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.planto-hero-start::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, color-mix(in srgb, var(--wp--preset--color--rama) 40%, transparent) 0%, transparent 28%),
		linear-gradient(0deg, color-mix(in srgb, var(--wp--preset--color--rama) 62%, transparent) 0%, transparent 46%);
	pointer-events: none;
}

.planto-hero-start > :not(.wp-block-image) {
	position: relative;
	z-index: 1;
}

.planto-hero-start__haslo {
	margin: 0;
	font-size: var(--wp--preset--font-size--ekspozycja);
	font-weight: 200;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/*
 * Jedyny ruch na stronie: przy wejściu dwa antracytowe fronty ze szczeliną pośrodku rozsuwają się
 * i odsłaniają zdjęcie, potem pojawia się hasło. Raz, tylko w hero strony głównej; przy
 * prefers-reduced-motion od razu stan końcowy. Wyłącznie transform i opacity.
 */
@media (prefers-reduced-motion: no-preference) {
	.planto-hero-start > .wp-block-image::before,
	.planto-hero-start > .wp-block-image::after {
		content: "";
		position: absolute;
		top: 0;
		bottom: 0;
		z-index: 1;
		width: calc(50% - var(--wp--custom--szczelina) / 2);
		background: var(--wp--preset--color--rama);
		animation: 1.1s var(--wp--custom--ruch--krzywa) 0.25s both;
		pointer-events: none;
	}

	.planto-hero-start > .wp-block-image::before {
		left: 0;
		animation-name: planto-front-lewy;
	}

	.planto-hero-start > .wp-block-image::after {
		right: 0;
		animation-name: planto-front-prawy;
	}

	.planto-hero-start__haslo,
	.planto-hero-start__dol {
		animation: planto-haslo 0.9s var(--wp--custom--ruch--krzywa) 1s both;
	}

	.planto-hero-start__dol {
		animation-delay: 1.2s;
	}
}

@keyframes planto-front-lewy {
	to {
		transform: translateX(-100%);
	}
}

@keyframes planto-front-prawy {
	to {
		transform: translateX(100%);
	}
}

@keyframes planto-haslo {
	from {
		opacity: 0;
		transform: translateY(1.5rem);
	}
}

.planto-hero-start__dol {
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	align-items: baseline;
	margin-top: var(--wp--preset--spacing--40);
}

.planto-hero-start__dol > * {
	margin: 0;
}

.planto-hero-start .is-style-etykieta {
	color: var(--wp--preset--color--bialy-mat);
}

.planto-hero-start a {
	color: inherit;
}

/* Manifest: tekst i pionowe zdjęcie. */
.planto-manifest {
	gap: var(--wp--preset--spacing--70);
	align-items: center;
}

.planto-manifest .wp-block-image img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	width: 100%;
}

/*
 * Obok tekstu zdjęcie przyjmuje wysokość kolumny tekstu i jest kadrowane — zamiast narzucać swój pionowy
 * format i przerastać tekst o połowę.
 */
@media (min-width: 48.875rem) {
	.wp-block-columns.planto-manifest {
		align-items: stretch;
	}

	.wp-block-columns.planto-manifest > .wp-block-column {
		align-self: stretch;
	}

	.wp-block-columns.planto-manifest > .wp-block-column:has(> .wp-block-image) {
		display: flex;
		flex-direction: column;
	}

	.planto-manifest .wp-block-image {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		min-height: 24rem;
		margin: 0;
	}

	.planto-manifest .wp-block-image img {
		flex: 1 1 auto;
		height: 0;
		aspect-ratio: auto;
	}
}

.planto-fakty {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--posadzka);
}

.planto-fakty > * {
	margin: 0;
}

.planto-fakty strong {
	display: block;
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 400;
}

/* Style: mozaika czterech kafelków ze szczeliną. */
.planto-style-mozaika .wp-block-term-template {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--custom--szczelina);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 48rem) {
	/* minmax(0, 1fr): kolumna nie rośnie od najdłuższego słowa („GLAMOUR"), więc kafelki są równe. */
	.planto-style-mozaika .wp-block-term-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* margin: 0 — układ „flow" WordPressa dodaje każdemu kolejnemu kafelkowi górny margines i przesuwa go w rzędzie. */
.planto-style-mozaika .wp-block-term-template > li {
	position: relative;
	margin: 0;
	display: grid;
	place-content: center;
	aspect-ratio: 4 / 3;
	padding: var(--wp--preset--spacing--40);
	overflow: hidden;
	background: var(--wp--preset--color--rama);
	color: var(--wp--preset--color--bialy-mat);
	text-align: center;
	border-radius: var(--wp--custom--krawedz);
}

.planto-style-mozaika .wp-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
}

.planto-style-mozaika .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.78;
	transition: opacity var(--wp--custom--ruch--krotki) ease;
}

.planto-style-mozaika li:hover .wp-block-image img,
.planto-style-mozaika li:focus-within .wp-block-image img {
	opacity: 0.6;
}

.planto-style-mozaika .wp-block-term-name,
.planto-style-mozaika p {
	position: relative;
	z-index: 1;
	margin: 0;
}

.planto-style-mozaika .wp-block-term-name {
	font-size: var(--wp--preset--font-size--xxl);
	font-weight: 300;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.planto-style-mozaika .wp-block-term-name a {
	color: inherit;
	text-decoration: none;
}

.planto-style-mozaika .wp-block-term-name a::after {
	content: "";
	position: absolute;
	inset: -100vmax;
}

.planto-style-mozaika li {
	isolation: isolate;
}

/* Kolor ramy: kontrast wskaźnika fokusu na białym macie 15:1 (dąb miałby ok. 2:1). */
.planto-style-mozaika li:has(:focus-visible) {
	outline: 2px solid var(--wp--preset--color--rama);
	outline-offset: 3px;
}

.planto-style-mozaika .wp-block-term-name a:focus-visible {
	outline: none;
}

.planto-style-mozaika__zdanie {
	max-width: 22rem;
	margin-top: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--s);
}

/* Dwa kafelki w rzędzie: zdanie zawsze na wysokość dwóch wierszy, żeby nazwy stylów stały w jednej linii. */
@media (min-width: 48rem) {
	.planto-style-mozaika__zdanie {
		min-height: 2lh;
	}
}

/* Produkcja: ciemna sekcja ze zdjęciem w tle. */
.planto-produkcja {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: min(90svh, 56rem);
	padding-block: var(--wp--preset--spacing--70);
	overflow: hidden;
}

.planto-produkcja > .wp-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
}

.planto-produkcja > .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.55;
	border-radius: 0;
}

.planto-produkcja > :not(.wp-block-image) {
	position: relative;
	z-index: 1;
}

.planto-produkcja h2 {
	font-size: var(--wp--preset--font-size--xxxl);
	font-weight: 200;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* Proces: siedem etapów (prawdziwa sekwencja — dlatego numery). */
.planto-proces {
	gap: var(--wp--preset--spacing--70);
}

@media (min-width: 62rem) {
	.planto-proces__zdjecie {
		position: sticky;
		top: calc(var(--wp--custom--naglowek--wysokosc) + var(--wp--preset--spacing--40));
		align-self: flex-start;
	}
}

.planto-proces__zdjecie img {
	aspect-ratio: 1;
	object-fit: cover;
	width: 100%;
}

.planto-etapy {
	margin: var(--wp--preset--spacing--50) 0 0;
	padding: 0;
	list-style: none;
	counter-reset: planto-etap;
	border-top: 1px solid var(--wp--preset--color--rama);
}

.planto-etapy > li {
	position: relative;
	margin: 0;
	padding: var(--wp--preset--spacing--40) 0 var(--wp--preset--spacing--40) 4.5rem;
	border-bottom: 1px solid var(--wp--preset--color--posadzka);
	counter-increment: planto-etap;
}

.planto-etapy > li::before {
	content: counter(planto-etap, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 200;
	line-height: 1.1;
}

.planto-etapy strong {
	display: block;
	font-size: var(--wp--preset--font-size--s);
	font-weight: 500;
	letter-spacing: var(--wp--custom--tekst--rozstrzelenie);
	text-transform: uppercase;
}

/* Partnerzy: zwykła lista marek według kategorii (bez przesuwającej się taśmy). */
.planto-partnerzy {
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
}

.planto-partnerzy p {
	margin: 0;
}

.planto-partnerzy .is-style-etykieta {
	margin-bottom: var(--wp--preset--spacing--20);
}

/* Studia: trzy kolumny z adresem i statusem. */
.planto-studia {
	display: grid;
	gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}

.planto-studia > * {
	margin: 0;
}

.planto-studio .wp-block-planto-mapa {
	aspect-ratio: 3 / 2;
	margin-bottom: var(--wp--preset--spacing--40);
}

/* W kafelku studia minimum wyznacza proporcja 3:2; dłuższa treść zaślepki powiększa pudełko. */
.planto-studio .planto-mapa__zaslona {
	min-height: 0;
	padding: var(--wp--preset--spacing--40);
}

.planto-studio .wp-block-image {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--wp--preset--color--konglomerat);
	margin-bottom: var(--wp--preset--spacing--40);
}

.planto-studio .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Kafelki zaproszenia na stronie głównej: cztery sposoby kontaktu. */
.planto-zaproszenie-start {
	position: relative;
	min-height: min(100svh, 56rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-block: var(--wp--preset--spacing--70);
	overflow: hidden;
}

.planto-zaproszenie-start > .wp-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
}

.planto-zaproszenie-start > .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.4;
	border-radius: 0;
}

.planto-zaproszenie-start > :not(.wp-block-image) {
	position: relative;
	z-index: 1;
}

.planto-zaproszenie-start h2 {
	font-size: var(--wp--preset--font-size--ekspozycja);
	font-weight: 200;
	line-height: 1.05;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.planto-zaproszenie-start p {
	color: var(--wp--preset--color--bialy-mat);
}

/* Karty w siatce (zabudowy, materiały, studia). */
.planto-karty {
	display: grid;
	gap: var(--wp--preset--spacing--50) var(--wp--custom--szczelina);
}

.planto-karty > * {
	margin: 0;
}

/* Para zdjęć w treści. */
/* Para zdjęć: zawsze dwa obok siebie i ten sam kadr 4:5 — na telefonie nie dwa wysokie zdjęcia jedno pod drugim. */
.wp-block-columns.planto-para-zdjec {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--wp--custom--szczelina);
}

.wp-block-columns.planto-para-zdjec > .wp-block-column {
	min-width: 0;
}

.planto-para-zdjec .wp-block-image img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	width: 100%;
}

/* FAQ — sekcja na tle konglomeratu. */
.planto-faq-sekcja {
	padding-block: var(--wp--preset--spacing--70);
}

/* Kontakt: formularz obok danych studiów. */
.planto-kontakt {
	gap: var(--wp--preset--spacing--70);
}

/*
 * Siatki liczone od liczby elementów — bez sierot w ostatnim rzędzie (3 + 1, 2 + 1).
 * Siatka jest własnym kontenerem zapytań: liczba kolumn zależy od jej szerokości, nie od okna, więc te
 * same fakty układają się 2 × 2 w połowie kolumny (manifest) i 4 w rzędzie na pełną szerokość (produkcja).
 * 12 kolumn pomocniczych; element zajmuje 12, 8, 6, 4 albo 3 z nich.
 *   od 30rem po dwa, a przy nieparzystej liczbie pierwszy na całą szerokość (3 = 1 + 2, 7 = 1 + 2 + 2 + 2);
 *   3 → po trzy (od 40rem), 5 → dwa większe + trzy mniejsze (od 40rem), 4 → po cztery (od 44rem);
 *   6 i więcej → po trzy (od 48rem): reszta 1 → dwa pierwsze i dwa ostatnie po połowie (7 = 2 + 3 + 2),
 *   reszta 2 → dwa pierwsze po połowie (8 = 2 + 3 + 3); jeden element od 48rem stoi na środku.
 */
:is(.planto-fakty, .planto-karty, .planto-studia, .planto-partnerzy, .planto-stopka__adresy, .is-style-linki, .planto-wpisy .wp-block-post-template) {
	container-type: inline-size;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
}

/*
 * 12 kolumn = 11 odstępów: odstęp kolumn najwyżej 1/16 szerokości siatki. Inaczej na telefonie suma odstępów
 * (np. 11 × 40 px w „Markach") była szersza niż ekran i tekst wychodził poza prawą krawędź.
 */
:root :is(.planto-fakty, .planto-studia, .planto-stopka__adresy) {
	column-gap: min(var(--wp--preset--spacing--40), 6.25%);
}

:root .is-style-linki {
	column-gap: min(var(--wp--preset--spacing--50), 6.25%);
}

:root .planto-partnerzy {
	column-gap: min(var(--wp--preset--spacing--60), 6.25%);
}

/* Odstępy daje gap; margines z układu „flow" przesuwałby elementy w rzędzie (wszystkie poza pierwszym). */
:is(.planto-fakty, .planto-karty, .planto-studia, .planto-partnerzy, .planto-stopka__adresy, .is-style-linki, .planto-wpisy .wp-block-post-template) > * {
	grid-column: span 12;
	min-width: 0;
	margin-block: 0;
}

/* Krótkie fakty mieszczą się po dwa już na telefonie. */
@container (min-width: 18rem) {
	.planto-fakty:has(> :nth-child(4):last-child) > *,
	.planto-fakty:has(> :nth-child(2):last-child) > * {
		grid-column: span 6;
	}
}

@container (min-width: 30rem) {
	:is(.planto-karty, .planto-studia, .planto-partnerzy, .planto-stopka__adresy, .is-style-linki, .planto-wpisy .wp-block-post-template) > * {
		grid-column: span 6;
	}

	:is(.planto-karty, .planto-studia, .planto-partnerzy, .planto-stopka__adresy, .is-style-linki, .planto-wpisy .wp-block-post-template):has(> :only-child) > :only-child {
		grid-column: span 12;
	}
}

@container (min-width: 30rem) and (max-width: 39.99rem) {
	:is(.planto-karty, .planto-studia, .planto-partnerzy, .planto-stopka__adresy, .is-style-linki, .planto-wpisy .wp-block-post-template):has(> :nth-child(2n + 1):last-child) > :first-child {
		grid-column: span 12;
	}
}

/* Od 40rem 3 i 5 mają własny układ (niżej), więc pierwszy na całą szerokość tylko przy 7, 9, … */
@container (min-width: 40rem) and (max-width: 47.99rem) {
	:is(.planto-karty, .planto-studia, .planto-partnerzy, .planto-stopka__adresy, .is-style-linki, .planto-wpisy .wp-block-post-template):has(> :nth-child(2n + 7):last-child) > :first-child {
		grid-column: span 12;
	}
}

@container (min-width: 40rem) {
	:is(.planto-fakty, .planto-karty, .planto-studia, .planto-partnerzy, .planto-stopka__adresy, .is-style-linki, .planto-wpisy .wp-block-post-template):has(> :nth-child(3):last-child) > * {
		grid-column: span 4;
	}

	:is(.planto-karty, .planto-studia, .planto-partnerzy, .is-style-linki, .planto-wpisy .wp-block-post-template):has(> :nth-child(5):last-child) > * {
		grid-column: span 4;
	}

	:is(.planto-karty, .planto-studia, .planto-partnerzy, .is-style-linki, .planto-wpisy .wp-block-post-template):has(> :nth-child(5):last-child) > :nth-child(-n + 2) {
		grid-column: span 6;
	}
}

@container (min-width: 44rem) {
	:is(.planto-fakty, .planto-karty, .planto-studia, .planto-partnerzy, .planto-stopka__adresy, .is-style-linki, .planto-wpisy .wp-block-post-template):has(> :nth-child(4):last-child) > * {
		grid-column: span 3;
	}
}

@container (min-width: 48rem) {
	/* 6 i więcej elementów (np. dziennik): po trzy. */
	:is(.planto-karty, .planto-studia, .planto-partnerzy, .planto-wpisy .wp-block-post-template):not(:has(> :nth-child(2):last-child, > :nth-child(3):last-child, > :nth-child(4):last-child, > :nth-child(5):last-child)) > * {
		grid-column: span 4;
	}

	/* Reszta 1 (7, 10, …): dwa pierwsze i dwa ostatnie po połowie; reszta 2 (8, 11, …): dwa pierwsze po połowie. */
	:is(.planto-karty, .planto-studia, .planto-partnerzy, .planto-wpisy .wp-block-post-template):has(> :nth-child(3n + 7):last-child) > :nth-child(-n + 2),
	:is(.planto-karty, .planto-studia, .planto-partnerzy, .planto-wpisy .wp-block-post-template):has(> :nth-child(3n + 7):last-child) > :nth-last-child(-n + 2),
	:is(.planto-karty, .planto-studia, .planto-partnerzy, .planto-wpisy .wp-block-post-template):has(> :nth-child(3n + 8):last-child) > :nth-child(-n + 2) {
		grid-column: span 6;
	}

	/* Jeden element (np. kategoria z jednym wpisem): na środku, nie przy lewej krawędzi. */
	:is(.planto-karty, .planto-studia, .planto-partnerzy, .planto-wpisy .wp-block-post-template):has(> :only-child) > :only-child {
		grid-column: 3 / span 8;
	}
}

/* Etykiety kategorii i stylu (wpisy, karta realizacji): pole dotyku min. 24 px (WCAG 2.2). */
.wp-block-post-terms a {
	display: inline-block;
	padding-block: 0.3rem;
}
