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

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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #030E1E;
}
::-webkit-scrollbar-thumb {
    background: rgba(94, 234, 212, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(94, 234, 212, 0.5);
}

/* Selection */
::selection {
    background: rgba(94, 234, 212, 0.3);
    color: #fff;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(3, 14, 30, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animations */
.menu-line:nth-child(1) {
    transform-origin: center;
}
.menu-line:nth-child(2) {
    transform-origin: center;
}
.menu-line:nth-child(3) {
    transform-origin: center;
}

.mobile-menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-open .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 24px;
}

/* Service card hover */
.service-card {
    transform: translateY(0);
}
.service-card:hover {
    transform: translateY(-4px);
}

/* Gallery hover */
.gallery-item {
    cursor: pointer;
}
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3, 14, 30, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}
.gallery-item:hover::after {
    opacity: 1;
}
.gallery-item:hover img {
    transform: scale(1.08);
}

/* Scroll reveal (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Form focus styles */
input:focus, textarea:focus {
    outline: none;
}

/* Smooth anchor offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}
</style>
