/* =========================================================================
   Base Styles & Resets
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

:root {
    --bg-color: #ffffff;       /* Pure white background */
    --text-color: #1a1a1a;     /* Dark gray/black text */
    --accent-color: #000000;   /* Pure black accents */
    --secondary-bg: #f9f9f9;   /* Slightly light gray background */
    --grid-gap: 20px;
    --transition-speed: 0.4s;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-elegant: 'Playfair Display', serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1.6rem;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
    color: var(--text-color);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Base button */
.btn {
    display: inline-block;
    border: 1px solid var(--accent-color);
    color: var(--bg-color);
    background-color: var(--accent-color);
    padding: 1.2rem 3rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn:hover, .btn:focus {
    background-color: transparent;
    color: var(--accent-color);
    outline: none;
}

/* =========================================================================
   Typography & Sections
   ========================================================================= */
.section-title h2 {
    font-size: 3.6rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.section-title p {
    font-size: 1.8rem;
    color: #666;
    font-weight: 300;
}

section {
    padding: 10rem 0;
}

/* =========================================================================
   Navigation
   ========================================================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 2rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 48px; /* Adjusted to fit nicely */
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    left: 0;
    bottom: -5px;
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover::after, .nav-links a:focus::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--accent-color);
    transition: 0.3s;
}

/* =========================================================================
   Hero Section
   ========================================================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    /* Subtle radial gradient to create depth for white theme */
    background: radial-gradient(circle at center, #ffffff 0%, #f0f0f0 100%);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 2rem;
}

.hero h1 {
    font-size: clamp(4rem, 8vw, 10rem);
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.hero p {
    font-size: clamp(1.4rem, 2vw, 2.2rem);
    font-weight: 300;
    color: #555;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-inline: auto;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.6;
    animation: bounce 2s infinite ease-in-out;
}

.scroll-indicator p {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
}

.scroll-indicator .line {
    width: 1px;
    height: 40px;
    background-color: var(--accent-color);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* =========================================================================
   Gallery Section
   ========================================================================= */
.gallery-section {
    background-color: var(--bg-color);
}

.grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: var(--grid-gap);
    margin-top: 5rem;
}

/* Complex layout logic using grid spanning for dynamic look */
@media (min-width: 900px) {
    .grid-gallery {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 350px;
    }
    
    .gallery-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .gallery-item:nth-child(2) {
        grid-column: span 1;
        grid-row: span 1;
    }
    .gallery-item:nth-child(5) {
        grid-column: span 2;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    background-color: var(--secondary-bg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.overlay {
    position: absolute;
    bottom: -100px; /* Hidden initially */
    left: 0;
    width: 100%;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    transition: bottom 0.4s ease;
    text-align: left;
}

.gallery-item:hover .overlay, .gallery-item:focus .overlay {
    bottom: 0;
}

.overlay h3 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.overlay p {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ddd;
}

/* =========================================================================
   About Section
   ========================================================================= */
.about-section {
    background-color: var(--secondary-bg);
}

.flex-about {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 4rem;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.8rem;
    color: #555;
    margin-bottom: 2rem;
}

.about-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.geometric-shape {
    width: 300px;
    height: 300px;
    border: 2px solid var(--accent-color);
    position: relative;
}

.geometric-shape::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    background-color: #ddd;
    z-index: -1;
    transition: transform var(--transition-speed) ease;
}

.about-visual:hover .geometric-shape::before {
    transform: translate(10px, 10px);
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
    background-color: #fafafa;
    padding: 8rem 0 2rem;
    border-top: 1px solid #eaeaea;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid #eaeaea;
}

.footer-brand h2 {
    font-size: 2.4rem;
    text-transform: uppercase;
}

/* Override the span logo color if there is one in the footer */
.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-brand img {
    height: 40px;
    object-fit: contain;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.footer-brand p {
    color: #555;
    margin-top: 1rem;
}

.footer-links h3 {
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: #555;
}

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

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    color: #777;
    font-size: 1.2rem;
}

/* =========================================================================
   Contact Page Styles
   ========================================================================= */
.contact-page-section {
    padding-top: 15rem; /* Push down for fixed nav */
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.contact-wrap {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.contact-wrap h1 {
    font-size: clamp(3rem, 5vw, 6rem);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.contact-wrap p.desc {
    font-size: 2rem;
    color: #555;
    margin-bottom: 4rem;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-info-item h3 {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
}

.contact-info-item a, .contact-info-item p {
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--accent-color);
    position: relative;
    display: inline-block;
    align-self: flex-start;
}

.contact-info-item a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    left: 0;
    bottom: -2px;
    transition: width var(--transition-speed) ease;
}

.contact-info-item a:hover::after {
    width: 100%;
}

/* =========================================================================
   Lightbox Modal
   ========================================================================= */
.lightbox {
    display: flex;
    visibility: hidden;
    opacity: 0;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    visibility: visible;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border: 1px solid #333;
    opacity: 0;
    transform: scale(0.95);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.lightbox.active .lightbox-content {
    opacity: 1;
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s;
    user-select: none;
    z-index: 10000;
}

/* Project Filter Buttons */
.filter-btn.active {
    background-color: var(--text-color) !important;
    color: var(--bg-color) !important;
}

/* Category Summary Styles */
.category-summary {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    animation: fadeIn 0.5s ease forwards;
}

.category-summary h3 {
    font-size: 24px;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.category-summary p {
    font-size: 16px;
    color: var(--text-color);
    opacity: 0.8;
}

.hide {
    display: none !important;
}

.close-lightbox:hover {
    color: #aaa;
}

#lightbox-caption {
    position: absolute;
    bottom: 30px;
    color: #fff;
    font-size: 1.6rem;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================================================
   Animations & Responsive
   ========================================================================= */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: #ffffff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        border-bottom: 1px solid #eaeaea;
        box-shadow: 0 10px 10px -10px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .flex-about {
        flex-direction: column;
    }

    .hero h1 { font-size: 4rem; }
    
    .geometric-shape {
        width: 250px;
        height: 250px;
    }
}

/* =========================================================================
   Category Hero Redesign
   ========================================================================= */
.category-hero {
    display: flex;
    width: 100vw;
    margin-left: calc(-50vw + 50%);  /* Full screen width break out */
    height: 400px;
    margin-bottom: 60px;
}

.category-btn-large {
    flex: 1;
    border: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.category-btn-large::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    transition: transform 0.8s ease, opacity 0.4s ease;
    filter: brightness(0.7);
}

.category-btn-large.residential::before {
    background-image: url('assets/media__1774103846404.jpg');
}

.category-btn-large.commercial::before {
    background-image: url('assets/media__1774088344718.jpg');
}

.category-btn-large:hover::before {
    transform: scale(1.1);
    opacity: 0.8;
}

.category-btn-large .category-text-large {
    position: relative;
    z-index: 2;
    font-family: var(--font-elegant);
    color: #ffffff;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 0.4rem;
    text-transform: uppercase;
    transition: letter-spacing 0.5s ease;
}

.category-btn-large:hover .category-text-large {
    letter-spacing: 0.8rem;
}

/* Active state for the new large buttons */
.category-btn-large.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #ffffff;
    z-index: 3;
}

@media (max-width: 768px) {
    .category-hero {
        flex-direction: column;
        height: 600px;
    }
    .category-btn-large .category-text-large {
        font-size: 2.5rem;
    }
}
