/* ============================================
   CARPENTRY - Warm Wood-Inspired Design
   Layout: Earthy tones, natural textures, craftsman feel
   ============================================ */

:root {
    --cp-bg: #fefcf8;
    --cp-bg-secondary: #f5f0e8;
    --cp-bg-card: #ffffff;
    --cp-primary: #92400e;
    --cp-primary-light: #b45309;
    --cp-secondary: #365314;
    --cp-accent: #0f766e;
    --cp-dark: #292524;
    --cp-text: #44403c;
    --cp-text-secondary: #78716c;
    --cp-text-muted: #a8a29e;
    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Source Sans Pro', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--cp-bg);
    color: var(--cp-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.cp-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
    background: transparent;
}

.cp-header.scrolled {
    background: rgba(254, 252, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    padding: 16px 0;
}

.cp-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cp-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cp-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--cp-primary), var(--cp-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.cp-logo-text {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--cp-dark);
}

.cp-nav {
    display: flex;
    gap: 32px;
}

.cp-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--cp-text-secondary);
    transition: color 0.2s;
}

.cp-nav a:hover { color: var(--cp-primary); }

.cp-phone {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--cp-primary);
    font-weight: 600;
}

.cp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cp-btn-primary {
    background: var(--cp-primary);
    color: white;
}

.cp-btn-primary:hover {
    background: var(--cp-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(146, 64, 14, 0.3);
}

/* ===== HERO - Woodwork Craftsmanship Showcase ===== */
.cp-hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 90px 0 50px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fdfcf8 0%, #f5f0e8 100%);
}

/* Wood grain background pattern */
.cp-hero-bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 60px,
            rgba(139, 90, 43, 0.1) 60px,
            rgba(139, 90, 43, 0.1) 62px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 200px,
            rgba(139, 90, 43, 0.05) 200px,
            rgba(139, 90, 43, 0.05) 204px
        );
    animation: woodGrain 30s linear infinite;
}

@keyframes woodGrain {
    0% { background-position: 0 0; }
    100% { background-position: 62px 204px; }
}

.cp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(253, 252, 248, 0.3) 0%, rgba(253, 252, 248, 0.85) 50%, rgba(253, 252, 248, 1) 100%);
}

/* Top row */
.cp-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.cp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #8B5A2B, #A0522D);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.3);
}

.cp-hero-phone {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--cp-dark);
    font-weight: 600;
    padding: 10px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.cp-hero-phone:hover {
    background: var(--cp-primary);
    color: white;
    transform: translateY(-2px);
}

