:root {
  --header: rgba(18, 21, 30, 0.84);
  --line: rgba(255, 255, 255, 0.06);
  --text: #f5f7fb;
  --muted: #d2d8e4;
  --copy: rgba(240, 244, 255, 0.9);
  --blue-start: #4c67ff;
  --blue-end: #1bb0f4;
  --blue-soft: rgba(49, 129, 255, 0.34);
  --cyan-soft: rgba(0, 198, 255, 0.16);
  --violet-soft: rgba(123, 102, 255, 0.16);
  --surface: rgba(17, 21, 31, 0.48);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  --container: 1180px;
  --mouse-x: 0px;
  --mouse-y: 0px;
}

/* Base */

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 18%, rgba(72, 108, 255, 0.22), transparent 18%),
    radial-gradient(circle at 74% 42%, rgba(0, 198, 255, 0.12), transparent 18%),
    radial-gradient(circle at 18% 26%, rgba(255, 255, 255, 0.04), transparent 16%),
    linear-gradient(180deg, #0b1017 0%, #080b12 48%, #06080d 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

.page-shell {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

/* Background Scene */

.background-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-vignette,
.bg-grid,
.bg-noise,
.bg-scanlines,
.bg-aurora,
.bg-orb,
.bg-ring,
.bg-shard,
.bg-comet,
.bg-particle-field {
  position: absolute;
  inset: 0;
}

.bg-vignette {
  background:
    radial-gradient(circle at 70% 28%, rgba(67, 110, 255, 0.18), transparent 26%),
    radial-gradient(circle at 68% 54%, rgba(0, 170, 255, 0.12), transparent 28%),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.03), transparent 24%),
    radial-gradient(circle at center, transparent 48%, rgba(3, 5, 8, 0.24) 78%, rgba(2, 3, 7, 0.72) 100%);
}

.bg-grid {
  opacity: 0.18;
  background:
    linear-gradient(rgba(126, 156, 224, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 156, 224, 0.09) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 82%);
  animation: gridDrift 28s linear infinite;
}

.bg-noise {
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14) 0 1px, transparent 1.6px),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.1) 0 1px, transparent 1.4px),
    radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1.6px),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1.6px);
  background-size: 210px 210px, 280px 280px, 240px 240px, 320px 320px;
  animation: noiseShift 18s linear infinite;
}

.bg-scanlines {
  opacity: 0.08;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 5px
  );
}

.bg-aurora {
  filter: blur(80px);
  transform: translate3d(calc(var(--mouse-x) * 0.02), calc(var(--mouse-y) * 0.02), 0);
  animation: auroraFloat 16s ease-in-out infinite;
}

.bg-aurora-a {
  top: 10%;
  left: 56%;
  width: 34rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(89, 112, 255, 0.34), rgba(89, 112, 255, 0));
}

.bg-aurora-b {
  top: 34%;
  left: 58%;
  width: 30rem;
  height: 24rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 188, 255, 0.24), rgba(0, 188, 255, 0));
  animation-duration: 21s;
  animation-delay: -7s;
}

.bg-aurora-c {
  top: 50%;
  left: 32%;
  width: 20rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 102, 255, 0.14), rgba(125, 102, 255, 0));
  animation-duration: 19s;
  animation-delay: -12s;
}

.bg-orb {
  border-radius: 50%;
  filter: blur(10px);
  animation: orbPulse 8s ease-in-out infinite;
}

.bg-orb-a {
  top: 18%;
  left: 72%;
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 18px rgba(149, 206, 255, 0.72);
}

.bg-orb-b {
  top: 56%;
  left: 56%;
  width: 8px;
  height: 8px;
  background: rgba(0, 198, 255, 0.9);
  box-shadow: 0 0 24px rgba(0, 198, 255, 0.68);
  animation-delay: -2s;
}

.bg-orb-c {
  top: 68%;
  left: 66%;
  width: 7px;
  height: 7px;
  background: rgba(92, 134, 255, 0.92);
  box-shadow: 0 0 20px rgba(92, 134, 255, 0.62);
  animation-delay: -4s;
}

