/* =============================================
   RepoScore Landing Page - Additional Styles
   Non-critical CSS (loaded asynchronously)
   ============================================= */

/* Additional animations */
@media (prefers-reduced-motion: no-preference) {
    .stagger-1 { animation-delay: 0.1s; }
    .stagger-2 { animation-delay: 0.2s; }
    .stagger-3 { animation-delay: 0.3s; }
    .stagger-4 { animation-delay: 0.4s; }
}

/* Smooth scroll behavior for older browsers */
@supports not (scroll-behavior: smooth) {
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    header,
    .hero-cta,
    .pricing-cta,
    footer,
    .skip-link {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero h1 span,
    .stat-value,
    .pricing-price {
        -webkit-text-fill-color: black;
        background: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --text-secondary: #cccccc;
    }
    
    .feature-card,
    .pricing-card,
    .faq-item,
    .testimonial {
        border-width: 2px;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* Mobile menu styles */
.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    padding: 2rem;
    z-index: 99;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
}

/* Dark mode toggle (for future use) */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Loading state for buttons */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tooltip styles */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Code highlighting for technical content */
code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Selection color */
::selection {
    background: var(--accent-green);
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--bg-tertiary) var(--bg-secondary);
}
