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

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

body {
    margin: 0;
    min-height: 100vh;
}

/* Scroll line animation */
@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Stat card float animation */
@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(6px); }
}

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

.stat-card:nth-child(1) {
    animation: float1 6s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation: float2 7s ease-in-out infinite;
    animation-delay: -2s;
}

.stat-card:nth-child(3) {
    animation: float3 5.5s ease-in-out infinite;
    animation-delay: -1s;
}

/* Mobile menu */
.mobile-link {
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }

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

/* Menu line animation */
.menu-line {
    display: block;
}

/* Scroll reveal — progressive enhancement, only below fold */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* Subtle image hover */
img {
    display: block;
    max-width: 100%;
}

/* Selection color */
::selection {
    background-color: rgba(6, 78, 59, 0.15);
    color: #064e3b;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    border-radius: 4px;
}

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

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.close {
    opacity: 0;
    pointer-events: none;
}

/* Smooth header transition */
#header-inner {
    will-change: background-color, padding, box-shadow;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a7f3d0;
}
