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

html {
    scroll-behavior: smooth;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #C9A84C;
    border-radius: 3px;
}

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

/* Selection */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #fff;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(4, 10, 20, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

/* Service cards hover */
.service-card {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.5s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Gallery items */
.gallery-item {
    height: 200px;
    cursor: pointer;
}

.gallery-item.col-span-2 {
    height: 200px;
}

.gallery-item.col-span-2.row-span-2 {
    height: 408px;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

/* Menu lines animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    width: 6;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% { top: -16px; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Reveal animations (below the fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-item {
        height: 160px;
    }
    
    .gallery-item.col-span-2 {
        height: 160px;
    }
    
    .gallery-item.col-span-2.row-span-2 {
        height: 328px;
    }
}

@media (min-width: 768px) {
    .gallery-item {
        height: 240px;
    }
    
    .gallery-item.col-span-2 {
        height: 240px;
    }
    
    .gallery-item.col-span-2.row-span-2 {
        height: 488px;
    }
}

/* Form focus styles */
input:focus, textarea:focus, select:focus {
    border-color: rgba(201, 168, 76, 0.5) !important;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.1);
}

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