:root {
  color-scheme: dark;
  --blue: #173cff;
  --deep-blue: #060c5e;
  --yellow: #fff705;
  --scene-width: 1200px;
  --scene-height: 580px;
}

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

html,
body {
  min-width: 320px;
  margin: 0;
  background: #000;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Arial, Helvetica, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: max(580px, 100svh);
  overflow: hidden;
  isolation: isolate;
  background: #000;
}

.scene {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: var(--scene-width);
  height: var(--scene-height);
  transform: translate(calc(-50% + var(--pointer-x, 0px)), calc(-50% + var(--pointer-y, 0px))) scale(var(--scene-scale, 1));
  transform-origin: center;
  transition: transform 180ms ease-out;
}

.network {
  position: absolute;
  z-index: 0;
  background: var(--network-image, none) center / contain no-repeat;
  opacity: 0.8;
  pointer-events: none;
}

.network--left {
  top: calc(50% - 505px);
  left: calc(50% - 1099px);
  width: 1252px;
  aspect-ratio: 1680 / 1071;
  transform: rotate(165deg);
}

.network--right {
  top: calc(50% - 505px);
  left: calc(50% + 43px);
  width: 793px;
  aspect-ratio: 1680 / 1071;
  transform: rotate(31deg);
}

.wave {
  position: absolute;
  z-index: 1;
  top: calc(50% - 293px);
  left: 50%;
  width: 1864px;
  max-width: none;
  opacity: 0.2;
  transform: translateX(-50%) rotate(-3deg);
  pointer-events: none;
}

.brand {
  position: absolute;
  z-index: 3;
  inset: 0;
  margin: 0;
  font-size: 100px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  pointer-events: none;
}

.brand span {
  position: absolute;
  display: block;
  white-space: nowrap;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.brand__neskafe {
  top: -3px;
  left: 161px;
  background-image: linear-gradient(0deg, rgba(255, 247, 5, 0) 0%, #fff705 55%);
}

.brand__exchange {
  top: 78px;
  left: 325px;
  background-image: linear-gradient(180deg, #2d4dff 2%, #0026ff 29%, #000027 100%);
}

.frame {
  position: absolute;
  z-index: 4;
  pointer-events: none;
}

.frame::before,
.frame::after {
  position: absolute;
  content: "";
}

.frame--blue {
  top: 128px;
  left: 45px;
  width: 555px;
  height: 405px;
  border-bottom: 4px solid var(--blue);
  border-left: 4px solid var(--blue);
}

.frame--blue::before {
  top: 0;
  left: 0;
  width: 270px;
  height: 4px;
  background: var(--blue);
}

.frame--yellow {
  top: 47px;
  left: 698px;
  width: 482px;
  height: 401px;
  border-right: 4px solid var(--yellow);
  border-bottom: 4px solid var(--yellow);
}

.frame--yellow::before {
  top: 0;
  right: 0;
  width: 455px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--yellow));
}

.poster-mark {
  position: absolute;
  z-index: 5;
  top: 173px;
  left: -224px;
  width: 649px;
  max-width: none;
  opacity: 0.22;
  pointer-events: none;
}

.mascot-link {
  position: absolute;
  z-index: 12;
  top: 40px;
  left: 150px;
  display: block;
  width: 288px;
}

.mascot {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 350ms ease;
}

.mascot-link:hover .mascot {
  transform: translateY(-5px) rotate(-0.5deg);
}

.coin {
  position: absolute;
  z-index: 6;
  pointer-events: none;
}

.coin img {
  display: block;
  width: 100%;
  height: auto;
}

.coin--gray-a {
  top: 230px;
  left: -133px;
  width: 283px;
  opacity: 0.35;
  transform: rotate(-33deg);
}

.coin--gray-b {
  top: 317px;
  left: 44px;
  width: 274px;
  opacity: 0.15;
  transform: rotate(146deg);
}

.coin--outline {
  top: 354px;
  left: 777px;
  width: 187px;
}

.coin--bitcoin {
  top: 223px;
  left: 890px;
  width: 200px;
}

.coin--litecoin {
  top: 393px;
  left: 964px;
  width: 135px;
  opacity: 0.3;
  transform: rotate(-18deg);
}

.coin--blue {
  top: -80px;
  left: 1170px;
  width: 200px;
  opacity: 0.8;
}

.qr-card {
  position: absolute;
  z-index: 14;
  top: 18px;
  left: 474px;
  display: block;
  width: 252px;
  height: 390px;
  text-decoration: none;
}

.qr-card__badge {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  overflow: hidden;
  border: 4px solid #ad7200;
  border-radius: 50%;
  background: #d98900;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
}

.qr-card__badge img {
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

.qr-card__body {
  position: absolute;
  top: 88px;
  left: 16px;
  display: flex;
  width: 220px;
  height: 270px;
  flex-direction: column;
  align-items: center;
  padding: 30px 22px 18px;
  overflow: hidden;
  border-radius: 54px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)),
    var(--network-image, none) center / cover;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
}

.qr-card__code {
  display: block;
  width: 172px;
  height: 172px;
}

.qr-card__telegram {
  position: absolute;
  top: 93px;
  left: 50%;
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
}

