/* Custom styles and overrides */

:root {
    scroll-behavior: smooth;
}

html {
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Scroll reveal base state - visible by default for progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(16, 42, 67, 0.08);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}

/* Selection color */
::selection {
    background: #e5ab33;
    color: #102a43;
}

/* Hero scroll indicator animation */
@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

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

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

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

/* Mobile menu transition */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button hover effects */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Ensure cards have consistent heights in grid */
@media (min-width: 768px) {
    #services .group > div,
    #why-us .scroll-reveal > div {
        display: flex;
        flex-direction: column;
    }
}

/* Gradient text fallback for older browsers */
.text-transparent.bg-clip-text {
    -webkit-text-fill-color: transparent;
}
