/* Custom styles for Intertek Caleb Brett */

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

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll animation base - progressive enhancement via JS */
.scroll-animate {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.scroll-hidden {
    opacity: 0;
    transform: translateY(24px);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .scroll-animate {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .scroll-animate.scroll-hidden {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Navbar styles */
#navbar {
    background: rgba(255, 255, 255, 0.0);
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(16, 42, 67, 0.08);
}

/* Mobile menu link hover */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-link:hover {
    background: rgba(16, 42, 67, 0.05);
    color: #102a43;
}

/* Hero image subtle float animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: no-preference) {
    #hero .relative > div:last-child {
        animation: float 6s ease-in-out infinite;
    }
}

/* Selection color */
::selection {
    background: rgba(234, 179, 8, 0.2);
    color: #102a43;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #eab308;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9fb3c8;
}
