/* ========== Base & Typography ========== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #86efac;
    color: #052e16;
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

/* ========== Scroll Reveal ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ========== Service Cards ========== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #166534, #22c55e);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ========== Navbar ========== */
.nav-scrolled {
    background-color: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(22, 101, 52, 0.08);
}

.nav-scrolled #nav-logo-text,
.nav-scrolled .nav-link {
    color: #1a1a1a !important;
}

.nav-scrolled #nav-subtitle {
    color: #166534 !important;
}

/* ========== Mobile Menu ========== */
.mobile-menu-link {
    position: relative;
}

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #166534;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mobile-menu-link:hover::after {
    width: 80%;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #86efac;
}

/* ========== Focus Styles ========== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* ========== Responsive Utilities ========== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* ========== Print Styles ========== */
@media print {
    nav, .mobile-menu, #contact-form, .animate-bounce {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .service-card {
        break-inside: avoid;
    }
}
