/* 
   Heritage Construction - Robert Carpentry Inspired Premium Theme
   Designed to replicate the high-end, clean, wide, image-first design of robertcarpentry.com
*/

/* -----------------------------------------
   1. Design System & CSS Variables
----------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400&family=Raleway:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');

:root {
    /* Color Palette matching Robert Carpentry (Monochrome luxury with brand logo gold accents) */
    --color-primary: #111111;        /* Deep rich black */
    --color-secondary: #1a1a1a;      /* Slate charcoal card backgrounds */
    --color-accent: #c0b0a0;         /* Heritage gold/bronze logo accent */
    --color-accent-hover: #a89888;   /* Darker bronze */
    --color-light: #ffffff;          /* Pure clean white background */
    --color-muted: #f7f7f7;          /* Soft light gray divider sections */
    --color-text-dark: #111111;      /* High contrast black body text */
    --color-text-muted: #666666;     /* Muted slate for helper copy */
    --color-white: #ffffff;
    --color-border: #e5e5e5;
    --color-border-dark: #222222;

    /* Fonts (Matching Robert Carpentry) */
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Lato', sans-serif;

    /* Width & Animations */
    --container-max-width: 1300px;
    --transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* -----------------------------------------
   2. Reset & Global Styles
----------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-light);
}
::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-hover);
}

body {
    font-family: var(--font-body);
    background-color: var(--color-light);
    color: var(--color-text-dark);
    line-height: 1.8;
    overflow-x: hidden;
}

/* Typography (Clean, tracked-out Raleway uppercase) */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1.3;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 200;
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 2rem;
    position: relative;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 400;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    font-weight: 300;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* Buttons (Solid, thick bordered minimal look) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 2.8rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid var(--color-primary);
    cursor: pointer;
    background-color: transparent;
    color: var(--color-primary);
    transition: var(--transition-smooth);
}

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

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
}

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

.btn-accent {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
}

.btn-accent:hover {
    background-color: transparent;
    color: var(--color-accent);
}

/* Helper Components */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 7rem 0;
    border-bottom: 1px solid var(--color-border);
}

.section-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-bottom: none;
}

.section-dark h2, .section-dark h3 {
    color: var(--color-white);
}

.section-dark p {
    color: rgba(255, 255, 255, 0.7);
}

/* -----------------------------------------
   3. Header & Navigation (Symmetrical Centered Logo)
----------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #f0efed; /* Matching logo edge color exactly */
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 0; /* Tighter padding for larger logo */
    transition: var(--transition-smooth);
}

.site-header.scrolled {
    padding: 0.2rem 0;
    background-color: #f0efed;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.header-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
}

.nav-side {
    display: block;
}

.nav-left {
    justify-self: start;
}

.nav-right {
    justify-self: end;
}

.nav-menu-split {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 3.5rem;
}

.nav-link {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-text-dark);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover {
    color: var(--color-accent);
}

/* Header Dropdown Menu */
.nav-dropdown-wrapper {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background-color: #f0efed; /* Matches logo background average */
    border: 1px solid var(--color-border);
    padding: 0.8rem 0;
    min-width: 240px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

/* Arrow indicator on the dropdown */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background-color: #f0efed;
    border-top: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.nav-dropdown-menu li {
    width: 100%;
    text-align: center;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    transition: var(--transition-smooth);
}

.nav-dropdown-menu a:hover {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--color-accent);
}

/* Mobile Submenu Styling */
.mob-sublink a {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted) !important;
    padding-left: 1.5rem;
}

/* Centered Readable Logo */
.logo-wrapper-centered {
    justify-self: center;
    padding: 0 3rem;
}

.logo-img-centered {
    height: 190px;  /* Enlarged logo for maximum readability */
    width: auto;
    max-width: 320px;
    object-fit: contain;
    transition: var(--transition-smooth);
    display: block;
}

.site-header.scrolled .logo-img-centered {
    height: 130px;  /* Large but compact on scroll */
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    justify-self: end;
    z-index: 1002;
}

