/* ============================================
   GRIMES GREENHOUSE — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF6F3;
}
::-webkit-scrollbar-thumb {
    background: #D99182;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B05044;
}

/* Selection color */
::selection {
    background: #7B2D3A;
    color: #FDF8F6;
}

/* ============================================
   NAVIGATION
   ============================================ */
#navbar.scrolled {
    background: rgba(58, 15, 22, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

#navbar.scrolled .font-sans {
    color: rgba(253, 248, 246, 0.9) !important;
}

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

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.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.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

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

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reduced motion - content always visible */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .animate-pulse {
        animation: none;
    }
}

/* Progressive enhancement: JS adds .revealed class */
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default hidden state for JS-enhanced reveal (only active when JS runs) */
.scroll-reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */
.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #F5A8B8, transparent);
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ============================================
   INPUT FOCUS EFFECTS
   ============================================ */
input:focus, textarea:focus {
    box-shadow: 0 0 0 4px rgba(123, 45, 58, 0.08);
}

/* ============================================
   TESTIMONIAL SECTION
   ============================================ */
.conversation-quote {
    position: relative;
}

/* ============================================
   FORM STYLES
   ============================================ */
#contactForm button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 40px rgba(123, 45, 58, 0.3);
}

#contactForm button[type="submit"]:active {
    transform: translateY(0);
}

/* ============================================
   MAP OVERLAY
   ============================================ */
.map-section {
    position: relative;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
:focus-visible {
    outline: 2px solid #7B2D3A;
    outline-offset: 2px;
}

/* ============================================
   RESPONSIVE FINE-TUNING
   ============================================ */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (min-width: 1024px) {
    /* Subtle hover lift on nav logo */
    #navbar a[href="#hero"]:hover {
        transform: scale(1.02);
    }
}
