:root {
  color-scheme: dark;
  --bg: #0a0e14;
  --bg-soft: #0d1117;
  --panel: #111823;
  --panel-2: #151d2a;
  --line: #263140;
  --line-soft: #1b2431;
  --text: #e6edf3;
  --dim: #93a1b1;
  --accent: #4c9aff;
  --accent-soft: rgba(76, 154, 255, 0.14);
  --green: #3fb950;
  --gold: #d29922;
  --danger: #ff7b72;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 420px at 78% -8%, rgba(76, 154, 255, 0.16), transparent 65%),
    radial-gradient(700px 380px at 8% 4%, rgba(63, 185, 80, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  background: #0b1018;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 1px 5px;
}

h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hidden { display: none !important; }
.muted { color: var(--dim); }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.skip:focus { left: 12px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 20, 0.82);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.08em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, #2f6fd0, #1d4d9c);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(47, 111, 208, 0.35);
}

.nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-size: 14px;
}
.nav a { color: var(--dim); }
.nav a:hover { color: var(--text); text-decoration: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill.is-live { color: var(--text); border-color: rgba(76, 154, 255, 0.45); background: var(--accent-soft); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 40px;
  align-items: center;
  padding: 72px 0 64px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(44px, 7vw, 78px);
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #ffffff 20%, #9fc2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 640px;
  color: var(--dim);
  font-size: 18px;
}
.lead strong { color: var(--text); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  border-color: transparent;
  background: linear-gradient(180deg, #5aa4ff, #3b7fe0);
  color: #06101d;
  box-shadow: 0 10px 26px rgba(59, 127, 224, 0.32);
}
.btn-primary:hover { background: linear-gradient(180deg, #6cb0ff, #4388ea); }

.btn-ghost { background: rgba(17, 24, 35, 0.7); }
.btn-ghost:hover { border-color: #3a4a60; }

.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 6px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(17, 24, 35, 0.55);
  color: var(--dim);
  font-size: 13px;
}

.version-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
}

.card-label {
  color: var(--dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.version-value {
  margin: 10px 0 4px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.version-meta { color: var(--dim); font-size: 14px; }

.version-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.version-facts dt {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.version-facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; }

.version-notes {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 13px;
  white-space: pre-wrap;
  max-height: 120px;
  overflow: auto;
}

/* Sections */

.section { padding: 58px 0; border-top: 1px solid var(--line-soft); scroll-margin-top: 80px; }

.section-head { max-width: 720px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: 0.01em; }
.section-head p { margin-top: 10px; color: var(--dim); }

.section-note {
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(76, 154, 255, 0.06);
  border-radius: 0 8px 8px 0;
  color: var(--dim);
  font-size: 14px;
}
.section-note strong { color: var(--text); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 29, 42, 0.9), rgba(17, 24, 35, 0.9));
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.feature:hover { border-color: #35465c; transform: translateY(-2px); }

.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(76, 154, 255, 0.3);
  color: #9fc2ff;
  font-size: 17px;
}

.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--dim); font-size: 14px; }

/* Updates */

.status { margin-bottom: 14px; color: var(--dim); font-size: 14px; }

.notice {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 35, 0.6);
  color: var(--dim);
}
.notice p + p { margin-top: 6px; }
.notice-title { color: var(--text); font-weight: 700; }
.notice .btn { margin-top: 14px; }
.notice-error { border-style: solid; border-color: rgba(255, 123, 114, 0.45); background: rgba(255, 123, 114, 0.07); }
.notice-error .notice-title { color: var(--danger); }

.release-list { display: grid; gap: 12px; }

.release {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.release.is-current { border-color: rgba(76, 154, 255, 0.5); box-shadow: 0 0 0 1px rgba(76, 154, 255, 0.12) inset; }

.release-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.release-version { font-size: 20px; font-weight: 800; }
.release-date { color: var(--dim); font-size: 13px; }
.release-channel {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.release-channel.stable { color: var(--green); border-color: rgba(63, 185, 80, 0.4); }
.release-channel.beta { color: var(--gold); border-color: rgba(210, 153, 34, 0.4); }
.release-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #9fc2ff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.release-notes { color: var(--dim); font-size: 14px; white-space: pre-wrap; }
.release-notes:empty { display: none; }

/* Install */

.install-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.panel h3 { font-size: 16px; margin-bottom: 14px; }

.install-steps ol { margin: 0; padding-left: 20px; }
.install-steps li { margin-bottom: 12px; color: var(--dim); }
.install-steps li strong { color: var(--text); }
.install-steps .muted { margin-top: 16px; font-size: 13px; }

.requirements dl { margin: 0; display: grid; gap: 10px; }
.requirements dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.requirements dt { color: var(--dim); font-size: 14px; }
.requirements dd { margin: 0; font-size: 14px; font-weight: 600; text-align: right; }
.requirements .muted { margin-top: 14px; font-size: 13px; }

/* FAQ */

.faq { display: grid; gap: 10px; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 0 18px;
}
.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--dim); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; color: var(--dim); font-size: 14px; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 28px 0 40px;
  background: rgba(10, 14, 20, 0.6);
}
.footer-inner { display: grid; gap: 6px; font-size: 13px; }
.footer-inner p:first-child { font-weight: 600; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 52px 0 44px; gap: 26px; }
  .version-card { max-width: 520px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { width: min(1120px, calc(100% - 28px)); }
  .header-inner { flex-wrap: wrap; gap: 10px 16px; padding: 10px 0; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
  .pill { margin-left: auto; }
  .feature-grid { grid-template-columns: 1fr; }
  .version-facts { grid-template-columns: 1fr; }
  .hero h1 { font-size: 46px; }
  .lead { font-size: 16px; }
  .section { padding: 44px 0; }
}

/* Gallery */

.gallery-section { scroll-margin-top: 84px; }

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}
.gallery-filters button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--dim);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.gallery-filters button span {
  color: var(--dim);
  font-weight: 500;
  margin-left: 4px;
}
.gallery-filters button:hover,
.gallery-filters button:focus-visible {
  color: var(--text);
  border-color: var(--dim);
  outline: none;
}
.gallery-filters button.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.gallery-filters button.is-active span { color: var(--text); }

.gallery-panel[hidden],
.gallery-card[hidden] { display: none !important; }
.gallery-panel:not([hidden]) { animation: gallery-fade .28s ease; }
@keyframes gallery-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

/* Одинаковая геометрия карточки: 16:9 media + фиксированная подпись. */
.gallery-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.gallery-card:hover,
.gallery-card:focus-visible {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(76, 154, 255, .55);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
  outline: none;
}

.gallery-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  padding: 8px;
  background: #0d1117;
  overflow: hidden;
}
.gallery-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-caption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  height: 72px;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  text-align: left;
}
.gallery-tag {
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.gallery-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Виджеты: «В бою» и «В ангаре» визуально разделены. */
.gallery-subgroup + .gallery-subgroup {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.gallery-subhead {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
}
.gallery-subhead h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}
.gallery-subhead span { color: var(--dim); font-size: 12px; }

.gallery-note {
  margin: 16px 0 0;
  color: var(--dim);
  font-size: 13px;
}

/* Full-screen gallery viewer */

body.gallery-open { overflow: hidden; }
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gallery-modal.hidden { display: none; }
.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.gallery-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
}
.gallery-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.gallery-modal-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.gallery-modal-actions { display: flex; align-items: center; gap: 8px; }
.gallery-modal-button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.gallery-modal-button:hover,
.gallery-modal-button:focus-visible { border-color: var(--accent); outline: none; }
.gallery-modal-close { font-size: 20px; line-height: 1; padding: 4px 10px; }
.gallery-modal-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #080b10;
}
.gallery-modal-media.is-zoomed { align-items: flex-start; justify-content: flex-start; }
.gallery-modal-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  width: auto;
  height: auto;
  cursor: zoom-in;
}
.gallery-modal-media.is-zoomed .gallery-modal-image {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
.gallery-modal-status {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
  text-align: center;
}
.gallery-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
}
.gallery-modal-nav {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.gallery-modal-nav:hover:not(:disabled),
.gallery-modal-nav:focus-visible:not(:disabled) { border-color: var(--accent); outline: none; }
.gallery-modal-nav:disabled { opacity: .45; cursor: default; }
.gallery-modal-counter { color: var(--dim); font-size: 12px; }

@media (max-width: 980px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .gallery-section { scroll-margin-top: 120px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-caption { height: 76px; }
  .gallery-subgroup + .gallery-subgroup { margin-top: 22px; padding-top: 20px; }
  .gallery-modal { padding: 0; }
  .gallery-modal-dialog { width: 100%; max-height: 100vh; border-radius: 0; border-left: 0; border-right: 0; }
  .gallery-modal-media { padding: 8px; }
  .gallery-modal-image { max-height: calc(100vh - 190px); }
  .gallery-modal-bar, .gallery-modal-footer { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-card, .gallery-filters button { transition: none; }
  .gallery-card:hover { transform: none; }
  .gallery-panel:not([hidden]) { animation: none; }
}
