*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

.nav-text-white {
    color: #061a2e;
    transition: color 0.3s ease;
}

.nav-text-muted {
    color: #3db89a;
    transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-text-white {
    color: #ffffff;
}

#navbar:not(.scrolled) .nav-text-muted {
    color: #3db89a;
}

.nav-link {
    color: rgba(6, 26, 46, 0.7);
    transition: color 0.3s ease, background 0.3s ease;
}

#navbar:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

.nav-link:hover {
    color: #1e6b5a;
    background: rgba(61, 184, 154, 0.08);
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #3db89a;
    background: rgba(61, 184, 154, 0.15);
}

/* ── Mobile menu ── */
#mobile-menu-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
}

#navbar:not(.scrolled) #mobile-menu-btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: #061a2e;
    position: relative;
    transition: all 0.3s ease;
}

#navbar:not(.scrolled) .hamburger-line {
    background: #ffffff;
}

.hamburger-line::before,
.hamburger-line::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: inherit;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger-line::before { top: -6px; }
.hamburger-line::after { top: 6px; }

#mobile-menu-btn[aria-expanded="true"] .hamburger-line {
    background: transparent !important;
}

#mobile-menu-btn[aria-expanded="true"] .hamburger-line::before {
    top: 0;
    transform: rotate(45deg);
}

#mobile-menu-btn[aria-expanded="true"] .hamburger-line::after {
    top: 0;
    transform: rotate(-45deg);
}

.mobile-nav-link {
    transition: all 0.2s ease;
}

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

.scroll-reveal[data-reveal-state="hidden"] {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal[data-reveal-state="visible"] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Utility ── */
::selection {
    background: rgba(61, 184, 154, 0.2);
    color: #061a2e;
}

select option {
    color: #292524;
}

/* ── Focus styles ── */
:focus-visible {
    outline: 2px solid #3db89a;
    outline-offset: 2px;
}

/* ── Subtle gradient border on contact form ── */
#contact-form {
    background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
}
