/* Base & Utilities */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(6, 78, 59, 0.15);
    color: #064E3B;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAF9F6;
}
::-webkit-scrollbar-thumb {
    background: #065F46;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #064E3B;
}

/* Scroll reveal base state (progressive enhancement) */
.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);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .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; }
}

/* Navbar transition */
.nav-scrolled {
    background-color: rgba(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

/* Mobile menu animation */
.mobile-menu-open #mobile-menu {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-open .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Image hover */
img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Button focus */
a:focus-visible, button:focus-visible {
    outline: 2px solid #065F46;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Link underline animation */
a:not([class]) {
    position: relative;
}
