
/* ============================================================
   STICKY HEADER — left(menu+logo) / center(nav) / right(cta)
   ============================================================ */
/* ============================================================
   STICKY HEADER — left / logo / right
   ============================================================ */
.sticky-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  background: rgba(245, 243, 238, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(20, 20, 15, 0.06);
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.sticky-header.is-visible { transform: translateY(0); pointer-events: auto; }

.sticky-header__inner {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px 48px;
}

/* LEFT */
.sticky-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: start;
}
.sticky-header__menu {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; border: none; cursor: pointer;
  padding: 10px 14px 10px 12px; border-radius: 999px;
  font: 600 12px/1 'Sora', sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
  color: #14140F; transition: background .2s;
}
.sticky-header__menu:hover { background: rgba(20,20,15,.06); }
.sticky-header__menu .icon { display:flex; flex-direction:column; gap:3px; width:18px; }
.sticky-header__menu .icon span { display:block; height:2px; background:#14140F; border-radius:2px; }
.sticky-header__menu .icon span:nth-child(2){ width:70%; }

/* PILL — индикатор текущего раздела + кнопка открытия меню */
.sticky-header__pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  background: transparent;
  border: 1.5px solid #14140F;
  border-radius: 999px;
  font: 500 13px/1 'Sora', sans-serif;
  color: #14140F;
  letter-spacing: .01em;
  cursor: pointer;
  overflow: hidden;
  transition: background .25s, color .25s, transform .25s;
}
.sticky-header__pill:hover {
  background: #14140F;
  color: #F5F3EE;
  transform: translateY(-1px);
}

