/* Base & Utilities */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(10, 26, 46, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-scrolled .nav-text {
    color: #ffffff !important;
}

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

::-webkit-scrollbar-track {
    background: #f0f4f8;
}

::-webkit-scrollbar-thumb {
    background: #627d98;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #486581;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #f3c153;
    outline-offset: 2px;
}

/* Image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Selection color */
::selection {
    background: #f3c153;
    color: #102a43;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Form focus states */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(243, 193, 83, 0.2);
}

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

/* Print styles */
@media print {
    nav, #hero, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
