/* =========================================================================
   Дом в ипотеку в Таганроге — ул. Черняховского, 6
   Светлая тема. Акцент — тёплый песочный #a9784a, для ипотеки — зелёный.
   ========================================================================= */

:root {
	--paper:      #fbf9f6;
	--paper-2:    #f3ece3;
	--paper-3:    #ffffff;
	--ink:        #1e1b18;
	--ink-2:      #4a4239;
	--muted:      #857a6d;
	--rule:       #e6ded3;
	--accent:     #a9784a;
	--accent-lt:  #d1a681;
	--accent-bg:  #f6ece0;
	--green:      #3f7d4f;
	--green-bg:   #e7f0e7;

	--radius: 10px;
	--radius-lg: 18px;
	--container: 1160px;
	--side: clamp(18px, 5vw, 64px);
	--tr: .28s ease;
	--font: 'Golos Text', 'Gilroy', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	color: var(--ink);
	background: var(--paper);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--side);
}
.section { padding: 84px 0; }
@media (max-width: 768px) { .section { padding: 56px 0; } }

.eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 12px;
}
.h2 {
	font-size: clamp(25px, 3.6vw, 38px);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.015em;
	margin-bottom: 14px;
	text-wrap: balance;
}
.lead {
	font-size: 17.5px;
	line-height: 1.65;
	color: var(--ink-2);
	max-width: 62ch;
	margin-bottom: 34px;
}

/* ---------- Кнопки ---------- */
.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 30px;
	border-radius: 40px;
	font-size: 16px;
	font-weight: 650;
	font-family: inherit;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: background var(--tr), color var(--tr), border-color var(--tr), transform var(--tr);
	white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--ink); transform: translateY(-1px); }
.btn--ghost { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn--block { width: 100%; }

/* ---------- Шапка ---------- */
.hdr {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 14px var(--side);
	background: rgba(251,249,246,.9);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color var(--tr), box-shadow var(--tr);
}
.hdr.is-scrolled { border-bottom-color: var(--rule); box-shadow: 0 4px 22px rgba(30,27,24,.05); }
.hdr__logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hdr__logo-text { font-size: 15px; font-weight: 700; line-height: 1.15; }
.hdr__logo-text span { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.hdr__nav { display: flex; gap: 24px; margin-left: auto; font-size: 15px; color: var(--ink-2); }
.hdr__nav a:hover { color: var(--accent); }
.hdr__phone { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--ink); }
.hdr__phone:hover { color: var(--accent); }
.hdr__burger { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; }
.hdr__burger span { display: block; width: 22px; height: 2px; background: var(--ink); transition: transform var(--tr), opacity var(--tr); }
.hdr.is-open .hdr__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hdr.is-open .hdr__burger span:nth-child(2) { opacity: 0; }
.hdr.is-open .hdr__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1000px) {
	.hdr__nav {
		position: fixed;
		inset: 62px 0 auto 0;
		flex-direction: column;
		gap: 0;
		background: var(--paper);
		border-bottom: 1px solid var(--rule);
		padding: 10px 0 18px;
		display: none;
	}
	.hdr.is-open .hdr__nav { display: flex; }
	.hdr__nav a { padding: 13px var(--side); border-top: 1px solid var(--rule); }
	.hdr__burger { display: flex; margin-left: auto; }
	.hdr__phone span { display: none; }
}
@media (max-width: 620px) { .hdr__logo-text { font-size: 14px; } }

