:root {
  --bg: #2b2b2b;
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.64);
  --text-muted: rgba(255, 255, 255, 0.32);
  --card: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Montserrat";
}


html[lang="ru"] * {
  font-family: "Montserrat";
}

html[lang="zh"] * {
  font-family: "Montserrat";
}

html[lang="fa"] * {
  font-family: "Montserrat";
}

html[lang="fa"] .bg-shape.one {
  left: auto;
  right: -85%;
}

html[lang="fa"] .bg-shape.two {
  left: auto;
  right: -55%;
}

html[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

html[dir="rtl"] .lang-option {
  text-align: right;
}

html[dir="rtl"] .action-btn,
html[dir="rtl"] .link-item,
html[dir="rtl"] .documentation-item,
html[dir="rtl"] .support-item,
html[dir="rtl"] .donate-item {
  text-align: right;
  padding: 12px 12px 12px 24px;
}

html[dir="rtl"] .modal-back img {
  transform: rotate(-90deg);
}

html[dir="rtl"] .copy-tooltip {
  right: auto;
  left: 12px;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
  max-width: 1920px;
}

.page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 48px 64px 32px 64px;
  gap: 24px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  pointer-events: none;
  display: block;
  z-index: -1;
  opacity: 0.9;
}

.bg-shape.one {
  width: 156vw;
  left: 72%;
  top: 50%;
  transform: translate(-50%, -48%);
}

