/* novostroyki-pitera.ru — «Новостройки Питера»: тёплая бумага, невский синий, золото, засечки в заголовках */
:root {
  --bg: #f5f1e8; --paper: #fffdf8; --ink: #1b2433; --muted: #5f6672; --line: #e4dccb;
  --navy: #1d3557; --navy2: #284b77; --gold: #c4923a; --gold2: #e9c47a;
  --r0: #e8d9b5; --r1: #cfe0d4; --r2: #c9d8ea; --r3: #e4cfdc; --r4: #d9d2ee;
  --rad: 14px; --sh: 0 1px 2px rgba(29, 53, 87, .06), 0 8px 24px rgba(29, 53, 87, .07);
  --f: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.noscroll { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .logo span, .stats b, .getbox h2 { font-family: "PT Serif", Georgia, "Times New Roman", serif; }
a { color: var(--navy2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* шапка */
.top { position: sticky; top: 0; z-index: 40; background: rgba(245, 241, 232, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-weight: 700; font-size: 19px; white-space: nowrap; }
.logo svg { width: 26px; height: 26px; fill: var(--navy); }
.logo em { font-style: normal; color: var(--gold); }
.top nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.top nav a { color: var(--ink); text-decoration: none; opacity: .8; }
.top nav a:hover { opacity: 1; color: var(--navy2); }
@media (max-width: 860px) { .top nav { display: none; } .top .btn { margin-left: auto; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font: 600 16px/1.2 var(--f); cursor: pointer; text-decoration: none; transition: background .15s, transform .1s; }
.btn:hover { background: var(--navy2); }
.btn:active { transform: translateY(1px); }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14px; background: var(--gold); color: #fff; }
.btn.sm:hover { background: #b1802c; }
.btn:disabled { opacity: .55; cursor: default; }
.lnk { background: none; border: 0; padding: 0; color: var(--navy2); font: 600 15px var(--f); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* первый экран */
.hero { padding: 40px 0 28px; background: radial-gradient(1200px 400px at 85% -10%, rgba(196, 146, 58, .16), transparent 60%), linear-gradient(180deg, #efe8d8, var(--bg)); border-bottom: 1px solid var(--line); }
.kick { margin: 0 0 8px; color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 6.4vw, 60px); line-height: 1.05; color: var(--navy); letter-spacing: -.01em; }
.lead { margin: 14px 0 0; max-width: 760px; font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 26px; background: var(--line); border: 1px solid var(--line); border-radius: var(--rad); overflow: hidden; max-width: 860px; }
.stats > div { background: var(--paper); padding: 14px 16px; }
.stats b { display: block; font-size: clamp(20px, 3vw, 26px); color: var(--navy); line-height: 1.15; }
.stats span { font-size: 13px; color: var(--muted); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }

section { padding: 36px 0; }
h2 { margin: 34px 0 14px; font-size: clamp(25px, 3.6vw, 34px); line-height: 1.15; color: var(--navy); }
section .wrap > h2:first-child { margin-top: 0; }
.sub { margin: -6px 0 16px; color: var(--muted); }

/* фильтры и сетка */
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 6px; }
.filters select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: 15px var(--f); }
.filters select:last-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .filters { grid-template-columns: repeat(5, 1fr); } .filters select:last-child { grid-column: auto; } }
.found { margin: 6px 0 14px; color: var(--muted); font-size: 14px; min-height: 20px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--rad); overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: var(--sh); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(29, 53, 87, .08), 0 16px 34px rgba(29, 53, 87, .12); }
.card[hidden] { display: none; }
.pic { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--navy), #3f6795); overflow: hidden; }
.pic::before { content: attr(data-n); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; color: rgba(255, 255, 255, .85); font: 700 22px/1.2 "PT Serif", Georgia, serif; }
.pic img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.pic.big { aspect-ratio: 3 / 2; border-radius: var(--rad); }
.cb { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.where { font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.card h3 { margin: 2px 0 0; font-size: 22px; line-height: 1.2; color: var(--navy); }
.dev { font-size: 14px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1.25fr .8fr 1fr; gap: 8px; margin: 12px 0 10px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kv b { display: block; font-size: 15px; line-height: 1.25; }
.kv span { font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; min-height: 26px; }
.chips span { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: #f1e7d2; color: #7a5a1f; }

/* заявка */
.get { padding: 24px 0; }
.getbox { display: grid; gap: 18px; padding: 24px; border-radius: 18px; background: var(--navy); color: #fff; background-image: radial-gradient(600px 200px at 100% 0, rgba(233, 196, 122, .25), transparent 60%); }
.getbox h2 { color: #fff; margin: 0 0 6px; }
.getbox p { margin: 0; color: rgba(255, 255, 255, .8); }
.getbox .note { font-size: 11px; color: rgba(255, 255, 255, .55); margin-top: 8px; }
@media (min-width: 900px) { .getbox { grid-template-columns: 1.1fr 1fr; align-items: center; padding: 32px 36px; } }
.chs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ch { min-height: 48px; border: 0; border-radius: 10px; font: 600 15px var(--f); cursor: pointer; color: #fff; }
.ch.wa { background: #1f9d55; } .ch.tg { background: #2a8bd6; } .ch.mx { background: #6c4ce0; } .ch.ph { background: var(--gold); }
.ch:hover { filter: brightness(1.08); }

/* таблицы и текст */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--rad); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
td:first-child, th:first-child { white-space: normal; min-width: 130px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #faf6ec; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.n { text-align: right; font-variant-numeric: tabular-nums; }
.prose { max-width: 780px; }
.prose p { margin: 0 0 12px; }
.prose.narrow { padding-top: 24px; }
.prose h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 18px; }
.prose h2 { font-size: 22px; margin: 24px 0 8px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 800px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tiles a { display: flex; flex-direction: column; justify-content: space-between; min-height: 84px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-decoration: none; color: var(--ink); }
.tiles a:hover { border-color: var(--gold); }
.tiles b { font-size: 16px; color: var(--navy); }
.tiles span { font-size: 13px; color: var(--muted); }

.faq-s { border-top: 1px solid var(--line); }
.faq { display: grid; gap: 8px; max-width: 860px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 0 0 14px; color: var(--muted); }

/* страница ЖК */
.crumbs { padding-top: 14px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.zhero { padding: 18px 0 30px; border-bottom: 1px solid var(--line); }
.zhero.slim { padding-bottom: 24px; }
.zhero h1 { font-size: clamp(32px, 5.4vw, 52px); }
.zgrid { display: grid; gap: 22px; }
@media (min-width: 960px) { .zgrid { grid-template-columns: 1.05fr 1fr; align-items: start; } }
.zgrid .stats { grid-template-columns: repeat(2, 1fr); }
.acts { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 20px; }
@media (max-width: 520px) { .acts .btn { width: 100%; } }
.credit { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.credit a { color: var(--muted); }

/* шахматка */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .c { width: 16px; height: 16px; min-width: 0; padding: 0; border-radius: 4px; display: inline-block; }
.bld { margin-bottom: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--rad); }
.bld summary { cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 14px 16px; list-style: none; }
.bld summary::-webkit-details-marker { display: none; }
.bld summary b { color: var(--navy); font-size: 17px; }
.bld summary span { color: var(--muted); font-size: 14px; }
.bld[open] summary { border-bottom: 1px solid var(--line); }
.chess { display: flex; gap: 14px; overflow-x: auto; padding: 14px 16px 16px; -webkit-overflow-scrolling: touch; }
.sec { flex: 0 0 auto; }
.sh { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px 30px; }
.fl { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.fn { width: 26px; flex: 0 0 26px; text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cells { display: flex; gap: 4px; }
.c { width: 66px; height: 40px; border: 0; border-radius: 6px; padding: 2px 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 11px/1.15 var(--f); color: var(--ink); cursor: pointer; transition: transform .1s, box-shadow .1s; }
.c b { font-size: 11px; }
.c i { font-style: normal; font-size: 11px; font-variant-numeric: tabular-nums; }
.c:hover { transform: scale(1.06); box-shadow: 0 0 0 2px var(--gold); }
.c.r0 { background: var(--r0); } .c.r1 { background: var(--r1); } .c.r2 { background: var(--r2); } .c.r3 { background: var(--r3); } .c.r4 { background: var(--r4); }
.c.booked { background: repeating-linear-gradient(135deg, #ece7dc 0 5px, #e0d9ca 5px 10px); color: #9a927f; }

/* ипотека */
.calc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.calc input { height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font: 600 17px var(--f); color: var(--ink); width: 100%; }

/* подвал */
.foot { margin-top: 30px; padding: 36px 0 28px; background: #172a45; color: rgba(255, 255, 255, .78); font-size: 14px; }
.fcols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (min-width: 900px) { .fcols { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.fcols > div:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .fcols > div:first-child { grid-column: auto; } }
.fcols b { display: block; color: #fff; margin-bottom: 8px; font-family: "PT Serif", Georgia, serif; font-size: 16px; }
.fcols a { display: block; color: rgba(255, 255, 255, .78); text-decoration: none; padding: 3px 0; }
.fcols a:hover { color: var(--gold2); }
.fcols p { margin: 0; }
.legal { margin: 18px 0 0; font-size: 12px; color: rgba(255, 255, 255, .5); }

/* окно заявки */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; background: rgba(15, 25, 40, .55); }
.modal.show { display: flex; }
.sheet { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--paper); border-radius: 18px 18px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); position: relative; animation: up .25s ease-out; }
@media (min-width: 640px) { .modal { align-items: center; } .sheet { border-radius: 18px; padding: 26px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #efe8da; cursor: pointer; font-size: 15px; }
.sheet h3 { margin: 0 44px 4px 0; font-size: 22px; color: var(--navy); }
.why { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.sheet form { display: grid; gap: 10px; }
.q span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font: 14px var(--f); cursor: pointer; color: var(--ink); }
.pick button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.field { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; font: 16px var(--f); background: #fff; color: var(--ink); }
.field:focus { outline: 2px solid var(--gold2); border-color: var(--gold); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 18px; }
.err { color: #b42318; font-size: 14px; min-height: 0; }
.err:empty { display: none; }
.sheet .note { margin: 0; font-size: 11px; color: var(--muted); }
.done { text-align: center; padding: 26px 0 10px; }
.check { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; background: #1f9d55; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 420px) {
  .top .wrap { gap: 10px; }
  .logo { font-size: 17px; gap: 8px; min-width: 0; }
  .logo svg { width: 22px; height: 22px; }
  .top .btn.sm { padding: 0 12px; flex: 0 0 auto; }
}
.fl.empty .cells { min-height: 40px; }
/* ипотека */
.payline { margin: 16px 0 0; font-size: 15px; color: var(--muted); max-width: 760px; }
.payline b { color: var(--navy); }
.calcnote { margin: -6px 0 14px; font-size: 12px; color: var(--muted); }
.appr { margin: 0 0 18px; padding: 16px 18px; border-radius: var(--rad); background: var(--paper); border: 1px solid var(--gold2); display: grid; gap: 12px; }
.appr[hidden] { display: none; }
.appr p { margin: 0; }
@media (min-width: 720px) { .appr { grid-template-columns: 1fr auto; align-items: center; } }
