/* ==========================================================================
   Algotrading With Petr - Shared Styles
   ========================================================================== */

/* Base */
html { 
    scroll-behavior: smooth; 
}

body { 
    background-color: #020617; /* slate-950 */
    font-family: 'Inter', system-ui, sans-serif;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Selection */
::selection {
    background-color: #6495ed;
    color: white;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* Navigation blur */
.nav-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-fade-in-up {
        animation: none;
        opacity: 1;
    }
    
    .animate-bounce {
        animation: none;
    }
    
    /* Hide canvas animation for reduced motion */
    #dataFlowCanvas {
        display: none;
    }
}

/* ==========================================================================
   Skip Link (Accessibility)
   ========================================================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #6495ed;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* ==========================================================================
   Card Hover Effects
   ========================================================================== */

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(100, 149, 237, 0.3);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-content.open {
    max-height: 500px;
}

/* ==========================================================================
   Background Grid Pattern
   ========================================================================== */

.bg-grid {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23102030' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ==========================================================================
   Journey Line Animations (Launchpad page)
   ========================================================================== */

@keyframes journeyGlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

@keyframes journeyParticle {
    0% { left: 0%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.journey-line-glow {
    animation: journeyGlow 4s ease-in-out infinite;
}

.journey-particle {
    animation: journeyParticle 4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .journey-line-glow,
    .journey-particle {
        animation: none;
    }
}

/* ==========================================================================
   Focus Styles (Accessibility)
   ========================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #6495ed;
    outline-offset: 2px;
}

/* ==========================================================================
   Screen Reader Only
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
