/* Custom Styles for Dialed-in Fabrication */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
}

/* Navbar Styles */
#navbar {
    background: rgba(250, 248, 244, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 28, 63, 0.1);
}

#navbar.scrolled {
    background: rgba(250, 248, 244, 0.98);
    box-shadow: 0 4px 20px rgba(15, 28, 63, 0.1);
}

/* Mobile Menu */
.mobile-link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(15, 28, 63, 0.1);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Animation Keyframes */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

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

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

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* Scroll Reveal (Progressive Enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal.animate-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .reveal.animate-on-scroll.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

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

::-webkit-scrollbar-track {
    background: #faf8f4;
}

::-webkit-scrollbar-thumb {
    background: #0f1c3f;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #152a56;
}

/* Selection Color */
::selection {
    background: #d4a843;
    color: #0f1c3f;
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.2);
}

/* Button Hover Effects */
button, a {
    transition: all 0.3s ease;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    #navbar,
    #backToTop,
    .animate-float,
    .animate-float-delayed {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-navy-900,
    .bg-gold-500 {
        background: #0f1c3f !important;
        color: #fff !important;
    }
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bg-navy-900 {
        background: #000 !important;
    }
    
    .bg-gold-500 {
        background: #b8860b !important;
    }
}

/* Touch Device Adjustments */
@media (hover: none) {
    .group:hover .group-hover\\:bg-gold-500 {
        background: #0f1c3f !important;
    }
    
    .group:hover .group-hover\\:text-navy-900 {
        color: #fff !important;
    }
}
