:root {
  --bg: #000000;
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-nav: #6e6e73;
  --accent: #007aff;
  --accent-hover: #0a84ff;
  --border: rgba(255, 255, 255, 0.22);
  --border-strong: rgba(255, 255, 255, 0.38);
  --radius-pill: 980px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --header-h: 60px;
  --radius-btn: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.layout-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.page-home .main-home {
  overflow: hidden;
}

.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Фон как на макете: мягкое синее свечение из центра */
.page-home .glow {
  background: radial-gradient(
    ellipse 90% 75% at 50% 46%,
    rgba(0, 90, 200, 0.24) 0%,
    rgba(0, 50, 120, 0.09) 38%,
    rgba(0, 20, 50, 0.03) 58%,
    transparent 72%
  );
}

.header,
main,
.footer {
  position: relative;
  z-index: 1;
}

/* Header — как в макете */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 40px;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  overflow: visible;
}

.logo img {
  height: 36px;
  width: 36px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}

.logo-text {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav > a:not(.btn) {
  color: var(--text-nav);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
}

.nav > a:not(.btn):hover {
  color: var(--text-secondary);
}

.nav a.nav-active {
  color: var(--text-secondary);
}

.nav-login {
  color: var(--text) !important;
  font-weight: 400 !important;
}

.nav .btn-ghost {
  color: var(--text) !important;
  border: 1px solid var(--border-strong);
  background: transparent;
  font-weight: 400;
  padding: 8px 20px;
  font-size: 14px;
  border-radius: var(--radius-btn);
}

.nav .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.5);
}

.nav .btn-primary {
  color: #fff !important;
  font-weight: 500;
  padding: 8px 20px;
  font-size: 14px;
  background: var(--accent);
  border-radius: var(--radius-btn);
  box-shadow: 0 0 24px rgba(0, 122, 255, 0.5);
}

.nav .btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 28px rgba(0, 122, 255, 0.55);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px 24px;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 17px;
}

.mobile-menu[hidden] {
  display: none !important;
}

.mobile-menu.is-open {
  display: flex;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-btn);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #fff !important;
  box-shadow: 0 0 24px rgba(0, 122, 255, 0.4);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 32px rgba(0, 122, 255, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text) !important;
  border: 1.5px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

/* Home — один экран по центру */
.main-home {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 24px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero h1 {
  margin: 0 0 48px;
  font-size: clamp(2.375rem, 5.8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-bottom: 28px;
}

.hero-actions .btn {
  min-width: 210px;
  padding: 16px 44px;
  font-size: 17px;
  border-radius: var(--radius-btn);
}

.hero-actions .btn-primary {
  box-shadow: 0 0 32px rgba(0, 122, 255, 0.55), 0 4px 24px rgba(0, 122, 255, 0.25);
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.hero-note,
.hero-price {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* Внутренние страницы */
.page-inner {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 40px;
}

.page-heading {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
}

.page-lead {
  margin: 0 0 32px;
  text-align: center;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.page-back {
  margin: 40px 0 0;
  text-align: center;
  font-size: 14px;
}

.page-back a {
  color: var(--text-secondary);
  text-decoration: none;
}

.page-back a:hover {
  color: var(--text);
}

.tariffs-minimal {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.tariff-line {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 16px;
  padding: 20px 22px;
  background: rgba(28, 28, 30, 0.6);
}

.tariff-name {
  font-weight: 600;
  font-size: 17px;
}

.tariff-meta {
  grid-column: 1;
  font-size: 13px;
  color: var(--text-secondary);
}

.tariff-price {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  font-size: 15px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.faq {
  margin: 0;
}

.faq > div {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
}

.faq > div:first-child {
  border-top: none;
}

.faq dt {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}

.faq dd {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Footer — одна строка как в макете */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 32px 32px;
  font-size: 12px;
  color: var(--text-nav);
  margin-top: auto;
}

.footer--compact {
  padding: 20px 24px 28px;
}

.footer a {
  color: var(--text-nav);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-secondary);
}

.sep {
  color: var(--text-nav);
  opacity: 0.5;
  user-select: none;
}

/* Mobile */
@media (max-width: 768px) {
  .header {
    padding: 12px 20px;
  }

  .nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .hide-mobile {
    display: none !important;
  }

  .hero h1 {
    margin-bottom: 36px;
    font-size: 2rem;
    line-height: 1.15;
    max-width: 320px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 340px;
    gap: 12px;
    margin-bottom: 24px;
  }

  .hero-actions .btn {
    width: 100%;
    min-width: 0;
    padding: 15px 24px;
  }

  .footer {
    flex-direction: column;
    gap: 6px;
    padding-bottom: 24px;
  }

  .footer .sep {
    display: none;
  }

  .footer-links-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .tariff-line {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .tariff-price {
    grid-row: auto;
    grid-column: 1;
    justify-self: start;
  }
}

@media (min-width: 769px) {
  .mobile-menu.is-open {
    display: none !important;
  }

  .footer-mobile-break {
    display: none;
  }
}

/* ——— Auth: вход + регистрация в одном блоке ——— */
.page-auth .glow {
  background: radial-gradient(
    ellipse 90% 75% at 50% 46%,
    rgba(0, 90, 200, 0.24) 0%,
    rgba(0, 50, 120, 0.09) 38%,
    rgba(0, 20, 50, 0.03) 58%,
    transparent 72%
  );
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 32px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 18, 20, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.auth-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
}

.auth-subtitle {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form[hidden] {
  display: none !important;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.field input[type='email'],
.field input[type='password'] {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus {
  border-color: rgba(0, 122, 255, 0.6);
}

.field-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.field-check input {
  margin-top: 3px;
  flex-shrink: 0;
}

.field-check a {
  color: var(--accent);
  text-decoration: none;
}

.field-check a:hover {
  text-decoration: underline;
}

.btn-block {
  width: 100%;
  margin-top: 4px;
}

.auth-notice {
  margin: 16px 0 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  border-radius: 10px;
  background: rgba(0, 122, 255, 0.12);
  color: var(--text-secondary);
}

.auth-notice.is-error {
  background: rgba(255, 69, 58, 0.12);
  color: #ff6b6b;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 20px;
  color: var(--text-nav);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-hint {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-nav);
  text-align: center;
}

.lk-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 8px;
}

.lk-stat {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lk-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-nav);
  margin-bottom: 4px;
}

.lk-stat-value {
  font-size: 15px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px 24px;
    border-radius: 16px;
  }
}
