/* =========================================================
   Восток-Сервис Казахстан — стили лендинга
   Тёмно-синий премиум. Все значения в переменных.
   ========================================================= */

:root {
  --bg-0: #050d24;
  --bg-1: #0b1a3a;
  --bg-2: #0f2450;
  --bg-3: #142e63;

  --brand: #1d4e9e;
  --brand-2: #4a8bff;
  --brand-3: #7eb2ff;

  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-hi: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.1);
  --border-hi: rgba(255, 255, 255, 0.18);

  --text: #f5f8ff;
  --text-mute: #a9b6d3;
  --text-dim: #768199;

  --accent: #ffc857;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.5);
  --glow: 0 0 0 1px rgba(74, 139, 255, 0.35), 0 20px 60px rgba(29, 78, 158, 0.45);

  --container: 1200px;
  --header-h: 72px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.55;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
ul {
  list-style: none;
}
input {
  font: inherit;
  color: inherit;
}
input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* ---------- Background ---------- */
.bg-spots {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top left, #0c2050 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, #091536 0%, transparent 55%),
    linear-gradient(180deg, #050d24 0%, #040a1c 100%);
}
.spot {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 22s ease-in-out infinite alternate;
  will-change: transform;
}
.spot--a {
  width: 520px;
  height: 520px;
  background: #1d4e9e;
  top: -120px;
  left: -120px;
}
.spot--b {
  width: 480px;
  height: 480px;
  background: #4a8bff;
  bottom: -140px;
  right: -120px;
  animation-delay: -6s;
  opacity: 0.35;
}
.spot--c {
  width: 360px;
  height: 360px;
  background: #2a6bd1;
  top: 40%;
  left: 55%;
  animation-delay: -12s;
  opacity: 0.28;
}
@keyframes float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(40px, -30px, 0) scale(1.06); }
  100% { transform: translate3d(-30px, 40px, 0) scale(0.96); }
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  opacity: 0.6;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(5, 13, 36, 0.55);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.header.is-scrolled {
  background: rgba(5, 13, 36, 0.85);
  border-bottom-color: var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand__logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: transform 0.4s var(--ease);
}
.brand:hover .brand__logo {
  transform: scale(1.04);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  flex: 1;
}
.nav__link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-mute);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  transition: color 0.2s, background 0.2s;
}
.nav__link:hover {
  color: var(--text);
  background: var(--surface);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.lang {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.lang__btn {
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  color: var(--text-mute);
  transition: background 0.2s, color 0.2s;
}
.lang__btn:hover {
  color: var(--text);
}
.lang__btn.is-active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(29, 78, 158, 0.45);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(29, 78, 158, 0.4);
}
.btn--primary:hover {
  box-shadow: 0 20px 44px rgba(29, 78, 158, 0.55);
}
.btn--outline {
  background: var(--surface);
  border-color: var(--border-hi);
  color: var(--text);
}
.btn--outline:hover {
  background: var(--surface-hi);
  border-color: var(--brand-2);
}
.btn--ghost {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.btn--ghost:hover {
  background: var(--surface-hi);
  border-color: var(--border-hi);
}
.btn-text {
  color: var(--text-mute);
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.btn-text:hover {
  color: var(--text);
  background: var(--surface);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(40px, 8vh, 90px) 0 clamp(60px, 10vh, 120px);
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
}
.hero__content { max-width: 640px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--brand-3);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(74, 139, 255, 0.25);
  animation: kickerPulse 2.4s infinite;
}
@keyframes kickerPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(74, 139, 255, 0.2); }
  50% { box-shadow: 0 0 0 7px rgba(74, 139, 255, 0.08); }
}

