/*
 * XTON design system layer, loaded after all legacy stylesheets.
 * Typography base and buttons follow xton-theme: src/scss/_reset.scss and _buttons.scss.
 */
:root {
	font-synthesis: none;
}

body {
	font-family: var(--font-base);
	font-weight: var(--font-weight-base);
	font-size: var(--text-base);
	line-height: var(--line-height-base);
	color: var(--color-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: var(--font-weight-heading);
	line-height: var(--line-height-heading);
}

:where(:focus-visible) {
	outline: var(--focus-ring-width) solid var(--focus-ring-color);
	outline-offset: var(--focus-ring-offset);
}

/* Buttons */
.cta_btn,
.btn_page,
.hpp_mobile_btn,
.wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	font-family: var(--font-base);
	font-size: var(--text-base);
	font-weight: var(--font-weight-semibold);
	line-height: var(--line-height-base);
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition:
		background var(--duration-base) var(--ease-standard),
		color var(--duration-base) var(--ease-standard),
		border-color var(--duration-base) var(--ease-standard),
		box-shadow var(--duration-base) var(--ease-standard);
}

.cta_btn::before {
	content: none;
}

/* Primary. !important: legacy page rules reach these buttons with longer selectors. */
.cta_btn.yellow,
.cta_btn.yellow_black,
.cta_btn.aqua,
.cta_btn.aqua_black,
.btn_page,
.hpp_mobile_btn,
.wpcf7-submit {
	background: var(--gradient-accent) !important;
	border-color: transparent !important;
	color: var(--color-dark) !important;
	box-shadow: none;
}

.cta_btn.yellow:hover,
.cta_btn.yellow_black:hover,
.cta_btn.aqua:hover,
.cta_btn.aqua_black:hover,
.btn_page:hover,
.hpp_mobile_btn:hover,
.wpcf7-submit:hover {
	background: var(--gradient-light) !important;
	box-shadow: var(--shadow-glow);
}

.cta_btn.yellow:active,
.cta_btn.yellow_black:active,
.cta_btn.aqua:active,
.cta_btn.aqua_black:active,
.btn_page:active,
.hpp_mobile_btn:active,
.wpcf7-submit:active {
	background: var(--gradient-accent) !important;
	box-shadow: var(--shadow-glow-sm);
}

/* Outline on a light background */
.cta_btn.black {
	background: transparent;
	border-color: var(--color-dark);
	color: var(--color-dark);
}

.cta_btn.black:hover,
.cta_btn.black:active {
	background: var(--color-dark);
	color: var(--color-light);
}

/* Outline on a dark background */
.cta_btn.white {
	background: transparent;
	border-color: var(--color-light);
	color: var(--color-light);
}

.cta_btn.white:hover,
.cta_btn.white:active {
	background: var(--color-light);
	color: var(--color-dark);
}

/* Navigation. The legacy header has no room for --text-base, see the design notes. */
.header #head-menu ul li a {
	font-family: var(--font-base);
	font-size: var(--text-sm);
	font-weight: var(--font-weight-normal);
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
}

.header #head-menu > ul > li > a {
	white-space: nowrap;
}

@media screen and (max-width: 1300px) {
	.header #head-menu ul li a {
		font-size: var(--text-xs);
	}

	.header #head-menu > ul {
		gap: clamp(5px, calc(7vw - 67px), 16px);
	}
}

@media screen and (min-width: 1301px) {
	.header #head-menu > ul {
		gap: clamp(12px, calc(7vw - 79px), 32px);
	}
}

/* Dropdown panel, follows .nav-panel in xton-theme: src/scss/_nav-panel.scss */
@media screen and (min-width: 1025px) {
	/* The legacy percentage width squeezed the items although the row had free space. */
	.header div[role="navigation"] {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
	}

	.header #head-menu > ul {
		justify-content: flex-start;
	}

	.header #head-menu > ul > li {
		padding: 0;
	}

	/* Sits on the bottom edge of the header. */
	.header #head-menu > ul > li > a::after {
		bottom: -10px;
		height: 2px;
	}

	/* Hover and active items are bolder; the hidden copy of the label stops neighbours from jumping. */
	.header #head-menu ul li:hover > a,
	.header #head-menu ul li.current-menu-item > a,
	.header #head-menu ul li.current-menu-ancestor > a,
	.header #head-menu ul li a:focus-visible,
	.header #head-menu ul li ul.sub-menu li:hover > a,
	.header #head-menu ul li ul.sub-menu li.current-menu-item > a,
	.header #head-menu ul li ul.sub-menu li a:focus-visible {
		font-weight: var(--font-weight-semibold);
	}

	.header #head-menu ul li a::before {
		content: attr(data-label);
		display: block;
		height: 0;
		overflow: hidden;
		visibility: hidden;
		font-weight: var(--font-weight-semibold);
	}

	.header #head-menu ul li:hover,
	.header #head-menu ul li.current-menu-item {
		color: var(--color-accent-on-light);
	}

	.header #head-menu ul li:focus-within ul.sub-menu {
		opacity: 1;
		pointer-events: all;
	}

	/* The transparent top padding keeps the hover alive between the link and the panel. */
	.header #head-menu ul li ul.sub-menu {
		--focus-ring-color: var(--color-dark);
		top: 100%;
		left: 0;
		width: max-content;
		min-width: 200px;
		max-width: 320px;
		padding: 10px 0 0;
		background: var(--color-gray-100) content-box;
		box-shadow: none;
		filter: drop-shadow(0 12px 12px rgb(0 0 0 / 30%));
	}

	/* "Do pobrania" sits at the right edge, so its panel opens leftwards instead of overflowing the page. */
	.header #head-menu #menu-client-zone > li > ul.sub-menu {
		left: auto;
		right: 0;
	}

	.header #head-menu ul li ul.sub-menu::before {
		content: none;
	}

	.header #head-menu ul li ul.sub-menu li {
		margin: 0;
		padding: 0;
		text-align: left;
	}

	.header #head-menu ul li ul.sub-menu li a {
		padding: 10px 16px;
		background: none;
		border-bottom: 1px solid var(--color-gray-200);
		font-weight: var(--font-weight-normal);
		line-height: var(--line-height-heading);
	}

	.header #head-menu ul li ul.sub-menu li a:hover,
	.header #head-menu ul li ul.sub-menu li a:focus-visible {
		background: var(--color-gray-200);
	}

	.header #head-menu ul li ul.sub-menu li:last-child a {
		border-bottom: 0;
	}
}

