:root {
  --ink: #f6f9ff;
  --muted: #b8c5dd;
  --deep: #050310;
  --cyan: #35f2e4;
  --blue: #2588ff;
  --pink: #ff1498;
  --violet: #7d2dff;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--deep);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 10%, rgb(50 23 104 / 42%), transparent 34rem),
    radial-gradient(circle at 84% 78%, rgb(0 100 167 / 30%), transparent 30rem),
    linear-gradient(145deg, #05020d 0%, #0b0719 50%, #020812 100%);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(2rem, 6vw, 5.5rem) clamp(1rem, 4vw, 3rem);
  overflow: hidden;
}

.site-shell::before {
  position: absolute;
  z-index: -3;
  inset: 0;
  background-image:
    linear-gradient(rgb(90 153 255 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(90 153 255 / 4%) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, transparent, black 16%, black 84%, transparent);
}

.site-shell::after {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgb(255 255 255 / 2.2%) 4px
  );
  content: "";
  pointer-events: none;
}

.content {
  position: relative;
  width: min(100%, 920px);
}

.art-frame {
  position: relative;
  filter: drop-shadow(0 1.75rem 3rem rgb(0 0 0 / 48%));
}

.art-frame::before {
  position: absolute;
  z-index: -1;
  inset: -2px;
  background: linear-gradient(115deg, var(--pink), var(--violet) 45%, var(--cyan));
  content: "";
  clip-path: polygon(0 0, 100% 0, 100% 91%, 97% 91%, 97% 100%, 2% 100%, 2% 96%, 0 96%);
}

.hero-art {
  display: block;
  width: 100%;
  height: auto;
  background: #0a0714;
  clip-path: polygon(0 0, 100% 0, 100% 91%, 97% 91%, 97% 100%, 2% 100%, 2% 96%, 0 96%);
}

.art-glitch {
  position: absolute;
  z-index: 1;
  width: clamp(22px, 4vw, 46px);
  height: clamp(8px, 1.4vw, 15px);
  opacity: 0.65;
  pointer-events: none;
}

.art-glitch::before,
.art-glitch::after {
  position: absolute;
  background: inherit;
  content: "";
}

.art-glitch::before {
  width: 45%;
  height: 45%;
  inset: -110% auto auto 72%;
}

.art-glitch::after {
  width: 24%;
  height: 70%;
  inset: 120% auto auto 114%;
}

.art-glitch--cyan {
  top: 52%;
  left: -2.5%;
  background: var(--cyan);
  animation: edge-flicker 8s steps(1, end) infinite;
}

.art-glitch--pink {
  top: 14%;
  right: -1.5%;
  background: var(--pink);
  animation: edge-flicker 9s 2.3s steps(1, end) infinite reverse;
}

.message-card {
  position: relative;
  width: min(88%, 740px);
  margin: clamp(-1.1rem, -2vw, -0.55rem) auto 0;
  padding: clamp(1.35rem, 3.2vw, 2.35rem);
  border: 1px solid rgb(126 176 255 / 20%);
  background: linear-gradient(145deg, rgb(16 15 38 / 95%), rgb(7 9 27 / 95%));
  box-shadow:
    0 1.5rem 4rem rgb(0 0 0 / 40%),
    inset 0 1px rgb(255 255 255 / 5%);
  backdrop-filter: blur(16px);
}

.message-card::before,
.message-card::after {
  position: absolute;
  content: "";
}

.message-card::before {
  width: 64px;
  height: 3px;
  inset: -2px auto auto 2rem;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  box-shadow: 76px 0 var(--violet);
}

.message-card::after {
  width: 8px;
  height: 8px;
  inset: auto -4px -4px auto;
  background: var(--cyan);
  box-shadow: -12px 0 rgb(53 242 228 / 34%), 0 -12px rgb(53 242 228 / 34%);
}

.status-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.8rem;
  color: #ff72c3;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-label span {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--pink);
  box-shadow: 0 0 18px rgb(255 20 152 / 88%);
  animation: status-pulse 2.8s ease-in-out infinite;
}

.message {
  max-width: 66ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.75;
}

.message a {
  color: #fff;
  font-weight: 700;
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.message a:hover {
  color: var(--cyan);
  text-decoration-color: var(--pink);
}

.social-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.social-link {
  --social-color: var(--cyan);
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgb(255 255 255 / 11%);
  background: rgb(255 255 255 / 3%);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.social-link::before {
  width: 4px;
  align-self: stretch;
  background: var(--social-color);
  content: "";
  box-shadow: 0 0 16px color-mix(in srgb, var(--social-color), transparent 30%);
}

.social-link > span:first-of-type {
  margin-right: auto;
}

.social-link:hover {
  border-color: color-mix(in srgb, var(--social-color), white 12%);
  background: color-mix(in srgb, var(--social-color) 13%, transparent);
  transform: translateY(-2px);
}

.social-link:focus-visible,
.message a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.social-link--discord {
  --social-color: #5865f2;
}

.social-link--steam {
  --social-color: #66c0f4;
}

.social-link--twitch {
  --social-color: #9146ff;
}

.social-link--youtube {
  --social-color: #ff0033;
}

.arrow {
  color: var(--social-color);
  font-size: 1rem;
}

.glitch-field {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.glitch-haze {
  position: absolute;
  width: 42vw;
  height: 42vw;
  min-width: 18rem;
  min-height: 18rem;
  top: 7%;
  right: -16%;
  border-radius: 50%;
  background: rgb(102 31 255 / 13%);
  filter: blur(40px);
}

.pixel {
  position: absolute;
  width: var(--size);
  height: var(--size);
  top: var(--y);
  left: var(--x);
  background: var(--pixel-color);
  box-shadow:
    calc(var(--size) * 2.6) calc(var(--size) * -1.4) 0 color-mix(in srgb, var(--pixel-color), transparent 45%),
    calc(var(--size) * 5.1) calc(var(--size) * 1.8) 0 color-mix(in srgb, var(--pixel-color), transparent 65%);
  opacity: 0;
  animation: pixel-drift var(--duration) var(--delay) linear infinite;
}

.pixel--1 {
  --pixel-color: var(--cyan);
}

.pixel--2 {
  --pixel-color: var(--pink);
}

.pixel--3 {
  --pixel-color: var(--violet);
}

.pixel--4 {
  --pixel-color: var(--blue);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}

@keyframes pixel-drift {
  0%,
  12% {
    opacity: 0;
    transform: translate3d(-12px, 4px, 0) scale(0.7);
  }

  20% {
    opacity: 0.38;
  }

  65% {
    opacity: 0.15;
  }

  88%,
  100% {
    opacity: 0;
    transform: translate3d(68px, -26px, 0) scale(1.08);
  }
}

@keyframes edge-flicker {
  0%,
  91%,
  94%,
  100% {
    opacity: 0.65;
    transform: translateX(0);
  }

  92% {
    opacity: 0;
    transform: translateX(15px);
  }

  93% {
    opacity: 0.85;
    transform: translateX(-7px);
  }
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}

@media (max-width: 650px) {
  .site-shell {
    align-items: start;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .art-frame,
  .hero-art,
  .art-frame::before {
    clip-path: polygon(0 0, 100% 0, 100% 95%, 96% 95%, 96% 100%, 0 100%);
  }

  .message-card {
    width: calc(100% - 1rem);
    margin-top: -0.35rem;
  }

  .social-links {
    grid-template-columns: 1fr;
  }

  .social-link {
    padding-inline: 1rem;
  }
}

@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;
  }

  .pixel {
    opacity: 0.18;
  }
}
