html {
	margin: 0;
	padding: 0;
	width: 100%;
	/* Защита от "подтягивания" экрана при движении пальцем вниз */
	overscroll-behavior: none;
}

/* БАЗОВЫЕ НАСТРОЙКИ */
body {
	margin: 0;
	padding: 0;
	/* Центрирует всё содержимое по горизонтали */
	min-height: 100vh;
	/* Растягивает тело сайта на всю высоту экрана */
	background-color: #ffffff;
	/* Плавная смена темы день/ночь */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	/* Системные шрифты */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* ЗАЩИТА ОТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА */
	overflow-x: hidden;
	width: 100%;
	position: relative;
}

.home-page {
	/* Разрешает только вертикальный скролл */
	touch-action: pan-y;
	overflow-x: hidden;
}


/* Возвращаем "притяжение" футера для всех страниц, КРОМЕ главной */
body:not(.home-page) {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Контентная часть на текстовых страницах заберет всё свободное место */
body:not(.home-page) .content-section {
	flex: 1 0 auto;
}

/* Сам футер теперь всегда будет внизу на текстовых страницах */
body:not(.home-page) footer {
	flex-shrink: 0;
}

* {
	/* Помогает Chrome лучше обсчитывать границы текста */
	text-rendering: optimizeLegibility;
}

/* ШИРОКАЯ ЗОНА (ДЛЯ КАРТЫ И ГЛАВНОЙ) */
.wide-container {
	max-width: 1200px;
	width: 100%;
	margin: 0 auto;
	padding: 0 40px;
	box-sizing: border-box;
}

/* КОНТЕЙНЕРЫ (СЕТКА ПРОЕКТА) */
.content-section {
	max-width: 825px;
	width: 90%;
	margin: 0px auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	padding: 100px 5px 30px 5px;
	box-sizing: border-box;
}

/* Текст «всплывает» и проявляется. */
@keyframes contentFadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ТИПОГРАФИКА (ОФОРМЛЕНИЕ ТЕКСТА) */
h1 {
	font-size: 28px;
	font-weight: 400;
	letter-spacing: -0.01em;
	color: #EB7B08;
}

h2 {
	font-size: 20px;
	font-weight: 400;
	color: #5d5d5d;
	line-height: 1.3;
	margin-top: 10px;
}

p {
	font-size: 17px;
	line-height: 1.3;
	color: #5d5d5d;
	margin: 4px 0;
}

/* раздвигает телефоны в контактах */
.phone-link {
	margin: 1px 0;
}

/* БАЗОВАЯ АНИМАЦИЯ (Для всех страниц, КРОМЕ главной) */
body:not(.home-page) .content-section>* {
	opacity: 0;
	animation: contentFadeIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
	/* Базовая задержка для самого первого элемента */
	animation-delay: 0.3s;
}

body:not(.home-page) .content-section>*:nth-child(2) {
	animation-delay: 0.5s;
}

body:not(.home-page) .content-section>*:nth-child(3) {
	animation-delay: 0.7s;
}

body:not(.home-page) .content-section>*:nth-child(4) {
	animation-delay: 0.9s;
}

body:not(.home-page) .content-section>*:nth-child(5) {
	animation-delay: 1.1s;
}

body:not(.home-page) .content-section>*:nth-child(6) {
	animation-delay: 1.3s;
}

body:not(.home-page) .content-section>*:nth-child(7) {
	animation-delay: 1.5s;
}

body:not(.home-page) .content-section>*:nth-child(8) {
	animation-delay: 1.7s;
}

body:not(.home-page) .content-section>*:nth-child(9) {
	animation-delay: 1.9s;
}

body:not(.home-page) .content-section>*:nth-child(10) {
	animation-delay: 2.1s;
}

body:not(.home-page) .content-section>*:nth-child(11) {
	animation-delay: 2.3s;
}

body:not(.home-page) .content-section>*:nth-child(12) {
	animation-delay: 2.5s;
}

body:not(.home-page) .content-section>*:nth-child(13) {
	animation-delay: 2.7s;
}

body:not(.home-page) .content-section>*:nth-child(14) {
	animation-delay: 2.9s;
}

body:not(.home-page) .content-section>*:nth-child(15) {
	animation-delay: 3.1s;
}

body:not(.home-page) .content-section>*:nth-child(16) {
	animation-delay: 3.3s;
}

body:not(.home-page) .content-section>*:nth-child(17) {
	animation-delay: 3.5s;
}

body:not(.home-page) .content-section>*:nth-child(18) {
	animation-delay: 3.7s;
}

body:not(.home-page) .content-section>*:nth-child(19) {
	animation-delay: 3.9s;
}

body:not(.home-page) .content-section>*:nth-child(20) {
	animation-delay: 4.1s;
}

body:not(.home-page) .content-section>*:nth-child(21) {
	animation-delay: 4.3s;
}

body:not(.home-page) .content-section>*:nth-child(22) {
	animation-delay: 4.5s;
}

/* Элемент ждет появления в поле зрения */
.reveal-on-scroll {
	opacity: 0;
	transform: translateY(20px);
	transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
	opacity 1s ease;
}

/* Элемент появляется */
.reveal-on-scroll.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* --- ГЛАВНАЯ СТРАНИЦА: ПОЛНОЭКРАННАЯ КАРТА И КОНТЕНТ --- */
.zoom-container {
	position: relative;
	width: 100%;
	height: 5000px;
}

/* ЛИФТ КАРТЫ: зафиксирован на весь экран */
.zoom-sticky-wrapper {
	position: sticky;
	top: 0;
	left: 0;
	/* Используем vw/vh для строгого соответствия окну */
	width: 100%;
	height: 100vh;
	/* Обрезает карту при увеличении */
	overflow: hidden;
}

/* ОКНО КАРТЫ: растянуто внутри лифта */
.map-underlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
}

