/* Base styles and custom utilities */

/* Ensure no overflow issues */
html, body {
    overflow-x: hidden;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #102a43;
}
::-webkit-scrollbar-thumb {
    background: #334e68;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #486581;
}

/* Navbar scroll state */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

/* Nav link hover underline effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #d4a017;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Mobile nav link */
.mobile-nav-link {
    display: block;
}

/* Stat card entrance animations */
.stat-card {
    animation: floatIn 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.stat-card:nth-child(1) { animation-delay: 0.3s; }
.stat-card:nth-child(2) { animation-delay: 0.5s; }
.stat-card:nth-child(3) { animation-delay: 0.7s; }

@keyframes floatIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations — progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    .service-card {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: content is always visible if JS is disabled */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .service-card,
    .stat-card {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* Card hover lift effect */
.service-card > div {
    will-change: transform;
}

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d4a017;
    outline-offset: 2px;
}

/* Image aspect ratio helpers */
img {
    max-width: 100%;
    height: auto;
}

/* Selection color */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #102a43;
}
