/* ═══════════════════════════════════════════════════════════════
   SUPER ЧЕБУРЕК — components.css
   Кнопки, хедер, меню-бургер, прелоадер, курсор, прогресс,
   кнопка «наверх», лайтбокс, бейджи статуса.
   ═══════════════════════════════════════════════════════════════ */

/* ── Кнопки ── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 100px;
  font-family: var(--f-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn--lg { padding: 19px 38px; font-size: 14.5px; }

.btn--solid {
  background: linear-gradient(135deg, var(--c-yellow), var(--c-yellow-dark));
  color: #131313;
  box-shadow: 0 8px 28px -8px rgba(255, 196, 0, .55);
}
.btn--solid:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -10px rgba(255, 196, 0, .65); }

.btn--ghost {
  border: 1.5px solid rgba(255, 255, 255, .22);
  color: var(--c-white);
  background: rgba(255, 255, 255, .03);
}
.btn--ghost:hover {
  border-color: var(--c-yellow);
  color: var(--c-yellow);
  transform: translateY(-3px);
}

/* Блик-свип по кнопке */
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg);
  transition: left .6s var(--ease-out);
  pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn--ghost::after { background: linear-gradient(105deg, transparent, rgba(255, 196, 0, .25), transparent); }

/* Ripple (добавляет app.js) */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transform: scale(0);
  animation: ripple .55s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(3.4); opacity: 0; } }

/* ── Прогресс прокрутки ── */
.progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 220;
  background: transparent;
  pointer-events: none;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c-yellow), var(--c-yellow-2));
  box-shadow: 0 0 12px rgba(255, 196, 0, .8);
}

/* ── Прелоадер ── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--c-black);
  transition: opacity .6s ease, visibility .6s;
}
.js .preloader { display: flex; }
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__logo {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(22px, 4vw, 34px);
  color: var(--c-white);
  letter-spacing: .04em;
  animation: plPulse 1.4s ease-in-out infinite;
}
.preloader__logo span { color: var(--c-yellow); }
@keyframes plPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.preloader__dots { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.preloader__dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--c-yellow);
  animation: plBounce 1s var(--ease-spring) infinite;
}
.preloader__dots i:nth-child(2) { animation-delay: .15s; }
.preloader__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes plBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ── Хедер ── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  /* выше мобильного меню-оверлея, чтобы бургер оставался доступен */
  z-index: 260;
  transition: background-color var(--t-fast), box-shadow var(--t-fast), backdrop-filter var(--t-fast);
}
/* Пока открыто мобильное меню — хедер прозрачный (не рисует полосу поверх оверлея) */
.header:has(.burger.is-open) {
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
  transition: height .35s var(--ease-out);
}
.header.is-scrolled {
  background: rgba(11, 11, 12, .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--c-line), 0 12px 40px -20px rgba(0, 0, 0, .8);
}
.header.is-scrolled .header__in { height: 66px; }

/* Логотип */
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo__mark {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, #191919, #0e0e0f);
  border: 1px solid var(--c-line);
  color: var(--c-yellow);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 20px -10px rgba(0,0,0,.9);
  transition: transform .4s var(--ease-spring);
}
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.06); }
.logo__text {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .02em;
  color: var(--c-white);
}
.logo__text em { font-style: normal; color: var(--c-yellow); }

/* Навигация */
.nav { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text-dim);
  border-radius: 100px;
  transition: color var(--t-fast);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 5px;
  height: 2px;
  background: var(--c-yellow);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav__link:hover, .nav__link.is-active { color: var(--c-white); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__phone {
  display: inline-flex; align-items: center; gap: 9px;
  margin-left: 10px;
  padding: 12px 22px;
  border-radius: 100px;
  border: 1.5px solid rgba(255, 196, 0, .4);
  color: var(--c-yellow);
  font-weight: 700;
  font-size: 14.5px;
  transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.nav__phone:hover { background: var(--c-yellow); color: #131313; transform: translateY(-2px); }

/* ── Бургер ── */
.burger {
  display: none;
  position: relative;
  z-index: 260;
  width: 48px; height: 48px;
  border-radius: 14px;
  border: 1px solid var(--c-line);
  background: rgba(255, 255, 255, .04);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5.5px;
}
.burger span {
  width: 21px; height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: transform .35s var(--ease-out), opacity .25s, background-color .25s;
}
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); background: var(--c-yellow); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); background: var(--c-yellow); }