/* ---------- Хлебные крошки ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--accent); }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Первый экран ---------- */
.hero { padding: 44px 0 0; background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
@media (max-width: 940px) { .hero__grid { grid-template-columns: 1fr; gap: 28px; } }

.hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 16px;
	border-radius: 30px;
	background: var(--green-bg);
	color: var(--green);
	font-size: 13.5px;
	font-weight: 650;
	margin-bottom: 18px;
}
.hero h1 {
	font-size: clamp(29px, 4.6vw, 50px);
	line-height: 1.08;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin-bottom: 18px;
	text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__sub { font-size: 17.5px; line-height: 1.6; color: var(--ink-2); margin-bottom: 26px; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.hero__addr { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); padding-bottom: 40px; }
.hero__addr svg { color: var(--accent); flex-shrink: 0; }

/* Инфографика одноэтажного дома */
.hero__art { position: relative; }
.hero__art svg { width: 100%; height: auto; display: block; }

/* ---------- Полоса ключевых цифр ---------- */
.facts { background: var(--paper-3); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts__grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 0;
}
@media (max-width: 1000px) { .facts__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .facts__grid { grid-template-columns: repeat(2, 1fr); } }
.fact {
	padding: 30px 18px;
	text-align: center;
	border-right: 1px solid var(--rule);
}
.fact:last-child { border-right: 0; }
@media (max-width: 1000px) { .fact:nth-child(3n) { border-right: 0; } }
@media (max-width: 560px) { .fact:nth-child(2n) { border-right: 0; } .fact { padding: 22px 12px; } }
.fact__icon { color: var(--accent); margin: 0 auto 10px; width: 30px; height: 30px; }
.fact__num { font-size: 25px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.fact__label { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* ---------- Плашка ипотеки ---------- */
.mortgage { background: var(--green-bg); }
.mortgage__box {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 26px;
	padding: 34px 38px;
	background: var(--paper-3);
	border: 1px solid #cfe0cf;
	border-radius: var(--radius-lg);
}
@media (max-width: 860px) { .mortgage__box { grid-template-columns: 1fr; text-align: center; gap: 18px; padding: 28px 22px; } }
.mortgage__rate {
	font-size: clamp(38px, 6vw, 58px);
	font-weight: 700;
	line-height: 1;
	color: var(--green);
	letter-spacing: -0.03em;
	white-space: nowrap;
}
.mortgage__rate small { font-size: .42em; font-weight: 600; letter-spacing: 0; }
.mortgage__title { font-size: 21px; font-weight: 700; margin-bottom: 6px; }
.mortgage__text { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 860px) { .mortgage__box .btn { justify-self: center; } }

/* ---------- Галерея ---------- */
.gallery__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 200px;
	gap: 14px;
}
@media (max-width: 900px) { .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 175px; } }
@media (max-width: 520px) { .gallery__grid { grid-template-columns: 1fr; grid-auto-rows: 220px; } }
.gallery__item {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--paper-2);
}
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }
@media (max-width: 520px) { .gallery__item--wide, .gallery__item--tall { grid-column: auto; grid-row: auto; } }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; cursor: zoom-in; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item.img-missing::after {
	content: attr(data-name);
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	text-align: center;
	font-size: 13px;
	color: var(--muted);
	background: repeating-linear-gradient(45deg, var(--paper-2), var(--paper-2) 12px, #ebe3d8 12px, #ebe3d8 24px);
}
.gallery__item.img-missing img { display: none; }

/* ---------- Карточки с иконками ---------- */
.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}
.card {
	padding: 28px 26px;
	background: var(--paper-3);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	transition: border-color var(--tr), transform var(--tr), box-shadow var(--tr);
}
.card:hover { border-color: var(--accent-lt); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(30,27,24,.06); }
.card__icon {
	width: 48px; height: 48px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 12px;
	background: var(--accent-bg);
	color: var(--accent);
	margin-bottom: 16px;
}
.card__title { font-size: 17.5px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.card__text { font-size: 15px; line-height: 1.55; color: var(--ink-2); }

/* ---------- Планировка ---------- */
.plan { background: var(--paper-3); }
.plan__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: start; }
@media (max-width: 940px) { .plan__grid { grid-template-columns: 1fr; gap: 28px; } }
.plan__img {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--paper-2);
	min-height: 320px;
	border: 1px solid var(--rule);
}
.plan__img img { width: 100%; height: 100%; object-fit: contain; background: #fff; cursor: zoom-in; }
.plan__img.img-missing::after {
	content: attr(data-name);
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	padding: 18px; text-align: center; font-size: 13.5px; color: var(--muted);
	background: repeating-linear-gradient(45deg, var(--paper-2), var(--paper-2) 12px, #ebe3d8 12px, #ebe3d8 24px);
}
.plan__img.img-missing img { display: none; }
.rooms { display: flex; flex-direction: column; gap: 2px; }
.room {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 15px 0;
	border-bottom: 1px solid var(--rule);
}
.room:last-child { border-bottom: 0; }
.room__icon {
	width: 40px; height: 40px; flex-shrink: 0;
	display: flex; align-items: center; justify-content: center;
	border-radius: 10px;
	background: var(--accent-bg);
	color: var(--accent);
}
.room__name { font-weight: 650; font-size: 16.5px; }
.room__note { font-size: 14.5px; color: var(--muted); line-height: 1.45; }

/* ---------- Локация ---------- */
.loc__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: stretch; }
@media (max-width: 940px) { .loc__grid { grid-template-columns: 1fr; } }
.loc__list { display: flex; flex-direction: column; gap: 6px; }
.loc__item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.loc__item:last-child { border-bottom: 0; }
.loc__item-icon { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.loc__item-text { font-size: 16px; line-height: 1.5; }
.loc__item-text b { display: block; margin-bottom: 2px; }
.loc__item-text span { color: var(--muted); font-size: 14.5px; }
.loc__map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); min-height: 380px; }
.loc__map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* ---------- Условия покупки ---------- */
.terms { background: var(--paper-2); }
.terms__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 780px) { .terms__grid { grid-template-columns: 1fr; } }
.term {
	padding: 32px 30px;
	background: var(--paper-3);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
}
.term__icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 13px; background: var(--accent-bg); color: var(--accent); margin-bottom: 18px; }
.term--green .term__icon { background: var(--green-bg); color: var(--green); }
.term__title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.term__text { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.term__text b { color: var(--ink); }

/* ---------- SEO-текст ---------- */
.seotext { background: var(--paper-3); }
.seotext__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
@media (max-width: 900px) { .seotext__grid { grid-template-columns: 1fr; gap: 28px; } }
.seotext h3 { font-size: 19px; font-weight: 700; line-height: 1.35; margin: 0 0 12px; }
.seotext h3:not(:first-child) { margin-top: 30px; }
.seotext p { font-size: 16px; line-height: 1.75; color: var(--ink-2); margin-bottom: 15px; }
.seotext p:last-child { margin-bottom: 0; }
.seotext strong { color: var(--ink); }
.seotext a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- FAQ ---------- */
.faq__list { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.faq__item {
	background: var(--paper-3);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	transition: border-color var(--tr);
}
.faq__item[open] { border-color: var(--accent-lt); }
.faq__q {
	list-style: none;
	cursor: pointer;
	padding: 20px 54px 20px 24px;
	font-size: 17px;
	font-weight: 650;
	line-height: 1.45;
	position: relative;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
	content: '';
	position: absolute; right: 26px; top: 50%;
	width: 9px; height: 9px; margin-top: -7px;
	border-right: 2px solid var(--accent);
	border-bottom: 2px solid var(--accent);
	transform: rotate(45deg);
	transition: transform var(--tr);
}
.faq__item[open] .faq__q::after { transform: rotate(-135deg); margin-top: -3px; }
.faq__a { padding: 0 24px 22px; font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
@media (max-width: 560px) { .faq__q { font-size: 16px; padding: 17px 46px 17px 18px; } .faq__a { padding: 0 18px 18px; } }

/* ---------- Контакты ---------- */
.contacts { background: var(--ink); color: #fff; }
.contacts .h2 { color: #fff; }
.contacts .eyebrow { color: var(--accent-lt); }
.contacts .lead { color: rgba(255,255,255,.7); }
.contacts__box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 26px;
	padding: 34px 38px;
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.12);
	border-radius: var(--radius-lg);
}
@media (max-width: 700px) { .contacts__box { padding: 26px 22px; } }
.contacts__phone { display: flex; align-items: center; gap: 16px; }
.contacts__phone-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contacts__num { font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; letter-spacing: -0.01em; display: block; }
.contacts__note { font-size: 14px; color: rgba(255,255,255,.55); margin-top: 2px; }
.contacts__hours { font-size: 15px; color: rgba(255,255,255,.7); line-height: 1.6; }
.contacts__hours b { display: block; color: #fff; margin-bottom: 3px; }

/* ---------- Футер ---------- */
.ftr { background: var(--ink); color: rgba(255,255,255,.5); padding: 40px 0 26px; border-top: 1px solid rgba(255,255,255,.1); font-size: 14.5px; }
.ftr__top { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.ftr__logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; }
.ftr__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ftr__links a { color: rgba(255,255,255,.72); text-decoration: underline; text-underline-offset: 3px; }
.ftr__links a:hover { color: var(--accent-lt); }
.ftr__bottom { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; padding-top: 20px; }
.ftr__phone { color: var(--accent-lt); font-weight: 700; font-size: 16px; }

/* Ссылка «Открыть в Яндекс.Картах» под картой */
.loc__maplink { grid-column: 1 / -1; margin: 4px 0 0; font-size: 15px; }
.loc__maplink a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.loc__maplink a:hover { color: var(--ink); }
@media (max-width: 940px) { .loc__maplink { text-align: center; } }

/* ---------- Соцсети ---------- */
.socials { display: flex; gap: 10px; align-items: center; }
.social {
	width: 42px; height: 42px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.2);
	color: rgba(255,255,255,.8);
	transition: background var(--tr), color var(--tr), border-color var(--tr), transform var(--tr);
}
.social:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
	transform: translateY(-2px);
}
/* Вариант для светлого фона */
.socials--light .social { border-color: var(--rule); color: var(--accent); background: var(--paper-3); }
.socials--light .social:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Мобильная панель звонка ---------- */
.callbar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 95;
	display: none;
	align-items: center;
	background: var(--ink);
	border-top: 1px solid rgba(255,255,255,.12);
	padding: 10px 84px 10px 16px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 620px) {
	.callbar { display: flex; }
	body { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
}
.callbar .btn { flex: 1 1 auto; min-width: 0; padding: 14px 12px; font-size: 15px; gap: 8px; }
.callbar__word { display: none; }
@media (min-width: 421px) { .callbar__word { display: inline; } }
@media (max-width: 360px) {
	.callbar { padding-right: 76px; padding-left: 12px; }
	.callbar .btn { font-size: 14px; padding: 13px 10px; }
}

/* ---------- Лайтбокс ---------- */
body.lb-lock { overflow: hidden; }
.lightbox {
	position: fixed; inset: 0; z-index: 1000;
	display: none; align-items: center; justify-content: center;
	background: rgba(20,18,15,.94);
	padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px; }
.lightbox__btn {
	position: absolute;
	width: 46px; height: 46px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff; border: 0; cursor: pointer;
	transition: background var(--tr), color var(--tr);
}
.lightbox__btn:hover { background: var(--accent); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 18px; top: 50%; margin-top: -23px; }
.lightbox__next { right: 18px; top: 50%; margin-top: -23px; }
.lightbox__btn.is-hidden { display: none; }
.lightbox__counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.7); font-size: 14px; }
@media (max-width: 560px) {
	.lightbox { padding: 12px; }
	.lightbox__btn { width: 40px; height: 40px; }
	.lightbox__prev { left: 8px; }
	.lightbox__next { right: 8px; }
}

/* ---------- Появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.gallery__item img { transition: none; }
}

a:focus-visible, button:focus-visible, summary:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}
