/* Base & Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ee;
}
::-webkit-scrollbar-thumb {
    background: #9cc58e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #528a44;
}

/* Hero Animations */
@keyframes heroSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.hero-subtitle {
    animation: heroSlideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-headline {
    animation: heroSlideUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-desc {
    animation: heroSlideUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-cta {
    animation: heroSlideUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.floating-card {
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* Marquee */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-track {
    animation: marquee 30s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

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

.floating-card {
    animation: float 4s ease-in-out infinite, fadeInUp 1s ease forwards;
    animation-delay: 1.2s, 0s;
    opacity: 0;
}

/* Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(49, 86, 41, 0.1);
}

#navbar.scrolled .nav-logo {
    color: #1a2e16;
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

/* Menu button active state */
.menu-line:nth-child(3) {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Selection */
::selection {
    background: #c5dfba;
    color: #1a2e16;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #528a44;
    outline-offset: 2px;
}

/* Image loading */
img {
    display: block;
    max-width: 100%;
}

/* Smooth image transitions */
img:hover {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Form focus states */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(156, 197, 142, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        max-width: 100%;
    }
}
