/*
Theme Name: Approach Marketing
Theme URI: https://www.approachmarketing.com
Author: Escape Hatch
Author URI: https://escapehatch.com
Description: Theme designed specifically for Approach Marketing.
Tags: full-site-editing
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 8.2
Version: 1.0.0
Text Domain: apr
*/

:root {
	--wp--custom--top--offset: calc(var(--wp-admin--admin-bar--height, 0px) + var(--eh--alert-banner--height, 0px));
	--wp--custom--root--padding-offset: calc(var(--wp--style--root--padding-left) + var(--wp--style--root--padding-left));
	--wp--custom--scroll-padding--top: calc(var(--wp--custom--head--dimensions--height) + var(--wp-admin--admin-bar--height, 0px) + var(--wp--preset--spacing--60));
}

/* Declare custom properties that rely on inline properties */
:is(body, .is-root-container) {
	--wp--custom--spacing--gutter: calc((100vw - 100%) / 2);

	/* Header */
	--wp--custom--head--color--background: color-mix(in sRGB, var(--wp--preset--color--base) 70%, transparent);
	--wp--custom--head--color--text: var(--wp--preset--color--contrast);
	--logo--text: var(--wp--custom--head--color--text);
	--wp--custom--main--spacing--padding--block-start: calc(var(--wp--custom--head--dimensions--height) + var(--wp--preset--spacing--30));
	--wp--custom--main--spacing--padding--block-end: 0;

	/* Change nav color when header isn't pinned and first child is a full-width hero */
	&:has(main .entry-content > .wp-block-cover.is-style-hero.alignfull:first-child):not(:has(.apr-part-head.is-pinned)) {
		--wp--custom--head--color--background: color-mix(in sRGB, var(--wp--preset--color--base) 0%, transparent);
		--wp--custom--head--color--text: var(--wp--preset--color--base);
	}

	@media (width >= 1024px) {
		--wp--style--root--padding-right: var(--wp--preset--spacing--30);
		--wp--style--root--padding-left: var(--wp--preset--spacing--30);
		--wp--custom--head--dimensions--height: var(--wp--custom--head--dimensions--desktop-height);
		--wp--custom--main--spacing--padding--block-start: var(--wp--custom--head--dimensions--height);

		/* --wp--custom--spacing--block-gap: var(--wp--preset--spacing--60); */
	}

	@media (width >= 1920px) {
		--wp--custom--spacing--gutter: calc((var(--wp--custom--width--full) - 100%) / 2);
	}
}



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

html {
	text-size-adjust: none;
	scroll-behavior: smooth;
	scroll-padding-top: var(--wp--custom--scroll-padding--top);
}

/* Has alert banner */
html:has(.wp-block-eh-alert-banner) {
	margin-block-start: var(--wp--custom--top--offset) !important;
}

/* Only apply background color to front end */
html:not(.block-editor-iframe__html) {
	background-color: var(--wp--preset--color--base);
}

/* Force editor styles wrapper to have base background color when not in iframe editor mode */
.editor-styles-wrapper {
	background-color: var(--wp--preset--color--base) !important;
}

/* Prevent page from scrolling when modal is open */
html:has(dialog[open]),
html:has(.lightbox-image-container img[src ^='http']) {
	overflow: hidden;
}

