@import url("https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@500;600;700&amp;family=Press+Start+2P&amp;display=swap");

:root {
  --bg: #07010f;
  --ink: #fff8ff;
  --pink: #ff3df2;
  --cyan: #27f7ff;
  --gold: #ffd05f;
  --violet: #7636ff;
  --header-logo: 310px;
  --intro-logo: min(76vw, 470px);
  --intro-fly-y: calc(-50dvh + 92px);
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pixelify Sans", "Press Start 2P", system-ui, sans-serif;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.045) 0,
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: overlay;
  opacity: 0.42;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  user-select: none;
}

.landing {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.035);
  filter: saturate(1.18) brightness(0.86);
  transition:
    opacity 900ms ease,
    transform 1700ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1400ms ease;
}

body.reveal-landing .landing {
  opacity: 1;
  transform: scale(1);
  filter: saturate(1.08) brightness(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  transform: scale(1.025);
  transition: transform 5400ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.reveal-landing .hero-bg {
  transform: scale(1);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.art-sweep {
  position: absolute;
  inset: -28%;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  filter: blur(7px);
  background:
    linear-gradient(
      105deg,
      transparent 30%,
      rgba(255, 255, 255, 0.025) 40%,
      rgba(255, 232, 146, 0.16) 48%,
      rgba(255, 255, 255, 0.12) 52%,
      rgba(255, 65, 234, 0.06) 59%,
      transparent 73%
    );
}

body.reveal-landing .art-sweep {
  animation: artSweep 12s 2.4s ease-in-out infinite;
}

.hero-title-flash {
  position: absolute;
  left: 50%;
  top: 68%;
  z-index: 2;
  width: min(66vw, 880px);
  height: min(27vw, 310px);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-7deg);
  transform-origin: center;
  mix-blend-mode: screen;
  filter: blur(13px);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.22), rgba(255, 228, 134, 0.18) 28%, transparent 64%),
    linear-gradient(
      104deg,
      transparent 8%,
      rgba(255, 255, 255, 0.0) 28%,
      rgba(255, 244, 187, 0.18) 42%,
      rgba(255, 255, 255, 0.34) 49%,
      rgba(255, 222, 105, 0.28) 55%,
      rgba(255, 255, 255, 0.08) 67%,
      transparent 88%
    );
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 0 48%, rgba(0, 0, 0, 0.74) 60%, transparent 82%);
  mask-image: radial-gradient(ellipse at 50% 50%, black 0 48%, rgba(0, 0, 0, 0.74) 60%, transparent 82%);
}

body.intro-done .hero-title-flash {
  animation: titleFlashSweep 12.5s 900ms cubic-bezier(0.16, 0.74, 0.2, 1) infinite;
}

.pixel-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(39, 247, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 61, 242, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 50% 66%, black 0 24%, transparent 58%);
}

.pixel-loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 47%, rgba(118, 54, 255, 0.22), transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(255, 61, 242, 0.16), transparent 42%),
    #050009;
  transition:
    opacity 780ms ease,
    visibility 780ms ease;
}

.pixel-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(39, 247, 255, 0.08), transparent 18%, transparent 82%, rgba(255, 61, 242, 0.08)),
    repeating-linear-gradient(90deg, transparent 0, transparent 11px, rgba(255, 255, 255, 0.03) 11px, rgba(255, 255, 255, 0.03) 12px);
}

.pixel-loader::after {
  content: "";
  position: absolute;
  width: 84vw;
  max-width: 760px;
  aspect-ratio: 1;
  border: 2px solid rgba(39, 247, 255, 0.14);
  box-shadow:
    0 0 0 8px rgba(255, 61, 242, 0.035),
    0 0 60px rgba(255, 61, 242, 0.2),
    inset 0 0 60px rgba(39, 247, 255, 0.07);
  clip-path: polygon(0 10%, 10% 10%, 10% 0, 90% 0, 90% 10%, 100% 10%, 100% 90%, 90% 90%, 90% 100%, 10% 100%, 10% 90%, 0 90%);
  opacity: 0.62;
}

.load-hud {
  position: absolute;
  left: 50%;
  top: calc(50% + min(24vw, 148px));
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 10px;
  transform: translateX(-50%);
  color: var(--ink);
  pointer-events: none;
  transition:
    opacity 420ms ease,
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.load-ring {
  --load-progress: 0%;
  position: relative;
  display: grid;
  width: 96px;
  aspect-ratio: 1;
  place-items: center;
  isolation: isolate;
  background:
    conic-gradient(var(--cyan) var(--load-progress), rgba(255, 255, 255, 0.12) 0),
    rgba(5, 0, 14, 0.92);
  clip-path: polygon(0 12px, 12px 12px, 12px 0, calc(100% - 12px) 0, calc(100% - 12px) 12px, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 12px calc(100% - 12px), 0 calc(100% - 12px));
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.86),
    0 0 18px rgba(39, 247, 255, 0.48),
    0 0 28px rgba(255, 61, 242, 0.28);
}

