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

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #1b3a6e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e8a020;
}

/* Selection */
::selection {
    background: rgba(232, 160, 32, 0.3);
    color: #f0b040;
}

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

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Reveal animations — progressive enhancement, only when JS runs and motion preferred */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

/* Ensure content is visible even if JS is disabled */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e8a020;
    transition: width 0.2s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Service card hover glow */
.group:hover .group-hover\:bg-gold-500\/20 {
    box-shadow: 0 0 30px rgba(232, 160, 32, 0.15);
}

/* Button ripple */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Smooth focus outlines */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .animate-float, .animate-float-delayed {
        animation-duration: 8s;
    }
}
