.site-shell {
	position: relative;
	z-index: 1;
	display: flex;
	min-height: 100vh;
	flex-direction: column;
	isolation: isolate;
}

.site-main {
	display: block;
	flex: 1 0 auto;
	visibility: visible;
}

.z-container {
	width: min(calc(100% - (var(--z-page-x) * 2)), var(--z-container));
	margin-inline: auto;
}

.z-container--narrow {
	width: min(calc(100% - (var(--z-page-x) * 2)), var(--z-container-narrow));
}

.site-header {
	position: sticky;
	z-index: 70;
	inset-block-start: 0;
	border-block-end: 1px solid rgba(99, 221, 159, 0.07);
	background:
		radial-gradient(circle at 50% 0%, rgba(67, 223, 162, 0.075), transparent 24rem),
		linear-gradient(180deg, rgba(2, 7, 4, 0.9), rgba(2, 7, 4, 0.72));
	backdrop-filter: blur(18px) saturate(125%);
	box-shadow: 0 1px 0 rgba(235, 247, 240, 0.025);
	transition:
		background var(--z-duration-base) var(--z-ease),
		border-color var(--z-duration-base) var(--z-ease),
		box-shadow var(--z-duration-base) var(--z-ease);
}

.site-header.is-scrolled {
	border-block-end-color: rgba(99, 221, 159, 0.12);
	background: rgba(2, 9, 5, 0.92);
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.site-header::before {
	position: absolute;
	inset-block-end: -1px;
	inset-inline: var(--z-page-x);
	height: 1px;
	content: "";
	background: linear-gradient(90deg, transparent, rgba(210, 178, 105, 0.14), rgba(67, 223, 162, 0.2), transparent);
	opacity: 0.38;
}

.site-header__inner {
	display: grid;
	min-height: 80px;
	align-items: center;
	grid-template-columns: auto 1fr auto;
	gap: clamp(20px, 3vw, 40px);
}

.site-brand {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 0;
	border-radius: var(--z-radius-sm);
	isolation: isolate;
}

.site-brand::before {
	position: absolute;
	z-index: -1;
	inset: -8px;
	content: "";
	border-radius: inherit;
	background: radial-gradient(circle, rgba(67, 223, 162, 0.1), rgba(210, 178, 105, 0.03) 42%, transparent 72%);
	opacity: 0.5;
}

.site-brand__image {
	width: 60px;
	height: 60px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.28)) drop-shadow(0 0 12px rgba(67, 223, 162, 0.09));
	image-rendering: auto;
	object-fit: contain;
}

.site-brand__image--tile {
	width: 56px;
	height: 56px;
	padding: 3px;
	border: 1px solid rgba(210, 178, 105, 0.14);
	border-radius: 10px;
	background: #010403;
	box-shadow:
		0 10px 24px rgba(0, 0, 0, 0.28),
		inset 0 1px 0 rgba(235, 247, 240, 0.045);
	filter: none;
}

.site-brand__fallback {
	display: none;
	color: var(--z-text);
	font-family: var(--z-font-ui);
	font-size: 1rem;
	font-weight: 700;
	white-space: nowrap;
}

.site-brand.has-logo-error .site-brand__image {
	display: none;
}

.site-brand.has-logo-error .site-brand__fallback {
	display: inline-flex;
}

.site-navigation {
	justify-self: center;
}