.map-layer {
	position: absolute;
	width: 3000px;
	height: 3000px;
	top: 0;
	left: 0;
	backface-visibility: hidden;
}

.map-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	/* Чтобы SVG не искажался */
	object-fit: contain;
}

#l, #l1, #l2, #l3, #l4, #l5, #l6, #L0, #L1, #L2, #L3, #L4, #L5, #L6, #L7, #L8, #c1, #c2, #c3, #c4, #c5, #c6, #p1, #p2, #p3, #p4, #p5, #p6, #mapLetters path, #mapLetters polygon {
	stroke-opacity: 1;
	/* Заставляет браузер отрисовывать вектор максимально точно */
	shape-rendering: geometricPrecision;
}

#imgCity {
	width: 1500px;
	height: 1150px;
	top: 0;
	left: 0;
	border-radius: 120px;
	/* Обязательно добавляем это, чтобы Chrome и Safari не "мылили" края */
	-webkit-mask-image: -webkit-radial-gradient(white, black);
	/* Для четкости в Chrome и Safari */
	image-rendering: -webkit-optimize-contrast;
	-webkit-transform: translateZ(0);
	image-rendering: high-quality;
	pointer-events: none;
	mix-blend-mode: normal;
}

/* Контейнер для SVG районов */
.districts-svg {
	position: absolute;
	top: -205px;
	left: 0;
	width: 1550px;
	height: 1550px;
	/* Сам SVG "прозрачен" для кликов... */
	pointer-events: none;
}

/* А сами пути (районы) внутри него — активны */
.district-path {
	/* ...но районы ловят мышку */
	pointer-events: all;
	fill: #eb7b08;
	fill-opacity: 0;
	stroke-opacity: 0;
	stroke-width: 7;
	cursor: default;
	/*	убираем  микро-щели, которые «моргают» во время движения*/
	shape-rendering: geometricPrecision;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.district-label {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-size: 40px;
	font-weight: 700;
	fill: #5d5d5d;
	opacity: 0;
	pointer-events: none;
	will-change: opacity;
	paint-order: stroke fill;
}

/* Контейнер для SVG районов */
.rooms-svg {
	position: absolute;
	top: -210px;
	left: -5px;
	width: 1500px;
	height: 1500px;
	/* Сам SVG "прозрачен" для кликов... */
	pointer-events: none;
}

/* А вот сами пути (макеты) внутри него — активны */
.room-path {
	stroke: #eb7b08;
	/* ...но макеты ловят мышку */
	pointer-events: all;
	fill: transparent;
	opacity: 0;
	fill-opacity: 0;
	stroke-opacity: 0;
	stroke-width: 9;
	cursor: default;
	will-change: opacity;
}

.size-label {
	font-weight: 800;
	fill: #ffffff;
	opacity: 0;
	pointer-events: none;
	paint-order: stroke fill;
}

.house-img {
	top: 0;
	left: 0;
	object-fit: cover;
	/* Накладываем кадры друг на друга */
	position: absolute;
	border-radius: 150px;
}

/* Обращаемся к картинке внутри нашего кадра */
.house-img img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 120px;
	/* чтобы Chrome и Safari не "мылили" края */
	-webkit-mask-image: -webkit-radial-gradient(white, black);
	image-rendering: high-quality;
	-webkit-transform: translateZ(0);
}

