/* =====================================================
   YAAMI MUSIC - Musical Animations
   ===================================================== */

/* ---------- Floating Musical Notes (Global Background) ---------- */
.music-bg-notes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.music-bg-notes .note {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(201,168,76,0.04);
    animation: floatNote linear infinite;
    will-change: transform;
}

@keyframes floatNote {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* ---------- Treble Clef Watermark ---------- */
.treble-watermark {
    position: fixed;
    right: -5%;
    top: 20%;
    font-size: 30vw;
    color: rgba(201,168,76,0.015);
    pointer-events: none;
    z-index: 0;
    font-family: serif;
    line-height: 1;
    user-select: none;
}

/* ---------- Gold Particle System ---------- */
.gold-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.gold-particles .particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--gold);
    border-radius: 50%;
    animation: sparkle linear infinite;
    will-change: transform, opacity;
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    20% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

/* ---------- String Vibration Effect ---------- */
.string-vibrate {
    animation: stringVibrate 0.5s ease;
}

@keyframes stringVibrate {
    0% { transform: translateX(0); }
    10% { transform: translateX(-2px); }
    20% { transform: translateX(2px); }
    30% { transform: translateX(-1.5px); }
    40% { transform: translateX(1.5px); }
    50% { transform: translateX(-1px); }
    60% { transform: translateX(1px); }
    70% { transform: translateX(-0.5px); }
    80% { transform: translateX(0.5px); }
    100% { transform: translateX(0); }
}

/* ---------- Glowing Pulse ---------- */
.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(201,168,76,0.2); }
    50% { box-shadow: 0 0 25px rgba(201,168,76,0.4); }
}

/* ---------- Vinyl Record Spin ---------- */
.vinyl-spin {
    animation: vinylSpin 8s linear infinite;
}

@keyframes vinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- Staff Line Shimmer ---------- */
.staff-shimmer {
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ---------- Note Bounce ---------- */
.note-bounce {
    animation: noteBounce 2s ease-in-out infinite;
}

@keyframes noteBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ---------- Fade in Stagger for Lists ---------- */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerFade 0.5s ease forwards;
}

@keyframes staggerFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Cursor Trail (optional, toggled by JS) ---------- */
.cursor-note {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 1.2rem;
    color: var(--gold);
    opacity: 0;
    animation: cursorNoteAnim 1s ease forwards;
    will-change: transform, opacity;
}

@keyframes cursorNoteAnim {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.3) rotate(45deg);
    }
}

/* ---------- Hero Waveform Bar ---------- */
.waveform-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 60px;
    margin: 2rem auto;
    max-width: 300px;
    opacity: 0.15;
}

.waveform-container .bar {
    width: 3px;
    background: var(--gold);
    border-radius: 3px;
    animation: waveformBar 1.8s ease-in-out infinite;
    will-change: transform;
}

@keyframes waveformBar {
    0%, 100% { transform: scaleY(0.2); }
    50% { transform: scaleY(1); }
}

/* ---------- Page Transition ---------- */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-transition.active {
    opacity: 1;
}
