/* ===== ДОПОЛНЕНИЯ: логотип, новые блоки. Цвета — из style.css ===== */

/* Логотип */
.logo { padding: 0; }
.logo::before { display: none !important; }
.logo img { height: 52px; width: auto; display: block; transition: height .3s; }
.logo .logo-dark { display: none; }
header.scrolled .logo .logo-light { display: none; }
header.scrolled .logo .logo-dark { display: block; }
header.scrolled .logo img { height: 42px; }
@media (max-width: 760px) { .logo img { height: 40px; } header.scrolled .logo img { height: 36px; } }

/* Прелоадер */
#preloader {
  position: fixed; inset: 0; z-index: 3000;
  background: var(--brick-dark);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .7s ease, visibility .7s ease;
}
#preloader img { width: min(380px, 70vw); opacity: 0; animation: plIn 1s .1s ease forwards; }
#preloader.done { opacity: 0; visibility: hidden; }
@keyframes plIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* Быстрый подбор */
.quickpick-wrap { position: relative; z-index: 5; max-width: 1180px; margin: -64px auto 0; padding: 0 24px; }
.quickpick {
  background: var(--cream); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 26px 32px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
}
.quickpick h3 { font-size: 22px; line-height: 1.15; }
.qp-fields { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.qp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.qp-chip {
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  padding: 9px 16px; font: 500 13px 'Inter', sans-serif; cursor: pointer; transition: all .25s;
}
.qp-chip:hover { border-color: var(--brick); color: var(--brick); }
.qp-chip.active { background: var(--brick); border-color: var(--brick); color: var(--cream); }
.quickpick select {
  border: 1px solid var(--line); background: #fff; padding: 10px 14px;
  font: 400 14px 'Inter', sans-serif; color: var(--ink);
}
@media (max-width: 900px) { .quickpick { grid-template-columns: 1fr; gap: 18px; padding: 24px; } .quickpick-wrap { margin-top: -40px; } }

/* Двор: вкладки */
.yard-tabs-wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: stretch; margin-top: 56px; }
.yard-stage { position: relative; min-height: 520px; overflow: hidden; cursor: zoom-in; background: var(--brick-dark); }
.yard-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.05); transition: opacity .8s ease, transform 1.6s ease;
}
.yard-stage img.on { opacity: 1; transform: scale(1); }
.yard-stage::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(46,17,11,.7)); pointer-events: none; }
.yard-stage-cap { position: absolute; left: 28px; bottom: 24px; right: 28px; z-index: 2; color: var(--cream); }
.yard-stage-cap strong { font: 400 26px 'Fraunces', serif; display: block; }
.yard-stage-cap span { font-size: 13px; opacity: .8; }
.yz-list { display: flex; flex-direction: column; justify-content: center; }
.yz {
  text-align: left; background: none; border: 0; border-top: 1px solid var(--line);
  padding: 22px 0; cursor: pointer; display: grid; grid-template-columns: 56px 1fr; gap: 6px 14px;
  font-family: inherit; color: var(--ink); transition: padding .35s;
}
.yz:last-of-type { border-bottom: 1px solid var(--line); }
.yz .n { font: 300 15px 'Fraunces', serif; color: var(--brass); padding-top: 4px; }
.yz h4 { font-size: 22px; grid-column: 2; transition: color .3s; }
.yz p { grid-column: 2; font-size: 14.5px; color: var(--ink-soft); max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s, opacity .4s; }
.yz.active h4, .yz:hover h4 { color: var(--brick); }
.yz.active { padding-left: 10px; }
.yz.active p { max-height: 120px; opacity: 1; margin-top: 4px; }
.yz-list .btn { align-self: flex-start; margin-top: 28px; }
@media (max-width: 900px) { .yard-tabs-wrap { grid-template-columns: 1fr; gap: 28px; } .yard-stage { min-height: 340px; } }

/* Лайтбокс */
#lightbox { position: fixed; inset: 0; z-index: 2500; background: rgba(26,10,6,.94); display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 100%; max-height: 100%; box-shadow: 0 30px 90px rgba(0,0,0,.5); }

/* Калькулятор */
.calc-section { padding: 120px 0; background: var(--sand); }
.calc-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; margin-top: 48px; align-items: stretch; }
.calc-controls { display: flex; flex-direction: column; gap: 30px; }
.calc-row label { display: flex; justify-content: space-between; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.calc-row label b { font: 400 22px 'Fraunces', serif; color: var(--brick-deep); letter-spacing: 0; text-transform: none; }
.calc-row input[type=range] { width: 100%; accent-color: var(--brick); height: 4px; cursor: pointer; }
.calc-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.calc-result { background: var(--brick-deep); color: var(--cream); padding: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; position: relative; overflow: hidden; }
.calc-result::after { content: ''; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border: 1px solid rgba(212,169,106,.25); border-radius: 50%; }
.calc-result small { letter-spacing: .18em; text-transform: uppercase; font-size: 11px; color: var(--brass-light); }
.calc-month { font: 300 clamp(44px, 5vw, 68px) 'Fraunces', serif; line-height: 1; margin: 10px 0; }
.calc-lines { display: grid; gap: 10px; font-size: 14px; color: rgba(250,246,239,.78); }
.calc-lines div { display: flex; justify-content: space-between; border-top: 1px solid rgba(250,246,239,.14); padding-top: 10px; }
.calc-note { font-size: 12px; color: var(--ink-mute); margin-top: 18px; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: 1fr; gap: 32px; } .calc-result { padding: 30px; } }