.bg-ring {
  --ring-angle: 0deg;
  border-radius: 42px;
  border: 1px solid rgba(110, 162, 255, 0.1);
  background: linear-gradient(180deg, rgba(21, 35, 58, 0.16), rgba(8, 13, 20, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transform: translate3d(calc(var(--mouse-x) * 0.03), calc(var(--mouse-y) * 0.03), 0);
  animation: ringTilt 14s ease-in-out infinite;
}

.bg-ring-a {
  --ring-angle: 18deg;
  top: 24%;
  right: 18%;
  width: 16rem;
  height: 22rem;
}

.bg-ring-b {
  --ring-angle: -10deg;
  bottom: 12%;
  right: 12%;
  width: 13rem;
  height: 8rem;
  border-radius: 30px;
  opacity: 0.72;
  animation-duration: 18s;
}

.bg-shard {
  background: linear-gradient(180deg, rgba(35, 65, 110, 0.18), rgba(8, 14, 23, 0.02));
  border: 1px solid rgba(121, 170, 255, 0.08);
  clip-path: polygon(18% 0, 100% 14%, 84% 100%, 0 86%);
  transform: translate3d(calc(var(--mouse-x) * 0.025), calc(var(--mouse-y) * 0.025), 0);
  animation: shardFloat 12s ease-in-out infinite;
}

.bg-shard-a {
  top: 18%;
  right: 22%;
  width: 12rem;
  height: 19rem;
  opacity: 0.32;
}

.bg-shard-b {
  top: 46%;
  right: 17%;
  width: 10rem;
  height: 7rem;
  opacity: 0.22;
  animation-delay: -4s;
}

.bg-shard-c {
  bottom: 10%;
  right: 28%;
  width: 8rem;
  height: 12rem;
  opacity: 0.16;
  animation-delay: -7s;
}

.bg-comet {
  --angle: 0deg;
  inset: auto;
  width: 14rem;
  height: 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(84, 178, 255, 0), rgba(84, 178, 255, 0.9));
  filter: blur(0.5px);
  opacity: 0.92;
  transform-origin: left center;
}

.bg-comet::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 9rem;
  height: 4px;
  border-radius: inherit;
  background: rgba(182, 235, 255, 0.74);
  transform: translateY(-50%);
  filter: blur(0.5px);
}

.bg-comet-a {
  --angle: -18deg;
  top: 22%;
  right: 22%;
  animation: cometWave 10s ease-in-out infinite;
}

.bg-comet-b {
  --angle: 112deg;
  top: 40%;
  right: 24%;
  width: 8rem;
  opacity: 0.42;
  animation: cometWave 12s ease-in-out infinite -4s;
}

.bg-particle-field {
  z-index: 1;
}

.bg-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0, rgba(96, 182, 255, 0.76) 46%, rgba(96, 182, 255, 0) 100%);
  opacity: var(--opacity);
  box-shadow: 0 0 18px rgba(80, 164, 255, 0.22);
  animation: particleDrift var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

/* Header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.topbar.is-scrolled {
  background: rgba(14, 17, 26, 0.96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
}

.left-group,
.right-group,
.nav-links,
.account-slot {
  display: flex;
  align-items: center;
}

.left-group {
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.right-group {
  gap: 20px;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}

.brand {
  position: relative;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(88, 151, 255, 0.9), rgba(88, 151, 255, 0));
  opacity: 0.54;
}

.divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.16);
  flex: 0 0 auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.lang-switch:hover,
.lang-switch:focus-visible {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.lang-picker {
  position: relative;
  z-index: 30;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 180px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(14, 17, 26, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  z-index: 35;
}

.lang-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #eef2fb;
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease;
}

.lang-option:hover,
.lang-option:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.lang-option.is-active {
  background: rgba(69, 129, 255, 0.16);
}

.flag {
  display: inline-block;
  width: 28px;
  height: 18px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.flag-ru {
  background: linear-gradient(180deg, #ffffff 0 33.33%, #284dca 33.33% 66.66%, #d13838 66.66% 100%);
}

.flag-en {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(180deg, #b22234 0 2px, #ffffff 2px 4px);
}

.flag-ua {
  background: linear-gradient(180deg, #2468ff 0 50%, #ffd447 50% 100%);
}

.caret {
  width: 9px;
  height: 9px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.9;
  transition: transform 180ms ease;
}

.lang-switch[aria-expanded="true"] .caret {
  transform: rotate(-135deg) translateY(1px);
}

.nav-links {
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #e4e7ee;
  white-space: nowrap;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-link.is-external {
  position: relative;
}

.nav-link svg,
.account-btn svg,
.primary-btn svg,
.secondary-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  background: linear-gradient(90deg, var(--blue-start), var(--blue-end));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow:
    0 10px 22px rgba(47, 126, 255, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.account-btn:hover,
.account-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(47, 126, 255, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Hero */

.hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 62px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: calc(100svh - 62px);
}

