/* 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(94, 234, 212, 0.2);
    color: #5EEAD4;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #050D18;
}

::-webkit-scrollbar-thumb {
    background: rgba(94, 234, 212, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(94, 234, 212, 0.4);
}

/* Navbar */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(5, 13, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #5EEAD4;
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

#mobileMenu .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu .mobile-link:nth-child(4) { animation-delay: 0.2s; }

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

/* Menu Button Animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(8px);
}

.menu-btn.active .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(3px, -3px);
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0), transparent);
    transition: background 0.5s ease;
}

.service-card:hover::before {
    background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.3), transparent);
}

/* Gallery Items */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    will-change: transform;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: none;
    }

    .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; }
}

/* Hero entrance - visible by default, JS enhances */
.hero-content {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .hero-content {
        animation: heroIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .hero-content-delay-1 { animation-delay: 0.1s; }
    .hero-content-delay-2 { animation-delay: 0.2s; }
    .hero-content-delay-3 { animation-delay: 0.35s; }
    .hero-content-delay-4 { animation-delay: 0.5s; }
}

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

/* Floating card animation */
@media (prefers-reduced-motion: no-preference) {
    .floating-card {
        animation: float 4s ease-in-out infinite;
    }

    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-6px); }
    }
}

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

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Print styles */
@media print {
    #navbar, .scroll-indicator {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
