*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(27, 67, 50, 0.15);
    color: #1B4332;
}

/* Navbar transitions */
#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

#navbar.scrolled .nav-link,
#navbar.scrolled a {
    color: #1B4332 !important;
}

#navbar.scrolled .border-current\/30 {
    border-color: rgba(27, 67, 50, 0.3) !important;
}

/* Hero animations */
.hero-title span {
    animation: fadeUp 1s ease forwards;
}
.hero-title span:nth-child(1) { animation-delay: 0.3s; }
.hero-title span:nth-child(2) { animation-delay: 0.5s; }
.hero-title span:nth-child(3) { animation-delay: 0.7s; }

.hero-subtitle {
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.1s;
}

.hero-desc {
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.9s;
}

.hero-cta {
    animation: fadeUp 1s ease forwards;
    animation-delay: 1.1s;
}

.hero-scroll-indicator {
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll reveal */
.reveal-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Mobile menu */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* Service card stagger */
.service-card {
    transition: background-color 0.5s ease, transform 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAF6F0;
}
::-webkit-scrollbar-thumb {
    background: #c5d8c9;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb893;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal-section {
        opacity: 1;
        transform: none;
    }
}
