/* ========================================
   Naturewood Knoll Tree Farm — Custom Styles
   ======================================== */

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Prevent flash of unstyled content on load */
body {
    opacity: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection color */
::selection {
    background: #99f6e4;
    color: #134e4a;
}

/* ========================================
   Scroll Reveal Animations
   Progressive enhancement — only active
   when JS runs and user prefers motion
   ======================================== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Default state is visible — JS adds .revealed */
.scroll-reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered delays */
.scroll-reveal[data-reveal="1"] { transition-delay: 0.05s; }
.scroll-reveal[data-reveal="2"] { transition-delay: 0.1s; }
.scroll-reveal[data-reveal="3"] { transition-delay: 0.15s; }
.scroll-reveal[data-reveal="4"] { transition-delay: 0.2s; }
.scroll-reveal[data-reveal="5"] { transition-delay: 0.25s; }
.scroll-reveal[data-reveal="6"] { transition-delay: 0.3s; }

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-blur-md;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-serif {
    color: #1e293b;
}

#navbar.scrolled a:not([class*="border"]) {
    color: #475569;
}

#navbar.scrolled a:not([class*="border"]):hover {
    color: #0d9488;
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
}
.mobile-link:last-child {
    border-bottom: none;
}
.mobile-link:hover {
    color: #0d9488;
}

/* Mobile menu animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
#mobileMenu.open {
    max-height: 400px;
    padding: 0;
}

/* ========================================
   Hero
   ======================================== */
#hero {
    position: relative;
}

/* Subtle parallax on hero image */
#hero img {
    will-change: transform;
}

/* ========================================
   Buttons & Links
   ======================================== */
a {
    text-decoration: none;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Form Elements
   ======================================== */
input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ========================================
   Image lazy loading
   ======================================== */
img {
    loading: lazy;
}

/* ========================================
   Reduced motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal[data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .group:hover img {
        transform: none;
    }
}

/* ========================================
   Tablet & up
   ======================================== */
@media (min-width: 768px) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    #navbar, #mobileMenu, .scroll-reveal[data-reveal] {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
