:root {
  --bg: #0a0a0f;
  --text: #f4f4f5;
  --muted: rgba(244, 244, 245, 0.72);
  --acid: #a3ff12;
  --hot: #ff2d6a;
  --cyan: #00e5ff;
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-border: rgba(255, 255, 255, 0.22);
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  width: 100%;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Glitch background layers */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg__glitch {
  position: absolute;
  inset: -20%;
  background: linear-gradient(
      125deg,
      #1a0533 0%,
      #0f172a 25%,
      #3b0764 50%,
      #0c4a6e 75%,
      #831843 100%
    );
  background-size: 400% 400%;
  animation: bgShift 8s ease-in-out infinite;
}

.bg__glitch::before,
.bg__glitch::after {
  content: "";
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0.35;
}

.bg__glitch::before {
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(0, 229, 255, 0.08) 2px,
    rgba(0, 229, 255, 0.08) 4px
  );
  animation: glitchSlice 3s steps(4, end) infinite;
}

.bg__glitch::after {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255, 45, 106, 0.06) 3px,
    rgba(255, 45, 106, 0.06) 6px
  );
  animation: glitchSlice 2.2s steps(3, end) infinite reverse;
}

.bg__scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.5;
  animation: scanMove 6s linear infinite;
}

.bg__noise {
  position: absolute;
  inset: -50%;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noiseJitter 0.15s steps(2, end) infinite;
}

@keyframes bgShift {
  0%,
  100% {
    background-position: 0% 50%;
    filter: hue-rotate(0deg);
  }
  50% {
    background-position: 100% 50%;
    filter: hue-rotate(25deg);
  }
}

@keyframes glitchSlice {
  0% {
    transform: translate(0, 0);
    clip-path: inset(0 0 85% 0);
  }
  25% {
    transform: translate(-3%, 1%);
    clip-path: inset(30% 0 40% 0);
  }
  50% {
    transform: translate(2%, -1%);
    clip-path: inset(60% 0 10% 0);
  }
  75% {
    transform: translate(-1%, 2%);
    clip-path: inset(10% 0 70% 0);
  }
  100% {
    transform: translate(0, 0);
    clip-path: inset(0 0 85% 0);
  }
}

@keyframes scanMove {
  to {
    transform: translateY(4px);
  }
}

@keyframes noiseJitter {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-2%, 1%);
  }
}

/* Centered layout */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  text-align: center;
  gap: 1rem;
}

.domain {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transform: rotate(-3deg);
  user-select: none;
}

.title {
  margin: 0;
  font-family: "Rubik Glitch", "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 10vw, 4.2rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  transform: rotate(-2.5deg) skewX(-4deg);
  position: relative;
  text-shadow: 3px 3px 0 var(--hot), -2px -2px 0 var(--cyan);
}

.title::before,
.title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0.55;
  pointer-events: none;
}

.title::before {
  color: var(--cyan);
  transform: translate(3px, -2px);
  clip-path: inset(0 0 55% 0);
  animation: titleGlitchA 2.5s steps(2, end) infinite;
}

.title::after {
  color: var(--hot);
  transform: translate(-3px, 2px);
  clip-path: inset(50% 0 0 0);
  animation: titleGlitchB 2s steps(2, end) infinite;
}

@keyframes titleGlitchA {
  0%,
  90%,
  100% {
    transform: translate(3px, -2px);
  }
  92% {
    transform: translate(-4px, 1px);
  }
  96% {
    transform: translate(5px, 0);
  }
}

@keyframes titleGlitchB {
  0%,
  88%,
  100% {
    transform: translate(-3px, 2px);
  }
  90% {
    transform: translate(4px, -1px);
  }
  94% {
    transform: translate(-5px, 3px);
  }
}

.blurb {
  margin: 0;
  max-width: 28ch;
  font-size: clamp(1.05rem, 3.5vw, 1.35rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
  transform: rotate(1.8deg) skewX(2deg);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.blurb.bump {
  animation: blurbBump 0.35s ease;
}

@keyframes blurbBump {
  0% {
    transform: rotate(1.8deg) skewX(2deg) scale(1);
  }
  40% {
    transform: rotate(-1deg) skewX(-3deg) scale(1.03);
  }
  100% {
    transform: rotate(1.8deg) skewX(2deg) scale(1);
  }
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 16rem;
  margin-top: 0.5rem;
}

.btn {
  display: block;
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--btn-bg);
  border: 2px dashed var(--btn-border);
  border-radius: 4px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn--more {
  transform: rotate(-1.5deg);
}

.btn--why {
  transform: rotate(2deg);
}

.btn:hover {
  border-color: var(--acid);
  background: rgba(163, 255, 18, 0.1);
}

.btn--more:hover {
  transform: rotate(1deg) translateY(-2px);
}

.btn--why:hover {
  transform: rotate(-1deg) translateY(-2px);
}

.btn:active {
  transform: scale(0.98);
}

body.shake {
  animation: bodyShake 0.25s ease;
}

@keyframes bodyShake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-4px, 2px);
  }
  75% {
    transform: translate(4px, -2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg__glitch,
  .bg__glitch::before,
  .bg__glitch::after,
  .bg__scan,
  .bg__noise,
  .title::before,
  .title::after {
    animation: none;
  }

  .blurb.bump {
    animation: none;
  }

  body.shake {
    animation: none;
  }
}