.nav-toggle-box {
    width: 26px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nav-toggle-inner {
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition-smooth);
}

/* Mobile Fullscreen Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #f0efed; /* Mobile menu matches header background */
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 1001;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-list {
    list-style: none;
    text-align: center;
}

.mobile-nav-list li {
    margin-bottom: 2.5rem;
}

.mobile-nav-list .nav-link {
    font-size: 1.5rem;
}

/* Hamburger open state icon */
.nav-toggle.open .nav-toggle-inner:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open .nav-toggle-inner:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open .nav-toggle-inner:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* -----------------------------------------
   4. Hero Slideshow/Slider (Squarespace Feel)
----------------------------------------- */
.hero-slider-container {
    height: 85vh;
    position: relative;
    overflow: hidden;
    margin-top: 210px; /* Offset to clear the larger enlarged centered header */
    background-color: var(--color-primary);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(60%);
}

.slide-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    z-index: 3;
}

.slide-inner-box {
    max-width: 800px;
    padding: 0 2rem;
}

.slide-title {
    color: var(--color-white);
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 200;
}

.slide-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    font-weight: 300;
    margin-bottom: 2.5rem;
}

/* Slider Indicators */
.slider-nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.slider-dot.active {
    background-color: var(--color-white);
    transform: scale(1.2);
}

/* -----------------------------------------
   5. Overview/Intro Section (Robert Carpentry Style)
----------------------------------------- */
.overview-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: flex-start;
}

.overview-left h2 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.overview-left p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--color-text-dark);
}

.overview-right {
    background-color: var(--color-muted);
    padding: 3rem;
    border: 1px solid var(--color-border);
}

.overview-info-block {
    margin-bottom: 2rem;
}

.overview-info-block:last-child {
    margin-bottom: 0;
}

.overview-info-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.overview-info-val {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-primary);
}

.overview-info-val a:hover {
    color: var(--color-accent);
}

/* -----------------------------------------
   6. What We Do Section
----------------------------------------- */
.whatwedo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.whatwedo-left h3 {
    margin-bottom: 2rem;
    font-weight: 500;
}

.whatwedo-list {
    margin-top: 2rem;
    list-style: none;
}

.whatwedo-list li {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.whatwedo-list li::after {
    content: '+';
    color: var(--color-accent);
}

.whatwedo-img-box {
    border: 10px solid var(--color-muted);
    overflow: hidden;
}

.whatwedo-img-box img {
    width: 100%;
    transition: var(--transition-smooth);
}

.whatwedo-img-box:hover img {
    transform: scale(1.04);
}

/* -----------------------------------------
   7. Services Visual Grid (Residential, Commercial, Hospitality)
----------------------------------------- */
.services-section-title {
    text-align: center;
    margin-bottom: 5rem;
}

.services-visual-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.services-visual-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    text-align: center;
    transition: var(--transition-smooth);
}

.services-visual-img-box {
    height: 350px;
    overflow: hidden;
}

.services-visual-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.services-visual-card:hover .services-visual-img {
    transform: scale(1.05);
}

.services-visual-content {
    padding: 2.5rem 1.5rem;
}

.services-visual-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.services-visual-card p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* -----------------------------------------
   8. Squarespace Style Lead Form (Work With Us)
----------------------------------------- */
.form-section {
    max-width: 700px;
    margin: 0 auto;
}

.form-title {
    text-align: center;
    margin-bottom: 4rem;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group-squarespace {
    margin-bottom: 2.5rem;
}

.form-group-squarespace label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.form-input-sq, .form-select-sq, .form-textarea-sq {
    width: 100%;
    background-color: var(--color-muted);
    border: 1px solid var(--color-border);
    padding: 1.1rem 1.25rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-primary);
    outline: none;
    transition: var(--transition-smooth);
}

