/* ============================================================
   Эльвира Мухаметшина — риэлтор в Туймазах
   Дизайн: тёплый редакторский минимализм (quiet luxury)
   ============================================================ */

:root {
  --bg: #f7f3ec;
  --surface: #fffdf9;
  --surface-2: #f1eadf;
  --ink: #2a2622;
  --muted: #6b6258;
  --accent: #7c6a4e;
  --accent-deep: #3c3a2e;
  --line: #e4dccf;
  --cta: #c2502e;
  --cta-ink: #fff6ef;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px rgba(42, 38, 34, 0.1);
  --shadow-sm: 0 8px 24px rgba(42, 38, 34, 0.07);
  --maxw: 1280px;
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-text: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sign: 'Caveat', cursive;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme='evening'] {
  --bg: #1c1a16;
  --surface: #252119;
  --surface-2: #2e2920;
  --ink: #ede6d8;
  --muted: #a89c88;
  --accent: #b89b6e;
  --accent-deep: #ede6d8;
  --line: #39332a;
  --cta: #d9663f;
  --cta-ink: #1c1a16;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; margin: 0; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 18px;
}

.accent { color: var(--accent); }
.signature { font-family: var(--font-sign); font-weight: 700; color: var(--accent); font-size: 1.5em; line-height: 1; }

.section { padding: clamp(64px, 9vw, 130px) 0; }
.section-title { font-size: clamp(30px, 4.4vw, 56px); }
.section-lead { color: var(--muted); max-width: 56ch; margin: 18px 0 0; font-size: 19px; }
.section-head { margin-bottom: clamp(30px, 5vw, 56px); }
.section-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

.link-arrow { color: var(--accent); font-weight: 600; white-space: nowrap; transition: gap 0.3s; }
.link-arrow:hover { color: var(--cta); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-text); font-weight: 600; font-size: 16px;
  padding: 15px 26px; border-radius: 100px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
  text-align: center; line-height: 1.1;
}
.btn:active { transform: translateY(1px); }
.btn-cta { background: var(--cta); color: var(--cta-ink); }
.btn-cta:hover { box-shadow: 0 12px 30px rgba(194, 80, 46, 0.32); transform: translateY(-2px); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.btn-sm:hover { background: var(--line); }
.btn-danger { background: transparent; color: #b4452a; border-color: rgba(180, 69, 42, 0.3); }
.btn-danger:hover { background: rgba(180, 69, 42, 0.1); }

/* ---------- Reveal animation ---------- */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* ---------- Header ---------- */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 999; background: var(--cta); color: #fff; padding: 10px 16px; border-radius: 8px; }

.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.3s, background 0.3s; }
.site-header.is-stuck { border-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 16px 0; }

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-deep); color: var(--bg); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; text-transform: lowercase; flex: none; overflow: hidden; }
.brand-mark--photo { background: var(--surface-2); border: 1px solid var(--line); }
.brand-mark--photo img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.brand-role { font-size: 12.5px; color: var(--muted); }

.nav { display: flex; gap: 26px; }
.nav a { font-size: 15.5px; color: var(--muted); font-weight: 500; transition: color 0.2s; position: relative; }
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); border-radius: 2px; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { font-weight: 600; font-size: 15.5px; white-space: nowrap; }
.header-phone:hover { color: var(--accent); }
.header-cta { padding: 11px 20px; }

