/*
 * InteliWro – tylko to, czego nie da theme.json: stany, style bloków, formularze.
 * Kolory wyłącznie przez zmienne presetów (--wp--preset--color--*).
 *
 * Tonacja: domyślnie jasna (ciemny tekst na jasnym tle czyta się lepiej – Piepenbrock i in. 2013/2014).
 * Sekcje z ciemnym tłem (base, base-2, base-3), okładka i stopka przełączają zmienne poniżej.
 * Pomarańcz z logo tylko na przyciskach; na jasnym tle tekst i linki w ciemniejszym accent-ink.
 */

:root {
	--iw-radius: 12px;
	--iw-ring: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--accent) 55%, transparent);
	--iw-accent-text: var(--wp--preset--color--accent-ink);
	--iw-surface: var(--wp--preset--color--paper-2);
	--iw-rule: var(--wp--preset--color--line-light);
}

.has-base-background-color,
.has-base-2-background-color,
.has-base-3-background-color,
.wp-block-cover,
.iw-footer {
	--iw-link: var(--wp--preset--color--accent);
	--iw-accent-text: var(--wp--preset--color--accent);
	--iw-surface: var(--wp--preset--color--base-3);
	--iw-rule: var(--wp--preset--color--line);
}

html {
	scroll-padding-top: 6rem;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--iw-accent-text);
	outline-offset: 2px;
}

/* Tekst drugorzędny i wstęp: przygaszony kolor bieżącego tekstu – działa na jasnym i ciemnym tle. */
.is-style-muted,
.is-style-lead {
	color: color-mix(in srgb, currentColor 72%, transparent);
}

.is-style-eyebrow,
.is-style-step {
	color: var(--iw-accent-text);
}

/* ---------- Nagłówek ----------
 * Bez backdrop-filter: tworzy on nowy kontekst dla position: fixed i menu na telefonie
 * otwierało się tylko w pasku nagłówka.
 */

.iw-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

.admin-bar .iw-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

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

.iw-header .wp-block-navigation a:hover,
.iw-header .wp-block-navigation .current-menu-item > a,
.iw-header .wp-block-navigation [aria-current="page"] {
	color: var(--wp--preset--color--accent-ink);
	text-decoration: none;
}

/* Pozycja „Wycena Loxone” w menu tylko w menu telefonu – na komputerze jest przycisk obok. */
.iw-header .iw-nav-cta {
	display: none;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	width: 2.75rem;
	height: 2.75rem;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
}

.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	width: 28px;
	height: 28px;
}

.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--paper) !important;
	color: var(--wp--preset--color--ink) !important;
	padding: 1rem clamp(1rem, 4vw, 2rem) 2rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 4.5rem;
	align-items: stretch !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	width: 100%;
	gap: 0 !important;
	align-items: stretch !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--line-light);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 1.1rem 0 !important;
	font-family: var(--wp--preset--font-family--syne);
	font-weight: 700;
	font-size: 1.6rem;
	line-height: 1.2;
}

.wp-block-navigation__responsive-container.is-menu-open .iw-nav-cta {
	display: block;
	border-bottom: 0;
	margin-top: 1.75rem;
}

.wp-block-navigation__responsive-container.is-menu-open .iw-nav-cta .wp-block-navigation-item__content {
	padding: 1rem 1.25rem !important;
	border-radius: 6px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 600;
	font-size: 1.1rem;
	text-align: center;
}

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

.wp-element-button,
.wp-block-button__link {
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

/* Na ciemnym tle najechanie rozjaśnia przycisk. */
:is(.has-base-background-color, .has-base-2-background-color, .wp-block-cover, .iw-footer) .wp-element-button:hover,
:is(.has-base-background-color, .has-base-2-background-color, .wp-block-cover, .iw-footer) .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--ink);
}

/* ---------- Style bloków ---------- */

.is-style-card,
.is-style-switch {
	background-color: var(--iw-surface);
}

/* Na jasnym tle karta odcina się delikatną linią, a nie cieniem. */
.is-style-card:not(.has-background),
.is-style-switch:not(.has-background) {
	box-shadow: inset 0 0 0 1px var(--iw-rule);
}

/* Kafel funkcji: kropka „włączone” w kolorze limonki z logo. */
.is-style-switch {
	position: relative;
	min-height: 100%;
}

