/* =============================================================================
   style.css — основные стили. Адаптивность — в responsive.css.
   Цвета можно менять в js/site-data.js (theme.colors); значения ниже — запасные.
   ============================================================================= */

/* ---------------------------------------------------------------------------
   1. ШРИФТЫ (локальные, лицензия SIL OFL 1.1 — см. assets/fonts/LICENSE-*.txt)
   Forum — заголовки; Onest — основной текст. Оба поддерживают таджикские буквы
   (ҳ, ҷ, ӣ, ӯ, қ, ғ) в поднаборе cyrillic-ext.
   --------------------------------------------------------------------------- */
@font-face { font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/forum-cyrillic-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/forum-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/forum-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/forum-latin-400-normal.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-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/onest-cyrillic-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/onest-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/onest-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/onest-latin-400-normal.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-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/onest-cyrillic-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/onest-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/onest-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/onest-latin-500-normal.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-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/onest-cyrillic-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/onest-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/onest-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/onest-latin-600-normal.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; }

/* ---------------------------------------------------------------------------
   2. ПЕРЕМЕННЫЕ
   --------------------------------------------------------------------------- */
:root {
  --c-primary: #1D2B53;
  --c-primary-deep: #131C3A;
  --c-accent: #16706C;
  --c-accent-light: #4FBFB6;
  --c-ornament: #B8914A;
  --c-ornament-light: #D9BC82;
  --c-bg: #FAFAF7;
  --c-surface: #ECEEF1;
  --c-text: #1A2033;
  --c-text-muted: #555D70;
  --c-on-dark: #FFFFFF;
  --c-on-dark-muted: #B9C1D6;
  --c-line: rgba(26, 32, 51, 0.14);
  --c-line-dark: rgba(255, 255, 255, 0.16);
  --c-input-border: #7F8699;
  --c-error: #B3261E;

  /* Орнамент (заменяется JS на цвет из theme.colors.ornament) */
  --ornament: url("../assets/icons/ornament.svg");
  --ornament-soft: url("../assets/icons/ornament-soft.svg");

  --f-display: "Forum", "Times New Roman", Georgia, serif;
  --f-body: "Onest", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --header-h: 72px;
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-pad: clamp(72px, 9vw, 128px);
  --radius-s: 2px;
  --radius-m: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------------------------------------------------------------------------
   3. БАЗА
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe { max-width: 100%; }
img { display: block; height: auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.1;
  letter-spacing: 0.005em;
  overflow-wrap: break-word;
}
p { margin: 0 0 1em; }
a { color: var(--c-accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; }
::selection { background: var(--c-ornament-light); color: var(--c-primary-deep); }

:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.site-header :focus-visible,
.hero :focus-visible,
.section--deep :focus-visible,
.section--primary .contacts__info :focus-visible,
.site-footer :focus-visible,
.lightbox :focus-visible { outline-color: var(--c-ornament-light); }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 18px; background: var(--c-ornament-light); color: var(--c-primary-deep);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

.noscript { margin: 0; padding: 16px; background: #FBEAEA; color: #8C1D18; text-align: center; }

.swipeable { touch-action: pan-y; }

/* ---------------------------------------------------------------------------
   4. КНОПКИ
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 24px;
  font-family: var(--f-body); font-size: 1rem; font-weight: 500; line-height: 1.25;
  text-align: center; text-decoration: none; white-space: normal;
  border: 1px solid transparent; border-radius: var(--radius-s);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn .icon { width: 1.15em; height: 1.15em; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 0.9375rem; }
.btn--block { width: 100%; }

.btn--brass { background: var(--c-ornament-light); color: var(--c-primary-deep); }
.btn--brass:hover { background: #E8D2A4; }
.btn--primary { background: var(--c-primary); color: var(--c-on-dark); }
.btn--primary:hover { background: var(--c-primary-deep); }
.btn--outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn--outline:hover { background: var(--c-primary); color: var(--c-on-dark); }
.btn--ghost-light { background: transparent; color: var(--c-on-dark); border-color: rgba(255, 255, 255, 0.5); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--c-on-dark); }

/* ---------------------------------------------------------------------------
   5. ШАПКА И МЕНЮ
   --------------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  background: var(--c-primary-deep);
  color: var(--c-on-dark);
  transition: box-shadow 0.25s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(8, 12, 28, 0.25); }
.site-header__inner {
  max-width: 1560px;
  height: 100%;
  display: flex; align-items: center; gap: clamp(16px, 2vw, 32px);
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--c-on-dark); text-decoration: none; flex: none;
}
.brand__logo { width: 44px; height: 44px; }
.brand__text { display: grid; line-height: 1.1; }
.brand__name { font-family: var(--f-display); font-size: 1.375rem; white-space: nowrap; }
.brand__descriptor { font-size: 0.8125rem; color: var(--c-on-dark-muted); white-space: nowrap; }

.site-nav { flex: 1 1 auto; min-width: 0; }
.site-nav__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; gap: clamp(12px, 1.2vw, 24px);
}
.site-nav__link {
  position: relative; display: block; padding: 8px 0;
  color: var(--c-on-dark-muted); font-size: 0.9375rem; text-decoration: none; white-space: nowrap;
  transition: color 0.2s;
}
.site-nav__link:hover, .site-nav__link.is-active { color: var(--c-on-dark); }
.site-nav__link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: -3px;
  width: 6px; height: 6px; background: var(--c-ornament-light);
  transform: translateX(-50%) rotate(45deg);
}
.site-nav__extra { display: none; }

.site-header__actions { display: flex; align-items: center; gap: 12px; flex: none; }
.header-phone {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; min-height: 44px;
  color: var(--c-on-dark); font-weight: 500; text-decoration: none; white-space: nowrap;
}
.header-phone .icon { color: var(--c-ornament-light); }

.nav-toggle {
  display: none; position: relative;
  width: 44px; height: 44px; padding: 0; margin-right: -8px;
  background: transparent; border: 0; color: var(--c-on-dark); cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  position: absolute; left: 11px; width: 22px; height: 1.5px; background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle__bars { top: 21px; }
.nav-toggle__bars::before { content: ""; left: 0; top: -7px; }
.nav-toggle__bars::after { content: ""; left: 0; top: 7px; }
.is-menu-open .nav-toggle__bars { background: transparent; }
.is-menu-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.is-menu-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

main { padding-top: var(--header-h); }

/* ---------------------------------------------------------------------------
   6. ГЛАВНЫЙ ЭКРАН
   Сетка: текстовая панель | полоса орнамента | изображение
   --------------------------------------------------------------------------- */
.hero { background: var(--c-primary); color: var(--c-on-dark); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) 56px minmax(0, 7fr);
  grid-template-areas: "panel band media";
  min-height: min(calc(100vh - var(--header-h)), 880px);
  min-height: min(calc(100svh - var(--header-h)), 880px);
}
.hero__panel {
  grid-area: panel;
  display: flex; align-items: flex-end;
  padding: clamp(48px, 6vw, 96px) clamp(24px, 3.5vw, 56px) clamp(48px, 6vw, 88px)
           max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
}
.hero__content { max-width: 34rem; }
.hero__title {
  font-size: clamp(3rem, 1.6rem + 4.6vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: 0;
}
.hero__descriptor { margin: 18px 0 32px; font-size: 1.3125rem; line-height: 1.4; color: var(--c-on-dark-muted); }
.hero__points { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 12px; }
.hero__points li { position: relative; padding-left: 24px; }
.hero__points li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 7px; height: 7px; background: var(--c-ornament-light); transform: rotate(45deg);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__band {
  grid-area: band;
  background-color: var(--c-primary-deep);
  background-image: var(--ornament);
  background-size: 56px 56px;
  background-position: center top;
  border-inline: 1px solid rgba(217, 188, 130, 0.35);
}

.hero__media { grid-area: media; position: relative; overflow: hidden; background: var(--c-primary-deep); min-height: 320px; }
.hero__slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1.2s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__controls {
  position: absolute; right: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(19, 28, 58, 0.66);
}
.hero__toggle {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  background: transparent; border: 0; border-radius: 50%; color: var(--c-on-dark); cursor: pointer;
}
.hero__toggle .icon { width: 18px; height: 18px; }
.hero__dots { display: flex; }
.hero__dot {
  display: grid; place-items: center; width: 28px; height: 36px; padding: 0;
  background: transparent; border: 0; cursor: pointer;
}
.hero__dot::before {
  content: ""; width: 8px; height: 8px; border: 1px solid var(--c-on-dark); transform: rotate(45deg);
  transition: background-color 0.2s;
}
.hero__dot[aria-current="true"]::before { background: var(--c-ornament-light); border-color: var(--c-ornament-light); }

/* Единственная «сцена» при загрузке: орнамент прорисовывается сверху вниз */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.reduced-motion) .hero__band { animation: band-in 1.6s var(--ease) both; }
  .js:not(.reduced-motion) .hero__content { animation: rise-in 0.9s 0.3s var(--ease) both; }
}
@keyframes band-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------------
   7. СЕКЦИИ: общие правила
   --------------------------------------------------------------------------- */
.section { padding-block: var(--section-pad); }
.section--light { background: var(--c-bg); }
.section--surface { background: var(--c-surface); }
.section--deep { background: var(--c-primary-deep); color: var(--c-on-dark); }
.section--primary { background: var(--c-primary); color: var(--c-on-dark); }

.section__head { max-width: 46rem; margin-bottom: clamp(32px, 4vw, 56px); }
.section__title { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.75rem); }
.section__intro { margin: 16px 0 0; max-width: 40rem; font-size: 1.125rem; color: var(--c-text-muted); }
.section--deep .section__intro,
.section--primary .section__intro { color: var(--c-on-dark-muted); }

