/* ============================================================================
   THAVEORA — дизайн-система v1.0
   Тёмная тема «кураторская подборка». Разработано: claude fable 5,
   ревизия: GPT 5.6 sol (REVISE → применены 5 правок).
   ========================================================================== */

:root {
  /* ————— Фон и поверхности ————— */
  --bg:            #0C0F14;
  --bg-elev:       #14181F;
  --surface:       #161A21;
  --surface-2:     #1C2129;
  --surface-3:     #232933;

  /* ————— Акценты ————— */
  --gold:          #C9A96A;
  --gold-bright:   #D7BC82;
  --gold-dim:      #8A7448;
  --eucalyptus:    #7FA8A0;
  --eucalyptus-dim:#56756E;

  /* ————— Текст ————— */
  --text:          #E7E3DA;   /* primary — тёплый крем */
  --text-2:        #A9ADB3;   /* secondary */
  --text-3:        #82868C;   /* muted */

  /* ————— Линии и состояния ————— */
  --line:          rgba(201,169,106,0.14);
  --line-soft:     rgba(231,227,218,0.08);
  --ok:            #5FA88C;
  --bad:           #C9705E;

  /* ————— Типографика ————— */
  --font-display:  "Bodoni 72", "Didot", "Iowan Old Style", "Baskerville",
                   "Times New Roman", Georgia, serif;
  --font-body:     -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
                   Roboto, "Helvetica Neue", Arial, sans-serif;

  /* ————— Геометрия ————— */
  --radius:        14px;
  --radius-sm:     9px;
  --radius-lg:     20px;
  --container:     1240px;

  --shadow-card:   0 1px 0 rgba(255,255,255,0.03) inset,
                   0 8px 28px rgba(0,0,0,0.38);
  --shadow-pop:    0 24px 64px rgba(0,0,0,0.55);
  --shadow-gold:   0 0 0 1px rgba(201,169,106,0.35),
                   0 0 32px rgba(201,169,106,0.10);

  --grad-surface:  linear-gradient(180deg, #1A1F27 0%, #12161C 100%);
  --grad-gold:     linear-gradient(135deg, #D7BC82 0%, #C9A96A 45%, #A9854F 100%);
  --grad-hero:     linear-gradient(180deg, rgba(12,15,20,0.15) 0%,
                   rgba(12,15,20,0.62) 58%, #0C0F14 100%);
}

/* ————— Сброс и база ————— */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 0.6em;
}
p { margin: 0 0 1em; }

/* кикер — золотой лейбл капсом над заголовком */
.kicker {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

/* ————— Шапка ————— */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12,15,20,0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--font-display);
  font-size: 24px; letter-spacing: 0.02em; color: var(--text);
}
.logo span { color: var(--gold); }
.logo__img { height: 30px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  font-size: 14px; letter-spacing: 0.02em; color: var(--text-2);
  position: relative; padding: 6px 0; transition: color 0.25s ease;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--gold); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--gold);
}
.nav-cta {
  padding: 10px 22px; border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold); font-size: 14px;
  transition: background 0.25s ease, color 0.25s ease;
}
.nav-cta:hover { background: var(--gold); color: #0C0F14; }

.burger {
  display: none; background: none; border: none; cursor: pointer;
  width: 42px; height: 42px; position: relative;
}
.burger span {
  display: block; width: 22px; height: 1.5px; background: var(--text);
  position: absolute; left: 10px; transition: 0.3s ease;
}
.burger span:nth-child(1){ top: 15px; }
.burger span:nth-child(2){ top: 21px; }
.burger span:nth-child(3){ top: 27px; }

/* ————— Hero ————— */
.hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0; z-index: -1;
}
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
  will-change: transform;
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-hero);
}
.hero__content {
  padding: 120px 0 96px; max-width: 760px;
}
.hero__title {
  font-size: clamp(40px, 6vw, 72px);
  margin-bottom: 22px;
}
.hero__title em { font-style: normal; color: var(--gold); }
.hero__lead { font-size: 18px; color: var(--text-2); max-width: 560px; margin-bottom: 36px; }
.hero__stats { display: flex; gap: 48px; margin-top: 8px; }
.hero__stat b {
  font-family: var(--font-display); font-size: 34px; font-weight: 500;
  color: var(--gold); display: block; line-height: 1;
}
.hero__stat span { font-size: 13px; color: var(--text-3); letter-spacing: 0.03em; }
.hero__scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 1px; height: 56px;
  background: linear-gradient(180deg, var(--gold), transparent);
  opacity: 0.7;
}

/* ————— Кнопки ————— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 28px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  border: none; cursor: pointer; transition: all 0.3s ease;
  font-family: var(--font-body);
}
.btn--primary {
  background: var(--grad-gold); color: #0C0F14;
  box-shadow: 0 8px 24px rgba(201,169,106,0.22);
}
.btn--primary:hover { filter: brightness(1.06); color: #0C0F14; box-shadow: 0 10px 32px rgba(201,169,106,0.32); }
.btn--ghost {
  background: transparent; border: 1px solid var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--sm { height: 40px; padding: 0 20px; font-size: 13px; }
.btn--block { width: 100%; }

/* ————— Секции ————— */
.section { padding: 96px 0; }
.section--tight { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); margin: 0; }

/* ————— Карточка объекта ————— */
.grid { display: grid; gap: 28px; }
.grid--catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.card:hover { border-color: var(--line); box-shadow: var(--shadow-gold); }
.card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--surface-2); }
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}
.card:hover .card__media img { transform: scale(1.045); }
.card__badges { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; }
.card__price {
  position: absolute; bottom: 14px; left: 14px;
  background: rgba(12,15,20,0.72); backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft); border-radius: 999px;
  padding: 7px 14px; font-size: 14px; color: var(--text);
}
.card__price b { color: var(--gold); font-weight: 600; }
.card__body { padding: 22px; }
.card__title { font-size: 21px; margin-bottom: 6px; }
.card__meta { font-size: 13px; color: var(--text-3); letter-spacing: 0.02em; margin-bottom: 14px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; }

