@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap");

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

:root {
  --grad-top: linear-gradient(to bottom, #020715 0%, #081536 100%);
  --grad-middle: linear-gradient(to top, #020715 0%, #081536 100%);
  --grad-bottom: linear-gradient(to bottom, #020715 0%, #081536 100%);

  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.76);
  --text-muted: rgba(255, 255, 255, 0.58);
  --social-bg: rgba(255, 255, 255, 0.1);
  --social-border: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "IBM Plex Sans", Arial, sans-serif;
  color: var(--text-main);
  background: var(--grad-middle);
  overflow-x: hidden;
}

.inner-page {
  min-height: 100vh;
}

.inner-page__top {
  position: relative;
  background: var(--grad-top);
  padding: 48px 0 54px;
}

.inner-page__middle {
  background: var(--grad-middle);
  padding: 0 0 48px;
}

.inner-page__bottom {
  background: var(--grad-bottom);
  padding: 24px 0 42px;
}

/* top line */
.inner-header {
  width: min(1480px, calc(100% - 96px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inner-back {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 18px;
}

.inner-back__icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2e63ff 0%, #234fd0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.inner-back__icon img {
  width: 20px;
  height: 20px;
  transform: rotate(-90deg);
}

.inner-logo img {
  display: block;
  height: auto;
}

.inner-logo--desktop img {
  width: 150px;
}

.inner-logo--mobile {
  display: none;
}

/* pluses on one horizontal row with header */
.inner-page__plus {
  position: absolute;
  top: 74px;
  width: 22px;
  height: 22px;
  opacity: 0.42;
}

.inner-page__plus--left {
  left: 60px;
}

.inner-page__plus--right {
  right: 60px;
}

.inner-title-wrap {
  width: min(1480px, calc(100% - 96px));
  margin: 78px auto 0;
}

.inner-title {
  text-align: center;
  font-size: clamp(42px, 4vw, 78px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* content */
.legal-content {
  width: min(1200px, calc(100% - 96px));
  margin: 0 auto;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.55;
}

.legal-content p {
  margin-bottom: 22px;
}

.legal-content h2 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-main);
  margin: 34px 0 16px;
}

.inner-scroll-top {
  margin: 40px auto 0;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.inner-scroll-top img {
  width: 18px;
  height: 18px;
}

/* desktop footer */
.inner-footer {
  width: min(1480px, calc(100% - 96px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
}

.inner-footer__nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.inner-footer__nav--left {
  justify-content: flex-start;
}

.inner-footer__nav--right {
  justify-content: flex-end;
}

.inner-footer__nav a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.inner-footer__socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.inner-footer__socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--social-bg);
  border: 1px solid var(--social-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.inner-footer__socials img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.footer-desktop,
.footer-mobile {
  width: 100%;
}

.footer-desktop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 60px;
}

.footer-desktop__left,
.footer-desktop__right {
  display: flex;
  gap: 28px;
}

.footer-desktop__center {
  display: flex;
  gap: 16px;
}

.footer-desktop__center a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-desktop__center img {
  width: 18px;
  height: 18px;
}

.footer-desktop a {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #cfd6e6;
  text-decoration: none;
}

.footer-mobile {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

.footer-mobile__socials {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.footer-mobile__socials a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-mobile__socials img {
  width: 18px;
  height: 18px;
}

.footer-mobile__menus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  width: 100%;
  max-width: 320px;
}

.footer-mobile__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-mobile a {
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-decoration: none;
}

/* tablet */
@media (max-width: 1024px) {
  .inner-header,
  .inner-title-wrap,
  .legal-content,
  .inner-footer {
    width: calc(100% - 40px);
  }

  .inner-page__plus--left {
    left: 18px;
  }

  .inner-page__plus--right {
    right: 18px;
  }

  .legal-content {
    font-size: 15px;
    line-height: 1.48;
  }

  .legal-content h2 {
    font-size: 18px;
  }

  .inner-footer {
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    gap: 24px;
  }

  .inner-footer__nav--left,
  .inner-footer__nav--right {
    justify-content: center;
  }
}

/* mobile exactly like your screenshot */
@media (max-width: 768px) {
  .inner-page__top {
    padding: 12px 0 18px;
  }

  .inner-page__middle {
    padding-bottom: 18px;
  }

  .inner-page__bottom {
    padding: 18px 0 24px;
  }

  .inner-header {
    align-items: center;
  }

  .inner-back {
    gap: 8px;
    font-size: 8px;
  }

  .inner-back__icon {
    width: 18px;
    height: 18px;
  }

  .inner-back__icon img {
    width: 8px;
    height: 8px;
  }

  .inner-logo--desktop {
    display: none;
  }

  .inner-logo--mobile {
    display: block;
  }

  .inner-logo--mobile img {
    width: 16px;
  }

  .inner-page__plus {
    top: 26px;
    width: 10px;
    height: 10px;
    opacity: 0.32;
  }

  .inner-page__plus--left {
    left: 10px;
  }

  .inner-page__plus--right {
    right: 10px;
  }

  .inner-title-wrap {
    margin-top: 18px;
  }

  .inner-title {
    font-size: 20px;
    letter-spacing: 0.08em;
  }

  .legal-content {
    width: calc(100% - 24px);
    font-size: 8px;
    line-height: 1.34;
  }

  .legal-content p {
    margin-bottom: 9px;
  }

  .legal-content h2 {
    font-size: 9px;
    margin: 14px 0 8px;
  }

  .inner-scroll-top {
    margin-top: 18px;
    width: 20px;
    height: 20px;
  }

  .inner-scroll-top img {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 768px) {
  .footer-desktop {
    display: none;
  }

  .footer-mobile {
    display: flex;
  }
}

/* 404 */

.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to top, #020715 0%, #081536 100%);
}

.page-404__inner {
  text-align: center;
}

.page-404__logo {
  width: 140px;
  margin-bottom: 40px;
  opacity: 0.9;
}

.page-404__code {
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: clamp(140px, 20vw, 320px);
  font-weight: 700;
  line-height: 0.8;
  color: #ffffff;
  margin-bottom: 30px;
}

.page-404__text {
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 40px;
}

.page-404__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 56px;
  padding: 0 32px;

  border-radius: 999px;
  text-decoration: none;

  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;

  background: linear-gradient(180deg, #2e63ff 0%, #234fd0 100%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 20px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(46, 99, 255, 0.3);

  transition: transform 0.25s ease;
}

.page-404__btn:hover {
  transform: translateY(-2px);
}

/* декоративные тексты */
.page-404__meta {
  position: absolute;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
}

.page-404__meta--tl {
  top: 40px;
  left: 40px;
}

.page-404__meta--tr {
  top: 40px;
  right: 40px;
}

.page-404__meta--bl {
  bottom: 40px;
  left: 40px;
  transform: rotate(90deg);
}

.page-404__meta--br {
  bottom: 40px;
  right: 40px;
  transform: rotate(-90deg);
}

@media (max-width: 768px) {
  .page-404__logo {
    width: 100px;
    margin-bottom: 24px;
  }

  .page-404__code {
    font-size: 120px;
  }

  .page-404__text {
    font-size: 16px;
    padding: 0 20px;
  }

  .page-404__btn {
    height: 48px;
    font-size: 14px;
    padding: 0 22px;
  }

  .page-404__meta {
    display: none;
  }
}

/* loading */

.loading-screen {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to top, #020715 0%, #081536 100%);
  display: flex;
  justify-content: center;
}

.loading-screen__inner {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-screen__logo {
  width: 210px;
  height: auto;
  margin-top: 34px;
  display: block;
  flex-shrink: 0;
}

.loading-screen__spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
}

.loading-screen__spinner span {
  --i: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.22;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
  transform: rotate(calc(var(--i) * 30deg)) translateY(-34px) scale(0.72);
  animation: loadingOrbitPulse 1.35s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.09s);
}

.loading-screen__spinner span:nth-child(1) {
  --i: 0;
}
.loading-screen__spinner span:nth-child(2) {
  --i: 1;
}
.loading-screen__spinner span:nth-child(3) {
  --i: 2;
}
.loading-screen__spinner span:nth-child(4) {
  --i: 3;
}
.loading-screen__spinner span:nth-child(5) {
  --i: 4;
}
.loading-screen__spinner span:nth-child(6) {
  --i: 5;
}
.loading-screen__spinner span:nth-child(7) {
  --i: 6;
}
.loading-screen__spinner span:nth-child(8) {
  --i: 7;
}
.loading-screen__spinner span:nth-child(9) {
  --i: 8;
}
.loading-screen__spinner span:nth-child(10) {
  --i: 9;
}
.loading-screen__spinner span:nth-child(11) {
  --i: 10;
}
.loading-screen__spinner span:nth-child(12) {
  --i: 11;
}

@keyframes loadingOrbitPulse {
  0% {
    opacity: 0.18;
    transform: rotate(calc(var(--i) * 30deg)) translateY(-34px) scale(0.72);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 rgba(46, 99, 255, 0);
  }

  35% {
    opacity: 1;
    transform: rotate(calc(var(--i) * 30deg)) translateY(-34px) scale(1.18);
    background: #ffffff;
    box-shadow:
      0 0 10px rgba(255, 255, 255, 0.26),
      0 0 24px rgba(46, 99, 255, 0.28);
  }

  65% {
    opacity: 0.68;
    transform: rotate(calc(var(--i) * 30deg)) translateY(-34px) scale(0.9);
    background: #2e63ff;
    box-shadow:
      0 0 8px rgba(46, 99, 255, 0.24),
      0 0 18px rgba(46, 99, 255, 0.2);
  }

  100% {
    opacity: 0.18;
    transform: rotate(calc(var(--i) * 30deg)) translateY(-34px) scale(0.72);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 rgba(46, 99, 255, 0);
  }
}

.loading-screen__text {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  margin: 0;
  color: #ffffff;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.loading-screen__meta {
  position: absolute;
  display: inline-flex;
  opacity: 0.32;
}

.loading-screen__meta img {
  display: block;
  width: auto;
  height: auto;
  max-width: 58px;
  max-height: 58px;
}

.loading-screen__meta--tl {
  top: 34px;
  left: 34px;
}

.loading-screen__meta--tr {
  top: 34px;
  right: 34px;
}

.loading-screen__meta--bl {
  left: 34px;
  bottom: 34px;
}

.loading-screen__meta--br {
  right: 34px;
  bottom: 34px;
}

/* subtle center glow */
.loading-screen::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(24, 65, 188, 0.18) 0%,
    rgba(24, 65, 188, 0.08) 34%,
    rgba(24, 65, 188, 0.02) 56%,
    rgba(24, 65, 188, 0) 72%
  );
  pointer-events: none;
}

/* mobile */
@media (max-width: 768px) {
  .loading-screen__logo {
    width: 144px;
    margin-top: 24px;
  }

  .loading-screen__spinner {
    width: 74px;
    height: 74px;
  }

  .loading-screen__spinner span {
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    transform: rotate(calc(var(--i) * 30deg)) translateY(-28px) scale(0.72);
  }

  @keyframes loadingOrbitPulse {
    0% {
      opacity: 0.18;
      transform: rotate(calc(var(--i) * 30deg)) translateY(-28px) scale(0.72);
      background: rgba(255, 255, 255, 0.92);
      box-shadow: 0 0 0 rgba(46, 99, 255, 0);
    }

    35% {
      opacity: 1;
      transform: rotate(calc(var(--i) * 30deg)) translateY(-28px) scale(1.18);
      background: #ffffff;
      box-shadow:
        0 0 10px rgba(255, 255, 255, 0.26),
        0 0 22px rgba(46, 99, 255, 0.24);
    }

    65% {
      opacity: 0.68;
      transform: rotate(calc(var(--i) * 30deg)) translateY(-28px) scale(0.9);
      background: #2e63ff;
      box-shadow:
        0 0 8px rgba(46, 99, 255, 0.24),
        0 0 18px rgba(46, 99, 255, 0.18);
    }

    100% {
      opacity: 0.18;
      transform: rotate(calc(var(--i) * 30deg)) translateY(-28px) scale(0.72);
      background: rgba(255, 255, 255, 0.92);
      box-shadow: 0 0 0 rgba(46, 99, 255, 0);
    }
  }

  .loading-screen__text {
    bottom: 36px;
    font-size: 18px;
    line-height: 1.1;
  }

  .loading-screen__meta {
    opacity: 0.22;
  }

  .loading-screen__meta--tl,
  .loading-screen__meta--tr {
    top: 24px;
  }

  .loading-screen__meta--bl,
  .loading-screen__meta--br {
    bottom: 24px;
  }

  .loading-screen__meta--tl,
  .loading-screen__meta--bl {
    left: 18px;
  }

  .loading-screen__meta--tr,
  .loading-screen__meta--br {
    right: 18px;
  }

  .loading-screen__meta img {
    max-width: 40px;
    max-height: 40px;
  }

  .loading-screen::before {
    width: 420px;
    height: 420px;
  }
}
