/* 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: #0c101d;
    color: #e8edf5;
}

/* Selection */
::selection {
    background-color: rgba(47, 184, 143, 0.3);
    color: #ddf4ea;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0c101d;
}
::-webkit-scrollbar-thumb {
    background: #1e2c49;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #283e63;
}

/* Hero Animations */
.hero-title {
    animation: heroSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(40px);
}

.hero-subtitle {
    animation: heroSlideUp 1s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-desc {
    animation: heroSlideUp 1s 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-image {
    animation: heroImageIn 1.2s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateX(40px);
}

@keyframes heroSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImageIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Cards */
.service-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}

/* Gallery */
.gallery-item {
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

/* Navbar */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    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: mobileLinkIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Menu Button Animation */
.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: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Smooth anchor offset */
section[id] {
    scroll-margin-top: 80px;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #2fb88f;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    background-color: #141a2e;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    .no-print {
        display: none;
    }
}