.theme-toggle { width: 46px; height: 28px; border-radius: 100px; border: 1.5px solid var(--line); background: var(--surface-2); position: relative; cursor: pointer; padding: 0; flex: none; transition: background 0.3s; }
.theme-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); transition: transform 0.35s var(--ease); }
[data-theme='evening'] .theme-toggle::after { transform: translateX(18px); }
.theme-toggle__icon { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12px; line-height: 1; pointer-events: none; }
.theme-toggle__icon--day { right: 6px; }
.theme-toggle__icon--night { left: 6px; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; flex-direction: column; gap: 6px; padding: 12px 20px 28px; border-top: 1px solid var(--line); }
.mobile-menu a { padding: 12px 0; font-size: 19px; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 14px; }
.mobile-menu__phone { color: var(--accent) !important; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(50px, 7vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 5vw, 72px); align-items: center; }
.hero-title { font-size: clamp(44px, 8.5vw, 104px); font-weight: 800; letter-spacing: -0.03em; }
.hero-lead { font-size: clamp(18px, 2.2vw, 23px); color: var(--muted); max-width: 46ch; margin: 26px 0 32px; }
.hero-lead__em { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-signature { margin-top: 30px; color: var(--muted); font-size: 16px; display: flex; align-items: center; gap: 8px; }

.hero-feature { position: relative; }
.hero-card { display: block; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform 0.5s var(--ease); }
.hero-card:hover { transform: translateY(-6px); }
.hero-card__media { position: relative; aspect-ratio: 4 / 4.4; overflow: hidden; }
.hero-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.hero-card:hover .hero-card__media img { transform: scale(1.05); }
.hero-card__deal { position: absolute; top: 16px; left: 16px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(6px); padding: 7px 15px; border-radius: 100px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.hero-card__info { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 6px; }
.hero-card__rubric { font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.hero-card__name { font-family: var(--font-display); font-weight: 600; font-size: 21px; }
.hero-card__meta { color: var(--muted); font-size: 15px; }
.hero-card__price { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin-top: 6px; }
.hero-live { display: inline-flex; align-items: center; gap: 9px; margin-top: 20px; padding: 10px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 100px; font-size: 14.5px; color: var(--muted); box-shadow: var(--shadow-sm); }
.hero-live strong { color: var(--ink); }
.hero-live__dot { width: 9px; height: 9px; border-radius: 50%; background: #4caf72; box-shadow: 0 0 0 0 rgba(76, 175, 114, 0.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(76, 175, 114, 0.5); } 70% { box-shadow: 0 0 0 10px rgba(76, 175, 114, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 175, 114, 0); } }

/* ---------- Trust ---------- */
.trust { padding: clamp(40px, 5vw, 70px) 0; border-block: 1px solid var(--line); background: var(--surface-2); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 44px); }
.trust-item h3 { font-size: 20px; margin: 14px 0 10px; font-weight: 600; }
.trust-item p { color: var(--muted); font-size: 15.5px; margin: 0; }
.trust-num { font-family: var(--font-display); font-size: 14px; color: var(--accent); font-weight: 700; letter-spacing: 0.1em; }

/* ---------- Segments ---------- */
.segments-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.segment { grid-row: span 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 8px; min-height: 220px; transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.3s; }
.segment:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--accent); }
.segment--lg { grid-row: span 2; background: var(--accent-deep); color: var(--bg); }
.segment--lg .segment__desc, .segment--lg .segment__count, .segment--lg .segment__more { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.segment__count { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.segment__name { font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); font-weight: 700; margin-top: auto; }
.segment--lg .segment__name { color: var(--bg); }
.segment__desc { color: var(--muted); font-size: 15px; }
.segment__more { color: var(--accent); font-weight: 600; font-size: 15px; margin-top: 8px; }

/* ---------- Cards grid ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.5vw, 34px); }
.cards-grid--stagger > .card:nth-child(even) { transform: translateY(36px); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.45s var(--ease), box-shadow 0.45s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__deal { position: absolute; top: 14px; left: 14px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); padding: 6px 13px; border-radius: 100px; font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 600; }
.card__flag { position: absolute; top: 14px; right: 14px; padding: 6px 12px; border-radius: 100px; font-size: 11.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); }
.card__flag--new { background: var(--accent); color: var(--bg); border-color: transparent; }
.card__flag--sold { background: var(--ink); color: var(--bg); border-color: transparent; }
.card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card__rubric { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.card__title { font-size: 21px; font-weight: 600; line-height: 1.2; }
.card__title a:hover { color: var(--accent); }
.card__chips { color: var(--muted); font-size: 14.5px; margin: 0; }
.card__foot { margin-top: auto; padding-top: 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.card__price { font-family: var(--font-display); font-weight: 700; font-size: 21px; white-space: nowrap; }
.card__more { color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap; transition: transform 0.3s; }
.card:hover .card__more { transform: translateX(4px); }

/* ---------- Districts ---------- */
.districts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.district-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 26px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: transform 0.35s var(--ease), border-color 0.3s, background 0.3s; }
.district-tile:hover { transform: translateY(-4px); border-color: var(--accent); }
.district-tile__name { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.district-tile__count { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.why-copy p { color: var(--muted); margin: 18px 0; }
.why-copy .section-title { margin-bottom: 8px; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.why-list li { padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); }
.why-list li:last-child { border-bottom: 1px solid var(--line); }
.why-list strong { color: var(--ink); font-weight: 600; }

/* ---------- CTA ---------- */
.cta-section { background: var(--accent-deep); color: var(--bg); border-radius: 0; }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 5vw, 80px); align-items: center; }
.cta-copy .section-title { color: var(--bg); }
.cta-copy p { color: color-mix(in srgb, var(--bg) 78%, transparent); margin: 18px 0 26px; }
.cta-contacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cta-contacts a { color: var(--bg); font-weight: 600; }
.cta-contacts a:hover { color: var(--cta); }
.cta-form { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: clamp(24px, 3vw, 38px); box-shadow: var(--shadow); }

/* ---------- Lead form ---------- */
.lead-form { display: grid; gap: 16px; }
.lead-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field__hint { font-weight: 400; color: var(--muted); opacity: 0.7; }
.lead-form input, .lead-form textarea, .field input, .field select, .field textarea, .admin-form input, .admin-form select, .admin-form textarea {
  font-family: var(--font-text); font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 15px; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.lead-form input:focus, .lead-form textarea:focus, .field input:focus, .field select:focus, .field textarea:focus, .admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.lead-form textarea, .field textarea { resize: vertical; }
.lead-form__note { font-size: 12.5px; color: var(--muted); margin: 0; }
.lead-success { background: color-mix(in srgb, #4caf72 16%, var(--surface)); border: 1px solid #4caf72; color: var(--ink); padding: 14px 16px; border-radius: 12px; font-size: 15px; }

/* ---------- Page head ---------- */
.page-head { padding: clamp(36px, 6vw, 76px) 0 clamp(20px, 3vw, 34px); }
.page-head--tight { padding-bottom: 8px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 20px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.page-title { font-size: clamp(34px, 6vw, 68px); font-weight: 800; letter-spacing: -0.02em; }
.page-lead { color: var(--muted); max-width: 62ch; margin: 18px 0 0; font-size: 19px; }

/* ---------- Catalog ---------- */
.catalog { padding-bottom: clamp(60px, 8vw, 110px); }
.catalog-layout { display: grid; grid-template-columns: 290px 1fr; gap: clamp(24px, 3vw, 44px); align-items: start; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 18px; position: sticky; top: 92px; }
.filters-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.filters-reset { font-size: 13px; color: var(--accent); font-weight: 500; font-family: var(--font-text); }
.field--rooms { gap: 9px; border: 0; padding: 0; margin: 0; }
.field--rooms .field__label { display: block; }
.seg { display: flex; gap: 6px; }
.seg__opt { flex: 1; }
.seg__opt input { position: absolute; opacity: 0; pointer-events: none; width: auto; }
.seg__opt span { display: block; text-align: center; padding: 9px 0; border: 1.5px solid var(--line); border-radius: 10px; font-size: 14px; cursor: pointer; transition: all 0.2s; color: var(--muted); }
.seg__opt input:checked + span { background: var(--accent-deep); color: var(--bg); border-color: var(--accent-deep); }
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.results-count { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.sort select { width: auto; padding: 9px 13px; font-size: 14px; }
.catalog-results .cards-grid { grid-template-columns: repeat(2, 1fr); }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 48px 32px; text-align: center; color: var(--muted); }
.empty a { color: var(--accent); font-weight: 600; }

/* ---------- Listing ---------- */
.listing-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; padding-bottom: clamp(50px, 7vw, 100px); }
.listing-title-block { margin-bottom: 24px; }
.listing-title { font-size: clamp(28px, 4vw, 46px); font-weight: 700; margin: 8px 0; }
.listing-addr { color: var(--muted); font-size: 17px; }
.gallery__main { position: relative; aspect-ratio: 16 / 11; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__sold { position: absolute; top: 18px; left: 18px; background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 100px; font-size: 13px; font-weight: 600; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery__thumb { width: 88px; height: 66px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: none; transition: border-color 0.2s; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--accent); }
.tag-row { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 9px; }
.tag { background: var(--surface-2); border: 1px solid var(--line); padding: 7px 14px; border-radius: 100px; font-size: 13.5px; color: var(--ink); }
.listing-block { margin-top: 40px; }
.listing-block h2, .listing-desc h2 { font-size: 26px; margin-bottom: 16px; font-weight: 600; }
.listing-block--checks { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.listing-block__note { color: var(--muted); font-size: 14.5px; margin: 16px 0 0; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { padding-left: 30px; position: relative; }
.check-list li::before { content: ''; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M6.4 11.2 3.2 8l1.1-1.1 2.1 2.1 5.2-5.2L12.7 5z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M6.4 11.2 3.2 8l1.1-1.1 2.1 2.1 5.2-5.2L12.7 5z'/%3E%3C/svg%3E") center/contain no-repeat; }
.check-list--shield li::before { border-radius: 4px; }
.pill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li { background: var(--surface-2); border: 1px solid var(--line); padding: 8px 15px; border-radius: 100px; font-size: 14.5px; }

.prose { color: var(--ink); }
.prose p { margin: 0 0 16px; color: var(--muted); }
.prose h2 { font-size: 26px; margin: 28px 0 14px; font-weight: 600; }
.prose h3 { font-size: 21px; margin: 22px 0 10px; font-weight: 600; }
.prose ul, .prose ol { color: var(--muted); padding-left: 22px; margin: 0 0 16px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent); text-decoration: underline; }

.listing-aside { position: sticky; top: 92px; display: grid; gap: 20px; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.price-card__price { font-family: var(--font-display); font-weight: 700; font-size: 32px; }
.price-card__sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.spec-table { margin: 22px 0; display: grid; gap: 0; }
.spec-table > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec-table dt { color: var(--muted); margin: 0; font-size: 15px; }
.spec-table dd { margin: 0; font-weight: 600; text-align: right; font-size: 15px; }
.price-card .btn { margin-top: 10px; }
.price-card__agent { font-size: 14px; color: var(--muted); margin: 18px 0 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.aside-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.aside-form__title { font-size: 22px; margin-bottom: 18px; font-weight: 600; }

/* ---------- Articles ---------- */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.5vw, 32px); }
.articles-grid--list { grid-template-columns: repeat(3, 1fr); }
.article-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 11px; transition: transform 0.4s var(--ease), box-shadow 0.4s; overflow: hidden; }
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.article-card__cover { display: block; margin: -26px -26px 4px; aspect-ratio: 16 / 9; overflow: hidden; }
.article-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.article-card__tag { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.article-card__title { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.25; }
.article-card__excerpt { color: var(--muted); font-size: 15px; }
.article-card__meta { color: var(--muted); font-size: 13px; margin-top: auto; }

/* ---------- Article page ---------- */
.article-page { padding-bottom: clamp(50px, 7vw, 100px); }
.article { max-width: 760px; padding-top: clamp(30px, 5vw, 60px); }
.article-head { margin-bottom: 30px; }
.article-title { font-size: clamp(32px, 5vw, 56px); font-weight: 800; margin: 10px 0; letter-spacing: -0.02em; }
.article-lead { font-size: 22px; color: var(--muted); line-height: 1.5; }
.article-byline { color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.article-cover { margin: 0 0 30px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { font-size: 19px; }
.article-checklist, .article-faq { margin-top: 40px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.article-checklist h2, .article-faq h2 { font-size: 24px; margin-bottom: 16px; font-weight: 600; }
.article-cta { margin-top: 48px; padding: 32px; background: var(--accent-deep); color: var(--bg); border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.article-cta .section-title { color: var(--bg); font-size: 26px; }
.article-cta p { color: color-mix(in srgb, var(--bg) 78%, transparent); margin: 8px 0 0; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 800px; }
.faq-list { display: grid; gap: 10px; margin-top: 24px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 22px; }
.faq-item summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--accent); font-size: 22px; transition: transform 0.3s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 18px; color: var(--muted); }

/* ---------- About ---------- */
.about-hero { padding: clamp(40px, 6vw, 90px) 0; }
.about-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 26px; }
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: 40px; display: block; color: var(--accent); }
.stat__label { color: var(--muted); font-size: 14.5px; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.service-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.service-card h2 { font-size: 26px; margin-bottom: 12px; font-weight: 600; }
.service-card > p { color: var(--muted); margin: 0 0 20px; }
.service-card .check-list { margin-bottom: 22px; }
.service-card .link-arrow { font-size: 15px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step__num { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-deep); color: var(--bg); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; margin-bottom: 16px; }
.step h3 { font-size: 19px; margin-bottom: 8px; font-weight: 600; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }
.commission-box { background: var(--accent-deep); color: var(--bg); border-radius: var(--radius); padding: clamp(32px, 5vw, 56px); text-align: center; max-width: 820px; margin-inline: auto; }
.commission-box .section-title { color: var(--bg); }
.commission-box p { color: color-mix(in srgb, var(--bg) 80%, transparent); max-width: 60ch; margin: 18px auto 26px; }

/* ---------- Mortgage ---------- */
.programs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.program { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.program--accent { background: var(--accent-deep); color: var(--bg); }
.program--accent h2 { color: var(--bg); }
.program--accent p { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.program__rate { font-family: var(--font-display); font-weight: 800; font-size: 48px; color: var(--accent); display: block; margin-bottom: 12px; }
.program--accent .program__rate { color: var(--cta); }
.program h2 { font-size: 23px; margin-bottom: 10px; font-weight: 600; }
.program p { color: var(--muted); margin: 0; }
.calc-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-sm); }
.calc__presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.calc__presets button { padding: 9px 16px; border-radius: 100px; border: 1.5px solid var(--line); background: transparent; color: var(--muted); font-family: var(--font-text); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.calc__presets button.is-active { background: var(--accent-deep); color: var(--bg); border-color: var(--accent-deep); }
.calc__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc__result { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.calc__monthly { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc__monthly span { color: var(--muted); }
.calc__monthly strong { font-family: var(--font-display); font-weight: 700; font-size: 30px; }
.calc__rows { display: grid; gap: 8px; margin-top: 14px; }
.calc__rows div { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; }
.calc__rows b { color: var(--ink); }
.calc__note { font-size: 12.5px; color: var(--muted); margin: 16px 0 0; }

/* ---------- Contacts ---------- */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.contacts-info { display: grid; gap: 4px; }
.contact-line { display: flex; flex-direction: column; gap: 3px; padding: 20px 0; border-bottom: 1px solid var(--line); transition: padding-left 0.25s; }
.contact-line:hover { padding-left: 8px; }
.contact-line__label { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.contact-line__value { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.contact-line--static:hover { padding-left: 0; }
.contacts-note { margin-top: 24px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.contacts-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 38px); box-shadow: var(--shadow-sm); }

/* ---------- Not found ---------- */
.notfound { padding: clamp(80px, 14vw, 200px) 0; text-align: center; }
.notfound-inner { max-width: 640px; margin-inline: auto; }
.notfound .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); padding: clamp(50px, 6vw, 80px) 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: clamp(28px, 4vw, 56px); }
.footer-brand .signature { font-size: 44px; }
.footer-tagline { color: var(--muted); max-width: 34ch; margin: 12px 0 22px; font-size: 15.5px; }
.footer-col h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.footer-col a { display: block; color: var(--muted); padding: 7px 0; font-size: 15.5px; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-phone { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink) !important; }
.footer-socials { display: flex; gap: 14px; margin: 14px 0; flex-wrap: wrap; }
.footer-socials a { padding: 0 !important; }
.footer-addr { color: var(--muted); font-style: normal; font-size: 14.5px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: clamp(40px, 5vw, 60px); padding-top: 28px; border-top: 1px solid var(--line); flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.footer-admin:hover { color: var(--accent); }

/* ---------- Admin ---------- */
.admin-bar { background: var(--accent-deep); color: var(--bg); position: sticky; top: 0; z-index: 100; }
.admin-bar__inner { width: min(100% - 40px, var(--maxw)); margin-inline: auto; display: flex; align-items: center; gap: 24px; padding: 12px 0; flex-wrap: wrap; }
.admin-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; margin-right: auto; }
.admin-brand .brand-mark { width: 34px; height: 34px; background: var(--bg); color: var(--accent-deep); font-size: 13px; }
.admin-nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.admin-nav a { color: color-mix(in srgb, var(--bg) 75%, transparent); font-size: 15px; font-weight: 500; }
.admin-nav a:hover, .admin-nav a.is-active { color: var(--bg); }
.admin-logout { color: var(--cta) !important; }
.admin { padding: clamp(30px, 4vw, 50px) 0 90px; }
.admin-wrap { width: min(100% - 40px, 1100px); margin-inline: auto; }
.admin-form-wrap { max-width: 920px; }
.admin-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.admin-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px 24px; display: flex; flex-direction: column; }
.admin-stat b { font-family: var(--font-display); font-size: 32px; }
.admin-stat span { color: var(--muted); font-size: 14px; }
.admin-stat--link:hover { border-color: var(--accent); }
.admin-section { margin-bottom: 48px; }
.admin-section__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-section__head h1 { font-size: clamp(26px, 4vw, 38px); }
.admin-table { display: grid; gap: 10px; }
.admin-row { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; }
.admin-row__media { width: 70px; height: 56px; border-radius: 8px; overflow: hidden; flex: none; background: var(--surface-2); }
.admin-row__media img { width: 100%; height: 100%; object-fit: cover; }
.admin-row__main { flex: 1; min-width: 0; }
.admin-row__name { font-weight: 600; font-size: 16px; }
.admin-row__name:hover { color: var(--accent); }
.admin-row__meta { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.admin-row__price { font-family: var(--font-display); font-weight: 600; white-space: nowrap; }
.admin-row__actions { display: flex; gap: 8px; align-items: center; }
.admin-row__actions form { margin: 0; }
.status { display: inline-block; padding: 2px 9px; border-radius: 100px; font-size: 11.5px; font-weight: 600; }
.status--active { background: color-mix(in srgb, #4caf72 22%, transparent); color: #2f7d50; }
.status--reserved { background: color-mix(in srgb, var(--cta) 20%, transparent); color: var(--cta); }
.status--sold { background: var(--surface-2); color: var(--muted); }
.status--archived { background: var(--surface-2); color: var(--muted); }

.admin-form { display: grid; gap: 22px; }
.form-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 0; background: var(--surface); }
.form-block legend { font-family: var(--font-display); font-weight: 600; font-size: 17px; padding: 0 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-block > .field { margin-bottom: 16px; }
.form-block > .field:last-child { margin-bottom: 0; }
.field--wide { grid-column: 1 / -1; }
.field--check { flex-direction: row; align-items: center; gap: 10px; }
.field--check input { width: auto; }
.form-hint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.photo-manage { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.photo-item { width: 150px; }
.photo-item img { width: 150px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); transition: opacity 0.2s, filter 0.2s; }
.photo-flag { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.photo-flag input { width: auto; }
.photo-flag--delete { color: #b4452a; font-weight: 600; }
.photo-item.is-marked-delete img { opacity: 0.38; filter: grayscale(1); }
.profile-photo-field { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.profile-photo-field img { width: 76px; height: 76px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 30px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; width: min(100%, 400px); display: grid; gap: 16px; box-shadow: var(--shadow); text-align: center; }
.login-mark { display: flex; justify-content: center; }
.login-card h1 { font-size: 26px; }
.login-hint { color: var(--muted); font-size: 14px; margin: 0; }
.login-hint b { color: var(--ink); }
.login-card .field { text-align: left; }
.login-error { background: rgba(180, 69, 42, 0.12); color: #b4452a; padding: 12px; border-radius: 10px; font-size: 14px; }
.login-back { color: var(--muted); font-size: 14px; margin-top: 4px; }
.login-back:hover { color: var(--accent); }

.leads-list { display: grid; gap: 12px; }
.lead-row { display: flex; justify-content: space-between; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; flex-wrap: wrap; }
.lead-row--new { border-left: 3px solid var(--cta); }
.lead-row__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lead-phone { color: var(--accent); font-weight: 600; }
.lead-row__msg { margin: 8px 0; color: var(--ink); }
.lead-row__meta { color: var(--muted); font-size: 13px; margin: 0; }
.lead-row__actions { display: flex; gap: 8px; align-items: flex-start; }
.lead-row__actions form { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-feature { max-width: 460px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .segments-grid { grid-template-columns: repeat(2, 1fr); }
  .segment--lg { grid-row: span 1; }
  .cards-grid, .articles-grid, .articles-grid--list { grid-template-columns: repeat(2, 1fr); }
  .districts-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid, .cta-grid, .about-hero-grid, .contacts-grid, .calc-wrap { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .listing-layout { grid-template-columns: 1fr; }
  .listing-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid--stagger > .card:nth-child(even) { transform: none; }
}

@media (max-width: 680px) {
  body { font-size: 17px; }
  .nav, .header-actions .header-phone, .header-actions .header-cta { display: none; }
  .burger { display: flex; }
  .site-header.is-open .mobile-menu { display: flex; }
  .cards-grid, .articles-grid, .articles-grid--list, .catalog-results .cards-grid, .services-grid, .about-stats, .form-grid, .calc__fields, .lead-form__row { grid-template-columns: 1fr; }
  .trust-grid, .districts-grid, .steps { grid-template-columns: 1fr; }
  .admin-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-cta { flex-direction: column; align-items: flex-start; }
  .cards-grid--stagger > .card:nth-child(even) { transform: none; }
  .admin-row { flex-wrap: wrap; gap: 6px 12px; }
  .admin-row__main { flex: 1 1 55%; min-width: 0; }
  .admin-row__price { margin-left: auto; }
  .admin-row__actions { flex-basis: 100%; justify-content: flex-start; }
  .admin-bar__inner { gap: 10px 14px; }
  .admin-section__head { gap: 12px; }
  .admin-section__head .btn { width: 100%; }
}
