/* ============================================
   RV Ventures — Custom Styles
   ============================================ */

/* Base reset & smooth scroll */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background: #235723;
    color: #FAFAF6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #FAFAF6;
}

::-webkit-scrollbar-thumb {
    background: #96c496;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #235723;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: rgba(250, 250, 246, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    border-bottom-color: #e3efe3;
    box-shadow: 0 1px 20px rgba(35, 87, 35, 0.06);
}

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

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

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

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

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

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #235723, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ============================================
   Area Cards
   ============================================ */
.area-card {
    position: relative;
}

.area-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #235723;
    transition: width 0.5s ease;
}

.area-card:hover::after {
    width: 60%;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — only when JS runs)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* ============================================
   Form select styling
   ============================================ */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2396c496' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

/* ============================================
   Input focus states
   ============================================ */
input:focus, textarea:focus, select:focus {
    border-bottom-color: #235723 !important;
}

/* ============================================
   Vertical text utility (hero scroll indicator)
   ============================================ */
.writing-vertical-rl {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 767px) {
    #hero {
        min-height: auto;
        padding: 6rem 0 4rem;
    }

    .lg\:col-start-7 {
        grid-column-start: auto;
    }

    .lg\:col-span-6 {
        grid-column: auto;
    }
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    nav, #contact-form, button, iframe {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        color: black !important;
    }
}
