/* ============================================
   HORTON LANDSCAPING — Custom Styles
   Classic & Elegant | Burgundy + Blush
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #7f1c31;
    color: #fff8f9;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f1;
}
::-webkit-scrollbar-thumb {
    background: #b92b47;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9c2139;
}

/* --- Navbar Transition --- */
#navbar.scrolled {
    background-color: rgba(254, 253, 251, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(127, 28, 49, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* --- Mobile Menu --- */
.mobile-nav-link {
    position: relative;
    font-size: 1.25rem;
}

/* --- Service Cards --- */
.service-card {
    will-change: transform;
}

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

/* --- Portfolio Items --- */
.portfolio-item {
    will-change: transform;
}

/* --- Testimonial Cards --- */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
}

/* --- Scroll Reveal Animations --- */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Animation classes applied by JS only */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(30px);
    }

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

    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }

    .reveal-left.revealed {
        opacity: 1;
        transform: translateX(0);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }

    .reveal-right.revealed {
        opacity: 1;
        transform: translateX(0);
    }

    .reveal-scale {
        opacity: 0;
        transform: scale(0.95);
    }

    .reveal-scale.revealed {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Decorative Divider --- */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, #f5a8b8, transparent);
}

/* --- Form Focus States --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(185, 43, 71, 0.1);
}

/* --- Button Ripple Effect --- */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* --- Print Styles --- */
@media print {
    #navbar, #back-to-top, .menu-line {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}

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

/* --- Mobile Menu Active State --- */
body.menu-open {
    overflow: hidden;
}

/* --- Menu Lines Animation --- */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

/* --- Staggered Animation Delays --- */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }

/* --- Back to Top Button --- */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* --- Image Placeholder Fallback --- */
img {
    background: linear-gradient(135deg, #fce7eb 0%, #faf0dc 100%);
}