.is-style-switch > :first-child {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.is-style-switch > :first-child::before {
	content: "";
	flex: none;
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-2);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--accent-2) 25%, transparent), 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--ink) 35%, transparent);
}

.is-style-no-bullets {
	list-style: none;
	padding-left: 0 !important;
}

.is-style-checks {
	list-style: none;
	padding-left: 0 !important;
}

.is-style-checks li {
	position: relative;
	padding-left: 1.9rem;
}

.is-style-checks li + li {
	margin-top: 0.75rem;
}

.is-style-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.05rem;
	height: 0.55rem;
	border-left: 2px solid var(--iw-accent-text);
	border-bottom: 2px solid var(--iw-accent-text);
	transform: rotate(-45deg) scale(0.8);
	transform-origin: center;
}

.wp-block-image.is-style-logo img {
	border-radius: 0;
	width: auto;
	max-height: 64px;
	object-fit: contain;
}

/* Zdjęcia w kolumnach: pełna szerokość kolumny. */
.wp-block-column > .wp-block-image:not(.is-style-logo) {
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: 0;
}

.wp-block-column > .wp-block-image:not(.is-style-logo) img {
	width: 100%;
}

/* Lista danych firmy: etykieta + wartość. */
.iw-facts {
	display: grid;
	grid-template-columns: max-content 1fr;
	column-gap: 1.5rem;
	row-gap: 0.4rem;
}

.iw-facts li {
	display: contents;
}

.iw-facts strong {
	font-weight: 500;
	color: color-mix(in srgb, currentColor 72%, transparent);
}

.iw-inline-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	list-style: none;
	padding-left: 0 !important;
	margin: 0;
}

.iw-footer a {
	color: inherit;
}

.iw-footer a:hover {
	color: var(--wp--preset--color--accent);
}

/* ---------- Formularze ---------- */

.iw-form {
	--iw-field-bg: var(--wp--preset--color--paper-2);
	--iw-field-line: color-mix(in srgb, var(--wp--preset--color--ink-muted) 75%, transparent);
	display: grid;
	gap: 1.5rem;
	font-size: 1rem;
}

.iw-form__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.25rem;
}

.iw-field {
	grid-column: 1 / -1;
	display: grid;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

@media (min-width: 640px) {
	.iw-field--half {
		grid-column: span 2;
	}
}

.iw-field--quarter {
	grid-column: span 2;
}

@media (min-width: 900px) {
	.iw-field--quarter {
		grid-column: span 1;
	}
}

.iw-field > label,
.iw-field > legend {
	font-weight: 600;
	padding: 0;
	margin-bottom: 0.15rem;
}

.iw-field__req {
	color: var(--iw-accent-text);
}

.iw-field__opt {
	font-weight: 400;
	color: color-mix(in srgb, currentColor 72%, transparent);
	font-size: 0.875em;
}

.iw-form input:not([type="checkbox"]):not([type="radio"]),
.iw-form select,
.iw-form textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	color: inherit;
	background: var(--iw-field-bg);
	border: 1px solid var(--iw-field-line);
	border-radius: 8px;
	padding: 0.8rem 0.9rem;
	min-height: 3rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.iw-form textarea {
	min-height: 8rem;
	resize: vertical;
}

.iw-form select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 1.2rem) 55%, calc(100% - 0.85rem) 55%;
	background-size: 0.35rem 0.35rem;
	background-repeat: no-repeat;
	padding-right: 2.5rem;
}

.iw-form input:not([type="checkbox"]):not([type="radio"]):focus,
.iw-form select:focus,
.iw-form textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
	box-shadow: var(--iw-ring);
}

.iw-form .has-error input:not([type="checkbox"]):not([type="radio"]),
.iw-form .has-error select,
.iw-form .has-error textarea {
	border-color: var(--iw-accent-text);
}

.iw-field__help {
	margin: 0;
	color: color-mix(in srgb, currentColor 72%, transparent);
	font-size: 0.9375rem;
}

.iw-field__error {
	margin: 0;
	color: var(--iw-accent-text);
	font-size: 0.9375rem;
	font-weight: 600;
}

/* Wybór: duże pola do kliknięcia zamiast małych kółek. */
.iw-choices {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 0.6rem;
}

.is-inline .iw-choices {
	grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
}

