/* ==========================================================================
   CSS Variables - Unified Color Palette & Design Tokens
   ========================================================================== */
:root {
    /* Primary Colors */
    --color-primary: #2f3237;        /* Warm graphite - nav, footer, headings */
    --color-primary-light: #43474d;  /* Lighter graphite for sections */

    /* Brand Colors */
    --color-homes: #54575e;          /* Hobbs Homes - graphite gray */
    --color-homes-accent: #3f434a;   /* Hobbs Homes accent - deeper graphite */
    --color-construction: #2f3237;   /* Hobbs Construction - graphite (matches primary) */
    --color-construction-accent: #d95b2a; /* Hobbs Construction accent - ember orange */

    /* Text Colors */
    --color-text: #33363b;
    --color-text-light: #5e6167;
    --color-text-muted: #9a9da3;

    /* Background Colors */
    --color-bg: #fff;
    --color-bg-alt: #f2f3f4;         /* Light graphite mist */

    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 5rem;

    /* Typography */
    --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-family-heading: 'Space Grotesk', 'Segoe UI', Tahoma, sans-serif;
    --font-size-sm: 0.9rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.15rem;
    --font-size-xl: 1.3rem;
    --font-size-h3: 1.5rem;
    --font-size-h2: 2.5rem;
    --font-size-h1: 3rem;

    /* Layout */
    --max-width: 1200px;
    --border-radius: 10px;
    --border-radius-lg: 12px;

    /* Shadows - soft graphite */
    --shadow-sm: 0 2px 5px rgba(40, 44, 50, 0.08);
    --shadow-md: 0 4px 15px rgba(40, 44, 50, 0.1);
    --shadow-lg: 0 8px 30px rgba(40, 44, 50, 0.14);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--color-text);
}

h1, h2, h3, h4 {
    font-family: var(--font-family-heading);
    line-height: 1.3;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

section {
    padding: var(--space-2xl) var(--space-lg);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
nav {
    background: white;
    color: var(--color-text);
    padding: var(--space-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--color-text);
}

.logo-link:hover {
    opacity: 0.9;
}

.logo-img {
    width: 80px;
    height: auto;
    background: var(--color-bg-alt);
    padding: 0.3rem;
    border-radius: var(--border-radius);
    object-fit: contain;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.logo-title {
    font-size: var(--font-size-xl);
    font-weight: bold;
    letter-spacing: 0.5px;
    color: var(--color-primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-xs);
}

nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
}

nav a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--color-construction-accent);
}

nav a.active {
    color: var(--color-construction-accent);
    border-bottom: 2px solid var(--color-construction-accent);
    padding-bottom: 0.25rem;
}

/* ==========================================================================
   Hero Sections
   ========================================================================== */
.hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.hero--tall {
    min-height: 600px;
}

.hero--short {
    min-height: 300px;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(42, 45, 50, 0.52);
}

.hero__overlay--homes {
    background: rgba(64, 68, 75, 0.48);
}

