:root {
  --bg: #050509;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --soft: rgba(255, 255, 255, 0.12);
  --purple: #c98cff;
  --purple-light: #e7c6ff;
  --container: min(92%, 1440px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero__video--mobile {
  display: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 72% 36%, rgba(201, 140, 255, 0.16), transparent 34%),
    linear-gradient(
      90deg,
      rgba(5, 5, 9, 0.97) 0%,
      rgba(5, 5, 9, 0.84) 38%,
      rgba(5, 5, 9, 0.38) 72%,
      rgba(5, 5, 9, 0.2) 100%
    );
}

.container {
  position: relative;
  z-index: 2;
  width: var(--container);
  margin: 0 auto;
}

.header {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  text-transform: uppercase;
}

.logo__icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.logo__text {
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: 7px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.25s ease;
}

.nav__link:hover {
  color: var(--purple-light);
}

/* Language planet switch */

.language-switch {
  position: relative;
  width: 124px;
  height: 46px;
  padding: 4px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(215, 163, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  box-shadow:
    inset 0 0 18px rgba(215, 163, 255, 0.07),
    0 0 28px rgba(150, 80, 255, 0.11);
}

.language-switch input {
  display: none;
}

.language-switch__label {
  position: relative;
  z-index: 4;
  width: 50%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.54);
  transition: color 0.3s ease;
}

.language-switch__label:hover {
  color: #fff;
}

.language-switch__orbit {
  position: absolute;
  z-index: 1;
  left: 17px;
  right: 17px;
  top: 50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(215, 163, 255, 0.55),
    transparent
  );
}

.language-switch__planet {
  position: absolute;
  z-index: 2;
  left: 7px;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, #fff 0%, #efe0ff 13%, transparent 24%),
    radial-gradient(circle at 65% 70%, rgba(40, 0, 120, 0.9), transparent 45%),
    linear-gradient(135deg, #f4d7ff 0%, #b75cff 38%, #4b1ac9 100%);
  box-shadow:
    0 0 14px rgba(215, 163, 255, 0.95),
    0 0 34px rgba(160, 90, 255, 0.65),
    0 0 70px rgba(160, 90, 255, 0.25);
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-switch__planet::before {
  content: "";
  position: absolute;
  width: 48px;
  height: 13px;
  left: -7px;
  top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-18deg);
}

.language-switch__planet::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35),
    transparent 45%,
    rgba(0, 0, 0, 0.28)
  );
}

#lang-en:checked ~ label[for="lang-en"],
#lang-ru:checked ~ label[for="lang-ru"] {
  color: #ffffff;
}

#lang-ru:checked ~ .language-switch__planet {
  left: 82px;
}

/* Hero content */

.hero__content {
  max-width: 720px;
  padding-top: 90px;
}

.hero__eyebrow {
  margin-bottom: 34px;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: 8px;
  font-size: 14px;
}

.hero__title {
  margin-bottom: 34px;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -4px;
}

.hero__subtitle {
  max-width: 580px;
  margin-bottom: 44px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 22px;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-height: 58px;
  padding: 18px 28px;
  border-radius: 999px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 14px;
  transition: 0.3s ease;
}

.button--primary {
  border: 1px solid var(--purple);
  color: #fff;
  background: rgba(201, 140, 255, 0.03);
}

.button--primary:hover {
  background: rgba(201, 140, 255, 0.13);
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(201, 140, 255, 0.18);
}

/* Services */

.services {
  margin-top: 115px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--soft);
  background: rgba(5, 5, 9, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.service-card {
  min-height: 190px;
  padding: 34px 30px;
  border-right: 1px solid var(--soft);
}

.service-card:last-child {
  border-right: none;
}

.service-card__icon {
  margin-bottom: 24px;
  color: var(--purple);
  font-size: 34px;
  line-height: 1;
}

.service-card__title {
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 16px;
  font-weight: 500;
}

.service-card__text {
  color: rgba(255, 255, 255, 0.64);
  font-size: 15px;
  line-height: 1.6;
}

.hero__bottom-line {
  padding: 26px 0 34px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.64);
}

.hero__bottom-line span {
  color: var(--purple);
}

/* Tablet */

@media (max-width: 1024px) {
  .hero__video {
    object-position: 62% center;
  }

  .hero__content {
    padding-top: 60px;
  }

  .services {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 90px;
  }

  .service-card {
    border-bottom: 1px solid var(--soft);
  }

  .service-card:nth-child(2n) {
    border-right: none;
  }
}

/* Mobile */

@media (max-width: 768px) {
  .hero {
    min-height: auto;
  }

  .hero__video--desktop {
    display: none;
  }

  .hero__video--mobile {
    display: block;
  }

  .hero__video {
    object-position: center top;
  }

  .hero__overlay {
    background:
      linear-gradient(
        180deg,
        rgba(5, 5, 9, 0.32) 0%,
        rgba(5, 5, 9, 0.68) 42%,
        rgba(5, 5, 9, 0.98) 74%,
        #050509 100%
      );
  }

  .header {
    height: auto;
    padding: 28px 0;
  }

  .logo__icon {
    width: 42px;
    height: 42px;
  }

  .logo__text {
    font-size: 12px;
    letter-spacing: 5px;
  }

  .nav {
    gap: 18px;
  }

  .nav__link {
    display: none;
  }

  .hero__content {
    max-width: 100%;
    padding-top: 260px;
  }

  .hero__eyebrow {
    margin-bottom: 24px;
    font-size: 12px;
    letter-spacing: 5px;
  }

  .hero__title {
    font-size: 50px;
    letter-spacing: -2px;
  }

  .hero__subtitle {
    font-size: 18px;
  }

  .services {
    grid-template-columns: 1fr;
    margin-top: 70px;
    background: rgba(5, 5, 9, 0.72);
  }

  .service-card,
  .service-card:nth-child(2n) {
    min-height: auto;
    padding: 28px 0;
    border-right: none;
    border-bottom: 1px solid var(--soft);
  }

  .hero__bottom-line {
    font-size: 11px;
    letter-spacing: 4px;
  }
}

/* Small mobile */

@media (max-width: 480px) {
  :root {
    --container: min(88%, 1440px);
  }

  .hero__content {
    padding-top: 220px;
  }

  .hero__title {
    font-size: 44px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .button {
    width: 100%;
    justify-content: space-between;
  }

  .language-switch {
    width: 106px;
    height: 40px;
  }

  .language-switch__label {
    height: 32px;
    font-size: 12px;
  }

  .language-switch__planet {
    width: 30px;
    height: 30px;
    left: 6px;
  }

  .language-switch__planet::before {
    width: 42px;
    height: 11px;
    left: -6px;
    top: 9px;
  }

  #lang-ru:checked ~ .language-switch__planet {
    left: 70px;
  }
}