@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@600;700&display=swap');

:root {
    --dp-canvas: #FFF8EE;
    --dp-surface: #ffffff;
    --dp-surface-alt: #EEF5FF;
    --dp-ink: #17233C;
    --dp-muted: #5C6B87;
    --dp-line: #E7DFCE;
    --dp-primary: #2457F5;
    --dp-primary-strong: #1B44C4;
    --dp-signal: #FF6B57;
    --dp-coral: #FF6B57;
    --dp-danger: #B3311F;
    --dp-frame: 1240px;
    color-scheme: light;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    scrollbar-color: var(--dp-primary) #F1E9D7;
    scrollbar-width: thin;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--dp-canvas); color: var(--dp-ink); font-family: inherit; line-height: 1.55; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: #F1E9D7; }
*::-webkit-scrollbar-thumb { background: var(--dp-primary); border: 2px solid #F1E9D7; border-radius: 999px; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
textarea { resize: vertical; }
:focus-visible { outline: 3px solid var(--dp-primary); outline-offset: 3px; }
[x-cloak] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.site-frame { width: min(calc(100% - 40px), var(--dp-frame)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 40; background: var(--dp-canvas); border-bottom: 1px solid var(--dp-line); }
.site-header__row { min-height: 74px; display: flex; align-items: center; gap: 28px; }
.brand { min-height: 44px; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--dp-primary); color: #fff; font-family: 'Unbounded', sans-serif; font-size: 14px; }
.brand__name { font-family: 'Unbounded', sans-serif; font-size: 17px; letter-spacing: -.04em; }
.brand__sub { display: block; color: var(--dp-muted); font-size: 11px; letter-spacing: .03em; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a, .account-nav a, .account-nav button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 13px; border: 0; border-radius: 12px; background: transparent; color: var(--dp-ink); text-decoration: none; font-weight: 600; cursor: pointer; }
.site-nav a:hover, .account-nav a:hover, .account-nav button:hover { background: var(--dp-surface-alt); }
.account-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.account-nav form { margin: 0; }
.account-nav .nav-primary { background: var(--dp-primary); color: #fff; }
.menu-toggle { display: none; margin-left: auto; min-width: 44px; min-height: 44px; border: 1px solid var(--dp-line); border-radius: 12px; background: var(--dp-surface); cursor: pointer; }
.mobile-nav { display: none; padding-bottom: 14px; }
.mobile-nav a { display: block; padding: 11px 12px; text-decoration: none; font-weight: 700; }
.flash { margin-top: 18px; padding: 14px 16px; border: 1px solid #C9DAFB; border-left: 6px solid var(--dp-primary); border-radius: 14px; background: var(--dp-surface-alt); }

.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid var(--dp-ink); border-radius: 12px; background: var(--dp-surface); color: var(--dp-ink); text-decoration: none; font-weight: 700; cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.btn:hover { background: var(--dp-surface-alt); }
.btn-primary { border-color: var(--dp-primary); background: var(--dp-primary); color: #fff; }
.btn-primary:hover { background: var(--dp-primary-strong); border-color: var(--dp-primary-strong); }
.btn-signal { border-color: var(--dp-coral); background: var(--dp-coral); color: #fff; }
.btn-signal:hover { background: #F0533F; border-color: #F0533F; }
.btn-quiet { border-color: var(--dp-line); }
.btn-sm { min-height: 44px; padding-inline: 13px; font-size: 14px; }

.page-hero { padding: clamp(54px,8vw,108px) 0 38px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 30px; height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--dp-coral) 0 12px, transparent 12px 16px, var(--dp-primary) 16px 30px); }
.display-title { max-width: 980px; margin: 0; font-family: 'Unbounded', sans-serif; font-size: clamp(38px,6.5vw,86px); line-height: .98; letter-spacing: -.065em; }
.page-title { margin: 0; font-family: 'Unbounded', sans-serif; font-size: clamp(30px,5vw,58px); line-height: 1.03; letter-spacing: -.055em; }
.lede { max-width: 680px; margin: 20px 0 0; color: var(--dp-muted); font-size: clamp(17px,2vw,21px); }
.hero-grid { display: grid; grid-template-columns: minmax(0,7fr) minmax(340px,5fr); gap: 42px; align-items: end; }
.route-line { height: 18px; margin-top: 34px; background: linear-gradient(90deg,var(--dp-primary) 0 38%,transparent 38% 41%,var(--dp-coral) 41% 70%,transparent 70% 73%,var(--dp-primary-strong) 73%); border-radius: 99px; }

.decision-panel, .panel { border: 1px solid var(--dp-line); border-radius: 20px; background: var(--dp-surface); }
.decision-panel { padding: 24px; }
.decision-panel h2 { margin: 0 0 6px; font-family: 'Unbounded', sans-serif; font-size: 20px; letter-spacing: -.035em; }
.decision-panel > p { margin: 0 0 20px; color: var(--dp-muted); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.field { display: grid; gap: 7px; }
.field--wide { grid-column: 1/-1; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea, .catalog-filters input, .catalog-filters select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--dp-line); border-radius: 12px; background: var(--dp-surface); color: var(--dp-ink); }
.field input:focus, .field select:focus, .catalog-filters input:focus, .catalog-filters select:focus { border-color: var(--dp-primary); outline: 3px solid rgba(36,87,245,.16); }
.check-field { display: flex; align-items: center; gap: 9px; min-height: 46px; }
.check-field input { width: 19px; height: 19px; accent-color: var(--dp-primary); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.error-text { color: var(--dp-danger); font-size: 13px; }

.section { padding: clamp(48px,7vw,88px) 0; }
.section--tight { padding-top: 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-title { margin: 0; font-family: 'Unbounded', sans-serif; font-size: clamp(24px,3vw,38px); letter-spacing: -.045em; }
.section-kicker { margin-top: 8px; color: var(--dp-muted); }
.section-link { font-weight: 700; color: var(--dp-primary-strong); }
.buildings-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.building-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--dp-line); border-radius: 20px; background: var(--dp-surface); transition: transform .18s ease, border-color .18s ease; }
.building-card:hover { transform: translateY(-4px); border-color: #C9DAFB; }
.building-card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg,#EEF5FF,#D7E4FD); }
.building-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.building-card:hover .building-card__media img { transform: scale(1.025); }
.building-card__link { color: inherit; text-decoration: none; }
.building-card__body { padding: 18px; }
.building-card__top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.card-title { margin: 0; font-size: 20px; line-height: 1.16; }
.card-developer, .card-city, .card-rooms { margin: 5px 0 0; color: var(--dp-muted); font-size: 14px; }
.card-price { margin: 18px 0 0; font-family: 'Unbounded', sans-serif; font-size: 17px; }
.card-status { display: inline-flex; margin-top: 13px; padding: 5px 9px; border: 1px solid var(--dp-line); border-radius: 99px; font-size: 12px; font-weight: 700; }
.status-foundation { background: #FFF1CE; color: #8A6400; }
.status-construction { background: #EEF5FF; color: #1B44C4; }
.status-completed { background: #E1F4E8; color: #14683F; }
.favorite-btn { position: relative; z-index: 2; min-height: 44px; padding: 0 12px; border: 1px solid var(--dp-line); border-radius: 99px; background: var(--dp-surface); color: var(--dp-ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.favorite-btn.favorited { background: #FFE8E2; border-color: #FFB4A4; }
.card-image-placeholder { width: 100%; height: 100%; background: repeating-linear-gradient(-45deg,#E9EFFB 0 12px,#F5F9FF 12px 24px); }

.process-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--dp-line); }
.process-step { padding: 24px; border-right: 1px solid var(--dp-line); }
.process-step:last-child { border-right: 0; }
.process-number { font-family: 'Unbounded', sans-serif; font-size: 34px; color: var(--dp-coral); }
.process-step h3 { margin: 26px 0 8px; }
.process-step p { margin: 0; color: var(--dp-muted); }
.lead-strip { display: grid; grid-template-columns: 1fr minmax(320px,520px); gap: 36px; padding: 32px; border-radius: 22px; background: var(--dp-ink); color: #fff; }
.lead-strip h2 { margin: 0; font-family: 'Unbounded', sans-serif; font-size: clamp(26px,4vw,44px); letter-spacing: -.05em; }
.lead-strip p { color: #C3CDE3; }
.lead-form { display: grid; gap: 13px; }
.lead-form .form-group { display: grid; gap: 6px; }
.lead-form label { font-size: 13px; font-weight: 700; }
.lead-form input { min-height: 46px; padding: 10px 12px; border: 1px solid #5E6D8D; border-radius: 12px; background: #FBFCFE; color: var(--dp-ink); }

.catalog-layout { padding: 58px 0 90px; }
.catalog-intro { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: 28px; }
.catalog-count { padding: 10px 14px; border: 1px solid #C9DAFB; border-radius: 99px; background: var(--dp-surface-alt); color: var(--dp-primary-strong); font-weight: 800; }
.catalog-filters { display: grid; grid-template-columns: 2fr repeat(3,1fr); gap: 12px; padding: 20px; margin-bottom: 26px; border: 1px solid var(--dp-line); border-radius: 20px; background: var(--dp-surface); }
.catalog-filters .field-price { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.search-control { position: relative; }
.search-control input { padding-right: 52px; }
.search-clear { position: absolute; right: 1px; top: 1px; width: 44px; height: 44px; border: 0; border-radius: 11px; background: var(--dp-surface-alt); cursor: pointer; }
.catalog-actions { grid-column: 1/-1; display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.catalog-feed[aria-busy='true'] { opacity: .58; }
.catalog-feed[aria-busy='true']::before { content: 'Обновляем подборку…'; display: block; margin: 0 0 16px; padding: 12px 16px; border: 1px dashed var(--dp-line); border-radius: 14px; background: var(--dp-surface); color: var(--dp-muted); font-weight: 700; }
.feed-notice { margin: 0 0 16px; padding: 13px 16px; border: 1px solid #F5BCAD; border-left: 6px solid var(--dp-coral); border-radius: 14px; background: #FFF0EA; color: var(--dp-ink); }
.feed-criteria { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.feed-criteria__label { color: var(--dp-muted); font-size: 14px; font-weight: 700; }
.filter-chip { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px 0 14px; border: 1px solid #C9DAFB; border-radius: 99px; background: var(--dp-surface-alt); color: var(--dp-primary-strong); font-size: 13px; font-weight: 700; text-decoration: none; }
.filter-chip:hover { background: #DCE9FE; }
.filter-chip__remove { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 99px; background: var(--dp-primary); color: #fff; font-size: 13px; line-height: 1; }
.filter-chip--reset { padding: 0 14px; border-color: var(--dp-line); background: var(--dp-surface); color: var(--dp-ink); }
.filter-chip--reset:hover { background: var(--dp-surface-alt); }
.building-card__media .card-status { position: absolute; top: 12px; left: 12px; z-index: 1; margin-top: 0; border: 0; }
.card-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 16px 0 0; padding: 13px 14px; list-style: none; border: 1px solid var(--dp-line); border-radius: 14px; background: var(--dp-surface-alt); }
.card-facts li { display: grid; gap: 2px; }
.card-facts span { color: var(--dp-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.card-facts strong { font-size: 14px; }
.card-cta { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; color: var(--dp-primary-strong); font-weight: 700; text-underline-offset: 4px; }
.card-cta:hover { color: var(--dp-primary); }
.results-status { margin: 0 0 18px; color: var(--dp-muted); }
.empty-state { grid-column: 1/-1; padding: 50px 24px; border: 1px dashed var(--dp-line); border-radius: 20px; text-align: center; background: rgba(255,255,255,.7); }
.empty-state .btn { margin-top: 14px; }
.pagination { margin-top: 28px; }
.pagination nav > div:first-child { display: none; }

@media (max-width: 640px) {
    .card-facts { grid-template-columns: 1fr; }
    .feed-criteria__label { flex-basis: 100%; }
}

.crumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; color: var(--dp-muted); font-size: 14px; }
.building-page { padding: 48px 0 90px; }
.building-hero { display: grid; grid-template-columns: minmax(0,7fr) minmax(330px,5fr); gap: 28px; align-items: stretch; }
.building-cover { min-height: 430px; overflow: hidden; border-radius: 20px; background: var(--dp-surface-alt); }
.building-cover img { width: 100%; height: 100%; object-fit: cover; }
.building-summary { padding: 28px; }
.building-summary h1 { margin: 0; font-family: 'Unbounded', sans-serif; font-size: clamp(30px,4vw,52px); line-height: 1; letter-spacing: -.055em; }
.building-summary .developer, .building-summary .address, .building-summary .description { color: var(--dp-muted); }
.building-summary .developer { margin-top: 16px; font-weight: 700; }
.building-summary .address { margin-top: 5px; }
.building-summary .description { margin-top: 22px; }
.building-summary .price-from { margin: 24px 0 0; font-family: 'Unbounded', sans-serif; font-size: 22px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.meta-item { padding: 7px 10px; border-radius: 99px; background: var(--dp-surface-alt); font-size: 13px; }
.building-gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 28px; }
.building-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 18px; }
.lots-section { margin-top: 54px; }
.table-shell { overflow-x: auto; border: 1px solid var(--dp-line); border-radius: 20px; background: var(--dp-surface); scrollbar-gutter: stable; }
.lots-table { width: 100%; min-width: 780px; border-collapse: collapse; }
.lots-table th, .lots-table td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--dp-line); }
.lots-table th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; background: var(--dp-surface-alt); }
.lots-table tr:last-child td { border-bottom: 0; }
.lots-table tbody tr:hover { background: #F7FAFF; }
.quick-lead-panel { margin-top: 32px; padding: 28px; }
.quick-lead-panel h2 { margin: 0 0 10px; font-family: 'Unbounded', sans-serif; letter-spacing: -.04em; }
.quick-lead-note { margin: 0 0 18px; color: var(--dp-muted); }
.building-summary__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.building-facts { margin-top: 54px; }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.fact-item { display: grid; align-content: start; gap: 5px; padding: 14px 16px; border: 1px solid var(--dp-line); border-radius: 16px; background: var(--dp-surface); }
.fact-item span { color: var(--dp-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.fact-item strong { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.fact-item .card-status { margin-top: 0; }
.fact-item--empty strong { color: var(--dp-muted); font-weight: 600; }
.building-about { margin-top: 30px; padding: 26px 28px; border: 1px solid var(--dp-line); border-radius: 20px; background: var(--dp-surface); }
.building-about h2 { margin: 0 0 10px; font-family: 'Unbounded', sans-serif; font-size: 20px; letter-spacing: -.035em; }
.building-about__text { margin: 0; color: var(--dp-muted); white-space: pre-line; }
.building-about__note { margin: 14px 0 0; color: var(--dp-muted); font-size: 13px; }
.mortgage-section { margin-top: 54px; }
.calc-block { display: grid; gap: 16px; padding: 24px; }
.calc-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.calc-field { display: grid; gap: 7px; }
.calc-field label { font-size: 13px; font-weight: 700; }
.calc-field select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--dp-line); border-radius: 12px; background: var(--dp-surface); color: var(--dp-ink); }
.calc-field select:focus { border-color: var(--dp-primary); outline: 3px solid rgba(36, 87, 245, .16); }
.btn-primary:disabled, .btn-primary:disabled:hover { background: var(--dp-primary); border-color: var(--dp-primary); opacity: .55; cursor: not-allowed; }
.calc-result { padding: 14px 16px; border: 1px dashed var(--dp-line); border-radius: 14px; background: rgba(255, 255, 255, .7); color: var(--dp-muted); }
.calc-result[data-state='done'] { border-style: solid; border-color: #C9DAFB; background: var(--dp-surface-alt); color: var(--dp-ink); }
.calc-result-card { padding: 16px 18px; border: 1px solid var(--dp-line); border-radius: 14px; background: var(--dp-surface); }
.calc-result-card h3 { margin: 0 0 8px; font-size: 17px; }
.calc-result-card p { margin: 4px 0; color: var(--dp-muted); }
.calc-result-card strong { color: var(--dp-ink); font-size: 15px; }
.calc-result--error { border: 1px solid #F5BCAD; border-left: 6px solid var(--dp-coral); background: #FFF0EA; color: var(--dp-danger); font-weight: 600; }
.alert { padding: 14px 16px; border: 1px solid #C9DAFB; border-left: 6px solid var(--dp-primary); border-radius: 14px; background: var(--dp-surface-alt); }
.alert p { margin: 0; }
.alert-success { border-color: #BFE3CD; border-left-color: #14683F; background: #E1F4E8; color: #14683F; }
.alert-error { border-color: #F5BCAD; border-left-color: var(--dp-coral); background: #FFF0EA; color: var(--dp-danger); }

.scenario-preview, .mortgage-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-top: 26px; }
.scenario-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.mortgage-preview { margin-top: 28px; }
.mortgage-card { padding: 18px; border: 1px solid var(--dp-line); border-radius: 18px; background: var(--dp-surface); }
.mortgage-rate { font-family: 'Unbounded', sans-serif; font-size: 22px; color: var(--dp-primary); }
.scenario-preview-empty, .lots-none { color: var(--dp-muted); }
.site-footer { margin-top: 60px; padding: 38px 0; border-top: 1px solid var(--dp-line); background: var(--dp-surface-alt); }
.site-footer__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--dp-muted); font-size: 14px; }
.site-footer__links { display: flex; gap: 18px; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }

@media (max-width: 980px) {
    .site-nav, .account-nav { display: none; }
    .menu-toggle { display: inline-grid; place-items: center; }
    .mobile-nav { display: block; }
    .hero-grid, .building-hero, .lead-strip { grid-template-columns: 1fr; }
    .buildings-grid, .scenario-preview, .mortgage-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .catalog-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .site-frame { width: min(calc(100% - 24px), var(--dp-frame)); }
    .brand__sub { display: none; }
    .display-title { font-size: clamp(36px,12vw,58px); }
    .form-grid, .buildings-grid, .scenario-preview, .mortgage-cards, .process-grid, .catalog-filters, .building-gallery { grid-template-columns: 1fr; }
    .process-step { border-right: 0; border-bottom: 1px solid var(--dp-line); }
    .process-step:last-child { border-bottom: 0; }
    .catalog-intro { grid-template-columns: 1fr; }
    .catalog-count { justify-self: start; }
    .catalog-actions { justify-content: stretch; flex-direction: column; }
    .catalog-actions .btn { width: 100%; }
    .lead-strip, .building-summary, .decision-panel { padding: 22px; }
    .facts-grid { grid-template-columns: 1fr; }
    .building-about, .calc-block { padding: 22px; }
    .calc-controls { grid-template-columns: 1fr; }
    .calc-controls .btn { width: 100%; }
    .site-footer__row { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms; animation-iteration-count: 1; transition-duration: .01ms; }
}

@media (forced-colors: active) {
    :root { scrollbar-color: auto; }
    .btn, .panel, .building-card, .decision-panel { border: 1px solid CanvasText; }
}