.iw-choice {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	padding: 0.8rem 0.9rem;
	border: 1px solid var(--iw-field-line);
	border-radius: 8px;
	background: var(--iw-field-bg);
	cursor: pointer;
	line-height: 1.4;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.iw-choice:hover {
	border-color: currentColor;
}

.iw-choice:has(input:checked) {
	border-color: var(--wp--preset--color--accent);
	background: color-mix(in srgb, var(--wp--preset--color--accent) 10%, var(--iw-field-bg));
}

.iw-choice input {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	margin: 0.1rem 0 0;
	accent-color: var(--wp--preset--color--accent);
}

.iw-field--consent .iw-choice {
	border: 0;
	background: none;
	padding: 0;
	font-size: 0.9375rem;
	color: color-mix(in srgb, currentColor 72%, transparent);
}

.iw-field--consent .iw-choice:has(input:checked) {
	background: none;
}

/* Kroki wyceny. */
.iw-form__progress {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.iw-form__progress li {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding-top: 0.75rem;
	border-top: 3px solid var(--iw-rule);
	color: color-mix(in srgb, currentColor 72%, transparent);
	font-weight: 600;
	font-size: 0.9375rem;
}

.iw-form__progress li span {
	font-family: var(--wp--preset--font-family--syne);
}

.iw-form__progress li.is-current {
	border-color: var(--wp--preset--color--accent);
	color: inherit;
}

.iw-form__progress li.is-done {
	border-color: currentColor;
}

/* Bez JS pasek kroków nic nie znaczy – wszystkie kroki są widoczne. */
.iw-form:not(.is-enhanced) .iw-form__progress,
.iw-form:not(.is-enhanced) .iw-form__step .iw-form__nav button[type="button"] {
	display: none;
}

.iw-form__step {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
	display: grid;
	gap: 1.5rem;
}

.iw-form__step[hidden] {
	display: none;
}

.iw-form__step > legend {
	font-family: var(--wp--preset--font-family--syne);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--x-large);
	padding: 0;
	margin-bottom: 1.5rem;
}

/* Z paskiem kroków nazwa kroku jest widoczna wyżej – legenda zostaje dla czytników ekranu. */
.iw-form.is-enhanced .iw-form__step > legend {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	margin: 0;
}

.iw-form__step > legend:focus {
	outline: none;
}

.iw-form__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.iw-form__nav .wp-element-button {
	cursor: pointer;
	font-size: 1rem;
	line-height: 1.4;
}

.iw-form__nav .wp-element-button:disabled {
	opacity: 0.6;
	cursor: progress;
}

.iw-form__back {
	order: -1;
	font: inherit;
	font-weight: 600;
	color: inherit;
	background: none;
	border: 0;
	padding: 0.85em 0;
	cursor: pointer;
	margin-right: auto;
}

.iw-form__back:hover {
	color: var(--iw-accent-text);
}

.iw-form__alert {
	border-left: 3px solid var(--wp--preset--color--accent);
	background: var(--iw-field-bg);
	padding: 1rem 1.25rem;
	border-radius: 0 8px 8px 0;
}

.iw-form__alert p {
	margin: 0 0 0.5rem;
	font-weight: 600;
}

.iw-form__alert ul {
	margin: 0;
	padding-left: 1.2rem;
}

.iw-form__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.iw-form--done {
	border-left: 3px solid var(--wp--preset--color--accent-2);
	padding: 1.25rem 1.5rem;
	background: var(--iw-surface);
	border-radius: 0 var(--iw-radius) var(--iw-radius) 0;
}

.iw-form--done:focus {
	outline: none;
}

.iw-form__done-title {
	font-family: var(--wp--preset--font-family--syne);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--x-large);
	margin: 0 0 0.5rem;
}

/* W białej karcie pola na jasnym tle strony; w ciemnych sekcjach – ciemne pola. */
.is-style-card .iw-form {
	--iw-field-bg: var(--wp--preset--color--paper);
}

