* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0d0f14;
  --bg-soft: #12151d;
  --surface: #171b24;
  --surface-2: #1d222e;
  --surface-3: #232936;
  --border: #2a3142;
  --border-soft: #222838;
  --text: #e8ecf4;
  --text-bright: #ffffff;
  --muted: #8b94a8;
  --muted-2: #626b80;

  --mint: #35e0b5;
  --mint-strong: #1ccb9e;
  --mint-soft: rgba(53, 224, 181, 0.12);
  --sapphire: #5b7cfa;
  --sapphire-soft: rgba(91, 124, 250, 0.14);
  --blurple: #5865f2;
  --danger: #ff5d6c;
  --gold: #f5b84b;

  --grad: linear-gradient(135deg, #35e0b5 0%, #5b7cfa 100%);
  --grad-warm: linear-gradient(135deg, #ffb347 0%, #ff5d6c 100%);

  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.5);
  --glow-mint: 0 0 0 1px rgba(53, 224, 181, 0.25), 0 16px 48px rgba(53, 224, 181, 0.16);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Rubik", "Inter", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Тонкий фоновый шум через градиент-сетку */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(53, 224, 181, 0.08), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(91, 124, 250, 0.08), transparent 60%),
    var(--bg);
  pointer-events: none;
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: var(--grad);
  color: #08110e;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(53, 224, 181, 0.22), 0 4px 12px rgba(91, 124, 250, 0.14);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(53, 224, 181, 0.3), 0 6px 16px rgba(91, 124, 250, 0.2);
}

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

.btn-ghost:hover {
  border-color: var(--mint);
  color: var(--mint);
  transform: translateY(-2px);
}

.btn-light {
  background: #ffffff;
  color: #0d0f14;
  font-weight: 700;
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.btn-small {
  padding: 9px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 15px 26px;
  font-size: 16px;
  border-radius: 14px;
}

/* ---------- Хедер ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(13, 15, 20, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: #08110e;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.5px;
  box-shadow: 0 6px 18px rgba(53, 224, 181, 0.3);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.4px;
}

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

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: 9px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link-muted {
  color: var(--muted);
}

.nav-link-muted:hover {
  color: var(--text-bright);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
  gap: 5px;
}

.nav-toggle-line {
  width: 22px;
  height: 2px;
  background: var(--text-bright);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.open {
    display: flex;
  }
  .nav-link {
    padding: 12px;
  }
  .nav-link-muted {
    text-align: center;
  }
  .site-nav .btn {
    width: 100%;
  }
}

/* ---------- Появление при скролле ---------- */
.reveal {
  opacity: 1;
}

.js-reveal-init .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-reveal-init .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 90px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--mint);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
  letter-spacing: 0.2px;
  border: 1px solid rgba(53, 224, 181, 0.25);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  color: var(--text-bright);
  font-weight: 900;
  letter-spacing: -1.2px;
  margin-bottom: 22px;
}

.hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 30px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.hero-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 15px;
}

.hero-points svg {
  color: var(--mint);
  flex-shrink: 0;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.app-window {
  width: 100%;
  max-width: 530px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: perspective(1200px) rotateY(-4deg) rotateX(1deg);
  transition: transform 0.4s ease;
}

.app-window:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.window-dot-red {
  background: #ff5d6c;
}

.window-dot-yellow {
  background: var(--gold);
}

.window-dot-green {
  background: var(--mint);
}

.window-title {
  margin-left: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.window-body {
  display: grid;
  grid-template-columns: 68px 1fr;
  min-height: 300px;
}

.server-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  background: var(--bg-soft);
}

.server-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--surface-3);
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  transition: transform 0.2s, border-radius 0.2s;
}

.server-avatar:hover {
  border-radius: 50%;
  transform: translateY(-2px);
}

.server-avatar.active {
  background: var(--grad);
  color: #08110e;
}

.server-avatar.add {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-bright);
  font-size: 15px;
}