/* ————— Бейджи ————— */
.badge {
  font-size: 11px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; padding: 6px 12px; border-radius: 3px;
  background: #0C0F14;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 4px 14px rgba(0,0,0,0.35);
}
.badge--select {
  color: #E7E3DA; border: 1px solid #3A404C;
}
.badge--signature {
  color: #C9A96A; border: 1px solid rgba(201, 169, 106, 0.65);
}
.badge--private {
  background: #C9A96A; color: #0C0F14;
  border: 1px solid #D7BC82;
  box-shadow: 0 0 14px rgba(201,169,106,0.35);
}
.badge--photo {
  color: #C3C8CF; border: 1px dashed rgba(184, 189, 198, 0.55);
}
.badge--render {
  color: #7FA8A0; border: 1px solid rgba(127, 168, 160, 0.55);
}

/* ————— Карта районов (схематичная) ————— */
  font-family: var(--font-display); font-size: 24px; font-weight: 500;
  letter-spacing: -0.01em; margin: 0; color: var(--text);
}

/* ————— Легенда сегментов ————— */
.seg-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin: 0 0 30px; padding: 14px 18px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--surface);
}
.seg-legend__title { color: var(--text-3); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.seg-legend__item { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.seg-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.seg-dot--select { background: rgba(127,168,160,0.35); border: 1.5px solid #7FA8A0; }
.seg-dot--signature { background: rgba(201,169,106,0.3); border: 1.5px solid var(--gold); }
.seg-dot--private { background: var(--gold); box-shadow: 0 0 8px rgba(201,169,106,0.6); }

/* ————— Фильтры ————— */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filters__group { display: flex; flex-wrap: wrap; gap: 8px; }
.filters__sep { width: 1px; background: var(--line-soft); margin: 0 8px; }
.chip {
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-soft);
  color: var(--text-2); font-size: 13px; letter-spacing: 0.01em;
  transition: all 0.25s ease; user-select: none;
}
.chip:hover { border-color: var(--gold-dim); color: var(--text); }
.chip.active {
  background: var(--gold); color: #0C0F14; border-color: var(--gold);
  font-weight: 600;
}

/* ————— Заглушка фото ————— */
.placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(201,169,106,0.06), transparent 60%),
    var(--surface-2);
}
.placeholder__mono {
  font-family: var(--font-display); font-size: 56px; color: var(--gold-dim);
  line-height: 1;
}
.placeholder__label {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-3);
}

/* ————— Галерея объекта ————— */
.object-hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.gallery { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.gallery__main { aspect-ratio: 4/3; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 10px; padding: 12px; }
.gallery__thumb {
  width: 84px; height: 60px; border-radius: var(--radius-sm); overflow: hidden;
  cursor: pointer; border: 1px solid transparent; opacity: 0.6;
  transition: all 0.25s ease;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.active { border-color: var(--gold); opacity: 1; }
.gallery__thumb:hover { opacity: 1; }

/* ————— Lightbox ————— */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,8,11,0.94);
  display: none; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.lightbox__close {
  position: absolute; top: 24px; right: 30px;
  background: none; border: none; color: var(--text); font-size: 40px;
  cursor: pointer; line-height: 1;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 1px solid var(--line-soft); color: var(--text);
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 22px;
  transition: 0.25s ease;
}
.lightbox__nav:hover { border-color: var(--gold); color: var(--gold); }
.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }

/* ————— Инфоблоки объекта ————— */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 0; }
.fact { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 16px 18px; }
.fact b { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.fact span { font-size: 17px; color: var(--text); font-weight: 500; }
.fact span.gold { color: var(--gold); }

.panel {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 30px; margin-bottom: 22px;
}
.panel h3 { font-size: 24px; margin-bottom: 16px; }
.panel--accent { border-color: var(--line); background: var(--grad-surface); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 13px; padding: 6px 14px; border-radius: 999px;
  background: rgba(231,227,218,0.05); border: 1px solid var(--line-soft); color: var(--text-2);
}
.tag--good { color: var(--ok); border-color: rgba(95,168,140,0.35); background: rgba(95,168,140,0.08); }
.tag--warn { color: #D9A867; border-color: rgba(217,168,103,0.35); background: rgba(217,168,103,0.08); }

/* ————— Карта ————— */
.map-wrap { position: relative; z-index: 0; isolation: isolate; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-soft); }
#map { height: 68vh; background: var(--surface-2); }
.map-listing { display: grid; grid-template-columns: 340px 1fr; gap: 24px; }
.map-side { max-height: 68vh; overflow-y: auto; padding-right: 6px; }
.map-side .card { margin-bottom: 14px; }
.map-side .card__media { aspect-ratio: 16/9; }

/* маркер THAVEORA */
.thaveora-pin {
  background: var(--gold); color: #0C0F14; border-radius: 999px;
  padding: 5px 13px; font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
  border: 2px solid #0C0F14; box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  white-space: nowrap; text-align: center;
  transform: translate(-50%, -50%);
}
.thaveora-pin::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 7px solid var(--gold);
}

/* ————— Контакты ————— */
.contact-row { display: flex; gap: 16px; flex-wrap: wrap; }
.contact-tile {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 22px; transition: all 0.3s ease;
}
.contact-tile:hover { border-color: var(--gold); box-shadow: var(--shadow-gold); }
.contact-tile__icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--surface-2); color: var(--gold);
}
.contact-tile b { display: block; color: var(--text); }
.contact-tile span { font-size: 13px; color: var(--text-3); }

/* ————— Футер ————— */
.site-footer {
  border-top: 1px solid var(--line-soft); padding: 56px 0 32px; margin-top: 60px;
}
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 40px; }
.site-footer h4 { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.site-footer a { display: block; color: var(--text-2); margin-bottom: 10px; font-size: 14px; }
.site-footer a:hover { color: var(--gold); }
.site-footer__legal { border-top: 1px solid var(--line-soft); padding-top: 22px; font-size: 12px; color: var(--text-3); }

/* ————— Motion (по ревизии sol: без подъёма карточек, reveal однократный) ————— */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__media img { transform: none !important; }
  .card:hover .card__media img { transform: none !important; }
}