:is(.has-base-background-color, .has-base-2-background-color) .iw-form {
	--iw-field-bg: var(--wp--preset--color--base);
	--iw-field-line: var(--wp--preset--color--line);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Wideo w tle okładki: przy „ogranicz ruch” skrypt go nie włącza – widać plakat (inc/performance.php). */

/* Okładka na całą szerokość: odstęp boczny jak w całej stronie (na telefonie tekst nie dotyka krawędzi),
 * treść w szerokości „wide” – w jednej linii z logo. */
.wp-block-cover.alignfull {
	padding-left: var(--wp--style--root--padding-left, 1rem);
	padding-right: var(--wp--style--root--padding-right, 1rem);
}

.wp-block-cover.alignfull > .wp-block-cover__inner-container {
	padding-left: 0;
	padding-right: 0;
}

/* ---------- Oś procesu („Jak pracujemy”) ----------
 * Kroki jak moduły na przewodzie magistrali: moduł z ikoną na torze, pod nim karta z opisem.
 * JS (process.js) dodaje .is-live, ustawia --iw-track / --iw-progress i włącza kroki (.is-on)
 * podczas przewijania; bez JS i przy „ogranicz ruch” wszystkie kroki są włączone.
 */

.iw-process {
	--iw-node: 4.25rem;
	--iw-gap: 1.25rem;
	--iw-lead: 1.75rem; /* odstęp moduł → karta */
	--iw-col: calc((100% - 4 * var(--iw-gap)) / 5);
	--iw-track-color: color-mix(in srgb, var(--wp--preset--color--ink) 16%, transparent);
	position: relative;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: var(--iw-gap);
	padding-top: calc(var(--iw-node) + var(--iw-lead));
}

.iw-process > * {
	margin: 0 !important;
}

/* Tor i wypełnienie ze świecącą końcówką („prąd” płynie do następnego modułu). */
.iw-process::before,
.iw-process::after {
	content: "";
	position: absolute;
	z-index: 0;
	top: calc(var(--iw-node) / 2 - 1.5px);
	left: calc(var(--iw-col) / 2);
	height: 3px;
	border-radius: 3px;
	width: var(--iw-track, calc(100% - var(--iw-col)));
	background: var(--iw-track-color);
}

.iw-process::after {
	width: calc(var(--iw-track, calc(100% - var(--iw-col))) * var(--iw-progress, 1));
	background: linear-gradient(90deg, var(--wp--preset--color--accent) 0, var(--wp--preset--color--accent) calc(100% - 3rem), var(--wp--preset--color--accent-2) 100%);
	box-shadow: 0 0 12px color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent);
	transition: width 0.3s linear;
}

/* Karta kroku. */
.iw-process__step {
	position: relative;
	z-index: 1;
	padding: 1.5rem 1.25rem 1.4rem;
	border-radius: 16px;
	background: var(--wp--preset--color--paper-2);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--line-light);
	transition: box-shadow 0.4s ease, opacity 0.4s ease;
}

/* Miejsce na dużą cyfrę obok tytułu. */
.iw-process__step > .wp-block-heading {
	margin-top: 0.25rem;
	padding-right: 3.25rem;
}

/* Duża cyfra w rogu karty. */
.iw-process__step > .is-style-step {
	position: absolute;
	top: 0.9rem;
	right: 1.1rem;
	margin: 0;
	font-size: 2.25rem;
	line-height: 1;
	letter-spacing: -0.03em;
	color: color-mix(in srgb, var(--wp--preset--color--ink) 12%, transparent);
	transition: color 0.4s ease;
}

/* Moduł (węzeł) nad kartą i ikona. */
.iw-process__step::before,
.iw-process__step::after {
	content: "";
	position: absolute;
	top: calc(-1 * var(--iw-node) - var(--iw-lead));
	left: calc(50% - var(--iw-node) / 2);
	width: var(--iw-node);
	height: var(--iw-node);
	box-sizing: border-box;
	border-radius: 16px;
}

