/* ==========================================================================
   Whitney Hanson Poetry — Motion, Micro-Interactions & Cinematic Keyframes
   ========================================================================== */

/* --------------------------------------------------------------------------
   Scroll Reveal Animations
   -------------------------------------------------------------------------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.animate-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* --------------------------------------------------------------------------
   Fade-in & Utility Animations
   -------------------------------------------------------------------------- */
.animate-fade-in {
  animation: fadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Float gently (Used on badges and hero floating quote card) */
.animate-float {
  animation: floating 4.5s ease-in-out infinite alternate;
}

@keyframes floating {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.5deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* Subtle Golden Shimmer */
.shimmer-text {
  background: linear-gradient(90deg, #FAF7F2 0%, #E4C592 50%, #FAF7F2 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s infinite linear;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Pulse Glow (For live audio indicator & limited stock tag) */
.pulse-indicator {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-primary);
}

.pulse-indicator::after {
  content: "";
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  animation: pulseRipple 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

@keyframes pulseRipple {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Typewriter Caret Animation
   -------------------------------------------------------------------------- */
.typewriter-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--gold-primary);
  margin-left: 4px;
  vertical-align: middle;
  animation: blinkCaret 0.8s infinite;
}

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

/* --------------------------------------------------------------------------
   3D Book Spine Perspective & Hover Tilt
   -------------------------------------------------------------------------- */
.book-cover-3d-wrap {
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.book-spine-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 100%;
  opacity: 0.35;
  filter: blur(4px);
  pointer-events: none;
  border-radius: 4px 0 0 4px;
}

/* --------------------------------------------------------------------------
   Modal Slide-Up Entry
   -------------------------------------------------------------------------- */
.app-modal.active .modal-container {
  animation: modalScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Artwork Zoom Inspection
   -------------------------------------------------------------------------- */
.zoom-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.zoom-image-container img {
  max-height: 75vh;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.zoom-image-container:hover img {
  transform: scale(1.05);
}
