:root {
  --bg: #0b0b0d;
  --red: #d90429;
  --red2: #ef233c;
  --text: #f5f5f7;
  --muted: #a9a9b3;
}

* {
  box-sizing: border-box;
}

::selection {
  background: rgb(190, 55, 55);
  color: rgb(255, 255, 255);
}

::-moz-selection {
  background: rgb(190, 55, 55);
  color: rgb(255, 255, 255);
}

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: -20vmax;
  background:
    radial-gradient(40vmax 40vmax at 20% 10%, rgba(239, 35, 60, 0.18), transparent 60%),
    radial-gradient(45vmax 45vmax at 80% 0%, rgba(217, 4, 41, 0.22), transparent 60%),
    radial-gradient(80vmax 60vmax at 50% 110%, rgba(239, 35, 60, 0.12), transparent 70%);
  filter: saturate(120%) blur(0px);
  animation: drift 16s ease-in-out infinite alternate;
  z-index: -3;
}

@keyframes drift {
  from { transform: translateY(-2%) rotate(-2deg); }
  to   { transform: translateY( 2%) rotate( 2deg); }
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="3" stitchTiles="stitch"/></filter><rect width="160" height="160" filter="url(%23n)" opacity=".45"/></svg>');
  mix-blend-mode: overlay;
}

#fx {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  display: block;
  touch-action: none;
  pointer-events: none;
}

.wrap {
  min-height: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  justify-content: center;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

.glitch {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 800;
  letter-spacing: 0.5px;
  position: relative;
  text-shadow: 0 6px 40px rgba(217, 4, 41, 0.35);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.75;
  text-transform: none;
  font-variant: normal;
  font-feature-settings: "smcp" 0, "c2sc" 0, "case" 0;
}

.glitch::before {
  transform: translateX(-2px);
  color: var(--red2);
  animation: glx 2.4s linear infinite alternate;
}

.glitch::after {
  transform: translateX(2px);
  color: #ff718d;
  animation: gly 2.4s linear infinite alternate-reverse;
}

@keyframes glx {
  from {
    transform: translateX(-1px);
  }

  to { transform: translateX(-4px);
    }
}

@keyframes gly {
  from {
    transform: translateX( 1px);
  }

  to { transform: translateX( 4px);
    }
}

.tag {
  color: var(--muted);
  margin: 0;
}

.links {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.2rem;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease, background 0.2s ease;
}

.btn.primary {
  background: linear-gradient(180deg, var(--red2), var(--red));
  box-shadow: 0 20px 60px rgba(217, 4, 41, 0.35);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.06);
}

.btn.donate {
  background: linear-gradient(180deg, #ff5f8a, #ff245c);
  box-shadow: 0 14px 48px rgba(255, 79, 124, 0.32);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); box-shadow: none; }

.foot {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.foot:hover {
  color: var(--text);
}

[data-animate] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-animate].in {
  opacity: 1;
  transform: none;
}

@media (max-width: 540px) {
  .wrap {
    padding: calc(48px + env(safe-area-inset-top, 0px)) 14px
             calc(40px + env(safe-area-inset-bottom, 0px)) 14px;
  }
  .glitch {
    font-size: clamp(30px, 10vw, 48px);
  }
  .links .btn {
    width: 100%;
  }
  .foot {
    font-size: .85rem;
  }
}

.glitch span {
  display: inline-block;
  transition: opacity .08s linear, text-shadow .12s ease;
}

.glitch span.lamp-on {
  text-shadow:
    0 0 8px rgba(255, 200, 200, 0.9),
    0 0 16px rgba(217, 4, 41, 0.8),
    0 0 32px rgba(217, 4, 41, 0.7),
    0 0 56px rgba(239, 35, 60, 0.6);
}

.glitch span.lamp-off {
  text-shadow:
    0 0 2px rgba(217, 4, 41, 0),    /* Blank */
    0 0 6px rgba(217, 4, 41, 0);    /* Blank */
}

.glitch span.hum {
  animation: bulbHum 3s ease-in-out infinite;
}


@keyframes bulbHum {
  0%, 100% {
    text-shadow:
      0 0 6px rgba(217, 4, 41, 0.8),
      0 0 14px rgba(217, 4, 41, 0.7),
      0 0 26px rgba(217, 4, 41, 0.6),
      0 0 48px rgba(239, 35, 60, 0.5);
  }
  50% {
    text-shadow:
      0 0 10px rgba(217, 4, 41, 1),
      0 0 20px rgba(217, 4, 41, 0.9),
      0 0 36px rgba(217, 4, 41, 0.8),
      0 0 64px rgba(239, 35, 60, 0.7);
  }
}
