/* ============================================
   Country Boys Heating and Air — Custom Styles
   Premium Dark Luxury Theme
   ============================================ */

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

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

body {
    background-color: #050505;
    color: #f5f5f5;
}

/* Selection */
::selection {
    background: rgba(212, 168, 75, 0.3);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #262626;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #404040;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 168, 75, 0.08), 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, pointer-events 0.3s ease;
}

#mobile-menu.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 5px;
}

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

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top left, rgba(212, 168, 75, 0.03) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* ============================================
   Feature Cards
   ============================================ */
.feature-card {
    position: relative;
    overflow: hidden;
}

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

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

.feature-card:nth-child(1)::after { background: linear-gradient(90deg, transparent, #eac76e, transparent); }
.feature-card:nth-child(2)::after { background: linear-gradient(90deg, transparent, #d6365a, transparent); }
.feature-card:nth-child(3)::after { background: linear-gradient(90deg, transparent, #ff3d8a, transparent); }
.feature-card:nth-child(4)::after { background: linear-gradient(90deg, transparent, #eac76e, transparent); }

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content visible without JS
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    .reveal[data-delay="100"] { transition-delay: 0.1s; }
    .reveal[data-delay="200"] { transition-delay: 0.2s; }
    .reveal[data-delay="300"] { transition-delay: 0.3s; }
    .reveal[data-delay="400"] { transition-delay: 0.4s; }
    .reveal[data-delay="500"] { transition-delay: 0.5s; }
}

/* Hidden state for JS-enhanced reveals (below fold) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Form Styles
   ============================================ */
select option {
    background: #0f0f0f;
    color: #f5f5f5;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(212, 168, 75, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.08) !important;
}

/* ============================================
   Gold shimmer animation for CTA buttons
   ============================================ */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
}

/* ============================================
   Focus visible for accessibility
   ============================================ */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid rgba(212, 168, 75, 0.6);
    outline-offset: 2px;
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    #navbar, #mobile-menu, .reveal-up {
        display: none !important;
    }
}