.disable-transitions * {
	transition: none !important;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
	html:focus-within {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}


/**
 * Elements
 */

/* <body> */
body {
	position: relative;
	margin-inline: auto;
	border: 0;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeSpeed;
	container: body / inline-size;
	z-index: var(--wp--custom--z-index--body);
	scrollbar-gutter: stable;

	/* Only apply background color to front end */
	&:not(.editor-styles-wrapper) {
		background-color: var(--wp--preset--color--base);
	}

	/* Admin bar is not present */
	&:not(.admin-bar) {
		--wp-admin--admin-bar--height: 0px;
	}

	/* Add translucent background to the body when modal is open */
	.has-modal-open & {
		--wp--custom--overlay--opacity: var(--wp--custom--overlay--opacity-active);

		min-block-size: 100vh;
		overflow: hidden;
		z-index: 1;

		&::before {
			visibility: visible;
			transition-delay: 0s;
		}
	}
}



/* Phone links */
a:where([href ^='tel:']) {
	color: inherit;
	font: inherit;
	text-decoration: none;
}

/* <iframe> */
iframe {
	--wp--style--global--content-size: 100%;
}

/* --- Block icons --- */
.eh-has-icon:not([class*='component']),
.eh-has-icon:not([class*='component']) > :where(a, button, .wp-element-button) {
	--icon--spacing--inline-gap: var(--wp--preset--spacing--20);
	--icon--width: 1em;
	--icon--height: 1em;

	display: flex;
	align-items: center;

	svg,
	> *:not([data-rich-text-placeholder])::after {
		flex-shrink: 0;
		margin-inline: var(--icon--spacing--inline-gap) 0;
	}

	svg {
		block-size: var(--icon--height);
		inline-size: var(--icon--width);
		color: var(--icon--color, currentColor);
		fill: currentColor;
		transition: color var(--wp--custom--transition--hover), translate var(--wp--custom--transition--hover);
	}
}

/* Icon on left */
.has-icon-start,
.has-icon-start > :where(a, button) {
	flex-direction: row-reverse;

	svg,
	> *::after {
		margin-inline: 0 var(--icon--spacing--inline-gap);
	}
}


/* --- Headings --- */
:where(h1, h2, h3, h4, h5, h6) {
	text-wrap: balance;

	em {
		font-family: var(--wp--preset--font-family--secondary);
		font-weight: 400;
	}
}

:is(p, ol, ul) + .wp-block-heading {
	margin-block-start: var(--wp--preset--spacing--60);
}

/* 3X Small */
:is(h1, h2, h3, h4, h5, h6).has-heading-xxx-small-font-size {
	line-height: var(--wp--custom--heading--xxx-small--line-height);
}

/* 2X Small */
:is(h1, h2, h3, h4, h5, h6).has-heading-xx-small-font-size {
	line-height: var(--wp--custom--heading--xx-small--line-height);
}

/* Extra Small */
:is(h1, h2, h3, h4, h5, h6).has-heading-x-small-font-size {
	line-height: var(--wp--custom--heading--x-small--line-height);
}

/* Small */
:is(h1, h2, h3, h4, h5, h6).has-heading-small-font-size {
	line-height: var(--wp--custom--heading--small--line-height);
}

/* Medium */
:is(h1, h2, h3, h4, h5, h6).has-heading-medium-font-size {
	line-height: var(--wp--custom--heading--medium--line-height);
}

/* Large */
:is(h1, h2, h3, h4, h5, h6).has-heading-large-font-size {
	line-height: var(--wp--custom--heading--large--line-height);
}

/* Extra Large */
:is(h1, h2, h3, h4, h5, h6).has-heading-x-large-font-size {
	line-height: var(--wp--custom--heading--x-large--line-height);
}

/* 2X Large */
:is(h1, h2, h3, h4, h5, h6).has-heading-xx-large-font-size {
	line-height: var(--wp--custom--heading--xx-large--line-height);
}

:where(h1, h2, h3, h4, h5, h6) + .wp-block-query {
	margin-block-start: var(--wp--preset--spacing--30);
}

/* 2X Large and Extra Large font size */
:is(h1, h2, h3, h4, h5, h6):where(.has-heading-xx-large-font-size, .has-heading-x-large-font-size):not(.wp-block-post-title),
:is(h1, h2):not([class*='font-size'], .wp-block-post-title) {
	text-box: trim-start cap alphabetic;
}

:where(.apr-single__content, .post-type-post) {
	:is(h1, h2, h3, h4, h5, h6):where(.has-xx-large-font-size, .has-x-large-font-size),
	:is(h1, h2):not([class*='font-size']) {
		margin-block-start: revert;
	}
}

/* Space between heading and query */
:where(h1, h2, h3, h4, h5, h6):where(.has-heading-xx-large-font-size, .has-heading-x-large-font-size) + .wp-block-query,
:where(h1, h2):not([class*='font-size']) + .wp-block-query {
	margin-block-start: var(--wp--preset--spacing--60);
}

.wp-block-heading:has(+ p, + ol, + ul) {
	margin-block-end: var(--wp--preset--spacing--20);
}

.wp-block-heading + :where(p, ol, ul) {
	margin-block-start: 0;
}


/* Adds inline padding to highlighted <mark> text */
.wp-block-heading mark[style*='background'] {
	--padding: 0.25ch;
	--highlight-color: transparent;

	box-shadow: calc(var(--padding) * -1) 0 0 0 var(--highlight-color), var(--padding) 0 0 0 var(--highlight-color);
	line-height: 1.3;
	box-decoration-break: clone;
}

/* Heading / Paragraphs with background color */
:is(.wp-block-heading, .wp-block-post-title, .wp-block-query-title, .wp-block-paragraph.is-style-small-caps).has-background {
	inline-size: fit-content;
	padding: 0.66em;
	border-radius: var(--wp--preset--border-radius--small);

	+ * {
		margin-block-start: var(--wp--preset--spacing--20);
	}
}


/* --- Button --- */
.wp-element-button.wp-element-button {
	--button--dimensions--block-size: 56px;
	--button--spacing--gap: var(--wp--preset--spacing--20);
	--button--spacing--padding-inline: var(--wp--preset--spacing--30);


	display: flex;
	align-items: center;
	justify-content: center;
	block-size: var(--button--dimensions--block-size);
	padding: 0 var(--button--spacing--padding-inline);
	text-align: center;
	text-box: trim-both;
	white-space: nowrap;

	/* Small font size */
	.has-buttons-small-font-size & {
		--button--dimensions--block-size: 48px;
		--button--spacing--gap: var(--wp--preset--spacing--10);
		--button--spacing--padding-inline: var(--wp--preset--spacing--20);
	}

	/* Button focus states */
	&:focus-visible {
		outline-offset: 4px;
	}

	/* Button hover states */
	&:is(:hover, :active) {
		background-color: var(--wp--preset--color--base) !important;
		border-color: currentColor;
		color: var(--wp--preset--color--accent-1);
	}

	/* Disable cursor for buttons that don't have a href or type="button" */
	&:not([href], [type='button']) {
		cursor: default;
	}

	/* Has light color background */
	&:is(.has-base-background-color, .has-white-background-color) {
		background-color: color-mix(in sRGB, var(--wp--custom--color--background), transparent 40%) !important;
		border-color: transparent;
		color: var(--wp--preset--color--contrast);
		backdrop-filter: blur(15px);

		/* Button hover states */
		&:is(:hover, :active) {
			background-color: color-mix(in sRGB, var(--wp--preset--color--accent-2), transparent 40%) !important;
			color: var(--wp--preset--color--base)
		}

		/* On dark backgrounds */
		.has-accent-2-background-color & {
			/* Button hover states */
			&:is(:hover, :active) {
				background-color: color-mix(in sRGB, var(--wp--preset--color--base), transparent 20%) !important;
				color: var(--wp--preset--color--contrast)
			}
		}
	}

	&.has-accent-2-background-color:where(:hover, :active) {
		color: var(--wp--preset--color--accent-2);
	}

	@media (width <= 1024px) {
		--button--dimensions--block-size: 40px;

		.has-buttons-small-font-size & {
			--button--dimensions--block-size: 28px;
			--button--spacing--padding-inline: var(--wp--preset--spacing--10);
		}
	}
}

/* Button with icon */
:is(.wp-element-button.wp-element-button, .wp-block-read-more) {
	--button--icon--color--background: currentColor;
	--button--icon--color--background-hover: currentColor;
	--button--icon--color--foreground: var(--wp--preset--color--accent-1);
	--button--icon--color--foreground-hover: var(--wp--preset--color--white);
	--button--icon--rotate: 0deg;
	--button--icon--rotate-hover: 0deg;
	--button--icon--padding: 2px;

	/* Button hover states */
	&:is(:hover, :active) {
		--button--icon--color--foreground: var(--button--icon--color--foreground-hover);
		--button--icon--rotate: var(--button--icon--rotate-hover);
	}

	/* Has light color background */
	&:is(.has-base-background-color, .has-white-background-color) {
		--button--icon--color--background: var(--wp--preset--color--base);
		--button--icon--color--foreground: var(--wp--preset--color--accent-1);
	}

	/* Accent 2 */
	&.has-accent-2-background-color {
		--button--icon--color--foreground: var(--wp--preset--color--accent-2);

		/* Button hover states */
		&:is(:hover, :active) {
			--button--icon--color--background: var(--wp--preset--color--accent-2);
			--button--icon--color--foreground: var(--wp--preset--color--base);
		}
	}

	/* Style buttons with icons */
	.eh-has-icon & {
		justify-content: space-between;
		gap: var(--button--spacing--gap);
		padding-block: var(--button--icon--padding);
		padding-inline-end: var(--button--icon--padding);
	}

	.icon-svg {
		display: flex;
		align-items: center;
		justify-content: center;
		block-size: 100%;
		rotate: var(--button--icon--rotate);
		background: var(--icon--color, var(--button--icon--color--background));
		border-radius: 100%;
		content: '';
		transition: all var(--wp--custom--transition--button);
		aspect-ratio: 1 / 1;

		svg {
			--icon--width: 50%;
			--icon--height: 50%;

			margin: 0;
			color: var(--button--icon--color--foreground);
		}

		/* Accent 3 icon color */
		&.has-accent-3-icon-color {
			--button--icon--color--foreground: var(--wp--preset--color--white);
		}

		&.has-base-2-icon-color {
			--button--icon--color--foreground: var(--wp--preset--color--contrast);
		}
	}

	/* Has icon start */
	.has-icon-start & {
		flex-direction: row-reverse;
		padding-inline: var(--button--icon--padding) var(--button--spacing--padding-inline);
	}

	/* Corner arrow icon */
	.has-icon-corner-arrow > & {
		--button--icon--rotate-hover: 45deg;
	}
}

/* Read more */
.wp-block-read-more:has(.icon-svg) {
	--button--dimensions--block-size: 48px;

	block-size: var(--button--dimensions--block-size);
	inline-size: var(--button--dimensions--block-size);
}

/* Visually hide label */
.eh-has-icon.has-hidden-label .icon-label {
	position: absolute !important;
	block-size: 1px !important;
	inline-size: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	border: 0 !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
}



/**
 * Vendor styles
 */



/**
 * Typography
 */

/* Hide empty paragraphs */
.entry-content p:empty {
	display: none;
}

/* 2X Small font size */
:is(p, li).has-xx-small-font-size,
.has-xx-small-font-size :where(p, li) {
	line-height: 1.33;
}

/* Extra Small font size */
:is(p, li).has-x-small-font-size,
.has-x-small-font-size :where(p, li) {
	line-height: 1.57;
}

/* Small font size */
:is(p, li).has-small-font-size,
.has-small-font-size :where(p, li) {
	line-height: 1.5;
}

/* Medium font size */
:is(p, li).has-medium-font-size,
.has-medium-font-size :where(p, li) {
	line-height: 1.778;
}

/* Large font size */
:is(p, li).has-large-font-size,
.has-large-font-size :where(p, li) {
	line-height: 1.33;
}

/* Extra Large font size */
:is(p, li).has-x-large-font-size,
.has-x-large-font-size :where(p, li) {
	margin-block: 1.5em;
	line-height: 1.25;

	em {
		font-family: var(--wp--preset--font-family--secondary);
		font-weight: 400;
	}
}


/* Center aligned text */
p.has-text-align-center {
	margin-inline: auto;
}

/* If paragraph is empty, hide it */
main .entry-content p:empty {
	display: none;
}

/* Last child is an empty paragraph, remove bottom margin from previous element */
main .entry-content > *:nth-last-child(2):has(+ p:empty) {
	margin-block-end: 0;
}

:where(.entry-content, .is-root-container) {
	container-type: inline-size;
}

.has-white-space-nowrap {
	white-space: nowrap;
}

/* Format: Small Caps */
.is-small-caps, :is(.wp-block-heading, .wp-block-post-title, .wp-block-query-title, p).is-style-small-caps {
	display: block;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.wp-block-post-terms.is-style-small-caps a {
	font-size: var(--wp--preset--font-size--x-small);
}

/* Read more */
.wp-block-read-more.is-style-small-caps {
	font-size: inherit;

	&.eh-has-icon {
		--icon--spacing--inline-gap: var(--wp--preset--spacing--5);
	}
}

/* Format: Underline */
.has-underline {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

/* Format: Underline */
.has-underline-stylized {
	position: relative;
}

.has-underline-stylized::after {
	display: block;
	position: absolute;
	inset-block-start: 100%;
	inset-inline-start: 50%;
	block-size: 8px;
	inline-size: 100%;
	translate: -50% 0;
	background-image: url(assets/images/underline-stylized.svg);
	background-size: 100% 100%;
	content: '';
}

em .has-underline-stylized::after {
	inline-size: calc(100% + 0.25ch);
}

/* Text wrap */
.has-balance-text-wrap:not(.has-text-align-center) {
	max-inline-size: var(--wp--custom--width--content-narrow);
	text-wrap: balance;
}

.has-balanced-text-wrap {
	text-wrap: pretty;
}

.has-pretty-text-wrap {
	text-wrap: pretty;
}

.has-nowrap-text-wrap {
	text-wrap: nowrap;
}

.has-wrap-text-wrap {
	text-wrap: wrap;
}


.entry-content {
	scroll-snap-type: y mandatory;
}

/**
 * Blocks
 */

/* --- core/pagination --- */
.wp-block-pagination-wrapper {
	margin-block: var(--wp--preset--spacing--60);
	padding-block-start: var(--wp--preset--spacing--60);
	border-block-start: 1px solid var(--wp--preset--color--base-2);

	&:not(:has(.wp-block-query-pagination)) {
		display: none;
	}
}

/* Next / Previous buttons */
:is(.wp-block-query-pagination-next, .wp-block-query-pagination-previous) {
	display: flex;
	align-items: center;
	justify-content: center;
	block-size: 56px;
	inline-size: 56px;
	margin: 0 !important;
	background-color: var(--wp--preset--color--contrast);
	border-radius: var(--wp--preset--border-radius--small);
	transition: background-color var(--wp--custom--transition--hover);

	&::after {
		display: block;
		position: absolute;
		block-size: 16px;
		inline-size: 10px;
		margin: 0;
		background-color: var(--wp--preset--color--base);
		background-repeat: no-repeat;
		background-size: contain;
		content: '';
		clip-path: var(--wp--custom--icons--chevron-right);
	}

	&:is(:hover, &:active) {
		background-color: var(--wp--preset--color--accent-2);
	}
}

/* Previous icon (flip horizontally) */
.wp-block-query-pagination-previous::after {
	scale: -1 1;
}

/* Disabled */
:is(.wp-block-query-pagination-next, .wp-block-query-pagination-previous):disabled {
	background-color: var(--wp--preset--color--base-2);
	border: none;
	pointer-events: none;
}

/* Hide pagination wrapper if no pagination is present. */
.wp-block-pagination-wrapper:not(:has(.wp-block-query-pagination-numbers)) {
	display: none;
}

/* Pagination numbers */
.wp-block-query-pagination-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--20);
	margin: 0;

	.page-numbers {
		text-decoration: none;

		&:not(.current):hover {
			text-decoration: underline;
		}

		&.current {
			font-weight: 700;
		}
	}
}

@media (width >= 768px) {
	.wp-block-query-pagination.is-layout-flex.is-nowrap {
		gap: var(--wp--preset--spacing--60);
	}
}

/* --- core/buttons --- */
.wp-block-buttons.has-mobile-grid {
	@media (width < 1024px) {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}
}

/* --- core/group --- */
.wp-block-group {
	/* w/ background */
	&.has-background {
		padding-inline: var(--wp--style--root--padding-left);
	}

	/* Row */
	.wp-block-group.is-layout-flex:not(.is-vertical) > * {
		margin-block: 0;
	}

	/* Stack */
	&.is-layout-flex.is-vertical > :where(.wp-block-heading, .wp-block-paragraph, .wp-block-separator) {
		margin-block: 0;
	}

	@media (width > 1025px) and (width <= 1200px) {
		/* Tout Grid */
		.wp-block-group.is-layout-grid:has(.wp-block-cover.is-style-tout) {
			grid-template-columns: repeat(2, 1fr);
		}
	}
}


/* --- Modal --- */
.wp-block-eh-modal {
}

.wp-block-eh-dialog,
.wp-block-eh-modal__dialog {
	--dialog--padding--block: var(--wp--preset--spacing--40);
	--dialog--padding--inline: var(--wp--preset--spacing--40);
	--dialog--color--background: rgb(255 255 255 / 70%);
	--dialog--close--color--background-hover: var(--wp--preset--color--contrast);
	--dialog--close--color--text-hover: var(--wp--preset--color--base);
	--dialog--close--border-radius: var(--wp--preset--border-radius--full);
	--dialog--close--size: 40px;
	--dialog--width: 934px;
	--dialog--max-width: calc(100vw - (var(--wp--preset--spacing--30) * 2));
}

.wp-block-eh-dialog__dialog,
.wp-block-eh-modal__dialog {
	max-block-size: calc(100dvh - (var(--wp--preset--spacing--30) * 2));
	border-radius: var(--wp--preset--border-radius--medium);
	backdrop-filter: blur(15px);

	p {
		font-size: var(--wp--preset--font-size--small);
		line-height: 1.5;
	}

	@media (width < 1024px) {
		--dialog--padding--block: var(--wp--preset--spacing--30);
		--dialog--padding--inline: var(--wp--preset--spacing--30);
		--dialog--close--size: 32px;
	}
}



/**
 * Patterns
 */

/* --- Bio card --- */
.apr-bio-card {
	/* Editor state */
	&:has(.wp-block-eh-modal.has-child-selected) {
		.eh-bio-card__info {
			display : none;
		}

		grid-column: 1 / -1;
		background-color: var(--wp--preset--color--base);
		z-index: 3;

		.wp-block-image {
			max-inline-size: 396px;
		}
	}
}

/* -- Call to action lockup -- */
.apr-cta.wp-block-group {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--20);
	background-color: color-mix(in sRGB, var(--wp--custom--color--background, transparent), transparent 90%);
	border-radius: var(--wp--preset--border-radius--x-large);
	backdrop-filter: blur(15px);

	p, .wp-block-buttons {
		margin: 0;
	}

	@media (width >= 600px) {
		body:not(.home) & {
			flex-direction: row;
			padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--10) var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
			border-radius: var(--wp--preset--border-radius--full);
		}
	}

	/* Custom break point to cover home hero photo */
	@media (width >= 1200px) {
		flex-direction: row;
		padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--10) var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
		border-radius: var(--wp--preset--border-radius--full);
	}
}