/* Ход строительства */
.progress-section { padding: 120px 0; }
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 64px; position: relative; }
.timeline::before { content: ''; position: absolute; top: 15px; left: 10%; right: 10%; height: 1px; background: var(--line); }
.tl-fill { position: absolute; top: 15px; left: 10%; height: 1px; background: var(--brick); width: 0; transition: width 1.6s ease .3s; }
.tl-item { text-align: center; position: relative; padding: 0 10px; }
.tl-dot { width: 31px; height: 31px; margin: 0 auto 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--cream); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ink-mute); position: relative; z-index: 2; }
.tl-item.done .tl-dot { background: var(--brick); border-color: var(--brick); color: var(--cream); }
.tl-item.active .tl-dot { border-color: var(--brick); color: var(--brick); box-shadow: 0 0 0 6px rgba(140,58,43,.12); animation: pulse 2.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(140,58,43,0); } }
.tl-item h4 { font-size: 19px; margin-bottom: 6px; }
.tl-item p { font-size: 13.5px; color: var(--ink-soft); }
.tl-item .when { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin-bottom: 6px; }
@media (max-width: 800px) {
  .timeline { grid-template-columns: 1fr; gap: 26px; }
  .timeline::before, .tl-fill { display: none; }
  .tl-item { display: grid; grid-template-columns: 31px 1fr; gap: 16px; text-align: left; padding: 0; }
  .tl-dot { margin: 0; }
}

/* FAQ */
.faq-section { padding: 120px 0; background: var(--sand); }
.faq-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; }
.faq-list details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font: 400 21px 'Fraunces', serif; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 300 28px 'Inter'; color: var(--brick); transition: transform .3s; }
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { padding: 0 40px 24px 0; color: var(--ink-soft); font-size: 15.5px; }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: 1fr; gap: 28px; } }

/* CTA форма */
.lead-form { display: grid; gap: 12px; margin-top: 32px; max-width: 440px; }
.lead-form input[type=text], .lead-form input[type=tel], .lead-form input[type=email] {
  width: 100%; padding: 16px 18px; border: 1px solid rgba(250,246,239,.3);
  background: rgba(250,246,239,.06); color: var(--cream); font: 400 15px 'Inter', sans-serif;
}
.lead-form input::placeholder { color: rgba(250,246,239,.55); }
.lead-form input:focus { outline: none; border-color: var(--brass-light); }
.lead-form .agree { font-size: 12px; color: rgba(250,246,239,.6); }
.lead-form .agree a { text-decoration: underline; }
.lead-form .hp { position: absolute; left: -9999px; }
.lead-ok { display: none; padding: 22px; border: 1px solid var(--brass); color: var(--cream); }
.lead-form.sent .lead-ok { display: block; }
.lead-form.sent > :not(.lead-ok) { display: none; }

/* Модальное окно заявки */
#lead-modal { position: fixed; inset: 0; z-index: 2400; background: rgba(26,10,6,.7); display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
#lead-modal.open { display: flex; }
.modal-box { background: var(--brick-dark); color: var(--cream); padding: 44px; width: min(480px, 100%); position: relative; animation: plIn .4s ease; }
.modal-box h3 { font-size: 30px; margin-bottom: 8px; }
.modal-box h3 em { color: var(--brass-light); }
.modal-box p.sub { color: rgba(250,246,239,.7); font-size: 14px; }
.modal-x { position: absolute; top: 14px; right: 18px; background: none; border: 0; color: var(--cream); font-size: 28px; cursor: pointer; }

/* Плавающие контакты */
.fab { position: fixed; right: 22px; bottom: 22px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab-main { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--brick); color: var(--cream); cursor: pointer; box-shadow: 0 14px 34px rgba(46,17,11,.35); font-size: 24px; transition: transform .3s, background .3s; position: relative; }
.fab-main::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--brick); animation: ring 2.6s infinite; }
@keyframes ring { to { transform: scale(1.5); opacity: 0; } }
.fab.open .fab-main { transform: rotate(45deg); background: var(--brick-deep); }
.fab-items { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s; }
.fab.open .fab-items { opacity: 1; visibility: visible; transform: none; }
.fab-items a, .fab-items button { background: var(--cream); color: var(--brick-deep); border: 1px solid var(--line); padding: 11px 20px; font: 500 13px 'Inter', sans-serif; box-shadow: 0 8px 22px rgba(46,17,11,.15); cursor: pointer; white-space: nowrap; }
.fab-items a:hover, .fab-items button:hover { background: var(--brick); color: var(--cream); }

