/* ═══════════════════════════════════════════════════════════
   Animation System — SiteQwality "Mission Control"
   ═══════════════════════════════════════════════════════════ */

/* ── Scroll reveal base states ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    will-change: transform, opacity;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    will-change: transform, opacity;
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    will-change: transform, opacity;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    will-change: transform, opacity;
}

/* ── Revealed state ── */
.revealed,
.reveal.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
    opacity: 1;
    transform: none;
}

/* ── Stagger children ── */
.stagger-children > .reveal:nth-child(1),
.stagger-children > .reveal-scale:nth-child(1) { transition-delay: 0s; }
.stagger-children > .reveal:nth-child(2),
.stagger-children > .reveal-scale:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > .reveal:nth-child(3),
.stagger-children > .reveal-scale:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > .reveal:nth-child(4),
.stagger-children > .reveal-scale:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > .reveal:nth-child(5),
.stagger-children > .reveal-scale:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > .reveal:nth-child(6),
.stagger-children > .reveal-scale:nth-child(6) { transition-delay: 0.5s; }

/* ── Keyframe animations ── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes constellation-pulse {
    0%, 100% { opacity: 0.15; r: 2; }
    50% { opacity: 0.6; r: 3; }
}

@keyframes constellation-line-pulse {
    0%, 100% { opacity: 0.06; }
    50% { opacity: 0.2; }
}

/* ── Floating animation ── */
.float {
    animation: float 6s ease-in-out infinite;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
        transition: none;
        will-change: auto;
    }

    .stagger-children > * {
        transition-delay: 0s !important;
    }

    .float {
        animation: none;
    }

    .constellation circle,
    .constellation line {
        animation: none;
    }

    .tab-panel {
        animation: none;
    }

    .tab-indicator {
        transition: none;
    }
}