.hero__title {
  font-size: clamp(36px, 6.4vw, 72px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(22px);
  animation: heroLine 0.9s var(--ease-out) forwards;
}
.hero__title-line--1 { animation-delay: 0.15s; }
.hero__title-line--2 {
  animation-delay: 0.3s;
  background: linear-gradient(90deg, var(--brand-2) 0%, var(--brand-3) 60%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__title-line--3 { animation-delay: 0.45s; color: var(--text-mute); font-weight: 600; }

@keyframes heroLine {
  to { opacity: 1; transform: translateY(0); }
}

.hero__subtitle {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text-mute);
  max-width: 540px;
  margin-bottom: 32px;
  opacity: 0;
  animation: heroLine 0.9s 0.55s var(--ease-out) forwards;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  animation: heroLine 0.9s 0.65s var(--ease-out) forwards;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 420px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  animation: heroLine 0.9s 0.8s var(--ease-out) forwards;
}
.hero__stat { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.hero__stat-value {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--brand-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.hero__stat-label {
  font-size: 12.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* Hero Pin (декоративный) */
.hero__pin {
  position: relative;
  justify-self: center;
  width: min(420px, 90%);
  aspect-ratio: 200 / 260;
  filter: drop-shadow(0 30px 50px rgba(29, 78, 158, 0.35));
  animation: pinFloat 7s var(--ease) infinite alternate;
}
@keyframes pinFloat {
  0% { transform: translateY(0) rotate(-1.5deg); }
  100% { transform: translateY(-18px) rotate(1.5deg); }
}
.hero__pin-svg { width: 100%; height: auto; }
.hero__pin-stroke {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: pinDraw 2.6s 0.3s var(--ease-out) forwards;
}
@keyframes pinDraw { to { stroke-dashoffset: 0; } }
.hero__pin-skyline rect {
  transform-origin: bottom;
  transform: scaleY(0);
  animation: skylineRise 1.2s var(--ease-out) forwards;
}
.hero__pin-skyline rect:nth-child(1) { animation-delay: 1.1s; }
.hero__pin-skyline rect:nth-child(2) { animation-delay: 1.2s; }
.hero__pin-skyline rect:nth-child(3) { animation-delay: 1.3s; }
.hero__pin-skyline rect:nth-child(4) { animation-delay: 1.4s; }
.hero__pin-skyline rect:nth-child(5) { animation-delay: 1.5s; }
.hero__pin-skyline rect:nth-child(6) { animation-delay: 1.6s; }
@keyframes skylineRise { to { transform: scaleY(1); } }

/* ---------- Video section ---------- */
.video-section {
  padding: clamp(30px, 6vh, 60px) 0 0;
}
.video {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.video::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--brand-2), transparent 40%, transparent 60%, var(--brand)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 2px;
  pointer-events: none;
  opacity: 0.4;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video__sound {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(10, 22, 48, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s var(--ease), border-color 0.25s, opacity 0.4s;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.video__sound:hover {
  background: rgba(29, 78, 158, 0.88);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}
.video__sound-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.video__sound-icon--on { display: none; }
.video__sound-icon--muted { display: block; }
.video__sound:not(.is-muted) .video__sound-icon--on { display: block; }
.video__sound:not(.is-muted) .video__sound-icon--muted { display: none; }

.video__sound.is-muted {
  animation: soundHint 2.6s ease-in-out 1.2s 2;
}
@keyframes soundHint {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-4px) scale(1.04); box-shadow: 0 16px 34px rgba(74, 139, 255, 0.5); }
  60% { transform: translateY(0) scale(1); }
}

.video:hover .video__sound { transform: translateY(-2px); }

@media (max-width: 520px) {
  .video__sound {
    left: 10px;
    bottom: 10px;
    padding: 8px 12px;
    font-size: 13px;
  }
  .video__sound-label { display: none; }
}

/* ---------- Section base ---------- */
.branches {
  padding: clamp(60px, 10vh, 120px) 0;
  position: relative;
}
.section-head {
  max-width: 720px;
  margin: 0 auto clamp(30px, 5vw, 50px);
  text-align: center;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 12px 0;
  line-height: 1.1;
}
.section-subtitle {
  color: var(--text-mute);
  font-size: clamp(15px, 1.4vw, 17px);
}

/* ---------- Filters ---------- */
.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.filters__search {
  position: relative;
  display: flex;
  align-items: center;
}
.filters__search svg {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
}
.filters__search input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.filters__search input::placeholder { color: var(--text-dim); }
.filters__search input:focus {
  outline: none;
  border-color: var(--brand-2);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 0 4px rgba(74, 139, 255, 0.12);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}
.chip:hover {
  color: var(--text);
  border-color: var(--border-hi);
  transform: translateY(-1px);
}
.chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(29, 78, 158, 0.4);
}

.filters__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-mute);
  font-size: 13.5px;
  white-space: nowrap;
}
.results-count { font-weight: 600; color: var(--text); }

/* ---------- Map + Cards grid ---------- */
.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.map-wrap {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #eef3fa;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
  max-height: calc(100vh - var(--header-h) - 40px);
}
.map {
  width: 100%;
  height: 100%;
  background: #eef3fa;
}
/* Leaflet — светлая тема */
.leaflet-container { background: #eef3fa; font-family: inherit; }
.leaflet-control-zoom {
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12) !important;
}
.leaflet-control-zoom a {
  background: #ffffff !important;
  color: var(--brand) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
  font-weight: 700;
}
.leaflet-control-zoom a:hover {
  background: var(--brand) !important;
  color: #ffffff !important;
}
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #5b6577 !important;
  font-size: 10.5px !important;
}
.leaflet-control-attribution a { color: var(--brand) !important; }

/* Custom marker */
.vs-pin {
  position: relative;
  width: 36px;
  height: 46px;
}
.vs-pin__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.35));
  transition: transform 0.3s var(--ease);
  transform-origin: 50% 100%;
}
.vs-pin__pulse {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 14px;
  height: 5px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: rgba(29, 78, 158, 0.35);
  animation: pinPulse 2s infinite;
  pointer-events: none;
}
@keyframes pinPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.6; }
  50% { transform: translateX(-50%) scale(1.6); opacity: 0.15; }
}
.vs-pin.is-active .vs-pin__svg { transform: scale(1.2); }
.vs-pin:hover .vs-pin__svg { transform: scale(1.1); }

