:root {
  color-scheme: dark;
  --ink: #f2eee2;
  --muted: #a8aa9e;
  --panel: rgba(13, 16, 12, 0.82);
  --panel-strong: rgba(10, 12, 9, 0.94);
  --line: rgba(189, 157, 67, 0.3);
  --gold: #b99a43;
  --gold-bright: #d5b95b;
  --green: #7ca64d;
  --danger: #a75a51;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: #0c0f0b;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  background: #0c0f0b;
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.scene,
.scene-shade,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.scene {
  z-index: -4;
  background-image: url("assets/hero.jpg");
  background-position: center center;
  background-size: cover;
  transform: scale(1.015);
  animation: scene-arrive 1.3s ease-out both;
}

.scene-shade {
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(5, 7, 5, 0.94) 0%, rgba(7, 9, 6, 0.7) 35%, rgba(5, 7, 5, 0.12) 68%, rgba(5, 7, 5, 0.58) 100%),
    linear-gradient(180deg, rgba(4, 6, 4, 0.5) 0%, transparent 30%, rgba(4, 6, 4, 0.76) 100%);
}

.grain {
  z-index: -2;
  opacity: 0.12;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.055) 4px),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(0, 0, 0, 0.08) 6px);
  mix-blend-mode: overlay;
}

.topbar,
.hero,
.footer {
  width: min(1440px, calc(100% - 64px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
}

.brand-sign {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(213, 185, 91, 0.72);
  border-radius: 50%;
  background: rgba(8, 10, 7, 0.82);
  box-shadow: inset 0 0 0 5px rgba(185, 154, 67, 0.1);
}

.brand-sign::before,
.brand-sign::after,
.brand-sign-core::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 15px;
  background: var(--gold-bright);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform-origin: 50% 100%;
}

.brand-sign::before { transform: translate(-50%, -100%) rotate(0deg); }
.brand-sign::after { transform: translate(-50%, -100%) rotate(120deg); }
.brand-sign-core::before { transform: translate(-50%, -100%) rotate(240deg); }

.brand-sign-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0c0f0b;
  border: 2px solid var(--gold-bright);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 0.82;
  letter-spacing: 0.16em;
}

.brand-name strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand-name span {
  margin-top: 7px;
  color: var(--gold-bright);
  font-size: 10px;
}

.server-state {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #c3c4bb;
  background: rgba(8, 10, 7, 0.62);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c3a84e;
  box-shadow: 0 0 0 4px rgba(195, 168, 78, 0.12);
  animation: state-pulse 1.7s ease-in-out infinite;
}

.server-state--ready .state-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(124, 166, 77, 0.15);
  animation: none;
}

.server-state--offline .state-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(167, 90, 81, 0.14);
  animation: none;
}

.server-state--unknown .state-dot {
  background: #898b84;
  box-shadow: none;
  animation: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(280px, 360px);
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  padding-block: clamp(80px, 14vh, 160px) clamp(50px, 8vh, 90px);
}

.hero-card {
  position: relative;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background:
    linear-gradient(135deg, rgba(25, 29, 21, 0.94), rgba(9, 11, 8, 0.83));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: panel-arrive 0.8s 0.12s ease-out both;
}

.hero-card::before,
.community-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.eyebrow,
.community-kicker {
  color: #cbc5b2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow span {
  width: 32px;
  height: 2px;
  background: var(--gold);
}

h1 {
  max-width: 590px;
  margin: 20px 0 18px;
  font-size: clamp(40px, 5.2vw, 74px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

h1 em {
  display: block;
  color: var(--gold-bright);
  font-style: normal;
}

.lead {
  max-width: 560px;
  margin: 0;
  color: #c1c2b9;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.58;
}

.feature-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 25px 0 30px;
}

.feature-line span {
  padding: 8px 11px;
  border: 1px solid rgba(185, 154, 67, 0.24);
  color: #d3cebd;
  background: rgba(185, 154, 67, 0.07);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.download-block {
  max-width: 470px;
}

.download-button {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 18px;
  overflow: hidden;
  border: 1px solid #d0b557;
  color: #11130f;
  background: linear-gradient(135deg, #d0b455 0%, #a7832d 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35), inset 0 1px rgba(255, 255, 255, 0.22);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.download-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, 0.22) 48%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 500ms ease;
}

.download-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.44), inset 0 1px rgba(255, 255, 255, 0.22);
}

.download-button:hover::before {
  transform: translateX(120%);
}

.download-button:focus-visible,
.social-link:focus-visible,
.brand:focus-visible {
  outline: 3px solid #f2d575;
  outline-offset: 3px;
}

.download-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-bottom: 3px solid #171912;
}

.download-icon::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 1px;
  width: 4px;
  height: 17px;
  background: #171912;
}

.download-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-right: 4px solid #171912;
  border-bottom: 4px solid #171912;
  transform: rotate(45deg);
}

