/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal animations - progressive enhancement, only active with JS */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Ensure content is always visible (no JS fallback) */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

::-webkit-scrollbar-thumb {
    background: #2dd4bf;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5eead4;
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background-color: rgba(45, 212, 191, 0.3);
    color: #0a1628;
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(6, 13, 24, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image hover effects */
.group:hover .group-hover\:scale-105,
.group:hover .group-hover\:scale-110 {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Gradient text fallback */
.text-transparent {
    -webkit-background-clip: text;
    background-clip: text;
}

/* Smooth transitions for all interactive elements */
button, a, input, select, textarea {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Card hover lift effect */
.rounded-2xl {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}
