/* ================================
   Featured Project Page Styles
   Shared across Residential, Commercial, Site Works

   Theme tokens (--fp-*) are defined in styles.css.
   Body classes below override --fp-* per division.
   ================================ */

/* ================================
   Color Scheme Overrides
   ================================ */
/* Residential - Blue (default) */
.fp-residential {
    --fp-primary: #1a4670;
    --fp-primary-dark: #0a2540;
    --fp-primary-light: #4a8ac2;
    --fp-accent: #6ba3d6;
    --fp-accent-light: #a8cce8;
}

/* Commercial - Red */
.fp-commercial {
    --fp-primary: #8B2635;
    --fp-primary-dark: #5c1a24;
    --fp-primary-light: #b84d5c;
    --fp-accent: #E85D75;
    --fp-accent-light: #f2a0ad;
}

/* Site Works - Green */
.fp-siteworks {
    --fp-primary: #2C6E49;
    --fp-primary-dark: #1e4d33;
    --fp-primary-light: #68B684;
    --fp-accent: #8FBC8F;
    --fp-accent-light: #a8d4a8;
}

/* ================================
   Scrollbar Styling
   ================================ */
body.fp-page::-webkit-scrollbar,
html:has(body.fp-page)::-webkit-scrollbar {
    width: 8px;
}

body.fp-page::-webkit-scrollbar-track,
html:has(body.fp-page)::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

body.fp-page::-webkit-scrollbar-thumb,
html:has(body.fp-page)::-webkit-scrollbar-thumb {
    background: var(--fp-primary);
    border-radius: 10px;
}

body.fp-page::-webkit-scrollbar-thumb:hover,
html:has(body.fp-page)::-webkit-scrollbar-thumb:hover {
    background: var(--fp-primary-light);
}

body.fp-page {
    scrollbar-color: var(--fp-primary) var(--bg-cream);
    scrollbar-width: thin;
}

/* Explicit scrollbar colors per division */
body.fp-commercial::-webkit-scrollbar-thumb,
html:has(body.fp-commercial)::-webkit-scrollbar-thumb {
    background: #8B2635;
}

body.fp-commercial::-webkit-scrollbar-thumb:hover,
html:has(body.fp-commercial)::-webkit-scrollbar-thumb:hover {
    background: #b84d5c;
}

body.fp-commercial {
    scrollbar-color: #8B2635 var(--bg-cream);
}

body.fp-siteworks::-webkit-scrollbar-thumb,
html:has(body.fp-siteworks)::-webkit-scrollbar-thumb {
    background: #2C6E49;
}

body.fp-siteworks::-webkit-scrollbar-thumb:hover,
html:has(body.fp-siteworks)::-webkit-scrollbar-thumb:hover {
    background: #68B684;
}

body.fp-siteworks {
    scrollbar-color: #2C6E49 var(--bg-cream);
}

/* ================================
   Navigation Overrides
   ================================ */
.nav-fp {
    background: rgba(250, 251, 252, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s ease;
}

.nav-fp.scrolled {
    background: rgba(250, 251, 252, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-fp .logo-divider {
    background: linear-gradient(to bottom, transparent, var(--fp-primary), transparent);
}

.nav-fp .logo-tagline {
    color: var(--text-secondary);
}

.nav-cta-fp {
    background: var(--fp-primary-dark) !important;
    border-color: var(--fp-primary-dark) !important;
}

.nav-cta-fp:hover {
    background: var(--fp-primary) !important;
    border-color: var(--fp-primary) !important;
}

.nav-fp .dropdown-item.active .dropdown-title {
    color: var(--fp-primary);
}

.nav-fp .dropdown-item.active .dropdown-desc {
    color: var(--fp-primary-light);
}

.nav-fp .dropdown-item.active::after {
    background: var(--fp-primary);
}

/* Back to home button */
.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.back-to-home:hover {
    color: var(--fp-primary);
}

.back-to-home svg {
    display: block;
    transition: transform 0.3s ease;
}

.back-to-home:hover svg {
    transform: translateX(-4px);
}

.section-label-fp {
    color: var(--fp-primary);
}

/* ================================
   Hero Section (Shorter)
   ================================ */
.fp-hero {
    position: relative;
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Symmetric vertical padding: padding-top includes nav clearance,
       padding-bottom matches the visible "below nav" top padding so
       the flex-centered content lands at true visual center. */
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: calc(var(--nav-height) + 48px);
}

.fp-hero-bg-image {
    /* Batch 11: now an <img> element with fetchpriority="high".
       object-fit + object-position replace background-size/position. */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1);
}

.fp-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(0, 0, 0, 0.75) 0%, 
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.fp-residential .fp-hero-gradient {
    background: linear-gradient(
        135deg, 
        rgba(26, 70, 112, 0.88) 0%, 
        rgba(10, 37, 64, 0.82) 50%,
        rgba(26, 70, 112, 0.8) 100%
    );
}

.fp-commercial .fp-hero-gradient {
    background: linear-gradient(
        135deg, 
        rgba(139, 38, 53, 0.88) 0%, 
        rgba(92, 26, 36, 0.82) 50%,
        rgba(139, 38, 53, 0.8) 100%
    );
}

.fp-siteworks .fp-hero-gradient {
    background: linear-gradient(
        135deg, 
        rgba(44, 110, 73, 0.88) 0%, 
        rgba(30, 77, 51, 0.82) 50%,
        rgba(44, 110, 73, 0.8) 100%
    );
}

.fp-hero .hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 1;
}

.fp-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 40px;
    padding-top: 80px;
}

