/* --------------------------------------------------------------------------
   Header, navigation, footer
   -------------------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--rm-header);
	background: var(--rm-paper);
	color: var(--rm-ink);
	border-bottom: 0;
}

.site-header.is-compact {
	height: 3.85rem;
	background: var(--rm-paper);
}

.site-header__inner {
	width: min(100% - 2rem, var(--rm-content-wide));
	max-width: 100%;
	height: 100%;
	margin-inline: auto;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1rem;
	min-width: 0;
}

.brand {
	display: grid;
	grid-column: 1;
	grid-row: 1;
	line-height: 1;
	color: var(--rm-forest);
	flex-shrink: 0;
	z-index: 2;
}

.brand__name {
	font-family: var(--rm-font-serif);
	font-size: 1.05rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.brand__sub {
	font-family: var(--rm-font-sans);
	font-size: 0.6rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--rm-sage);
	margin-top: 0.18rem;
}

body.nav-open {
	overflow: hidden;
}

.nav {
	display: contents;
}

.nav__list {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.35rem;
	grid-column: 2;
	grid-row: 1;
}

.nav__list a {
	color: var(--rm-ink);
	font-family: var(--rm-font-sans);
	font-size: 0.84rem;
	font-weight: 400;
	letter-spacing: 0.01em;
}

.nav__list a:hover,
.nav__list a[aria-current="page"],
.nav__list .current-menu-item > a,
.nav__list .is-active a {
	color: var(--rm-sage);
}

.header-cta {
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
}

.header-cta--mobile {
	display: none;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 2.75rem;
	height: 2.75rem;
	min-width: 44px;
	min-height: 44px;
	border: 1px solid var(--rm-line);
	background: transparent;
	cursor: pointer;
	z-index: 2;
	justify-self: end;
}

.nav-toggle__bar {
	display: block;
	width: 1.1rem;
	height: 1.5px;
	background: var(--rm-forest);
	transition: transform 0.2s var(--rm-ease), opacity 0.2s ease;
}

body.nav-open .nav-toggle__bar:nth-child(1) {
	transform: translateY(6.5px) rotate(45deg);
}

body.nav-open .nav-toggle__bar:nth-child(2) {
	opacity: 0;
}

body.nav-open .nav-toggle__bar:nth-child(3) {
	transform: translateY(-6.5px) rotate(-45deg);
}

.site-footer {
	background: var(--rm-ivory);
	color: var(--rm-muted);
	border-top: 1px solid var(--rm-line);
	padding: 0;
	font-family: var(--rm-font-sans);
}

.site-footer__bar-inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 0.45rem 1.5rem;
	min-height: 4.4rem;
	padding: 0.7rem 0 0.55rem;
	font-size: 0.76rem;
}

.site-footer__trade {
	grid-column: 1 / -1;
	margin: 0;
	padding-bottom: 0.15rem;
	text-align: center;
	font-size: 0.64rem;
	letter-spacing: 0.04em;
	color: var(--rm-taupe);
}

.site-footer__legal {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.15rem 0;
}

.site-footer__copy {
	margin: 0;
	justify-self: end;
	text-align: right;
	color: var(--rm-muted);
}

.brand--footer .brand__name {
	font-size: 0.82rem;
	letter-spacing: 0.18em;
}

.site-footer__legal a {
	color: var(--rm-charcoal);
}

.site-footer__legal a:hover {
	color: var(--rm-forest);
}

.page-main {
	padding: 3rem 0 2.5rem;
	min-height: 0;
}

@media (max-width: 700px) {
	.page-main {
		padding: 2.15rem 0 1.75rem;
	}
}

.prose {
	max-width: 40rem;
}

.prose h2 {
	margin-top: 2rem;
}

.prose ul {
	list-style: disc;
	padding-left: 1.2rem;
	margin: 0 0 1rem;
}

@media (max-width: 1020px) {
	.nav__list {
		gap: 0.9rem;
	}

	.nav__list a {
		font-size: 0.78rem;
	}
}

@media (max-width: 900px) {
	.site-header {
		position: sticky;
		background: var(--rm-paper);
	}

	.site-header__inner {
		grid-template-columns: 1fr auto auto;
	}

	.nav-toggle {
		display: inline-flex;
		grid-column: 3;
		grid-row: 1;
	}

	.header-cta--desktop {
		display: inline-flex;
		grid-column: 2;
		grid-row: 1;
		min-height: 2.4rem;
		padding-inline: 0.85rem;
		font-size: 0.62rem;
	}

	.header-cta--mobile {
		display: inline-flex;
		width: 100%;
		margin-top: 0.85rem;
	}

	.nav {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		padding: 0.5rem 1.2rem 1.3rem;
		background: var(--rm-ivory);
		max-height: calc(100dvh - var(--rm-header));
		overflow-y: auto;
		visibility: hidden;
		opacity: 0;
		pointer-events: none;
		transform: translateY(-0.35rem);
		transition: opacity 0.25s var(--rm-ease), transform 0.25s var(--rm-ease), visibility 0.25s;
		border-bottom: 1px solid var(--rm-line);
	}

	body.nav-open .nav {
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
		transform: none;
	}

	.nav__list {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		grid-column: auto;
	}

	.nav__list a {
		display: block;
		padding: 0.9rem 0.1rem;
		border-bottom: 1px solid var(--rm-line);
		color: var(--rm-forest);
		font-size: 1.05rem;
	}

	.site-footer__bar-inner {
		grid-template-columns: 1fr;
		justify-items: start;
		min-height: 0;
		padding: 0.55rem 0 0.5rem;
		gap: 0.22rem;
	}

	.site-footer__copy,
	.site-footer__legal,
	.site-footer__trade {
		justify-self: start;
		text-align: left;
		justify-content: flex-start;
	}
}

@media (max-width: 420px) {
	.header-cta--desktop {
		display: none;
	}
}

.to-top {
	position: fixed;
	right: calc(1.75rem + env(safe-area-inset-right, 0px));
	bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
	z-index: 40;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.875rem;
	height: 2.875rem;
	padding: 0;
	margin: 0;
	border: 1px solid var(--rm-sage);
	border-radius: 50%;
	background: var(--rm-paper);
	color: var(--rm-forest);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(0.35rem);
	transition: opacity 0.28s var(--rm-ease), visibility 0.28s var(--rm-ease), transform 0.28s var(--rm-ease), background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.to-top.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
}

.to-top:hover,
.to-top:focus-visible {
	background: var(--rm-forest);
	color: var(--rm-ivory);
	border-color: var(--rm-forest);
}

.to-top__icon {
	display: block;
}

body:has(#rm-consent:not([hidden])) .to-top.is-visible {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

@media (max-width: 700px) {
	.to-top {
		right: calc(1.1rem + env(safe-area-inset-right, 0px));
		bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
		width: 2.75rem;
		height: 2.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.to-top {
		transition: none;
		transform: none;
	}
}
