/* ============================================
   Kingman Salvage — Custom Styles
   Classic & Elegant · Deep Navy + Warm Gold
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(200, 164, 94, 0.3);
    color: #fff;
}

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

.hero-elem {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.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; }

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C8A45E, transparent);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

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

/* ---- Navbar ---- */
.nav-scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(200, 164, 94, 0.1);
}

.nav-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ---- Mobile Menu ---- */
.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);
    width: 1.5rem;
}

/* ---- Custom Select ---- */
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='%23C8A45E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ---- Input Focus States ---- */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 1px rgba(200, 164, 94, 0.2);
}

/* ---- Button Ripple Effect ---- */
button, a {
    position: relative;
    overflow: hidden;
}

/* ---- Subtle Grain Overlay ---- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ---- Gold Accent Line Animation ---- */
@keyframes expandWidth {
    from { width: 0; }
    to { width: 3rem; }
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 768px) {
    .service-card {
        transform: translateY(0);
        transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    }

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

/* ---- Smooth Scroll Offset for Fixed Nav ---- */
section[id] {
    scroll-margin-top: 80px;
}
