/* Истра Резиденс — портал жителей. Дизайн: «у реки», прохладная тональная палитра. */

/* ===== Шрифты (self-hosted woff2) ===== */
@font-face{font-family:'Manrope';font-style:normal;font-weight:200 800;font-display:swap;
  src:url(fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Manrope';font-style:normal;font-weight:200 800;font-display:swap;
  src:url(fonts/manrope-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2122,U+2191,U+2193,U+2212,U+2215}
@font-face{font-family:'Prata';font-style:normal;font-weight:400;font-display:swap;
  src:url(fonts/prata-cyrillic.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Prata';font-style:normal;font-weight:400;font-display:swap;
  src:url(fonts/prata-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2122}

:root{
  --paper:#f2f5f1; --card:#ffffff;
  --ink:#16241d; --ink-2:#3f5249; --muted:#728077;
  --brand:#1e4d45; --brand-2:#2c685e; --euc:#789e90;
  --mist:#dde7df; --line:#dde4dc;
  --free:#46a06e; --reserved:#e0a93b; --sold:#cf5b52;
  --tg:#2aabee;
  --display:'Prata',Georgia,'Times New Roman',serif;
  --sans:'Manrope',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --wrap:1180px; --rad:18px;
  --sh:0 10px 40px -18px rgba(20,45,33,.30);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);
  font-size:17px;line-height:1.65;-webkit-font-smoothing:antialiased;font-weight:400}
img,svg{display:block;max-width:100%}
a{color:var(--brand);text-decoration:none}
h1,h2,h3{margin:0;font-weight:400;letter-spacing:-.015em;text-wrap:balance}
p{margin:0}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 24px}
.wrap.narrow{max-width:760px}
.eyebrow{font-family:var(--sans);font-weight:700;font-size:.74rem;letter-spacing:.22em;
  text-transform:uppercase;color:var(--euc)}
.muted{color:var(--muted)}
.skip{position:absolute;left:-999px}
.skip:focus{left:16px;top:16px;background:#fff;padding:10px 16px;border-radius:10px;z-index:60}
:focus-visible{outline:2.5px solid var(--brand);outline-offset:3px;border-radius:4px}

/* ===== Кнопки ===== */
.btn{display:inline-flex;align-items:center;gap:9px;font-family:var(--sans);font-weight:700;
  font-size:.98rem;padding:14px 26px;border-radius:999px;border:1.5px solid transparent;
  cursor:pointer;transition:transform .15s,background .2s,color .2s,border-color .2s;white-space:nowrap}
.btn:hover{text-decoration:none;transform:translateY(-2px)}
.btn-primary{background:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-2)}
.btn-ghost{background:transparent;color:var(--ink);border-color:var(--line)}
.btn-ghost:hover{border-color:var(--brand);color:var(--brand)}
.btn-tg{background:var(--tg);color:#fff}
.btn-tg:hover{background:#1c97d6}
.btn-lg{padding:17px 34px;font-size:1.05rem}
.btn-sm{padding:10px 18px;font-size:.9rem}
.btn svg{width:18px;height:18px}

/* ===== Header ===== */
.hdr{position:sticky;top:0;z-index:50;transition:background .3s,box-shadow .3s,border-color .3s;
  border-bottom:1px solid transparent}
.hdr.scrolled{background:rgba(242,245,241,.86);backdrop-filter:blur(12px) saturate(1.3);
  border-color:var(--line)}
.hdr-in{display:flex;align-items:center;justify-content:space-between;height:74px}
.brand{display:flex;align-items:center;gap:13px}
.brand:hover{text-decoration:none}
.brand img{width:42px;height:42px;border-radius:50%}
.brand-tx{display:flex;flex-direction:column;line-height:1.05}
.brand-tx b{font-family:var(--sans);font-weight:800;font-size:1.12rem;color:var(--ink);letter-spacing:-.01em}
.brand-tx span{font-size:.68rem;letter-spacing:.2em;text-transform:uppercase;color:var(--muted)}
.nav{display:flex;align-items:center;gap:30px}
.nav a{font-weight:600;font-size:.93rem;color:var(--ink-2)}
.nav a:hover{color:var(--brand);text-decoration:none}
.nav .btn{padding:10px 20px}
/* над тёмным героем — светлый текст, после прокрутки — тёмный */
.hdr .brand-tx b{color:#fff;text-shadow:0 1px 10px rgba(0,0,0,.4)}
.hdr .brand-tx span{color:rgba(255,255,255,.72)}
.hdr .nav a:not(.btn){color:rgba(255,255,255,.92);text-shadow:0 1px 10px rgba(0,0,0,.4)}
.hdr.scrolled .brand-tx b{color:var(--ink);text-shadow:none}
.hdr.scrolled .brand-tx span{color:var(--muted)}
.hdr.scrolled .nav a:not(.btn){color:var(--ink-2);text-shadow:none}
@media(max-width:860px){.nav a:not(.btn){display:none}}

/* ===== Hero (фото-рендер) ===== */
.hero{position:relative;overflow:hidden;padding:150px 0 70px;color:#fff;margin-top:-74px}
.hero-bg{position:absolute;inset:0;z-index:0}
.hero-bg img{width:100%;height:100%;object-fit:cover;object-position:center 35%}
.hero-bg::after{content:"";position:absolute;inset:0;
  background:linear-gradient(100deg,rgba(11,26,18,.86),rgba(11,26,18,.55) 52%,rgba(11,26,18,.12)),
    linear-gradient(rgba(11,26,18,.55),rgba(11,26,18,0) 24%)}
.hero-in{position:relative;z-index:1;max-width:760px}
.hero .eyebrow{color:#c2d8cd}
.hero h1{font-family:var(--display);font-size:clamp(3rem,8.5vw,6rem);line-height:.98;
  margin:.16em 0 .28em;letter-spacing:-.02em;color:#fff}
.hero h1 em{font-style:italic;color:#e6d3a4}
.hero .lead{font-size:clamp(1.08rem,2.1vw,1.36rem);color:rgba(255,255,255,.92);max-width:580px;line-height:1.55}
.hero .btn-ghost{color:#fff;border-color:rgba(255,255,255,.55)}
.hero .btn-ghost:hover{background:rgba(255,255,255,.14);border-color:#fff;color:#fff}
.hero-cta{display:flex;flex-wrap:wrap;gap:14px;margin:34px 0 0}
.hero-stats{display:flex;flex-wrap:wrap;gap:0;margin:50px 0 0;border-top:1px solid rgba(255,255,255,.25)}
.hero-stats div{padding:22px 40px 0 0;margin-right:40px}
.hero-stats dt{font-family:var(--display);font-size:2.6rem;line-height:1;color:#fff;font-variant-numeric:tabular-nums}
.hero-stats dd{margin:.4em 0 0;font-size:.8rem;letter-spacing:.06em;color:rgba(255,255,255,.7);text-transform:uppercase}

/* ===== Gallery ===== */
.gallery{display:grid;gap:16px;grid-template-columns:2fr 1fr;grid-template-rows:222px 222px}
.gallery .g-big{grid-column:1;grid-row:1 / 3}
.gallery figure{margin:0;position:relative;border-radius:var(--rad);overflow:hidden;box-shadow:var(--sh)}
.gallery img{width:100%;height:100%;object-fit:cover;display:block}
.gallery figcaption{position:absolute;left:0;right:0;bottom:0;padding:32px 18px 15px;color:#fff;
  font-weight:700;font-size:.98rem;background:linear-gradient(transparent,rgba(9,22,14,.8))}
@media(max-width:700px){.gallery{grid-template-columns:1fr;grid-template-rows:none}
  .gallery .g-big{grid-column:auto;grid-row:auto}.gallery figure{height:210px}}

/* ===== Sections ===== */
.sec{padding:84px 0;position:relative}
.sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;
  flex-wrap:wrap;margin-bottom:40px}
.sec-head h2{font-family:var(--display);font-size:clamp(1.9rem,4vw,2.9rem);line-height:1.05}
.sec-head .eyebrow{display:block;margin-bottom:14px}
.sec-divider{border:0;border-top:1px solid var(--line);margin:0}
.more{font-weight:700;font-size:.92rem;color:var(--brand);white-space:nowrap}

/* intro / about */
.about{font-family:var(--display);font-size:clamp(1.4rem,3vw,2.05rem);line-height:1.4;
  color:var(--ink);max-width:900px}
.about em{font-style:italic;color:var(--brand)}
.sec-tint{background:#eef2ec}
.btn-white{background:#fff;color:var(--brand)}
.btn-white:hover{background:#e7efe8}
.map-intro{font-family:var(--sans);font-size:1.05rem;color:var(--ink-2);max-width:680px;margin-bottom:26px}
#zoom-reset{font-size:.95rem}

/* ===== News ===== */
.news{display:grid;gap:0;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.news article{padding:30px;border-left:1px solid var(--line)}
.news article:first-child{border-left:0;padding-left:0}
.news time{font-weight:700;font-size:.76rem;letter-spacing:.12em;text-transform:uppercase;color:var(--euc)}
.news h3{font-family:var(--display);font-size:1.5rem;margin:14px 0 10px;line-height:1.15}
.news p{color:var(--ink-2);font-size:.97rem}
@media(max-width:680px){.news article{border-left:0;border-top:1px solid var(--line);padding:26px 0}
  .news article:first-child{border-top:0}}

/* ===== Map / Генплан ===== */
.map-sec{background:#eef2ec}
.legend{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 22px}
.lg{display:inline-flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--line);
  border-radius:999px;padding:9px 17px;font-weight:600;font-size:.92rem;color:var(--ink);cursor:pointer;
  transition:box-shadow .15s,opacity .15s}
.lg i{width:13px;height:13px;border-radius:4px}
.lg b{font-weight:800;font-variant-numeric:tabular-nums}
.lg i{border-radius:999px}
.lg-free i{background:#3faa5e}.lg-reserved i{background:#e3b23c}.lg-sold i{background:#d65a52}.lg-house i{background:#52b3d4}
.lg[aria-pressed=true]{box-shadow:0 0 0 2px var(--brand)}
.lg.dim{opacity:.4}
.map-grid{display:grid;grid-template-columns:1fr;gap:20px}
@media(min-width:820px){.map-grid{grid-template-columns:1fr 300px}}
.map-frame{position:relative;background:var(--card);border:1px solid var(--line);
  border-radius:var(--rad);box-shadow:var(--sh);overflow:hidden;align-self:start}
.map-frame svg#genplan{width:100%;height:auto;display:block;background:#eef2ea;touch-action:none;cursor:grab}
.map-frame svg#genplan.grabbing{cursor:grabbing}
.map-loading{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted)}
.map-ctrl{position:absolute;right:14px;bottom:14px;display:flex;flex-direction:column;gap:7px;z-index:3}
.map-ctrl button{width:40px;height:40px;border:1px solid var(--line);background:rgba(255,255,255,.95);
  border-radius:12px;font-size:1.3rem;font-weight:700;color:var(--brand);cursor:pointer;line-height:1;
  display:grid;place-items:center;box-shadow:var(--sh)}
.map-ctrl button:hover{background:#fff;border-color:var(--brand)}
/* участки = кружки на аэроплане */
.plot-g{cursor:pointer}
.pin-ring{fill:#fff;fill-opacity:.92;transition:fill-opacity .15s}
.pin{stroke:#fff;stroke-width:1;transition:transform .12s;transform-box:fill-box;transform-origin:center}
.pin-t{font-family:var(--sans);font-weight:800;fill:#fff;text-anchor:middle;dominant-baseline:central;
  pointer-events:none;paint-order:stroke;stroke:rgba(0,0,0,.28);stroke-width:.5}
.plot-g:hover .pin-ring{fill-opacity:1}
.plot-g:hover .pin{stroke-width:1.6}
.plot-g.sel .pin-ring{fill:#10211a}
.plot-g.sel .pin{stroke:#fff;stroke-width:1.8}
.plot-g.hide{display:none}
/* инфраструктура */
.obj-g{cursor:pointer}
.obj-bg{fill:#fff;fill-opacity:.94;stroke:#1e4d45;stroke-width:1.2}
.obj-ic{fill:none;stroke:#1e4d45;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.obj-dot{fill:#1e4d45;pointer-events:none}
.obj-g:hover .obj-bg,.obj-g.sel .obj-bg{stroke-width:2;fill:#fff;fill-opacity:1}
.map-info{background:var(--card);border:1px solid var(--line);border-radius:var(--rad);
  box-shadow:var(--sh);padding:24px;position:relative}
@media(min-width:820px){.map-info{position:sticky;top:90px;align-self:start}}
.map-info .empty{color:var(--muted);font-size:.95rem}
.mi-close{position:absolute;top:12px;right:14px;border:0;background:none;font-size:1.5rem;
  color:var(--muted);cursor:pointer;line-height:1}
.mi-badge{display:inline-block;font-weight:800;font-size:.72rem;text-transform:uppercase;
  letter-spacing:.06em;padding:5px 12px;border-radius:999px;margin-bottom:12px}
.mi-badge.free{background:#e2f4e9;color:#1c7a45}
.mi-badge.reserved{background:#fbf0d4;color:#8a6608}
.mi-badge.sold{background:#fae1df;color:#a23a31}
.mi-badge.house{background:#e0f1f7;color:#1f7491}
.mi-badge.obj{background:#e9efe9;color:#1e4d45}
.mi-num{font-family:var(--display);font-size:1.7rem;margin-bottom:16px}
.mi-desc{color:var(--ink);font-size:.95rem;line-height:1.55;margin-bottom:4px}
[hidden]{display:none!important}
.mi-dl div{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.mi-dl dt{color:var(--muted)}.mi-dl dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;text-align:right}
.mi-comms{margin:16px 0 4px}
.mi-comms-t{display:block;font-size:.74rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:9px}
.mi-comms ul{list-style:none;display:flex;flex-wrap:wrap;gap:7px}
.mi-comms li{background:#eef3ee;border:1px solid var(--line);border-radius:999px;padding:5px 11px;font-size:.82rem;color:var(--brand);font-weight:600}
#mi-link{margin-top:18px;width:100%;justify-content:center}
.map-foot{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;
  margin-top:18px;font-size:.86rem;color:var(--muted)}

/* ===== Info / Полезное ===== */
.info{display:grid;gap:1px;background:var(--line);border:1px solid var(--line);
  border-radius:var(--rad);overflow:hidden;grid-template-columns:repeat(auto-fit,minmax(270px,1fr))}
.info .cell{background:var(--paper);padding:30px}
.info .ic{width:30px;height:30px;color:var(--brand);margin-bottom:16px;stroke-width:1.6}
.info h3{font-family:var(--sans);font-weight:800;font-size:1.12rem;margin-bottom:8px}
.info p{color:var(--ink-2);font-size:.95rem;margin:.2em 0}
.info .contact a{font-weight:700}

/* ===== FAQ ===== */
.faq details{border-top:1px solid var(--line);padding:6px 0}
.faq details:last-child{border-bottom:1px solid var(--line)}
.faq summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:18px;
  align-items:center;padding:22px 4px;font-family:var(--sans);font-weight:700;font-size:1.12rem}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"";width:13px;height:13px;flex:none;
  border-right:2px solid var(--euc);border-bottom:2px solid var(--euc);
  transform:rotate(45deg);transition:transform .25s;margin-right:6px}
.faq details[open] summary::after{transform:rotate(-135deg)}
.faq p{color:var(--ink-2);padding:0 4px 22px;max-width:70ch}
.faq-cta{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-top:36px}
.faq-cta p{font-family:var(--display);font-size:1.5rem}

/* ===== TG band ===== */
.tg{background:var(--brand);color:#fff;border-radius:calc(var(--rad)*1.4);padding:54px;
  display:flex;align-items:center;justify-content:space-between;gap:30px;flex-wrap:wrap}
.tg h2{font-family:var(--display);font-size:clamp(1.7rem,3.4vw,2.5rem);margin-bottom:.3em}
.tg p{color:#cfe0da;max-width:520px}

/* ===== Buy ===== */
.buy{text-align:center;max-width:720px;margin:0 auto}
.buy h2{font-family:var(--display);font-size:clamp(2rem,4.4vw,3rem);margin-bottom:.4em}
.buy p{color:var(--ink-2);margin-bottom:30px;font-size:1.08rem}

/* ===== Footer ===== */
.ftr{background:var(--ink);color:#b9c8bf;padding:50px 0 36px}
.ftr-in{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap;align-items:center}
.ftr-brand{display:flex;align-items:center;gap:12px;color:#fff;font-weight:800;font-size:1.1rem}
.ftr-brand img{width:38px;height:38px;border-radius:50%}
.ftr-nav{display:flex;gap:22px;flex-wrap:wrap}
.ftr-nav a{color:#b9c8bf;font-size:.93rem}
.ftr-nav a:hover{color:#fff}
.ftr-copy{width:100%;border-top:1px solid rgba(255,255,255,.12);margin-top:30px;padding-top:22px;
  font-size:.84rem;color:#7e9085}

/* ===== Reveal (включается только при наличии JS, иначе контент виден) ===== */
.js .reveal{opacity:0;transform:translateY(22px);transition:opacity .7s ease,transform .7s ease}
.js .reveal.in{opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){
  *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
  .js .reveal{opacity:1;transform:none}
}
