/* Scanline overlay for dark sections */
.scanlines {
  position: relative;
}

.scanlines::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

.scanlines > .container {
  position: relative;
  z-index: 2;
}

/* Grid texture on hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--color-bg), transparent);
  pointer-events: none;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Decode text effect */
.decode-text {
  display: inline;
}

.decode-text .char {
  opacity: 0;
  animation: decodeChar 0.05s forwards;
}

@keyframes decodeChar {
  to { opacity: 1; }
}

/* Glitch stamp on hero */
@keyframes stampPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.hero .stamp {
  animation: stampPulse 3s ease-in-out infinite;
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  margin-left: 12px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero .stamp {
    animation: none;
  }

  .decode-text .char {
    opacity: 1;
    animation: none;
  }
}
