/**
 * Сфера Облако (Sfera Cloud) — Основная таблица стилей
 * Проект: yan84 Stealth Site
 * Чистый CSS3, нулевые внешние зависимости (Zero External CDN)
 */

:root {
  /* Фон и базовые поверхности */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);

  /* Границы и разделители */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-focus: #4f46e5;
  --border-accent: rgba(79, 70, 229, 0.4);

  /* Цветовые акценты */
  --accent-indigo: #4f46e5;
  --accent-indigo-hover: #4338ca;
  --accent-cyan: #0ea5e9;
  --accent-cyan-hover: #0284c7;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
  --accent-gradient-text: linear-gradient(135deg, #f8fafc 30%, #38bdf8 100%);

  /* Статусные цвета */
  --status-emerald: #10b981;
  --status-emerald-glow: rgba(16, 185, 129, 0.25);
  --status-amber: #f59e0b;
  --status-amber-glow: rgba(245, 158, 11, 0.25);
  --status-rose: #ef4444;
  --status-rose-glow: rgba(239, 68, 68, 0.25);

  /* Типографика */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090d16;

  /* Тени и свечения */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-card-glow: 0 0 25px rgba(79, 70, 229, 0.12);
  --shadow-cyan-glow: 0 0 20px rgba(14, 165, 233, 0.15);

  /* Радиусы скругления */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Переходы */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Сброс стилей и базовые настройки */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.nav-open {
  overflow: hidden;
}

/* Моноширинный стек */
code, pre, .font-mono, .badge-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  word-break: break-word;
}

/* Ссылки */
a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-cyan-hover);
}

img, svg {
  vertical-align: middle;
  max-width: 100%;
}

/* Сетка и контейнеры */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

/* Типографические утилиты */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

.text-gradient {
  background: var(--accent-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

/* Секция сайта */
.section {
  padding: 5rem 0;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }
}

/* ==========================================================================
   Шапка Сайта (Site Header)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1.5rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.brand-logo-text {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-logo-text .text-white {
  color: var(--text-primary);
  font-weight: 800;
}

.brand-logo-text .text-cyan {
  color: var(--accent-cyan);
  font-weight: 400;
  margin-left: 2px;
}

/* Десктопная навигация */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: var(--radius-full);
}

/* Правый блок действий */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Мобильный бургер-переключатель */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* Выпадающая панель мобильного меню */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 13, 22, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99;
  flex-direction: column;
  padding: 2rem 1.5rem;
  gap: 1.5rem;
  overflow-y: auto;
  border-top: 1px solid var(--border-subtle);
}

.mobile-drawer.is-active {
  display: flex;
}

.mobile-drawer .nav-link {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer .header-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 1024px) {
  .main-nav {
    display: none;
  }
  .header-actions .btn-outline {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .site-header .header-actions .status-indicator-badge {
    display: none;
  }
  .site-header .header-actions .btn-primary,
  .site-header .header-actions .header-cta,
  .site-header .header-cta {
    display: none;
  }
  .site-header .header-actions {
    gap: 0.5rem;
  }
  .mobile-drawer .header-actions .btn-primary,
  .mobile-drawer .header-cta {
    display: inline-flex;
  }
}

/* ==========================================================================
   Подвал Сайта (Site Footer)
   ========================================================================== */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 2rem 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 360px;
  line-height: 1.6;
}

.footer-col-title {
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

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

.footer-requisites {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-requisites strong {
  color: var(--text-secondary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

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

/* ==========================================================================
   Хлебные Крошки (Breadcrumbs)
   ========================================================================== */
.breadcrumbs {
  padding: 1.25rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  color: var(--border-light);
}

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

.breadcrumbs a:hover {
  color: var(--accent-cyan);
}

.breadcrumbs [aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}
