:root {
  --bg: #f7fbfc;
  --bg2: #eef6f8;
  --card: #ffffff;
  --fg: #13212b;
  --muted: #5d6b75;
  --line: rgba(0, 40, 60, 0.09);
  --accent: #0aa37f;
  --accent-h: #11b78f;
  --sky: #29a8ff;
  --sun: #7fe3c3;
  --ok: #1d9b55;
  --shadow: 0 20px 60px rgba(0, 90, 110, 0.10);
  --radius: 28px;
  color-scheme: light; /* сайт всегда солнечный — тёмную тему устройства не повторяем */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* навигация — стеклянная полоска, как на apple.com */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 52px; }
.logo { font-weight: 700; font-size: 17px; color: var(--fg); letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }
.nav nav { display: flex; gap: 22px; margin-left: auto; font-size: 13px; }
.nav nav a { color: var(--fg); opacity: 0.8; }
.nav nav a:hover { opacity: 1; text-decoration: none; }
.nav .cta { margin-left: 8px; }
@media (max-width: 720px) { .nav nav a:not(.cta) { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #0aa37f, #1fc29b); color: #fff; box-shadow: 0 8px 24px rgba(10, 163, 127, 0.32); font: 600 17px/1 inherit; letter-spacing: -0.01em;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: linear-gradient(135deg, #11b78f, #34d3ac); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn.small { height: 32px; padding: 0 16px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn:disabled { opacity: 0.5; cursor: default; }
.link { font-size: 17px; font-weight: 500; }
.link::after { content: " ›"; }

/* первый экран */
.hero { text-align: center; padding: 72px 0 0; overflow: hidden; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--accent); margin: 0 0 10px; }
h1 {
  font-size: clamp(48px, 9vw, 96px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; margin: 0;
}
h1 .grad, h2 .grad {
  background: linear-gradient(90deg, #0aa37f, #18c2a0 45%, #29a8ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(19px, 2.4vw, 26px); line-height: 1.35; color: var(--muted); max-width: 720px; margin: 20px auto 0; font-weight: 500; letter-spacing: -0.02em; }
.hero .actions { display: flex; gap: 18px; justify-content: center; align-items: center; margin-top: 32px; flex-wrap: wrap; }
.hero-img { margin: 56px auto 0; max-width: 1240px; padding: 0 22px; }
.hero-img img { width: 100%; border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; box-shadow: var(--shadow); }

section { padding: 110px 0; }
.alt { background: var(--bg2); }
h2 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.05; letter-spacing: -0.04em; margin: 0; font-weight: 700; text-align: center; }
.sub { text-align: center; color: var(--muted); font-size: clamp(17px, 2vw, 21px); max-width: 640px; margin: 16px auto 0; }

/* города — горизонтальная лента с прокруткой */
.grid { display: grid; grid-auto-flow: column; grid-auto-columns: min(340px, 82vw); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 48px 22px 12px; scrollbar-width: none; }
.grid::-webkit-scrollbar { display: none; }
@media (min-width: 1100px) { .grid { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; max-width: 1080px; margin: 0 auto; overflow: visible; } }
.card { scroll-snap-align: center; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--fg); display: flex; flex-direction: column; transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1); }
.card:hover { transform: translateY(-6px) scale(1.01); text-decoration: none; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card .body { padding: 22px 24px 26px; }
.card h3 { font-size: 26px; margin: 0; letter-spacing: -0.03em; }
.card p { color: var(--muted); margin: 6px 0 14px; font-size: 15px; }
.stats { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.stats b { display: block; font-size: 21px; color: var(--fg); letter-spacing: -0.02em; }

/* квиз */
.quiz { max-width: 760px; margin: 48px auto 0; background: var(--card); border-radius: 36px; box-shadow: var(--shadow); padding: 40px 36px; min-height: 480px; position: relative; overflow: hidden; }
@media (max-width: 600px) { .quiz { padding: 28px 20px; border-radius: 28px; } }
.progress { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-bottom: 28px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0aa37f, #29a8ff); border-radius: 4px; transition: width 0.5s cubic-bezier(0.2, 0.9, 0.3, 1); }
.step-n { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.q { font-size: clamp(26px, 4vw, 36px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 700; margin: 8px 0 24px; }
.opts { display: grid; gap: 12px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 18px 20px; border-radius: 18px; border: 1.5px solid var(--line); background: transparent; color: var(--fg); font: 500 17px/1.3 inherit; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.15s; }
.opt:hover { border-color: var(--accent); }
.opt:active { transform: scale(0.985); }
.opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.opt .e { font-size: 26px; width: 34px; text-align: center; }
.back { margin-top: 22px; background: none; border: 0; color: var(--muted); font: 500 15px inherit; cursor: pointer; padding: 0; }
.back:hover { color: var(--fg); }
.pane { animation: in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.result img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; }
.result .city-name { font-size: clamp(40px, 7vw, 64px); letter-spacing: -0.045em; font-weight: 700; margin: 6px 0 0; line-height: 1; }
.result .why { color: var(--muted); font-size: 17px; margin: 12px 0 0; }
.result .stats { margin: 18px 0 26px; }
form { display: grid; gap: 12px; }
.field { width: 100%; height: 56px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--bg); color: var(--fg); font: 17px inherit; outline: none; transition: border-color 0.2s; }
.field:focus { border-color: var(--accent); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 12px 6px; border-radius: 14px; border: 1.5px solid var(--line); font-size: 15px; font-weight: 500; cursor: pointer; }
.seg input:checked + span { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.45; }
.consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
.err { color: #e5484d; font-size: 14px; min-height: 20px; }
.done { text-align: center; padding: 40px 0; }
.done .check { width: 84px; height: 84px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 42px; margin: 0 auto 22px; animation: pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* шаги и вопросы */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.stepcard { background: var(--card); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); }
.stepcard .n { font-size: 48px; font-weight: 700; letter-spacing: -0.04em; background: linear-gradient(135deg, #0aa37f, #29a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stepcard h3 { margin: 6px 0 8px; font-size: 22px; letter-spacing: -0.02em; }
.stepcard p { margin: 0; color: var(--muted); font-size: 15px; }
.faq { max-width: 760px; margin: 40px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 4px; }
.faq summary { cursor: pointer; font-size: 19px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 24px; line-height: 1; transition: transform 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin: 12px 0 0; }

/* страница города */
.prose { max-width: 720px; margin: 0 auto; font-size: 19px; }
.prose h2 { text-align: left; font-size: clamp(28px, 4vw, 40px); margin: 56px 0 14px; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin: 6px 0; }
.crumbs { font-size: 13px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }

footer { padding: 40px 0 60px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg2); }
footer .cols { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 14px; }
footer a { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.9s cubic-bezier(0.2, 0.9, 0.3, 1); }
.reveal.vis { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .pane, .done .check { animation: none; } html { scroll-behavior: auto; } }

/* плашка о cookie — снизу, стеклянная, как навигация */
.cookie { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; width: min(620px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 18px; font-size: 13px; color: var(--muted);
  background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow); border: 1px solid var(--line); }
.cookie[hidden] { display: none; }
.cookie .btn { margin-left: auto; }

/* солнечный первый экран: мягкие цветные пятна, которые медленно плывут */
.hero { position: relative; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: 0.55; pointer-events: none; }
.hero::before { width: 520px; height: 520px; left: -140px; top: -120px; background: radial-gradient(circle, var(--sun), transparent 70%); animation: float1 14s ease-in-out infinite alternate; }
.hero::after { width: 560px; height: 560px; right: -160px; top: 120px; background: radial-gradient(circle, var(--sky), transparent 70%); animation: float2 18s ease-in-out infinite alternate; }
@keyframes float1 { to { transform: translate(80px, 60px) scale(1.1); } }
@keyframes float2 { to { transform: translate(-70px, -40px) scale(0.95); } }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--sun) 28%, transparent); color: #07775d; }
.alt { background: linear-gradient(180deg, var(--bg2), color-mix(in srgb, var(--sky) 10%, var(--bg)) ); }
.stats b { background: linear-gradient(90deg, #0aa37f, #29a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.opt:hover { border-color: var(--accent); background: color-mix(in srgb, var(--sun) 10%, transparent); }
.done .check { background: linear-gradient(135deg, #2bd47d, #2bb3ff); }
.logo span { background: linear-gradient(90deg, #0aa37f, #29a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: reduce) { .hero::before, .hero::after { animation: none; } }
@media (min-width: 640px) { .cookie { flex-wrap: nowrap; } }

/* агрегатор: сетка ЖК, фильтры, таблицы сравнения */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; max-width: 1180px; margin: 0 auto; padding: 32px 22px 12px; overflow: visible; grid-auto-flow: row; }
.card { position: relative; }
.card .ph { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: linear-gradient(135deg, #d8f3ec, #d6ecff); display: grid; place-items: center; color: #3d6b7d; font-weight: 600; font-size: 20px; text-align: center; padding: 16px; }
.card .dev { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card .row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.chip { display: inline-block; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--bg2); color: var(--muted); }
.chip.hot { background: #fff1e6; color: #b5520f; }
.cmp { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(10px); color: var(--fg); border: 0; cursor: pointer; }
.cmp.on { background: var(--accent); color: #fff; }
.filters { position: sticky; top: 52px; z-index: 40; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.filters .wrap { display: flex; gap: 8px; overflow-x: auto; padding: 10px 22px; scrollbar-width: none; max-width: 1180px; }
.filters .wrap::-webkit-scrollbar { display: none; }
.filters select, .filters button { flex: none; height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--fg); font: 500 14px inherit; cursor: pointer; }
.filters button.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.found { max-width: 1180px; margin: 0 auto; padding: 18px 22px 0; color: var(--muted); font-size: 15px; }
.cbar { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: 70; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 20px; border-radius: 999px; background: #13212b; color: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.25); transition: transform .45s cubic-bezier(.2,.9,.3,1); font-size: 15px; }
.cbar:not(.show) { visibility: hidden; opacity: 0; pointer-events: none; transition: transform .45s, opacity .3s, visibility 0s .45s; }
.cbar.show { transform: translate(-50%, 0); }
.cbar { white-space: nowrap; transition: transform .45s cubic-bezier(.2,.9,.3,1), bottom .3s ease; }
.cookie:not([hidden]) ~ .cbar { bottom: 160px; } /* пока висит плашка cookie — сравнение над ней */
@media (min-width: 640px) { .cookie:not([hidden]) ~ .cbar { bottom: 96px; } }
.cbar-x { display: grid; place-items: center; width: 36px; height: 36px; margin-left: -6px; border: 0; border-radius: 999px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.75); font-size: 22px; line-height: 1; cursor: pointer; transition: background .2s; }
.cbar-x:hover { background: rgba(255,255,255,.18); color: #fff; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.tbl th, .tbl td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 600; color: var(--muted); width: 32%; background: var(--bg2); }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }
.tbl .best { color: var(--accent); font-weight: 700; }
.scroll { overflow-x: auto; }
.rooms { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 18px; }
.room { background: var(--card); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.room img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: 12px; }
.room b { display: block; font-size: 19px; margin-top: 8px; }
.room span { color: var(--muted); font-size: 14px; }
.get { background: linear-gradient(135deg, #0f2a38, #12404f); color: #fff; border-radius: 32px; padding: 34px 28px; text-align: center; box-shadow: var(--shadow); }
.get h2 { color: #fff; font-size: clamp(28px, 4vw, 40px); }
.get p { color: rgba(255,255,255,.75); margin: 10px auto 22px; max-width: 520px; }
.ch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 620px; margin: 0 auto; }
@media (max-width: 560px) { .ch { grid-template-columns: repeat(2, 1fr); } }
.ch button { height: 58px; border-radius: 18px; border: 0; cursor: pointer; font: 600 16px inherit; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s; }
.ch button:active { transform: scale(.97); }
.ch .wa { background: #25d366; } .ch .tg { background: #2aabee; } .ch .mx { background: linear-gradient(135deg, #7b5cff, #b14cff); } .ch .sms { background: #ff9f0a; }
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(10,20,28,.45); display: grid; place-items: end center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.modal.show { opacity: 1; pointer-events: auto; }
.sheet { width: min(520px, 100%); background: var(--card); border-radius: 28px 28px 0 0; padding: 26px 22px calc(22px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .45s cubic-bezier(.2,.9,.3,1); }
@media (min-width: 640px) { .modal { place-items: center; } .sheet { border-radius: 28px; } }
.modal.show .sheet { transform: none; }
.sheet h3 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.sheet .why { color: var(--muted); margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 28px; }
.fact { background: var(--card); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.fact b { display: block; font-size: 24px; letter-spacing: -.02em; }
.fact span { font-size: 13px; color: var(--muted); }
.promo { background: #fff6ec; border-radius: 18px; padding: 14px 16px; margin-top: 10px; color: #7a3d0a; }
.links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.links a { padding: 10px 16px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--fg); font-size: 14px; }
.links a:hover { text-decoration: none; color: var(--accent); }
.credit { font-size: 12px; color: var(--muted); margin-top: 8px; }

button, input, select, textarea { font-family: inherit; }

/* сноска о Meta (закон РФ: упоминание сервисов Meta) */
.meta-note { margin: 14px auto 0; max-width: 560px; font-size: 11.5px; line-height: 1.4; opacity: .6; text-align: center; }
footer .meta-note { text-align: left; margin: 18px 0 0; max-width: none; }

/* анкета в окне заявки: мессенджер, комнатность, бюджет, способ покупки — чипы */
.sheet { max-height: calc(100dvh - 24px); overflow-y: auto; }
.sheet form { display: flex; flex-direction: column; gap: 12px; }
.q > span { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick button { height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--fg); font: 500 14px inherit; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.pick button:hover { border-color: var(--accent); }
.pick button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
#lead .q { margin: 0; } /* .q уже занят стилем квиза — в окне заявки без отступов */
#lead .q + .field { margin-top: 4px; }
