/* =========================================================
   ГАГИНО — стили
   Сетка: .container 1640 / padding-inline 10
   Шрифт: Onest (локально, assets/fonts) — 400/500/700/800
   ========================================================= */

@font-face{font-family:"Onest";font-weight:400;font-display:swap;src:url(../fonts/Onest-400-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Onest";font-weight:400;font-display:swap;src:url(../fonts/Onest-400-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Onest";font-weight:500;font-display:swap;src:url(../fonts/Onest-500-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Onest";font-weight:500;font-display:swap;src:url(../fonts/Onest-500-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Onest";font-weight:700;font-display:swap;src:url(../fonts/Onest-700-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Onest";font-weight:700;font-display:swap;src:url(../fonts/Onest-700-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Onest";font-weight:800;font-display:swap;src:url(../fonts/Onest-800-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Onest";font-weight:800;font-display:swap;src:url(../fonts/Onest-800-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

:root{
  /* фон — не белый, чуть серее */
  --bg: #eceef1;
  --bg-2: #e4e7ea;

  --ink: #161b1e;
  --ink-2: #5b666d;
  --white: #fff;

  --green: #1f4a37;
  --green-600: #17624a;

  /* стекло */
  --glass-bg: rgba(255,255,255,.55);
  --glass-brd: rgba(255,255,255,.65);
  --glass-blur: 14px;
  --glass-shadow: 0 18px 50px rgba(16,28,24,.10);

  --radius: 26px;
  --radius-pill: 999px;

  --header-h: 84px;
  --section-y: clamp(54px, 5.4vw, 96px);
  --container: 1640px;
  --pad: 10px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

*,*::before,*::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; overflow-x: clip; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior: auto; } }

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,h2,h3,p,ul,figure{ margin: 0; }
ul{ padding: 0; list-style: none; }
img{ display: block; max-width: 100%; height: auto; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; color: inherit; }

:where(a,button,input,summary):focus-visible{
  outline: 2px solid var(--white);
  outline-offset: 3px;
  border-radius: 8px;
}

.container{
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link{
  position: fixed; top: 8px; left: 8px; z-index: 999;
  padding: 10px 16px; border-radius: 12px;
  background: var(--white); color: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus{ transform: none; }

.ico{ width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico--sm{ width: 18px; height: 18px; }
.sprite{ position: absolute; width: 0; height: 0; overflow: hidden; }

/* ===== Стеклянный примитив ===== */
.glass{
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}

.new-text{
  padding-top: 10px;
    border-top: 1px solid #fff;
    font-size: 20px;
    margin-top: 45px !important;
    font-weight: 800;

}

@media (max-width: 800px){
  .new-text{

    font-size: 14px;
    margin-top: 30px !important;
 

}
}
/* на фото/тёмном фоне */
.glass--dark{
  --glass-bg: rgba(255,255,255,.12);
  --glass-brd: rgba(255,255,255,.28);
  box-shadow: 0 18px 50px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.3);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .glass{ background: rgba(255,255,255,.94); }
  .glass--dark{ background: rgba(20,28,26,.62); }
}

/* ===== Кнопки ===== */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 32px;
  border: 0; border-radius: var(--radius-pill);
  font-weight: 700; letter-spacing: .01em; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: translateY(0); }

/* прозрачная с обводкой — как в референсе */
.btn--outline{
  color: var(--white);
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.75);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  font-size: .95rem;
  letter-spacing: .08em;
  min-height: 62px;
  padding-inline: 46px;
}
.btn--outline:hover{ background: rgba(255,255,255,.2); border-color: #fff; }

.btn--solid{ background: var(--white); color: var(--ink); }
.btn--solid:hover{ background: #f2f5f4; }

/* =========================================================
   HEADER
   ========================================================= */
/* сперва шапка едет вместе с хиро, прилипает только под конец — класс ставит JS */
.header{
  position: absolute; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  color: var(--white);
  transition: background-color .3s var(--ease), translate .42s var(--ease);
}
.header__inner{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
/* display:contents отдаёт список и телефон прямо в сетку шапки —
   так меню центрируется, а телефон прижат вправо, без дублей в разметке */
.nav{ display: contents; }
.nav__list{ justify-self: center; }
.nav__phone{ justify-self: end; }

/* при скролле — стеклянная подложка */
.header.is-stuck{
  position: fixed;
  height: 68px;
  animation: headerDrop .34s var(--ease) both;
  /* свой композиторный слой: иначе стекло мерцает над iframe карты */
  transform: translateZ(0);
  backface-visibility: hidden;
  background: rgba(22,30,27,.38);
  box-shadow: 0 10px 34px rgba(10,20,16,.18);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

@keyframes headerDrop{
  from{ transform: translateY(-100%); }
  to{ transform: none; }
}
/* у подвала шапка уезжает — она там уже не нужна.
   Двигаем через translate, а не transform: transform занят анимацией въезда,
   и её снятие давало скачок вместо плавного ухода */
.header.is-hidden{ translate: 0 -110%; }
@media (prefers-reduced-motion: reduce){
  .header.is-stuck{ animation: none; }
  .header.is-hidden{ transition: none; }
}

.logo{
  display: inline-flex; align-items: center; gap: 11px;
  font-weight: 800; font-size: 1.5rem; letter-spacing: .1em;
}
.logo img{ width: 40px; height: 40px; flex: none; }

.nav__list{ display: flex; align-items: center; gap: 34px; font-size: .98rem; }
.nav__list a{ position: relative; padding-block: 6px; opacity: .92; transition: opacity .2s; }
.nav__list a::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__list a:hover{ opacity: 1; }
.nav__list a:hover::after{ transform: scaleX(1); }

.nav__phone{ display: inline-flex; align-items: center; gap: 9px; font-weight: 700; white-space: nowrap; }

.burger{
  display: none; width: 46px; height: 46px; padding: 0;
  background: none; border: 0; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 6px;
}
.burger__bar{ display: block; width: 26px; height: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] .burger__bar:nth-child(1){ transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bar:nth-child(2){ transform: translateY(-4px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero{
  scroll-margin-top: 0;
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  /* clip, а не hidden: обрезает фон, но не ломает sticky внутри */
  overflow: clip;
  color: var(--white);
  view-timeline-name: --hero-view;
}

/* фон стоит на месте, пока хиро уезжает вверх */
.hero__media{
  position: sticky; top: 0; z-index: -2;
  width: 100%; height: 100svh;
  margin-bottom: -100svh;
  overflow: clip;
}
.hero__img{ width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
/* и чуть наезжает при уходе секции */
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion: no-preference){
    .hero__img{
      animation: heroZoom linear both;
      /* сам фон прилипший и во вьюпорте не двигается — считаем по секции */
      animation-timeline: --hero-view;
      animation-range: exit 0% exit 100%;
    }
    @keyframes heroZoom{
      from{ transform: scale(1); }
      to{ transform: scale(1.16); }
    }
  }
}

/* затемнение: сверху и снизу плотнее, чтобы читались хедер и нижняя строка */
.hero::before{
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,18,15,.55) 0%, rgba(10,18,15,.18) 26%, rgba(10,18,15,.26) 62%, rgba(10,18,15,.62) 100%),
    radial-gradient(120% 75% at 50% 45%, rgba(10,18,15,.06) 0%, rgba(10,18,15,.42) 100%);
}

.hero__inner{
  flex: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding-top: var(--header-h);
}

/* огромный полупрозрачный заголовок */
.hero__title{
  font-weight: 800;
  font-size: min(19.4vw, 18rem);
  line-height: .95;
  letter-spacing: -.005em;
  color: rgba(255,255,255,.62);
  text-shadow: 0 2px 40px rgba(255,255,255,.18), 0 10px 60px rgba(10,20,16,.25);
  margin-bottom: clamp(18px, 2.4vw, 34px);
}

.hero__lead{
  font-size: clamp(1.05rem, 1.55vw, 1.6rem);
  font-weight: 500;
  max-width: 48ch;
  margin-bottom: clamp(26px, 3vw, 44px);
  text-shadow: 0 2px 18px rgba(10,20,16,.45);
}
.hero__lead b{ font-weight: 800; }

/* нижняя строка: локация слева, подсказка скролла справа */
.hero__foot{
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-bottom: clamp(26px, 3.4vw, 48px);
  font-size: .96rem;
}
.hero__place{ display: inline-flex; align-items: center; gap: 10px; text-shadow: 0 2px 14px rgba(10,20,16,.5); }
.hero__scroll{ display: inline-flex; align-items: center; gap: 10px; opacity: .85; }
.hero__scroll .ico{ animation: nudge 2s var(--ease) infinite; }
@keyframes nudge{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce){ .hero__scroll .ico{ animation: none; } }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 1100px){
  .nav__list{ gap: 22px; }
}

@media (max-width: 900px){
  :root{ --header-h: 70px; }
  .burger{ display: flex; }

  .header__inner{ display: flex; justify-content: space-between; }

  /* меню на весь экран, фон под ним размывается */
  .nav{
    position: fixed; inset: 0;
    height: 100dvh;
    display: flex; flex-direction: column; justify-content: center; gap: 0;
    padding: calc(var(--header-h) + 20px) 24px 32px;
    /* фон плотный сам по себе: размытие поддерживается не везде,
       а без него меню просвечивало насквозь */
    background: rgba(11,17,14,.95);
    -webkit-backdrop-filter: blur(26px) saturate(140%);
    backdrop-filter: blur(26px) saturate(140%);
    opacity: 0; visibility: hidden;
    transition: opacity .32s var(--ease), visibility .32s;
    z-index: -1;
  }
  .nav.is-open{ opacity: 1; visibility: visible; }

  .nav__list{ flex-direction: column; align-items: stretch; gap: 0; font-size: 1.32rem; }
  .nav__list a{
    display: block; padding: 17px 4px;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .nav__list a::after{ display: none; }
  .nav__phone{ margin-top: 26px; justify-content: flex-start; padding-left: 4px; font-size: 1.1rem; }

  /* пункты проявляются по очереди */
  .nav__list li,
  .nav__phone{
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .42s var(--ease), transform .42s var(--ease);
  }
  .nav.is-open :is(.nav__list li, .nav__phone){ opacity: 1; transform: none; }
  .nav.is-open .nav__list li:nth-child(1){ transition-delay: .07s; }
  .nav.is-open .nav__list li:nth-child(2){ transition-delay: .12s; }
  .nav.is-open .nav__list li:nth-child(3){ transition-delay: .17s; }
  .nav.is-open .nav__list li:nth-child(4){ transition-delay: .22s; }
  .nav.is-open .nav__list li:nth-child(5){ transition-delay: .27s; }
  .nav.is-open .nav__list li:nth-child(6){ transition-delay: .32s; }
  .nav.is-open .nav__phone{ transition-delay: .38s; }

  /* страница под открытым меню не прокручивается */
  html.is-menu-open,
  html.is-menu-open body{ overflow: hidden; overscroll-behavior: none; }

  @media (prefers-reduced-motion: reduce){
    .nav__list li, .nav__phone{ transition: none; transform: none; opacity: 1; }
  }

  /* на телефоне хиро ниже: фон и его sticky-высота идут вместе с секцией */
  .hero{ min-height: 75svh; }
  .hero__media{ height: 75svh; margin-bottom: -75svh; }
  .hero__foot{ font-size: .88rem; }
  .hero__scroll span{ display: none; }
}

@media (max-width: 560px){
  body{ font-size: 16px; }
  .hero__title{ font-size: 19vw; }
  .hero__lead{ max-width: 24ch; }
  .btn--outline{ min-height: 56px; padding-inline: 32px; font-size: .88rem; }
  .hero__place span{ max-width: 18ch; }
}

/* =========================================================
   Общее для секций
   ========================================================= */
.section{
  position: relative;
  padding-block: var(--section-y);
  /* якорь целится в секцию, а видеть нужно заголовок: вычитаем её верхний отступ */
  scroll-margin-top: calc(var(--header-h) - var(--section-y) + 26px);
}

.eyebrow{
  text-align: center;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: clamp(10px, 1vw, 15px);
}

.section__title{
  text-align: center;
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.section__lead{
  max-width: 62ch;
  margin: clamp(12px, 1.2vw, 18px) auto 0;
  text-align: center;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.15vw, 1.2rem);
}

.rule{
  border: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(22,27,30,.16) 12%, rgba(22,27,30,.16) 88%, transparent);
  margin: clamp(24px, 2.6vw, 42px) 0 0;
}

/* =========================================================
   О ПОСЁЛКЕ — фото-карточки
   ========================================================= */
.features{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 1.5vw, 26px);
  margin-top: clamp(20px, 2.2vw, 34px);
}

.feature{
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-2);
}
.feature__img{
  width: 100%; height: 100%;
  aspect-ratio: 16 / 10.5;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.feature:hover .feature__img{ transform: scale(1.035); }
@media (prefers-reduced-motion: reduce){ .feature__img{ transition: none; } .feature:hover .feature__img{ transform: none; } }

/* затемнение снизу — чтобы плашка держалась на любом кадре */
.feature::after{
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,18,15,.34) 0%, rgba(10,18,15,0) 34%, rgba(10,18,15,0) 46%, rgba(10,18,15,.55) 100%);
}

/* чипы с фактами поверх фото */
.feature__chips{
  position: absolute; z-index: 2;
  top: clamp(14px, 1.3vw, 22px); left: clamp(14px, 1.3vw, 22px); right: clamp(14px, 1.3vw, 22px);
  display: flex; flex-wrap: wrap; gap: 8px;
  color: var(--white);
}
.chip{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: var(--radius-pill);
  font-size: .87rem; font-weight: 600; white-space: nowrap;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
}

/* стеклянная плашка снизу */
.feature__plate{
  position: absolute; z-index: 2;
  left: clamp(14px, 1.3vw, 22px); right: clamp(14px, 1.3vw, 22px); bottom: clamp(14px, 1.3vw, 22px);
  padding: clamp(18px, 1.7vw, 28px);
  border-radius: calc(var(--radius) - 8px);
  color: var(--white);
}
.feature__title{
  font-size: clamp(1.35rem, 1.9vw, 2rem);
  font-weight: 700; letter-spacing: -.01em;
  margin-bottom: 8px;
}
.feature__text{ font-size: clamp(.94rem, 1vw, 1.04rem); line-height: 1.5; color: rgba(255,255,255,.88); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .chip{ background: rgba(20,28,26,.7); }
}

@media (max-width: 900px){
  .features{ grid-template-columns: 1fr; }
  .feature__img{ aspect-ratio: 16 / 11; }
}
@media (max-width: 560px){
  /* на телефоне карточка не должна занимать весь экран */
  .feature__img{ aspect-ratio: 4 / 3; }
  .feature__plate{ padding: 14px 16px; }
  .feature__title{ font-size: 1.22rem; margin-bottom: 5px; }
  .feature__text{ font-size: .88rem; line-height: 1.42; }
  .chip{ font-size: .78rem; padding: 6px 11px; }
}

/* =========================================================
   КОММУНИКАЦИИ — карточки на фото улицы
   ========================================================= */
.comms{
  position: relative; isolation: isolate;
  /* clip, а не hidden: обрезает фон границами секции, но не создаёт
     скролл-контейнер, поэтому sticky внутри продолжает работать */
  overflow: clip;
  width: 100vw; margin-inline: calc(50% - 50vw);
  color: var(--white);
  view-timeline-name: --comms-view;
}
/* отступы уводим на контент, иначе фон начинается ниже верха секции */
.comms{ padding-block: 0; }
.comms > .container{ width: 100%; padding-block: var(--section-y); }
/* фон прилипает к вьюпорту, пока секция проходит мимо: sticky + отрицательный
   margin убирает его из потока, обрезка живёт на overflow: clip у секции */
.comms__media{
  position: sticky; top: 0; z-index: -2;
  width: 100%; height: 100vh;
  margin-bottom: -100vh;
  overflow: clip;
}
.comms__bg{
  width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 42%;
  transform-origin: 50% 50%;
}
/* и чуть наезжает, пока секция в кадре */
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion: no-preference){
    .comms__bg{
      animation: commsZoom linear both;
      animation-timeline: --comms-view;
      animation-range: entry 0% exit 100%;
    }
    @keyframes commsZoom{
      from{ transform: scale(1); }
      to{ transform: scale(1.14); }
    }
  }
}
/* затемняем ровно настолько, чтобы читался текст, но улица осталась видна */
.comms::before{
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8,14,12,.72) 0%, rgba(8,14,12,.4) 32%, rgba(8,14,12,.45) 68%, rgba(8,14,12,.72) 100%),
    linear-gradient(90deg, rgba(8,14,12,.45) 0%, rgba(8,14,12,.05) 55%);
}

