/* 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;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060D1A;
}
::-webkit-scrollbar-thumb {
    background: #1D3557;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4A843;
}

/* Selection */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #FDE68A;
}

/* Scroll Animation Classes */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(40px);
    }
}

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

/* Scroll Down Animation */
@keyframes scrollDown {
    0% {
        top: -16px;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 48px;
        opacity: 0;
    }
}

/* Hero image subtle parallax */
#hero .absolute.inset-0 img {
    will-change: transform;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(6, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.1);
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu button animation */
.menu-line {
    transform-origin: center;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 20px;
}

/* Service card hover glow */
.group:hover .absolute.top-0.right-0 {
    filter: blur(0px);
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 1px rgba(212, 168, 67, 0.3);
}

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

/* Reduce motion */
@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;
    }
}

/* Print styles */
@media print {
    nav, #contactForm, .reveal {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