/* --- Header --- */
header:has(> .apr-part-head) {
	margin-block-start: 0;
}

.apr-part-head {
	--head--spacing--padding--block: var(--wp--preset--spacing--20);
	--head--spacing--padding--inline: var(--wp--style--root--padding-left);

	position: fixed;
	inset-block-start: var(--wp--custom--top--offset, 0);
	inset-inline-start: 0;
	inline-size: 100%;
	z-index: var(--wp--custom--z-index--head);

	&::before {
		--transition--timing--function: ease;
		--transition--duration: 0.5s;

		display: block;
		position: absolute;
		inset-block-start: 0;
		inset-inline-start: 0;
		block-size: 100%;
		inline-size: 100%;
		background-color: var(--wp--custom--head--color--background);
		content: '';
		transition: background-color var(--transition--duration) var(--transition--timing--function);
		z-index: 0;
	}

	&.is-pinned {
		--transition--timing--function: ease-in-out;
		--transition--duration: 0.3s;

		&::before {
			backdrop-filter: blur(15px);
		}
	}

	.is-root-container > & {
		background: var(--wp--preset--color--contrast);
	}
}

.apr-part-head__inner {
	block-size: var(--wp--custom--head--dimensions--height);
	padding-block: var(--head--spacing--padding--block);

	> :where(.apr-part-head__logo, .wp-block-safe-svg-svg-icon:has(.apr-part-head__logo), .wp-block-group) {
		z-index: 2;
	}

	/* Hide desktop mobile buttons and logo when overlay is open */
	&:has(.has-modal-open) {
		:is(& > .apr-part-head__logo, & .wp-block-navigation__responsive-container-open) {
			visibility: hidden;
			transition: visibility 0s ease 0.25s;
		}
	}
}