/* фокус-видимость (правка sol) */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ————— Чат-бот ————— */
.bot-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 150;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--grad-gold); color: #0C0F14;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; box-shadow: 0 10px 30px rgba(201,169,106,0.35);
  font-size: 24px; transition: transform 0.3s ease;
}
.bot-fab:hover { transform: scale(1.06); }
.bot-window {
  position: fixed; right: 24px; bottom: 96px; z-index: 150;
  width: 360px; max-width: calc(100vw - 40px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-pop); display: none; flex-direction: column;
}
.bot-window.open { display: flex; }
.bot-window__head {
  background: var(--grad-surface); padding: 18px 20px; border-bottom: 1px solid var(--line-soft);
}
.bot-window__head b { color: var(--text); }
.bot-window__head span { font-size: 12px; color: var(--ok); display: flex; align-items: center; gap: 6px; }
.bot-window__body { padding: 18px 20px; max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.bot-msg { max-width: 85%; padding: 11px 15px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.bot-msg--bot { background: var(--surface-2); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.bot-msg--user { background: var(--grad-gold); color: #0C0F14; align-self: flex-end; border-bottom-right-radius: 4px; }
.bot-window__foot { padding: 12px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; }
.bot-window__foot input {
  flex: 1; background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 999px; padding: 11px 16px; color: var(--text); font-size: 14px;
}
.bot-window__foot input:focus { outline: none; border-color: var(--gold-dim); }
.bot-send {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad-gold); color: #0C0F14; font-size: 18px;
}

/* ————— Адаптив ————— */
@media (max-width: 1024px) {
  .grid--catalog { grid-template-columns: repeat(2, 1fr); }
  .object-hero { grid-template-columns: 1fr; }
  .map-listing { grid-template-columns: 1fr; }
  .map-side { max-height: none; }
  #map { height: 52vh; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .burger { display: block; }
  .grid--catalog, .grid--featured { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .hero__stats { gap: 28px; flex-wrap: wrap; }
  .facts { grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .container { padding: 0 18px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; }
  .filters__group { flex-wrap: nowrap; }
  .filters__sep { display: none; }
}

/* ===== THAVEORA v14 — передовые эффекты ===== */
/* Ken Burns на hero */
.hero__media img { animation: kenburns 26s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02) } to { transform: scale(1.10) translateY(-1.5%) } }

/* Золотой shimmer на ключевых заголовках (однократный проход) */
.hero__title, .section-head h2 {
  background: linear-gradient(110deg, var(--gold) 42%, #F4E3C1 50%, var(--gold) 58%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 8s ease-in-out infinite;
}
@keyframes shimmer { 0%,100% { background-position: 100% 0 } 50% { background-position: 0 0 } }

/* Spotlight за курсором (только точный указатель) */
@media (hover:hover) and (pointer:fine) {
  .card { position: relative; overflow: hidden; }
  .card::after {
    content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
    background: radial-gradient(420px circle at var(--mx,50%) var(--my,50%), rgba(201,169,106,.13), transparent 42%);
    opacity:0; transition: opacity .3s;
  }
  .card:hover::after { opacity:1; }
}

/* Плёночное зерно (статичное, дешёвое) */
body::before {
  content:''; position:fixed; inset:0; pointer-events:none; z-index:2000; opacity:.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Изображения видимы сразу: aspect-ratio резервирует место, blur-up больше не прячет кадр (фикс LCP) */
.card__media img, .gallery__main img, .gallery__thumb img {
  opacity: 1;
  transition: opacity .4s ease;
}

/* Защита от горизонтального переполнения карточек: грид-трек не должен
   распираться контентом (картинки/длинные названия). content-visibility
   намеренно убран — он задавал минимальную ширину трекам и вызывал
   горизонтальный скролл, плюс ломал дерево доступности и поиск по странице. */
.grid--catalog .card-wrap,
.grid--catalog .card,
.grid--featured .card-wrap,
.grid--featured .card { min-width: 0; }

/* Каскадный reveal (переменная --d ставится из JS) */
.reveal { transition-delay: var(--d, 0ms); }

/* Тонкий золотой scroll-progress */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--gold), #F4E3C1);
  transform-origin: 0 50%; transform: scaleX(0); z-index: 1000; }

/* Админка: вкладка текстов */
.texts-schema-item { padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid transparent; margin-bottom: 5px; transition: 0.2s; }
.texts-schema-item:hover { background: var(--surface-2); }
.texts-schema-item.active { border-color: var(--gold); background: var(--surface-2); }
.texts-schema-item b { display:block; font-size:13px; }
.texts-schema-item span { font-size:11px; color: var(--text-3); }

/* === Виртуальный тур 360° === */
.tour-type {
  display:inline-block; font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--gold); font-weight:700; margin-bottom:14px;
}
.tour-chips {
  display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px;
}
.tour-chip {
  appearance:none; border:1px solid var(--line, rgba(138,116,72,.35)); background:transparent;
  color:var(--text-2); font-family:var(--font-body); font-size:13px; padding:8px 16px;
  border-radius:100px; cursor:pointer; transition:.25s; letter-spacing:.02em;
}
.tour-chip:hover { border-color:var(--gold); color:var(--gold); }
.tour-chip.active { background:var(--gold); color:#111; border-color:var(--gold); }
.tour-frame-wrap {
  position:relative; border-radius:14px; overflow:hidden; border:1px solid var(--line, rgba(138,116,72,.25));
  background:#000; box-shadow:0 20px 60px -30px rgba(0,0,0,.7);
}
.tour-frame-wrap iframe {
  display:block; width:100%; height:520px; border:0; background:#000;
}
.tour-actions { margin-top:14px; }
.btn--sm { padding:9px 18px; font-size:13px; }
@media (max-width:720px) {
  .tour-frame-wrap iframe { height:340px; }
}

/* === Tilt + блик (desktop) === */
@media (hover: hover) and (pointer: fine) {
  .card { transform-style: preserve-3d; transition: transform .4s ease; will-change: transform; }
  .card__media::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: radial-gradient(420px circle at var(--mx,50%) var(--my,50%),
                rgba(201,169,106,.20), transparent 62%);
    opacity: 0; transition: opacity .3s;
  }
  .card:hover .card__media::after { opacity: 1; }
}

/* ============================================================================
   v18 — «Как мы работаем» (карточки с цифрами) + анти-дешёвка полировка
   (по меморандуму Claude Fable 5: воздух, иерархия размеров, сдержанные ховеры)
   ========================================================================== */

/* Карточки «Как мы работаем» */
.how-card {
  padding: 34px 30px;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
  position: relative; overflow: hidden;
}
.how-card::before {
  content: ""; position: absolute; top: 0; left: 30px; right: 30px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .35s ease;
}
.how-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: var(--shadow-gold); }
.how-card:hover::before { opacity: .55; }
.how-card__num {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.2vw, 54px);
  font-weight: 500; line-height: 1;
  color: var(--gold); letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.how-card__title {
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text); margin-bottom: 12px;
}
.how-card__text { font-size: 14px; line-height: 1.65; color: var(--text-2); margin: 0; max-width: 34ch; }