/* Появление при прокрутке (включается JS) */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------------
   8. О КОМПЛЕКСЕ
   --------------------------------------------------------------------------- */
.about {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px); align-items: center;
}
.about--single { grid-template-columns: minmax(0, 1fr); }
.about__text .section__head { margin-bottom: 28px; }
.about__p { max-width: 38rem; }
.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px;
  margin: 32px 0 36px; max-width: 38rem;
}
.facts__item { padding: 14px 0; border-top: 1px solid var(--c-line); }
.facts dt { font-size: 0.875rem; color: var(--c-text-muted); }
.facts dd { margin: 2px 0 0; font-family: var(--f-display); font-size: 1.75rem; line-height: 1.2; color: var(--c-primary); }

.about__media { position: relative; margin: 0 16px 16px 0; isolation: isolate; }
.about__media::before {
  content: ""; position: absolute; inset: 16px -16px -16px 16px; z-index: -1;
  border: 1px solid var(--c-ornament);
}
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--c-surface); }

/* ---------------------------------------------------------------------------
   9. ПРЕИМУЩЕСТВА
   --------------------------------------------------------------------------- */
.advantages {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 48px) clamp(24px, 3vw, 48px);
}
.advantage { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 18px; align-items: start; }
.advantage__icon { grid-row: span 2; width: 44px; height: 44px; }
.advantage__title { font-size: 1.5rem; line-height: 1.2; margin: 6px 0 6px; }
.advantage__text { margin: 0; font-size: 0.9375rem; color: var(--c-text-muted); max-width: 26rem; }