.qr-card__handle {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  margin-top: 7px;
  padding: 2px 9px 3px;
  border-radius: 14px;
  background: #080808;
  color: #ef9500;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.cta {
  position: absolute;
  z-index: 15;
  top: 418px;
  left: 500px;
  display: flex;
  width: 200px;
  height: 55px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  border-radius: 30px;
  background: radial-gradient(circle at center, rgba(45, 77, 255, 0.69), #3a57f8);
  box-shadow: 0 12px 35px rgba(20, 50, 255, 0.2);
  color: #f0f0f0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cta::after {
  position: absolute;
  top: -90px;
  left: -130px;
  width: 55px;
  height: 240px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: rotate(24deg);
  animation: sheen 3.8s ease-in-out infinite;
}

.cta:hover {
  box-shadow: 0 14px 42px rgba(45, 77, 255, 0.4);
  transform: translateY(-2px);
}

.cta:focus-visible,
.mascot-link:focus-visible,
.qr-card:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 5px;
}

.tagline {
  position: absolute;
  z-index: 16;
  top: 601px;
  left: 320px;
  width: 568px;
  margin: 0;
  color: #594646;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  opacity: 0.3;
}

.scene > * {
  animation: enter 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.scene .brand { animation-delay: 50ms; }
.scene .frame { animation-delay: 120ms; }
.scene .mascot-link { animation-delay: 180ms; }
.scene .qr-card { animation-delay: 260ms; }
.scene .cta { animation-delay: 330ms; }

@keyframes enter {
  from { opacity: 0; transform: translateY(12px); }
}

@keyframes sheen {
  0%, 58% { left: -130px; }
  82%, 100% { left: 280px; }
}

@media (max-width: 800px) {
  .hero {
    min-height: 700px;
    min-height: max(700px, 100svh);
  }

  .network--left {
    top: -80px;
    left: -230px;
    width: 720px;
    opacity: 0.55;
  }

  .network--right {
    top: -70px;
    right: -300px;
    left: auto;
    width: 650px;
    opacity: 0.35;
  }

  .wave {
    top: auto;
    bottom: -580px;
    width: 1050px;
    opacity: 0.24;
  }

  .scene {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: translate(var(--pointer-x, 0px), var(--pointer-y, 0px));
  }

  .brand {
    z-index: 3;
    font-size: clamp(49px, 16vw, 80px);
    letter-spacing: -0.055em;
  }

  .brand__neskafe {
    top: max(24px, env(safe-area-inset-top));
    left: 20px;
  }

  .brand__exchange {
    top: calc(max(24px, env(safe-area-inset-top)) + 0.82em);
    left: 14vw;
  }

  .frame--blue {
    top: 178px;
    left: 20px;
    width: 58vw;
    height: 57vh;
    min-height: 360px;
    border-width: 3px;
  }

  .frame--blue::before {
    width: 42vw;
    height: 3px;
  }

  .frame--yellow {
    top: 151px;
    right: 16px;
    left: auto;
    width: 52vw;
    height: 53vh;
    min-height: 340px;
    border-width: 3px;
    opacity: 0.85;
  }

  .frame--yellow::before {
    width: 38vw;
    height: 3px;
  }

  .poster-mark {
    top: auto;
    bottom: -210px;
    left: -175px;
    width: 480px;
    opacity: 0.22;
  }

  .mascot-link {
    top: auto;
    bottom: -36px;
    left: -3vw;
    width: min(58vw, 270px);
  }

  .qr-card {
    top: 210px;
    right: 10px;
    left: auto;
    width: 176px;
    height: 310px;
  }

  .qr-card__badge {
    width: 72px;
    height: 72px;
    border-width: 3px;
  }

  .qr-card__body {
    top: 63px;
    left: 8px;
    width: 160px;
    height: 205px;
    padding: 25px 15px 12px;
    border-radius: 38px;
  }

  .qr-card__code {
    width: 130px;
    height: 130px;
  }

  .qr-card__telegram {
    top: 68px;
    width: 38px;
    height: 38px;
    border-width: 4px;
  }

  .qr-card__handle {
    min-height: 21px;
    margin-top: 6px;
    padding: 2px 7px;
    font-size: 13px;
  }

  .cta {
    top: 500px;
    right: 10px;
    left: auto;
    width: 176px;
    height: 50px;
    font-size: 12px;
  }

  .tagline {
    top: auto;
    right: 16px;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: auto;
    width: min(70vw, 350px);
    font-size: 11px;
    text-align: right;
    opacity: 0.48;
  }

  .coin--gray-a,
  .coin--gray-b {
    display: none;
  }

  .coin--outline {
    top: auto;
    right: -25px;
    bottom: 155px;
    left: auto;
    width: 125px;
    opacity: 0.62;
  }

  .coin--bitcoin {
    top: auto;
    right: -32px;
    bottom: 230px;
    left: auto;
    width: 122px;
    opacity: 0.45;
  }

  .coin--litecoin {
    top: auto;
    right: 42px;
    bottom: 108px;
    left: auto;
    width: 86px;
    opacity: 0.25;
  }

  .coin--blue {
    top: 126px;
    right: -45px;
    left: auto;
    width: 110px;
    opacity: 0.4;
  }
}

@media (max-width: 380px) {
  .qr-card,
  .cta {
    right: 4px;
  }

  .mascot-link {
    left: -8vw;
    width: 62vw;
  }
}

@media (max-width: 800px) and (max-height: 680px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .frame--blue {
    top: 150px;
    height: calc(100vh - 180px);
    height: calc(100svh - 180px);
    min-height: 0;
  }

  .frame--yellow {
    top: 132px;
    height: calc(100vh - 160px);
    height: calc(100svh - 160px);
    min-height: 0;
  }

  .mascot-link {
    bottom: -22px;
    width: min(57vw, 210px);
  }

  .qr-card {
    top: 150px;
    transform: scale(0.78);
    transform-origin: top right;
  }

  .cta {
    top: clamp(400px, 72vh, 450px);
    height: 46px;
  }

  .tagline {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: 65vw;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Preserve intrinsic proportions while deferred images load. */
img[data-asset] { height: auto; }
