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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(26, 60, 42, 0.2);
    color: inherit;
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

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

#navbar.scrolled {
    background: rgba(250, 248, 244, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 60, 42, 0.08);
}

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

#mobileMenu.open .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

#mobileMenu.open .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 24px;
}

/* ── Hover underline animation for nav ── */
nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 0.3s ease;
}

/* ── Image hover transitions ── */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #447d52;
}

/* ── Focus styles ── */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid #8fb894;
    outline-offset: 2px;
}

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