/* ===== 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: #080e1a;
    color: #f8fafc;
}

::selection {
    background: rgba(45, 212, 191, 0.3);
    color: #f0fdfa;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(8, 14, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(45, 212, 191, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

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

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

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

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

#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 slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

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

.geo-circle-1 {
    top: 10%;
    right: 5%;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.25) 0%, transparent 70%);
    animation: float1 8s ease-in-out infinite;
}

.geo-circle-2 {
    bottom: 15%;
    left: 38%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.15) 0%, transparent 70%);
    animation: float2 10s ease-in-out infinite;
}

.geo-circle-3 {
    top: 40%;
    right: 35%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.2) 0%, transparent 70%);
    animation: float3 6s ease-in-out infinite;
}

.geo-rect-1 {
    top: 20%;
    right: 30%;
    width: 80px;
    height: 80px;
    background: rgba(45, 212, 191, 0.08);
    border: 1px solid rgba(45, 212, 191, 0.15);
    transform: rotate(45deg);
    animation: float4 12s ease-in-out infinite;
}

.geo-triangle {
    bottom: 25%;
    right: 10%;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(45, 212, 191, 0.06);
    animation: float1 9s ease-in-out infinite reverse;
}

.geo-dots {
    top: 60%;
    left: 8%;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, rgba(45, 212, 191, 0.3) 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: 0.5;
    animation: float2 7s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -30px) rotate(5deg); }
    66% { transform: translate(-10px, 15px) rotate(-3deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-25px, 20px); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -20px) scale(1.1); }
}

@keyframes float4 {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(50deg) translate(10px, -15px); }
}

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

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, rgba(45, 212, 191, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.5s ease;
}

.service-card:hover::before {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.2) 0%, rgba(45, 212, 191, 0.05) 100%);
}

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

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

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

/* ===== Responsive ===== */
@media (max-width: 767px) {
    .geo-circle-1 {
        width: 250px;
        height: 250px;
    }
    .geo-circle-2 {
        width: 150px;
        height: 150px;
    }
    .geo-circle-3 {
        display: none;
    }
    .geo-rect-1 {
        display: none;
    }
    .geo-triangle {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .geo-circle-1 {
        width: 300px;
        height: 300px;
    }
}