/* Badge */
.fp-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: fpReveal 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.fp-badge .badge-dot {
    width: 8px;
    height: 8px;
    background: var(--fp-accent-light);
    border-radius: 50%;
    animation: fpPulse 2s ease-in-out infinite;
}

@keyframes fpPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes fpReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fp-hero-title {
    font-family: var(--font-body);
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 700;
    color: white;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(30px);
    animation: fpReveal 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

.fp-hero-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 400;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(20px);
    animation: fpReveal 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

/* ================================
   Project Overview Section
   ================================ */
.fp-overview {
    padding: 100px 0 80px;
    background: var(--bg-cream);
    position: relative;
}

.fp-overview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--fp-accent), var(--fp-primary), var(--fp-accent), var(--fp-primary), var(--fp-accent));
    background-size: 200% 100%;
    animation: fpGradientShift 4s ease-in-out infinite;
}

@keyframes fpGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.fp-overview-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.fp-overview-text {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-top: 32px;
}

.fp-overview-meta {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.fp-meta-item {
    text-align: center;
}

.fp-meta-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fp-primary);
    margin-bottom: 8px;
}

.fp-meta-value {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ================================
   Project Scope Section
   ================================ */
.fp-scope {
    padding: 100px 0;
    background: white;
    position: relative;
    overflow: hidden;
}

.fp-scope::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.fp-scope-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.fp-scope-header {
    position: sticky;
    top: 120px;
}

.fp-scope-header .section-title {
    margin-bottom: 24px;
}

.fp-scope-intro {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.fp-scope-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.fp-scope-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-scope-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

.fp-scope-number {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--fp-primary);
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    flex-shrink: 0;
}

.fp-scope-text {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 500;
    padding-top: 4px;
}

/* ================================
   Gallery Section
   ================================ */
.fp-gallery {
    padding: 100px 0;
    background: var(--bg-cream);
}

.fp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.fp-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-gallery-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

.fp-gallery-item:nth-child(1) { transition-delay: 0s; }
.fp-gallery-item:nth-child(2) { transition-delay: 0.1s; }
.fp-gallery-item:nth-child(3) { transition-delay: 0.2s; }
.fp-gallery-item:nth-child(4) { transition-delay: 0.3s; }
.fp-gallery-item:nth-child(5) { transition-delay: 0.4s; }
.fp-gallery-item:nth-child(6) { transition-delay: 0.5s; }

.fp-gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: unset;
    min-height: 0;
}

.fp-gallery-item.large img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-gallery-item:hover img {
    transform: scale(1.05);
}

.fp-gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* ================================
   View More CTA Section
   ================================ */
.fp-more {
    position: relative;
    padding: 120px 0;
    background: var(--fp-primary-dark);
    overflow: hidden;
}

.fp-more-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}

.fp-more-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.fp-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: var(--fp-accent-light);
}

.fp-shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation: fpFloat 12s ease-in-out infinite;
}

.fp-shape-2 {
    width: 250px;
    height: 250px;
    bottom: -80px;
    left: -60px;
    animation: fpFloat 10s ease-in-out infinite reverse;
}

@keyframes fpFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -20px); }
}

.fp-more-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.fp-more-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--fp-accent-light);
    margin-bottom: 24px;
}

.fp-more-title {
    font-family: var(--font-body);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    color: white;
    line-height: 1.15;
    margin-bottom: 20px;
}

