/* ============================================
   CP Gillaspie Hauling & Tree Service
   Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #2d4a2d;
    color: #fafaf8;
}

/* Navbar */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(45, 74, 45, 0.1);
}

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

.nav-scrolled .menu-line {
    background-color: #1f331f;
}

/* Hero Animations */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Line Animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Service Cards */
.service-card {
    position: relative;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #2d4a2d, #6fa36f);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Mobile Menu */
.mobile-menu-active {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

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

.mobile-menu-active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-active .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-active .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-active .mobile-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu-active .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* Menu Button Animation */
.menu-open .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

.menu-open .menu-line:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Gallery Image Hover */
.aspect-square {
    position: relative;
    overflow: hidden;
}

.aspect-square::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 18, 10, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.aspect-square:hover::after {
    opacity: 1;
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 1px #2d4a2d;
}

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

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

::-webkit-scrollbar-thumb {
    background: #9bc29b;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6fa36f;
}

/* Responsive */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}