/* ————— Карта: кластеры и переключатель ————— */
.thaveora-cluster {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-family: var(--font-display); font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5); text-align: center;
}
.thaveora-cluster--sm { width: 34px; height: 34px; font-size: 13px;
  background: radial-gradient(circle at 35% 30%, #D9BC80, #C9A96A); border: 2px solid #0A1117; color: #0A1117; }
.thaveora-cluster--md { width: 44px; height: 44px; font-size: 15px;
  background: radial-gradient(circle at 35% 30%, #C9A96A, #A9884C); border: 1.5px solid #E7E3DA; color: #0A1117;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 0 4px rgba(201,169,106,0.35); }
.thaveora-cluster--lg { width: 56px; height: 56px; font-size: 17px;
  background: radial-gradient(circle at 35% 30%, #B8944F, #8F6F35); border: 2px solid #E7E3DA; color: #E7E3DA;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 0 6px rgba(201,169,106,0.25); }
.map-toggle {
  position: absolute; top: 14px; right: 14px; z-index: 500;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-soft);
  color: var(--text-2); font-size: 13px; letter-spacing: 0.02em;
  transition: all .25s ease;
}
.map-toggle:hover { border-color: var(--gold-dim); color: var(--text); }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }

/* ————— Принципы работы (4 в ряд) ————— */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0 0; }
.principle {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 22px 20px; position: relative; overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.principle::before {
  content: ""; position: absolute; top: 0; left: 20px; right: 20px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0; transition: opacity .3s ease;
}
.principle:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: var(--shadow-gold); }
.principle:hover::before { opacity: .55; }
.principle__num {
  font-family: var(--font-display); font-size: 32px; font-weight: 500; line-height: 1;
  color: var(--gold); margin-bottom: 14px; letter-spacing: -0.02em;
}
.principle h4 { font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); margin: 0 0 10px; }
.principle p { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0; }

/* ————— Поиск по FAQ ————— */
.faq-search input {
  width: 100%; padding: 14px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-soft); color: var(--text);
  font-size: 15px; outline: none; transition: border-color .25s ease;
}
.faq-search input::placeholder { color: var(--text-3); }
.faq-search input:focus { border-color: var(--gold-dim); }
.faq-search__label { display:block; font-size:13px; font-weight:600; color:var(--text-2); margin-bottom:8px; }
.faq-search__hint { font-size:12.5px; color:var(--text-3); margin:8px 0 0; }

/* Анти-дешёвка: воздух и ритм */
.section-head { margin-bottom: 52px; }
.section-head h2 { letter-spacing: -0.015em; }
h1 { letter-spacing: -0.02em; }
.hero__title { letter-spacing: -0.02em; }
.hero__lead { max-width: 54ch; }
body { hyphens: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* About — премиальная типографика: сбалансированный заголовок, читаемый intro */
html[lang="en"] .about-title { max-width: 24ch; }
.about-intro { max-width: 62ch; }
.about-intro p { font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); color: var(--text-2); line-height: 1.62; margin: 0 0 1em; text-wrap: pretty; }
.about-intro p:last-child { margin-bottom: 0; }
html[lang="ru"] .about-intro p { hyphens: auto; }
html[lang="en"] .about-intro p { hyphens: none; }

/* Футер: подпись под логотипом — сдержанно и с воздухом */
.site-footer__grid { padding-top: 8px; }
.site-footer__grid .logo { margin-bottom: 4px; }

@media (max-width: 720px) {
  .how-card { padding: 26px 22px; }
  .section-head { margin-bottom: 36px; }
}

/* ===================== FAQ (аккордеон) ===================== */
.faq-toolbar { display:flex; flex-wrap:wrap; gap:8px; }
.faq-chip {
  appearance:none; border:1px solid var(--line-soft); background:transparent;
  color:var(--text-2); font-size:13px; font-weight:500; line-height:1;
  padding:9px 14px; border-radius:999px; cursor:pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.faq-chip:hover { color:var(--text); border-color:var(--line); }
.faq-chip.is-active { color:var(--bg); background:var(--gold); border-color:var(--gold); }
.faq-chip.is-hidden { display:none; }
.faq-result { margin:14px 0 0; font-size:14px; color:var(--gold-bright); font-weight:500; }
.faq-result:empty { display:none; }

.faq-cat { margin-top:34px; }
.faq-cat.is-hidden { display:none; }
.faq-item.is-hidden { display:none; }
.faq-cat__title {
  font-family:var(--font-display); font-weight:500; font-size:22px; color:var(--gold-bright);
  margin:0 0 14px; letter-spacing:.01em;
}

.faq-item {
  border:1px solid var(--line-soft); border-radius:var(--radius-sm);
  background:var(--surface); overflow:hidden; margin-bottom:10px;
  transition: border-color .25s ease, background .25s ease;
}
.faq-item.is-open { border-color:var(--line); background:var(--surface-2); }

.faq-q {
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px;
  background:none; border:none; cursor:pointer; text-align:left;
  padding:17px 18px; color:var(--text); font-size:15.5px; font-weight:600; line-height:1.4;
}
.faq-q__icon { position:relative; flex:0 0 auto; width:16px; height:16px; }
.faq-q__icon::before, .faq-q__icon::after {
  content:""; position:absolute; left:0; top:7px; width:16px; height:1.6px;
  background:var(--gold); border-radius:2px; transition: transform .3s ease, opacity .3s ease;
}
.faq-q__icon::after { transform:rotate(90deg); }
.faq-item.is-open .faq-q__icon::after { transform:rotate(0); opacity:0; }

.faq-a { max-height:0; overflow:hidden; transition:max-height .38s cubic-bezier(.4,0,.2,1); }
.faq-a__inner { padding:0 18px 18px; color:var(--text-2); font-size:15px; line-height:1.7; }
.faq-a__inner b, .faq-a__inner strong { color:var(--text); font-weight:600; }
.faq-a__inner ul { margin:8px 0; padding-left:20px; }
.faq-a__inner li { margin:5px 0; }
.faq-a__inner table {
  width:100%; border-collapse:collapse; margin:12px 0 4px; font-size:13.5px;
}
.faq-a__inner table td {
  border:1px solid var(--line-soft); padding:9px 11px; color:var(--text-2);
}
.faq-a__inner table td:first-child { color:var(--text); font-weight:600; }
.faq-a__inner table tr:first-child td { color:var(--gold-bright); font-weight:600; }


/* ————— Карта районов: подсветка результата ————— */
#catalog-grid.flash {
  animation: catalog-flash 1.2s ease;
  border-radius: var(--radius);
}
@keyframes catalog-flash {
  0% { box-shadow: 0 0 0 0 rgba(201,169,106,0.0); }
  25% { box-shadow: 0 0 0 3px rgba(201,169,106,0.55); }
  100% { box-shadow: 0 0 0 0 rgba(201,169,106,0.0); }
}

/* ————— v25: карта в каталоге + hover-связь маркер/карточка + pulse + мини-карта ————— */
.catalog-map { margin-bottom: 28px; }
#catalog-map { height: 52vh; min-height: 420px; max-height: 560px; background: var(--surface-2); }

/* подсветка пина при наведении (класс ставится на обёртку .leaflet-marker-icon) */
.thaveora-pin { transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }
.leaflet-marker-icon.pin--hover .thaveora-pin {
  transform: translate(-50%, -50%) scale(1.16);
  background: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(201,169,106,0.35), 0 6px 20px rgba(0,0,0,0.55);
}

/* подсветка карточки при наведении на маркер (и наоборот) */
.card--map-hover {
  border-color: var(--gold) !important;
  box-shadow: var(--shadow-gold) !important;
}

/* pulse-анимация при deep-link */
.thaveora-pin.is-pulsing::before {
  content: ""; position: absolute; inset: -9px; border-radius: 999px;
  border: 2px solid rgba(201,169,106,0.65);
  animation: thaveora-pulse 1.2s ease-out var(--pulse-iterations, 2);
  pointer-events: none;
}
@keyframes thaveora-pulse {
  0%   { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.7);  opacity: 0; }
}