.load-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(255, 61, 242, 0.2), rgba(39, 247, 255, 0.12)),
    rgba(5, 0, 15, 0.94);
  clip-path: polygon(0 9px, 9px 9px, 9px 0, calc(100% - 9px) 0, calc(100% - 9px) 9px, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 9px calc(100% - 9px), 0 calc(100% - 9px));
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.8);
}

.load-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 1;
  border: 2px solid rgba(255, 255, 255, 0.22);
  clip-path: inherit;
}

.load-percent {
  position: relative;
  z-index: 2;
  font-family: "Press Start 2P", "Pixelify Sans", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1;
  text-shadow:
    2px 2px 0 #020006,
    -2px 2px 0 #020006,
    0 0 9px rgba(39, 247, 255, 0.72);
}

.load-text {
  font-family: "Press Start 2P", "Pixelify Sans", system-ui, sans-serif;
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0;
  text-shadow:
    2px 2px 0 #020006,
    0 0 10px rgba(255, 208, 95, 0.65);
}

body.fly-title .load-hud {
  opacity: 0;
  transform: translate(-50%, 18px) scale(0.92);
}

body.intro-done .pixel-loader {
  visibility: hidden;
  opacity: 0;
}

.logo-shine {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.92))
    drop-shadow(0 0 15px rgba(255, 61, 242, 0.68))
    drop-shadow(0 0 22px rgba(39, 247, 255, 0.35));
}

.logo-shine img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.logo-shine::before,
.logo-shine::after {
  content: "";
  position: absolute;
  pointer-events: none;
  -webkit-mask-image: url("https://stcdbdc80122380.cloud.anycastapnic.com/hanhde/landing/logo-game.webp");
  mask-image: url("https://stcdbdc80122380.cloud.anycastapnic.com/hanhde/landing/logo-game.webp");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  mix-blend-mode: screen;
}

.logo-shine::before {
  inset: -18%;
  z-index: 2;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.36), rgba(255, 219, 88, 0.26) 24%, rgba(255, 61, 242, 0.11) 43%, transparent 68%),
    linear-gradient(100deg, transparent 26%, rgba(255, 255, 255, 0.18) 43%, rgba(255, 226, 107, 0.36) 52%, transparent 72%);
  filter: blur(5px);
  opacity: 0;
  transform: translateX(-140%) skewX(-12deg);
}

.logo-shine::after {
  inset: -10%;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(
      105deg,
      transparent 22%,
      rgba(255, 255, 255, 0.0) 34%,
      rgba(255, 255, 255, 0.36) 45%,
      rgba(255, 240, 174, 0.74) 51%,
      rgba(255, 255, 255, 0.28) 58%,
      transparent 76%
    );
  transform: translateX(-145%) skewX(-14deg);
}

.intro-logo {
  width: var(--intro-logo);
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    transform 1850ms cubic-bezier(0.12, 0.92, 0.12, 1),
    filter 1200ms ease;
}

.intro-logo::after {
  animation: logoSweep 3800ms 220ms cubic-bezier(0.18, 0.9, 0.18, 1) both;
}

.intro-logo::before {
  animation: logoBloomSweep 3800ms 220ms cubic-bezier(0.18, 0.9, 0.18, 1) both;
}

body.fly-title .intro-logo {
  transform: translate3d(0, var(--intro-fly-y), 0) scale(0.66);
  filter:
    drop-shadow(0 0 18px rgba(255, 61, 242, 0.78))
    drop-shadow(0 0 26px rgba(255, 208, 95, 0.4));
}

.site-header {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: center;
  padding-top: 22px;
  pointer-events: none;
}

