/* ========================================
   JB Siding Services — Custom Styles
   Classic & Elegant Design System
   ======================================== */

/* --- Custom Properties --- */
:root {
    --color-forest-50: #f0f5f1;
    --color-forest-700: #1B4332;
    --color-cream-50: #faf9f6;
    --color-cream-100: #f5f3ed;
    
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
}

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(27, 67, 50, 0.2);
    color: var(--color-forest-800);
}

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

/* --- Navigation --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--transition-medium);
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.navbar-scrolled .nav-link {
    color: #1B4332 !important;
}

.navbar-scrolled .nav-link::after {
    background: #1B4332 !important;
}

.navbar-scrolled #nav-logo-text,
.navbar-scrolled #nav-logo-sub {
    color: #1B4332 !important;
}

/* --- Service Cards --- */
.service-card {
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.service-card:hover {
    transform: translateY(-4px);
}

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

/* --- Process Steps --- */
.process-step {
    transition: transform var(--transition-medium);
}

.process-step:hover {
    transform: translateY(-4px);
}

/* --- Scroll Reveal Animations --- */
/* These are progressive enhancement — content is visible by default */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
}

/* Mobile navigation links */
.mobile-nav-link {
    transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.mobile-nav-link:hover {
    color: #faf9f6;
    padding-left: 8px;
}

/* --- Form Styles --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* --- Back to Top --- */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

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

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

/* --- Print Styles --- */
@media print {
    nav, #back-to-top, .service-card, .gallery-item {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
