/**
 * Шапка — Figma 1:2204 / 1:1464 (1920×142)
 * Ряд: logo | nav | phone+ig | CTAs — justify-content: space-between
 * pad: 40×32 · nav gap 32 · phone↔ig 32 · CTA gap 12
 */
.site-topbar {
	position: sticky;
	top: 0;
	z-index: 100;
	transition: transform 0.3s ease;
}

.site-topbar.is-hidden {
	transform: translateY(-110%);
}

/*
 * Прозрачная шапка на главной/«О компании»/«Производство» тоже должна липнуть
 * и выезжать при скролле вверх. При прокрутке даём ей фон, иначе текст не читается.
 */
.home .site-topbar,
.has-transparent-header .site-topbar {
	position: sticky;
	left: 0;
	right: 0;
	background: transparent;
	/* Высоту шапки проставляет header.js — контент начинается под ней, как раньше при absolute. */
	margin-bottom: calc(0px - var(--mbi-topbar-h, 142px));
}

.home .site-topbar.is-stuck .site-header,
.has-transparent-header .site-topbar.is-stuck .site-header {
	background: var(--bg-blue);
}

.site-header {
	font-family: 'Inter', sans-serif;
	color: var(--txt-white);
}

.site-header--solid {
	background: var(--bg-blue);
}

.site-header--transparent {
	background: transparent;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0;
	min-height: 142px;
	padding-top: 32px;
	padding-bottom: 32px;
	box-sizing: border-box;
}

/* Logo 138×78 */
.site-header__logo {
	flex: 0 0 auto;
}

.site-header__logo .custom-logo-link {
	display: block;
	line-height: 0;
}

.site-header__logo .custom-logo {
	width: 138px;
	height: 78px;
	object-fit: contain;
	display: block;
}

/* Nav — не растягивать, иначе ломается space-between как в Figma */
.site-header__nav {
	flex: 0 1 auto;
	display: flex;
	justify-content: flex-start;
	min-width: 0;
}

.site-header__menu {
	display: flex;
	align-items: center;
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-header__menu a {
	color: var(--txt-white);
	text-decoration: none;
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.site-header__menu a:hover,
.site-header__menu .current-menu-item a {
	color: var(--txt-coffee);
}

/* Phone + Instagram — gap 32 */
.site-header__meta {
	display: flex;
	align-items: center;
	gap: 32px;
	flex: 0 0 auto;
}

.site-header__phone {
	color: var(--txt-white);
	text-decoration: none;
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

.site-header__social {
	display: flex;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	overflow: hidden;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.site-header__social img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* CTAs — h 76, gap 12 */
.site-header__ctas {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}

.site-header__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 76px;
	min-height: 76px;
	padding: 18px 32px;
	border-radius: 999px;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.05em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	box-sizing: border-box;
	transition: opacity 0.2s ease;
	border: 0;
}

.site-header__cta:hover {
	opacity: 0.9;
}

.site-header__cta--consult {
	background: var(--bg-dark-blue);
	color: var(--txt-white);
}

.site-header__cta--wa {
	background: var(--bg-white);
	color: var(--txt-blue);
}

/* Burger */
.site-header__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	width: 44px;
	height: 44px;
	padding: 10px;
	background: none;
	border: 0;
	cursor: pointer;
}

.site-header__burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--txt-white);
	border-radius: 2px;
}

/* Drawer — Figma 1:6304 «меню хэдэр» */
.site-drawer {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 200;
	width: 100%;
	max-width: 100%;
	height: 100%;
	background: var(--bg-dark-blue);
	color: var(--txt-white);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	overflow-y: auto;
}

.site-drawer.is-open {
	transform: translateX(0);
}

.site-drawer__logo {
	position: absolute;
	top: 24px;
	left: 16px;
	z-index: 1;
	line-height: 0;
}

.site-drawer__logo img {
	width: 96px;
	height: auto;
	display: block;
}