.leaflet-popup-content-wrapper {
  background: rgba(11, 26, 58, 0.96) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-lg) !important;
}
.leaflet-popup-tip { background: rgba(11, 26, 58, 0.96) !important; }
.leaflet-popup-content {
  margin: 14px 16px !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  min-width: 200px;
}
.leaflet-popup-content strong { color: #fff; font-size: 14.5px; }
.leaflet-popup-content a { color: var(--brand-3); }
.leaflet-popup-close-button { color: var(--text-mute) !important; padding: 6px !important; }

/* ---------- Branch cards ---------- */
.cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  position: relative;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.25s;
  cursor: pointer;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(74, 139, 255, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card:hover,
.card.is-active {
  transform: translateY(-3px);
  border-color: rgba(74, 139, 255, 0.45);
  background: var(--surface-hi);
  box-shadow: var(--shadow-md);
}
.card:hover::before,
.card.is-active::before { opacity: 1; }

.card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.card__city {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.card__region {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(74, 139, 255, 0.15);
  color: var(--brand-3);
  border: 1px solid rgba(74, 139, 255, 0.25);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.card__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.card__badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.card__address {
  color: var(--text-mute);
  font-size: 14px;
  margin-bottom: 12px;
}
.card__contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.card__contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  transition: color 0.2s;
}
.card__contact:hover { color: var(--brand-3); }
.card__contact svg { color: var(--brand-2); flex-shrink: 0; }
.card__show {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-3);
  transition: color 0.2s, gap 0.2s;
}
.card__show:hover { color: var(--brand-2); gap: 10px; }

.cards__empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-mute);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 20px;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(5, 13, 36, 0.7) 30%, #040a1c 100%);
  border-top: 1px solid var(--border);
  padding-top: 60px;
}
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 40px;
}
.footer__logo {
  height: 26px;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}