.brand-logo {
  width: var(--header-logo);
  opacity: 0;
  transform: translateY(-14px) scale(0.96);
  pointer-events: auto;
  transition:
    opacity 520ms ease,
    transform 860ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.intro-done .brand-logo {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.intro-done .brand-logo::after {
  animation:
    logoSweep 4400ms 650ms cubic-bezier(0.18, 0.9, 0.18, 1) both,
    logoPulseSweep 13s 7.8s ease-in-out infinite;
}

body.intro-done .brand-logo::before {
  animation:
    logoBloomSweep 4400ms 650ms cubic-bezier(0.18, 0.9, 0.18, 1) both,
    logoBloomPulseSweep 13s 7.8s ease-in-out infinite;
}

.hero {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 28px max(48px, 23dvh);
}

.action-dock {
  position: relative;
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  padding: 8px;
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 680ms 360ms ease,
    transform 920ms 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.intro-done .action-dock {
  opacity: 1;
  transform: translateY(0);
}

.action-dock::before,
.action-dock::after {
  content: "";
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: polygon(0 14px, 14px 14px, 14px 0, calc(100% - 14px) 0, calc(100% - 14px) 14px, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 14px calc(100% - 14px), 0 calc(100% - 14px));
}

.action-dock::before {
  border: 2px solid rgba(39, 247, 255, 0.72);
  box-shadow:
    0 0 18px rgba(39, 247, 255, 0.34),
    inset 0 0 24px rgba(255, 61, 242, 0.14);
}

.action-dock::after {
  inset: 6px;
  border: 1px solid rgba(255, 208, 95, 0.45);
  opacity: 0.72;
}

.pixel-button {
  --btn-glow: var(--pink);
  --btn-edge: var(--cyan);
  position: relative;
  display: grid;
  place-items: center;
  min-width: 248px;
  min-height: 72px;
  padding: 18px 34px;
  overflow: hidden;
  isolation: isolate;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-family: "Pixelify Sans", "Press Start 2P", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #030007;
  background:
    linear-gradient(90deg, var(--btn-edge) 0 18px, transparent 18px calc(100% - 18px), var(--btn-edge) calc(100% - 18px)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 48%),
    linear-gradient(135deg, rgba(255, 61, 242, 0.26), rgba(39, 247, 255, 0.12) 48%, rgba(255, 208, 95, 0.16)),
    rgba(5, 0, 13, 0.88);
  clip-path: polygon(0 12px, 12px 12px, 12px 0, calc(100% - 12px) 0, calc(100% - 12px) 12px, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 12px calc(100% - 12px), 0 calc(100% - 12px));
  box-shadow:
    0 0 0 2px var(--btn-edge),
    0 0 0 6px rgba(0, 0, 0, 0.86),
    0 0 10px rgba(39, 247, 255, 0.36),
    0 0 22px rgba(255, 61, 242, 0.28),
    inset 0 0 14px rgba(255, 255, 255, 0.1);
  transition:
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease;
}

.pixel-button::before,
.pixel-button::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.pixel-button::before {
  inset: 7px;
  z-index: 1;
  border: 2px solid rgba(0, 0, 0, 0.72);
  clip-path: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    inset 0 0 16px rgba(0, 0, 0, 0.44);
}

.pixel-button::after {
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(var(--btn-glow), var(--btn-glow)) left 7px top 7px / 26px 3px no-repeat,
    linear-gradient(var(--btn-glow), var(--btn-glow)) right 7px top 7px / 26px 3px no-repeat,
    linear-gradient(var(--btn-glow), var(--btn-glow)) left 7px bottom 7px / 26px 3px no-repeat,
    linear-gradient(var(--btn-glow), var(--btn-glow)) right 7px bottom 7px / 26px 3px no-repeat;
  opacity: 0.72;
}

.pixel-button:hover,
.pixel-button:focus-visible {
  transform: translateY(-4px);
  filter: brightness(1.12) saturate(1.16);
  box-shadow:
    0 0 0 2px var(--btn-edge),
    0 0 0 6px rgba(0, 0, 0, 0.88),
    0 0 14px rgba(39, 247, 255, 0.58),
    0 0 30px rgba(255, 61, 242, 0.46),
    inset 0 0 18px rgba(255, 255, 255, 0.16);
}

.pixel-button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}

.pixel-button.account {
  --btn-glow: var(--gold);
  --btn-edge: var(--pink);
}

.pixel-button.download {
  --btn-glow: #9cff6d;
  --btn-edge: var(--gold);
}

.button-glint {
  position: absolute;
  inset: -18%;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(
      105deg,
      transparent 22%,
      rgba(255, 255, 255, 0.0) 34%,
      rgba(255, 255, 255, 0.14) 45%,
      rgba(255, 244, 198, 0.38) 52%,
      rgba(255, 255, 255, 0.12) 62%,
      transparent 78%
    );
  filter: blur(3px);
  mix-blend-mode: screen;
  transform: translateX(-135%) skewX(-14deg);
  animation: none;
}

body.intro-done .button-glint {
  animation: buttonSweep 12.5s 1100ms cubic-bezier(0.16, 0.74, 0.2, 1) infinite;
}

.button-label {
  position: relative;
  z-index: 3;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  isolation: isolate;
  -webkit-text-stroke: 1px #020006;
  paint-order: stroke fill;
  text-shadow:
    3px 3px 0 #020006,
    -3px 3px 0 #020006,
    3px -3px 0 #020006,
    -3px -3px 0 #020006,
    0 0 9px rgba(255, 255, 255, 0.72),
    0 0 18px var(--btn-glow);
}

.button-label::after {
  content: attr(data-flash);
  position: absolute;
  inset: 0;
  z-index: 2;
  font: inherit;
  color: transparent;
  -webkit-text-stroke: 1px #020006;
  paint-order: stroke fill;
  text-shadow: none;
  background:
    linear-gradient(
      105deg,
      transparent 0%,
      transparent 14%,
      rgba(255, 255, 255, 0.08) 35%,
      rgba(255, 255, 255, 0.72) 48%,
      #ffe47c 52%,
      rgba(255, 255, 255, 0.58) 58%,
      rgba(255, 255, 255, 0.06) 72%,
      transparent 88%,
      transparent 100%
    );
  background-size: 360% 100%;
  background-position: 170% 0;
  background-clip: text;
  -webkit-background-clip: text;
  filter:
    drop-shadow(0 0 4px rgba(255, 255, 255, 0.58))
    drop-shadow(0 0 9px rgba(255, 208, 95, 0.42));
  opacity: 0;
  animation: none;
}

body.intro-done .button-label::after {
  animation: textFlashSweep 12.5s 1100ms cubic-bezier(0.16, 0.74, 0.2, 1) infinite;
}

@keyframes logoSweep {
  0% {
    opacity: 0;
    transform: translateX(-145%) skewX(-14deg);
  }
  22%,
  64% {
    opacity: 0.78;
  }
  100% {
    opacity: 0;
    transform: translateX(145%) skewX(-14deg);
  }
}

@keyframes logoBloomSweep {
  0% {
    opacity: 0;
    transform: translateX(-145%) skewX(-12deg);
  }
  22% {
    opacity: 0.15;
  }
  44%,
  58% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translateX(145%) skewX(-12deg);
  }
}

@keyframes logoPulseSweep {
  0%,
  42% {
    opacity: 0;
    transform: translateX(-145%) skewX(-14deg);
  }
  52%,
  62% {
    opacity: 0.64;
  }
  78%,
  100% {
    opacity: 0;
    transform: translateX(145%) skewX(-14deg);
  }
}

@keyframes logoBloomPulseSweep {
  0%,
  42% {
    opacity: 0;
    transform: translateX(-145%) skewX(-12deg);
  }
  52%,
  64% {
    opacity: 0.52;
  }
  82%,
  100% {
    opacity: 0;
    transform: translateX(145%) skewX(-12deg);
  }
}

@keyframes artSweep {
  0%,
  45% {
    opacity: 0;
    transform: translateX(-120%) skewX(-10deg);
  }
  61%,
  69% {
    opacity: 0.62;
  }
  86%,
  100% {
    opacity: 0;
    transform: translateX(120%) skewX(-10deg);
  }
}

@keyframes titleFlashSweep {
  0%,
  100% {
    opacity: 0;
    transform: translate(-115%, -50%) rotate(-7deg) scaleX(0.78);
  }
  11% {
    opacity: 0.34;
  }
  25% {
    opacity: 0.52;
  }
  46% {
    opacity: 0.38;
  }
  60% {
    opacity: 0;
    transform: translate(34%, -50%) rotate(-7deg) scaleX(1);
  }
}

@keyframes buttonSweep {
  0% {
    opacity: 0;
    transform: translateX(-140%) skewX(-14deg);
  }
  13% {
    opacity: 0.22;
  }
  31% {
    opacity: 0.38;
  }
  53% {
    opacity: 0.12;
  }
  64%,
  100% {
    opacity: 0;
    transform: translateX(140%) skewX(-14deg);
  }
}

@keyframes textFlashSweep {
  0% {
    opacity: 0;
    background-position: 170% 0;
  }
  10% {
    opacity: 0.24;
  }
  30% {
    opacity: 0.48;
  }
  52% {
    opacity: 0.22;
  }
  64%,
  100% {
    opacity: 0;
    background-position: -130% 0;
  }
}

@media (max-width: 720px) {
  :root {
    --header-logo: min(66vw, 246px);
    --intro-logo: min(84vw, 360px);
    --intro-fly-y: calc(-50dvh + 70px);
  }

  .hero-bg {
    object-position: center top;
  }

  .hero-title-flash {
    top: 38%;
    width: min(92vw, 420px);
    height: min(30vw, 150px);
  }

  .site-header {
    padding-top: 14px;
  }

  .hero {
    padding: 0 18px max(28px, calc(env(safe-area-inset-bottom) + 28px));
  }

  .action-dock {
    width: min(100%, 330px);
    flex-direction: column;
    gap: 14px;
    padding: 12px;
  }

  .pixel-button {
    width: 100%;
    min-width: 0;
    min-height: 62px;
    padding: 15px 22px;
    font-size: 22px;
  }
}

@media (max-width: 420px) {
  .pixel-button {
    font-size: 20px;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  :root {
    --header-logo: 220px;
    --intro-fly-y: calc(-50dvh + 60px);
  }

  .site-header {
    padding-top: 10px;
  }

  .hero {
    padding-bottom: 20px;
  }

  .pixel-button {
    min-height: 58px;
    font-size: 20px;
  }
}

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