/* ===================================
   JPF Building Services — Custom Styles
   Premium Dark Luxury Theme
   =================================== */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(201, 162, 39, 0.3);
    color: #f5e1a0;
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

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

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

/* Navbar Transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(201, 162, 39, 0.1);
}

/* Mobile Menu */
.mobile-menu-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s ease, color 0.3s ease;
}

.mobile-menu-link:hover {
    padding-left: 8px;
}

.mobile-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #c9a227;
    transition: width 0.3s ease;
}

.mobile-menu-link:hover::before {
    width: 4px;
}

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

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

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

/* Gallery */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    border-color: rgba(201, 162, 39, 0.4);
}

/* Testimonial Cards */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a227, transparent);
    transition: width 0.5s ease;
}

.testimonial-card:hover::after {
    width: 80%;
}

/* Form Styling */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

/* Back to Top */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    box-shadow: 0 8px 30px rgba(201, 162, 39, 0.35);
    transform: translateY(-2px);
}

/* ===================================
   Scroll Reveal Animations
   Progressive enhancement: content
   is visible by default; JS adds the
   animated state for supporting browsers.
   =================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.revealed {
        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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ===================================
   Responsive Adjustments
   =================================== */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.2;
    }
}

@media (min-width: 768px) {
    .gallery-item:nth-child(2) {
        grid-row: span 2;
    }
}

/* ===================================
   Gold Shimmer Animation (decorative)
   =================================== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.gold-shimmer {
    background: linear-gradient(
        90deg,
        #c9a227 0%,
        #f5e1a0 25%,
        #c9a227 50%,
        #f5e1a0 75%,
        #c9a227 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ===================================
   Subtle Pulse for Trust Indicators
   =================================== */
@keyframes softPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.trust-indicator {
    animation: softPulse 3s ease-in-out infinite;
}