/* ---------------------------------------------------------------------------
   10. ГАЛЕРЕЯ
   --------------------------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 32px; }
.chip {
  min-height: 44px; padding: 8px 18px;
  font-size: 0.9375rem; font-weight: 500; line-height: 1.2;
  color: var(--c-on-dark-muted); background: transparent;
  border: 1px solid var(--c-line-dark); border-radius: 999px; cursor: pointer;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--c-on-dark); border-color: rgba(255, 255, 255, 0.45); }
.chip[aria-pressed="true"] { background: var(--c-ornament-light); color: var(--c-primary-deep); border-color: var(--c-ornament-light); }

.gallery__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.gallery__item {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  aspect-ratio: 3 / 2; background: var(--c-primary); border: 0; cursor: zoom-in;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__zoom, .viewer__zoom {
  position: absolute; right: 12px; bottom: 12px;
  width: 36px; height: 36px; padding: 8px; border-radius: 50%;
  background: rgba(19, 28, 58, 0.72); color: var(--c-on-dark);
  opacity: 0; transition: opacity 0.2s;
}
.gallery__item:hover .gallery__zoom, .gallery__item:focus-visible .gallery__zoom,
.viewer__main:hover .viewer__zoom, .viewer__main:focus-visible .viewer__zoom { opacity: 1; }

/* ---------------------------------------------------------------------------
   11. КВАРТИРЫ
   --------------------------------------------------------------------------- */
