/* ==========================================================================
   Лендинг
   ========================================================================== */

.container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------------------------------------------------------------- шапка */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
}
.site-header__bar {
  background: rgba(32, 32, 32, 0.88);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.site-nav {
  display: flex;
  gap: 8px;
}
.site-nav__link {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text-2);
  transition: color 0.15s, background 0.15s;
}
.site-nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.site-header__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.burger {
  display: none;
  justify-self: end;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  place-content: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.burger[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: grid;
  gap: 20px;
  padding: 12px 20px 24px;
  background: var(--c-header);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.mobile-menu__nav {
  display: grid;
}
.mobile-menu__link {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-family: var(--font-display);
  font-size: 20px;
  border-bottom: 1px solid var(--c-border);
}
.mobile-menu__actions {
  display: grid;
  gap: 10px;
}

/* ----------------------------------------------------------------- герой */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(760px, calc(100vh - 78px));
  min-height: min(760px, calc(100svh - 78px));
  padding: 72px 0 112px;
  overflow: hidden;
  background: #6b8fb3 url(../img/hero.webp) center 45% / cover no-repeat;
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  background: linear-gradient(90deg, rgba(20, 20, 22, 0.94) 0%, rgba(20, 20, 22, 0.78) 36%, rgba(20, 20, 22, 0.2) 68%, rgba(20, 20, 22, 0.05) 100%);
}
.hero::after {
  background: linear-gradient(180deg, rgba(43, 43, 43, 0) 62%, var(--c-bg) 100%);
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 40px;
}
.hero__title {
  margin-top: 16px;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.04;
}
.hero__accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  max-width: 540px;
  margin-top: 22px;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  color: var(--c-text-2);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.hero__logo {
  justify-self: end;
  width: min(100%, 520px);
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45));
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  50% {
    transform: translateY(-12px);
  }
}

/* --------------------------------------------------------------- секции */

.section {
  padding: 112px 0;
  scroll-margin-top: 72px;
}
.section--tight {
  padding: 16px 0 112px;
}
.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}
.section-title {
  margin-top: 12px;
  font-size: clamp(30px, 3.4vw, 44px);
}
.lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--c-text-2);
}
.lead + .lead {
  margin-top: 16px;
}

/* ------------------------------------------------------------ о сервере */

.about {
  padding-top: 40px;
}
.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 56px;
  align-items: center;
  margin-bottom: 64px;
}
.about-intro__text .section-title {
  margin-bottom: 20px;
}
.about-intro__art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 380px;
  justify-self: center;
  width: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(30, 197, 220, 0.2) 0%, rgba(21, 152, 217, 0.08) 45%, transparent 70%);
}
.about-intro__art img {
  width: 76%;
  height: auto;
}

/* Карточки с персонажами: как в макете, персонаж стоит на нижнем крае карточки,
   а голова выглядывает над верхним краем. Стороны чередуются. */
.features {
  --pop: 90px;
  display: grid;
  gap: 104px;
  margin-top: 150px;
}
.feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40%;
  align-items: center;
  min-height: 270px;
  padding: 44px 52px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  background: radial-gradient(55% 110% at 82% 100%, rgba(30, 197, 220, 0.2) 0%, rgba(30, 197, 220, 0) 70%), var(--c-surface);
  box-shadow: var(--shadow-1);
  transition: border-color 0.25s;
}
.feature--reverse {
  grid-template-columns: 40% minmax(0, 1fr);
  background: radial-gradient(55% 110% at 18% 100%, rgba(30, 197, 220, 0.2) 0%, rgba(30, 197, 220, 0) 70%), var(--c-surface);
}
.feature:hover {
  border-color: rgba(30, 197, 220, 0.35);
}
.feature__body {
  grid-column: 1;
  max-width: 600px;
}
.feature--reverse .feature__body {
  grid-column: 2;
}
.feature__art {
  position: absolute;
  bottom: 0;
  right: 5%;
  width: auto;
  height: calc(100% + var(--pop));
  max-width: 36%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.4));
  pointer-events: none;
  user-select: none;
  /* растём от нижнего края — персонаж не отрывается от карточки */
  transform-origin: bottom center;
  transition: transform 0.35s var(--ease);
}
.feature--reverse .feature__art {
  right: auto;
  left: 5%;
}
.feature:hover .feature__art {
  transform: scale(1.05);
}
.feature--freedom {
  --pop: 100px;
}
.feature--build {
  --pop: 130px;
}
.feature--team {
  --pop: 50px;
}
.feature--rewards {
  --pop: 60px;
}
.feature__title {
  margin-bottom: 12px;
  font-size: 26px;
}
.feature__body p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-text-2);
}

/* ------------------------------------------------------------ как попасть */

