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

body {
    font-family: 'Nunito', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-serif {
    font-family: 'DM Serif Display', Georgia, serif;
}

/* ===== Navbar ===== */
.navbar-scrolled #navbar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.navbar-scrolled .nav-link {
    color: #2a2d33;
}

.navbar-scrolled .nav-logo-text {
    color: #1e2025;
}

.navbar-scrolled #menuBtn {
    background: #f6f6f7;
}

.navbar-scrolled #menuIcon {
    stroke: #2a2d33;
}

/* Default nav (transparent) */
#navbar {
    background: transparent;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.nav-link:hover {
    color: #E8655B;
}

#menuBtn {
    background: rgba(255, 255, 255, 0.15);
}

#menuIcon {
    stroke: white;
}

/* ===== Mobile Menu ===== */
.mobile-menu-open #mobileMenu {
    max-height: 500px;
    opacity: 1;
}

.mobile-link {
    position: relative;
}

.mobile-link:hover {
    color: #E8655B;
}

/* ===== Service Cards ===== */
.service-card {
    will-change: transform;
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    will-change: transform;
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal-hidden,
    .reveal-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a1a5ad;
}

/* ===== Selection ===== */
::selection {
    background: #E8655B;
    color: white;
}

/* ===== Focus Styles ===== */
:focus-visible {
    outline: 2px solid #E8655B;
    outline-offset: 2px;
}

/* ===== Smooth transitions for all interactive elements ===== */
a, button {
    transition: all 0.3s ease;
}

/* ===== Image optimization ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== Utility: prevent layout shift on 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='%235c626c' 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;
}