/* Контейнер лифта — теперь это наш главный "якорь" */
#houseLayer {
	position: absolute;
	width: 1500px;
	height: 1079px;
	transform-origin: 0 0;
}

#frame1 {
	position: absolute;
	top: 0;
	left: 500px;
	width: 614px;
	height: 1079px;
	object-fit: contain;
	pointer-events: none;
}

#frame2, #frame3 {
	position: absolute;
	top: 0;
	left: 0;
	width: 1500px;
	height: 1079px;
	object-fit: contain;
	pointer-events: none;
}

#frame4 {
	width: 1500px;
	height: 898px;
	top: 0;
	left: 0;
	pointer-events: none;
}

/* 3. Масштабируем всё через родителя */
.house-sequence-wrapper {
	position: absolute;
	inset: 0;
}

.info-window-glass {
	min-height: 170px;
	position: fixed;
	top: 100px;
	/* Зеркальная формула для левого края хедера: */
	left: max(5%, calc(50% - 500px));
	width: 230px;
	padding: 25px;
	background: rgba(255, 255, 255, 0.45);
	-webkit-backdrop-filter: blur(10px) saturate(180%);
	backdrop-filter: blur(10px) saturate(180%);
	border-radius: 20px;
	z-index: 100;
	opacity: 0;
	pointer-events: none;
	transform: translateY(-15px);
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
	/* Чтобы текст не вылезал за границы во время анимации */
	overflow: hidden;
}

/* Оптимизируем блюр: только если браузер мощный */
@supports (backdrop-filter: blur(1px)) {
	.info-window-glass {
		background: rgba(255, 255, 255, 0.45);
		backdrop-filter: blur(10px) saturate(180%);
		-webkit-backdrop-filter: blur(10px) saturate(180%);
	}
}

/* Эффект стеклянной грани для окна подсказок */
.info-window-glass::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 20px;
	padding: 1px;
	/* градиент: от блика сверху к тени снизу */
	background: linear-gradient(
	to bottom,
	rgba(255, 255, 255, 0.45) 0%,
	rgba(0, 0, 0, 0.1) 100%
	);
	/* оставляем только 1px по краю */
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	/* Рамка не мешает нажимать на кнопки */
	pointer-events: none;
}

/* Стили заголовков внутри "стекла" */
.info-label {
	font-size: 15px;
	color: #EB7B08;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.info-title {
	font-size: 26px;
	color: #EB7B08;
	font-weight: bold;
	margin-bottom: 15px;
	line-height: 1.2;
	opacity: 1;
	transition: opacity 0.2s ease-in-out;
}

.info-text  {
	font-size: 18px;
	color: #5d5d5d;
	line-height: 1.4;
	opacity: 1;
	transition: opacity 0.2s ease-in-out;
	/* Заставляет браузер учитывать переносы \n */
	white-space: pre-line;
}

.info-window-glass.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* плавная смена информации в окне */
.fade-out {
	opacity: 0 !important;
}

/* ФУТЕР */
footer {
	margin-top: auto;
	padding: 10px 0;
	border-top: 1px solid rgba(151, 151, 151, 0.15);
	position: relative;
}

.footer-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 5px;
}

.footer-content a.active {
	color: #EB7B08;
	pointer-events: none;
}

.copyright {
	font-size: 13px;
	color: #5d5d5d;
}