.how {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
  border-top: 1px solid var(--c-border);
}
.how__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.how-step {
  position: relative;
  padding: 30px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  background: var(--c-surface);
}
.how-step__num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: var(--grad);
  font-family: var(--font-display);
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(21, 152, 217, 0.3);
}
.how-step__title {
  margin-bottom: 10px;
  font-size: 22px;
}
.how-step p {
  color: var(--c-text-2);
}
.how__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 40px;
}
.how__note {
  color: var(--c-text-2);
}

/* ---------------------------------------------------------------- telegram */

.tg-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 36px 44px;
  border: 1px solid rgba(30, 197, 220, 0.3);
  border-radius: var(--r-xl);
  background: radial-gradient(120% 160% at 0% 0%, rgba(30, 197, 220, 0.24) 0%, rgba(21, 152, 217, 0.06) 45%, rgba(0, 0, 0, 0) 70%), var(--c-surface);
}
.tg-banner__icon {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}
.tg-banner__title {
  margin-bottom: 8px;
  font-size: 32px;
}
.tg-banner__text p {
  font-size: 17px;
  color: var(--c-text-2);
}

/* ----------------------------------------------------------------- футер */

.site-footer {
  background: var(--c-header);
  border-top: 1px solid var(--c-border);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 0 36px;
}
.site-footer__slogan {
  max-width: 320px;
  margin-top: 14px;
  color: var(--c-text-2);
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-content: flex-start;
  font-weight: 600;
}
.site-footer__nav a {
  color: var(--c-text-2);
}
.site-footer__nav a:hover {
  color: #fff;
}
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--c-border);
  font-size: 13px;
  color: var(--c-text-3);
}

/* ================================================================ адаптив */

@media (max-width: 1080px) {
  .site-nav__link {
    padding: 8px 10px;
  }
  .hero__inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }
  .about-intro {
    gap: 32px;
  }
}

@media (max-width: 900px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
    height: 64px;
  }
  .site-nav,
  .site-header__actions {
    display: none;
  }
  .burger {
    display: grid;
  }

  .hero {
    min-height: 0;
    padding: 40px 0 88px;
    text-align: center;
  }
  .hero::before {
    background: linear-gradient(180deg, rgba(20, 20, 22, 0.35) 0%, rgba(20, 20, 22, 0.8) 55%, rgba(20, 20, 22, 0.92) 100%);
  }
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero__logo {
    order: -1;
    justify-self: center;
    width: min(62vw, 320px);
  }
  .hero__lead {
    margin-inline: auto;
  }
  .hero__actions {
    justify-content: center;
  }

  .section {
    padding: 72px 0;
  }
  .section--tight {
    padding: 8px 0 72px;
  }
  .about {
    padding-top: 24px;
  }
  .about-intro {
    grid-template-columns: 1fr;
  }
  .about-intro__art {
    display: none;
  }
  .features {
    gap: 90px;
    margin-top: 130px;
  }
  .feature {
    padding: 34px 32px;
    grid-template-columns: minmax(0, 1fr) 38%;
  }
  .feature--reverse {
    grid-template-columns: 38% minmax(0, 1fr);
  }
  .feature__art {
    max-width: 38%;
  }
  .how__steps {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .how-step {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px 18px;
    padding: 22px;
  }
  .how-step__num {
    grid-row: span 2;
    margin: 0;
  }
  .how-step__title {
    margin: 0;
    align-self: center;
  }
  .tg-banner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px 24px;
    padding: 28px;
  }
  .tg-banner__btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hero {
    background-image: url(../img/hero-960.webp);
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }
  .hero__actions .btn {
    flex: 1 1 100%;
  }
  /* на телефоне персонаж по центру и выглядывает над карточкой */
  .features {
    gap: 96px;
    margin-top: 110px;
  }
  .feature,
  .feature--reverse {
    display: block;
    min-height: 0;
    padding: 150px 22px 26px;
    background: radial-gradient(90% 60% at 50% 0%, rgba(30, 197, 220, 0.2) 0%, rgba(30, 197, 220, 0) 70%), var(--c-surface);
  }
  .feature__art,
  .feature--reverse .feature__art {
    top: -64px;
    bottom: auto;
    left: 50%;
    right: auto;
    height: 200px;
    max-width: 86%;
    transform: translateX(-50%);
  }
  .feature:hover .feature__art {
    transform: translateX(-50%);
  }
  .feature__title {
    font-size: 22px;
  }
  .lead {
    font-size: 16.5px;
  }
  .how__cta .btn {
    width: 100%;
  }
  .tg-banner {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 22px;
  }
  .tg-banner__icon {
    width: 64px;
    height: 64px;
  }
  .tg-banner__title {
    font-size: 24px;
  }
  .tg-banner__text p {
    font-size: 15px;
  }
  .site-footer__inner {
    flex-direction: column;
  }
  .site-footer__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
