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

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

body {
    overflow-x: hidden;
}

/* Scroll reveal base — content is always visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Only animate when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered delays */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuToggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuToggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuToggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 5rem;
}

/* Subtle image hover */
img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Selection color */
::selection {
    background-color: rgba(22, 101, 52, 0.15);
    color: inherit;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 1px solid rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
}

/* Thin scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(253, 249, 240, 1);
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 138, 120, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 138, 120, 0.5);
}
