/* ==========================================================================
   ANIMATIONS — Scroll Animations, Advanced Backgrounds, Reduced Motion
   Lines 1457-1550 from styles.css
   ========================================================================== */

/* ---------- TYPEWRITER CURSOR ---------- */
.typewriter-cursor {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 300;
  margin-left: 2px;
  animation: cursorBlink 0.7s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---------- SCROLL ANIMATIONS ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate]:nth-child(2) {
  transition-delay: 0.08s;
}

[data-animate]:nth-child(3) {
  transition-delay: 0.16s;
}

/* ---------- ADVANCED BACKGROUNDS ---------- */
.bg-wave-pattern {
  position: relative;
  overflow: hidden;
}

@keyframes bgDrift {
  0% {
    background-position: 0 0, 0 0, 30px 15px;
  }

  100% {
    background-position: -600px 0, -600px 0, -570px 15px;
  }
}

.bg-wave-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: transparent;
  background-image:
    radial-gradient(circle at 100% 150%, transparent 24px, rgba(197, 165, 90, 0.04) 25px, rgba(197, 165, 90, 0.04) 34px, transparent 35px),
    radial-gradient(circle at 0% 150%, transparent 24px, rgba(197, 165, 90, 0.04) 25px, rgba(197, 165, 90, 0.04) 34px, transparent 35px),
    radial-gradient(circle at 50% 100%, rgba(197, 165, 90, 0.04) 24px, transparent 25px);
  background-size: 60px 30px;
  background-position: 0 0, 0 0, 30px 15px;
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
  animation: bgDrift 90s linear infinite;
}

[data-theme="dark"] .bg-wave-pattern::before {
  background-image:
    radial-gradient(circle at 100% 150%, transparent 24px, rgba(255, 255, 255, 0.02) 25px, rgba(255, 255, 255, 0.02) 34px, transparent 35px),
    radial-gradient(circle at 0% 150%, transparent 24px, rgba(255, 255, 255, 0.02) 25px, rgba(255, 255, 255, 0.02) 34px, transparent 35px),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.02) 24px, transparent 25px);
}

[data-animate]:nth-child(4) {
  transition-delay: 0.24s;
}

[data-animate]:nth-child(5) {
  transition-delay: 0.32s;
}

[data-animate]:nth-child(6) {
  transition-delay: 0.40s;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

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

