/* ============================================================
   MH MUSIK – Scroll Animations & Parallax Effects
   ============================================================ */

/* ---------- Parallax Container ---------- */
.parallax-section {
  position: relative;
  overflow: hidden;
}

.parallax-layer {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ---------- Hero Glitch Effect ---------- */
@keyframes glitch-1 {
  0%   { clip-path: inset(0 0 95% 0); transform: translate(-4px); }
  10%  { clip-path: inset(50% 0 30% 0); transform: translate(4px); }
  20%  { clip-path: inset(80% 0 5% 0); transform: translate(-2px); }
  30%  { clip-path: inset(15% 0 65% 0); transform: translate(3px); }
  40%  { clip-path: inset(60% 0 25% 0); transform: translate(-3px); }
  50%  { clip-path: inset(30% 0 50% 0); transform: translate(4px); }
  60%  { clip-path: inset(5% 0 90% 0); transform: translate(-2px); }
  100% { clip-path: inset(0 0 95% 0); transform: translate(0); }
}

@keyframes glitch-2 {
  0%   { clip-path: inset(70% 0 10% 0); transform: translate(4px); }
  10%  { clip-path: inset(20% 0 60% 0); transform: translate(-4px); }
  20%  { clip-path: inset(45% 0 40% 0); transform: translate(3px); }
  30%  { clip-path: inset(5% 0 85% 0); transform: translate(-2px); }
  40%  { clip-path: inset(90% 0 2% 0); transform: translate(4px); }
  50%  { clip-path: inset(35% 0 45% 0); transform: translate(-3px); }
  60%  { clip-path: inset(15% 0 75% 0); transform: translate(2px); }
  100% { clip-path: inset(70% 0 10% 0); transform: translate(0); }
}

.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glitch-text::before {
  color: #e8c84a;
  animation: glitch-1 4s infinite steps(1);
  opacity: 0.7;
}

.glitch-text::after {
  color: #2e9cd1;
  animation: glitch-2 4s infinite steps(1);
  opacity: 0.7;
}

/* ---------- Typing Cursor ---------- */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--color-gold);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s ease infinite;
}

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

/* ---------- Floating Music Notes ---------- */
.music-notes-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.music-note {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0;
  animation: floatNote var(--duration, 6s) ease-in infinite;
  animation-delay: var(--delay, 0s);
  color: var(--color-gold);
  filter: drop-shadow(0 0 8px rgba(201,162,39,0.6));
}

@keyframes floatNote {
  0%   { opacity: 0;    transform: translateY(0) rotate(0deg) scale(0.5); }
  15%  { opacity: 0.6;  transform: translateY(-20%) rotate(10deg) scale(1); }
  50%  { opacity: 0.4;  transform: translateY(-60%) rotate(-5deg) scale(0.9); }
  85%  { opacity: 0.2;  transform: translateY(-90%) rotate(15deg) scale(0.8); }
  100% { opacity: 0;    transform: translateY(-110%) rotate(5deg) scale(0.6); }
}

/* ---------- Animated Gradient Border ---------- */
.glow-border {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(
    from 0deg,
    var(--color-gold),
    var(--color-blue),
    var(--color-gold-light),
    var(--color-blue-light),
    var(--color-gold)
  );
  border-radius: inherit;
  animation: rotateBorder 4s linear infinite;
  z-index: -1;
}

@keyframes rotateBorder {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- Shimmer Effect ---------- */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.05) 50%,
    transparent 100%
  );
  animation: shimmerMove 2.5s ease infinite;
}

@keyframes shimmerMove {
  from { left: -100%; }
  to   { left: 100%; }
}

/* ---------- Pulsing Glow ---------- */
.pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(201,162,39,0.2); }
  50%       { box-shadow: 0 0 40px rgba(201,162,39,0.5), 0 0 80px rgba(201,162,39,0.15); }
}

/* ---------- Stagger Children ---------- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { animation: staggerReveal 0.5s 0.0s forwards; }
.stagger-children.visible > *:nth-child(2) { animation: staggerReveal 0.5s 0.1s forwards; }
.stagger-children.visible > *:nth-child(3) { animation: staggerReveal 0.5s 0.2s forwards; }
.stagger-children.visible > *:nth-child(4) { animation: staggerReveal 0.5s 0.3s forwards; }
.stagger-children.visible > *:nth-child(5) { animation: staggerReveal 0.5s 0.4s forwards; }
.stagger-children.visible > *:nth-child(6) { animation: staggerReveal 0.5s 0.5s forwards; }
.stagger-children.visible > *:nth-child(7) { animation: staggerReveal 0.5s 0.6s forwards; }
.stagger-children.visible > *:nth-child(8) { animation: staggerReveal 0.5s 0.7s forwards; }

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

/* ---------- Counter Animation ---------- */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* ---------- Wave Animation (decorative) ---------- */
.wave-decoration {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  overflow: hidden;
  pointer-events: none;
}

.wave-decoration svg {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 100%;
  animation: waveMove 8s linear infinite;
}

.wave-decoration svg:nth-child(2) {
  animation-duration: 12s;
  animation-direction: reverse;
  opacity: 0.5;
}

@keyframes waveMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Magnetic Button Effect ---------- */
.magnetic {
  transition: transform var(--transition-fast);
}

/* ---------- AI Badge Floating ---------- */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4em 1em;
  background: linear-gradient(135deg, rgba(46,156,209,0.15) 0%, rgba(201,162,39,0.15) 100%);
  border: 1px solid rgba(201,162,39,0.25);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gold-light);
  letter-spacing: 0.08em;
  animation: aiBadgePulse 3s ease-in-out infinite;
}

.ai-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  animation: aiBadgeDot 1.5s ease-in-out infinite;
}

@keyframes aiBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,162,39,0); }
  50%       { box-shadow: 0 0 15px rgba(201,162,39,0.2); }
}

@keyframes aiBadgeDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.6; }
}

/* ---------- Scroll Progress Indicator ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--gradient-gold);
  z-index: calc(var(--z-nav) + 1);
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(201,162,39,0.5);
}

/* ---------- Featured Song Hero Strip ---------- */
.featured-strip {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(201,162,39,0.08) 0%, rgba(30,111,160,0.05) 100%);
  border: 1px solid rgba(201,162,39,0.2);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  cursor: pointer;
  transition: var(--transition-med);
  position: relative;
  overflow: hidden;
}

.featured-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(201,162,39,0.05) 100%);
  opacity: 0;
  transition: opacity var(--transition-med);
}

.featured-strip:hover::before { opacity: 1; }

.featured-strip:hover {
  border-color: rgba(201,162,39,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,162,39,0.1);
}

.featured-strip-label {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.featured-strip-cover {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface-2);
}

.featured-strip-info {
  flex: 1;
  min-width: 0;
}

.featured-strip-title {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.featured-strip-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.featured-strip-play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-gold);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-gold);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.featured-strip:hover .featured-strip-play { transform: scale(1.1); }