.tabs {
  display: flex; margin-bottom: 40px;
  border-bottom: 1px solid var(--c-line);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: grid; gap: 2px; text-align: left;
  padding: 14px 28px 12px 0; margin-right: 28px; margin-bottom: -1px;
  background: none; border: 0; border-bottom: 3px solid transparent;
  color: var(--c-text-muted); cursor: pointer;
}
.tab__label { font-family: var(--f-display); font-size: 1.625rem; line-height: 1.15; color: var(--c-text); transition: color 0.2s; }
.tab__meta { font-size: 0.875rem; }
.tab:hover .tab__label { color: var(--c-accent); }
.tab[aria-selected="true"] { border-bottom-color: var(--c-accent); }
.tab[aria-selected="true"] .tab__label { color: var(--c-primary); }

.apt {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.apt:focus-visible { outline-offset: 8px; }
.viewer__main {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  aspect-ratio: 3 / 2; background: var(--c-surface); border: 0; cursor: zoom-in;
}
.viewer__img { width: 100%; height: 100%; object-fit: cover; }
.viewer__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.viewer__thumb {
  flex: 1 1 0; min-width: 0; max-width: 180px;
  padding: 0; overflow: hidden; aspect-ratio: 3 / 2;
  background: var(--c-surface); border: 2px solid transparent; cursor: pointer;
}
.viewer__thumb img { width: 100%; height: 100%; object-fit: cover; }
.viewer__thumb[aria-current="true"] { border-color: var(--c-accent); }

.apt__title { font-size: clamp(1.875rem, 1.4rem + 1.2vw, 2.5rem); margin-bottom: 20px; }
.apt__desc { max-width: 36rem; }

.specs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px;
  margin: 0 0 24px;
}
.specs__row { padding: 10px 0; border-top: 1px solid var(--c-line); }
.specs dt { font-size: 0.8125rem; color: var(--c-text-muted); }
.specs dd { margin: 0; font-size: 1.0625rem; font-weight: 500; }

.explication {
  width: 100%; margin: 24px 0 28px;
  border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums;
}
.explication caption { text-align: left; font-family: var(--f-display); font-size: 1.375rem; margin-bottom: 8px; }
.explication th, .explication td { padding: 7px 0; text-align: left; font-weight: 400; border-bottom: 1px solid var(--c-line); }
.explication thead th { font-size: 0.8125rem; color: var(--c-text-muted); }
.explication .num { text-align: right; }
.explication tfoot th, .explication tfoot td { font-weight: 600; border-bottom: 0; border-top: 1px solid var(--c-text); }

.apt-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------------------
   12. ДРУГИЕ ВАРИАНТЫ КВАРТИР
   --------------------------------------------------------------------------- */
.plan-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
.plan-card { height: 100%; display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--c-line); }
.plan-card__media {
  display: block; width: 100%; padding: 16px; aspect-ratio: 4 / 3;
  background: #FFFFFF; border: 0; cursor: zoom-in;
}
.plan-card__media img { width: 100%; height: 100%; object-fit: contain; }
.plan-card__body {
  flex: 1; display: flex; flex-direction: column; gap: 16px;
  padding: 20px; border-top: 1px solid var(--c-line);
}
.plan-card__title { font-size: 1.5rem; line-height: 1.15; }
.plan-card .specs { margin: 0; }
.plan-card .apt-actions { flex-direction: column; flex-wrap: nowrap; margin-top: auto; }
.plan-card .btn { width: 100%; padding-inline: 14px; font-size: 0.9375rem; }

/* ---------------------------------------------------------------------------
   13. ПЛАНИРОВКИ
   --------------------------------------------------------------------------- */
