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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5eb;
}
::-webkit-scrollbar-thumb {
    background: #d4a888;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9522a;
}

/* Selection */
::selection {
    background: #f5c4b0;
    color: #662515;
}

/* Navbar transition states */
.nav-scrolled {
    background: rgba(253, 251, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(44, 36, 32, 0.08);
}

.nav-scrolled .nav-logo-text {
    color: #2c2420 !important;
}

.nav-scrolled .menu-line {
    background: #2c2420 !important;
}

/* Hero animations - above the fold, always visible by default */
.hero-badge {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll reveal animations - below the fold only, progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .approach-step,
    .why-card,
    .testimonial-card,
    .service-eyebrow,
    .approach-eyebrow,
    .contact-eyebrow {
        opacity: 1;
        transform: translateY(0);
    }

    .service-card {
        transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.5s ease, box-shadow 0.4s ease;
    }

    .approach-step {
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .why-card {
        transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease;
    }

    .testimonial-card {
        transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.4s ease;
    }

    .service-eyebrow,
    .approach-eyebrow,
    .contact-eyebrow {
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
}

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

.mobile-link {
    transition: color 0.3s ease;
}

/* Line animation for mobile menu button */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

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

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

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

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c9522a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth image loading */
img {
    background-color: #f3e8d0;
}