.chat-header-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.app-window .chat-messages {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.app-window .msg {
  display: flex;
  gap: 10px;
  font-size: 14px;
}

.app-window .msg strong {
  color: var(--mint);
  font-weight: 700;
  flex-shrink: 0;
}

.app-window .msg span {
  color: var(--text);
  line-height: 1.5;
}

.app-window .msg.own strong {
  color: var(--sapphire);
}

.chat-input {
  margin: 14px 18px 18px;
  padding: 13px 16px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Секции ---------- */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-heading {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.7px;
  margin-bottom: 16px;
}

.section-heading p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 50% -40%, rgba(53, 224, 181, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(53, 224, 181, 0.45);
  box-shadow: var(--shadow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--mint-soft);
  color: var(--mint);
  margin-bottom: 22px;
  position: relative;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-bright);
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  position: relative;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-copy {
    margin: 0 auto;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-points {
    align-items: flex-start;
    text-align: left;
    margin: 0 auto;
    width: fit-content;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 64px 0 56px;
  }
  .section {
    padding: 64px 0;
  }
}

/* ---------- Split / Безопасность ---------- */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 40px);
  color: var(--text-bright);
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -0.6px;
}

.split-copy > p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 26px;
}

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 15px;
}

.check-list svg {
  color: var(--mint);
  flex-shrink: 0;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mint);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: gap 0.2s;
}

.link-arrow:hover {
  gap: 11px;
  text-decoration: underline;
}

.security-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.security-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(53, 224, 181, 0.14), transparent 70%);
}

.security-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-bright);
}

.badge {
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(53, 224, 181, 0.14);
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(53, 224, 181, 0.3);
}

.security-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.65;
}

.security-meter {
  height: 9px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.security-meter span {
  display: block;
  height: 100%;
  background: var(--grad);
  border-radius: 999px;
}

.security-note {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 960px) {
  .split-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* ---------- Скачать ---------- */
.download-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.download-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 40px);
  color: var(--text-bright);
  font-weight: 800;
  margin-bottom: 18px;
}

.download-copy p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 30px;
}

.download-buttons {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.download-note {
  font-size: 13px;
  color: var(--muted-2);
}

.platform-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.platform-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: transform 0.2s, border-color 0.2s;
}

.platform-item:hover {
  transform: translateX(4px);
  border-color: var(--mint);
}

.platform-item strong {
  color: var(--text-bright);
  display: block;
  font-family: var(--font-display);
}

.platform-item span {
  color: var(--muted);
  font-size: 13px;
}

.platform-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--mint);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
}

@media (max-width: 960px) {
  .download-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* ---------- CTA ---------- */
.cta-section {
  padding: 50px 0 100px;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  background: var(--grad);
  border-radius: var(--radius-xl);
  padding: 46px 52px;
  color: #08110e;
  box-shadow: 0 28px 90px rgba(53, 224, 181, 0.3);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -40px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: -0.7px;
  margin-bottom: 10px;
  position: relative;
}

.cta-card p {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.85;
  position: relative;
}

.cta-card .btn {
  white-space: nowrap;
  position: relative;
}

@media (max-width: 760px) {
  .cta-card {
    flex-direction: column;
    text-align: center;
    padding: 34px 26px;
  }
}

/* ---------- Подвал лендинга ---------- */
.site-footer {
  padding: 42px 0;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  text-align: left;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h3 {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-bright);
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--mint);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 13px;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.footer-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(53, 224, 181, 0.15);
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ---------- Auth страницы ---------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(700px 400px at 50% -10%, rgba(53, 224, 181, 0.08), transparent 60%),
    var(--bg);
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  padding: 38px 36px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-family: var(--font-display);
  color: var(--text-bright);
  margin-bottom: 8px;
  font-size: 26px;
  letter-spacing: -0.4px;
}

.auth-card::after {
  content: "";
  display: block;
  height: 2px;
  width: 48px;
  background: var(--grad);
  border-radius: 2px;
  margin-top: 14px;
}

.auth-card label {
  display: block;
  margin: 16px 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.auth-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-card input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(53, 224, 181, 0.12);
}

.auth-card button {
  width: 100%;
  margin-top: 22px;
  padding: 13px;
  border: none;
  border-radius: 11px;
  background: var(--grad);
  color: #08110e;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.auth-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(53, 224, 181, 0.25);
}

.auth-alt {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.auth-alt a {
  color: var(--mint);
  text-decoration: none;
  font-weight: 600;
}

.flash-error {
  background: rgba(255, 93, 108, 0.12);
  border: 1px solid rgba(255, 93, 108, 0.35);
  color: #ffb3ba;
  padding: 12px;
  border-radius: 10px;
  margin-top: 18px;
  font-size: 14px;
}