/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1f2d;
}
::-webkit-scrollbar-thumb {
    background: #1e4f6e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2e6b8c;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
}

/* Scroll Reveal (progressive enhancement — content visible by default) */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 31, 45, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 79, 110, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Selection */
::selection {
    background: rgba(240, 201, 97, 0.3);
    color: #f0c961;
}

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

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

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(240, 201, 97, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(240, 201, 97, 0.1) !important;
}

/* Button hover lift */
button, a {
    transition: all 0.2s ease;
}

/* Gallery grid responsive adjustments */
@media (max-width: 768px) {
    .auto-rows-\[200px\] {
        auto-rows: 160px;
    }
}

@media (max-width: 480px) {
    .auto-rows-\[200px\] {
        auto-rows: 130px;
    }
}
