/* ── Base & Animations ── */
html {
    scroll-behavior: smooth;
}

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

/* Hero fade-up animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.scroll-reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal.revealed:nth-child(4) { transition-delay: 0.3s; }

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(253, 252, 248, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.06), 0 4px 24px rgba(27, 67, 50, 0.06);
}

/* Mobile menu transitions */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

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

/* Nav hamburger animation */
#mobile-toggle.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-toggle.active .nav-line:nth-child(2) {
    opacity: 0;
}

#mobile-toggle.active .nav-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* Image hover zoom container */
.group img {
    will-change: transform;
}

/* Selection color */
::selection {
    background: rgba(27, 67, 50, 0.15);
    color: #1B4332;
}

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

::-webkit-scrollbar-track {
    background: #FAF8F2;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #8fba8e;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