/* Logo */
:has(> .apr-part-head__logo) {
	flex-shrink: 1;
}

.apr-part-head__logo {
}

:is(.apr-part-head__logo, .wp-block-safe-svg-svg-icon:has(.apr-part-head__logo)) {
	aspect-ratio: 190 / 48;

	&, img {
		block-size: 100% !important;
		inline-size: auto !important;
	}

	img {
	}

	a {
		display: block;
		block-size: 100%;
	}
}

@media (width >= 1024px) {
	.apr-part-head {
		--head--spacing--padding--block: var(--wp--preset--spacing--30);
	}

	.apr-part-head__logo {
		block-size: auto;
	}
}

.eh-scroll-bug {
	position: absolute;
	inset-block-start: var(--wp--custom--head--dimensions--height);
	inset-inline-start: 0;
	block-size: var(--wp--custom--head--dimensions--height);
	inline-size: 5px;
	pointer-events: none;
	z-index: 9999;
}



/* --- Footer --- */
footer:has(> .apr-part-foot) {
	margin-block-start: 0;
}

@media (width >= 1024px) {
	nav.apr-nav-footer.is-layout-flex > .wp-block-navigation__container {
		display: grid;
		grid-template-columns: repeat(6, 1fr);
		align-items: start;
	}

	nav.apr-nav-footer .is-style-list {
		grid-column: span 2;
	}
}


