/* ============================================
   The Green Briar Tree Patch — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
    background: #e07a5f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9664e;
}

/* Hero animations — only for elements below the fold or after initial render */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-anim {
    opacity: 1;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-anim:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-anim:nth-child(3) {
    animation-delay: 0.4s;
}

.hero-anim:nth-child(4) {
    animation-delay: 0.6s;
}

/* Scroll reveal — progressive enhancement, content visible without JS */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal[data-reveal-delay="1"] {
    transition-delay: 0.1s;
}

.reveal[data-reveal-delay="2"] {
    transition-delay: 0.2s;
}

.reveal[data-reveal-delay="3"] {
    transition-delay: 0.3s;
}

.reveal[data-reveal-delay="4"] {
    transition-delay: 0.4s;
}

/* Reduced motion: disable all animations */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .hero-anim {
        animation: none;
    }
    .reveal {
        transition: none;
    }
    .group img {
        transition: none;
    }
}

/* Navigation scroll state */
.nav-scrolled {
    background: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-scrolled .nav-logo-text {
    color: #ffffff !important;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #e07a5f;
    outline-offset: 2px;
}

/* Subtle image hover parallax feel */
.group:hover img {
    transform: scale(1.05);
}

/* Custom selection color */
::selection {
    background: #e07a5f;
    color: #ffffff;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