.comms .eyebrow{ text-align: left; color: rgba(255,255,255,.62); }
.comms .section__title{ text-align: left; max-width: 18ch; }
.comms .section__lead{ margin-inline: 0; text-align: left; color: rgba(255,255,255,.78); }
.comms .rule{
  background: linear-gradient(90deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.1) 60%, transparent);
}

.tiles{
  display: grid;
  /* плиток четыре — раскладываем 2 × 2 */
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 1.1vw, 18px);
  margin-top: clamp(20px, 2.2vw, 34px);
}

.tile{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px; row-gap: 10px;
  padding: clamp(18px, 1.5vw, 26px);
  border-radius: var(--radius);
  transition: transform .35s var(--ease), background-color .35s var(--ease);
}
.tile:hover{ transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce){ .tile, .tile:hover{ transition: none; transform: none; } }

.tile__ico{
  grid-row: span 2;
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--white);
}
.tile__ico .ico{ width: 24px; height: 24px; stroke-width: 1.5; }

.tile__head{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; align-self: center; min-height: 52px; }
.tile__title{ font-size: clamp(1.08rem, 1.2vw, 1.3rem); font-weight: 700; letter-spacing: -.01em; }

.tile__note{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 8px;
  border-radius: var(--radius-pill);
  font-size: .76rem; font-weight: 600; white-space: nowrap;
  background: rgba(120,214,170,.16);
  color: #9fe3c0;
}
.tile__note--soon{ background: rgba(255,214,120,.14); color: #f0cf8e; }
.tile__note .ico{ width: 13px; height: 13px; stroke-width: 2.2; }

.tile__text{
  grid-column: 2;
  color: rgba(255,255,255,.74);
  font-size: clamp(.92rem, .95vw, 1rem);
  line-height: 1.5;
}

@media (max-width: 680px){
  .tiles{ grid-template-columns: 1fr; }
  .comms .section__title{ max-width: none; }
}

/* =========================================================
   НАШИ ДОМА
   ========================================================= */
.houses__head{
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr);
  gap: clamp(24px, 3vw, 60px);
  align-items: start;
}
.houses__eyebrow{ text-align: left; margin: 0; }

