/* Base styles and custom properties */
:root {
    --color-emerald-950: #022c22;
    --color-emerald-900: #064e3b;
    --color-emerald-800: #065f46;
    --color-emerald-700: #047857;
    --color-emerald-600: #059669;
    --color-emerald-500: #10b981;
    --color-emerald-400: #34d399;
    --color-emerald-300: #6ee7b7;
    --color-emerald-200: #a7f3d0;
    --color-emerald-100: #d1fae5;
    --color-emerald-50: #ecfdf5;
    --color-cream-50: #fefdf8;
    --color-cream-100: #fefce8;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: var(--color-emerald-200);
    color: var(--color-emerald-950);
}

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

::-webkit-scrollbar-track {
    background: var(--color-cream-50);
}

::-webkit-scrollbar-thumb {
    background: var(--color-emerald-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-emerald-500);
}

/* Scroll reveal base - content is visible by default */
.menu-reveal,
.about-reveal,
.specialties-reveal,
.visit-reveal {
    opacity: 1;
    transform: none;
}

/* Only animate when JS adds the class and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .menu-reveal.animated,
    .about-reveal.animated,
    .specialties-reveal.animated,
    .visit-reveal.animated {
        animation: fadeUp 0.8s ease forwards;
    }
}

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

/* Nav link underline animation */
.nav-link {
    position: relative;
}

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

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

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

/* Hero decorative float animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

/* Image hover zoom */
img {
    transition: transform 0.6s ease;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-emerald-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* 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;
    }
}

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

/* Navbar background transition */
#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

#navbar.scrolled .nav-link {
    color: var(--color-emerald-800);
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Card hover effects */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Stagger animation delays for menu reveals */
.specialties-reveal .group:nth-child(1) {
    transition-delay: 0ms;
}

.specialties-reveal .group:nth-child(2) {
    transition-delay: 100ms;
}

.specialties-reveal .group:nth-child(3) {
    transition-delay: 200ms;
}

@media (prefers-reduced-motion: no-preference) {
    .specialties-reveal .group {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .specialties-reveal.animated .group {
        opacity: 1;
        transform: translateY(0);
    }
    
    .specialties-reveal.animated .group:nth-child(1) { transition-delay: 0ms; }
    .specialties-reveal.animated .group:nth-child(2) { transition-delay: 100ms; }
    .specialties-reveal.animated .group:nth-child(3) { transition-delay: 200ms; }
}
