/* Custom styles that complement Tailwind CSS */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

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

::-webkit-scrollbar-track {
    background: #1e2734;
}

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

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

/* Selection color */
::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #1e2734;
}

/* Subtle grain texture overlay for dark sections */
.bg-navy-900::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d4a853;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Mobile menu animation */
@media (max-width: 767px) {
    .mobile-menu {
        animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    
    @keyframes slideIn {
        from {
            transform: translateX(100%);
        }
        to {
            transform: translateX(0);
        }
    }
    
    .mobile-menu.close {
        animation: slideOut 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    
    @keyframes slideOut {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(100%);
        }
    }
}

/* 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;
    }
    
    .animate-bounce {
        animation: none;
    }
}

/* Print styles */
@media print {
    nav,
    #contact,
    .animate-bounce {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
