/* Animated ASCII footer — Pages Games */

.footer {
  padding: 0;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
  background: transparent;
  overflow: hidden;
}

.footer-ascii {
  position: relative;
  width: 100%;
  height: clamp(220px, 38vw, 420px);
  background:
    radial-gradient(ellipse at 50% 100%, rgba(168, 85, 247, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, transparent 0%, rgba(5, 5, 8, 0.6) 100%);
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
}

.footer-ascii::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 5, 8, 0.85) 100%);
  pointer-events: none;
  z-index: 10;
}

.ascii-text-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ascii-text-container canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  image-rendering: optimizeSpeed;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.ascii-text-container pre {
  margin: 0;
  user-select: none;
  padding: 0;
  line-height: 1em;
  text-align: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  white-space: pre;
  overflow: hidden;
  background-image: linear-gradient(
    135deg,
    #a855f7 0%,
    #d946ef 35%,
    #3b82f6 65%,
    #22d3ee 100%
  );
  background-attachment: fixed;
  background-size: 200% 200%;
  animation: asciiGradientShift 8s ease-in-out infinite alternate;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  z-index: 9;
  mix-blend-mode: screen;
  opacity: 0.95;
}

@keyframes asciiGradientShift {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.footer__bar {
  position: relative;
  z-index: 2;
  padding: 28px 0 32px;
  background: rgba(6, 6, 8, 0.75);
  backdrop-filter: blur(12px);
}

.footer__tagline {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(168, 85, 247, 0.45);
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

@media (max-width: 768px) {
  .footer-ascii {
    height: clamp(180px, 50vw, 280px);
  }

  .ascii-text-container pre {
    font-size: 6px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ascii-text-container pre {
    animation: none;
  }
}