.form-input-sq:focus, .form-select-sq:focus, .form-textarea-sq:focus {
    background-color: var(--color-white);
    border-color: var(--color-primary);
}

.form-textarea-sq {
    min-height: 150px;
    resize: vertical;
}

/* -----------------------------------------
   9. Footer (Squarespace Style)
----------------------------------------- */
.site-footer-sq {
    background-color: #f0efed; /* Matching header background color */
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    padding: 5rem 0 3rem;
    text-align: center;
}

.footer-logo-sq {
    max-height: 70px; /* Enlarge footer logo too */
    margin-bottom: 2rem;
}

.footer-services-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 0 auto 3rem;
    max-width: 800px;
}

.footer-services-row a {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    transition: var(--transition-smooth);
}

.footer-services-row a:hover {
    color: var(--color-accent);
}

.footer-sep {
    color: var(--color-accent);
    font-weight: 300;
}

.footer-designer-credit {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-designer-credit a {
    font-weight: 700;
    color: var(--color-primary);
    transition: var(--transition-smooth);
}

.footer-designer-credit a:hover {
    color: var(--color-accent);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin-bottom: 2.5rem;
}

.footer-social-link {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-primary);
}

.footer-social-link:hover {
    color: var(--color-accent);
}

.footer-copy-sq {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* -----------------------------------------
   9b. Build Progression Gallery
----------------------------------------- */
.progression-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.progression-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    transition: var(--transition-smooth);
}

.progression-img-box {
    height: 250px;
    overflow: hidden;
}

.progression-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.progression-card:hover .progression-img {
    transform: scale(1.04);
}

.progression-content {
    padding: 2rem 1.5rem;
    text-align: center;
}

.progression-step {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 0.75rem;
}

.progression-card h4 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progression-card p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .progression-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* -----------------------------------------
   9c. Renovation Capabilities Grid
----------------------------------------- */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 2rem;
}

.capability-card {
    background-color: var(--color-light);
    border: 1px solid var(--color-border);
    padding: 3.5rem 3rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.capability-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05);
    border-color: var(--color-accent);
}

.capability-card h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
    color: var(--color-primary);
}

.capability-card p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .capabilities-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .capability-card {
        padding: 2.5rem 2rem;
    }
}

/* -----------------------------------------
   10. Responsive Design (Mobile / Tablet)
----------------------------------------- */
@media (max-width: 1024px) {
    .section {
        padding: 5rem 0;
    }
    .overview-grid, .whatwedo-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .services-visual-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 1.2rem 0;
    }
    .header-container {
        grid-template-columns: 1fr auto; /* Two columns on mobile */
    }
    .logo-wrapper-centered {
        justify-self: start;
        padding: 0;
    }
    .logo-img-centered {
        height: 60px;
    }
    .site-header.scrolled .logo-img-centered {
        height: 50px;
    }
    .nav-side {
        display: none; /* Hide desktop split nav */
    }
    .nav-toggle {
        display: block; /* Show hamburger toggle */
    }
    
    .hero-slider-container {
        margin-top: 90px;
        height: 60vh !important; /* Force readable 60vh hero height on mobile screens */
    }
    
    .slide-inner-box {
        padding: 0 1.5rem;
    }
    
    .slide-title {
        font-size: 2.2rem !important; /* Scale down titles for legibility */
        margin-bottom: 1rem;
    }
    
    .slide-desc {
        font-size: 0.95rem !important; /* Scale down description text */
        margin-bottom: 1.75rem;
        line-height: 1.5;
    }
    
    .services-visual-grid {
        grid-template-columns: 1fr;
    }
    .form-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* -----------------------------------------
   11. Floating WhatsApp Button
----------------------------------------- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

/* Animation for subtle breathing effect */
@keyframes whatsapp-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.whatsapp-float {
    animation: whatsapp-bounce 3s infinite ease-in-out;
}

.whatsapp-float:hover {
    animation: none; /* Stop bounce on hover */
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-icon {
        width: 26px;
        height: 26px;
    }
}