.bg-shape.two {
  width: 128vw;
  left: 72%;
  top: 50%;
  transform: translate(-50%, -48%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  animation: slide-down 0.8s ease-in-out forwards;
}

@keyframes slide-down {
  from {
    transform: translateY(-128px);
  }
  to {
    transform: translateY(0);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 39px;
  border-radius: 6px;
  display: grid;
  place-items: center;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.22;
  font-weight: 700;
}

.brand-text span {
  display: block;
  font-size: 16px;
  line-height: 1.22;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.48);
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 96px;
  list-style: none;
}

.nav-links a {
  font-size: 16px;
  line-height: 1.22;
  color: var(--text-soft);
  font-weight: 300;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.lang {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 4px 8px;
  height: 40px;
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lang-selector {
  position: relative;
}

.lang:hover {
  background: var(--card-hover);
}

.lang-caret {
  display: inline-block;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

.lang-flag {
  width: 20px;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  list-style: none;
  padding: 6px;
  display: none;
  z-index: 10;
}

.lang-menu li {
  width: 100%;
}

.lang-option {
  width: 100%;
  border: 0;
  display: block;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text-soft);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-option:hover,
.lang-option.is-active {
  background: var(--card-hover);
  color: var(--text);
}

.lang-selector.is-open .lang-menu {
  display: block;
  animation: fade-down 0.2s ease-in-out forwards;
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-selector.is-open .lang-caret {
  transform: rotate(180deg);
}

.hero {
  display: grid;
  align-content: center;
  max-width: 576px;
  gap: 48px;
  z-index: -1;
}

.hero-copy {
  display: grid;
  gap: 24px;
}

.hero-copy h1 {
  font-weight: 600;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  opacity: 1;
  transform: translateY(0);
  animation: fade-up 0.5s ease-in-out forwards;
}

.hero-copy h1 span {
  font-weight: 300;
}

.hero-copy p {
  font-weight: 200;
  font-size: clamp(14px, 2vw, 24px);
  line-height: 1.22;
  color: var(--text-soft);
  max-width: 54ch;
  opacity: 1;
  transform: translateY(0);
  animation: fade-up 0.8s ease-in-out forwards;
}

.actions {
  width: min(524px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.action-btn {
  border: 1px solid transparent;
  background: var(--card);
  border-radius: 12px;
  border-color: var(--card);
  color: var(--text);
  text-align: left;
  width: 100%;
  padding: 12px 24px 12px 12px;
  display: grid;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: var(--card-hover);
}

.action-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.download-btn {
  opacity: 0;
  transform: translateY(64px);
  animation: fade-up 0.5s ease-in-out both;
  animation-delay: 0.2s;
  transition: all 0.2s ease;
}

.docs-btn {
  opacity: 0;
  transform: translateY(64px);
  animation: fade-up 0.5s ease-in-out forwards;
  animation-delay: 0.4s;
}

.support-btn {
  opacity: 0;
  transform: translateY(64px);
  animation: fade-up 0.5s ease-in-out forwards;
  animation-delay: 0.6s;
}


.donate-btn {
  opacity: 0;
  transform: translateY(64px);
  animation: fade-up 0.5s ease-in-out forwards;
  animation-delay: 0.8s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(64px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.action-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--card);
  display: grid;
  place-items: center;
}

.action-icon img {
  width: 50%;
  height: 50%;
  display: block;
}

.action-title {
  font-size: 24px;
  line-height: 1.22;
  font-weight: 600;
}

.action-sub {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.22;
  font-weight: 200;
  color: var(--text-soft);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.22;
  font-weight: 300;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text-soft);
}

.not-found-page .bg-shape.one {
  left: 68%;
}

.not-found-page .bg-shape.two {
  left: 70%;
}

.not-found {
  display: grid;
  align-content: center;
  max-width: 620px;
  min-height: 100%;
}

.not-found-copy {
  display: grid;
  gap: 24px;
  animation: fade-up 0.6s ease-in-out both;
}

.not-found-code {
  width: fit-content;
  border: 1px solid var(--card);
  border-radius: 12px;
  background: var(--card);
  padding: 8px 14px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.22;
  font-weight: 500;
}

.not-found-copy h1 {
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 600;
}

.not-found-copy > p:not(.not-found-code) {
  max-width: 48ch;
  color: var(--text-soft);
  font-size: clamp(14px, 2vw, 22px);
  line-height: 1.22;
  font-weight: 200;
}

.not-found-link {
  width: fit-content;
  border: 1px solid var(--card);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  padding: 14px 20px;
  font-size: 16px;
  line-height: 1.22;
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.not-found-link:hover,
.not-found-link:focus-visible {
  background: var(--card-hover);
  border-color: var(--card-hover);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 99;
}

.modal-backdrop.open {
  display: flex;
  animation: fade-in 0.2s ease-in-out both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  border-radius: 16px;
  border: 1px solid var(--card);
  background: var(--card);
  padding: 24px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 32px;
}

.modal-head-left-content {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.modal-head-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-title {
  font-size: 32px;
  line-height: 1.22;
  font-weight: 600;
}

.modal-subtitle {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 200;
  color: var(--text-soft);
}

.modal-close {
  background: var(--card);
  border: 1px solid var(--card);
  border-radius: 12px;
  min-width: 32px;
  aspect-ratio: 1 / 1;
  color: var(--text);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background: var(--card-hover);
}

.modal-back {
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.modal-back img {
  width: 16px;
  height: 16px;
  transform: rotate(90deg);
  filter: brightness(0) invert(1);
}

.variants-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-body-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.links-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.link-item {
  display: flex;
  flex-direction: row;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--card);
  border-radius: 12px;
  padding: 12px 24px 12px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  align-items: center;
}

.link-item:hover {
  background: var(--card-hover);
}

.link-item img {
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 12px;
  background: var(--card);
}

.link-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.link-item-content h3 {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 600;
}

.link-item-content span {
  font-size: 12px;
  line-height: 1.1;
  font-weight: 200;
  color: var(--text-soft);
}

.documentation-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.documentation-item {
  width: max-content;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--card);
  border-radius: 12px;
  padding: 12px 24px 12px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  align-items: start;
}

.documentation-item:hover {
  background: var(--card-hover);
}

.documentation-item img {
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 12px;
  background: var(--card);
}

.documentation-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.documentation-item-content h3 {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 600;
}

.light {
  font-weight: 300;
}

.documentation-item-content p {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 200;
  color: var(--text-soft);
}

.support-modal {
  width: min-content;
}

.support-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  min-width: max-content;
}

.support-item {
  display: flex;
  flex-direction: row;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--card);
  border-radius: 12px;
  padding: 12px 24px 12px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  align-items: center;
}

.support-item:hover {
  background: var(--card-hover);
}

.support-item img {
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 12px;
  background: var(--card);
}

.support-item-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-item-content h3 {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 600;
}

.support-item-content p {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 300;
  height: 24px;
  padding: 0 12px;
  width: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--card);
  color: var(--text);
}

.support-item-paid-label {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 4px;
  color: var(--text);
  background: var(--card);
  padding: 0 12px 0 0;
  width: fit-content;
  height: 24px;
  border-radius: 12px;
  border: 1px solid var(--card);
}

.support-item-paid-label span {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.1;
}

.support-item-paid-label img {
  width: 24px;
  height: 24px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--card);
  padding: 4px;
}

.donate-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.donate-item {
  display: flex;
  flex-direction: row;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--card);
  border-radius: 12px;
  padding: 12px 24px 12px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  align-items: center;
  position: relative;
}

.copy-tooltip {
  position: absolute;
  top: 8px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  border: 1px solid var(--card);
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2;
}

.copy-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.donate-item:hover {
  background: var(--card-hover);
}

.donate-item img {
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 12px;
  background: var(--card);
}

.donate-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.donate-item-content h3 {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 600;
}

.donate-item-content span {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 200;
  color: var(--text-soft);
}

.donate-item-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.inactive {
  opacity: 0.24;
  cursor: not-allowed;
}

@media (max-width: 1200px) {

  .nav-links {
    gap: 48px;
  }

  html[lang="fa"] .bg-shape.one {
    width: 156vw;
    left: 84%;
  }

  html[lang="fa"] .bg-shape.two {
    right: 50%;
  }

  html[lang="fa"] .hero-copy p {
    max-width: 32ch;
  }

  .bg-shape.one {
    width: 212vw;
    left: 84%;
  }

  .bg-shape.two {
    left: 78%;
  }

  .not-found-page .bg-shape.one {
    left: 80%;
  }

  .not-found-page .bg-shape.two {
    left: 76%;
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .page {
    padding: 16px;
    gap: 16px;
    min-height: 100dvh;
  }

  .bg-shape.one {
    width: 256vh;
  }

  .bg-shape.two {
    display: none;
  }

  .topbar {
    align-items: center;
  }

  .brand {
    gap: 16px;
  }

  .brand-text strong {
    font-size: 16px;
  }

  .brand-text span {
    font-size: 12px;
  }

  .nav-links {
    display: none;
  }

  .lang {
    gap: 8px;
  }

  .hero {
    max-width: 100%;
    gap: 32px;
    align-content: center;
  }

  .hero-copy {
    gap: 24px;
  }

  .hero-copy h1 {
    font-size: 64px;
    line-height: 1;
  }

  .hero-copy p {
    font-size: 18px;
  }

  .not-found {
    max-width: 100%;
    align-content: center;
  }

  .not-found-copy {
    gap: 20px;
  }

  .not-found-copy h1 {
    font-size: 48px;
  }

  .not-found-copy > p:not(.not-found-code) {
    font-size: 18px;
  }

  .not-found-link {
    padding: 12px 16px;
    font-size: 14px;
  }

  .actions {
    width: 100%;
    gap: 8px;
  }

  .action-btn {
    padding: 8px;
    gap: 12px;
  }

  .action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .action-title {
    font-size: 14px;
  }

  .action-sub {
    font-size: 10px;
  }

  .footer {
    font-size: 10px;
  }

  .modal {
    padding: 16px;
    width: 70%;
  }

  .modal-title {
    font-size: 24px;
  }

  .modal-subtitle {
    font-size: 12px;
  }

  .modal-head {
    margin-bottom: 24px;
  }

  .modal-body {
    gap: 16px;
  }

  .modal-body-links {
    gap: 8px;
  }

  .links-row {
    flex-direction: column;
    gap: 8px;
  }

  .variants-row {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 8px;
  }

  .link-item {
    padding: 8px;
    gap: 12px;
  }

  .documentation-row {
    flex-direction: column;
    gap: 16px;
  }

  .documentation-item {
    width: 100%;  
    padding: 8px;
    gap: 12px;
  }

  .documentation-item img {
    width: 32px;
    height: 32px;
    padding: 8px;
    border-radius: 8px;
  }

  .documentation-item-content h3 {
    font-size: 14px;
  }

  .documentation-item-content p {
    font-size: 12px;
  }

  .support-row {
    min-width: 100%;
    flex-direction: column;
    gap: 12px;
  }

  .support-item {
    padding: 8px;
    gap: 12px;
  }

  .donate-item {
    padding: 8px;
    gap: 8px;
  }

  .donate-item img {
    width: 32px;
    height: 32px;
    padding: 8px;
    border-radius: 8px;
  }

  .donate-item-content h3 {
    font-size: 14px;
  }

  .donate-item-content span {
    font-size: 12px;
  }

  .donate-row {
   grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .second-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .width-full {
    grid-column: span 2;
  }
}

@media (max-width: 420px) {
  .hero-copy h1 {
    font-size: 48px;
  }

  .not-found-copy h1 {
    font-size: 40px;
  }

  .not-found-code {
    font-size: 14px;
    border-radius: 8px;
    padding: 6px 10px;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .not-found-copy > p:not(.not-found-code) {
    font-size: 14px;
  }

  .modal {
    width: 100%;
  }

  .link-item {
    padding: 8px;
  }

  .link-item img {
    width: 32px;
    height: 32px;
    padding: 8px;
    border-radius: 8px;
  }

  .link-item-content h3 {
    font-size: 14px;
  }

  .link-item-content span {
    font-size: 12px;
  }

  .modal-close {
    width: 24px;
    font-size: 24px;
    border-radius: 8px;
  }

  .support-modal {
    width: 100%;
  }

  .support-item-content {
    flex-direction: row-reverse;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .support-item-content h3 {
    font-size: 14px;
  }

  .support-item-content p {
    font-size: 10px;
    height: 18px;
  }

  .support-item-paid-label {
    padding: 0 8px 0 0;
    height: 18px;
    border-radius: 8px;
  }

  .support-item-paid-label span {
    font-size: 10px;
  }

  .support-item-paid-label img {
    width: 18px;
    height: 18px;
    padding: 4px;
  }

  .donate-modal {
    width: 100%;
  }
}
