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

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

body {
    margin: 0;
    background-color: #020617;
    color: #f8fafc;
}

/* Geometric Background Shapes */
.geo-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.shape-circle-1 {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -150px;
}

.shape-circle-2 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.06) 0%, transparent 70%);
    bottom: 10%;
    left: -100px;
}

.shape-square-1 {
    width: 120px;
    height: 120px;
    background: rgba(13, 148, 136, 0.05);
    border: 1px solid rgba(13, 148, 136, 0.1);
    top: 30%;
    left: 5%;
    transform: rotate(45deg);
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(13, 148, 136, 0.04);
    top: 60%;
    right: 8%;
    transform: rotate(-15deg);
}

.shape-dots {
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, rgba(45, 212, 191, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
    top: 45%;
    right: 15%;
}

/* Navbar */
.nav-header {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}

/* Mobile Menu */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

#mobileMenu.closed .mobile-link {
    opacity: 0;
    transform: translateY(20px);
}

/* Menu Animation */
.menu-line {
    display: block;
}

.menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

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

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #2dd4bf);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.3) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 16px;
}

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

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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: translateY(0);
}

/* Stagger delays */
.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; }

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

/* Responsive adjustments */
@media (max-width: 640px) {
    .shape-circle-1 {
        width: 300px;
        height: 300px;
    }
    .shape-circle-2 {
        width: 200px;
        height: 200px;
    }
    .shape-square-1 {
        width: 60px;
        height: 60px;
    }
    .shape-triangle-1 {
        border-left-width: 30px;
        border-right-width: 30px;
        border-bottom-width: 52px;
    }
    .shape-dots {
        width: 100px;
        height: 100px;
        background-size: 14px 14px;
    }
}