.site-menu,
.footer-menu {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.site-menu a,
.footer-menu a {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding-inline: 12px;
	border-radius: var(--z-radius-sm);
	color: var(--z-text-soft);
	font-family: var(--z-font-ui);
	font-size: 0.95rem;
	font-weight: 500;
	transition:
		color var(--z-duration-fast) var(--z-ease),
		background var(--z-duration-fast) var(--z-ease);
}

.site-menu a::after {
	position: absolute;
	inset-inline: 26%;
	inset-block-end: 4px;
	height: 2px;
	content: "";
	background: var(--z-gradient-emerald);
	opacity: 0;
	transform: scaleX(0.6);
	transition:
		opacity var(--z-duration-fast) var(--z-ease),
		transform var(--z-duration-fast) var(--z-ease);
}

.site-menu a:hover,
.site-menu a:focus-visible,
.footer-menu a:hover,
.footer-menu a:focus-visible {
	background: rgba(67, 223, 162, 0.055);
	color: var(--z-text);
}

.site-menu a:hover::after,
.site-menu a:focus-visible::after,
.site-menu .current-menu-item > a::after {
	opacity: 1;
	transform: scaleX(1);
}

.site-menu .current-menu-item > a,
.site-menu .current-menu-ancestor > a {
	color: var(--z-green-3);
}

.site-header__cta {
	min-height: 44px;
	padding-inline: 18px;
	border-color: rgba(67, 223, 162, 0.2);
	background: linear-gradient(135deg, rgba(67, 223, 162, 0.96), rgba(25, 185, 121, 0.92));
	color: #020704;
	font-family: var(--z-font-ui);
	font-weight: 700;
	box-shadow: 0 10px 24px rgba(25, 185, 121, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.site-header__cta:hover,
.site-header__cta:focus-visible {
	border-color: rgba(183, 245, 218, 0.38);
	color: #020704;
	box-shadow: 0 12px 30px rgba(25, 185, 121, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.home .site-header {
	border-block-end: 0;
	background:
		radial-gradient(circle at 50% 0%, rgba(67, 223, 162, 0.075), transparent 22rem),
		linear-gradient(180deg, rgba(2, 5, 4, 0.84), rgba(2, 5, 4, 0.38));
	box-shadow: none;
	backdrop-filter: blur(18px) saturate(125%);
}

.home .site-header::before {
	inset-inline: var(--z-page-x);
	background: linear-gradient(90deg, transparent, rgba(210, 178, 105, 0.14), rgba(67, 223, 162, 0.17), transparent);
	opacity: 0.34;
}

.home .site-header__inner {
	min-height: 80px;
	gap: clamp(20px, 3vw, 40px);
}

.home .site-brand {
	border-radius: 8px;
}

.home .site-brand::before {
	inset: -7px;
	background: radial-gradient(circle, rgba(67, 223, 162, 0.09), rgba(210, 178, 105, 0.03) 42%, transparent 72%);
	opacity: 0.48;
}

.home .site-brand__image {
	width: 60px;
	height: 60px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.28)) drop-shadow(0 0 12px rgba(67, 223, 162, 0.09));
	object-fit: contain;
}

.home .site-brand__image--tile {
	width: 56px;
	height: 56px;
	padding: 3px;
	border: 1px solid rgba(210, 178, 105, 0.14);
	border-radius: 10px;
	background: #010403;
	box-shadow:
		0 10px 24px rgba(0, 0, 0, 0.28),
		inset 0 1px 0 rgba(235, 247, 240, 0.045);
	filter: none;
}

.home .site-navigation {
	align-self: stretch;
}

.home .site-menu {
	height: 100%;
}

.home .site-menu a {
	min-height: 44px;
	padding-inline: 12px;
	background: transparent;
}

.home .site-header__cta {
	min-height: 44px;
	border-color: rgba(67, 223, 162, 0.2);
	background: linear-gradient(135deg, rgba(67, 223, 162, 0.96), rgba(25, 185, 121, 0.92));
	box-shadow: 0 10px 24px rgba(25, 185, 121, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.home .site-header.is-scrolled {
	border-block-end-color: rgba(99, 221, 159, 0.12);
	background: rgba(2, 9, 5, 0.92);
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.home .site-header__cta:hover,
.home .site-header__cta:focus-visible {
	border-color: rgba(183, 245, 218, 0.38);
	box-shadow: 0 12px 30px rgba(25, 185, 121, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.admin-bar .site-header {
	inset-block-start: 32px;
}

.site-nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	place-items: center;
	padding: 0;
	border: 1px solid var(--z-border-strong);
	border-radius: 999px;
	background: linear-gradient(180deg, rgba(12, 38, 27, 0.86), rgba(3, 7, 5, 0.88));
	color: var(--z-text);
	box-shadow: inset 0 1px 0 rgba(242, 255, 248, 0.08);
}

.site-nav-toggle__line {
	position: absolute;
	display: block;
	width: 18px;
	height: 1px;
	background: currentColor;
	transition: transform var(--z-duration-base) var(--z-ease);
}

.site-nav-toggle__line:first-child {
	transform: translateY(-4px);
}

.site-nav-toggle__line:nth-child(2) {
	transform: translateY(4px);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__line:first-child {
	transform: rotate(45deg);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__line:nth-child(2) {
	transform: rotate(-45deg);
}

.site-footer {
	position: relative;
	overflow: hidden;
	border-block-start: 1px solid rgba(0, 255, 156, 0.13);
	background:
		radial-gradient(circle at 74% 8%, rgba(0, 255, 156, 0.13), transparent 30rem),
		radial-gradient(circle at 16% 72%, rgba(198, 161, 91, 0.08), transparent 24rem),
		linear-gradient(180deg, rgba(4, 13, 9, 0.88), rgba(2, 5, 4, 0.98));
}

.site-footer::before {
	position: absolute;
	inset-block-start: 0;
	inset-inline: 0;
	height: 1px;
	content: "";
	background: linear-gradient(90deg, transparent, rgba(0, 255, 156, 0.56), rgba(198, 161, 91, 0.28), transparent);
}

.site-footer__inner {
	display: grid;
	align-items: end;
	gap: clamp(28px, 5vw, 58px);
	padding-block: clamp(46px, 7vw, 82px);
}

.site-footer__brand {
	display: flex;
	align-items: flex-end;
	gap: 18px;
}

.site-footer__logo,
.site-footer__mark {
	width: 96px;
	height: 96px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3), 0 0 28px rgba(67, 223, 162, 0.08);
	image-rendering: auto;
	object-fit: contain;
}

.site-footer__logo--tile {
	width: 104px;
	height: 104px;
	padding: 4px;
	border: 1px solid rgba(210, 178, 105, 0.14);
	border-radius: 12px;
	background: #010403;
	box-shadow:
		0 16px 36px rgba(0, 0, 0, 0.3),
		inset 0 1px 0 rgba(235, 247, 240, 0.045);
	filter: none;
}

.site-footer__brand.has-logo-error .site-footer__logo {
	display: none;
}

.site-footer__name,
.site-footer__tagline,
.site-footer__copy {
	margin: 0;
}

.site-footer__name {
	color: var(--z-text);
	font-size: clamp(1.18rem, 2vw, 1.72rem);
	font-weight: 760;
}

.site-footer__tagline,
.site-footer__copy {
	color: var(--z-muted);
	font-size: 0.92rem;
}

@media (min-width: 821px) {
	.site-footer__inner {
		grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
	}

	.site-footer__copy {
		grid-column: 1 / -1;
	}
}

@media (max-width: 820px) {
	body.has-open-menu {
		overflow: hidden;
	}

	.site-header__inner {
		grid-template-columns: auto auto;
		justify-content: space-between;
	}

	.site-brand__image {
		width: 50px;
		height: 50px;
		border-radius: 0;
		object-fit: contain;
	}

	.site-brand__image--tile,
	.home .site-brand__image--tile {
		width: 48px;
		height: 48px;
		padding: 2px;
		border-radius: 8px;
	}

	.site-nav-toggle {
		display: grid;
	}

	.site-navigation {
		position: absolute;
		inset-block-start: calc(100% + 8px);
		inset-inline: var(--z-page-x);
		max-height: calc(100dvh - 92px);
		overflow-y: auto;
		padding: 8px;
		border: 1px solid var(--z-border);
		border-radius: var(--z-radius-md);
		background:
			radial-gradient(circle at var(--z-pointer-x) 0%, rgba(0, 255, 156, 0.16), transparent 18rem),
			linear-gradient(180deg, rgba(8, 26, 18, 0.96), rgba(2, 5, 4, 0.97));
		box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
		backdrop-filter: blur(20px);
		opacity: 0;
		pointer-events: none;
		transform: translateY(-8px) scale(0.98);
		transition:
			opacity var(--z-duration-base) var(--z-ease),
			transform var(--z-duration-base) var(--z-ease);
	}

	.site-navigation.is-open {
		opacity: 1;
		pointer-events: auto;
		transform: translateY(0) scale(1);
	}

	.site-menu {
		align-items: stretch;
		flex-direction: column;
		gap: 2px;
	}

	.site-menu a {
		justify-content: space-between;
		min-height: 52px;
		padding-block: 8px;
		padding-inline: 14px;
		border-radius: var(--z-radius-sm);
	}

	.site-menu a::after {
		display: none;
	}

	.site-menu a:hover,
	.site-menu a:focus-visible {
		background: var(--z-green-soft);
	}

	.site-header__cta {
		display: none;
	}

	.home .site-header__inner {
		min-height: 72px;
	}

	.home .site-brand__image {
		width: 50px;
		height: 50px;
	}

	.home .site-brand__image--tile {
		width: 48px;
		height: 48px;
		padding: 2px;
		border-radius: 8px;
	}

	.site-footer__logo,
	.site-footer__mark {
		width: 80px;
		height: 80px;
	}

	.site-footer__logo--tile {
		width: 84px;
		height: 84px;
		padding: 3px;
		border-radius: 10px;
	}

	.site-footer__inner,
	.site-footer__brand,
	.footer-menu {
		align-items: flex-start;
		flex-direction: column;
	}

	.site-footer__nav {
		width: 100%;
	}

	.footer-menu {
		gap: 4px;
	}

	.footer-menu a {
		min-height: 34px;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		inset-block-start: 46px;
	}
}