.iw-process__step::before {
	z-index: 1;
	background: var(--wp--preset--color--paper);
	border: 2px solid var(--iw-track-color);
	transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.iw-process__step::after {
	z-index: 2;
	background: var(--wp--preset--color--ink-muted);
	-webkit-mask: var(--iw-icon) center / 1.9rem no-repeat;
	mask: var(--iw-icon) center / 1.9rem no-repeat;
	transition: background-color 0.35s ease;
}

/* Wyprowadzenie moduł → karta i dioda „włączone” na module. */
.iw-process__step > .wp-block-heading::before,
.iw-process__step > .wp-block-heading::after {
	content: "";
	position: absolute;
	z-index: 0;
}

.iw-process__step > .wp-block-heading::before {
	top: calc(-1 * var(--iw-lead));
	left: calc(50% - 1px);
	width: 2px;
	height: var(--iw-lead);
	background: var(--iw-track-color);
	transition: background-color 0.35s ease;
}

.iw-process__step > .wp-block-heading::after {
	z-index: 3;
	top: calc(-1 * var(--iw-node) - var(--iw-lead) + 0.55rem);
	left: calc(50% + var(--iw-node) / 2 - 1.05rem);
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--iw-track-color);
	transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

/* Stan „wyłączony” (tylko z JS): karta przygaszona. Bez przesuwania – moduł musi zostać na torze. */
.iw-process.is-live .iw-process__step:not(.is-on) {
	opacity: 0.6;
}

/* Stan „włączony”. */
.iw-process:not(.is-live) .iw-process__step,
.iw-process__step.is-on {
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--line-light), 0 18px 36px -24px color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
}

.iw-process:not(.is-live) .iw-process__step > .is-style-step,
.iw-process__step.is-on > .is-style-step {
	color: var(--wp--preset--color--accent-ink);
}

.iw-process:not(.is-live) .iw-process__step::before,
.iw-process__step.is-on::before {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--wp--preset--color--ink) 70%, transparent);
}

.iw-process:not(.is-live) .iw-process__step::after,
.iw-process__step.is-on::after {
	background: var(--wp--preset--color--paper);
}

.iw-process:not(.is-live) .iw-process__step > .wp-block-heading::before,
.iw-process__step.is-on > .wp-block-heading::before {
	background: var(--wp--preset--color--ink);
}

.iw-process:not(.is-live) .iw-process__step > .wp-block-heading::after,
.iw-process__step.is-on > .wp-block-heading::after {
	background: var(--wp--preset--color--accent-2);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--accent-2) 30%, transparent), 0 0 10px var(--wp--preset--color--accent-2);
}

@media (hover: hover) {
	.iw-process__step.is-on:hover {
		box-shadow: inset 0 0 0 1px var(--wp--preset--color--accent), 0 18px 36px -22px color-mix(in srgb, var(--wp--preset--color--ink) 60%, transparent);
	}
}

/* Telefon i tablet: tor pionowo po lewej, moduł przy karcie. */
@media (max-width: 899px) {
	.iw-process {
		--iw-node: 3.25rem;
		--iw-lead: 0.9rem;
		gap: 1rem;
		grid-template-columns: minmax(0, 1fr);
		padding-top: 0;
		padding-left: calc(var(--iw-node) + var(--iw-lead));
	}

	.iw-process::before,
	.iw-process::after {
		top: calc(var(--iw-node) / 2 + 1.25rem);
		left: calc(var(--iw-node) / 2 - 1.5px);
		width: 3px;
		height: var(--iw-track, calc(100% - 8rem));
	}

	.iw-process::after {
		width: 3px;
		height: calc(var(--iw-track, calc(100% - 8rem)) * var(--iw-progress, 1));
		background: linear-gradient(180deg, var(--wp--preset--color--accent) 0, var(--wp--preset--color--accent) calc(100% - 3rem), var(--wp--preset--color--accent-2) 100%);
		transition: height 0.3s linear;
	}

	.iw-process__step {
		padding: 1.15rem 1.1rem 1.15rem;
	}

	.iw-process__step > .is-style-step {
		font-size: 2rem;
		top: 0.8rem;
		right: 0.9rem;
	}

	.iw-process__step::before,
	.iw-process__step::after {
		top: 1.25rem;
		left: calc(-1 * var(--iw-node) - var(--iw-lead));
		border-radius: 13px;
	}

	.iw-process__step::after {
		-webkit-mask-size: 1.5rem;
		mask-size: 1.5rem;
	}

	.iw-process__step > .wp-block-heading::before {
		top: calc(1.25rem + var(--iw-node) / 2 - 1px);
		left: calc(-1 * var(--iw-lead));
		width: var(--iw-lead);
		height: 2px;
	}

	.iw-process__step > .wp-block-heading::after {
		top: calc(1.25rem + 0.45rem);
		left: calc(-1 * var(--iw-lead) - 0.95rem);
	}
}

