/* ── Base ── */
*, *::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;
}

::selection {
    background: rgba(4, 120, 87, 0.2);
    color: #047857;
}

/* ── Scroll Reveal ── */
.scroll-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);
}

.scroll-reveal[data-revealed="false"] {
    opacity: 1;
    transform: translateY(0);
}

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

    .scroll-reveal[data-revealed="true"] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Hero Animations ── */
@media (prefers-reduced-motion: no-preference) {
    .hero-anim {
        opacity: 0;
        transform: translateY(20px);
        animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .hero-anim:nth-child(1) { animation-delay: 0.1s; }
    .hero-anim:nth-child(2) { animation-delay: 0.25s; }
    .hero-anim:nth-child(3) { animation-delay: 0.4s; }
    .hero-anim:nth-child(4) { animation-delay: 0.55s; }
    .hero-anim:nth-child(5) { animation-delay: 0.7s; }

    @keyframes heroFadeIn {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ── Navbar ── */
#navbar {
    background: transparent;
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(4, 120, 87, 0.1);
    box-shadow: 0 1px 30px rgba(4, 120, 87, 0.06);
}

/* ── Custom Select ── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ── Focus styles ── */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* ── Smooth image loading ── */
img {
    display: block;
}

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

#mobile-menu {
    opacity: 0;
    pointer-events: none;
}

/* ── Thin scrollbar ── */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 6px;
    }
    ::-webkit-scrollbar-track {
        background: #FAF8F0;
    }
    ::-webkit-scrollbar-thumb {
        background: rgba(4, 120, 87, 0.2);
        border-radius: 3px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: rgba(4, 120, 87, 0.4);
    }
}
