:root{
  --txt-hex:#e9e9e9;
  --btn-hex:#7c92a0;
  --btn-txt:#0B1221;

  /* высота шапки — обновляется JS-ом */
  --hdr-h: 64px;
}

/* Компенсация фикс-шапки для всех страниц */
body.has-fixed-header{ padding-top: var(--hdr-h); }
[id]{ scroll-margin-top: calc(var(--hdr-h) + 12px); }

/* Сбросы */
[hidden]{display:none!important;}
a,button{outline:0}

/* ===== ШАПКА ===== */
.site-header{
  position:fixed; top:0; left:0; right:0; z-index:1000;
  background: linear-gradient(to right, #404040 0%, #404040 100%);
  color:var(--txt-hex);
  border-bottom:1px solid rgba(255,255,255,.08);
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}
.site-header.matte{
  background: linear-gradient(to right, rgba(32,32,32,.30) 0%, rgba(32,32,32,.30) 100%);
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  border-bottom-color:rgba(255,255,255,.06);
  backdrop-filter:blur(10px) saturate(120%);
  -webkit-backdrop-filter:blur(10px) saturate(120%);
}

.site-header .container.hdr-row{
  max-width:1200px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 20px; gap:16px;
}

/* Бренд */
.brand{ display:flex; flex-direction:column; text-decoration:none; color:var(--txt-hex); line-height:1.1; }
.brand-line1{ font-weight:800; font-size:14px; letter-spacing:.06em; opacity:.95; }
.brand-line2{ font-weight:500; font-size:13px; opacity:.9; }

/* Навигация */
.nav{ display:flex; align-items:center; gap:16px; }
.nav-list{ display:flex; list-style:none; gap:22px; margin:0; padding:0; }
.nav-link{
  color:var(--txt-hex); text-decoration:none; font-weight:600; font-size:15px;
  padding:8px 2px; border-radius:6px; outline-offset:3px;
  transition:opacity .2s ease, color .2s ease;
  text-shadow:0 1px 1px rgba(0,0,0,.25);
}
.nav-link:hover,.nav-link:focus{ color:#fff; opacity:.9; }

/* Кнопка-линк (для доступного открытия подменю кликом) */
.nav-button{
  background:none; border:0; cursor:pointer;
  display:inline-flex; align-items:center; gap:6px;
}

/* Подменю (десктоп) с задержкой закрытия */
.nav-item{ position: relative; }
.submenu{
  display:none;
  position:absolute; top:100%; left:0;
  background: rgba(32,32,32,.96);
  list-style:none; margin:6px 0 0; padding:8px 0; border-radius:10px;
  min-width:260px; z-index:1000;
  border:1px solid rgba(255,255,255,.06);
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}
.nav-item:hover .submenu,
.nav-item:focus-within .submenu{ display:block; }
.submenu .nav-link{ padding:10px 14px; display:block; font-weight:500; color:#fff; }
.submenu .nav-link:hover,.submenu .nav-link:focus{ opacity:0.95; background:rgba(255,255,255,.06); }

/* Кнопка CTA */
.btn-cta{
  display:inline-block; text-decoration:none;
  background:linear-gradient(to right, var(--btn-hex) 0%, var(--btn-hex) 100%);
  color:var(--btn-txt);
  font-weight:700; padding:10px 16px; border-radius:10px;
  transition:transform .15s ease, filter .2s ease, box-shadow .2s ease;
  white-space:nowrap;
  box-shadow:0 2px 6px rgba(0,0,0,.12) inset, 0 2px 10px rgba(0,0,0,.08);
}
.btn-cta:hover{ filter:brightness(.96); transform:translateY(-1px); }
.btn-cta:active{ transform:translateY(0); }

/* ===== БУРГЕР ===== */
/* На мобильных — на одном уровне с брендом (в одной строке), справа */
.burger{
  display:none;
  cursor:pointer;
  padding:8px 12px;
  border-radius:10px;
  user-select:none;
  color:#fff;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  font-weight:700; font-size:15px;
  line-height:1;
  align-self:center;           /* вертикально выравниваем с брендом */
}
.burger:active{ transform: translateY(1px); }
.burger-text{ line-height:1; display:inline-block; }

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
.mobile-shell{
  background:rgba(32,32,32,.96);
  border-bottom:1px solid rgba(255,255,255,.06);
  backdrop-filter:blur(8px) saturate(120%);
  -webkit-backdrop-filter:blur(8px) saturate(120%);
}
.mobile-menu{
  max-width:1200px; margin:0 auto;
  display:flex; flex-direction:column; gap:0;
  padding:10px 20px 16px;
}
.mobile-link{
  color:#fff; text-decoration:none; padding:12px 0; font-weight:600; font-size:16px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.mobile-link:last-of-type{ border-bottom:0; }

.mobile-cta{
  margin-top:10px; display:inline-block; text-align:center;
  background:linear-gradient(to right, var(--btn-hex) 0%, var(--btn-hex) 100%);
  color:var(--btn-txt); text-decoration:none; font-weight:800;
  padding:12px 14px; border-radius:12px;
}

/* Аккордеон внутри мобильного меню */
.mobile-acc{ padding:6px 0; }
.mobile-acc > summary{
  list-style:none; cursor:pointer; color:#fff; font-weight:700; font-size:16px;
  padding:8px 0; outline:none;
}
.mobile-acc > summary::-webkit-details-marker{ display:none; }
.mobile-submenu{
  display:flex; flex-direction:column; padding:6px 0 8px 12px; gap:6px;
  border-left:2px solid rgba(255,255,255,.12);
}
.mobile-sublink{
  color:#fff; text-decoration:none; padding:6px 0; font-weight:600; font-size:15px;
  opacity:.95;
}
.mobile-sublink:hover{ opacity:1; }

/* ===== АДАПТИВ ===== */
@media (max-width: 920px){
  .nav-list{ display:none; }
  .btn-cta{ display:none; }
  .burger{ display:inline-flex; margin-left:auto; }
  .brand-line1{ font-size:13px; }
  .brand-line2{ font-size:12px; }
  .hdr-row{ gap:10px; }
}
@media (max-width: 480px){
  .site-header .container{ padding:10px 14px; }
  .brand-line1{ font-size:12px; }
  .brand-line2{ font-size:11px; }
  .burger{ font-size:14px; padding:7px 10px; border-radius:9px; }
}

/* Доступность */
a:focus-visible,button:focus-visible,.burger:focus-visible{
  outline:2px solid #ffffff; outline-offset:2px; border-radius:8px;
}