.iw-ico-rozmowa {
	--iw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M4 4h11a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H9l-4 3v-3H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z%22/%3E%3Cpath d=%22M19 9h1a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-1v3l-4-3h-3%22/%3E%3C/svg%3E");
}

.iw-ico-projekt {
	--iw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%223%22 y=%223%22 width=%2218%22 height=%2218%22 rx=%221%22/%3E%3Cpath d=%22M3 12h7v9M10 3v5M14 12h7M14 12v4%22/%3E%3C/svg%3E");
}

.iw-ico-wycena {
	--iw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M6 2h9l5 5v15H6z%22/%3E%3Cpath d=%22M14 2v6h6M9 13h8M9 17h5%22/%3E%3C/svg%3E");
}

.iw-ico-realizacja {
	--iw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%225%22 y=%223%22 width=%2214%22 height=%2218%22 rx=%221.5%22/%3E%3Cpath d=%22M2 12h3M19 12h3M9 7h6M9 11h6M9 15h2%22/%3E%3Ccircle cx=%2215%22 cy=%2216%22 r=%221%22/%3E%3C/svg%3E");
}

.iw-ico-serwis {
	--iw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 0 0 5.4-5.4l-2.6 2.6-2.4-.6-.6-2.4z%22/%3E%3C/svg%3E");
}

/* Stopka styka się z ostatnią sekcją (bez paska tła strony pomiędzy). */
.wp-site-blocks > .iw-footer,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* ---------- Pasek zaufania w okładce ---------- */

.iw-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.4rem;
	margin-top: var(--wp--preset--spacing--40) !important;
	padding: 1.25rem 0 0 !important;
	border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	list-style: none;
	font-size: 0.9375rem;
	font-weight: 600;
}

.iw-trust li {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0;
}

.iw-trust li::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-2);
	box-shadow: 0 0 8px color-mix(in srgb, var(--wp--preset--color--accent-2) 70%, transparent);
}

/* ---------- Panel scen ([inteliwro_sceny]) ----------
 * Ciemny „ekran aplikacji” na jasnej sekcji: przełącznik scen i stan ośmiu funkcji domu.
 */

.iw-scenes {
	--iw-link: var(--wp--preset--color--accent);
	--iw-accent-text: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border-radius: 24px;
	padding: clamp(1rem, 3vw, 2rem);
	box-shadow: 0 40px 70px -40px color-mix(in srgb, var(--wp--preset--color--ink) 75%, transparent);
}

.iw-scenes__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	margin-bottom: 1.25rem;
}

.iw-scenes__tabs {
	display: flex;
	gap: 0.25rem;
	padding: 0.3rem;
	border-radius: 999px;
	background: var(--wp--preset--color--base-3);
	max-width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
}

.iw-scenes__tabs::-webkit-scrollbar {
	display: none;
}

.iw-scenes__tab {
	flex: none;
	font: inherit;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	padding: 0.65rem 1.1rem;
	border: 0;
	border-radius: 999px;
	color: color-mix(in srgb, currentColor 75%, transparent);
	background: transparent;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.iw-scenes__tab:hover {
	color: var(--wp--preset--color--contrast);
}

.iw-scenes__tab[aria-selected="true"] {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--ink);
}

/* Bez JS przełączanie nie działa – zostaje tylko nazwa sceny domyślnej. */
.iw-scenes:not(.is-enhanced) .iw-scenes__tab:not([aria-selected="true"]) {
	display: none;
}

.iw-scenes__note {
	margin: 0;
	font-size: 0.9375rem;
	color: color-mix(in srgb, currentColor 70%, transparent);
}

.iw-scenes__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.iw-scenes__item {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	min-height: 5.5rem;
	margin: 0;
	padding: 1rem 1rem 1.1rem;
	border-radius: 14px;
	background: var(--wp--preset--color--base-3);
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.iw-scenes__name {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-family: var(--wp--preset--font-family--syne);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
}

.iw-scenes__name::before {
	content: "";
	flex: none;
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: var(--wp--preset--color--line);
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.iw-scenes__state {
	font-size: 0.9rem;
	line-height: 1.4;
	color: color-mix(in srgb, currentColor 70%, transparent);
}

.iw-scenes__item:not(.is-on) .iw-scenes__name {
	color: color-mix(in srgb, currentColor 65%, transparent);
}

.iw-scenes__item.is-on {
	background: color-mix(in srgb, var(--wp--preset--color--base-3) 96%, var(--wp--preset--color--accent-2));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--accent-2) 45%, transparent);
}