.trademark-footer {
	font-size: 11px;
	margin: 0;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 15px;
	font-size: 13px;
	color: #5d5d5d;
}

/* --- ЭТАП 1: 900px - 681px (Тают соцсети) --- */
@media (max-width: 900px) {
	.header-socials {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.5s ease, visibility 0.5s ease;
	}
	.info-window-glass {
		width: 175px;
		padding: 12px;
		min-height: 130px;
	}
	.info-label {
		font-size: 13px;
		margin-bottom: 4px;
	}
	.info-title {
		font-size: 21px;
		margin-bottom: 8px;
		line-height: 1.2;
	}
	.info-text  {
		font-size: 15px;
		line-height: 1.4;
	}
		
}

/* --- ЭТАП 2: 680px (Тает десктопная навигация) --- */
@media (max-width: 681px) {
	.nav-desktop {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.5s ease, visibility 0.5s ease;
	}
}

/* --- ЭТАП 3: 670px - ФИНАЛЬНАЯ ТРАНСФОРМАЦИЯ (Mobile Mode) --- */
@media (max-width: 670px) {
	
	/* Полностью освобождаем место в DOM */
	.nav-desktop,
	.header-socials {
		display: none !important;
	}
	
	/* ПРИЗРАЧНАЯ КНОПКА (GHOST MODE) */
	.menu-toggle {
		display: flex;
		position: absolute;
		right: 10px;
		width: 50px;
		height: 50px;
		background: transparent;
		border: none;
		cursor: pointer;
		z-index: 3100;
		animation: fadeInSequence 0.7s forwards;
		-webkit-tap-highlight-color: transparent;
	}
	
	@keyframes fadeInSequence {
		from {
			opacity: 0;
		}
		to {
			opacity: 1;
		}
	}
	
	/* ЛИНИИ КНОПКИ */
	.menu-toggle .line {
		top: 47%;
		left: 50%;
		margin-left: -15px;
		position: absolute;
		width: 23px;
		height: 2px;
		background: #5d5d5d;
		border-radius: 2px;
		transition: all 0.35s cubic-bezier(0.2, 0, 0.2, 1);
	}
	
	.menu-toggle .line:nth-child(1) {
		transform: translateY(-5px);
	}
	
	.menu-toggle .line:nth-child(2) {
		transform: translateY(5px);
	}
	
	/* --- ХОВЕР (ТОЛЬКО ДЛЯ МЫШКИ) --- */
	@media (hover: hover) {
		.menu-toggle:hover .line {
			background: #EB7B08;
		}
	}
	
	/* --- АКТИВНОЕ СОСТОЯНИЕ (КРЕСТИК) --- */
	/* Когда класс .active добавлен через JS */
	.menu-toggle.active .line:nth-child(1) {
		background: #EB7B08;
		transform: translateY(0) rotate(-45deg); /* Сводим в центр (16+26)/2 */
	}
	.menu-toggle.active .line:nth-child(2) {
		background: #EB7B08;
		transform: translateY(0) rotate(45deg);
	}
}

