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

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

body {
    overflow-x: hidden;
}

/* Scroll reveal animations — progressive enhancement, only below the fold */
@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, background 0.5s ease, box-shadow 0.5s ease;
    }

    .gallery-item {
        opacity: 1;
        transform: scale(1);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(6, 15, 31, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 148, 30, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

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

.mobile-link {
    display: block;
}

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

::-webkit-scrollbar-track {
    background: #060f1f;
}

::-webkit-scrollbar-thumb {
    background: #1c345a;
    border-radius: 4px;
}

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

/* Selection color */
::selection {
    background: rgba(201, 148, 30, 0.3);
    color: #f0f3f9;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c9941e;
    outline-offset: 2px;
}

/* Image loading */
img {
    display: block;
    max-width: 100%;
}

/* Form focus states */
input:focus,
textarea:focus {
    background: rgba(14, 31, 61, 0.8);
}