.iw-scenes__item.is-on .iw-scenes__name::before {
	background: var(--wp--preset--color--accent-2);
	box-shadow: 0 0 10px var(--wp--preset--color--accent-2);
}

.iw-scenes__item.is-changed {
	animation: iw-blink 0.6s ease;
}

@keyframes iw-blink {
	from {
		box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--wp--preset--color--accent-2) 60%, transparent);
	}
}

.iw-scenes__foot {
	margin: 1rem 0 0;
	font-size: 0.875rem;
	color: color-mix(in srgb, currentColor 60%, transparent);
}

@media (max-width: 899px) {
	.iw-scenes {
		border-radius: 18px;
	}

	.iw-scenes__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.iw-scenes__item {
		min-height: 0;
		padding: 0.85rem 0.85rem 0.95rem;
	}

	.iw-scenes__name {
		font-size: 0.875rem;
		align-items: flex-start;
		hyphens: auto;
		overflow-wrap: anywhere;
	}

	.iw-scenes__name::before {
		margin-top: 0.3em;
	}

	.iw-scenes__state {
		font-size: 0.875rem;
	}

	/* Przełącznik scen 2 × 2 – wszystkie sceny widoczne bez przewijania. */
	.iw-scenes__tabs {
		display: grid;
		grid-template-columns: 1fr 1fr;
		width: 100%;
		border-radius: 16px;
	}

	.iw-scenes__tab {
		border-radius: 12px;
	}
}

/* Ilustracje, które na telefonie tylko wydłużają stronę (Zaawansowane → Dodatkowe klasy CSS). */
@media (max-width: 781px) {
	.iw-hide-mobile {
		display: none !important;
	}
}

/* ---------- Okładka strony głównej: H1 z frazą jako nadtytuł, hasło jako duży H2 ----------
 * Google czyta H1 („InteliWro – partner Loxone we Wrocławiu”), oko widzi hasło.
 */

.wp-block-heading.iw-kicker {
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.4;
	color: var(--iw-accent-text);
}

.wp-block-heading.iw-hero-title {
	font-size: var(--wp--preset--font-size--display);
	letter-spacing: -0.03em;
	line-height: 1.02;
}

/* ---------- Pytania i odpowiedzi (grupa iw-faq, bloki „Szczegóły”) ---------- */

.iw-faq {
	border-top: 1px solid var(--iw-rule);
}

.iw-faq .wp-block-details {
	margin: 0 !important;
	border-bottom: 1px solid var(--iw-rule);
}

.iw-faq .wp-block-details summary {
	position: relative;
	padding: 1.15rem 2.5rem 1.15rem 0;
	font-family: var(--wp--preset--font-family--syne);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
	list-style: none;
	cursor: pointer;
}

.iw-faq .wp-block-details summary::-webkit-details-marker {
	display: none;
}

/* Plus → minus po rozwinięciu. */
.iw-faq .wp-block-details summary::before,
.iw-faq .wp-block-details summary::after {
	content: "";
	position: absolute;
	right: 0.35rem;
	top: 50%;
	width: 1rem;
	height: 2px;
	background: var(--iw-accent-text);
	transition: transform 0.2s ease;
}

.iw-faq .wp-block-details summary::after {
	transform: rotate(90deg);
}

.iw-faq .wp-block-details[open] summary::after {
	transform: rotate(0deg);
}

.iw-faq .wp-block-details summary:hover {
	color: var(--iw-accent-text);
}

.iw-faq .wp-block-details > :not(summary) {
	margin-top: 0;
	padding-bottom: 1.25rem;
	max-width: 62ch;
	color: color-mix(in srgb, currentColor 78%, transparent);
}

/* Linki w tekście podkreślone – nie tylko kolorem (dostępność, Lighthouse). */
.wp-block-post-content :is(p, li, dd) a:not(.wp-element-button),
.iw-form__alert a,
.iw-field--consent a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.wp-block-post-content :is(p, li, dd) a:not(.wp-element-button):hover {
	text-decoration-thickness: 2px;
}