.fp-more-title .accent {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    color: var(--fp-accent-light);
}

.fp-more-subtitle {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.fp-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: white;
    color: var(--fp-primary);
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fp-more-btn:hover {
    background: var(--fp-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.fp-more-btn svg {
    transition: transform 0.3s ease;
}

.fp-more-btn:hover svg {
    transform: translateX(4px);
}

/* ================================
   Contact Section
   ================================ */
.fp-contact {
    padding: 100px 0;
    background: var(--bg-cream);
}

.fp-contact .contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: stretch;
}

.fp-contact .contact-title {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
}

.contact-icon-fp {
    background: rgba(0, 0, 0, 0.04);
    color: var(--fp-primary);
}

.fp-contact .contact-form {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.input-line-fp {
    background: var(--fp-primary);
}

.btn-primary-fp {
    background: var(--fp-primary);
}

.btn-primary-fp:hover {
    background: var(--fp-primary-dark);
}

/* ================================
   Footer
   ================================ */
.footer-fp {
    background: var(--fp-primary-dark);
}

.footer-top-line-fp {
    background: linear-gradient(90deg, var(--fp-accent), var(--fp-primary), var(--fp-accent));
}

.footer-fp .footer-logo .logo-text {
    color: white;
}

.footer-fp .footer-logo .logo-est {
    color: var(--fp-accent-light);
}

.footer-fp .social-links a:hover {
    background: var(--fp-primary);
    border-color: var(--fp-primary);
}

/* ================================
   Lightbox
   ================================ */
.fp-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fp-lightbox.active {
    display: flex;
    opacity: 1;
}

.fp-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.fp-lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fp-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ================================
   Scroll Animations
   ================================ */
.fp-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-fade-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

.fp-fade-up-delay-1 { transition-delay: 0.1s; }
.fp-fade-up-delay-2 { transition-delay: 0.2s; }
.fp-fade-up-delay-3 { transition-delay: 0.3s; }

/* ================================
   Responsive
   ================================ */
@media (max-width: 1024px) {
    .fp-scope-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .fp-scope-header {
        position: static;
    }
    
    .fp-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fp-gallery-item.large {
        grid-column: span 2;
        grid-row: span 1;
        aspect-ratio: 16 / 9;
    }

    .fp-gallery-item.large img {
        position: absolute;
    }
    
    .fp-contact .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .fp-hero {
        min-height: 55vh;
    }
    
    .fp-hero-content {
        padding: 0 24px;
        padding-top: 80px;
    }
    
    .fp-overview,
    .fp-scope,
    .fp-gallery,
    .fp-contact {
        padding: 70px 0;
    }
    
    .fp-more {
        padding: 80px 0;
    }
    
    .fp-overview-meta {
        flex-direction: column;
        gap: 24px;
    }
    
    .fp-overview-desc {
        font-size: 16px;
    }
    
    .fp-gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .fp-gallery-item.large {
        grid-column: span 1;
        aspect-ratio: 4 / 3;
    }
    
    .fp-badge {
        padding: 10px 18px;
        font-size: 12px;
    }

    .fp-more-btn {
        padding: 16px 28px;
        font-size: 14px;
    }

    .fp-more-subtitle {
        font-size: 15px;
    }

    .fp-contact .contact-form {
        padding: 28px;
    }

    .section-title {
        font-size: clamp(28px, 6vw, 40px);
    }
    
    .fp-scope-item {
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .fp-hero {
        min-height: 50vh;
    }

    .fp-hero-content {
        padding: 0 16px;
        padding-top: 70px;
    }

    .fp-hero-subtitle {
        font-size: 16px;
    }

    .fp-overview,
    .fp-scope,
    .fp-gallery,
    .fp-contact {
        padding: 50px 0;
    }

    .fp-more {
        padding: 60px 0;
    }

    .fp-scope-number {
        font-size: 13px;
        min-width: 28px;
        height: 28px;
    }

    .fp-scope-text {
        font-size: 15px;
    }

    .fp-gallery-item {
        aspect-ratio: 4 / 3;
    }

    .fp-gallery-item.large {
        aspect-ratio: 4 / 3;
    }

    .fp-contact .contact-form {
        padding: 20px;
    }

    .fp-more-btn {
        padding: 14px 24px;
        font-size: 13px;
    }

    .fp-badge {
        padding: 8px 14px;
        font-size: 11px;
        letter-spacing: 0.08em;
    }
}
