/* ============================================================
   web22.ru — общие стили сайта (токены, база, шапка, футер)
   Дизайн: тёмный премиум, синий акцент. BEM.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Токены ---------- */
:root {
  /* фон */
  --bg:          #05070d;
  --bg-elev:     #0a0e18;
  --bg-panel:    #0d1220;

  /* поверхности */
  --card:        rgba(255, 255, 255, 0.028);
  --card-hover:  rgba(255, 255, 255, 0.05);
  --border:      rgba(255, 255, 255, 0.085);
  --border-str:  rgba(255, 255, 255, 0.16);

  /* текст */
  --text:        #e9edf5;
  --text-2:      #aab4c8;
  --muted:       #76829b;

  /* акцент — синий */
  --accent:      #2e6bff;
  --accent-2:    #5b8cff;
  --accent-deep: #1b46c2;
  --glow:        rgba(46, 107, 255, 0.22);
  --glow-soft:   rgba(46, 107, 255, 0.10);

  /* сигнал */
  --ok:          #34d399;
  --warn:        #fbbf24;

  /* геометрия */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* ритм */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* типографика */
  --font: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Consolas', monospace;

  /* анимации */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-med: 280ms;

  /* контейнер */
  --wrap: 1300px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 132px; /* шапка (76) + поднавигация (48) + воздух */
}

html, body {
  /* Никакого горизонтального скролла страницы (clip не создаёт
     scroll-контейнер и не ломает position: sticky) */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color var(--t-fast) ease;
}
a:hover { color: var(--text); }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Контейнер ---------- */
.wrap {
  width: min(var(--wrap), 100% - 48px);
  margin-inline: auto;
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 26px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font: 600 15px/1 var(--font);
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform var(--t-fast) var(--ease),
    background var(--t-fast) ease,
    border-color var(--t-fast) ease,
    box-shadow var(--t-med) ease;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(91, 140, 255, 0.35) inset,
    0 8px 28px -8px var(--glow);
}
.btn--primary:hover {
  box-shadow:
    0 0 0 1px rgba(91, 140, 255, 0.55) inset,
    0 12px 40px -8px var(--glow);
  color: #fff;
}

.btn--ghost {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover {
  background: var(--card-hover);
  border-color: var(--border-str);
}

.btn--lg { padding: 17px 32px; font-size: 16px; }
.btn--wide { width: 100%; }

/* ---------- Чипы / бейджи ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font: 500 13px/1.2 var(--font);
  color: var(--text-2);
}
.chip__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}

/* ---------- Заголовки секций ---------- */
.section { padding: var(--space-9) 0; position: relative; }

.section__head {
  max-width: 720px;
  margin: 0 0 var(--space-7);
}
.section__head--center { margin-inline: auto; text-align: center; }

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-4);
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.section__label::before {
  content: '';
  width: 22px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section__title {
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 800;
}

.section__sub {
  margin-top: var(--space-4);
  font-size: 17px;
  color: var(--text-2);
}

/* градиентный акцент в заголовках */
.grad {
  background: linear-gradient(100deg, var(--accent-2) 10%, #8fb0ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Карточка (базовый компонент) ---------- */
.card {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--bg-elev);
  transition:
    border-color var(--t-med) ease,
    transform var(--t-med) var(--ease),
    box-shadow var(--t-med) ease;
}
.card--hover:hover {
  border-color: var(--border-str);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.7);
}

/* ---------- Светлая панель (финальный CTA) ---------- */
/* специфичность 2 классов — перебивает background у .final__box из page-home.css */
.final__box.panel-light {
  background:
    radial-gradient(90% 130% at 50% 0%, #ffffff 0%, #eef3fe 55%, #e4ebfc 100%);
  border-color: rgba(23, 44, 96, 0.14);
}
.panel-light .final__title { color: #0b1220; }
.panel-light .final__text { color: #46527a; }
.panel-light .chip {
  border-color: rgba(23, 44, 96, 0.14);
  background: rgba(255, 255, 255, 0.75);
  color: #2c3a63;
}
.panel-light .btn--ghost {
  background: rgba(11, 18, 32, 0.05);
  border-color: rgba(23, 44, 96, 0.2);
  color: #16213c;
}
.panel-light .btn--ghost:hover {
  background: rgba(11, 18, 32, 0.1);
  border-color: rgba(23, 44, 96, 0.35);
}
.panel-light .grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-deep) 90%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* мягкое свечение страницы */
.page-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(52% 38% at 82% 0%, var(--glow-soft), transparent 70%),
    radial-gradient(40% 30% at 8% 12%, rgba(27, 70, 194, 0.12), transparent 70%);
}

/* сетка-фон */
.grid-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 140px 140px, 140px 140px, 28px 28px, 28px 28px;
  mask-image: radial-gradient(85% 75% at 50% 0%, #000 0%, transparent 100%);
}

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 7, 13, 0.72);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-med) ease;
}
/* градиентная линия по нижнему краю */
.header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(91, 140, 255, 0.5) 50%, transparent 95%);
  pointer-events: none;
}
.header.is-compact {
  background: rgba(5, 7, 13, 0.9);
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.8);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: 76px;
  transition: height var(--t-med) var(--ease);
}
.header.is-compact .header__inner { height: 60px; }
.header .logo img { transition: height var(--t-med) var(--ease); }
.header .logo img { height: 36px; }
.header.is-compact .logo img { height: 30px; }