/* Наверх + курсорный свет на hero */
.hero-glow { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 40%), rgba(212,169,106,.16), transparent 60%); }
.tilt { transition: transform .25s ease; transform-style: preserve-3d; will-change: transform; }

/* Партнёрский кабинет */
.partner-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.partner-bar .qp-chip.active { background: var(--brick); }
.partner-hello { background: var(--sand); border: 1px solid var(--line); padding: 18px 24px; margin-bottom: 48px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 14px; }
.messenger-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.messenger-row .btn { min-width: 170px; text-align: center; }
.fix-preview { background: var(--sand); border: 1px dashed var(--brass); padding: 20px; white-space: pre-wrap; font-size: 14px; text-align: left; margin: 18px 0; }
.fix-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.fix-steps div { border-top: 2px solid var(--brick); padding-top: 14px; font-size: 14px; color: var(--ink-soft); }
.fix-steps b { display: block; font: 400 20px 'Fraunces', serif; color: var(--ink); margin-bottom: 4px; }
@media (max-width: 700px) { .fix-steps { grid-template-columns: 1fr; } }

/* Вход */
.login-logo img { height: 64px; margin: 0 auto 6px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Отступы новых секций (у .container нет собственных) */
.calc-section, .progress-section, .faq-section { padding-left: 48px; padding-right: 48px; }
@media (max-width: 760px) { .calc-section, .progress-section, .faq-section { padding: 80px 22px; } .modal-box { padding: 32px 24px; } }

/* Меню читается поверх фото до прокрутки */
header:not(.scrolled) nav.main-nav a, header:not(.scrolled) .phone { color: var(--cream); }
header:not(.scrolled) nav.main-nav a:hover { color: var(--brass-light); }
header:not(.scrolled) .btn-partner { color: var(--cream); border-color: rgba(250,246,239,.55); }
header:not(.scrolled) .btn-partner:hover { background: var(--cream); color: var(--brick-deep); }
header:not(.scrolled) .burger span { background: var(--cream); }

/* Фикс: текст кнопки не должен перекрываться заливкой при наведении */
.btn { isolation: isolate; }
.btn::before { z-index: -1 !important; }
.messenger-row .btn { flex: 1 1 200px; justify-content: center; width: auto; }
.fix-preview { word-break: break-word; }

/* Заглушка фото в новостях */
.news-image.ph { background: linear-gradient(135deg, var(--sand) 0%, var(--sand-2) 100%); display: flex; align-items: center; justify-content: center; text-align: center; border-bottom: 1px solid var(--line); }
.news-image.ph::after { display: none; }
.news-image.ph::before { content: ''; position: absolute; inset: 14px; border: 1px dashed rgba(184,137,75,.55); }
.news-image .ph-t { font: 300 22px/1.3 'Fraunces', serif; color: var(--brick-deep); letter-spacing: -.01em; }
.news-image .ph-t em { color: var(--brick); font-style: italic; }

/* Юридический блок в подвале */
.footer-legal { max-width: 1520px; margin: 0 auto; padding: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 12.5px; color: rgba(250,246,239,.7); }
.footer-legal b { color: var(--cream); font-weight: 500; }
.footer-legal a { text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--brass-light); }
@media (max-width: 760px) { .footer-legal { flex-direction: column; } }
.timeline { grid-template-columns: repeat(var(--n, 5), 1fr); }
html, body { overflow-x: hidden; max-width: 100%; }
.login-page { overflow-x: hidden; }
.prices-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 800px) {
  .timeline { grid-template-columns: 1fr !important; gap: 26px; }
  .timeline::before, .tl-fill { display: none; }
}
@media (max-width: 760px) {
  .cta-phone { font-size: clamp(26px, 8.5vw, 40px) !important; white-space: nowrap; }
  .login-box { padding-left: 24px; padding-right: 24px; }
}
.timeline { grid-template-columns: repeat(var(--n, 5), 1fr); }
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr !important; gap: 26px; }
  .timeline::before, .tl-fill { display: none; }
  .tl-item { display: grid; grid-template-columns: 31px 1fr; gap: 16px; text-align: left; padding: 0; }
  .tl-dot { margin: 0; }
}
/* ===== Мобильная адаптация: этапы проекта ===== */
html, body { overflow-x: hidden; max-width: 100%; }
.timeline { grid-template-columns: repeat(var(--n, 5), 1fr); }

@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr !important; gap: 26px; }
  .timeline::before, .tl-fill { display: none; }
  .tl-item { display: grid; grid-template-columns: 31px 1fr; gap: 16px; text-align: left; padding: 0; }
  .tl-dot { margin: 0; }
}

@media (max-width: 760px) {
  .cta-phone { font-size: clamp(26px, 8.5vw, 40px) !important; white-space: nowrap; }
  .prices-table-wrap { overflow-x: auto; }
}