/* ═══════════════════════════════════════════════════════════════
   ANIMATION & MOTION STYLESHEET
   Dr. Gray & Mrs. Dr. Gray - Enhanced Experience
   ═══════════════════════════════════════════════════════════════ */

:root {
  --anim-duration-fast: 0.3s;
  --anim-duration-base: 0.6s;
  --anim-duration-slow: 1s;
  --anim-ease-out: cubic-bezier(0.34, 1.56, 0.64, 1);
  --anim-ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  overflow: hidden;
}

/* Animated Equalizer Background */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 8px,
    rgba(255, 79, 216, 0.03) 8px,
    rgba(255, 79, 216, 0.03) 16px
  );
  pointer-events: none;
  opacity: 0;
  animation: pulseGlow 3s ease-in-out infinite;
}

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

/* Hero Title Fade-in */
.hero-title {
  animation: fadeInDown 0.8s var(--anim-ease-out) backwards;
}

.hero-title span {
  display: inline-block;
  animation: gradientFlow 2s ease-in-out infinite;
  background: linear-gradient(90deg, var(--gold-strong), var(--accent-pink), var(--accent-cyan), var(--gold-strong));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-subtitle {
  animation: fadeInUp 0.8s var(--anim-ease-out) 0.2s backwards;
}

.eyebrow {
  animation: slideInLeft 0.6s var(--anim-ease-out) backwards;
  display: inline-block;
}

/* CTA Button Animations */
.cta-row {
  animation: fadeInUp 0.8s var(--anim-ease-out) 0.4s backwards;
}

.btn {
  position: relative;
  overflow: hidden;
  transition: all var(--anim-duration-base) var(--anim-ease-smooth);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 200, 76, 0.34), 0 0 18px rgba(255, 79, 216, 0.18);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(52, 228, 255, 0.24), 0 0 18px rgba(245, 200, 76, 0.16);
}

/* Live Banner Pulse */
.live-banner {
  animation: bannerSlideDown 0.6s var(--anim-ease-out);
}

.live-dot {
  animation: livePulse 1.5s ease-in-out infinite;
  display: inline-block;
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL TRIGGER ANIMATIONS (Intersection Observer)
   ═══════════════════════════════════════════════════════════════ */

.scroll-fade-in {
  opacity: 0;
  animation: fadeInUp 0.8s var(--anim-ease-smooth) forwards;
}

.scroll-fade-in.in-view {
  animation-play-state: running;
}

.scroll-slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInLeft 0.8s var(--anim-ease-smooth) forwards;
}

.scroll-slide-in-left.in-view {
  animation-play-state: running;
}

.scroll-slide-in-right {
  opacity: 0;
  transform: translateX(30px);
  animation: slideInRight 0.8s var(--anim-ease-smooth) forwards;
}

.scroll-slide-in-right.in-view {
  animation-play-state: running;
}

.scroll-scale-in {
  opacity: 0;
  transform: scale(0.95);
  animation: scaleIn 0.8s var(--anim-ease-smooth) forwards;
}

.scroll-scale-in.in-view {
  animation-play-state: running;
}

/* Article Cards Stagger */
article {
  transition: all var(--anim-duration-base) var(--anim-ease-smooth);
}

article.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   KEYFRAME DEFINITIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bannerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════════════
   HOVER EFFECTS FOR INTERACTIVE ELEMENTS
   ═══════════════════════════════════════════════════════════════ */

a[href],
button,
[role="button"] {
  position: relative;
}

/* Card Hover Lift */
.article-card {
  transition: all var(--anim-duration-base) var(--anim-ease-smooth);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(255, 79, 216, 0.12), 0 0 18px rgba(245, 200, 76, 0.08);
}

/* Image Zoom on Hover */
img {
  transition: transform var(--anim-duration-base) var(--anim-ease-smooth);
}

.article:hover img {
  transform: scale(1.02);
}

/* Link Underline Animation */
a {
  text-decoration: none;
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-cyan));
  transition: width var(--anim-duration-fast) var(--anim-ease-smooth);
}

a:hover::after {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   SOUNDCLOUD PLAYER ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

iframe[src*="soundcloud"] {
  opacity: 0;
  animation: fadeIn 0.8s var(--anim-ease-smooth) forwards;
  animation-delay: 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Waveform-like Visualizer Effect */
.soundcloud-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.soundcloud-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(52, 228, 255, 0.1),
    transparent
  );
  pointer-events: none;
  animation: waveformShift 2s ease-in-out infinite;
}

@keyframes waveformShift {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ═══════════════════════════════════════════════════════════════
   COUNTDOWN TIMER ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

.countdown-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(255, 79, 216, 0.1);
  border: 1px solid rgba(255, 0, 255, 0.3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
    border-color: rgba(255, 0, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
    border-color: rgba(255, 0, 255, 0.6);
  }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION - ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .hero-title {
    animation-duration: 0.6s;
  }

  .scroll-fade-in,
  .scroll-slide-in-left,
  .scroll-slide-in-right,
  .scroll-scale-in {
    animation-duration: 0.6s;
  }

  .btn {
    transition: all var(--anim-duration-fast) var(--anim-ease-smooth);
  }
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE TRACK CARDS & GENRES
   ═══════════════════════════════════════════════════════════════ */

.featured-track-card {
  background: var(--surface-1);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  animation: fadeInUp 0.6s var(--anim-ease-smooth) backwards;
  transition: all 0.3s var(--anim-ease-smooth);
}

.featured-track-card:hover {
  border-color: var(--accent-pink);
  box-shadow: 0 12px 32px rgba(255, 79, 216, 0.12), 0 0 16px rgba(245, 200, 76, 0.08);
  transform: translateY(-2px);
}

.featured-header {
  margin-bottom: 1.5rem;
}

.featured-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.featured-date {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.featured-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.genre-tag-homepage {
  background: linear-gradient(135deg, rgba(245, 200, 76, 0.1), rgba(255, 79, 216, 0.08), rgba(52, 228, 255, 0.06));
  border: 0.5px solid rgba(255, 216, 109, 0.24);
  color: var(--gold-strong);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 500;
  display: inline-block;
  transition: all 0.3s var(--anim-ease-smooth);
}

.genre-tag-homepage:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 12px rgba(52, 228, 255, 0.14), 0 0 12px rgba(255, 79, 216, 0.1);
  transform: scale(1.05);
}

.featured-description {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.featured-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-small {
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-small span {
  display: flex;
  gap: 4px;
}

.track-card-homepage {
  background: var(--surface-1);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s var(--anim-ease-smooth);
  animation-delay: var(--delay, 0s);
}

.track-card-homepage:hover {
  border-color: var(--accent-pink);
  box-shadow: 0 12px 32px rgba(255, 79, 216, 0.12), 0 0 16px rgba(245, 200, 76, 0.08);
  transform: translateY(-4px);
}

.track-header-homepage {
  margin-bottom: 1rem;
}

.track-title-homepage {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: var(--text-primary);
  line-height: 1.4;
}

.track-date-small {
  font-size: 12px;
  color: var(--text-secondary);
}

.track-genres-homepage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}

.track-description-homepage {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.track-stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
  width: 100%;
  text-align: center;
}

@media (max-width: 768px) {
  .featured-track-card {
    padding: 1.5rem;
  }

  .featured-title {
    font-size: 20px;
  }

  .featured-genres {
    gap: 6px;
  }

  .genre-tag-homepage {
    font-size: 10px;
    padding: 5px 10px;
  }

  .track-title-homepage {
    font-size: 14px;
  }

  .track-card-homepage {
    padding: 1rem;
  }
}
