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

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f0ea;
}
::-webkit-scrollbar-thumb {
    background: #b9d1bc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb892;
}

/* Selection */
::selection {
    background: #dce8df;
    color: #1a3a2a;
}

/* Navigation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #1a3a2a;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-link {
    position: relative;
    display: block;
    padding: 8px 0;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #1a3a2a;
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 40px;
}

/* Floating cards */
.floating-card {
    animation: float 4s ease-in-out infinite;
}
.floating-card-delayed {
    animation: float 4s ease-in-out infinite;
    animation-delay: 2s;
}

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

/* Scroll reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: content always visible if JS is disabled */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Menu item hover */
.group:hover .text-forest-700 {
    color: #1a3a2a;
}

/* Button focus */
a:focus-visible, button:focus-visible {
    outline: 2px solid #3d7a48;
    outline-offset: 2px;
    border-radius: 9999px;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Hero decorative elements */
.hero-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-line 1.5s ease forwards;
}

@keyframes draw-line {
    to { stroke-dashoffset: 0; }
}

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