.floorplans {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
}
.floorplan { margin: 0; }
.floorplan__media {
  display: block; width: 100%; padding: 20px; aspect-ratio: 16 / 11;
  background: #FFFFFF; border: 1px solid var(--c-line); cursor: zoom-in;
}
.floorplan__media img { width: 100%; height: 100%; object-fit: contain; }
.floorplan__caption { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding-top: 8px; }
.floorplan__title { font-family: var(--f-display); font-size: 1.375rem; line-height: 1.2; }
.link-download {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 44px; font-weight: 500; text-decoration: none;
}
.link-download:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   14. ФОТООТЧЁТЫ
   --------------------------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.report {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px;
  padding: 32px 0; border-top: 1px solid var(--c-line);
}
.report:last-child { border-bottom: 1px solid var(--c-line); }
.report__date {
  position: relative; padding-left: 22px;
  font-family: var(--f-display); font-size: 1.375rem; line-height: 1.3; color: var(--c-primary);
}
.report__date::before {
  content: ""; position: absolute; left: 1px; top: 0.55em;
  width: 8px; height: 8px; background: var(--c-ornament); transform: rotate(45deg);
}
.report__title { font-size: 1.75rem; margin-bottom: 8px; }
.report__text { color: var(--c-text-muted); max-width: 40rem; }
.report__thumbs {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); gap: 8px;
}
.report__thumb {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  aspect-ratio: 3 / 2; background: var(--c-bg); border: 0; cursor: zoom-in;
}
.report__thumb img { width: 100%; height: 100%; object-fit: cover; }
.report__more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(19, 28, 58, 0.66); color: var(--c-on-dark); font-weight: 500;
}

/* ---------------------------------------------------------------------------
   15. РАСПОЛОЖЕНИЕ
   --------------------------------------------------------------------------- */
.location {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.location .section__head { margin-bottom: 24px; }
.location__address { display: flex; gap: 10px; align-items: flex-start; font-size: 1.125rem; font-weight: 500; }
.location__address .icon { margin-top: 0.2em; color: var(--c-accent); }
.nearby { list-style: none; margin: 8px 0 24px; padding: 0; }
.nearby li { padding: 10px 0; border-top: 1px solid var(--c-line); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; }
.map { aspect-ratio: 4 / 3; background: var(--c-surface); border: 1px solid var(--c-line); }
.map__frame { display: block; width: 100%; height: 100%; border: 0; }
.map__empty { display: grid; place-items: center; height: 100%; padding: 24px; text-align: center; color: var(--c-text-muted); }

/* ---------------------------------------------------------------------------
   16. КОНТАКТЫ И ФОРМА
   --------------------------------------------------------------------------- */
.contacts {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px); align-items: start;
}
.contacts .section__head { margin-bottom: 28px; }
.contact-list { margin: 0 0 32px; }
.contact-list__row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px;
  padding: 14px 0; border-top: 1px solid var(--c-line-dark);
}
.contact-list__icon { grid-row: span 2; margin-top: 4px; width: 22px; height: 22px; color: var(--c-ornament-light); }
.contact-list dt { font-size: 0.8125rem; color: var(--c-on-dark-muted); }
.contact-list dd { margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; }
.contact-list a { color: var(--c-on-dark); }
.contacts__social-label { margin-bottom: 10px; font-size: 0.875rem; color: var(--c-on-dark-muted); }

.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.social__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px;
  font-size: 0.9375rem; text-decoration: none; border-radius: 999px;
  color: var(--c-on-dark); border: 1px solid var(--c-line-dark); transition: border-color 0.2s;
}
.social__link:hover { border-color: var(--c-ornament-light); }

.contacts__form {
  padding: clamp(24px, 3vw, 40px);
  background: #FFFFFF; color: var(--c-text);
  border-radius: var(--radius-m);
}
.form-title { font-size: 1.875rem; margin-bottom: 8px; }
.form-subtitle { font-size: 0.9375rem; color: var(--c-text-muted); }

