/* sav3nok gate — общий стиль для всех страниц */

:root {
  --bg-deep: #070a1f;
  --bg-mid: #0d1230;
  --cyan: #14b8cc;
  --cyan-soft: #1a9fb8;
  --purple: #8b3ac9;
  --purple-soft: #a855f7;
  --text: #e8ecff;
  --text-dim: #8a92b8;
  --border: rgba(139, 58, 201, 0.15);
  --border-bright: rgba(20, 184, 204, 0.3);
  --success: #22c55e;
  --warn: #f59e0b;
  --error: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(26, 159, 184, 0.35) 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(139, 58, 201, 0.4) 0%, transparent 45%),
    radial-gradient(circle at 10% 85%, rgba(139, 58, 201, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 90% 75%, rgba(26, 159, 184, 0.3) 0%, transparent 45%),
    var(--bg-deep);
  z-index: -2;
  animation: glowShift 20s ease-in-out infinite;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 3px 3px;
  z-index: -1;
  pointer-events: none;
}

@keyframes glowShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

a { color: var(--cyan); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--purple-soft); }

/* === НАВИГАЦИЯ === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 40px;
  background: rgba(7, 10, 31, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  flex-shrink: 0;
}
.logo::before {
  content: '◆';
  margin-right: 8px;
  color: var(--cyan);
  -webkit-text-fill-color: var(--cyan);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--cyan);
}

.nav-cta {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: white !important;
  padding: 10px 22px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(20, 184, 204, 0.3);
  color: white !important;
}

/* Мобильное меню (toggle) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  font-size: 22px;
}

/* === ЗАГОЛОВКИ И ТЕКСТ === */
h1, h2, h3, h4 { font-family: 'Unbounded', sans-serif; letter-spacing: -0.02em; }

.gradient {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--cyan);
}

/* === КНОПКИ === */
.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: white;
  padding: 16px 32px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(139, 58, 201, 0.4);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  padding: 16px 32px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border-bright);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-secondary:hover {
  background: rgba(20, 184, 204, 0.1);
  border-color: var(--cyan);
  color: var(--text);
}

/* === КАРТОЧКИ === */
.card {
  padding: 32px;
  background: rgba(13, 18, 48, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.4s ease;
}
.card:hover {
  border-color: var(--border-bright);
}

/* === ХЛЕБНЫЕ КРОШКИ === */
.breadcrumbs {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
  font-family: 'JetBrains Mono', monospace;
}
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs .sep { color: var(--border-bright); }

/* === КОНТЕЙНЕР СТРАНИЦЫ === */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.page-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.page h1 {
  font-weight: 800;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-intro {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 48px;
  max-width: 720px;
}

/* === КОНТЕНТ СТАТЕЙ === */
.article h2 {
  font-size: 28px;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--cyan);
}

.article h3 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.article p {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 16px;
}

.article ul, .article ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article li {
  margin-bottom: 10px;
  color: var(--text);
}

.article strong { color: var(--cyan); font-weight: 600; }

.article .info-box {
  padding: 20px 24px;
  background: rgba(20, 184, 204, 0.06);
  border-left: 3px solid var(--cyan);
  border-radius: 12px;
  margin: 24px 0;
}
.article .info-box p:last-child { margin-bottom: 0; }

.article .warn-box {
  padding: 20px 24px;
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid var(--warn);
  border-radius: 12px;
  margin: 24px 0;
}

/* === ФУТЕР === */
footer {
  border-top: 1px solid var(--border);
  padding: 60px 24px 40px;
  max-width: 1200px;
  margin: 60px auto 0;
  color: var(--text-dim);
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand { max-width: 400px; }
.footer-brand p {
  margin-top: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.footer-col a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  padding: 5px 0;
  font-size: 13px;
}
.footer-col a:hover { color: var(--cyan); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.disclaimer {
  padding: 16px 20px;
  background: rgba(13, 18, 48, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 12px;
  line-height: 1.6;
}

/* === АДАПТИВ === */
@media (max-width: 900px) {
  nav { padding: 14px 18px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(7, 10, 31, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 18px 20px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 12px 4px;
    font-size: 16px;
    width: 100%;
  }

  .menu-toggle { display: block; }
  .nav-cta {
    padding: 8px 18px;
    font-size: 13px;
  }

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

  .page, .page-wide { padding: 90px 18px 60px; }
}

/* === МОБИЛЬНЫЕ ТЕЛЕФОНЫ === */
@media (max-width: 600px) {
  nav { padding: 12px 14px; }
  .logo { font-size: 16px; }
  .logo::before { margin-right: 6px; }

  .nav-cta {
    padding: 7px 14px;
    font-size: 12px;
  }
  .menu-toggle {
    padding: 6px 8px;
    font-size: 20px;
  }

  /* Кнопки крупнее под палец, не уезжают за край */
  .btn-primary, .btn-secondary {
    padding: 14px 24px;
    font-size: 14px;
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  /* Карточки и контент */
  .card { padding: 22px; border-radius: 16px; }

  .page, .page-wide { padding: 80px 16px 50px; }

  .page-intro { font-size: 16px; margin-bottom: 32px; }

  /* Статьи */
  .article h2 { font-size: 22px; margin-top: 36px; }
  .article h3 { font-size: 17px; margin-top: 24px; }
  .article p, .article li { font-size: 15px; }
  .article .info-box, .article .warn-box {
    padding: 16px 18px;
    margin: 18px 0;
  }

  /* Хлебные крошки в одну строку с переносом */
  .breadcrumbs {
    flex-wrap: wrap;
    font-size: 12px;
    margin-bottom: 18px;
  }

  /* Футер компактнее */
  footer {
    padding: 40px 16px 30px;
    margin-top: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
  }
  .disclaimer { font-size: 11px; padding: 14px 16px; }

  /* Декоративный фон не должен мешать */
  .platform-bg {
    width: 360px;
    height: 360px;
    right: -180px;
    opacity: 0.025;
  }
}

/* === ОЧЕНЬ УЗКИЕ ЭКРАНЫ (iPhone SE и т.п.) === */
@media (max-width: 380px) {
  nav { padding: 10px 12px; }
  .logo { font-size: 15px; }
  .nav-cta { padding: 6px 12px; font-size: 11px; }

  .page, .page-wide { padding: 76px 14px 40px; }
}

/* Безопасные зоны iPhone (notch, home indicator) */
@supports (padding: max(0px)) {
  nav {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
  footer {
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }
}

/* === ЛОГОТИПЫ-ВОДЯНЫЕ ЗНАКИ НА ФОНЕ === */
.platform-bg {
  position: fixed;
  top: 50%;
  right: -100px;
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  opacity: 0.04;
  pointer-events: none;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.platform-bg svg { width: 100%; height: 100%; }

@media (max-width: 900px) {
  .platform-bg {
    right: -200px;
    width: 500px;
    height: 500px;
  }
}

/* === Защита от выпадания текста за края на мобильных === */
@media (max-width: 480px) {
  .hero h1, .page h1, h1 {
    font-size: clamp(28px, 8vw, 40px) !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .hero { padding: 110px 18px 50px; }
  .hero-subtitle { font-size: 15px !important; padding: 0 4px; }
  .section h2 {
    font-size: clamp(22px, 6vw, 32px);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .gradient { display: inline; }
}

@media (max-width: 360px) {
  .hero h1, .page h1, h1 {
    font-size: 26px !important;
  }
}

/* Защита от горизонтальной прокрутки */
html, body { overflow-x: hidden; max-width: 100vw; }
* { max-width: 100vw; box-sizing: border-box; }
