/* Classic BEM (Yandex):
 *   block
 *   block__element
 *   block_mod / block_mod_value
 * Mix: one node may be several blocks (e.g. "header__inner layout__container").
 * layout__container is a shared width block — never page__container inside header.
 * No tag cascades (.page a) — use standalone blocks (link, button, …).
 */

:root {
  --bg-deep: #171226;
  --bg: #1e1836;
  --card: #271f47;
  --card-2: #2f2656;
  --line: rgba(255, 255, 255, 0.10);
  --text: #f3efff;
  --muted: #b7add6;
  --primary: #ff5da2;
  --primary-2: #7c5cff;
  --accent: #2bd9c9;
  --danger: #ff5a6e;
  --radius: 18px;
  --maxw: 880px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Noto Sans Hebrew", "Noto Sans Arabic", "Noto Sans CJK SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* ── page ───────────────────────────────────────────────── */
.page {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124, 92, 255, 0.25), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(43, 217, 201, 0.12), transparent 55%),
    var(--bg-deep);
  line-height: 1.65;
}

.page_dir_rtl {
  direction: rtl;
}

.page_state_menu_open {
  overflow: hidden;
}

/* ── layout (shared width — mix on header/hero/footer inners) ─ */
.layout__container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.layout__main {
  padding: 22px 0 60px;
}

/* ── link (standalone block — no .page a cascade) ─────────── */
.link {
  color: var(--accent);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* ── header ─────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(23, 18, 38, 0.72);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 1;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
  text-decoration: none;
}

.header__brand:hover {
  text-decoration: none;
}

.header__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
}

.header__name {
  color: var(--text);
}

/* ── burger (mobile nav toggle — standalone block) ──────── */
.burger {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-inline-start: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.burger__line {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px 0;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger_state_active .burger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger_state_active .burger__line:nth-child(2) {
  opacity: 0;
}

.burger_state_active .burger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ── drawer (nav shell — desktop inline, mobile overlay) ── */
.drawer {
  display: flex;
  align-items: center;
  margin-inline-start: auto;
  gap: 8px;
}

.drawer__veil {
  display: none;
}

.drawer__panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── menu ───────────────────────────────────────────────── */
.menu {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}

.menu__item {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.menu__item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.menu__item_state_current {
  color: var(--text);
  background: rgba(124, 92, 255, 0.22);
}

/* ── lang ───────────────────────────────────────────────── */
.lang {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.lang__button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 6px 9px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.lang__button_state_current {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
}

/* ── hero ───────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 64px 0 28px;
}
.hero__title {
  font-size: clamp(26px, 5vw, 46px);
  margin: 0 0 10px;
  letter-spacing: 0.2px;
  line-height: 1.15;
  max-width: 720px;
  margin-inline: auto;
}

.hero__tagline {
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 20px);
  margin: 0 auto;
  max-width: 640px;
}

/* ── panel (card surface; may mix with legal / beta / invite) ─ */
.panel {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin: 18px 0;
}

.panel__text {
  margin: 0 0 1em;
}

.panel__text:last-child {
  margin-bottom: 0;
}

/* ── features ───────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.features__item {
  margin: 0;
}

.features__title {
  margin: 0 0 6px;
  font-size: 17px;
}

.features__text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ── beta (mix: class="panel beta") ─────────────────────── */
.beta__title {
  margin: 0 0 8px;
  font-size: 22px;
}

.beta__text {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.beta__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.beta__cell {
  margin: 0;
}

.beta__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  padding: 18px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.beta__item:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(124, 92, 255, 0.45);
}

.beta__qr {
  width: 140px;
  height: 140px;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}

.beta__label {
  font-weight: 700;
  font-size: 15px;
}

.beta__action {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

/* ── legal (mix: class="panel legal") ───────────────────── */
.legal__title,
.invite__title {
  font-size: clamp(26px, 4.5vw, 38px);
  margin: 8px 0 4px;
}

.legal__subtitle {
  font-size: 20px;
  margin: 28px 0 8px;
}

.legal__meta {
  color: var(--muted);
  font-size: 14px;
}

.legal__text,
.legal__item,
.invite__text {
  color: #e7e0fb;
}

.legal__list {
  padding-inline-start: 22px;
}

.legal__note {
  border: 1px solid rgba(43, 217, 201, 0.35);
  background: rgba(43, 217, 201, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
}

.legal__note_tone_danger {
  border-color: rgba(255, 90, 110, 0.4);
  background: rgba(255, 90, 110, 0.08);
}

/* ── invite (mix: class="panel invite") ─────────────────── */
.invite__code {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 6px;
  text-align: center;
  margin: 10px 0 20px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.invite__stores {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.invite__actions {
  margin: 0 0 16px;
}

.invite__nav {
  margin: 20px 0 0;
}

.invite__link {
  color: var(--accent);
}

/* ── button ─────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
}

.button_view_action {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: #fff;
}

/* ── footer ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.footer__inner {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.footer__nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer__copy {
  margin: 0;
}

.footer__link {
  color: var(--muted);
}

.footer__link:hover {
  color: var(--text);
}

/* ── faq (mix: class="panel faq") ───────────────────────── */
.faq__title {
  margin: 0 0 16px;
  font-size: 22px;
}

.faq__item {
  margin: 0 0 18px;
}

.faq__item:last-child {
  margin-bottom: 0;
}

.faq__question {
  margin: 0 0 6px;
  font-size: 17px;
}

.faq__answer {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ── locale (language slice wrapper — never mix) ────────── */
.locale {
  display: none;
}

.locale_state_active {
  display: block;
}

@media (max-width: 620px) {
  .header__inner {
    position: relative;
    z-index: 21;
    height: 64px;
    flex-wrap: nowrap;
  }

  .header__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
  }

  .burger {
    display: inline-flex;
    flex-direction: column;
    position: relative;
    z-index: 22;
  }

  .drawer {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: block;
    margin: 0;
    pointer-events: none;
    visibility: hidden;
  }

  .drawer_state_open {
    pointer-events: auto;
    visibility: visible;
  }

  .drawer__veil {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    background: rgba(8, 6, 14, 0.62);
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  .drawer__panel {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(23, 18, 38, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
  }

  .menu {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }

  .menu__item {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
  }

  .lang {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    justify-content: center;
  }
}