.form { display: grid; gap: 16px; margin-top: 20px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 0.875rem; font-weight: 500; }
.field__input {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font-family: var(--f-body); font-size: 1rem; line-height: 1.4; color: var(--c-text);
  background: #FFFFFF; border: 1px solid var(--c-input-border); border-radius: var(--radius-s);
}
.field__input { background: #FFFFFF; }
.field__input::placeholder { color: #767D90; }
.field__input:focus-visible { outline-offset: 0; border-color: var(--c-accent); }
.field__input--area { min-height: 96px; resize: vertical; }
.field__input[aria-invalid="true"] { border-color: var(--c-error); }
.field__error { margin: 0; font-size: 0.875rem; color: var(--c-error); }

.check {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start;
  font-size: 0.875rem; color: var(--c-text-muted); cursor: pointer;
}
.check__input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--c-accent); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__status { font-size: 0.9375rem; }
.form__status:empty { display: none; }
.form__status--success { padding: 12px 14px; background: #E3F2EF; color: #0F4F4C; border-left: 3px solid var(--c-accent); }
.form__status--success a { color: #0F4F4C; font-weight: 600; }
.form__status--error { padding: 12px 14px; background: #FBEAEA; color: #8C1D18; border-left: 3px solid var(--c-error); }
.form__status--pending { color: var(--c-text-muted); }

/* ---------------------------------------------------------------------------
   17. ПОДВАЛ
   --------------------------------------------------------------------------- */
.site-footer { background: var(--c-primary-deep); color: var(--c-on-dark-muted); font-size: 0.9375rem; }
.site-footer__band {
  height: 28px;
  background-image: var(--ornament-soft); background-size: 28px 28px;
  border-bottom: 1px solid rgba(217, 188, 130, 0.25);
}
.site-footer__grid {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px; padding-block: 56px 40px;
}
.site-footer__text { margin: 16px 0 0; max-width: 28rem; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer__nav a, .site-footer__contacts a { color: var(--c-on-dark-muted); text-decoration: none; }
.site-footer__nav a:hover, .site-footer__contacts a:hover { color: var(--c-on-dark); text-decoration: underline; }
.site-footer__contacts { display: grid; gap: 8px; align-content: start; }
.site-footer__contacts a[href^="tel:"] { color: var(--c-on-dark); font-size: 1.125rem; }
.social--footer { margin-top: 12px; }
.site-footer__copy { margin: 0; padding: 20px 0 28px; border-top: 1px solid var(--c-line-dark); font-size: 0.875rem; }

/* ---------------------------------------------------------------------------
   18. МОДАЛЬНОЕ ОКНО
   --------------------------------------------------------------------------- */
.modal {
  width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px);
  padding: 0; border: 0; border-radius: var(--radius-m);
  background: var(--c-bg); color: var(--c-text);
  box-shadow: 0 24px 64px rgba(8, 12, 28, 0.4);
}
.modal::backdrop { background: rgba(19, 28, 58, 0.74); }
.modal__body { position: relative; padding: clamp(24px, 4vw, 40px); }
.modal__close {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 44px; height: 44px;
  background: transparent; border: 0; color: var(--c-text); cursor: pointer;
}
.modal__close .icon { width: 24px; height: 24px; }
.modal__title { font-size: 2rem; margin-bottom: 8px; padding-right: 40px; }
@media (prefers-reduced-motion: no-preference) {
  .js:not(.reduced-motion) .modal[open] { animation: rise-in 0.25s var(--ease); }
}

/* ---------------------------------------------------------------------------
   19. ЛАЙТБОКС
   --------------------------------------------------------------------------- */
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(10, 14, 30, 0.97); color: var(--c-on-dark);
}
.lightbox::backdrop { background: rgba(10, 14, 30, 0.9); }
.lightbox__inner { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.lightbox__bar { display: flex; align-items: center; gap: 16px; padding: 8px 12px 8px 20px; }
.lightbox__counter { margin: 0; color: var(--c-on-dark-muted); font-variant-numeric: tabular-nums; }
.lightbox__close {
  margin-left: auto; display: grid; place-items: center; width: 48px; height: 48px;
  background: transparent; border: 0; color: var(--c-on-dark); cursor: pointer;
}
.lightbox__close .icon { width: 28px; height: 28px; }
.lightbox__stage {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center;
  min-height: 0; padding: 0 8px 20px;
}
.lightbox__figure {
  margin: 0; height: 100%; min-height: 0;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center;
}
.lightbox__img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  opacity: 0; transition: opacity 0.25s;
}
.lightbox__img.is-loaded { opacity: 1; }
.lightbox__caption { padding-top: 12px; text-align: center; font-size: 0.9375rem; color: var(--c-on-dark-muted); }
.lightbox__nav {
  justify-self: center; display: grid; place-items: center; width: 52px; height: 52px;
  background: transparent; color: var(--c-on-dark); cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%;
  transition: background-color 0.2s;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.1); }
.lightbox__nav .icon { width: 24px; height: 24px; }

/* ---------------------------------------------------------------------------
   20. КНОПКА «НАВЕРХ»
   --------------------------------------------------------------------------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  background: var(--c-primary); color: var(--c-on-dark); cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%;
  box-shadow: 0 6px 20px rgba(8, 12, 28, 0.3);
}
.to-top .icon { width: 22px; height: 22px; }
.to-top:hover { background: var(--c-primary-deep); }
