/**
 * Global chrome: new top bar + auth sheets (home + map).
 */

:root {
	--site-red: #e31b23;
	--site-red-2: #b01018;
	--site-ink: #111;
	--site-paper: #f7f4ee;
	--site-max: 1200px;
	--site-gutter: clamp(1rem, 3vw, 2.25rem);
	--site-font: "Manrope", system-ui, sans-serif;
	--site-display: "Space Grotesk", system-ui, sans-serif;
	--wk-header-h: calc(84px + env(safe-area-inset-top, 0px));
	--wk-page-pad: max(var(--site-gutter), calc((100% - var(--site-max)) / 2));
}

.site-top {
	position: fixed;
	inset: 0 0 auto;
	z-index: 1100;
	pointer-events: none;
}

.site-top__inner {
	pointer-events: auto;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1rem 1.25rem;
	width: 100%;
	min-height: var(--wk-header-h);
	padding: calc(10px + env(safe-area-inset-top, 0px)) var(--wk-page-pad) 10px;
}

.site-top__logo {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.site-top__logo img {
	width: 72px;
	height: 72px;
	object-fit: contain;
	display: block;
}

.site-top__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 1.15rem;
	justify-content: center;
}

.site-top__nav a {
	color: inherit !important;
	text-decoration: none !important;
	font-family: var(--site-font);
	font-size: 0.92rem;
	font-weight: 500;
	opacity: 0.62;
	transition: opacity 0.2s ease;
}

.site-top__nav a:hover {
	opacity: 1;
}

.site-top__aside {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.55rem;
	position: relative;
}

.site-top__map {
	display: inline-flex;
	align-items: center;
	min-height: 2.55rem;
	padding: 0.55rem 1rem;
	background: var(--site-ink);
	color: #fff !important;
	text-decoration: none !important;
	font-family: var(--site-font);
	font-size: 0.88rem;
	font-weight: 700;
	transition: background 0.2s ease;
}

.site-top__map:hover,
.site-top__map.is-on {
	background: var(--site-red);
}

.site-gate {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	position: relative;
}

.site-gate__btn {
	appearance: none;
	border: 1px solid transparent;
	min-height: 2.55rem;
	padding: 0.55rem 0.95rem;
	font-family: var(--site-font);
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-gate__btn--ghost {
	background: transparent;
	border-color: rgba(17, 17, 17, 0.18);
	color: var(--site-ink);
}

.site-gate__btn--ghost:hover {
	border-color: var(--site-ink);
}

.site-gate__btn--solid {
	background: var(--site-red);
	border-color: var(--site-red);
	color: #fff;
}

.site-gate__btn--solid:hover {
	background: var(--site-red-2);
	border-color: var(--site-red-2);
}

.site-gate__rep {
	margin-left: 0.35rem;
	opacity: 0.65;
	font-weight: 600;
	font-size: 0.78rem;
}

/* Auth sheet — centered modal, not old bubble */

.site-sheet {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1200;
	width: min(420px, calc(100vw - 2rem));
	max-height: min(86dvh, 720px);
	overflow: auto;
	padding: 1.5rem 1.35rem 1.25rem;
	background: #fff;
	color: var(--site-ink);
	border: 1px solid rgba(17, 17, 17, 0.08);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
}

.site-sheet--wide {
	width: min(460px, calc(100vw - 2rem));
}

.site-sheet__x {
	position: absolute;
	top: 0.7rem;
	right: 0.7rem;
	appearance: none;
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #777;
}

.site-sheet__eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--site-red);
}

.site-sheet h2 {
	margin: 0;
	font-family: var(--site-display);
	font-size: 1.7rem;
	font-weight: 600;
	letter-spacing: -0.03em;
}

.site-sheet__lead {
	margin: 0.45rem 0 1.2rem;
	color: #666;
	font-size: 0.95rem;
	line-height: 1.5;
}

.site-sheet__form {
	display: grid;
	gap: 0.75rem;
}

.site-sheet__form label {
	display: grid;
	gap: 0.3rem;
}

.site-sheet__form label > span {
	font-size: 0.78rem;
	font-weight: 600;
	color: #666;
}

