/* Base & Utilities */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Hero Animations — above the fold, always visible */
.hero-anim {
    animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal — progressive enhancement, only below fold */
.reveal {
    /* Default: visible for accessibility when JS is disabled */
}

.reveal.revealed {
    animation: revealUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition states */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 118, 110, 0.08), 0 4px 24px rgba(0, 0, 0, 0.04);
}

.navbar-scrolled .nav-link {
    color: rgb(71, 85, 105);
}

.navbar-scrolled .nav-link:hover {
    color: rgb(15, 118, 110);
}

.navbar-transparent .brand {
    color: rgb(254, 243, 199);
}

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

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

::-webkit-scrollbar-track {
    background: rgb(245, 243, 235);
}

::-webkit-scrollbar-thumb {
    background: rgb(203, 213, 214);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(148, 163, 184);
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid rgb(20, 184, 166);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-anim {
        animation: none;
        opacity: 1;
    }

    .reveal.revealed {
        animation: none;
    }

    .group:hover img,
    .group.hover-scale:hover img {
        transform: none;
    }
}

/* Select styling */
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='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Print styles */
@media print {
    header, footer, .reveal {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
