/* ========== HEADER (fixed, hidden until block 2) ========== */
.hdr {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
body.chrome-on .hdr {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.hdr-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
}
/* компактный хедер — ужимаем самый высокий элемент строки (кнопку) */
.hdr-cta { padding: 7px 16px; }
.logo {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}
.logo .logo-mark {
  height: 24px;
  width: auto;
  display: block;
}
.nav {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
  color: #e8e6e0;
  justify-content: center;
}
.nav a { color: #e8e6e0; transition: color 0.16s var(--ease); }
.nav a:hover { color: #ffffff; }
.hdr-right {
  display: flex;
  gap: 18px;
  align-items: center;
}
.hdr-phone {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}
/* Desktop: number links to Telegram instead of a dead `tel:` — glyph + hover. */
.hdr-phone--tg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.18s var(--ease);
}
.hdr-phone--tg:hover { color: #2aabee; }
.hdr-phone-ic {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #2aabee;
}
.hdr-vk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--ink-2);
  border-radius: 4px;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.hdr-vk:hover {
  color: #0077FF;
  background: rgba(0, 119, 255, 0.08);
}

.hdr-mobile-vk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--ink-2);
  border-radius: 4px;
}
.hdr-mobile-vk svg { color: #0077FF; }

/* ---- Burger (mobile only — hidden on desktop) ---- */
.hdr-burger {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  cursor: pointer;
}
.hdr-burger span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transform: translateX(-50%);
  transition: transform 0.25s ease, opacity 0.18s ease, top 0.25s ease;
}
.hdr-burger span:nth-child(1) { top: 13px; }
.hdr-burger span:nth-child(2) { top: 19px; }
.hdr-burger span:nth-child(3) { top: 25px; }
.hdr-burger[aria-expanded="true"] span:nth-child(1) {
  top: 19px;
  transform: translateX(-50%) rotate(45deg);
}
.hdr-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hdr-burger[aria-expanded="true"] span:nth-child(3) {
  top: 19px;
  transform: translateX(-50%) rotate(-45deg);
}

/* ---- Mobile menu (full-screen overlay) ---- */
.hdr-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4000;
  flex-direction: column;
  padding: 10px 20px max(20px, env(safe-area-inset-bottom, 0px)) 20px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  background: #0a0a0a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body.menu-open .hdr-mobile-menu {
  opacity: 1;
  pointer-events: auto;
}

.hdr-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-shrink: 0;
}
.hdr-mobile-top .logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.hdr-mobile-close {
  position: relative;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  cursor: pointer;
}
.hdr-mobile-close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transform-origin: center;
}
.hdr-mobile-close span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.hdr-mobile-close span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

.hdr-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}
.hdr-mobile-list a {
  padding: 16px 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hdr-mobile-list a:last-child { border-bottom: none; }

.hdr-mobile-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.hdr-mobile-phone,
.hdr-mobile-phone:link,
.hdr-mobile-phone:visited {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink) !important;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.hdr-mobile-phone:hover { color: #c4a47a !important; }
.hdr-mobile-cta { padding: 14px 18px; font-size: 14px; }

body.menu-open { overflow: hidden; }

