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

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

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ─── Navbar ─── */
.nav-text {
    /* Default state — will be overridden by JS based on scroll */
    color: #1a1a1a;
}

nav.scrolled .nav-text,
nav.scrolled .mobile-link {
    color: #1a1a1a;
}

nav.scrolled .nav-link {
    color: #1a1a1a;
}

nav.scrolled a.nav-link:hover {
    color: #2e4a22;
}

nav.scrolled .mobile-link {
    color: #1a1a1a;
}

/* ─── Hero Animations ─── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.hero-subtitle {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-headline {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-desc {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.hero-cta {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

/* ─── Scroll Indicator ─── */
@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(200%);
    }
}

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

/* ─── Menu Tabs ─── */
.menu-tab {
    background: transparent;
    color: #4a5a4a;
    border: 1px solid #d4dfce;
}

.menu-tab:hover {
    background: #e3eddd;
    border-color: #c7dbbe;
}

.menu-tab.active {
    background: #2e4a22;
    color: #FAF9F6;
    border-color: #2e4a22;
}

.menu-tab.active:hover {
    background: #3a5c2a;
    border-color: #3a5c2a;
}

/* ─── Scroll Reveal ─── */
.reveal-text {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-image {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* When JS adds the animated state */
.reveal-text.animated {
    opacity: 0;
    transform: translateY(32px);
}

.reveal-image.animated {
    opacity: 0;
    transform: translateY(24px);
}

/* Reduced motion — never animate */
@media (prefers-reduced-motion: reduce) {
    .reveal-text,
    .reveal-image {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero-subtitle,
    .hero-headline,
    .hero-desc,
    .hero-cta {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    
    .scroll-line {
        animation: none !important;
    }
}

/* ─── Gallery Hover ─── */
.gallery-item {
    overflow: hidden;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(30, 60, 20, 0);
    transition: background 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    background: rgba(30, 60, 20, 0.1);
}

/* ─── Mobile Menu ─── */
#mobile-menu {
    pointer-events: none;
}

#mobile-menu.open {
    pointer-events: auto;
}

/* ─── Contact Form ─── */
input:focus,
textarea:focus {
    border-color: #4f7a3a !important;
    box-shadow: 0 0 0 3px rgba(79, 122, 58, 0.1);
}

/* ─── Utility ─── */
::selection {
    background: #c7dbbe;
    color: #1a2e14;
}

/* ─── Responsive adjustments ─── */
@media (max-width: 767px) {
    .font-serif.text-5xl {
        font-size: 2.5rem;
    }
    
    .font-serif.text-4xl {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .font-serif.text-6xl {
        font-size: 3.75rem;
    }
}