.site-drawer__close {
	position: absolute;
	top: 40px;
	right: 24px;
	width: 41px;
	height: 41px;
	border-radius: 999px;
	background: var(--bg-coffee);
	border: 0;
	cursor: pointer;
}

.site-drawer__close span {
	position: absolute;
	left: 10px;
	right: 10px;
	top: 50%;
	height: 2px;
	background: var(--txt-white);
}

.site-drawer__close span:first-child {
	transform: rotate(45deg);
}

.site-drawer__close span:last-child {
	transform: rotate(-45deg);
}

.site-drawer__inner {
	padding: 152px 24px 40px;
	display: flex;
	flex-direction: column;
	gap: 40px;
	min-height: 100%;
	box-sizing: border-box;
}

.site-drawer__menu {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.site-drawer__menu li {
	border-top: 1px solid rgba(249, 240, 236, 0.12);
}

.site-drawer__menu li:last-child {
	border-bottom: 1px solid rgba(249, 240, 236, 0.12);
}

.site-drawer__menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 24px 0;
	color: var(--txt-white);
	text-decoration: none;
	font-size: 26px;
	font-weight: 500;
	line-height: 1.2;
}

.site-drawer__menu .current-menu-item a,
.site-drawer__menu a:hover {
	color: var(--txt-coffee);
}

.site-drawer__meta {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.site-drawer__contacts {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.site-drawer__socials {
	display: flex;
	align-items: center;
	gap: 8px;
}

.site-drawer__phone,
.site-drawer__email,
.site-drawer__social {
	color: var(--txt-white);
	text-decoration: none;
	font-size: 18px;
}

.site-drawer__email:hover {
	color: var(--txt-coffee);
}

.site-drawer__address {
	margin: 0;
	color: var(--txt-light-grey);
	font-size: 16px;
	line-height: 1.4;
}

.site-drawer__social {
	display: inline-flex;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	overflow: hidden;
	align-items: center;
	justify-content: center;
}

.site-drawer__social img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.site-drawer__ctas {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: auto;
	padding-top: 24px;
}

.site-drawer__ctas .site-header__cta {
	width: 100%;
	text-align: center;
	font-size: 20px;
	height: 76px;
	min-height: 76px;
	padding: 18px 32px;
}

.site-drawer__ctas .site-header__cta--consult {
	display: none;
}

.site-drawer__ctas .site-header__cta--wa {
	background: var(--bg-white);
	color: var(--txt-blue);
}

.site-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 150;
	background: rgba(34, 42, 54, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.site-drawer-backdrop.is-open {
	opacity: 1;
	visibility: visible;
}

/* —— Adaptive —— */
@media (max-width: 1600px) {
	.site-header__inner {
		min-height: 120px;
		padding-top: 24px;
		padding-bottom: 24px;
		gap: 16px;
	}

	.site-header__menu {
		gap: 20px;
	}

	.site-header__menu a,
	.site-header__phone {
		font-size: 16px;
	}

	.site-header__cta {
		font-size: 14px;
		height: 56px;
		min-height: 56px;
		padding: 14px 20px;
	}

	.site-header__logo .custom-logo {
		width: 110px;
		height: auto;
		max-height: 62px;
	}

	.site-header__social {
		width: 40px;
		height: 40px;
	}

	.site-header__meta {
		gap: 20px;
	}
}

@media (max-width: 1280px) {
	.site-header__ctas {
		display: none;
	}

	.site-header__nav {
		justify-content: flex-end;
	}
}

@media (max-width: 1100px) {
	.site-header__nav,
	.site-header__meta {
		display: none;
	}

	.site-header__burger {
		display: flex;
	}

	.site-header__inner {
		padding-top: 20px;
		padding-bottom: 20px;
	}

	.site-header__logo .custom-logo {
		width: 96px;
		max-height: 54px;
	}
}

@media (max-width: 700px) {
	.site-header__inner {
		padding-top: 16px;
		padding-bottom: 16px;
	}
}
