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

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

body {
    overflow-x: hidden;
}

/* Scroll Reveal - Progressive Enhancement: only active when JS runs */
.scroll-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);
}

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

/* Hero animations - only for hero elements, not blocking content */
.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s forwards;
}

.hero-tagline {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

.hero-buttons {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(5, 46, 22, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Selection */
::selection {
    background: #166534;
    color: #fefdf8;
}

/* 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;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Focus visible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}