/* кликабельная мини-карта на object.html */
.mini-map-wrap { position: relative; }
.mini-map-overlay {
  position: absolute; inset: 0; z-index: 1000; display: flex;
  align-items: flex-end; justify-content: flex-end; padding: 14px; text-decoration: none;
}
.mini-map-overlay span {
  background: rgba(12,15,20,0.82); color: var(--gold); border: 1px solid rgba(201,169,106,0.4);
  padding: 9px 16px; border-radius: 999px; font-size: 13px; letter-spacing: 0.02em;
  opacity: 0; transform: translateY(6px); transition: all 0.25s ease;
}
.mini-map-wrap:hover .mini-map-overlay span,
.mini-map-overlay:hover span { opacity: 1; transform: none; }

@media (max-width: 760px) {
  #catalog-map { height: 44vh; min-height: 320px; }
}


/* ============================================================================
   v30 — 7 UX-пунктов: избранное, хлебные крошки, sticky CTA, форма, подъём карточки
   ============================================================================ */

/* Карточка-обёртка: сетка строится по ней; контролы — соседи ссылки (валидный HTML) */
.card-wrap { position: relative; display: block; }
.card { display: block; }

/* Сердечко избранного */
.card__fav {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,15,20,0.55); border: 1px solid rgba(255,255,255,0.14);
  color: #E7E3DA; cursor: pointer; backdrop-filter: blur(8px);
  transition: transform .2s cubic-bezier(.22,1,.36,1), background .2s ease, color .2s ease, border-color .2s ease;
}
.card__fav svg { fill: transparent; stroke: currentColor; }
.card__fav:hover { background: rgba(12,15,20,0.82); transform: scale(1.08); }
.card__fav.filled { color: var(--gold); border-color: rgba(201,169,106,.5); }
.card__fav.filled svg { fill: var(--gold); stroke: var(--gold); }
.card__fav:focus-visible, .card__pdf:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* PDF-брошюра на карточке */
.card__pdf {
  position: absolute; top: 64px; right: 12px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,15,20,0.55); border: 1px solid rgba(255,255,255,0.14);
  color: var(--text-3); backdrop-filter: blur(8px);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.card__pdf svg { fill: none; stroke: currentColor; }
.card__pdf:hover { color: var(--gold); border-color: rgba(201,169,106,.5); }

