:root {
	--barabom-content-width: var(--brb-layout-content);
	--barabom-inline-space: var(--brb-layout-padding-mobile);
}

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

html,
body {
	max-width: 100%;
	overflow-x: clip;
}

body {
	margin: 0;
	background: var(--brb-color-bg);
	color: var(--brb-color-text);
	font-family: var(--brb-font-body);
	font-size: var(--brb-type-body);
	font-weight: var(--brb-weight-regular);
	line-height: var(--brb-leading-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img {
	max-width: 100%;
	height: auto;
}

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

:where(h1, h2, h3) {
	margin-block-start: 0;
	color: var(--brb-color-text);
	font-family: var(--brb-font-display);
	font-weight: var(--brb-weight-bold);
	letter-spacing: -0.03em;
	word-break: keep-all;
}

:where(h1, .entry-title, .wp-block-post-title) {
	font-size: var(--brb-type-h1);
	line-height: var(--brb-leading-display);
}

:where(h2) {
	font-size: var(--brb-type-h2);
	line-height: var(--brb-leading-heading);
}

:where(h3) {
	font-size: var(--brb-type-h3);
	line-height: var(--brb-leading-heading);
}

:where(a) {
	color: var(--brb-color-brand);
	text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
	text-underline-offset: 0.16em;
}

:where(a:visited) {
	color: var(--brb-color-brand);
}

:where(a:hover, a:active) {
	color: var(--brb-color-brand-hover);
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--brb-color-focus);
	outline-offset: 3px;
}

:where(.button, .wp-element-button, input[type="button"], input[type="submit"]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.65rem 1.125rem;
	border: 1px solid var(--brb-color-brand);
	border-radius: var(--brb-radius-pill);
	background: var(--brb-color-brand);
	color: var(--brb-color-surface-strong);
	font-weight: var(--brb-weight-medium);
	line-height: 1.35;
	text-decoration: none;
	transition: background-color var(--brb-motion-fast) var(--brb-motion-easing), border-color var(--brb-motion-fast) var(--brb-motion-easing), color var(--brb-motion-fast) var(--brb-motion-easing);
}

:where(.button, .wp-element-button, input[type="button"], input[type="submit"]):hover {
	border-color: var(--brb-color-brand-hover);
	background: var(--brb-color-brand-hover);
	color: var(--brb-color-surface-strong);
}

.site-header,
.site-main,
.site-footer {
	width: min(100% - (2 * var(--barabom-inline-space)), var(--barabom-content-width));
	margin-inline: auto;
}

.site-main {
	background: var(--brb-color-surface-strong);
}

/*
 * Legacy Page bodies keep the width contract they had before the Theme shell
 * cutover. Elementor's own document/Kit CSS remains responsible for the body.
 */
.brb-legacy-page-body .site-main {
	width: 100%;
	margin-inline: 0;
	background: transparent;
}

.site-header,
.site-footer {
	padding-block: 1rem;
}

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

.screen-reader-text:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	background: var(--brb-color-surface-strong);
	color: var(--brb-color-text);
	box-shadow: var(--brb-shadow-floating);
}

@media ( min-width: 48rem ) {
	:root {
		--barabom-inline-space: var(--brb-layout-padding-desktop);
	}
}

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