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

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #080e1a;
    color: #f8fafc;
    line-height: 1.6;
}

/* ===== NAVBAR ===== */
#navbar {
    background: rgba(8, 14, 26, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}

#navbar.scrolled {
    background: rgba(8, 14, 26, 0.92);
    border-bottom: 1px solid rgba(14, 148, 136, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== MOBILE MENU ===== */
.menu-line {
    display: block;
}

#mobileMenu.open {
    transform: translateX(0);
}

#mobileMenu.closed {
    transform: translateX(100%);
}

.mobile-link {
    opacity: 1;
}

/* ===== SERVICE CARDS ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0), transparent);
    transition: background 0.4s ease;
}

.service-card:hover::before {
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.6), transparent);
}

/* ===== GALLERY ===== */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 14, 26, 0.3) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

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

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #080e1a;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(14, 148, 136, 0.3);
    color: #f0fdfa;
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* ===== 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;
    }
}