.houses__title{
  grid-column: 2;
  text-align: right;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 2.9vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.houses__title em{ font-style: normal; color: var(--green-600); }

.houses__meta{
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 3vw, 54px);
  align-items: center;
  margin-top: clamp(26px, 3vw, 46px);
}
.houses__intro{ color: var(--ink-2); font-size: clamp(.96rem, 1vw, 1.05rem); max-width: 68ch; }

.price{ justify-self: end; text-align: right; }
.price__num{
  font-size: clamp(1.5rem, 2.2vw, 2.3rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
  color: var(--green-600);
  white-space: nowrap;
}
.price__cap{ color: var(--ink-2); font-size: .9rem; margin-top: 4px; }
.houses__intro a{ color: var(--green-600); text-decoration: underline; text-underline-offset: 3px; }

/* ===== фото дома: крупный кадр и миниатюры ===== */
.gal{ margin-top: clamp(24px, 2.6vw, 44px); }

.gal__main{ margin: 0; }
.gal__main .zoom{
  display: block; width: 100%; padding: 0; border: 0; background: none;
  position: relative; overflow: hidden; cursor: zoom-in;
  border-radius: var(--radius);
}
.gal__main img{
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  transition: transform .7s var(--ease);
}
.gal__main .zoom:hover img{ transform: scale(1.02); }

.zoom__badge{
  position: absolute; z-index: 1;
  right: clamp(12px, 1.2vw, 20px); bottom: clamp(12px, 1.2vw, 20px);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-pill);
  font-size: .86rem; font-weight: 600;
  color: var(--white);
  background: rgba(10,18,15,.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.gal__cap{ margin-top: 14px; font-weight: 700; font-size: clamp(1rem, 1.1vw, 1.16rem); }

.gal__thumbs{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 13vw, 200px), 1fr));
  gap: clamp(10px, 1vw, 16px);
  margin-top: clamp(14px, 1.4vw, 22px);
}

