/**
 * Adaptive graphite header shell.
 */

.tw-site-header {
	position: sticky;
	z-index: 900;
	top: 0;
	width: 100%;
	overflow: visible;
	border-bottom: 1px solid var(--tw-header-border);
	background: var(--tw-header-bg);
	box-shadow: var(--tw-header-shadow);
	color: var(--tw-header-text);
	container-name: tw-header;
	container-type: inline-size;
}

body.tw-home-active:not(.tw-nav-open) .tw-site-header:not(.is-scrolled) {
	position: fixed;
	border-bottom-color: rgba(255, 255, 255, 0.16);
	background: linear-gradient(180deg, rgba(10, 14, 17, 0.82), rgba(10, 14, 17, 0));
	box-shadow: none;
}

.admin-bar .tw-site-header {
	top: 32px;
}

.tw-site-header-inner {
	display: grid;
	min-height: var(--tw-header-height);
	align-items: center;
	grid-template-columns: minmax(188px, auto) minmax(0, 1fr) auto;
	gap: clamp(0.75rem, 1.5vw, 1.5rem);
	overflow: visible;
}

.tw-site-header.is-scrolled .tw-site-header-inner {
	min-height: 72px;
}

.tw-site-branding {
	min-width: 0;
}

.tw-site-branding__link,
.tw-mobile-drawer-brand {
	display: inline-flex;
	min-width: 0;
	align-items: center;
	color: var(--tw-header-text);
	text-decoration: none;
}

.tw-site-branding__link:hover,
.tw-mobile-drawer-brand:hover {
	color: var(--tw-header-text);
}

.tw-site-branding__desktop {
	display: inline-flex;
	min-width: 0;
	align-items: flex-start;
	flex-direction: column;
	justify-content: center;
}

.tw-site-branding__compact {
	display: none;
	align-items: center;
	justify-content: center;
}

.tw-site-branding__desktop-logo {
	display: block;
	width: auto;
	max-width: min(248px, 18vw);
	max-height: var(--tw-desktop-logo-max-height, 56px);
	object-fit: contain;
	object-position: left center;
}

.tw-site-header.is-scrolled .tw-site-branding__desktop-logo {
	max-height: min(var(--tw-desktop-logo-max-height, 56px), 46px);
}

.tw-site-branding__site-title {
	display: block;
	max-width: 24ch;
	color: var(--tw-header-text);
	font-size: clamp(1rem, 1.4vw, 1.3rem);
	font-weight: 850;
	letter-spacing: -0.025em;
	line-height: 1.08;
	overflow-wrap: anywhere;
}

.tw-site-branding__tagline {
	display: block;
	max-width: 34ch;
	margin-top: 0.22rem;
	color: var(--tw-header-muted);
	font-size: 0.7rem;
	font-weight: 620;
	line-height: 1.2;
}

.tw-site-branding__compact-logo {
	display: block;
	width: auto;
	max-width: 112px;
	max-height: var(--tw-compact-logo-max-height, 40px);
	object-fit: contain;
}

.tw-site-branding__compact-fallback {
	display: inline-flex;
	min-width: 42px;
	min-height: 40px;
	align-items: center;
	justify-content: flex-start;
	color: var(--tw-header-text);
	font-size: 1.25rem;
	font-weight: 900;
	letter-spacing: -0.055em;
	line-height: 1;
}

.tw-footer-brand .custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.tw-site-header-tools,
.tw-header-actions {
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.tw-site-header-tools {
	justify-self: end;
	white-space: nowrap;
}

.tw-child-header-phone,
.tw-compact-phone {
	display: inline-flex;
	width: 44px;
	height: 44px;
	max-width: 44px;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--tw-header-border);
	border-radius: 999px;
	background: var(--tw-header-surface);
	color: var(--tw-header-text);
	line-height: 1;
	text-decoration: none;
}

.tw-child-header-phone:hover,
.tw-compact-phone:hover {
	border-color: var(--tw-header-accent);
	background: var(--tw-header-hover);
	color: var(--tw-header-text);
}

.tw-child-header-phone__icon,
.tw-compact-phone__icon {
	display: block;
	flex: 0 0 auto;
}

.tw-header-phone,
.tw-header-email {
	display: flex;
	min-height: 48px;
	align-items: center;
	gap: 0.65rem;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--tw-drawer-border);
	border-radius: 0.85rem;
	background: var(--tw-drawer-surface);
	color: var(--tw-drawer-text);
	font-size: 0.9rem;
	font-weight: 750;
	text-decoration: none;
	white-space: nowrap;
}

.tw-header-phone:hover,
.tw-header-email:hover {
	background: var(--tw-drawer-hover);
	color: var(--tw-color-red);
}

.tw-drawer-contacts {
	display: grid;
	gap: 0.25rem;
}

.tw-header-cta {
	max-width: none;
	border-radius: 999px;
}

@media (max-width: 782px) {
	.admin-bar .tw-site-header {
		top: 46px;
	}
}
