/* ============================================
   Oxendine & Son Roofing Co — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f2140;
}
::-webkit-scrollbar-thumb {
    background: #c8a45e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4b76a;
}

/* Selection */
::selection {
    background: #c8a45e;
    color: #0a1628;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scrollLine {
    0%, 100% {
        transform: scaleY(1);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(0.5);
        opacity: 0.2;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
    transform-origin: top;
}

/* ============================================
   Navbar
   ============================================ */

.nav-link {
    position: relative;
}

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Mobile Menu
   ============================================ */

.mobile-link {
    position: relative;
}

.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#bar1.open {
    transform: rotate(45deg) translate(4px, 4px);
}

#bar2.open {
    opacity: 0;
}

#bar3.open {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================
   Service Cards
   ============================================ */

.service-card {
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #c8a45e, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* ============================================
   Process Steps
   ============================================ */

.process-step {
    position: relative;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    right: -2rem;
    width: calc(100% - 80px);
    height: 1px;
    background: linear-gradient(90deg, #c8a45e, transparent);
    opacity: 0.3;
}

@media (max-width: 767px) {
    .process-step:not(:last-child)::after {
        display: none;
    }
}

/* ============================================
   Gallery Items
   ============================================ */

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

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

/* ============================================
   Form Styles
   ============================================ */

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #c8a45e !important;
    box-shadow: 0 0 0 3px rgba(200, 164, 94, 0.15);
}

/* ============================================
   Back to Top
   ============================================ */

#back-to-top.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

#back-to-top:hover {
    transform: translateY(-2px);
}

/* ============================================
   Reveal on Scroll
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 1023px) {
    .font-serif.text-5xl {
        font-size: 3.5rem;
    }
}

@media (max-width: 639px) {
    .font-serif.text-4xl {
        font-size: 2.5rem;
    }
    
    section {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    header, footer, #back-to-top, .service-card, .gallery-item {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
