/* Layout: top bar, header and menu, title banner, footer, popups. */

/* Top bar */

.topbar {
	background: var(--pine-ink);
	color: #c9d3dc;
	font-size: 13px;
}

.topbar__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 16px;
	padding-top: 9px;
	padding-bottom: 9px;
}

.topbar__group {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 22px;
}

.topbar a:hover {
	color: var(--lime);
}

/* Header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--line);
	background: var(--paper);
}

.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: var(--header-height);
}

.logo {
	display: flex;
	flex: none;
	align-items: center;
	gap: 10px;
	color: var(--pine);
	font-family: var(--head);
	font-size: 22px;
	font-weight: 700;
}

.logo__mark {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 9px;
	background: var(--pine);
	color: var(--lime);
	font-size: 14px;
	letter-spacing: 0.02em;
}

.logo__image {
	width: auto;
	max-height: 48px;
}

.site-nav__menu {
	display: flex;
	align-items: center;
	gap: 30px;
	list-style: none;
}

.site-nav__menu a {
	font-size: 15px;
	font-weight: 500;
}

.site-nav__menu > li {
	position: relative;
}

.site-nav__menu > li > a:hover,
.site-nav__menu > .current-menu-item > a,
.site-nav__menu > .current-menu-ancestor > a {
	color: var(--pine);
	text-decoration: underline;
	text-decoration-color: var(--lime);
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.site-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: -18px;
	display: none;
	min-width: 240px;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: 0 18px 40px rgb(2 22 35 / 0.12);
	list-style: none;
}

/* Bridges the gap between the item and its submenu, so hovering down keeps it open. */
.site-nav .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin: 0 0 3px 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
}

.site-nav .sub-menu a {
	display: block;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 14px;
}

.site-nav .sub-menu a:hover,
.site-nav .sub-menu .current-menu-item > a {
	background: var(--mist);
}

.site-nav__menu > li:hover > .sub-menu,
.site-nav__menu > li:focus-within > .sub-menu {
	display: block;
}

.site-nav__cta {
	display: none;
}

.menu-btn {
	display: none;
	align-items: center;
	gap: 8px;
	padding: 9px 12px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: none;
	font-weight: 700;
	cursor: pointer;
}

.menu-btn .icon {
	width: 18px;
	height: 18px;
}

@media (max-width: 1100px) {
	.site-nav__menu {
		gap: 20px;
	}
}

@media (max-width: 860px) {
	.site-nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		display: none;
		max-height: calc(100dvh - var(--header-height));
		overflow-y: auto;
		padding: 16px var(--gutter) 24px;
		border-bottom: 1px solid var(--line);
		background: #fff;
		box-shadow: 0 18px 40px rgb(2 22 35 / 0.12);
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav__menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.site-nav .sub-menu {
		position: static;
		display: block;
		min-width: 0;
		padding: 6px 0 0 12px;
		border: 0;
		box-shadow: none;
	}

	.site-nav .menu-item-has-children > a::after {
		display: none;
	}

	.site-nav__cta {
		display: block;
		margin-top: 20px;
	}

	.site-header__cta {
		display: none;
	}

	.menu-btn {
		display: inline-flex;
	}
}

/* Title banner (templates/elements/content--page-header.php) */

.page-header {
	background: radial-gradient(1000px 500px at 85% 0%, var(--pine-2), transparent 60%), var(--pine-ink);
	color: #fff;
}

.page-header .wrap {
	padding-top: 72px;
	padding-bottom: 72px;
}

.page-header__title {
	max-width: 22ch;
	font-size: clamp(34px, 4.6vw, 56px);
	font-weight: 700;
	line-height: 1.1;
}

.page-header__lead {
	max-width: 60ch;
	margin-top: 18px;
	color: var(--on-dark);
	font-size: 17px;
}

.breadcrumbs {
	margin-bottom: 20px;
	color: var(--on-dark-muted);
	font-size: 14px;
}

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
}