.nav {
  display: flex;
  gap: var(--space-5);
  margin-left: auto;
}
.nav__link {
  position: relative;
  font: 500 14px/1 var(--font);
  color: var(--text-2);
  padding: 6px 2px;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 10px -1px var(--glow);
  transition: right 0.28s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { right: 0; }

/* активная страница в меню шапки */
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after { right: 0; }

.header__cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.header__phone {
  font: 600 14px/1 var(--mono);
  color: var(--text-2);
  letter-spacing: 0.02em;
  transition: color var(--t-fast) ease;
}
.header__phone:hover { color: var(--text); }

.header .btn { padding: 11px 20px; font-size: 14px; }

/* ---------- Бургер ---------- */
.burger {
  display: none;
  position: relative;
  z-index: 60;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition:
    transform var(--t-med) var(--ease),
    opacity var(--t-fast) ease,
    width var(--t-med) var(--ease);
}
.burger span:nth-child(2) { width: 75%; }
.burger:hover span:nth-child(2) { width: 100%; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Мобильное меню ---------- */
.mmenu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 104px 28px 32px;
  background: rgba(5, 7, 13, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity var(--t-med) ease,
    transform var(--t-med) var(--ease),
    visibility 0s var(--t-med);
  overflow-y: auto;
}
.mmenu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity var(--t-med) ease,
    transform var(--t-med) var(--ease);
}
.mmenu::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 30% at 50% 0%, rgba(46, 107, 255, 0.12), transparent 70%),
    radial-gradient(40% 25% at 85% 90%, rgba(27, 70, 194, 0.10), transparent 70%);
}
.mmenu__link {
  display: block;
  padding: 15px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-2);
  transform: translateY(6px);
  opacity: 0;
  transition:
    color var(--t-fast) ease,
    transform 0.35s var(--ease),
    opacity 0.35s ease;
}
.mmenu.is-open .mmenu__link {
  transform: none;
  opacity: 1;
}
.mmenu.is-open .mmenu__link:nth-child(1) { transition-delay: 0.05s; }
.mmenu.is-open .mmenu__link:nth-child(2) { transition-delay: 0.10s; }
.mmenu.is-open .mmenu__link:nth-child(3) { transition-delay: 0.15s; }
.mmenu.is-open .mmenu__link:nth-child(4) { transition-delay: 0.20s; }
.mmenu.is-open .mmenu__link:nth-child(5) { transition-delay: 0.25s; }
.mmenu.is-open .mmenu__link:nth-child(6) { transition-delay: 0.30s; }
.mmenu.is-open .mmenu__link:nth-child(7) { transition-delay: 0.35s; }
.mmenu.is-open .mmenu__link:nth-child(8) { transition-delay: 0.40s; }
.mmenu.is-open .mmenu__link:nth-child(9) { transition-delay: 0.45s; }
.mmenu__link:hover, .mmenu__link:active { color: var(--accent-2); }

