/* Header for the public property site and the /estate portal. Tokens come from the
   header's inline style (apjakaltheme palette). Light glass bar by default;
   .es-header--overlay sits transparent on the landing page's dark hero. */
.es-header {
	--es-h-bg: rgba(255, 255, 255, 0.86);
	--es-h-ink: #151c27;
	--es-h-muted: #4a5565;
	--es-h-line: rgba(21, 28, 39, 0.08);
	--es-h-hover: rgba(var(--primary-rgb, 15, 76, 92), 0.08);
	position: sticky;
	top: 0;
	z-index: 1020;
	background: var(--es-h-bg);
	color: var(--es-h-ink);
	border-bottom: 1px solid var(--es-h-line);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
@media (prefers-color-scheme: dark) {
	.es-header {
		--es-h-bg: rgba(17, 21, 30, 0.86);
		--es-h-ink: #eef1f5;
		--es-h-muted: #a3adbb;
		--es-h-line: rgba(255, 255, 255, 0.08);
		--es-h-hover: rgba(255, 255, 255, 0.08);
	}
}
.es-header-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 12px 16px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 24px;
}
.es-header a {
	color: inherit;
	text-decoration: none;
}
.es-brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 1.125rem;
	letter-spacing: -0.01em;
}
.es-brand img {
	height: 32px;
	width: auto;
	border-radius: 10px;
}
.es-brand .es-brand-logo-light {
	display: none;
}
.es-nav {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	order: 3;
	width: 100%;
	scrollbar-width: none;
}
.es-nav::-webkit-scrollbar {
	display: none;
}
.es-nav a {
	padding: 8px 12px;
	border-radius: 10px;
	white-space: nowrap;
	font-weight: 500;
	font-size: 0.9rem;
	color: var(--es-h-muted);
	transition: color 0.15s ease, background 0.15s ease;
}
.es-nav a:hover,
.es-nav a:focus-visible {
	background: var(--es-h-hover);
	color: var(--es-h-ink);
}
.es-account {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 16px;
}
.es-header .es-head-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--primary);
	color: var(--on-primary);
	padding: 8px 16px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 0.9rem;
	box-shadow: 0 8px 24px -12px rgba(var(--primary-rgb, 15, 76, 92), 0.7);
	transition: background 0.15s ease, transform 0.15s ease;
}
.es-header .es-head-btn:hover {
	background: var(--primary-hover, var(--primary));
	transform: translateY(-1px);
}
.es-head-link {
	color: var(--es-h-muted) !important;
	font-size: 0.8rem;
	font-weight: 500;
}
.es-header a:focus-visible {
	outline: 2px solid rgba(var(--primary-rgb, 15, 76, 92), 0.4);
	outline-offset: 2px;
}

/* Overlay: transparent over the dark hero, dark glass once scrolled. */
.es-header--overlay {
	position: fixed;
	left: 0;
	right: 0;
	--es-h-bg: transparent;
	--es-h-ink: #ffffff;
	--es-h-muted: rgba(255, 255, 255, 0.78);
	--es-h-line: transparent;
	--es-h-hover: rgba(255, 255, 255, 0.1);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.es-header--overlay.is-scrolled {
	--es-h-bg: rgba(10, 14, 20, 0.78);
	--es-h-line: rgba(255, 255, 255, 0.08);
	-webkit-backdrop-filter: saturate(160%) blur(16px);
	backdrop-filter: saturate(160%) blur(16px);
	box-shadow: 0 12px 32px -20px rgba(0, 0, 0, 0.8);
}
.es-header--overlay .es-brand .es-brand-logo {
	display: none;
}
.es-header--overlay .es-brand .es-brand-logo-light {
	display: inline-block;
}
.es-header--overlay .es-head-btn {
	background: var(--accent);
	color: var(--on-accent);
	box-shadow: 0 10px 28px -12px rgba(var(--accent-rgb, 224, 164, 88), 0.8);
}
.es-header--overlay .es-head-btn:hover {
	background: var(--accent-hover, var(--accent));
}
.es-header--overlay a:focus-visible {
	outline-color: var(--accent);
}

@media (min-width: 900px) {
	.es-header-inner {
		padding: 16px 24px;
	}
	.es-nav {
		order: 0;
		width: auto;
		flex: 1;
		justify-content: center;
	}
}