/**
 * Layout
 */

/* -- <main> -- */
main {
	position: relative;
	min-block-size: 60vh;
	margin-block: 0 !important;
	margin-inline: auto;
	padding-block: var(--wp--custom--main--spacing--padding--block-start) var(--wp--custom--main--spacing--padding--block-end);
	z-index: var(--wp--custom--z-index--main);
	overflow-x: clip;

	&:has(.entry-content > .is-style-hero.alignfull) {
		--wp--custom--main--spacing--padding--block-start: 0;
	}
}

/* Full template parts - stretch to full-width */
.wp-block-template-part:has(> .alignfull, > .is-style-hero) {
	max-inline-size: none;
	margin-inline: calc(var(--wp--style--root--padding-left) * -1) auto !important;
}


/* --- Block content --- */
.entry-content {
	/* padding-block: var(--wp--custom--main--spacing--padding--block-start) var(--wp--custom--main--spacing--padding--block-end); */
}


/* Remove margins from :first-child, :last-child */
*:last-child:where(p, [class*='wp-block']) {
	margin-block-end: 0 !important;
}

*:first-child:where(p, [class*='wp-block']):not(.wp-block-navigation__responsive-dialog) {
	margin-block-start: 0 !important;
}

/**
 * Templates
 */

/* --- Sample page --- */
body.page-sample-page main > .wp-block-group > .entry-content {
	background-color: var(--wp--preset--color--white) !important;
}

