/**
 * Renovare global styles.
 *
 * Only rules that theme.json cannot express belong here. Design values come
 * from theme.json presets (var(--wp--preset--*)).
 */

/* Base ------------------------------------------------------------------ */

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	font-variant-numeric: tabular-nums lining-nums;
}

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

h1,
h2,
h3 {
	text-wrap: balance;
}

/*
 * Template regions (header, main, footer) sit flush against each other, as in
 * the source. Sections manage their own vertical padding.
 */
.wp-site-blocks > * {
	margin-block-start: 0;
}

/* Focus ------------------------------------------------------------------ */

:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 6px;
}

/* Core skip link: match the source's visible focus state. */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	border-radius: 12px;
	font-weight: 700;
	padding: 12px 20px;
	text-decoration: none;
}

/* Site header ------------------------------------------------------------ */

/*
 * The frosted background sits on a pseudo-element: backdrop-filter on the
 * header itself would become the containing block for the fixed-position
 * mobile menu overlay and trap it inside the header.
 */
.renovare-site-header {
	position: relative;
	isolation: isolate;
}

.renovare-site-header .wp-block-button__link {
	white-space: nowrap;
}

@media (width <= 1279px) {
	.renovare-site-header .alignwide {
		gap: 12px;
	}

	.renovare-site-header .alignwide > .wp-block-group,
	.renovare-site-header .wp-block-buttons {
		gap: 12px;
	}

	.renovare-site-header .wp-block-button:not(.is-style-text):not(.is-style-icon-only) .wp-block-button__link {
		padding-right: 18px;
		padding-left: 18px;
	}
}

.renovare-site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: rgb(251 247 242 / 0.94);
	backdrop-filter: saturate(1.2) blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

/* Anchors land below the sticky header (e.g. /about-us/#provider). */
.wp-site-blocks [id] {
	scroll-margin-top: 140px;
}

/* Center a column's content vertically while it stretches to the row height. */
.renovare-center-y {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Links take the paragraph's text color (set with the block's Text color). */
.renovare-inherit-link a {
	color: inherit;
}

.renovare-inherit-link a:hover {
	text-decoration: underline;
}

/* Contain floated images (e.g. the About provider portrait). */
.renovare-flow-root {
	display: flow-root;
}

/* Floated portrait (About provider bio). */
.wp-block-image.renovare-float-photo {
	max-width: min(100%, 340px);
	margin: 0 clamp(28px, 4vw, 48px) 20px 0;
}

.wp-block-image.renovare-float-photo img {
	object-position: 50% 15%;
}

/* Site footer links -------------------------------------------------------- */

.renovare-site-footer a:where(:not(.wp-element-button)) {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	color: var(--wp--preset--color--base);
}

.renovare-site-footer a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--mint);
}

/* Inline highlight (Highlight format + `renovare-highlight` class) -------- */

mark.renovare-highlight {
	margin: 0 -2px;
	padding: 0 6px;
	background-image: linear-gradient(transparent 70%, rgb(191 227 212 / 0.28) 70%, rgb(191 227 212 / 0.28) 94%, transparent 94%);
	color: inherit;
}

/* Mobile Call / Book bar: keep page content clear of the fixed bar. ------ */

@media (width <= 1119px) {
	body:has(.renovare-mobile-cta) {
		padding-bottom: 84px;
	}
}

/* Motion ----------------------------------------------------------------- */

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