/* ── Мобильное меню ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 10px) 28px 40px;
  background: rgba(11, 11, 12, .97);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease-out), visibility .45s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__nav { display: flex; flex-direction: column; }
.mobile-menu__nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 4px;
  font-family: var(--f-display);
  font-size: clamp(26px, 7vw, 40px);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--c-white);
  border-bottom: 1px solid var(--c-line);
  transform: translateY(24px);
  opacity: 0;
  transition: transform .5s var(--ease-out), opacity .5s, color .25s;
}
.mobile-menu__nav a i {
  font-family: var(--f-body);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-yellow);
  letter-spacing: .2em;
}
.mobile-menu.is-open .mobile-menu__nav a { transform: none; opacity: 1; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(1) { transition-delay: .08s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(2) { transition-delay: .14s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(3) { transition-delay: .2s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(4) { transition-delay: .26s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(5) { transition-delay: .32s; }
.mobile-menu__nav a:active { color: var(--c-yellow); }
.mobile-menu__foot { margin-top: 34px; display: grid; gap: 16px; }
.mobile-menu__foot p { font-size: 14px; color: var(--c-text-dim); }

/* ── Кастомный курсор (только точные указатели) ── */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .js .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 320; pointer-events: none; }
  .cursor__dot, .cursor__ring {
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
  .cursor__dot {
    width: 7px; height: 7px;
    background: var(--c-yellow);
  }
  .cursor__ring {
    width: 38px; height: 38px;
    border: 1.5px solid rgba(255, 196, 0, .55);
    transition: width .3s var(--ease-out), height .3s var(--ease-out),
                border-color .3s, background-color .3s;
  }
  .cursor.is-hover .cursor__ring {
    width: 62px; height: 62px;
    background: rgba(255, 196, 0, .1);
    border-color: var(--c-yellow);
  }
}

/* ── Кнопка «наверх» ── */
.to-top {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 180;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(18, 18, 20, .85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--c-line);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity .35s, transform .35s var(--ease-out), visibility .35s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--c-yellow); }
.to-top span { font-size: 19px; color: var(--c-yellow); font-weight: 800; transition: transform .3s var(--ease-out); }
.to-top:hover span { transform: translateY(-3px); }
.to-top svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.to-top__ring {
  stroke: var(--c-yellow);
  stroke-width: 2.5;
  stroke-dasharray: 138.2;
  stroke-dashoffset: 138.2;
  stroke-linecap: round;
}

/* ── Лайтбокс ── */
.lightbox__figure img { opacity: 0; transition: opacity .35s ease, transform .45s var(--ease-out); }
.lightbox__figure img.is-loaded { opacity: 1; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 4vw, 48px);
  background: rgba(8, 8, 9, .93);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure {
  max-width: min(1080px, 92vw);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: scale(.94);
  transition: transform .45s var(--ease-out);
}
.lightbox.is-open .lightbox__figure { transform: none; }
.lightbox__figure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9);
}
.lightbox__figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--c-text-dim);
  font-size: 14.5px;
}
.lightbox__figure figcaption #lbCaption { color: var(--c-white); font-weight: 700; }
.lightbox__close, .lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  background: rgba(255, 255, 255, .05);
  color: var(--c-white);
  font-size: 22px;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.lightbox__close:hover, .lightbox__nav:hover {
  background: var(--c-yellow); color: #131313; border-color: var(--c-yellow);
  transform: scale(1.07);
}
.lightbox__close { top: 22px; right: 22px; font-size: 28px; }
.lightbox__nav--prev { left: 22px; }
.lightbox__nav--next { right: 22px; }

/* ── Мобильная панель звонка ── */
.call-bar {
  display: none;
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 190;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(15, 15, 17, .92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--c-line);
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .85);
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}
.call-bar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 6px;
  border-radius: 12px;
  border: 1px solid var(--c-line);
  font-weight: 800;
  font-size: 14px;
  color: var(--c-white);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.call-bar__btn--solid {
  background: linear-gradient(135deg, var(--c-yellow), var(--c-yellow-dark));
  color: #131313;
  border-color: transparent;
}
.call-bar__btn:active { transform: scale(.97); }