/* Плавная смена текста */
.sticky-header__pill-text {
  display: inline-block;
  transition: opacity .25s ease, transform .35s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.sticky-header__pill-text.is-changing {
  opacity: 0;
  transform: translateY(-6px);
}

/* CENTER */
.sticky-header__logo {
  justify-self: center;
  height: 46px;
  display: block;
}
.sticky-header__logo img { height: 100%; width: auto; display: block; }

/* RIGHT */
.sticky-header__right {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-self: end;
}
.sticky-header__phone {
  font: 500 15px/1 'Sora', sans-serif;
  color: #14140F; text-decoration: none;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: opacity .2s;
}
.sticky-header__phone:hover { opacity: .65; }

.sticky-header__cta {
  display: inline-flex; align-items: center;
  height: 44px; padding: 0 24px;
  background: #14140F; color: #fff;
  border: none; border-radius: 999px;
  font: 500 13px/1 'Sora', sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.sticky-header__cta:hover { background: #2A2A22; transform: translateY(-1px); }

/* Адаптив */
@media (max-width: 1200px) {
  .sticky-header__inner { padding: 12px 32px; gap: 16px; }
  .sticky-header__pill { display: none; }
}
@media (max-width: 900px) {
  .sticky-header__phone { display: none; }
  .sticky-header__inner { padding: 12px 20px; }
}
@media (max-width: 640px) {
  .sticky-header__inner { grid-template-columns: auto 1fr auto; padding: 10px 16px; }
  .sticky-header__logo { display: none; }
  .sticky-header__menu {
    padding: 8px 14px 8px 12px;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .sticky-header__menu span:not(.icon) { display: inline; }
  .sticky-header__cta { height: 40px; padding: 0 16px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-header,
  .sticky-header__pill,
  .sticky-header__pill-text { transition: none !important; }
}

/* ============================================================
   OVERLAY MENU — слева на половину экрана
   ============================================================ */
.menu-overlay {
  position: fixed;
  inset: 0;                        /* на весь экран — для backdrop */
  z-index: 200;
  background: rgba(20, 20, 15, 0.35); /* затемнение справа от панели */
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
}
body.is-menu-open .menu-overlay { opacity: 1; visibility: visible; }
body.is-menu-open { overflow: hidden; }

/* Сама панель — слева, 50% ширины */
.menu-overlay__panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 50%;
  background: #C5F056;
  display: flex;
  flex-direction: column;
  padding: 24px 48px 40px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .45s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 60px rgba(0,0,0,.18);
}
body.is-menu-open .menu-overlay__panel { transform: translateX(0); }

/* Шапка панели */
.menu-overlay__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 56px;
}
.menu-overlay__close {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; border: none; cursor: pointer;
  font: 600 12px/1 'Sora', sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
  color: #14140F;
  padding: 10px 16px 10px 12px; border-radius: 999px;
  transition: background .2s;
}
.menu-overlay__close:hover { background: rgba(20,20,15,.08); }
.menu-overlay__close svg { width: 16px; height: 16px; stroke-width: 2.2; }

.menu-overlay__logo { height: 36px; }
.menu-overlay__logo img { height: 100%; width: auto; display: block; }

.menu-overlay__call {
  display: inline-flex; align-items: center;
  background: transparent; border: 1.5px solid #14140F;
  color: #14140F;
  font: 500 13px/1 'Sora', sans-serif;
  padding: 11px 20px; border-radius: 999px;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.menu-overlay__call:hover { background: #14140F; color: #C5F056; }

/* Тело: nav сверху, карточки снизу (т.к. колонка узкая) */
.menu-overlay__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}

/* Навигация */
.menu-overlay__nav { display: flex; flex-direction: column; gap: 7px; }
.menu-overlay__nav a {
  font: 200 clamp(20px, 1.9vw, 24px) / 1.5 'Sora', sans-serif;
  color: #14140F;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0;
  width: fit-content;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s ease, transform .5s cubic-bezier(.4,0,.2,1), color .2s;
}
body.is-menu-open .menu-overlay__nav a { opacity: 1; transform: translateY(0); }
.menu-overlay__nav a:nth-child(1){ transition-delay: .15s; }
.menu-overlay__nav a:nth-child(2){ transition-delay: .20s; }
.menu-overlay__nav a:nth-child(3){ transition-delay: .25s; }
.menu-overlay__nav a:nth-child(4){ transition-delay: .30s; }
.menu-overlay__nav a:nth-child(5){ transition-delay: .35s; }
.menu-overlay__nav a:hover { color: rgba(20,20,15,.5); }

/* Карточки внизу — в ряд */
.menu-overlay__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.menu-overlay__card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 22px 24px;
  text-decoration: none;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 130px;
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease, box-shadow .25s ease;
}
body.is-menu-open .menu-overlay__card { opacity: 1; transform: translateY(0); }
body.is-menu-open .menu-overlay__card:nth-child(1){ transition-delay: .42s; }
body.is-menu-open .menu-overlay__card:nth-child(2){ transition-delay: .50s; }
.menu-overlay__card:hover { box-shadow: 0 14px 32px rgba(20,20,15,.10); }

.menu-overlay__card-title {
  font: 600 20px/1.2 'Sora', sans-serif;
  color: #14140F; margin: 0;
}
.menu-overlay__card-desc {
  font: 400 13px/1.5 'Sora', sans-serif;
  color: #5C5C56; margin: 0;
}
.menu-overlay__card-arrow {
  margin-top: auto; align-self: flex-end;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: #14140F; color: #fff;
  transition: background .2s, transform .2s;
}
.menu-overlay__card:hover .menu-overlay__card-arrow {
  background: #C5F056; color: #14140F;
  transform: translate(2px, -2px);
}
.menu-overlay__card-arrow svg { width: 16px; height: 16px; }

/* Адаптив */
@media (max-width: 1200px) {
  .menu-overlay__panel { width: 60%; }
}
@media (max-width: 900px) {
  .menu-overlay__panel { width: 75%; padding: 20px 28px 32px; }
  .menu-overlay__top { margin-bottom: 32px; }
}
@media (max-width: 640px) {
  .menu-overlay__panel { width: 100%; padding: 18px 20px 28px; }
  .menu-overlay__cards { grid-template-columns: 1fr; }
  .menu-overlay__call { padding: 9px 14px; font-size: 12px; }
  .menu-overlay__logo { height: 30px; }
}
/* Reset for <button> rendered as menu card (Построить гараж) */
button.menu-overlay__card {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  /* display/flex наследуется от .menu-overlay__card */
}
