/**
 * Site header layout and states.
 */

:root {
	--ag-header-info-height: 2rem;
	--ag-header-main-height: 4.5rem;
	--ag-header-total-height: 6.5rem;
	--ag-header-z-index: 1000;
}

body:not(.alwardagroup-header-overlay) {
	padding-top: var(--ag-header-main-height);
}

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	z-index: var(--ag-header-z-index);
	width: 100%;
	color: var(--ag-color-text);
	background: var(--ag-color-white);
	border-bottom: 1px solid var(--ag-color-neutral-300);
	transition: color var(--ag-transition-duration) var(--ag-transition-timing),
		background-color var(--ag-transition-duration) var(--ag-transition-timing),
		box-shadow var(--ag-transition-duration) var(--ag-transition-timing);
}

.site-header--transparent:not(.is-scrolled):not(.is-menu-open) {
	color: var(--ag-color-text);
	background: transparent;
	border-bottom-color: var(--ag-color-neutral-300);
}

.site-header.is-scrolled,
.site-header.is-menu-open {
	color: var(--ag-color-text);
	background: var(--ag-color-white);
	border-bottom-color: var(--ag-color-neutral-300);
	box-shadow: 0 0.25rem 1rem rgb(11 31 58 / 8%);
}

.header-container {
	width: min(100% - (2 * var(--ag-layout-gutter)), var(--ag-layout-wide));
	margin-inline: auto;
}

.header-info {
	display: none;
}

.header-main {
	min-height: var(--ag-header-main-height);
	background: var(--ag-color-white);
}

.header-main__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--ag-header-main-height);
	gap: 1rem;
}

.site-branding {
	position: relative;
	z-index: 2;
	flex: 0 0 16rem;
	height: var(--ag-header-main-height);
}

.site-logo {
	position: absolute;
	top: 0.25rem;
	left: 0;
	display: flex;
	align-items: center;
	width: max-content;
	height: auto;
	gap: 0.75rem;
	color: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.site-logo__image {
	display: block;
	flex: 0 0 3.5rem;
	width: 3.5rem;
	height: auto;
}

.site-logo__name {
	max-width: none;
	font-size: 1.40625rem;
	letter-spacing: 0.015em;
	text-transform: uppercase;
	white-space: nowrap;
}

.header-info__inner {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-height: var(--ag-header-info-height);
	gap: 1.5rem;
}

.header-info__link {
	display: inline-flex;
	align-items: center;
	min-height: 2rem;
	gap: 0.4rem;
	color: inherit;
	font-size: 0.8125rem;
	line-height: 1.2;
	text-decoration: none;
}

.header-info__link:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

@media (min-width: 64rem) {
	body:not(.alwardagroup-header-overlay) {
		padding-top: var(--ag-header-total-height);
	}

	.header-info {
		display: block;
		min-height: var(--ag-header-info-height);
		color: var(--ag-color-white);
		background: var(--ag-color-brand-primary);
	}

	.site-branding {
		flex-basis: 21rem;
	}

	.site-logo {
		top: calc(0.375rem - var(--ag-header-info-height));
		gap: 1rem;
	}

	.site-logo__image {
		flex-basis: 5rem;
		width: 5rem;
	}

	.site-logo__name {
		font-size: 1.6875rem;
	}
}

@media (min-width: 90rem) {
	.header-main__inner {
		gap: 2rem;
	}
}

.admin-bar .site-header {
	top: 46px;
}

@media screen and (min-width: 783px) {
	.admin-bar .site-header {
		top: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header {
		transition: none;
	}
}
