/* ===== Custom Styles for Hartzler Door & Gate ===== */

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navigation ===== */
.nav-text-color {
    color: #fdfbf7;
}

.nav-accent-color {
    color: #6ee7b7;
}

.nav-link {
    color: rgba(253, 251, 247, 0.8);
}

/* Scrolled state */
nav.scrolled {
    background: rgba(2, 44, 34, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

nav.scrolled .nav-text-color {
    color: #fdfbf7;
}

nav.scrolled .nav-link {
    color: rgba(253, 251, 247, 0.85);
}

/* ===== Buttons ===== */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-secondary {
    transition: all 0.3s ease;
}

/* ===== Service Cards ===== */
.service-card {
    opacity: 1;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Hidden initial state for reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.divider-ornament::before,
.divider-ornament::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #a7f3d0, transparent);
}

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

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

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

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

/* ===== Selection ===== */
::selection {
    background: #047857;
    color: #fdfbf7;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Image hover transitions ===== */
img {
    transition: transform 0.5s ease;
}

/* ===== Form 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='%23064e3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ===== Back to top ===== */
#backToTop.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    img {
        transition: none !important;
    }
    
    .service-card,
    .reveal {
        transform: none !important;
    }
}