.site-sheet__form input[type="text"],
.site-sheet__form input[type="email"],
.site-sheet__form input[type="password"],
.site-sheet__form input[type="tel"] {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.65rem 0.8rem;
	border: 1px solid rgba(17, 17, 17, 0.16);
	background: #fafafa;
	font: inherit;
	color: var(--site-ink);
}

.site-sheet__form input:focus {
	outline: 2px solid rgba(227, 27, 35, 0.25);
	border-color: var(--site-red);
}

.site-sheet__lost {
	margin: 0;
	text-align: right;
	font-size: 0.82rem;
}

.site-sheet__lost a {
	color: #555;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.site-sheet__check {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.88rem;
	cursor: pointer;
}

.site-sheet__check input[type="checkbox"] {
	appearance: auto;
	width: 1.05rem;
	height: 1.05rem;
	accent-color: var(--site-red);
	cursor: pointer;
}

.site-sheet__submit {
	appearance: none;
	border: 0;
	min-height: 2.9rem;
	margin-top: 0.25rem;
	background: var(--site-red);
	color: #fff;
	font-family: var(--site-font);
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
}

.site-sheet__submit:hover {
	background: var(--site-red-2);
}

.site-sheet__switch {
	appearance: none;
	border: 0;
	background: transparent;
	margin-top: 0.9rem;
	width: 100%;
	text-align: center;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	color: #555;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

body.is-auth-bubble-open::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 1150;
	background: rgba(10, 10, 10, 0.45);
	backdrop-filter: blur(3px);
}

/* Home + content pages top bar (light) */

.site-top--is-home,
.site-top--is-site {
	color: var(--site-ink);
}

.site-top--is-home .site-top__inner,
.site-top--is-site .site-top__inner {
	background: rgba(243, 243, 237, 0.94);
	border-bottom: 1px solid rgba(32, 37, 31, 0.1);
	backdrop-filter: blur(12px);
}

.site-top--is-home .site-top__logo img,
.site-top--is-site .site-top__logo img {
	width: 84px;
	height: 84px;
}

.site-top--is-site .site-top__map {
	background: #252d23;
}

.site-top--is-site .site-top__map:hover,
.site-top--is-site .site-top__map.is-on {
	background: #ec3828;
}

body.page:not(.wk-is-map),
body.page-template-default {
	--wk-header-h: calc(104px + env(safe-area-inset-top, 0px));
	background: #f3f3ed;
	color: #20251f;
}

/* Map top bar — keep dark chrome, new components */

.site-top--is-map {
	color: #f2f2f2;
}

.site-top--is-map .site-top__inner {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.35) 70%, transparent);
	border: 0;
}

.site-top--is-map .site-top__logo img {
	width: 72px;
	height: 72px;
}

.site-top--is-map .site-gate__btn--ghost {
	border-color: rgba(255, 255, 255, 0.28);
	color: #fff;
}

.site-top--is-map .site-top__map {
	background: var(--site-red);
}

body.wk-is-map {
	--wk-header-h: calc(92px + env(safe-area-inset-top, 0px));
}

body.home:not(.wk-is-map),
body.front-page:not(.wk-is-map) {
	--wk-header-h: calc(104px + env(safe-area-inset-top, 0px));
	--wk-font-display: var(--site-display);
	--wk-font-body: var(--site-font);
}

@media (max-width: 900px) {
	.site-top__inner {
		grid-template-columns: auto auto;
		grid-template-areas:
			"logo aside"
			"nav nav";
	}

	.site-top__logo { grid-area: logo; }
	.site-top__aside { grid-area: aside; }
	.site-top__nav {
		grid-area: nav;
		justify-content: flex-start;
		overflow-x: auto;
		padding-bottom: 0.15rem;
	}

	.site-top--is-home .site-top__logo img,
	.site-top--is-map .site-top__logo img {
		width: 64px;
		height: 64px;
	}

	body.home:not(.wk-is-map),
	body.front-page:not(.wk-is-map),
	body.wk-is-map {
		--wk-header-h: calc(118px + env(safe-area-inset-top, 0px));
	}

	.site-gate__btn--ghost span,
	.site-gate__btn { font-size: 0.8rem; }
}