.breadcrumbs li + li::before {
	content: "/";
	margin-right: 6px;
	color: rgb(255 255 255 / 0.3);
}

.breadcrumbs a:hover {
	color: var(--lime);
}

.breadcrumbs [aria-current] {
	color: #fff;
}

/* Footer */

.site-footer {
	background: var(--pine-ink);
	color: var(--on-dark-muted);
}

.news {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 32px;
	padding: 36px 40px;
	border-radius: var(--radius-lg);
	background: #fff;
	box-shadow: 0 24px 60px rgb(2 22 35 / 0.12);
	color: var(--ink);
	transform: translateY(-50%);
}

.news__title {
	font-size: 24px;
}

.news__text {
	margin-top: 6px;
	color: var(--muted);
	font-size: 14px;
}

.foot-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 40px;
	padding-bottom: 56px;
}

.foot-grid--no-news {
	padding-top: 64px;
}

.site-footer .logo {
	margin-bottom: 16px;
	color: #fff;
}

.foot-grid__about p {
	max-width: 34ch;
	font-size: 14px;
}

.foot-grid__title {
	margin-bottom: 16px;
	color: #fff;
	font-size: 16px;
}

.foot-grid__list {
	display: grid;
	gap: 9px;
	font-size: 14px;
	list-style: none;
}

.foot-grid__label {
	display: block;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
}

.site-footer a:hover {
	color: var(--lime);
}

.social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
	list-style: none;
}

.social-links a {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 1px solid rgb(255 255 255 / 0.18);
	border-radius: 50%;
	color: #fff;
	transition: border-color 0.2s, color 0.2s;
}

.social-links a:hover {
	border-color: var(--lime);
}

.social-links .icon {
	width: 18px;
	height: 18px;
}

.legal {
	padding: 20px 0;
	border-top: 1px solid rgb(255 255 255 / 0.1);
	font-size: 13px;
}

.legal__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px 16px;
}

.legal__menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	list-style: none;
}

@media (max-width: 1024px) {
	.foot-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 860px) {
	.news {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 28px 24px;
		transform: translateY(-30%);
	}

	.page-header .wrap {
		padding-top: 56px;
		padding-bottom: 56px;
	}
}

@media (max-width: 560px) {
	.foot-grid {
		grid-template-columns: 1fr;
	}
}

/* Popups (templates/elements/site--popups.php): a white panel over a dimmed page */

html:has(.popup[open]) {
	overflow: hidden;
}

.popup {
	width: min(640px, calc(100% - 2 * var(--gutter)));
	max-height: calc(100dvh - 2 * var(--gutter));
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: var(--radius-lg);
	background: #fff;
	color: var(--ink);
}

.popup::backdrop {
	background: rgb(1 14 23 / 0.75);
}

.popup[open] {
	animation: popup-in 0.3s ease;
}

@keyframes popup-in {
	from {
		opacity: 0;
		translate: 0 16px;
	}
}

.popup__panel {
	position: relative;
	padding: clamp(28px, 5vw, 44px);
}

.popup__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--mist);
	color: var(--pine);
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.popup__close:is(:hover, :focus-visible) {
	background: var(--pine);
	color: #fff;
}

.popup__title {
	padding-right: 48px;
	font-size: clamp(24px, 3vw, 32px);
}

.popup__text {
	margin-top: 10px;
	color: var(--muted);
}

.popup .lead-form {
	margin-top: 24px;
}

.popup--thanks {
	width: min(460px, calc(100% - 2 * var(--gutter)));
	text-align: center;
}

.popup--thanks .popup__title {
	padding-inline: 48px;
}

.popup--thanks .popup__text {
	margin-bottom: 24px;
}

.popup__badge {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: var(--lime);
	color: var(--pine-ink);
}

.popup__badge .icon {
	width: 34px;
	height: 34px;
}
