/* Базовая цветовая схема (ориентировочно под стили mil.ru, без копирования) */
:root {
  --green-dark: #022b1b;
  --green-main: #06452a;
  --green-light: #0b5c37;
  --accent-gold: #f2c94c;
  --accent-gold-dark: #d1a635;
  --bg-main: #0a1610;
  --text-main: #f5f7f6;
  --text-muted: #aab5b0;
  --border-soft: rgba(255, 255, 255, 0.08);
  --danger: #c0392b;
  --backdrop: rgba(0, 0, 0, 0.75);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.6);
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #123726 0, #030806 60%, #000 100%);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Шапка */

.header {
  background: linear-gradient(90deg, #021c12, #06452a);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  background: radial-gradient(circle at 30% 20%, #fef5c0, #8a6925 60%, #403012 100%);
  color: #211507;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.logo-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.top-nav a {
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.top-nav a:hover {
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
}

.top-nav a.active {
  background: rgba(0, 0, 0, 0.55);
  color: var(--text-main);
}

/* Основной контент */

.main {
  flex: 1;
}

.hero {
  padding: 40px 16px 32px;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  background: radial-gradient(circle at top left, #175538 0, #04110b 55%);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  padding: 32px 28px 28px;
  position: relative;
  overflow: hidden;
}

.hero-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 120% -20%, rgba(242, 201, 76, 0.22), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.hero-content h1 {
  position: relative;
  margin: 0 0 14px;
  font-size: clamp(22px, 3vw, 28px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-content p {
  position: relative;
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 640px;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Секции описания */

.info {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 0 16px 8px;
}

/* Отступ при прокрутке к якорям с учетом закреплённого хедера */
.hero,
.info {
  scroll-margin-top: 80px;
}

.info h2 {
  margin: 0 0 10px;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Блок "Про армию" */

.army-info-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.army-text p + p {
  margin-top: 8px;
}

.leaders-block {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 12px 12px;
}

.leaders-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.leaders-note {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.leader-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.75));
  padding: 8px;
  cursor: pointer;
  text-align: left;
}

.leader-photo-placeholder {
  border-radius: 8px;
  background: linear-gradient(135deg, #555, #222);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}

.leader-name {
  font-size: 13px;
  font-weight: 600;
}

.leader-role {
  font-size: 11px;
  color: var(--text-muted);
}

.info-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-muted);
}

.info-list li + li {
  margin-top: 4px;
}

/* Подвал */

.footer {
  border-top: 1px solid var(--border-soft);
  background: #020806;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  color: var(--text-main);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.06s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #1a1403;
  border-color: rgba(0, 0, 0, 0.6);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffe07a, var(--accent-gold));
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.12);
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-muted);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.55);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.btn-download {
  text-align: center;
}

/* Модальные окна */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.show {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
}

.modal-dialog {
  position: relative;
  max-width: 760px;
  width: 100%;
  margin: 16px;
  background: linear-gradient(145deg, #04110b, #0b2f1c);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  padding: 22px 22px 18px;
  z-index: 101;
  max-height: calc(100vh - 32px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.modal h2 {
  margin: 0 0 10px;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-note {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.server-status {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.form-status {
  margin-right: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  min-height: 18px;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
}

.modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

/* Форма анкеты */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 16px;
  margin-top: 8px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 4px;
}

.docs-label {
  gap: 6px;
}

.docs-note {
  font-size: 11px;
  color: var(--text-muted);
}

.docs-summary {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.form-grid input,
.form-grid select {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 10px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-main);
  font-size: 16px; /* 16px чтобы iOS не зумил при фокусе */
}

.form-grid input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-grid input:focus,
.form-grid select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 1px rgba(242, 201, 76, 0.4);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* Блок видеоверификации */

.video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 10px;
}

.video-block {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  padding: 10px;
}

.video-preview-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  background: radial-gradient(circle at top, #1c3e2e, #020806 65%);
  aspect-ratio: 16 / 9;
}

#cameraPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-controls {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.video-record-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  min-height: 18px;
}

.upload-block {
  margin-top: 10px;
  font-size: 12px;
}

.upload-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#videoUpload {
  margin-top: 4px;
}

.upload-note {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.docs-upload-block {
  margin-top: 10px;
  font-size: 12px;
}

.docs-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Адаптивность */

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Навигация: удобный скролл по горизонтали вместо тесного переноса */
  .top-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding-bottom: 4px;
  }

  .top-nav a {
    white-space: nowrap;
  }

  .hero-content {
    padding: 22px 18px 18px;
  }

  .army-info-grid {
    grid-template-columns: 1fr;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    padding: 11px 18px;
    font-size: 15px;
  }

  .form-status {
    width: 100%;
    margin-right: 0;
    order: 3;
  }

  .modal-dialog {
    margin: 8px;
    padding: 18px 16px 14px;
    max-height: calc(100vh - 16px);
  }
}
