/* Base & Reset */
*, *::before, *::after {
    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: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f5f0;
}
::-webkit-scrollbar-thumb {
    background: #93bf93;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4d7f4d;
}

/* Selection */
::selection {
    background: #bdd8bd;
    color: #111c11;
}

/* Scroll Line Animation */
@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

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

/* Reveal Animations */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    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);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Navbar */
.navbar-scrolled {
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(40, 67, 40, 0.08);
}

.navbar-scrolled .nav-logo-text {
    color: #111c11;
}

.navbar-scrolled .nav-logo-sub {
    color: #4d7f4d;
}

.navbar-scrolled .nav-link {
    color: #315231;
}

.navbar-scrolled .nav-link:hover {
    color: #284328;
}

.navbar-scrolled .menu-line {
    background: #111c11;
}

.nav-link {
    transition: color 0.3s ease;
}

/* Mobile Menu */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

.mobile-menu-open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu Button */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

.menu-open .menu-line:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
    opacity: 0;
}

/* FAQ */
.faq-item {
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(40, 67, 40, 0.06);
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
}

.faq-item.active .faq-content {
    max-height: 300px;
}

/* Form */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #c8d4c8;
}

/* Button ripple on focus */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #4d7f4d;
    outline-offset: 2px;
}

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

/* Utility */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}