/* Main hero content */
.cp-hero-main {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Wood types showcase - vertical stack */
.cp-hero-woods {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cp-wood-card {
    background: white;
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 2px solid transparent;
    transition: all 0.35s ease;
}
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.cp-wood-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(139, 90, 43, 0.2);
    border-color: #8B5A2B;
}

.cp-wood-swatch {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: transform 0.35s ease;
}

.cp-wood-card:hover .cp-wood-swatch {
    transform: rotate(-8deg) scale(1.1);
}

.cp-wood-swatch {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
}

.cp-swatch-oak {
    background: linear-gradient(135deg, #D4A574, #C4956A);
}

.cp-swatch-walnut {
    background: linear-gradient(135deg, #5D4037, #4E342E);
}

.cp-swatch-mahogany {
    background: linear-gradient(135deg, #8B4513, #722F10);
}

.cp-swatch-ash {
    background: linear-gradient(135deg, #E8DCC8, #D4C8B0);
}

.cp-wood-info h3 {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--cp-dark);
    margin-bottom: 2px;
}

.cp-wood-info p {
    font-size: 11px;
    color: var(--cp-text-secondary);
}

/* Hero content */
.cp-hero-content {
    padding-left: 20px;
}

.cp-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1.1;
    color: var(--cp-dark);
    margin-bottom: 20px;
}

.cp-hero-title .highlight {
    color: var(--cp-primary);
}

.cp-hero-subtitle {
    font-size: 17px;
    color: var(--cp-text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 500px;
}

/* Trust indicators */
.cp-hero-trust {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.cp-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--cp-text);
}

.cp-trust-icon {
    width: 24px;
    height: 24px;
    background: var(--cp-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* CTA buttons */
.cp-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cp-btn-outline {
    background: transparent;
    border: 2px solid var(--cp-primary);
    color: var(--cp-primary);
}

.cp-btn-outline:hover {
    background: var(--cp-primary);
    color: white;
}

/* Stats bar at bottom */
.cp-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.08);
    position: relative;
    z-index: 2;
}

.cp-stat {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.cp-stat-number {
    font-family: var(--font-heading);
    font-size: 32px;
    color: var(--cp-primary);
    font-weight: 600;
}

.cp-stat-label {
    font-size: 13px;
    color: var(--cp-text-secondary);
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 968px) {
    .cp-hero-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .cp-hero-woods { order: 2; }
    
    .cp-hero-content { order: 1; padding-left: 0; }
    
    .cp-hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .cp-hero-top { flex-direction: column; gap: 16px; text-align: center; }
    
    .cp-hero-woods { grid-template-columns: 1fr; }
    
    .cp-hero-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    
    .cp-stat { padding: 16px 12px; }
    
    .cp-stat-number { font-size: 26px; }
}

/* ===== SECTION ===== */
.cp-section {
    padding: 100px 0;
}

.cp-section-alt {
    background: var(--cp-bg-secondary);
}

.cp-section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 60px;
}

.cp-section-eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--cp-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.cp-section-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 44px);
    color: var(--cp-dark);
    margin-bottom: 16px;
}

.cp-section-desc {
    font-size: 16px;
    color: var(--cp-text-secondary);
}

/* ===== SERVICES ===== */
.cp-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cp-service-card {
    padding: 32px;
    background: var(--cp-bg-card);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.cp-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.cp-service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(146, 64, 14, 0.1), rgba(180, 83, 9, 0.1));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.cp-service-card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--cp-dark);
    margin-bottom: 12px;
}

.cp-service-card p {
    font-size: 14px;
    color: var(--cp-text-secondary);
    line-height: 1.6;
}

/* ===== SERVICES - TABBED LAYOUT ===== */
.cp-tabs {
    margin-top: 48px;
}

.cp-tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid rgba(0,0,0,0.06);
    padding-bottom: 0;
}

.cp-tab-btn {
    padding: 16px 24px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--cp-text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.cp-tab-btn:hover {
    color: var(--cp-primary);
}

.cp-tab-btn.active {
    color: var(--cp-primary);
    border-bottom-color: var(--cp-primary);
}

.cp-tab-panels {
    background: var(--cp-bg-card);
    border-radius: 20px;
    padding: 32px;
}

.cp-tab-panel {
    display: none;
}

.cp-tab-panel.active {
    display: block;
}

.cp-tab-content {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cp-tab-content:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cp-tab-content:first-child {
    padding-top: 0;
}

.cp-tab-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.cp-tab-text h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--cp-dark);
    margin-bottom: 8px;
}

.cp-tab-text p {
    font-size: 14px;
    color: var(--cp-text-secondary);
    line-height: 1.7;
}

/* Hide original grid - replaced by tabs */
.cp-services-grid {
    display: none !important;
}

/* ===== PROJECTS ===== */
.cp-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cp-project {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--cp-bg-secondary);
}

.cp-project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cp-project:hover img {
    transform: scale(1.1);
}

.cp-project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(41, 37, 36, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s;
}

.cp-project:hover .cp-project-overlay {
    opacity: 1;
}

.cp-project-overlay h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: white;
}

/* ===== TESTIMONIALS ===== */
.cp-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cp-testimonial {
    padding: 32px;
    background: var(--cp-bg-card);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.cp-testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    color: var(--cp-primary);
    font-size: 18px;
}

