/* Mobile — hero как https://telega.me/, 2-й экран скрыт */

:root {
  --telega-bg: #09090c;
  --telega-pad: 16px;
  --mobile-header-h: calc(56px + env(safe-area-inset-top, 0px));
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
  background: var(--telega-bg) !important;
}

body.nav-open {
  overflow: hidden;
}

.landing-stack {
  background: var(--telega-bg);
  overflow-x: clip;
  padding-bottom: 8px;
}

.page-edge {
  padding-left: var(--telega-pad);
  padding-right: var(--telega-pad);
}

.bg-circles {
  height: 85vh;
  opacity: 0.55;
}

.bg-circle {
  filter: blur(5px);
}

.bg-circle.c1 {
  width: 220px;
  height: 220px;
  left: -30%;
  top: 2%;
}

.bg-circle.c2 {
  width: 260px;
  height: 260px;
  right: -35%;
  top: 22%;
}

.bg-circle.c3 {
  width: 280px;
  height: 280px;
  left: 10%;
  bottom: 5%;
}

.bg-circle.c4 {
  display: none;
}

/* 2-й экран — только десктоп */
.blend-screen,
.hero-scroll-fade {
  display: none !important;
}

.neon-divider {
  display: none;
}

/* ——— Шапка ——— */
.topbar:not(.topbar--legal):not(.topbar--static) {
  position: fixed;
  inset: 0 auto auto 0;
  right: 0;
  top: 0;
  z-index: 100;
  padding: 0 !important;
  padding-top: env(safe-area-inset-top, 0px) !important;
  background: var(--telega-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.nav--desktop {
  display: none !important;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand {
  justify-content: flex-start;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-logo {
  width: 32px;
  height: 32px;
}

.brand-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar .btn--header {
  display: inline-flex !important;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer {
  display: flex;
  flex-direction: column;
  padding: 8px var(--telega-pad) 16px;
  background: var(--telega-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-drawer[hidden] {
  display: none !important;
}

.nav-drawer a {
  display: block;
  padding: 14px 12px;
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.nav-drawer a:last-child {
  margin-bottom: 0;
}

.topbar.topbar--legal,
.topbar.topbar--static {
  position: relative !important;
  top: auto !important;
  inset: auto !important;
  padding: max(8px, env(safe-area-inset-top, 0px)) 0 8px !important;
  background: var(--telega-bg);
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.topbar--legal .topbar-inner,
.topbar--static .topbar-inner {
  min-height: 48px;
  justify-content: center;
}

.topbar--legal + .legal-page {
  padding-top: 8px !important;
}

.topbar--legal + .legal-page .legal-content h1 {
  margin-top: 12px !important;
}

/* ——— Hero (telega @360: заголовок → подзаголовок → телефон + 2 иконки слева) ——— */
.hero {
  display: flex !important;
  grid-template-columns: unset !important;
  flex-direction: column !important;
  align-items: stretch !important;
  min-height: auto !important;
  padding-top: calc(var(--mobile-header-h) + 20px) !important;
  padding-bottom: 28px !important;
  gap: 0 !important;
  background: var(--telega-bg) !important;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.hero::after {
  display: none !important;
}

.hero.page-edge {
  padding-left: var(--telega-pad);
  padding-right: var(--telega-pad);
}

.hero-content {
  order: 1;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center;
  padding-top: 4px;
  z-index: 2;
}

.hero-title {
  font-size: clamp(28px, 9.2vw, 36px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 11em;
}

.hero-title span {
  display: block;
}

.hero-text {
  margin: 12px auto 0;
  font-size: clamp(15px, 4.2vw, 17px);
  line-height: 1.45;
  max-width: 28em;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 400;
}

.hero-download-btn--desktop,
.hero-download-btn--mobile {
  display: none !important;
}

.hero-card {
  order: 2;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0;
  padding: 16px 0 0;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: visible;
}

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 0 8px 12px;
  overflow: visible;
}

.hero-phone-layer {
  position: relative;
  width: min(298px, calc(100vw - 48px));
  margin: 0 auto;
}

.hero-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 82%,
    rgba(0, 0, 0, 0.4) 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 82%,
    rgba(0, 0, 0, 0.4) 93%,
    transparent 100%
  );
}

.hero-image-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(9, 9, 12, 0), var(--telega-bg));
  pointer-events: none;
  z-index: 2;
}

.hero-main-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
}

/* Иконки слева от телефона — без круглого фона (::before), с зазором между ними */
.hero-floating-icon {
  position: absolute;
  width: clamp(50px, 15vw, 56px);
  height: auto;
  pointer-events: none;
  background: none !important;
}

.hero-floating-icon::before {
  display: none !important;
  content: none !important;
}

.hero-floating-icon--link {
  left: 16%;
  top: 20%;
  z-index: 7;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.hero-floating-icon--lock {
  left: 12%;
  top: 47%;
  z-index: 6;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

/* ——— FAQ и ниже ——— */
.faq-screen {
  background: var(--telega-bg);
  padding-top: 8px;
}

.site-footer {
  background: var(--telega-bg);
}

.cookie-banner {
  border-radius: 20px;
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
  left: 12px;
  right: 12px;
  width: auto;
  max-width: none;
  transform: none;
}

.cookie-btn {
  width: 100%;
}

.faq-title {
  font-size: 22px;
  text-align: left;
}

.site-footer-inner {
  grid-template-columns: 1fr;
  gap: 32px;
}

.footer-brand-row {
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 380px) {
  .brand-name {
    font-size: 12px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-floating-icon {
    width: 50px;
  }

  .hero-floating-icon--link {
    left: 14%;
    top: 19%;
  }

  .hero-floating-icon--lock {
    left: 10%;
    top: 46%;
  }
}

/* ——— Страница «Скачать» ——— */
body.page-download .topbar.topbar--download {
  position: fixed;
  inset: 0 auto auto 0;
  right: 0;
  padding: 0 !important;
  padding-top: env(safe-area-inset-top, 0px) !important;
  background: var(--telega-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-download .topbar-inner--download {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  grid-template-columns: unset !important;
  min-height: 56px;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

body.page-download .site-footer--download {
  display: none !important;
}

body.page-download .topbar-inner--download .brand {
  justify-content: center;
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

body.page-download .topbar-inner--download .brand-name {
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
  font-size: clamp(13px, 3.6vw, 15px);
}

body.page-download .download-main {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: calc(var(--mobile-header-h) + 32px) var(--telega-pad) 48px !important;
  min-height: auto !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  box-sizing: border-box;
}

body.page-download .download-box {
  width: 100%;
  padding: 24px 18px 18px;
  border-radius: 22px;
  margin-top: 0;
}

body.page-download .download-title {
  font-size: clamp(22px, 6.5vw, 28px);
  line-height: 1.2;
}

body.page-download .download-subtitle {
  font-size: 15px;
  margin-bottom: 20px;
}

/* ——— /install-ios на телефоне ——— */
body.page-install .topbar.topbar--install {
  position: fixed;
  inset: 0 auto auto 0;
  right: 0;
  padding: 0 !important;
  padding-top: env(safe-area-inset-top, 0px) !important;
  background: var(--telega-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-install .topbar-inner--install {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 56px;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

body.page-install .topbar-inner--install .brand-name {
  font-size: clamp(13px, 3.6vw, 15px);
}

body.page-install .install-main {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: calc(var(--mobile-header-h, 56px) + 24px) var(--telega-pad, 16px) 40px !important;
  box-sizing: border-box;
}

body.page-install .install-article {
  padding: 0 4px;
}

body.page-install .install-title {
  font-size: clamp(22px, 6vw, 28px);
}

body.page-install .site-footer--install {
  display: none !important;
}
