* {
  box-sizing: border-box;
}
@font-face {
  font-family: "Mitr";
  src: url("./fonts/Mitr-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-display: swap;
}
html,
body {
  margin: 0;
  font-family: "Mitr";
  color: #fff;
}
html,
body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}
:root {
  --hdr-font-size: 1.5vw;
}
@media (max-width: 780px) {
  :root {
    --hdr-font-size: 5vw;
  }
}
body.menu-open {
  position: fixed;
  width: 100%;
  overflow: hidden; /* fallback */
}
.bg {
  position: fixed;
  inset: 0;
  background: url("./images/WebBack.gif") center / cover no-repeat;
  z-index: -1;
  pointer-events: none;
  filter: blur(10px);
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(12px, 5vw, 48px);
  width: 100%;
  font-size: var(--hdr-font-size); /* ← единый размер */
  color: #fff;
}

/* ЛЕВЫЙ БЛОК */
.header-left h1 {
  margin: 0;
  font: inherit; /* наследуем var(--hdr-font-size) */
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ПРАВЫЙ БЛОК (ссылки) */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px; /* без % чтобы не вылазио */
  min-width: 0;
}

.links {
  text-decoration: none;
  color: inherit;
  display: block;
  min-width: 0;
}
.links h1 {
  margin: 0;
  font: inherit; /* тот же размер, что у всего хедера */
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* БУРГЕР-КНОПКА */
.menu-toggle {
  display: none; /* на десктопе не показываем */
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle .bar {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: white;
  border-radius: 2px;
}
.menu-toggle .bar:nth-child(1) {
  top: 12px;
}
.menu-toggle .bar:nth-child(2) {
  top: 19px;
}
.menu-toggle .bar:nth-child(3) {
  top: 26px;
}

/* МЕДИА: до 780px — прячем правую часть в бургер */
@media (max-width: 780px) {
  .menu-toggle {
    display: inline-flex;
  }

  /* прячем навигацию, показываем по .open */
  .header-right {
    display: none;
    position: fixed;
    top: 60px; /* чуть ниже хедера */
    right: 12px;
    left: 12px;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #fff;
    color: black;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    animation: slideDown 0.15s ease-out;
    z-index: 1000;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 50%;
  }
  .header-right.open {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15%;
  }

  /* чтобы заголовок слева не прыгал и всё оставалось читабельно */
  .links h1 {
    white-space: nowrap;
    font-size: 7vw;
  }

  @keyframes slideDown {
    from {
      opacity: 0.001;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
.main {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.main-top {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.main-img {
  width: 80vw;
  max-width: 1000px;
  height: auto;
}
.main-text {
  font-size: 2vw;
  color: #fff;
}
.stack {
  position: relative;
  padding: min(6vh, 48px) 16px 40vh;
  margin-top: 20vh;
}

.panel {
  position: relative;
  width: 80vw;
  max-width: 1000px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;

  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);

  display: grid;
  place-items: center;
  padding: 7%;
  text-align: center;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
  z-index: 0;
}
.panel > * {
  position: relative;
  z-index: 1;
  font-size: 2vw;
}
@media (max-width: 780px) {
  .main-top {
    margin-top: 15vh;
  }
  .panel > * {
    position: relative;
    z-index: 1;
    font-size: 5vw;
  }
}
.panel--top {
  position: sticky;
  top: 24px;
  z-index: 1;
  transform-origin: top center;
  will-change: transform;
  transition: visibility 0.12s linear, opacity 0.12s linear;
}

.panel--bottom {
  margin-top: 24vh;
  position: relative;
  z-index: 10;
}
.copyText {
  text-align: center;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere; /* более агрессивно, чем break-word */
  word-break: normal;
}
.tocenimics {
  display: flex;
  flex-direction: column;
  width: 70vw;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20vh;
}
.tocenimics-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.tocenimics-text {
  font-weight: 900;
  color: #fff;
  font-family: "Mitr";
  font-size: 3vw;
}
footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5%;
}
.links-f {
  text-decoration: none;
}
.links-f h1 {
  font-size: 2vw;
  color: #fff;
}
@media (max-width: 780px) {
  .links-f h1 {
    font-size: 4vw;
    margin-bottom: 10vh;
  }
  .tocenimics-text {
    font-size: 6vw;
  }
  .tocenimics {
    width: 90vw;
  }
  .main-text {
    font-size: 9vw;
  }
}