.footer__about {
  color: var(--text-mute);
  font-size: 14px;
  max-width: 360px;
}
.footer__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer__list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer__list a {
  color: var(--text-mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.footer__list a:hover { color: var(--text); }
.footer__list .city { color: var(--text); font-weight: 600; }
.footer__list .addr { color: var(--text-dim); font-size: 13px; }

.footer__bottom {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
}
.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer__dev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer__dev:hover { color: var(--text); }
.footer__dev-mark {
  color: var(--text);
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (max-width: 600px) {
  .footer__bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .map-grid { grid-template-columns: 1fr; }
  .map-wrap { position: relative; top: 0; aspect-ratio: 16 / 11; max-height: none; }
  .cards { max-height: none; overflow-y: visible; padding-right: 0; }
  .hero__inner { grid-template-columns: 1fr; text-align: left; }
  .hero__pin { max-width: 300px; order: -1; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }

  .hero__pin { display: none; }
  .hero {
    min-height: 0;
    padding: clamp(20px, 4vh, 36px) 0 16px;
  }
  .video-section { padding: 20px 0 0; }
  .branches { padding: 28px 0 48px; }
  .hero__cta {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .hero__cta .btn {
    flex: 1 1 0;
    padding: 12px 12px;
    font-size: 14px;
    min-width: 0;
  }
  .nav { display: none; }

  .container { padding: 0 14px; }
  .header__inner { gap: 10px; }
  .header__actions { gap: 6px; }
  .brand__logo { height: 26px; }
  .btn--call span { display: none; }
  .btn--call { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
  .lang { padding: 3px; }
  .lang__btn { padding: 5px 8px; font-size: 11.5px; }

  .filters { grid-template-columns: 1fr; padding: 12px; }
  .filters__meta { justify-content: space-between; }
  .chips { overflow-x: auto; flex-wrap: nowrap; margin: 0 -4px; padding: 0 4px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }

  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 380px) {
  .brand__logo { height: 23px; }
  .lang__btn { padding: 4px 7px; font-size: 11px; letter-spacing: 0.02em; }
  .btn--call { width: 34px; height: 34px; }
  .header__actions { gap: 4px; }
}

@media (max-width: 520px) {
  .hero__stats { padding: 16px; gap: 10px; }
  .hero__stat-label { font-size: 11px; }
  .card { padding: 16px; }
  .card__city { font-size: 18px; }
}

/* ---------- Catalog modal ---------- */
.cm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 13, 36, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}
.cm-overlay.is-open {
  opacity: 1;
}
.cm-overlay[hidden] { display: none; }

.cm-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, #0f2450 0%, #0b1a3a 100%);
  border: 1px solid var(--border-hi);
  border-radius: 22px;
  padding: 36px 30px 30px;
  color: var(--text);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.3s var(--ease-out);
}
.cm-overlay.is-open .cm-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-mute);
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}
.cm-close:hover {
  background: var(--surface-hi);
  color: var(--text);
}

.cm-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(29, 78, 158, 0.45);
}

.cm-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  line-height: 1.2;
}
.cm-text {
  color: var(--text-mute);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 22px;
}

.cm-form { display: flex; flex-direction: column; gap: 14px; }

.cm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cm-field__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}
.cm-field input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.cm-field input::placeholder { color: var(--text-dim); }
.cm-field input:focus {
  outline: none;
  border-color: var(--brand-2);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 0 4px rgba(74, 139, 255, 0.15);
}
.cm-field input:invalid:not(:placeholder-shown) {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
}

.cm-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.5;
}
.cm-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cm-check__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border-hi);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  margin-top: 1px;
}
.cm-check input:checked + .cm-check__box {
  background: var(--brand-2);
  border-color: var(--brand-2);
  color: #fff;
}
.cm-check__text a {
  color: var(--brand-3);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cm-check__text a:hover { color: #fff; }

.cm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.cm-submit {
  width: 100%;
  justify-content: center;
  position: relative;
  min-height: 48px;
}
.cm-submit__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cmSpin 0.8s linear infinite;
}
@keyframes cmSpin { to { transform: rotate(360deg); } }

.cm-submit.is-loading .cm-submit__label { visibility: hidden; }
.cm-submit.is-loading .cm-submit__spinner {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -9px 0 0 -9px;
}

.cm-fallback {
  color: var(--text-dim);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.cm-fallback:hover { color: var(--text-mute); }

.cm-message {
  min-height: 0;
  font-size: 13.5px;
  padding: 0;
  border-radius: 10px;
  transition: min-height 0.2s, padding 0.2s;
}
.cm-message.is-success {
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 12px 14px;
  min-height: 20px;
}
.cm-message.is-error {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  padding: 12px 14px;
  min-height: 20px;
}

body.cm-locked { overflow: hidden; }

@media (max-width: 480px) {
  .cm-card { padding: 30px 20px 24px; border-radius: 18px; }
  .cm-title { font-size: 19px; }
  .cm-icon { width: 52px; height: 52px; margin-bottom: 14px; }
}

/* ---------- Perf: content-visibility для off-screen секций ----------
   Браузер не тратит ресурсы на рендер невидимых блоков,
   что ускоряет первую отрисовку (TTI/LCP). */
.video-section,
.catalog,
.branches,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
