@font-face {
  font-family: "Asmysl Sans";
  src:
    url("fonts/392C28_0_0.woff2") format("woff2"),
    url("fonts/392C28_0_0.woff") format("woff"),
    url("fonts/392C28_0_0.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Asmysl Sans", system-ui, -apple-system, sans-serif;
  background: #0a0a0a;
}

/* —— Fullscreen board —— */

.board {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
}

.board__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a0a0a;
}

/* —— «О проекте» trigger —— */

.about-trigger {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);

  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem 0.45rem 0.55rem;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;

  font: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.about-trigger:hover {
  background: rgba(28, 28, 28, 0.88);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.about-trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 3px;
}

.about-trigger:active {
  transform: translateX(-50%) scale(0.98);
}

.about-trigger__logo {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
}

.about-trigger__label {
  padding-right: 0.15rem;
}

@media (min-width: 768px) {
  .about-trigger {
    left: auto;
    right: max(1.25rem, env(safe-area-inset-right, 0px));
    transform: none;
    font-size: 0.875rem;
    padding: 0.5rem 1rem 0.5rem 0.6rem;
  }

  .about-trigger:active {
    transform: scale(0.98);
  }
}

/* —— Overlay & dialog —— */

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));

  background: rgba(8, 8, 8, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
}

.about-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.about-overlay[hidden] {
  display: none;
}

.about-dialog {
  position: relative;
  width: min(100%, 36rem);
  max-height: min(88vh, 88dvh);
  overflow: hidden;

  border-radius: 1.25rem;
  background: #fff;
  color: #141414;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.28);

  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-overlay.is-open .about-dialog {
  transform: translateY(0) scale(1);
}

.about-dialog__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;

  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #333;
  cursor: pointer;

  transition: background 0.15s ease, color 0.15s ease;
}

.about-dialog__close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #000;
}

.about-dialog__close:focus-visible {
  outline: 2px solid #141414;
  outline-offset: 2px;
}

.about-dialog__inner {
  overflow-y: auto;
  max-height: min(88vh, 88dvh);
  padding: 2.5rem 2rem 2rem;
}

@media (min-width: 480px) {
  .about-dialog__inner {
    padding: 3rem 2.5rem 2.5rem;
  }
}

.about-dialog__brand {
  display: block;
  width: min(100%, 15rem);
  height: auto;
  margin: 0 auto 2rem;
}

.about-dialog__content {
  font-size: 1rem;
  line-height: 1.65;
  color: #2a2a2a;
}

.about-dialog__content:empty {
  min-height: 4rem;
}

.about-dialog__content p {
  margin: 0 0 1rem;
}

.about-dialog__content p:last-child {
  margin-bottom: 0;
}

.about-dialog__content a {
  color: #141414;
  text-underline-offset: 0.15em;
}

.about-dialog__content a:hover {
  color: #000;
}

.about-dialog__legal {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.875rem;
  line-height: 1.55;
  color: #5c5c5c;
}

.about-contacts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (min-width: 520px) {
  .about-contacts {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.about-contacts__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
  text-decoration: none;
  color: #2a2a2a;
}

a.about-contacts__item {
  transition: color 0.15s ease, opacity 0.15s ease;
}

a.about-contacts__item:hover {
  color: #000;
  opacity: 0.85;
}

a.about-contacts__item:focus-visible {
  outline: 2px solid #141414;
  outline-offset: 4px;
  border-radius: 0.5rem;
}

.about-contacts__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.about-contacts__img--icon {
  width: 4.5rem;
  height: 4.5rem;
}

.about-contacts__img--qr {
  width: 7.5rem;
  height: 7.5rem;
}

.about-contacts__label {
  font-size: 0.8125rem;
  line-height: 1.35;
  max-width: 9rem;
}

@media (min-width: 520px) {
  .about-contacts__label {
    font-size: 0.75rem;
    max-width: none;
  }
}
