*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(201, 162, 39, 0.2);
    color: #0a1628;
}

/* Scroll reveal animations — progressive enhancement via prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(201, 162, 39, 0.1);
}

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

.navbar-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
}

.navbar-scrolled .nav-icon-stroke {
    stroke: #c9a227 !important;
}

/* Service card hover glow */
.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.service-card:hover::after {
    border-color: rgba(201, 162, 39, 0.3);
}

.service-card {
    position: relative;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(201, 162, 39, 0.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 162, 39, 0.6);
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Form focus animations */
input:focus, textarea:focus {
    border-bottom-color: #c9a227 !important;
}

input, textarea {
    transition: border-bottom-color 0.3s ease;
}

/* Image lazy loading shimmer */
img {
    loading: lazy;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
