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

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

body {
    background-color: #040B18;
    color: #ffffff;
}

::selection {
    background: rgba(26, 184, 148, 0.3);
    color: #ffffff;
}

/* ===== Geometric Background Shapes ===== */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.geo-circle-1 {
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    border: 1px solid rgba(26, 184, 148, 0.08);
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    top: 30%;
    right: 10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 184, 148, 0.06) 0%, transparent 70%);
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-circle-3 {
    bottom: 10%;
    left: -5%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1px solid rgba(26, 184, 148, 0.06);
    animation: float-slow 18s ease-in-out infinite;
}

.geo-rect-1 {
    top: 20%;
    left: 5%;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(26, 184, 148, 0.1);
    border-radius: 20px;
    transform: rotate(45deg);
    animation: float-slow 22s ease-in-out infinite;
}

.geo-triangle-1 {
    bottom: 25%;
    right: 5%;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(26, 184, 148, 0.04);
    animation: float-slow 16s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(2deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(4, 11, 24, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#navbar.scrolled .menu-line:nth-child(3) {
    width: 1.25rem;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 1;
}

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

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

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

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

.menu-line {
    display: block;
    transition: all 0.3s ease;
}

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

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

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .geo-shape {
        animation: none;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #040B18;
}
::-webkit-scrollbar-thumb {
    background: rgba(26, 184, 148, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 184, 148, 0.5);
}