/* --- Single --- */
.apr-single__featured-image:not(:has(img.attachment-post-thumbnail)) {
	display: none;

	+ .apr-single__meta {
		margin-block-start: 0 !important;
	}
}

.apr-single__sharing {
	margin-block: var(--wp--preset--spacing--20);
}

.apr-single__content {
	.wp-block-image img {
		border-radius: var(--wp--preset--border-radius--medium);
	}

	a:not(.wp-block-button__link) {
		color: var(--wp--preset--color--accent-1);
		font-weight: 700;
	}

	:is(h1, h2):not([class*='-font-size']) {
		font-size: var(--wp--preset--font-size--heading-small);
		line-height: var(--wp--custom--heading--small--line-height);
	}

	:is(h3, h4, h5, h6):not([class*='-font-size']) {
		font-size: var(--wp--preset--font-size--heading-x-small);
		line-height: var(--wp--custom--heading--x-small--line-height);
	}

	.wp-block-image {
		margin-block: var(--wp--preset--spacing--60);
	}
}

@media (width >= 1024px) {
	.apr-single__meta {
		position: relative;
		max-inline-size: 800px;
		margin-block-start: calc(var(--wp--preset--spacing--120) * -1) !important;
		z-index: 2;
	}
}


/* Escape hatch sticky */
@media (width >= 1025px) {
	.eh-has-sticky {
		position: sticky !important;
		inset-block-start: var(--wp--custom--scroll-padding--top);
		scroll-snap-align: start;
	}
}


/**
 * WordPress styles
 */

/* Update position sticky top value to accommodate sticky header */
.is-position-sticky:not(.apr-nav-overlay__head) {
	inset-block-start: calc(var(--wp--custom--main--spacing--padding--block-start) + var(--wp--preset--spacing--30) + var(--wp-admin--admin-bar--height)) !important;
}

/* --- Admin bar --- */

/* stylelint-disable-next-line selector-max-id */
#wpadminbar {
	position: fixed;
	inset-block-start: 0;
	inset-inline-start: 0;
}

/* --- Lightbox --- */
.wp-lightbox-overlay {
	--wp--preset--color--contrast: var(--wp--preset--color--base);
}

/* Lightbox backdrop */
.wp-lightbox-overlay .scrim {
	--wp--preset--color--base: rgb(0 0 0 / 90%);
}