.shot{
  display: block; width: 100%; padding: 0; border: 0; background: none;
  text-align: left; cursor: zoom-in;
}
.shot img{
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: calc(var(--radius) - 10px);
  transition: transform .5s var(--ease), opacity .3s var(--ease);
}
.shot:hover img{ transform: scale(1.03); opacity: .92; }
.shot__title{
  display: block; margin-top: 9px;
  font-size: .9rem; color: var(--ink-2);
}
@media (prefers-reduced-motion: reduce){
  .gal__main img, .shot img{ transition: none; }
  .gal__main .zoom:hover img, .shot:hover img{ transform: none; }
}

/* ===== видео + параметры в одну строку ===== */
.houses__media{
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr);
  gap: clamp(16px, 1.6vw, 28px);
  align-items: stretch;
  margin-top: clamp(40px, 5vw, 86px);
}

.video{
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.video__el{ display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video__poster{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video__overlay{
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  background:
    radial-gradient(38% 38% at 50% 50%, rgba(8,16,12,.42) 0%, transparent 72%),
    linear-gradient(180deg, rgba(10,18,15,.1), rgba(10,18,15,.34));
}
.video__play{
  position: relative;
  width: clamp(76px, 6.4vw, 116px); aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 22px 60px rgba(8,16,12,.42), 0 0 0 10px rgba(255,255,255,.12);
  transition: transform .35s var(--ease), background-color .35s var(--ease);
}
/* два расходящихся кольца — лёгкая пульсация */
.video__play::before,
.video__play::after{
  content: ""; position: absolute; inset: -1px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.8);
  /* только transform и opacity — их браузер крутит на композиторе, без рывков */
  animation: playPulse 3.6s cubic-bezier(.24,.62,.3,1) infinite;
  will-change: transform, opacity;
  pointer-events: none;
}
.video__play::after{ animation-delay: 1.8s; }
@keyframes playPulse{
  0%   { transform: scale(1);    opacity: 0; }
  14%  { opacity: .5; }
  100% { transform: scale(1.95); opacity: 0; }
}
.video__overlay:hover .video__play{ transform: scale(1.08); background: #fff; }
.video__play svg{
  width: 33%; height: 33%; margin-left: 7%;
  fill: currentColor; stroke: currentColor;
  stroke-width: 1.2; stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce){
  .video__play::before, .video__play::after{ animation: none; opacity: 0; }
  .video__overlay:hover .video__play{ transform: none; }
}

.video__label{
  position: absolute; left: clamp(16px, 1.6vw, 28px); bottom: clamp(16px, 1.6vw, 28px);
  color: var(--white); font-weight: 600; font-size: .96rem;
  text-shadow: 0 2px 14px rgba(10,20,16,.5);
}
/* при запуске убираем и подпись — она налезала на контролы плеера */
.video.is-playing .video__overlay,
.video.is-playing .video__poster,
.video.is-playing .video__label{ display: none; }

/* ===== параметры дома ===== */
.specs{
  display: flex; flex-direction: column;
  padding: clamp(22px, 2vw, 34px);
  border-radius: var(--radius);
}
.specs__title{ font-size: clamp(1.3rem, 1.7vw, 1.8rem); font-weight: 700; margin-bottom: clamp(16px, 1.6vw, 26px); }
.specs__list{
  display: flex; flex-direction: column; justify-content: space-between;
  flex: 1; margin: 0;
}
.specs__row{
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: clamp(9px, .85vw, 15px) 0;
  border-bottom: 1px solid rgba(22,27,30,.1);
  font-size: clamp(.9rem, .95vw, 1rem);
}
.specs__row:last-child{ border-bottom: 0; }
.specs__row dt{ color: var(--ink-2); flex: none; }
.specs__row dd{ margin: 0; font-weight: 600; text-align: right; }

@media (max-width: 900px){
  .houses__head{ grid-template-columns: 1fr; }
  .houses__title{ grid-column: 1; text-align: left; }
  /* промежуток сетки и собственный отступ блока складывались в двойной разрыв */
  .houses__head{ gap: 20px; }
  .houses__meta{ grid-template-columns: 1fr; gap: 20px; margin-top: 0; }
  /* на телефоне стрелки уходят влево, к началу ленты */
  .houses__intro, .houses__meta .price{ grid-column: 1 / -1; }
  .price{ justify-self: start; text-align: left; }
  .houses__media{ grid-template-columns: 1fr; }
}

/* =========================================================
   ЛАЙТБОКС
   ========================================================= */
.lb{
  width: min(94vw, 1500px); max-width: none;
  padding: 0; border: 0; background: none;
  overflow: visible;
  color: var(--white);
}
/* появление и уход окна: transition + allow-discrete, без JS-таймеров.
   Двигаем картинку, а не сам диалог: transform на нём создаёт систему
   координат для fixed-кнопок, и в конце анимации они прыгали к краям окна */
.lb{
  opacity: 0;
  transition:
    opacity .34s var(--ease),
    overlay .34s allow-discrete,
    display .34s allow-discrete;
}
.lb[open]{ opacity: 1; }
@starting-style{
  .lb[open]{ opacity: 0; }
}

.lb__img{
  transform: scale(.94) translateY(14px);
  transition: transform .46s var(--ease);
}
.lb[open] .lb__img{ transform: none; }
@starting-style{
  .lb[open] .lb__img{ transform: scale(.94) translateY(14px); }
}

/* кнопки проявляются следом, уже на своих местах */
.lb__btn{ opacity: 0; transition: opacity .3s var(--ease) .12s, background-color .25s var(--ease); }
.lb[open] .lb__btn{ opacity: 1; }

.lb::backdrop{
  background: rgba(8,14,12,.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .38s var(--ease), overlay .38s allow-discrete, display .38s allow-discrete;
}
.lb[open]::backdrop{ opacity: 1; }
@starting-style{
  .lb[open]::backdrop{ opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .lb, .lb::backdrop, .lb__img, .lb__btn{ transition: none; }
  .lb__img{ transform: none; }
}
.lb__img{ width: auto; max-width: 100%; max-height: 86vh; margin-inline: auto; border-radius: 16px; }
.lb__btn{
  position: absolute; display: grid; place-items: center;
  width: 54px; height: 54px; padding: 0;
  border: 1px solid rgba(255,255,255,.3); border-radius: 50%;
  background: rgba(255,255,255,.14); color: var(--white); cursor: pointer;
  transition: background-color .25s var(--ease);
}
.lb__btn:hover{ background: rgba(255,255,255,.28); }
/* кнопки крепим к окну: при широкой картинке вынос за края диалога обрезался */
.lb__btn--prev,
.lb__btn--next{ position: fixed; top: 50%; translate: 0 -50%; }
.lb__btn--prev{ left: 26px; }
.lb__btn--next{ right: 26px; }
.lb__btn--close{ position: fixed; top: 24px; right: 24px; }
html:has(dialog[open]){ overflow: hidden; }

@media (max-width: 1100px){
  .lb{ width: 96vw; }
  .lb__btn--prev{ left: 8px; }
  .lb__btn--next{ right: 8px; }
  .lb__btn--close{ top: 8px; right: 8px; }
}

@media (max-width: 640px){
}

/* вертикальный кадр в горизонтальной карусели — показываем верх */
.shot__img--tall{ object-position: 50% 28%; }

/* =========================================================
   ГЕНПЛАН — фон на всю секцию
   ========================================================= */
.plan{
  --zoom: 3.2;
  --lens: min(28vw, 460px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* выходим за контейнер на всю ширину экрана */
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  min-height: min(84vh, 860px);
  display: flex;
  color: var(--white);
  --section-y: clamp(54px, 5.4vw, 96px);
  padding-block: var(--section-y);
}
/* размытая подложка: заранее уменьшенная картинка вместо filter: blur —
   фильтр пересчитывался при каждой перерисовке большого изображения */
.plan__bg{
  position: absolute; inset: 0; z-index: -3;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
}
/* сам генплан — целиком, без обрезки */
.plan__figure{ margin: 0; position: relative; justify-self: end; overflow: hidden; border-radius: var(--radius); }
.plan__full{
  display: block; width: auto; max-width: 100%; height: auto;
  max-height: 86vh; object-fit: contain;
  border-radius: var(--radius);
  cursor: zoom-in;
}
.plan::before{
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(8,15,12,.88) 0%, rgba(8,15,12,.72) 30%, rgba(8,15,12,.25) 52%, rgba(8,15,12,.12) 100%),
    linear-gradient(180deg, rgba(8,15,12,.45) 0%, rgba(8,15,12,.1) 30%, rgba(8,15,12,.1) 70%, rgba(8,15,12,.5) 100%);
}

.plan__inner{
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 30%) minmax(0, 1fr);
  gap: clamp(22px, 2.6vw, 48px);
  align-items: center;
  width: 100%;
}
.plan__side{
  display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(28px, 4vw, 60px);
  align-self: stretch;
  transition: opacity .3s var(--ease);
}
.is-zooming .plan__side{ opacity: .12; }

.plan__head{ max-width: 46ch; }
.plan .eyebrow{ text-align: left; color: rgba(255,255,255,.7); }
.plan__title{
  text-align: left;
  /* держим в одну строку: колонка узкая, кегль подбираем под неё */
  white-space: nowrap;
  font-size: clamp(1.75rem, 2.7vw, 3.1rem);
  font-weight: 700; line-height: 1.06; letter-spacing: -.02em;
}
.plan__text{
  margin-top: clamp(14px, 1.4vw, 22px);
  color: rgba(255,255,255,.85);
  font-size: clamp(.98rem, 1.05vw, 1.14rem);
}
.plan__zoom{ margin-top: clamp(20px, 2vw, 30px); }

/* плашки с иконками снизу */
/* плашки лежат поверх плана в правом нижнем углу и остаются чёткими при увеличении */
.plan__facts{
  position: absolute; z-index: 3;
  right: clamp(12px, 1.4vw, 24px); bottom: clamp(12px, 1.4vw, 24px);
  display: flex; flex-wrap: wrap; justify-content: flex-end;
  gap: 10px;
  max-width: min(78%, 720px);
}
.fact{
  display: flex; align-items: center; gap: 11px;
  padding: 10px 16px 10px 13px;
  border-radius: var(--radius-pill);
}
.fact__ico{ flex: none; width: 20px; height: 20px; color: rgba(255,255,255,.85); }
.fact__num{ font-weight: 600; font-size: .95rem; line-height: 1.25; white-space: nowrap; }

@media (max-width: 900px){
  .plan{ min-height: auto; display: block; }
  .plan__facts{ position: static; justify-content: flex-start; max-width: none; margin-top: 18px; }
  .plan__inner{ grid-template-columns: 1fr; gap: clamp(26px, 5vw, 44px); }
  /* обрезка нужна только лупе на десктопе; на телефоне она срезала углы плашек */
  .plan__figure{ overflow: visible; }
  .plan__full{ max-height: none; cursor: default; }
  .plan::before{ background: linear-gradient(180deg, rgba(8,15,12,.8), rgba(8,15,12,.55)); }
}

/* лупа: увеличенный кусок плана под курсором */
.plan__lens{
  position: absolute; z-index: 2;
  left: var(--pad); bottom: 0;
  width: var(--lens); aspect-ratio: 1;
  border-radius: var(--radius);
  background-image: url(../img/plan/genplan.webp);
  background-repeat: no-repeat;
  background-size: calc(var(--zoom) * 100%);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 34px 80px rgba(0,0,0,.55);
  opacity: 0; visibility: hidden;
  transition: opacity .28s var(--ease), visibility .28s;
  pointer-events: none;
}
.is-zooming .plan__lens{ opacity: 1; visibility: visible; }
/* на тач-устройствах лупы нет — там работает «Открыть крупно» */
@media (hover: none), (pointer: coarse){
  .plan__lens{ display: none; }
}

/* рамка на плане: ровно та область, что видна в превью */
.plan__marker{
  position: absolute; top: 0; left: 0;
  width: calc(100% / var(--zoom)); aspect-ratio: 1;
  border: 2px solid rgba(255,255,255,.95);
  border-radius: 12px;
  /* тень наружу гасит всё, что осталось за рамкой */
  box-shadow: 0 0 0 100vmax rgba(8,15,12,.45);
  opacity: 0;
  transition: opacity .28s var(--ease);
  pointer-events: none;
}
.is-zooming .plan__marker{ opacity: 1; }
@media (hover: none), (pointer: coarse){
  .plan__marker{ display: none; }
}

/* подсказка: стоит там, где при наведении появится превью */
.plan__hint{
  display: grid; place-content: center; justify-items: center; gap: 14px;
  width: var(--lens); aspect-ratio: 1;
  padding: 24px;
  text-align: center;
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: rgba(255,255,255,.78);
  font-size: .98rem;
  transition: opacity .28s var(--ease);
}
.plan__hint .ico{ width: 34px; height: 34px; color: rgba(255,255,255,.55); }
.plan__hint span{ max-width: 22ch; }
.is-zooming .plan__hint{ opacity: 0; }
/* без мыши подсказка бессмысленна */
@media (hover: none), (pointer: coarse){
  .plan__hint{ display: none; }
}

/* =========================================================
   ФОТОГАЛЕРЕЯ — плотная мозаика
   ========================================================= */
.mosaic{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(150px, 13.5vw, 240px);
  grid-auto-flow: dense;
  gap: 6px;
  margin-top: clamp(20px, 2.2vw, 34px);
}
.mosaic__item--w2{ grid-column: span 2; }
.mosaic__item--big{ grid-column: span 2; grid-row: span 2; }

.tile-photo{
  display: block; width: 100%; height: 100%; padding: 0; border: 0;
  background: var(--bg-2); cursor: zoom-in;
  overflow: hidden; border-radius: 4px;
  position: relative;
}
.tile-photo img{
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease), opacity .4s var(--ease);
}
.tile-photo:hover img{ transform: scale(1.06); }
.tile-photo::after{
  content: ""; position: absolute; inset: 0;
  background: rgba(8,15,12,.18);
  opacity: 0; transition: opacity .4s var(--ease);
}
.tile-photo:hover::after{ opacity: 1; }
@media (prefers-reduced-motion: reduce){
  .tile-photo img{ transition: none; }
  .tile-photo:hover img{ transform: none; }
}

/* пометка на визуализациях — чтобы их не принимали за съёмку */
.tile-photo[data-render]::before{
  content: "Визуализация";
  position: absolute; z-index: 2; left: 10px; bottom: 10px;
  padding: 5px 11px; border-radius: var(--radius-pill);
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  color: rgba(255,255,255,.92);
  background: rgba(10,18,15,.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.tile-photo[data-render]:hover::before{ opacity: 1; }

@media (max-width: 900px){
  .mosaic{ grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(130px, 28vw, 200px); }
  .mosaic__item--w2, .mosaic__item--big{ grid-column: span 2; }
  .mosaic__item--big{ grid-row: span 2; }
}

/* =========================================================
   КОНТАКТЫ
   ========================================================= */
.contacts__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.1vw, 18px);
  margin-top: clamp(20px, 2.2vw, 34px);
}

.contacts__card{
  display: flex; flex-direction: column;
  padding: clamp(20px, 1.8vw, 30px);
  border-radius: var(--radius);
  text-align: left;
}

.contacts__ico{
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 16px;
  background: rgba(31,74,55,.09);
  color: var(--green);
  margin-bottom: clamp(16px, 1.6vw, 26px);
}
.contacts__ico .ico{ width: 22px; height: 22px; }

.contacts__label{ color: var(--ink-2); font-size: .85rem; }
.contacts__value{
  display: block; margin-top: 4px;
  font-size: clamp(1.02rem, 1.15vw, 1.22rem); font-weight: 700;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
a.contacts__value{ transition: color .2s var(--ease); }
a.contacts__value:hover{ color: var(--green-600); }
.contacts__note{ margin-top: auto; padding-top: 12px; color: var(--ink-2); font-size: .86rem; }

/* вся плитка — одна большая цель для нажатия: ссылка растягивается
   псевдоэлементом, при этом текст остаётся выделяемым */
.contacts__card--link{
  position: relative;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.contacts__card--link .contacts__value::after{
  /* z-index обязателен: иконка и подпись идут следом в потоке
     и иначе перехватывали бы нажатие */
  content: ""; position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
}
.contacts__card--link:hover{
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(16,28,24,.16);
}
.contacts__card--link:hover .contacts__value,
.contacts__card--link:hover .contacts__ico{ color: var(--green-600); }
.contacts__card--link:active{ transform: translateY(-1px); }
/* обводка фокуса — по всей плитке, а не по строке текста */
.contacts__card--link:has(:focus-visible){
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.contacts__card--link :focus-visible{ outline: none; }
@media (prefers-reduced-motion: reduce){
  .contacts__card--link, .contacts__card--link:hover{ transition: none; transform: none; }
}

/* карта */
.map{
  position: relative;
  /* во всю ширину экрана и вплотную к подвалу */
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  min-height: clamp(340px, 40vw, 560px);
  margin-top: clamp(26px, 2.6vw, 44px);
  border-radius: 0;
  border-inline: 0;
  overflow: hidden;
  display: grid; place-content: center; justify-items: center;
  gap: 14px;
  /* спокойная сетка вместо скриншота местности — чтобы не выдавать её за карту */
  background:
    linear-gradient(rgba(22,27,30,.05) 1px, transparent 1px) 0 0 / 100% 42px,
    linear-gradient(90deg, rgba(22,27,30,.05) 1px, transparent 1px) 0 0 / 42px 100%,
    var(--bg-2);
}
.map iframe{ position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__note{ color: var(--ink-2); font-size: .9rem; }
.map:has(iframe) .map__note{ display: none; }

@media (max-width: 1100px){
  .contacts__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .contacts__grid{ grid-template-columns: 1fr; }
  /* иконка слева, текст колонкой справа: при flex-wrap подпись и значение
     оказывались в одной строке, а примечание уезжало вниз */
  .contacts__card{
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px; row-gap: 2px;
    align-items: center;
    padding: 18px;
  }
  .contacts__ico{ grid-row: 1 / span 3; margin-bottom: 0; }
  .contacts__label,
  .contacts__value,
  .contacts__note{ grid-column: 2; }
  .contacts__note{ margin-top: 4px; padding-top: 0; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer{
  position: relative;
  overflow: clip;
  margin-top: 0;
  padding-block: clamp(40px, 4vw, 64px);
  background: #121714;
  color: rgba(255,255,255,.72);
}

.footer > .container{ position: relative; z-index: 1; }

/* одна строка: лого слева, разделы строго по центру, кнопка справа */
.footer__grid{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(18px, 2vw, 40px);
}
.footer__brand{ display: flex; flex-direction: column; align-items: flex-start; gap: clamp(16px, 1.6vw, 24px); }
.to-top{ justify-self: end; }

.footer .logo{ color: var(--white); font-size: 1.6rem; }
.footer .logo img{ width: 46px; height: 46px; }
.footer__about{
  max-width: 62ch;
  font-size: .95rem; line-height: 1.55;
  color: rgba(255,255,255,.6);
}

.footer__social{ display: flex; gap: 10px; }
.footer__social a{
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--white);
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.footer__social a:hover{ background: rgba(255,255,255,.18); transform: translateY(-2px); }

.footer__title{
  font-size: .8rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.42);
  margin-bottom: 18px;
}
/* разделы строкой: столбик растягивал подвал по высоте */
.footer__nav{ display: flex; }
.footer__nav ul{
  display: flex; flex-wrap: wrap;
  gap: 10px clamp(18px, 2vw, 34px);
  font-size: .97rem;
}
.footer__nav a{ color: rgba(255,255,255,.75); transition: color .2s; }
.footer__nav a:hover{ color: var(--white); }

.to-top{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px 14px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white); font-weight: 600; font-size: .92rem;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.to-top:hover{ background: rgba(255,255,255,.12); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce){
  .to-top:hover, .footer__social a:hover{ transform: none; }
}

.footer__bottom{
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 40px;
  margin-top: clamp(34px, 3.6vw, 60px);
  padding-top: clamp(22px, 2.2vw, 32px);
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer__copy{ font-size: .85rem; color: rgba(255,255,255,.55); white-space: nowrap; }

@media (max-width: 1100px){
  .footer > .container{ position: relative; z-index: 1; }

.footer__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .to-top{ grid-column: 2; justify-self: end; }
}
@media (max-width: 620px){
  .footer > .container{ position: relative; z-index: 1; }

.footer__grid{ grid-template-columns: 1fr; }
  .to-top{ grid-column: 1; justify-self: start; }
}

@media (max-width: 900px){
  .contacts__grid{ grid-template-columns: 1fr; }
  .map{ min-height: 320px; }
}


/* =========================================================
   Мобильный лайтбокс
   ========================================================= */
@media (max-width: 900px){
  /* лупы на узком экране нет — подсказка про курсор там лишняя */
  .plan__hint{ display: none; }

  .lb{ width: 100vw; }
  .lb__img{ max-height: 68vh; border-radius: 10px; }
  /* крестик выносим наверх экрана, а не на угол фотографии */
  .lb__btn--close{ position: fixed; top: 14px; right: 14px; }
  /* стрелки уходят под фотографию, чтобы не закрывать её */
  .lb__btn{ width: 50px; height: 50px; }
  .lb__btn--prev,
  .lb__btn--next{
    position: fixed;
    top: auto; bottom: 26px;
    right: auto; translate: none;
    background: rgba(255,255,255,.16);
  }
  .lb__btn--prev{ left: calc(50% - 60px); }
  .lb__btn--next{ left: calc(50% + 10px); }
}

/* жест двумя пальцами масштабирует фото */
.lb__img{ touch-action: pinch-zoom; cursor: zoom-out; }

/* =========================================================
   АНИМАЦИИ ПОЯВЛЕНИЯ
   ========================================================= */
@media (prefers-reduced-motion: no-preference){

  /* появление: варианты направления, все на transform/opacity — их считает
     композитор, поэтому прокрутка не дёргается. Очередь задаёт --i */
  .js-reveal{
    opacity: 0;
    transition:
      opacity var(--rv-t, .62s) var(--ease) calc(var(--i, 0) * 65ms),
      transform var(--rv-t, .62s) var(--ease) calc(var(--i, 0) * 65ms);
  }
  .js-reveal.is-in{ opacity: 1; transform: none; }

  .rv-up{ transform: translate3d(0, 30px, 0); }
  .rv-left{ transform: translate3d(-42px, 0, 0); }
  .rv-right{ transform: translate3d(42px, 0, 0); }
  .rv-scale{ transform: scale(.93); --rv-t: .75s; }
  .rv-tilt{ transform: translate3d(0, 34px, 0) rotate(-1.4deg); --rv-t: .8s; }
  .rv-soft{ transform: translate3d(0, 14px, 0); --rv-t: .5s; }

  /* фото выезжает из-под обрезки: только transform и opacity — их считает
     композитор, в отличие от clip-path, который шёл через главный поток */
  .js-reveal-img{
    opacity: 0;
    transition: opacity .55s var(--ease) calc(var(--i, 0) * 70ms);
  }
  .js-reveal-img.is-in{ opacity: 1; }
  .js-reveal-img :is(img, video){
    transform: translate3d(0, 6%, 0) scale(1.06);
    transition: transform .9s var(--ease) calc(var(--i, 0) * 70ms);
  }
  .js-reveal-img.is-in :is(img, video){ transform: translate3d(0, 0, 0) scale(1); }

  /* ===== вступление хиро ===== */
  .is-ready .hero__title span{
    display: inline-block;
    opacity: 0;
    transform: translateY(.22em) rotate(2deg);
    animation: heroLetter .9s var(--ease) forwards;
    animation-delay: calc(.15s + var(--i) * 70ms);
  }
  @keyframes heroLetter{
    to{ opacity: 1; transform: none; }
  }

  .is-ready .hero__lead,
  .is-ready .hero .btn,
  .is-ready .hero__foot{
    opacity: 0;
    animation: heroUp .9s var(--ease) forwards;
  }
  .is-ready .hero__lead{ animation-delay: .62s; }
  .is-ready .hero .btn{ animation-delay: .74s; }
  .is-ready .hero__foot{ animation-delay: .88s; }
  @keyframes heroUp{
    from{ opacity: 0; transform: translateY(18px); }
    to{ opacity: 1; transform: none; }
  }

  /* шапка въезжает после первого экрана */
  .is-ready .header .logo,
  .is-ready .header .nav__list,
  .is-ready .header .nav__phone,
  .is-ready .header .burger{
    opacity: 0;
    animation: heroUp .7s var(--ease) .1s forwards;
  }
}

/* если анимация почему-то не проиграла — досрочно показываем всё */
.hero.anim-done :is(.hero__title span, .hero__lead, .btn, .hero__foot),
.is-ready.anim-header :is(.header .logo, .header .nav__list, .header .nav__phone, .header .burger){
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* =========================================================
   Оптимизация для слабых устройств
   ========================================================= */
@media (max-width: 900px){
  /* размытие фона — самая дорогая операция на мобильных GPU.
     Оставляем его только меню, остальным даём плотный фон */
  /* меню не трогаем: у него размытие остаётся как украшение поверх плотного фона */
  .glass, .glass--dark, .btn--outline, .chip, .tile__note, .lb__btn, .plan__hint{
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .glass{ background: rgba(255,255,255,.93); }
  .glass--dark{ background: rgba(18,26,23,.72); }
  .chip, .tile__note{ background: rgba(18,26,23,.6); }
  .btn--outline{ background: rgba(12,20,16,.35); }
}

/* подложка только под фотографии: у логотипа и иконок фон прозрачный,
   общее правило рисовало бы им серый квадрат */
.hero__img, .comms__bg, .feature__img, .shot img, .tile-photo img,
.plan__full, .video__poster{ background-color: var(--bg-2); }

/* слой держим только пока элемент едет, потом освобождаем память */
.js-reveal:not(.is-in),
.js-reveal-img:not(.is-in) :is(img, video){ will-change: transform, opacity; }
.js-reveal.is-in,
.js-reveal-img.is-in :is(img, video){ will-change: auto; }

/* на узком экране боковые выезды уводили элемент за край и давали
   горизонтальную прокрутку — там всё появляется снизу */
@media (max-width: 900px){
  .rv-left, .rv-right{ transform: translate3d(0, 26px, 0); }
  .rv-tilt{ transform: translate3d(0, 26px, 0); }
}

/* карта упирается в подвал — нижний отступ секции не нужен */
#contacts{ padding-bottom: 0; }
