:root {
  color-scheme: dark;
  --bg: #030407;
  --text: #eef3ff;
  --muted: rgba(238, 243, 255, 0.7);
  --line: rgba(255, 255, 255, 0.18);
  --pink: #ff4fd8;
  --cyan: #4ee6ff;
  --violet: #7a6dff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

html {
  background: #000;
}

body {
  min-height: 1600vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(78, 230, 255, 0.08), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(255, 79, 216, 0.1), transparent 34%),
    linear-gradient(180deg, #060710 0%, #030407 60%, #000 100%);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

a,
button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.page-shell {
  position: relative;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(16, 19, 31, 0.96), rgba(0, 0, 0, 0.92)),
    #000;
  transition:
    opacity 0.45s ease,
    visibility 0.45s ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__inner {
  display: grid;
  gap: 14px;
  width: min(300px, calc(100vw - 48px));
}

.loader__label {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.loader__bar {
  display: block;
  height: 1px;
  width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.loader__bar::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: loaderSweep 1.15s linear infinite;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 34px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), transparent 88%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow:
    0 0 16px rgba(78, 230, 255, 0.45),
    0 0 26px rgba(255, 79, 216, 0.22);
}

.brand__text {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.language-switcher {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(7, 9, 15, 0.5);
  backdrop-filter: blur(12px);
}

.language-switcher__button {
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.language-switcher__button.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(78, 230, 255, 0.16), rgba(255, 79, 216, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.video-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

.scroll-video {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  background: #000;
}

.video-stage__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 16%, rgba(78, 230, 255, 0.08), transparent 22%),
    radial-gradient(circle at 78% 26%, rgba(255, 79, 216, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(2, 4, 8, 0.08), transparent 16%, transparent 78%, rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.video-stage__blackout {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.content {
  position: relative;
  z-index: 10;
}

.ride-overlay {
  position: relative;
}

.scene-copy {
  position: fixed;
  max-width: min(620px, calc(100vw - 56px));
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  pointer-events: none;
  will-change: opacity, transform;
  text-shadow:
    0 2px 24px rgba(0, 0, 0, 0.45),
    0 1px 3px rgba(0, 0, 0, 0.32);
}

.scene-copy--hero {
  right: clamp(110px, 13vw, 220px);
  bottom: 18vh;
  text-align: right;
}

.scene-copy--second {
  left: 118px;
  bottom: 28vh;
  text-align: left;
}

.scene-copy--third {
  left: clamp(280px, 32vw, 560px);
  bottom: 64vh;
  text-align: left;
}

.scene-copy--center {
  left: 50%;
  bottom: 126px;
  text-align: center;
  transform: translate3d(-50%, 30px, 0);
}

.scene-copy__eyebrow,
.finale__eyebrow {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.scene-copy__headline {
  max-width: 9.5ch;
  margin-left: auto;
  font-family: "Sora", sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

html[lang="ru"] .scene-copy--hero .scene-copy__headline {
  max-width: 11.5ch;
  font-size: clamp(2.7rem, 6.6vw, 5rem);
  line-height: 1;
}

html[lang="ru"] .scene-copy--hero {
  bottom: 21vh;
}

.scene-copy__line {
  margin-top: 16px;
  max-width: 20ch;
  font-size: clamp(1.2rem, 1.8vw, 1.72rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.scene-copy--hero .scene-copy__line {
  margin-left: auto;
}

.ride-hud {
  position: fixed;
  left: 34px;
  bottom: 24px;
  z-index: 18;
  display: grid;
  gap: 10px;
  width: min(320px, calc(100vw - 68px));
}

.ride-hud__label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}

.ride-hud__track {
  height: 1px;
  background: var(--line);
}

.ride-hud__track span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 0 18px rgba(78, 230, 255, 0.38);
}

.scroll-space {
  height: 2100vh;
}

.finale {
  position: relative;
  z-index: 20;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 152px 24px 72px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 14%, #000 100%),
    radial-gradient(circle at 50% 100%, rgba(255, 79, 216, 0.04), transparent 30%),
    #000;
}

.finale::before {
  content: "";
  position: absolute;
  inset: -140px 0 auto 0;
  height: 180px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), #000 74%);
  pointer-events: none;
}

.finale__inner {
  width: min(980px, 100%);
  text-align: center;
}

.finale__eyebrow {
  margin-bottom: 28px;
}

.finale__title {
  max-width: 17ch;
  margin: 0 auto;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.85rem, 6.6vw, 4.8rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.finale__body {
  max-width: 36ch;
  margin: 18px auto 0;
  color: rgba(238, 243, 255, 0.76);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.6;
}

.message-button {
  position: relative;
  margin-top: 126px;
  padding: 16px 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(78, 230, 255, 0.14), rgba(255, 79, 216, 0.16));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.message-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(78, 230, 255, 0.18), rgba(255, 79, 216, 0.22));
  border-color: rgba(255, 255, 255, 0.16);
}

.message-panel {
  min-height: 120px;
  max-width: 720px;
  margin: 10px auto 0;
  padding: 24px 8px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
  text-align: center;
}

.message-panel__text {
  width: 100%;
  max-width: 26ch;
  color: rgba(238, 243, 255, 0.82);
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  line-height: 1.55;
  text-align: center;
  white-space: pre-line;
  text-wrap: balance;
}


.message-panel__text.is-visible {
  color: #fff;
}

.message-panel__text.glitch-a,
.message-panel__text.glitch-b,
.message-panel__text.glitch-c {
  animation: messageReveal 0.65s ease;
}

.message-panel__text.is-scrambling {
  letter-spacing: 0.03em;
  opacity: 0.88;
  animation:
    messageReveal 0.65s ease,
    glitchShift 0.12s steps(2, end) infinite;
  text-shadow:
    -2px 0 rgba(255, 79, 216, 0.52),
    2px 0 rgba(78, 230, 255, 0.5),
    0 0 20px rgba(122, 109, 255, 0.16);
}

.message-panel__text.glitch-a {
  text-shadow:
    -1px 0 rgba(255, 79, 216, 0.5),
    1px 0 rgba(78, 230, 255, 0.45),
    0 0 24px rgba(255, 255, 255, 0.08);
}

.message-panel__text.glitch-b {
  text-shadow:
    0 0 22px rgba(78, 230, 255, 0.24),
    0 0 34px rgba(255, 79, 216, 0.14);
}

.message-panel__text.glitch-c {
  text-shadow:
    -2px 0 rgba(122, 109, 255, 0.36),
    2px 0 rgba(78, 230, 255, 0.28);
}

@keyframes loaderSweep {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(320%);
  }
}

@keyframes messageReveal {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    filter: blur(8px);
  }

  55% {
    opacity: 1;
    transform: translateY(0) scale(1.004);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes glitchShift {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-1px);
  }

  50% {
    transform: translateX(2px);
  }

  75% {
    transform: translateX(-2px);
  }

  100% {
    transform: translateX(0);
  }
}

@media (max-width: 900px) {
  .topbar {
    padding: 20px;
    gap: 12px;
  }

  .language-switcher {
    gap: 4px;
    padding: 4px;
  }

  .language-switcher__button {
    padding: 8px 10px;
    font-size: 0.68rem;
  }

  .scene-copy,
  .ride-hud {
    left: 20px;
    right: 20px;
    max-width: calc(100vw - 40px);
  }

  .scene-copy--hero {
    left: 20px;
    right: 20px;
    bottom: 102px;
    text-align: left;
  }

  .scene-copy--hero .scene-copy__headline,
  .scene-copy--hero .scene-copy__line {
    margin-left: 0;
  }

  .scene-copy--second,
  .scene-copy--third,
  .scene-copy--center {
    bottom: 128px;
    left: 20px;
    right: 20px;
    text-align: left;
    transform: translate3d(0, 30px, 0);
  }

  .scene-copy__line {
    max-width: 16ch;
    font-size: clamp(1.15rem, 5vw, 1.5rem);
  }

  .ride-hud {
    bottom: 22px;
    width: calc(100vw - 40px);
  }

  .ride-hud__label {
    white-space: normal;
  }

  .finale {
    padding-top: 110px;
  }

  .finale__title {
    max-width: 10ch;
  }

  .message-button {
    width: 100%;
    padding-inline: 18px;
    letter-spacing: 0.18em;
  }

  .message-panel {
    padding: 22px 0 0;
  }
}
