/* FasterAI Labs - Custom Animations & Design System */

/* ── Subtle dot-grid background texture ── */
body {
    background-image: radial-gradient(circle, #262626 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ── Code block styling (brand-matched) ── */
pre code.hljs {
    background: #1a1a1a !important;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.7;
}

.hljs-keyword, .hljs-built_in { color: #f97316 !important; }
.hljs-string { color: #34d399 !important; }
.hljs-comment { color: #525252 !important; font-style: italic; }
.hljs-number { color: #60a5fa !important; }
.hljs-title.function_ { color: #c4b5fd !important; }
.hljs-params { color: #e5e5e5 !important; }

/* ── Card hover with orange glow ── */
.card-glow {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}
.card-glow:hover {
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.06), 0 0 0 1px rgba(249, 115, 22, 0.1);
    transform: translateY(-2px);
}

/* Subtle float animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Pulse animation for emphasis */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(249, 115, 22, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(249, 115, 22, 0.4);
    }
}

/* Gradient shimmer effect */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Fade in from bottom */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in from left */
@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale in animation */
@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utility classes for animations */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(249, 115, 22, 0.1) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* Scroll-triggered animation classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered animation delays for lists */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Smooth image loading */
img {
    transition: opacity 0.3s ease-out;
}

img[loading="lazy"] {
    opacity: 1;
}

/* Enhanced focus states for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid rgb(249, 115, 22);
    outline-offset: 2px;
}

/* Give copy button more breathing room */
.hljs-copy-button {
    margin: 0.75rem !important;
}

.hljs-copy-button[data-copied="true"] {
    height: auto !important;
    padding: 0.25rem 0.5rem !important;
}

/* Hide code block scrollbars (still scrollable if needed) */
.prose pre {
    scrollbar-width: none;
}

.prose pre::-webkit-scrollbar {
    display: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in-up,
    .fade-in-left,
    .scale-in {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}