.hero-copy {
  position: relative;
  max-width: 520px;
  padding: 18px 0 18px 18px;
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 16px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 176, 244, 0.08), rgba(27, 176, 244, 0));
  filter: blur(14px);
  z-index: -1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #97b3ff;
}

.hero-kicker::before {
  content: "";
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, rgba(115, 163, 255, 0.92), rgba(115, 163, 255, 0));
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3.8rem, 5.2vw, 4.6rem);
  line-height: 0.98;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.26);
}

.hero-copy p:last-of-type {
  margin: 22px 0 0;
  max-width: 480px;
  font-size: 1.08rem;
  line-height: 1.56;
  color: var(--copy);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 54px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-btn {
  background: linear-gradient(90deg, #2d7fff, #28b2ff);
  color: #fff;
}

.secondary-btn {
  background: rgba(53, 53, 55, 0.92);
  color: #fff;
}

.primary-btn:hover,
.primary-btn:focus-visible,
.secondary-btn:hover,
.secondary-btn:focus-visible {
  transform: translateY(-1px);
}

.primary-btn:hover,
.primary-btn:focus-visible {
  box-shadow: 0 16px 30px rgba(40, 126, 255, 0.34);
}

.secondary-btn:hover,
.secondary-btn:focus-visible {
  background: rgba(66, 66, 70, 0.96);
}

.hero-actions a:focus-visible,
.nav-link:focus-visible,
.account-btn:focus-visible {
  outline: 2px solid rgba(120, 188, 255, 0.82);
  outline-offset: 2px;
}

/* Animations */

@keyframes gridDrift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(82px, 82px, 0);
  }
}

@keyframes noiseShift {
  0% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(-18px, 12px, 0);
  }

  100% {
    transform: translate3d(12px, -10px, 0);
  }
}

@keyframes auroraFloat {
  0%,
  100% {
    transform: translate3d(calc(var(--mouse-x) * 0.02), calc(var(--mouse-y) * 0.02), 0) scale(1);
  }

  50% {
    transform: translate3d(calc(var(--mouse-x) * 0.03), calc(var(--mouse-y) * 0.03), 0) scale(1.08);
  }
}

@keyframes orbPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.86;
  }

  50% {
    transform: scale(1.45);
    opacity: 1;
  }
}

@keyframes ringTilt {
  0%,
  100% {
    transform: translate3d(calc(var(--mouse-x) * 0.03), calc(var(--mouse-y) * 0.03), 0) rotate(var(--ring-angle));
  }

  50% {
    transform: translate3d(calc(var(--mouse-x) * 0.05), calc(var(--mouse-y) * 0.05), 0) rotate(calc(var(--ring-angle) + 3deg));
  }
}

@keyframes shardFloat {
  0%,
  100% {
    transform: translate3d(calc(var(--mouse-x) * 0.025), calc(var(--mouse-y) * 0.025), 0) translateY(0);
  }

  50% {
    transform: translate3d(calc(var(--mouse-x) * 0.035), calc(var(--mouse-y) * 0.035), 0) translateY(-16px);
  }
}

@keyframes cometWave {
  0%,
  100% {
    opacity: 0.5;
    transform: translateX(0) rotate(var(--angle, 0deg));
  }

  50% {
    opacity: 1;
    transform: translateX(18px) rotate(var(--angle, 0deg));
  }
}

@keyframes particleDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(var(--drift-x), var(--drift-y), 0) scale(1.4);
  }
}

/* Responsive */

@media (max-width: 980px) {
  .bar-row {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .left-group,
  .right-group,
  .nav-links,
  .account-slot {
    width: 100%;
  }

  .right-group {
    gap: 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-copy {
    max-width: 500px;
    padding-left: 0;
  }

  .bg-grid {
    background-size: 64px 64px;
  }

  .bg-aurora-a {
    left: 48%;
  }

  .bg-ring-a {
    right: 10%;
  }
}

@media (max-width: 560px) {
  body {
    overflow-y: auto;
  }

  .page-shell {
    min-height: 100svh;
  }

  .nav-links {
    gap: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

  .divider {
    display: none;
  }

  .account-btn,
  .primary-btn,
  .secondary-btn {
    width: 100%;
    justify-content: center;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    min-height: auto;
    padding: 46px 0 38px;
  }

  .hero-kicker {
    letter-spacing: 0.12em;
  }

  .hero-copy h1 {
    font-size: 2.95rem;
  }

  .hero-copy p:last-of-type {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .bg-aurora,
  .bg-ring-b,
  .bg-shard-c,
  .bg-comet-b {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