/* A span in the markup: stays on its own line next to the inline eyebrow. */
.static_banner__title {
	display: block;
}

/* Legacy title classes */
.static_banner__title,
.title_35,
.title_30,
.header_20,
.header_24,
.header_36,
.header_60,
.header_66 {
	line-height: var(--line-height-heading);
}

.title,
.post_title,
[class^="title_"]:not([class*="_wrap"]),
[class*=" title_"]:not([class*="_wrap"]) {
	font-family: var(--font-heading);
	font-weight: var(--font-weight-heading);
	line-height: var(--line-height-heading);
}

h1,
h2,
h3,
h4,
h5,
h6,
.title,
.post_title,
[class^="header_"],
[class^="title_"]:not([class*="_wrap"]) {
	/* !important: legacy page rules spread these headings with longer selectors. */
	letter-spacing: var(--tracking-normal) !important;
}

/* Eyebrow above a heading */
.static_banner__eyebrow {
	font-family: var(--font-base);
	font-size: var(--text-sm);
	font-weight: var(--font-weight-medium);
	letter-spacing: var(--tracking-wider);
	line-height: var(--line-height-base);
	text-transform: uppercase;
}

/* Footer company column: groups share one rhythm instead of line-break spacers. */
.footer .logos_n_social_wrap {
	margin-bottom: 24px;
}

.footer .address {
	margin-top: 0;
}

.footer .address .address {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	margin-bottom: 0;
}

.footer .footer_address p {
	margin: 0;
}

.footer .footer_company {
	margin-bottom: 4px;
	font-weight: var(--font-weight-medium);
}

.footer .address .phones {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 0;
}

.footer .address .phones a {
	line-height: var(--line-height-base);
}

.footer .address .phones a span {
	padding-bottom: 0;
}

.footer .footer_contact {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.footer .logo_n_social .footer_contact a,
.footer .logo_n_social .footer_badges a {
	margin-right: 0;
}

.footer .ce_n_iso {
	align-items: center;
	margin-top: 0;
}

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

.footer .footer_badges img {
	display: block;
	width: 90px;
	height: auto;
}

/* The legacy flex row squeezed the menu to its longest word. */
@media screen and (min-width: 1025px) {
	.footer .footer_nav {
		flex: 0 0 240px;
	}
}

/*
 * Vertical rhythm. Legacy sections used 80-170px per side, which doubled between neighbours.
 * Offsets for the fixed header stay on their elements.
 */
.hp_mach,
.hp_par,
.uslugi,
.section_4,
.page_builder,
.faq_page_all,
.multimedia .gallery_wrap,
.dystrybutorzy .logos,
.prev-regeneration__init,
.prev-regeneration__table,
.rental-pros {
	padding-top: var(--space-3xl);
	padding-bottom: var(--space-3xl);
}

.post_content,
.intro,
.materials_page .hpm_wrap,
.dystrybutorzy .countries {
	padding-top: var(--space-3xl);
}

.banner,
.materials_page,
.xton,
.fin-guide {
	padding-bottom: var(--space-3xl);
}

.faq_page_bot,
.section_2 .machines,
.index .content {
	margin-top: var(--space-3xl);
}

.rental-pros__header,
.phones_section .title {
	margin-bottom: var(--space-2xl);
}

.hb_d3 {
	padding-top: var(--space-4xl);
}

.prev-regeneration__header {
	padding-top: 180px;
}

section.my-32 {
	margin-top: var(--space-3xl);
	margin-bottom: var(--space-3xl);
}

/* Machine page: the photo stays beside long text instead of centring far below the heading. */
@media screen and (min-width: 1025px) {
	.single-maszyny .hpm_wrap {
		align-items: flex-start;
	}

	.single-maszyny .hpm_img {
		position: sticky;
		top: 110px;
	}
}