.download-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.download-copy strong {
  font-size: 17px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.download-copy small {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.72;
}

.button-arrow {
  font-size: 27px;
  transition: transform 180ms ease;
}

.download-button:hover .button-arrow {
  transform: translateX(4px);
}

.download-note {
  margin: 10px 0 0;
  color: #96998d;
  font-size: 12px;
  text-align: center;
}

.community-card {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: panel-arrive 0.8s 0.24s ease-out both;
}

.community-card h2 {
  margin: 9px 0 8px;
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
}

.community-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.social-links {
  display: grid;
  gap: 9px;
}

.social-link {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.social-link:not(.social-link--unavailable):hover {
  transform: translateX(3px);
  border-color: rgba(185, 154, 67, 0.52);
  background: rgba(185, 154, 67, 0.08);
}

.social-link > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.social-link strong {
  font-size: 14px;
}

.social-link small {
  color: #8f9287;
  font-size: 11px;
}

.social-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: white;
  font-weight: 900;
}

.social-icon--vk {
  background: #3176b9;
  font-size: 14px;
  letter-spacing: -0.08em;
}

.social-icon--telegram {
  background: #278fc4;
}

.social-icon--telegram i {
  width: 22px;
  height: 19px;
  background: #fff;
  clip-path: polygon(3% 42%, 100% 0, 79% 100%, 52% 70%, 36% 86%, 38% 62%);
}

.social-arrow {
  color: #777b71;
  font-size: 18px;
}

.social-link--unavailable {
  cursor: default;
  filter: saturate(0.35);
  opacity: 0.58;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  color: rgba(222, 220, 209, 0.58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-warning {
  color: rgba(213, 185, 91, 0.72);
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.footer-links a,
.legal-back {
  color: rgba(213, 185, 91, 0.86);
  text-decoration: underline;
  text-decoration-color: rgba(213, 185, 91, 0.32);
  text-underline-offset: 4px;
}

.footer-links a:hover,
.legal-back:hover {
  color: var(--gold-bright);
}

.legal-shell {
  min-height: 100vh;
  min-height: 100svh;
  padding: 36px 20px 64px;
  background:
    linear-gradient(rgba(7, 9, 6, 0.9), rgba(7, 9, 6, 0.96)),
    url("assets/hero.jpg") center / cover fixed;
}

.legal-document {
  width: min(920px, 100%);
  margin: 28px auto 0;
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.legal-document h1 {
  margin: 14px 0 8px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.02;
}

.legal-document h2 {
  margin: 34px 0 12px;
  color: var(--gold-bright);
  font-size: 19px;
}

.legal-document p,
.legal-document li {
  color: rgba(242, 238, 226, 0.82);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.68;
}

.legal-document ul {
  padding-left: 22px;
}

.legal-meta {
  color: var(--muted);
  font-size: 13px;
}

.legal-note {
  padding: 14px 18px;
  border-left: 3px solid var(--gold);
  background: rgba(185, 154, 67, 0.08);
}

.public-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(222, 220, 209, 0.42);
  font-size: 10px;
}

.public-stats[hidden] {
  display: none;
}

.public-stats strong {
  color: rgba(213, 185, 91, 0.62);
  font-weight: 800;
}

.public-stats strong + strong::before {
  content: "·";
  margin-right: 10px;
  color: rgba(222, 220, 209, 0.24);
}

@keyframes scene-arrive {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1.015); }
}

@keyframes panel-arrive {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes state-pulse {
  50% { opacity: 0.4; transform: scale(0.85); }
}

@media (max-width: 980px) {
  .site-shell {
    overflow: auto;
  }

  .scene {
    background-position: 58% center;
  }

  .scene-shade {
    background:
      linear-gradient(180deg, rgba(5, 7, 5, 0.45) 0%, rgba(5, 7, 5, 0.2) 24%, rgba(5, 7, 5, 0.92) 67%, #080a07 100%);
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: end;
    gap: 18px;
    padding-top: clamp(220px, 40vh, 440px);
  }

  .hero-card,
  .community-card {
    width: min(100%, 680px);
  }

  .community-card {
    justify-self: end;
  }
}

@media (max-width: 640px) {
  .topbar,
  .hero,
  .footer {
    width: min(100% - 28px, 1440px);
  }

  .topbar {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .brand-name {
    display: none;
  }

  .server-state {
    padding-inline: 10px;
    font-size: 10px;
  }

  .hero {
    padding-top: clamp(230px, 42vh, 390px);
    padding-bottom: 36px;
  }

  .hero-card {
    padding: 26px 22px;
  }

  h1 {
    margin-top: 15px;
    font-size: clamp(35px, 11vw, 52px);
  }

  .lead {
    font-size: 15px;
  }

  .feature-line {
    margin-block: 20px 24px;
  }

  .download-button {
    grid-template-columns: 30px 1fr;
    min-height: 68px;
    padding-inline: 14px;
  }

  .button-arrow {
    display: none;
  }

  .download-copy strong {
    font-size: 14px;
  }

  .community-card {
    padding: 24px 20px;
  }

  .footer {
    flex-direction: column;
    gap: 7px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .public-stats {
    justify-content: flex-start;
  }
}

@media (max-height: 720px) and (min-width: 981px) {
  .hero {
    align-items: center;
    padding-block: 40px 28px;
  }

  .hero-card {
    padding: 28px 34px;
  }

  h1 {
    font-size: clamp(38px, 4.8vw, 62px);
  }

  .feature-line {
    margin-block: 18px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
