/**
 * Production header. Sits over the hero on the homepage.
 */

:root {
	--header-height: 4.5rem;
}

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 40;
	padding: 0;
	color: var(--color-text-on-dark);
	background: transparent;
	transition: background-color 200ms ease;
}

.site-header.is-solid {
	background: #121416;
	box-shadow: inset 0 -1px 0 rgba(243, 239, 232, 0.16);
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	width: min(var(--layout-max), calc(100% - (var(--gutter) * 2)));
	min-height: var(--header-height);
	margin-inline: auto;
	transition: min-height 200ms ease;
}

.has-photo-hero .site-header.is-solid {
	--header-height: 3.75rem;
}

.wordmark {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	line-height: 0;
	text-decoration: none;
}

.wordmark img {
	display: block;
	width: auto;
	height: 1.85rem;
	aspect-ratio: 604 / 104;
}

.wordmark:hover img {
	opacity: 0.86;
}

.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.4rem 0.15rem;
	border: 0;
	background: transparent;
	color: inherit;
	font-family: var(--font-text);
	font-size: var(--text-button);
	font-weight: var(--weight-ui);
	letter-spacing: var(--tracking-button);
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
}

.nav-toggle-close {
	display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-open {
	display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-close {
	display: inline;
}

.header-cta-bar {
	display: none;
}

.primary-nav {
	position: fixed;
	inset: var(--header-height) 0 0 0;
	z-index: 30;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-lg);
	padding: var(--space-md) var(--gutter) var(--space-xl);
	background: var(--color-bg-dark);
	overflow: auto;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

.primary-nav.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.nav-list {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: min(32rem, 100%);
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-list a {
	display: flex;
	align-items: center;
	min-height: 3.25rem;
	color: inherit;
	font-size: var(--text-h4);
	font-weight: var(--weight-ui);
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-decoration: none;
	border-bottom: 1px solid var(--color-border-on-dark);
}

.nav-list a:hover,
.nav-list a[aria-current="page"],
.nav-list .current-menu-item > a {
	border-bottom-color: var(--color-accent);
}

.header-cta-panel {
	margin-top: var(--space-2xs);
}

body.nav-open {
	overflow: hidden;
}

body.nav-open .site-header {
	background: var(--color-bg-dark);
}

@media (max-width: 77.99rem) {
	html:not(.js) .site-header {
		position: relative;
		background: var(--color-bg-dark);
	}

	html:not(.js) .nav-toggle {
		display: none;
	}

	html:not(.js) .primary-nav {
		position: static;
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
	}
}

body:not(.is-front) #content {
	padding-top: calc(var(--header-height) + var(--space-lg));
}

.is-front #content {
	padding: 0;
}

@media (min-width: 78rem) {
	:root {
		--header-height: 5rem;
	}

	.site-header-inner {
		display: grid;
		grid-template-columns: minmax(12rem, 1fr) auto minmax(12rem, 1fr);
		align-items: center;
	}

	.wordmark {
		justify-self: start;
	}

	.wordmark img {
		height: 2.05rem;
	}

	.nav-toggle {
		display: none;
	}

	.primary-nav {
		position: static;
		inset: auto;
		z-index: auto;
		display: flex;
		flex-direction: row;
		justify-content: center;
		gap: 0;
		padding: 0;
		background: transparent;
		overflow: visible;
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
	}

	.nav-list {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		width: auto;
		gap: clamp(0.55rem, 0.15rem + 0.7vw, 1.2rem);
	}

	.nav-list a {
		min-height: 2.75rem;
		font-size: 0.875rem;
		letter-spacing: 0.01em;
		border-bottom-color: transparent;
	}

	.header-cta-panel {
		display: none;
	}

	.header-cta-bar {
		display: inline-flex;
		justify-self: end;
		grid-column: 3;
	}

	.primary-nav {
		grid-column: 2;
	}

	.has-photo-hero .site-header.is-solid {
		--header-height: 4rem;
	}
}

@media (min-width: 96rem) {
	.wordmark img {
		height: 2.35rem;
	}

	.nav-list a {
		font-size: var(--text-nav);
	}

	.nav-list {
		gap: 1.15rem;
	}
}

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

.nav-sub-toggle {
	display: none;
}

.nav-item.has-sub {
	position: relative;
}

@media (max-width: 77.99rem) {
	.js .nav-item.has-sub {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		border-bottom: 1px solid var(--color-border-on-dark);
	}

	.js .nav-item.has-sub > a {
		border-bottom: 0;
	}

	.js .nav-sub-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 2.75rem;
		height: 2.75rem;
		border: 0;
		background: transparent;
		color: inherit;
		cursor: pointer;
	}

	.nav-sub-icon {
		width: 0.45rem;
		height: 0.45rem;
		border-right: 1.5px solid currentColor;
		border-bottom: 1.5px solid currentColor;
		transform: translateY(-0.12rem) rotate(45deg);
	}

	.js .nav-item.is-sub-open .nav-sub-icon {
		transform: translateY(0.12rem) rotate(225deg);
	}

	.js .nav-sub {
		display: none;
		grid-column: 1 / -1;
		margin: 0;
		padding: 0 0 0.35rem;
		list-style: none;
	}

	.js .nav-item.is-sub-open > .nav-sub {
		display: block;
	}

	.nav-list .nav-sub a {
		min-height: 2.75rem;
		padding-left: 0.85rem;
		font-size: 1rem;
	}
}

@media (min-width: 78rem) {
	.nav-sub-toggle {
		display: none;
	}

	.nav-sub {
		position: absolute;
		z-index: 50;
		top: 100%;
		left: 0;
		min-width: 15.5rem;
		margin: 0;
		padding: 0.4rem 0 0.35rem;
		list-style: none;
		background: #121416;
		border: 1px solid rgba(243, 239, 232, 0.16);
		box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}

	.nav-sub::before {
		content: "";
		position: absolute;
		top: -0.45rem;
		right: 0;
		left: 0;
		height: 0.45rem;
	}

	.nav-item.has-sub:hover > .nav-sub,
	.nav-item.has-sub:focus-within > .nav-sub {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.nav-list .nav-sub a {
		min-height: 2.4rem;
		padding: 0.35rem 1rem;
		font-size: 0.875rem;
		white-space: nowrap;
		border-bottom: 0;
	}

	.nav-list .nav-sub a:hover,
	.nav-list .nav-sub a:focus-visible,
	.nav-list .nav-sub a[aria-current="page"] {
		color: var(--color-accent);
	}

	.nav-item.is-in-section > a {
		border-bottom-color: var(--color-accent);
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header,
	.site-header-inner,
	.primary-nav,
	.nav-sub {
		transition: none;
	}
}
