/* Alpine Tree Service — Custom Styles */

/* Base Reset & Typography */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Hero Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scrollLine {
    0%, 100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
}

.animate-scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* Hero Background */
.hero {
    position: relative;
}

.hero-bg {
    will-change: transform;
}

/* Navbar */
.nav {
    background: transparent;
    transition: background 0.5s ease, backdrop-filter 0.5s ease;
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

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

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

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

.hamburger-line {
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

#menuToggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

#menuToggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    width: 6px;
}

/* Section Styles */
.section-label {
    position: relative;
    display: inline-block;
}

.section-label::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5a1a;
}

.section-title {
    position: relative;
}

/* Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff5a1a, #ff7e3f);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

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

/* About Section */
.about {
    position: relative;
}

.about-image {
    position: relative;
}

.about-stat {
    z-index: 10;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    position: relative;
}

.gallery-img {
    position: relative;
    overflow: hidden;
}

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

.gallery-item:hover .gallery-img::after {
    opacity: 1;
}

/* CTA Section */
.cta-section {
    position: relative;
}

.cta-bg {
    will-change: transform;
}

/* Contact Form */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #ff5a1a;
    box-shadow: 0 0 0 3px rgba(255, 90, 26, 0.1);
}

.form-input::placeholder {
    color: #4a4a4a;
}

.form-submit {
    position: relative;
    overflow: hidden;
}

.form-submit::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;
}

.form-submit:hover::before {
    left: 100%;
}

/* Footer */
.footer {
    position: relative;
}

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal[data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* Selection Color */
::selection {
    background: rgba(255, 90, 26, 0.3);
    color: #ffffff;
}

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

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

::-webkit-scrollbar-thumb {
    background: #363636;
    border-radius: 4px;
}

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

/* Focus Visible */
:focus-visible {
    outline: 2px solid #ff5a1a;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .nav, .hero-scroll, .cta-section {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
