/* === Base & Reset === */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(74, 222, 128, 0.3);
    color: #f0fdf4;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050f1f;
}
::-webkit-scrollbar-thumb {
    background: #19375c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d5f98;
}

/* === Floating Cards Animation === */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1s;
}

.floating-card:nth-child(3) {
    animation-delay: -2s;
}

/* === Service Cards Hover === */
.service-card {
    will-change: transform;
}

/* === Gallery Items === */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 15, 31, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* === Navbar Scroll State === */
nav.scrolled {
    background: rgba(5, 15, 31, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(45, 95, 152, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* === Mobile Menu === */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

.mobile-nav-link {
    display: block;
    padding: 8px 16px;
    border-radius: 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover {
    background: rgba(74, 222, 128, 0.1);
    color: #86efac;
}

/* === Scroll Reveal (progressive enhancement) === */
@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);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

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

/* === Responsive adjustments === */
@media (max-width: 640px) {
    .floating-card {
        display: none;
    }
    
    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 60px;
    }
    
    .hero-image-main {
        display: block !important;
    }
}

@media (min-width: 641px) {
    .hero-image-main {
        display: none;
    }
}
