/* Base styles and custom components */
:root {
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-950: #022c22;
    --cream-50: #fdfcf8;
    --cream-100: #faf8f0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f0;
}
::-webkit-scrollbar-thumb {
    background: #047857;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #065f46;
}

/* Navigation transitions */
.nav-text {
    color: #065f46;
    transition: color 0.3s ease;
}

.nav-subtext {
    color: #059669;
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
    color: #022c22;
}

#navbar.scrolled .nav-subtext {
    color: #047857;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #047857;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-nav-link {
    position: relative;
    padding-left: 16px;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #047857;
}

/* Floating card animations */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
}

.floating-card:nth-child(4) {
    animation-delay: -1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

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

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

/* Button focus styles */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    
    .reveal {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .service-card::before {
        transition: none;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .floating-card {
        display: none;
    }
    
    .floating-card:nth-child(4) {
        display: none;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .floating-card:nth-child(4) {
        display: none;
    }
}

/* Print styles */
@media print {
    nav, #back-to-top, .floating-card {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