.mmenu__foot {
  margin-top: auto;
  padding-top: var(--space-6);
  display: grid;
  gap: var(--space-4);
}
.mmenu__phone {
  font: 600 20px/1 var(--mono);
  color: var(--text);
  text-align: center;
}
.mmenu__social {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.mmenu__social a {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--card);
}
.mmenu__social img { width: 20px; height: 20px; }

/* Блокировка скролла при открытом меню — ТОЛЬКО на html (корневой скролл).
   overflow:hidden на body делал бы body scroll-контейнером — и sticky-шапка
   уезжала бы в нормальный поток (не видна при прокрутке). */
html.is-locked { overflow: hidden; }

/* ---------- Поднавигация страницы (second header) ---------- */
.subnav {
  position: sticky;
  top: 76px; /* высота шапки; компактная шапка — 60px (класс на body из app.js) */
  z-index: 40;
  background: rgba(5, 7, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: top var(--t-med) var(--ease);
}
body.is-header-compact .subnav { top: 60px; }

.subnav__inner {
  display: flex;
  gap: var(--space-6);
  width: min(var(--wrap), 100% - 48px);
  margin-inline: auto;
  overflow-x: auto;               /* мобилы: горизонтальная прокрутка трека */
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.subnav__inner::-webkit-scrollbar { display: none; }

.subnav__link {
  position: relative;
  flex: none;
  padding: 15px 2px;
  font: 500 13.5px/1 var(--font);
  color: var(--text-2);
  white-space: nowrap;
  transition: color var(--t-fast) ease;
}
.subnav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 10px -1px var(--glow);
  transition: right 0.28s var(--ease);
}
.subnav__link:hover { color: var(--text); }
.subnav__link:hover::after,
.subnav__link.is-active::after { right: 0; }
.subnav__link.is-active { color: var(--accent-2); }

@media (max-width: 960px) {
  html { scroll-padding-top: 112px; }
  .subnav__inner { width: calc(100% - 28px); gap: var(--space-5); }
}

@media (max-width: 960px) {
  .nav, .header__phone { display: none; }
  .burger { display: flex; }
}
/* узкие десктопы (961–1120px): 7 пунктов меню — телефон уходит, шаги меню плотнее */
@media (min-width: 961px) and (max-width: 1120px) {
  .nav { gap: var(--space-4); }
  .header__phone { display: none; }
}
@media (max-width: 520px) {
  .header__inner { gap: var(--space-3); }
  .header .btn { padding: 10px 13px; font-size: 13px; }
}

/* ---------- Футер ---------- */
.footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 50% 120%, rgba(27, 70, 194, 0.16), transparent 70%),
    var(--bg);
  padding-top: var(--space-8);
}

/* тонкая градиентная линия сверху */
.footer__beam {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 140, 255, 0.7), transparent);
}
.footer__beam::after {
  content: '';
  position: absolute;
  top: -2px; left: 50%;
  transform: translateX(-50%);
  width: 220px; height: 5px;
  border-radius: 999px;
  background: radial-gradient(closest-side, var(--glow), transparent);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: var(--space-7);
  padding-bottom: var(--space-8);
}

.footer__logo { margin-bottom: var(--space-5); }

.footer__brand p {
  font-size: 14px;
  color: var(--muted);
  max-width: 300px;
}

