/* Additional Apple/Stripe Style Enhancements */

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Text selection */
::selection {
    background: rgba(99, 91, 255, 0.3);
    color: var(--text);
}

::-moz-selection {
    background: rgba(99, 91, 255, 0.3);
    color: var(--text);
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Better image rendering */
img {
    -webkit-user-select: none;
    user-select: none;
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

p {
    text-wrap: pretty;
    max-width: 75ch;
}

/* Loading state */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-line {
        animation: none;
    }
    
    #particles {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: rgba(255, 255, 255, 0.2);
        --text-secondary: #b0b8c4;
    }
}

/* Dark mode enhancement (already dark, but for system preference) */
@media (prefers-color-scheme: dark) {
    body {
        color-scheme: dark;
    }
}

/* Better tap targets for mobile */
@media (pointer: coarse) {
    .btn,
    .nav-link,
    .menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Backdrop blur fallback */
@supports not (backdrop-filter: blur(20px)) {
    .navbar {
        background: rgba(10, 13, 26, 0.95);
    }
    
    .contact-form-wrapper,
    .service-card,
    .tech-item {
        background: rgba(22, 27, 46, 0.8);
    }
}
