/* ============================================
   ZenRead — Animations & Effects
   Focused interface motion
   ============================================ */

/* ── Keyframes ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes bubbleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}
@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* ── Utility Classes ── */
.animate-fade-in-up { animation: fadeInUp 0.6s var(--zen-ease) both; }
.animate-fade-in { animation: fadeIn 0.5s ease both; }
.animate-scale-in { animation: scaleIn 0.5s var(--zen-ease) both; }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-float-slow { animation: floatSlow 6s ease-in-out infinite; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 80ms; }
.stagger > *:nth-child(3) { animation-delay: 160ms; }
.stagger > *:nth-child(4) { animation-delay: 240ms; }
.stagger > *:nth-child(5) { animation-delay: 320ms; }
.stagger > *:nth-child(6) { animation-delay: 400ms; }

/* ── Gradient Text ── */
.gradient-text {
    background: linear-gradient(135deg, #4f6df5 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-hero {
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Glow Effects ── */
.glow-accent {
    box-shadow: 0 0 40px rgba(79,109,245,0.15), 0 0 80px rgba(79,109,245,0.05);
}
.glow-purple {
    box-shadow: 0 0 40px rgba(168,85,247,0.15), 0 0 80px rgba(168,85,247,0.05);
}

/* ── Glass Effect ── */
.glass {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
}
.glass-dark {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ── Animated Grid Background ── */
.bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}
.bg-dots {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 32px 32px;
}
.bg-gradient-orbs {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.bg-gradient-orbs::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    top: -100px; right: -100px;
    background: radial-gradient(circle, rgba(168,85,247,0.2) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}
.bg-gradient-orbs::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    bottom: -50px; left: -50px;
    background: radial-gradient(circle, rgba(79,109,245,0.15) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite 4s;
}