.cp-testimonial-quote {
    font-size: 15px;
    color: var(--cp-text);
    line-height: 1.7;
    margin-bottom: 24px;
    position: relative;
}

.cp-testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cp-testimonial-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--cp-primary), var(--cp-primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.cp-testimonial-info h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--cp-dark);
    margin-bottom: 2px;
}

.cp-testimonial-info span {
    font-size: 13px;
    color: var(--cp-text-muted);
}

/* ===== CTA ===== */
.cp-cta {
    padding: 100px 0;
    background: var(--cp-dark);
    text-align: center;
    position: relative;
}

.cp-cta-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 48px);
    color: white;
    margin-bottom: 16px;
}

.cp-cta-desc {
    font-size: 18px;
    color: var(--cp-text-muted);
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.cp-cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.cp-btn-white {
    background: white;
    color: var(--cp-primary);
}

.cp-btn-white:hover {
    background: var(--cp-bg-secondary);
    transform: translateY(-2px);
}

.cp-btn-ghost {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.cp-btn-ghost:hover {
    background: white;
    color: var(--cp-dark);
}

/* ===== FOOTER ===== */
.cp-footer {
    padding: 60px 0 40px;
    background: var(--cp-bg-secondary);
}

.cp-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.cp-footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cp-footer-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--cp-primary), var(--cp-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.cp-footer-logo-text {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--cp-dark);
}

.cp-footer-text {
    font-size: 14px;
    color: var(--cp-text-muted);
}

.cp-footer-links {
    display: flex;
    gap: 24px;
}

.cp-footer-links a {
    font-size: 14px;
    color: var(--cp-text-secondary);
    transition: color 0.2s;
}

.cp-footer-links a:hover { color: var(--cp-primary); }

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Service Areas ===== */
.cp-areas {
    padding: 80px 0;
    background: var(--cp-white);
}

.cp-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.cp-area-item {
    padding: 24px;
    background: var(--cp-light);
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cp-area-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.cp-area-item h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--cp-primary);
    margin-bottom: 12px;
}

.cp-area-item p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--cp-text);
    margin: 0;
}

.cp-areas-note {
    text-align: center;
    margin-top: 32px;
    padding: 16px;
    background: var(--cp-light);
    border-radius: 8px;
    color: var(--cp-text);
    font-size: 14px;
}

/* ===== FAQ ===== */
.cp-faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cp-faq-item {
    background: var(--cp-white);
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    overflow: hidden;
}

.cp-faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--cp-dark);
    text-align: left;
    transition: background 0.2s;
}

.cp-faq-question:hover {
    background: rgba(0,0,0,0.02);
}

.cp-faq-question span {
    flex: 1;
    padding-right: 16px;
}

.cp-faq-icon {
    flex-shrink: 0;
    color: var(--cp-primary);
    transition: transform 0.3s;
}

.cp-faq-item.active .cp-faq-icon {
    transform: rotate(180deg);
}

.cp-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.cp-faq-answer p {
    padding: 0 24px 20px;
    color: var(--cp-text);
    line-height: 1.7;
    margin: 0;
}

.cp-faq-item.active .cp-faq-answer {
    max-height: 200px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .cp-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cp-hero-visual { display: none; }
    
    .cp-hero-subtitle { margin-left: auto; margin-right: auto; }
    
    .cp-hero-actions { justify-content: center; }
    
    .cp-features-list { align-items: center; }
    
    .cp-services-grid { grid-template-columns: repeat(2, 1fr); }
    
    .cp-projects-grid { grid-template-columns: repeat(2, 1fr); }
    
    .cp-testimonials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .cp-nav { display: none; }
    
    .cp-phone { display: none; }
    
    .cp-services-grid,
    .cp-projects-grid { grid-template-columns: 1fr; }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--cp-primary);
    outline-offset: 2px;
}