.hero__overlay--construction {
    background: rgba(42, 45, 50, 0.52);
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.hero__logo {
    width: 140px;
    height: auto;
    margin-bottom: var(--space-md);
}

.hero__logo--bordered {
    border: 3px solid var(--color-construction-accent);
    border-radius: var(--border-radius);
    padding: var(--space-xs);
    background: rgba(96, 125, 139, 0.1);
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: var(--space-sm);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero__subtitle {
    font-size: var(--font-size-xl);
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-construction);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 700;
    transition: background 0.3s, transform 0.2s;
}

.btn:hover {
    background: #22252a;
    transform: translateY(-2px);
}

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

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

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

.btn--construction:hover {
    background: #b8481d;
}

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

.btn--outline:hover {
    background: rgba(255,255,255,0.1);
}

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

.btn--white:hover {
    background: #f0f0f0;
}

.btn--lg {
    font-size: var(--font-size-lg);
    padding: var(--space-sm) var(--space-xl);
}

.btn--full {
    width: 100%;
    text-align: center;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: 20px;
    font-weight: bold;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
}

.section-badge--homes {
    background: rgba(84, 87, 94, 0.14);
    color: var(--color-homes-accent);
}

.section-badge--construction {
    background: rgba(217, 91, 42, 0.14);
    color: var(--color-construction-accent);
}

.section-title {
    font-size: var(--font-size-h2);
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.section-title--white {
    color: white;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
}

.section-subtitle--white {
    color: white;
    opacity: 0.95;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s;
}

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

.card__image {
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card__image--overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.card__image--overlay-homes {
    background: rgba(64, 68, 75, 0.48);
}

.card__image--overlay-construction {
    background: rgba(42, 45, 50, 0.52);
}

.card__body {
    padding: var(--space-lg);
}

.card__body--alt {
    background: var(--color-bg-alt);
}

.card__title {
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   Grids
   ========================================================================== */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--gallery {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ==========================================================================
   Services Grid (kept for backwards compatibility)
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.service-card {
    background: var(--color-bg-alt);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.service-card h3 {
    color: var(--color-construction);
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.filter-chip {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.45rem 1.1rem;
    border: 1px solid #d8d5d1;
    border-radius: var(--border-radius);
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.filter-chip:hover {
    border-color: var(--color-construction-accent);
    color: var(--color-construction-accent);
}

.filter-chip--active {
    background: var(--color-construction-accent);
    border-color: var(--color-construction-accent);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

/* ==========================================================================
   Forms
   ========================================================================== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: var(--font-size-base);
}

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

.form-group select {
    cursor: pointer;
}

.form-error {
    display: block;
    margin-top: var(--space-xs);
    color: #b00020;
    font-size: 0.9rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: white;
    color: var(--color-text);
    text-align: center;
    padding: var(--space-lg);
    border-top: 1px solid #e0e0e0;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-construction-accent);
    text-decoration: none;
    font-weight: 600;
}

.footer-social:hover {
    text-decoration: underline;
}

.service-card a {
    color: var(--color-construction-accent);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-white { color: white; }
.bg-primary { background: #6b6f77; }
.bg-primary-light { background: var(--color-primary-light); }
.bg-homes { background: var(--color-homes); }
.bg-construction { background: #6b6f77; }
.bg-alt { background: var(--color-bg-alt); }
.bg-white { background: white; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ==========================================================================
   Photo Treatments
   ========================================================================== */
.photo-warm {
    filter: sepia(0.18) saturate(1.15) brightness(1.03);
}

/* ==========================================================================
   About Page Styles
   ========================================================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.about-content p {
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   Feature Lists
   ========================================================================== */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: var(--space-xs) 0;
    font-size: 1.05rem;
}

.feature-list--homes li {
    color: var(--color-homes);
}

.feature-list--construction li {
    color: var(--color-construction);
}

/* ==========================================================================
   Message Alerts
   ========================================================================== */
.alert {
    padding: var(--space-sm);
    border-radius: 4px;
    margin-bottom: var(--space-sm);
}

.alert--success {
    background: #d4edda;
    color: #155724;
}

.alert--error {
    background: #f8d7da;
    color: #721c24;
}

/* ==========================================================================
   Two-Column Sections
   ========================================================================== */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: center;
}

.split-section__content {
    padding: var(--space-2xl);
}

.split-section__image {
    height: 100%;
    min-height: 500px;
    background-size: cover;
    background-position: center;
}

/* ==========================================================================
   Property Stats
   ========================================================================== */
.property-stats {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin: var(--space-md) 0;
}

.property-stats__item strong {
    color: var(--color-primary);
    font-size: 1.2rem;
    display: block;
}

.property-stats__item span {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* ==========================================================================
   Price Display
   ========================================================================== */
.price {
    color: var(--color-construction-accent);
    font-weight: bold;
    font-size: 1.6rem;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge--featured {
    background: var(--color-homes-accent);
    color: white;
}

.badge--status {
    background: #e67e22;
    color: white;
}

/* ==========================================================================
   Values Grid (About page)
   ========================================================================== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.values-grid__item {
    text-align: center;
}

.values-grid__item h3 {
    font-size: var(--font-size-h3);
    margin-bottom: var(--space-sm);
}

.values-grid__item p {
    opacity: 0.9;
    line-height: 1.7;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --font-size-h1: 2rem;
        --font-size-h2: 1.8rem;
        --font-size-h3: 1.3rem;
    }

    nav .container {
        position: relative;
        padding: 0 var(--space-sm);
    }

    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: var(--space-sm);
        top: 50%;
        transform: translateY(-50%);
    }

    nav .container > div:first-child {
        padding-right: 3rem;
    }

    nav .container > div:first-child a img {
        width: 40px;
    }

    nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        overflow: hidden;
        z-index: 100;
        box-shadow: var(--shadow-md);
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul a {
        display: block;
        padding: var(--space-sm);
        text-align: center;
    }

    section {
        padding: var(--space-xl) var(--space-sm);
    }

    .container {
        padding: 0 var(--space-sm);
    }

    .hero {
        min-height: 350px;
        padding: var(--space-xl) var(--space-sm);
        overflow: hidden;
    }

    .hero--tall {
        min-height: 400px;
    }

    .hero__title {
        font-size: 2rem;
        word-wrap: break-word;
    }

    .hero__subtitle {
        font-size: 1.1rem;
    }

    .grid--2,
    .split-section {
        grid-template-columns: 1fr;
    }

    .split-section__image {
        min-height: 200px;
    }

    .split-section__content {
        padding: var(--space-lg);
    }
}
