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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

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

#navbar.scrolled {
    background: rgba(2, 44, 34, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#navbar.scrolled #nav-logo-text {
    color: #fefdf8;
}

.nav-link {
    position: relative;
}

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

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

/* === Hero === */
.hero-bg {
    will-change: transform;
}

.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 1s ease forwards 0.3s;
}

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

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

/* === Mobile Menu === */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* === Menu Section === */
#menu ul li {
    position: relative;
}

/* === Buttons === */
button, a {
    cursor: pointer;
}

/* === Form === */
input:focus, textarea:focus {
    outline: none;
}

/* === Smooth image loading === */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* === Subtle parallax on hero === */
@media (prefers-reduced-motion: no-preference) {
    .hero-bg {
        transition: transform 0.1s linear;
    }
}

/* === Focus visible for accessibility === */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    border-radius: 4px;
}

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

::-webkit-scrollbar-track {
    background: #0a0f1a;
}

::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* === Print styles === */
@media print {
    #navbar, #contact-form, button {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
