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

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #34d4b4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5eead4;
}

/* Selection */
::selection {
    background: #34d4b4;
    color: #0a1628;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-scrolled .menu-line {
    background: #fff !important;
}

/* Mobile menu animations */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu-closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

.mobile-menu-open .mobile-link {
    animation: slideUp 0.4s ease forwards;
}

.mobile-menu-open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger animation */
.menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #34d4b4, #5eead4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Gallery items */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.4), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    border-radius: 1rem;
}

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

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s 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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

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

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

/* Pulse dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

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

/* Smooth image loading */
img {
    image-rendering: auto;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