/* Подъём карточки при наведении (desktop) */
@media (hover:hover) and (pointer:fine) {
  .card-wrap { transition: transform .24s cubic-bezier(.22,1,.36,1); }
  .card-wrap:hover, .card-wrap:focus-within { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .card-wrap:hover, .card-wrap:focus-within { transform: none; }
  .card__fav, .card__pdf { transition: none; }
}

/* Хлебные крошки */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13.5px; letter-spacing: .02em; color: var(--text-3);
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--text-3); text-decoration: none; transition: color .2s ease; }
.breadcrumbs a:hover { color: #E7E3DA; }
.breadcrumbs [aria-current="page"] { color: #E7E3DA; }
.breadcrumbs__sep { color: var(--text-3); opacity: .5; }

/* Sticky CTA */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 140;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .3s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
.sticky-cta.show { transform: translateY(0); pointer-events: auto; }
.sticky-cta__inner {
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  background: rgba(22,26,33,0.94); backdrop-filter: blur(12px);
  border: 1px solid rgba(201,169,106,0.28); border-radius: 999px;
  padding: 10px 12px 10px 22px; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.sticky-cta__text { flex: 1; min-width: 0; }
.sticky-cta__text b { display: block; font-size: 14px; color: var(--text); font-weight: 600; }
.sticky-cta__text span { font-size: 12px; color: var(--text-3); }
.sticky-cta__btn {
  flex-shrink: 0; height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--grad-gold); color: #0C0F14; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; letter-spacing: .02em;
  transition: filter .25s ease, transform .2s ease;
}
.sticky-cta__btn:hover { filter: brightness(1.07); }
.sticky-cta__btn:active { transform: scale(.98); }
.sticky-cta__close {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: transparent; border: none; color: var(--text-3); cursor: pointer; font-size: 20px;
}
.sticky-cta__close:hover { color: var(--text); }

/* Модал формы «за 60 секунд» */
.lead-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.lead-modal.open { display: block; }
.lead-modal__overlay { position: absolute; inset: 0; background: rgba(6,8,11,0.72); backdrop-filter: blur(3px); }
.lead-modal__panel {
  position: relative; max-width: 460px; margin: 8vh auto 0; width: calc(100% - 36px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 30px 28px; box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: lead-in .28s cubic-bezier(.22,1,.36,1);
}
@keyframes lead-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.lead-modal__close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--text-3); cursor: pointer; font-size: 20px;
}
.lead-modal__close:hover { color: var(--text); }
.lead-modal__panel h3 { margin: 8px 0 6px; font-size: 24px; }
.lead-modal__sub { color: var(--text-2); font-size: 14px; line-height: 1.6; margin: 0 0 20px; }
.lead-field { display: block; margin-bottom: 14px; }
.lead-field span { display: block; font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; letter-spacing: .02em; }
.lead-field input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 12px;
  background: var(--bg); border: 1px solid rgba(231,227,218,0.12); color: var(--text);
  font-family: var(--font-body); font-size: 14px; transition: border-color .2s ease, box-shadow .2s ease;
}
.lead-field input::placeholder { color: var(--text-3); }
.lead-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,106,0.16); }
.lead-field--error input { border-color: #E08577; }
.lead-modal__consent { font-size: 11.5px; color: var(--text-3); margin: 12px 0 0; text-align: center; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(12px);
  background: var(--surface); border: 1px solid rgba(201,169,106,0.35); color: var(--text);
  padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Счётчики: стабильная ширина цифр */
[data-count], .hero__stat b, .how-card__num { font-variant-numeric: tabular-nums; }

/* Навигация: избранное */
.nav-fav {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px;
  border: 1px solid var(--line-soft); border-radius: 999px; color: var(--text-2);
  font-size: 13px; text-decoration: none; margin-right: 10px; transition: all .25s ease;
}
.nav-fav:hover { border-color: var(--gold-dim); color: var(--text); }
.nav-fav.has-favs { border-color: rgba(201,169,106,0.5); color: var(--gold); }
.nav-fav b { font-weight: 600; }

/* Кнопка избранного на странице объекта */
.obj-fav {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-soft);
  color: var(--text-2); cursor: pointer; font-family: var(--font-body); font-size: 13px;
  transition: all .25s ease;
}
.obj-fav svg { fill: transparent; stroke: currentColor; width: 19px; height: 19px; }
.obj-fav:hover { border-color: var(--gold-dim); color: var(--text); }
.obj-fav.filled { color: var(--gold); border-color: rgba(201,169,106,.5); }
.obj-fav.filled svg { fill: var(--gold); stroke: var(--gold); }

@media (max-width: 720px) {
  .sticky-cta__text span { display: none; }
  .sticky-cta__inner { padding-left: 16px; }
  .breadcrumbs { font-size: 12.5px; }
}


/* ============================================================================
   THAVEORA v34 — светлая тема, сортировка, lightbox-свайп, районы, переключатель темы
   ========================================================================== */

/* ————— Светлая тема ————— */
[data-theme="light"] {
  --bg:            #F6F4EF;
  --bg-elev:       #FFFFFF;
  --surface:       #FFFFFF;
  --surface-2:     #F0EDE6;
  --surface-3:     #E8E4DB;

  --gold:          #8A6A33;
  --gold-bright:   #6E5426;
  --gold-dim:      #A98A52;
  --eucalyptus:    #3E6E63;
  --eucalyptus-dim:#2F574E;

  --text:          #1C1E22;
  --text-2:        #45494F;
  --text-3:        #63686F;

  --line:          rgba(138,106,51,0.20);
  --line-soft:     rgba(28,30,34,0.12);
  --ok:            #3E7D63;
  --bad:           #B3574A;

  --shadow-card:   0 1px 0 rgba(0,0,0,0.04) inset, 0 8px 28px rgba(0,0,0,0.10);
  --shadow-pop:    0 24px 64px rgba(0,0,0,0.22);
  --shadow-gold:   0 0 0 1px rgba(138,106,51,0.30), 0 0 32px rgba(138,106,51,0.10);

  --grad-surface:  linear-gradient(180deg, #FFFFFF 0%, #F4F1EA 100%);
  --grad-gold:     linear-gradient(135deg, #D7BC82 0%, #C9A96A 45%, #A9854F 100%);
  --grad-hero:     linear-gradient(180deg, rgba(246,244,239,0.10) 0%,
                    rgba(246,244,239,0.62) 58%, #F6F4EF 100%);
}

/* Точечные правки светлой темы: элементы с фиксированным тёмным фоном/золотом */
[data-theme="light"] .site-header { background: rgba(255,255,255,0.84); }
[data-theme="light"] .breadcrumbs a:hover,
[data-theme="light"] .breadcrumbs [aria-current="page"] { color: var(--text); }
[data-theme="light"] .tag { background: rgba(28,30,34,0.05); }
[data-theme="light"] .chip.active { background: var(--grad-gold); color: #0C0F14; }
[data-theme="light"] .nav-cta:hover { background: var(--grad-gold); color: #0C0F14; }
[data-theme="light"] .card__price { color: #E7E3DA; }
[data-theme="light"] .card__price b { color: #C9A96A; }
[data-theme="light"] .sticky-cta__inner { background: rgba(255,255,255,0.94); }

/* Lightbox всегда тёмный — контролы всегда светлые, не зависят от темы */
.lightbox__close { color: #E7E3DA; }
.lightbox__nav { color: #E7E3DA; border-color: rgba(231,227,218,0.25); }
.lightbox__nav:hover { border-color: #C9A96A; color: #C9A96A; }
.lightbox__nav:disabled { opacity: 0.3; cursor: default; }
.lightbox__nav:disabled:hover { border-color: rgba(231,227,218,0.25); color: #E7E3DA; }
.lightbox__counter {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: 13px; letter-spacing: 0.06em; color: #E7E3DA;
  background: rgba(12,15,20,0.6); padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(231,227,218,0.16);
}

/* ————— Переключатель темы ————— */
.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.lang-toggle:hover { border-color: var(--gold); transform: translateY(-1px); }
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  background: none; border: 1px solid var(--line-soft);
  color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--gold-dim); }

/* ————— Панель сортировки каталога ————— */
.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: 4px 0 18px; flex-wrap: wrap;
}
.catalog-toolbar__count { font-size: 13.5px; color: var(--text-3); }
.catalog-sort { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.catalog-sort__label { color: var(--text-3); }
.catalog-sort select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-soft); border-radius: 999px;
  padding: 9px 38px 9px 18px; font-size: 13px; cursor: pointer;
  font-family: var(--font-body);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C9A96A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  transition: border-color 0.25s ease;
}
.catalog-sort select:hover { border-color: var(--gold-dim); }
.catalog-sort select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,106,0.16); }

/* ————— Страница «Районы Пхукета» ————— */
.dist-hero {
  padding: 90px 0 56px; text-align: center;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, rgba(201,169,106,0.10), transparent 60%), var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.dist-hero__title { font-size: clamp(40px,6vw,64px); margin-bottom: 16px; }
.dist-hero__lead { font-size: 18px; color: var(--text-2); max-width: 720px; margin: 0 auto 36px; line-height: 1.7; }
.dist-hero__stats { display: flex; justify-content: center; gap: 52px; flex-wrap: wrap; }
.dist-stat { text-align: center; }
.dist-stat b { display: block; font-family: var(--font-display); font-size: 40px; color: var(--gold); line-height: 1; margin-bottom: 6px; }
.dist-stat span { font-size: 12px; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; }

.grid--districts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.dist-card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.dist-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-pop); border-color: var(--line); }
.dist-card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
.dist-card__media picture, .dist-card__media img { width: 100%; height: 100%; object-fit: cover; }
.dist-card__badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(12,15,20,0.72); color: #E7E3DA; font-size: 12px;
  padding: 5px 12px; border-radius: 999px; letter-spacing: 0.04em;
  backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.14);
}
.dist-card__photolabel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, transparent, rgba(6,8,11,0.78));
  color: #C3C8CF; font-size: 11px; letter-spacing: 0.05em;
  padding: 26px 16px 10px;
}
.dist-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.dist-card__title { font-size: 24px; margin-bottom: 6px; }
.dist-card__tagline { font-size: 14px; color: var(--gold); margin-bottom: 12px; font-weight: 500; }
.dist-card__desc { font-size: 14.5px; color: var(--text-2); line-height: 1.7; margin-bottom: 16px; }
.dist-card__vibe { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag--vibe { font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 4px 12px; }
.dist-card__places { border-top: 1px solid var(--line-soft); padding-top: 16px; margin-bottom: 18px; }
.dist-card__places h4 { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.dist-place { margin-bottom: 10px; }
.dist-place b { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.dist-place span { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.dist-card__actions { margin-top: auto; }
.dist-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.dist-chips .chip { border-radius: 999px; }

.panel--cta {
  text-align: center; padding: 48px 32px;
  background: var(--grad-surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
}

@media (max-width: 1024px) {
  .grid--districts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--districts { grid-template-columns: 1fr; }
  .dist-hero { padding: 60px 0 40px; }
  .dist-hero__stats { gap: 32px; }
}

/* ============================================================================
   Схематичная SVG-карта районов (v37)
   ============================================================================ */
.dist-map-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px;
  align-items: stretch;
}
.dist-map-svg-wrap #districts-map { height: 100%; }
.dist-map-svg-wrap {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg); border: 1px solid var(--line-soft);
  background: radial-gradient(130% 120% at 50% 22%, #1B2533 0%, #0D131B 55%, #0A0E14 100%);
  height: 640px;
}
[data-theme="light"] .dist-map-svg-wrap {
  background: radial-gradient(130% 120% at 50% 22%, #E9EEF2 0%, #DDE3E9 55%, #D2D9E0 100%);
}
.dist-svg { display: block; width: 100%; height: 100%; }
.dist-svg .sea-contour { fill: none; stroke: var(--line-soft); vector-effect: non-scaling-stroke; }
.dist-svg .sea-contour.c2 { opacity: 0.55; }
.dist-svg .sea-contour.c3 { opacity: 0.3; }
.dist-satellite { fill: #26384E; stroke: rgba(201,169,106,0.4); stroke-width: 1px; vector-effect: non-scaling-stroke; }
[data-theme="light"] .dist-satellite { fill: #E9E4D5; stroke: rgba(169,133,79,0.35); }
.dist-island {
  fill: #33465F; stroke: rgba(201,169,106,0.7);
  stroke-width: 1.5px; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.45));
}
[data-theme="light"] .dist-island { fill: #EFEAE0; stroke: rgba(169,133,79,0.75); }

.dist-zone { pointer-events: auto; cursor: pointer; transition: opacity .35s ease, filter .3s ease; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.dist-zone:hover, .dist-zone.hot, .dist-zone.active { filter: brightness(1.22) saturate(1.08); }
.dist-marker { cursor: pointer; }
.dist-marker .marker-halo { fill: var(--surface-3); opacity: 0; transition: opacity .3s ease; }
.dist-marker .marker-dot { transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .3s ease; transform-origin: center; transform-box: fill-box; }
.dist-marker .marker-ring { fill: none; stroke: #0C0F14; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.dist-marker text.marker-num {
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  fill: #0C0F14; text-anchor: middle; dominant-baseline: central; pointer-events: none;
}
.dist-marker:hover .marker-dot, .dist-marker.hot .marker-dot,
.dist-marker.active .marker-dot { transform: scale(1.28); }
.dist-marker:hover .marker-halo, .dist-marker.hot .marker-halo,
.dist-marker.active .marker-halo { opacity: 0.35; }
.dist-marker:focus { outline: none; }

.dist-label { pointer-events: none; transition: opacity .35s ease; }
.dist-label .label-leader { stroke: var(--text-3); stroke-width: 1px; opacity: 0.45; vector-effect: non-scaling-stroke; }
.dist-label .label-name {
  font-family: var(--font-body); font-weight: 600; font-size: 13.5px; fill: #E7E3DA;
  paint-order: stroke; stroke: rgba(9,20,38,0.9); stroke-width: 3px; stroke-linejoin: round;
}
.dist-label .label-count {
  font-family: var(--font-body); font-weight: 500; font-size: 11.5px; fill: #A9ADB3;
  paint-order: stroke; stroke: rgba(9,20,38,0.9); stroke-width: 3px; stroke-linejoin: round;
}
.dist-label.hot .label-name,
.dist-label.active .label-name { fill: var(--gold); }

.dist-tooltip {
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.dist-tooltip.show { opacity: 1; }
.dist-tooltip .tip-bg { fill: var(--surface-3); stroke: var(--line); rx: 10px; }
[data-theme="light"] .dist-tooltip .tip-bg { fill: #FFFFFF; }
.dist-tooltip .tip-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; fill: var(--text); }
.dist-tooltip .tip-tag { font-family: var(--font-body); font-size: 12px; fill: var(--gold); }
.dist-tooltip .tip-meta { font-family: var(--font-body); font-size: 12px; fill: var(--text-2); }

/* Состояния фильтрации */
.dist-svg.is-active .dist-zone,
.dist-svg.is-active .dist-marker,
.dist-svg.is-active .dist-label { opacity: 0.13; }
.dist-svg.is-active .dist-zone.active,
.dist-svg.is-active .dist-marker.active,
.dist-svg.is-active .dist-label.active { opacity: 1; }

/* Легенда */
.dist-map-legend {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 14px;
  align-self: start; position: sticky; top: 96px;
}
.dist-legend-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px;
}
.dist-legend-head b { font-family: var(--font-display); font-size: 17px; letter-spacing: 0.01em; }
.dist-legend-reset {
  background: none; border: 1px solid var(--line-soft); color: var(--text-2);
  font-size: 12px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
}
.dist-legend-reset:hover { color: var(--gold); border-color: var(--line); }
.dist-legend-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 10px; cursor: pointer; text-align: left; color: var(--text);
  transition: background .2s ease, border-color .2s ease, opacity .3s ease;
}
.dist-legend-row:hover,
.dist-legend-row.hot { background: var(--surface-2); }
.dist-legend-row.active { background: var(--surface-2); border-color: var(--line); }
.dist-legend-row .swatch {
  flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(201,169,106,0.12);
}
.dist-legend-row .num {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--text-3); font-size: 11px; font-weight: 700;
}
.dist-legend-row .lname { flex: 1; min-width: 0; }
.dist-legend-row .lname b { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; }
.dist-legend-row .lname small { display: block; font-size: 11.5px; color: var(--text-3); }
.dist-legend-row .lcount {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--gold);
  background: rgba(201,169,106,0.1); padding: 2px 9px; border-radius: 999px;
}
.dist-legend-note { padding: 10px 6px 2px; font-size: 11.5px; color: var(--text-3); line-height: 1.5; }

@media (max-width: 900px) {
  .dist-map-layout { grid-template-columns: 1fr; }
  .dist-map-legend { position: static; order: 2; }
  .dist-map-svg-wrap { height: 560px; }
}
@media (max-width: 640px) {
  .dist-map-svg-wrap { height: 440px; }
}

/* Планировки (галерея) */
.floorplan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.floorplan-card { display: block; border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 12px; overflow: hidden; background: var(--bg-2, #111); transition: transform .2s, border-color .2s; }
.floorplan-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.floorplan-card img { width: 100%; height: 160px; object-fit: contain; background: #fff; }
.floorplan-card__label { display: block; padding: 8px 12px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); border-top: 1px solid var(--line, rgba(255,255,255,.1)); background: var(--bg-2, #111); }

/* Документы */
.doc-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.doc-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 12px; background: var(--bg-2, #111); text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.doc-item:hover { border-color: var(--gold); transform: translateY(-2px); }
.doc-item__icon { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--gold); border: 1px solid var(--gold); border-radius: 6px; padding: 3px 7px; }
.doc-item__label { flex: 1; font-weight: 500; }
.doc-item__cta { font-size: 13px; color: var(--gold); white-space: nowrap; }

/* Видеообзор */
.video-frame { position: relative; }
.video-frame video { display: block; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 14px; }
.video-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.video-meta__label { color: var(--text-2); font-size: 13px; letter-spacing: .02em; }
.video-meta__dur { color: var(--gold); font-family: var(--font-display); font-size: 14px; white-space: nowrap; }