/* --- МОБИЛЬНАЯ ШТОРКА --- */
.nav-mobile {
	color: #5d5d5d;
	display: none;
	position: fixed;
	top: 100px;
	right: max(5%, calc(50% - 500px));
	width: 130px;
	background: rgba(255, 255, 255, 0.45);
	-webkit-backdrop-filter: blur(10px) saturate(180%);
	backdrop-filter: blur(10px) saturate(180%);
	border-radius: 20px;
	padding: 12px 14px;
	flex-direction: column;
	gap: 10px;
	z-index: 9998;
	opacity: 0;
	transform: translateY(-15px);
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

/* Эффект стекла для шторки */
.nav-mobile::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 20px;
	padding: 1px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

.nav-mobile.is-open {
	opacity: 1;
	transform: translateY(0);
}

/* Ссылки внутри шторки */
.nav-mobile a {
	display: flex;
	height: 54px;
	justify-content: center;
	align-items: center;
	border-radius: 12px;
	font-size: 17px;
}

.nav-mobile a:hover {
	background: rgba(235, 123, 8, 0.25);
}

.nav-mobile a.active {
	color: #EB7B08;
	background: rgba(235, 123, 8, 0.1);
}

.dynamic-header {
	position: fixed;
	top: -100px;
	left: 0;
	right: 0;
	margin: 0 auto;
	opacity: 0;
	width: 90%;
	max-width: 1000px;
	height: 50px;
	background: rgba(255, 255, 255, 0.02);
	-webkit-backdrop-filter: blur(10px) saturate(180%);
	backdrop-filter: blur(10px) saturate(180%);
	border-radius: 25px;
	z-index: 1000;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 30px;
	box-sizing: border-box;
	will-change: top, opacity;
}

/* ОКАНТОВКА */
.dynamic-header::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 25px;
	padding: 1px;
	background: linear-gradient(to bottom,
	rgba(255, 255, 255, 0.25) 0%,
	rgba(0, 0, 0, 0.15) 100%);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

/* 2. ЛЕВАЯ ЗОНА (КОНТЕЙНЕР ЛОГОТИПА) */
.logo-link {
	margin-right: 28px;
}

.logo-svg {
	width: 210px;
	height: 27px;
	display: block;
	pointer-events: none;
}

/* ЦЕНТРАЛЬНАЯ ЗОНА */
.nav-desktop {
	display: flex;
	align-items: center;
	gap: 25px;
	white-space: nowrap;
	height: 100%;
	flex: 1;
	color: #5d5d5d;
}

.nav-desktop a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.nav-desktop a.active {
	color: #EB7B08;
	pointer-events: none;
}

/* ПРАВЫЙ БЛОК */
.header-socials {
	display: flex;
	gap: 5px;
}

.social-icon-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
}

.social-icon-link svg {
	fill: #787878;
	display: block;
}

.social-icon-link:hover {
	transform: scale(1.1);
}

.social-icon-link:hover svg {
	fill: #EB7B08;
}

/*  точка в правом крае хедера   */
.menu-toggle {
	opacity: 0;
}

/* --- ЛОГИКА ИНВЕРСИИ (ТЕЛЕПОРТ) --- */
/* По умолчанию мобильная версия ВСЕГДА скрыта */
.show-on-mobile {
	display: none;
}

/* Соц сети в контактах когда экран меньше 860px */
@media (max-width: 900px) {
	.show-on-mobile {
		display: flex;
		gap: 25px;
	}
	
	.show-on-mobile .social-icon-link svg {
		width: 25px;
		height: 25px;
	}
}

/* --- ГЛОБАЛЬНЫЙ СТАНДАРТ ССЫЛОК --- */
a {
	/*	will-change: transform;*/
	text-decoration: none;
	color: inherit;
	display: inline-block;
	transition: color 0.4s ease,
	transform 0.4s ease;
}

/* Эффект при наведении — только для устройств с мышкой */
@media (hover: hover) {
	a:hover {
		will-change: transform;
		color: #EB7B08;
		transform: scale(1.05) rotateZ(0.001deg);
	}
}

@media (prefers-color-scheme: dark) {
	.copyright,
	.trademark-footer,
	.info-text,
	h2,
	p,
	.footer-links,
	.district-label,
	.nav-desktop,
	.nav-mobile {
		color: #bdbdbd;
	}
	
	.social-icon-link svg,
	.district-label {
		fill: #bdbdbd;
	}
	
	body {
		background-color: #1A1A1A;
	}
	
	.menu-toggle .line {
		background: #bdbdbd;
	}
	
	/* Меняем заливку всех областей (l1, l2 и т.д.) */
	#l1, #l2, #l3, #l4, #l5, #l6 {
		fill: #2a2a2a !important; /* Тёмно-серый или любой другой для тёмной темы */
	}
	
	.nav-mobile, .info-window-glass {
		background: rgba(15, 15, 15, 0.45);
	}
}

/* --- ОПТИМИЗАЦИЯ ТАЧ-ИНТЕРФЕЙСА --- */
html, body {
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
}

/* Дополнительная защита для логотипа и иконок */
.zoom-container,
.district-path,
.room-path,
.dynamic-header,
.menu-toggle
{
	-webkit-user-select: none;
	user-select: none;
}