.footer__social {
  display: flex;
  gap: 10px;
  margin-top: var(--space-5);
}
.footer__social a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  transition:
    border-color var(--t-fast) ease,
    background var(--t-fast) ease,
    transform var(--t-fast) var(--ease);
}
.footer__social a:hover {
  border-color: rgba(91, 140, 255, 0.5);
  background: rgba(46, 107, 255, 0.10);
  transform: translateY(-2px);
}
.footer__social img { width: 22px; height: 22px; }

.footer__title {
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-5);
}

.footer__list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0; padding: 0;
}
.footer__list a {
  font-size: 14px;
  color: var(--text-2);
}
.footer__list a:hover { color: var(--accent-2); }

.footer__contacts {
  display: grid;
  gap: 12px;
  font-size: 14px;
  color: var(--text-2);
}
.footer__contacts a:hover { color: var(--accent-2); }
.footer__phone {
  font: 600 18px/1 var(--mono);
  color: var(--text) !important;
  letter-spacing: 0.01em;
}
.footer__note-time {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--muted);
}

/* юр-блок + ссылки */
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
  border-top: 1px solid var(--border);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  align-items: baseline;
  font: 500 13px/1.6 var(--mono);
  color: var(--muted);
}
.footer__legal b { color: var(--text-2); font-weight: 600; }
.footer__inn { letter-spacing: 0.02em; }

.footer__docs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}
.footer__docs a {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}
.footer__docs a:hover { color: var(--accent-2); }

/* дисклеймер */
.footer__disclaimer {
  margin: 0;
  padding-bottom: var(--space-6);
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 900px;
  opacity: 0.85;
}
.footer__disclaimer a { color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; }
.footer__disclaimer a:hover { color: var(--accent-2); }

/* гигантский вотермарк */
.footer__watermark {
  position: absolute;
  bottom: -0.22em;
  left: 50%;
  transform: translateX(-50%);
  font: 800 clamp(120px, 22vw, 320px)/1 var(--font);
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.045);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Формы ---------- */
.field { display: grid; gap: 7px; }
.field__label {
  font: 500 13px/1 var(--font);
  color: var(--text-2);
}
.field__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: 400 15px/1.4 var(--font);
  transition:
    border-color var(--t-fast) ease,
    background var(--t-fast) ease,
    box-shadow var(--t-fast) ease;
}
.field__input::placeholder { color: var(--muted); }
.field__input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(46, 107, 255, 0.06);
  box-shadow: 0 0 0 4px var(--glow-soft);
}
.field__input.has-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

/* honeypot — off-screen, не display:none */
.hp {
  position: absolute;
  left: -6000px;
  top: -6000px;
  width: 1px; height: 1px;
  opacity: 0;
  tabindex: -1;
}

/* ---------- Плавающая панель: Telegram (мобилки) + «наверх» ---------- */
.fbar {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40; /* ниже шапки (50) и моб.-меню (45) */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fbar__tg,
.fbar__top {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform var(--t-fast) var(--ease),
    opacity var(--t-med) ease,
    visibility var(--t-med) ease,
    box-shadow var(--t-med) ease,
    border-color var(--t-fast) ease;
}
.fbar__tg:active,
.fbar__top:active { transform: scale(0.93); }

/* Telegram — только на мобильных/планшетных (основной канал связи) */
.fbar__tg {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border: 1px solid rgba(91, 140, 255, 0.35) inset;
  box-shadow: 0 10px 28px -10px var(--glow);
}
.fbar__tg:hover { box-shadow: 0 14px 34px -10px var(--glow); }
@media (min-width: 961px) {
  .fbar__tg { display: none; } /* на десктопе связь в шапке/футере */
}

/* «Наверх» — появляется после прокрутки */
.fbar__top {
  background: rgba(5, 7, 13, 0.82);
  border: 1px solid var(--border-str);
  color: var(--text-2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}
.fbar__top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.fbar__top:hover {
  color: var(--text);
  border-color: rgba(91, 140, 255, 0.5);
}

/* iPhone-полоска: не уезжать под safe-area */
@media (max-width: 960px) {
  .fbar {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---------- Появление при скролле ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
