/* ============================================================
   Rehome Depot — Stylesheet
   Palette: warm cream, walnut, terracotta accent, deep charcoal
   ============================================================ */

:root {
    --cream: #f5f1e8;
    --cream-dark: #ebe4d2;
    --walnut: #6b4f3a;
    --walnut-dark: #4a3526;
    --terracotta: #c4744a;
    --terracotta-dark: #a85f37;
    --charcoal: #2d2820;
    --text: #3a342a;
    --text-muted: #6b6358;
    --border: #d6cdb7;
    --white: #fdfbf6;
    --shadow: 0 2px 12px rgba(45, 40, 32, 0.08);
    --shadow-lg: 0 8px 28px rgba(45, 40, 32, 0.16);
    --radius: 4px;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--cream);
}

h1, h2, h3 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--charcoal);
    line-height: 1.2;
    margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1rem; }

a { color: var(--terracotta-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--walnut-dark); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* -------------------- Header -------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

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

.logo-image {
    height: 54px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.25rem 0;
}

.main-nav a:hover { color: var(--terracotta-dark); }

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--terracotta);
    transform: scaleX(0);
    transition: transform 0.2s;
}

.main-nav a:hover::after { transform: scaleX(1); }

.main-nav a.active {
    color: var(--terracotta-dark);
}

.main-nav a.active::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--charcoal);
    transition: 0.2s;
}

/* -------------------- Hero -------------------- */

.hero {
    padding: 6rem 0 5rem;
    background:
        linear-gradient(rgba(245, 241, 232, 0.92), rgba(235, 228, 210, 0.95)),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 30px,
            rgba(107, 79, 58, 0.03) 30px,
            rgba(107, 79, 58, 0.03) 60px
        );
    text-align: center;
}

.hero-inner {
    max-width: 800px;
}

.hero h1 {
    margin-bottom: 1rem;
}

.hero-eyebrow,
.page-hero-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--terracotta-dark);
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--terracotta);
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* -------------------- Buttons -------------------- */

.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--terracotta-dark);
    border-color: var(--terracotta-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--walnut-dark);
    border-color: var(--walnut);
}

.btn-secondary:hover {
    background: var(--walnut);
    color: var(--cream);
}

/* -------------------- Page hero (non-home pages) -------------------- */

.page-hero {
    padding: 3.5rem 0 3rem;
    background:
        linear-gradient(rgba(245, 241, 232, 0.95), rgba(235, 228, 210, 0.95)),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 30px,
            rgba(107, 79, 58, 0.03) 30px,
            rgba(107, 79, 58, 0.03) 60px
        );
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    margin-bottom: 0.5rem;
}

.page-hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0;
}

/* -------------------- Sections -------------------- */

.section {
    padding: 5rem 0;
}

.section-about { background: var(--white); }
.section-gallery { background: var(--cream); }
.section-contact { background: var(--white); }
.section-featured { background: var(--cream); }
.section-about-teaser { background: var(--white); }

.section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.section h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--terracotta);
    margin: 0.75rem auto 0;
}

.section-intro {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 1rem auto 2.5rem;
}

.section-heading-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.section-heading-row h2 {
    margin: 0;
    text-align: left;
}

.section-heading-row h2::after {
    margin: 0.6rem 0 0;
}

.link-cta {
    color: var(--terracotta-dark);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.link-cta:hover {
    color: var(--walnut-dark);
}

/* -------------------- Featured (home) -------------------- */

.section-featured .section-intro {
    margin-top: 1.5rem;
}

/* -------------------- About teaser (home) -------------------- */

.teaser-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.teaser-grid h2 {
    text-align: left;
}

.teaser-grid h2::after {
    margin: 0.6rem 0 0;
}

.teaser-grid .lead {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.teaser-stats {
    display: grid;
    gap: 1rem;
}

.stat {
    background: var(--cream);
    border-left: 4px solid var(--terracotta);
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.9rem;
    row-gap: 0.1rem;
    align-items: center;
}

.stat-icon {
    grid-row: 1 / 3;
    font-size: 1.6rem;
    color: var(--walnut);
    line-height: 1;
}

.stat strong {
    color: var(--charcoal);
    font-size: 1rem;
}

.stat span:not(.stat-icon) {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* -------------------- CTA band (home) -------------------- */

.section-cta {
    background: var(--walnut);
    color: var(--cream);
    padding: 4rem 0;
    text-align: center;
}

.cta-inner h2 {
    color: var(--cream);
    margin-bottom: 0.75rem;
}

.cta-inner h2::after {
    background: var(--terracotta);
    margin: 0.75rem auto 0;
}

.cta-inner p {
    color: var(--cream-dark);
    font-size: 1.05rem;
    margin-bottom: 1.75rem;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

/* -------------------- About-page CTA row -------------------- */

.about-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

/* -------------------- Contact note -------------------- */

.contact-note {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem;
}

/* -------------------- About -------------------- */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2.5rem;
    align-items: start;
}

.about-text .lead {
    font-size: 1.15rem;
    color: var(--charcoal);
    line-height: 1.7;
}

.services-list {
    background: var(--cream);
    border-left: 4px solid var(--terracotta);
    padding: 1.75rem 2rem;
    border-radius: var(--radius);
}

.services-list h3 {
    margin-top: 0;
    color: var(--walnut-dark);
}

.services-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.services-list li:last-child { border-bottom: none; }

.services-list strong {
    display: block;
    color: var(--charcoal);
    margin-bottom: 0.2rem;
}

.services-list span {
    color: var(--text-muted);
    font-size: 0.93rem;
}

/* -------------------- Gallery -------------------- */

.gallery-filters {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--walnut);
    color: var(--walnut-dark);
}

.filter-btn.active {
    background: var(--walnut);
    border-color: var(--walnut);
    color: var(--cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.gallery-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 0;
    grid-column: 1 / -1;
}

.gallery-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 0;
    grid-column: 1 / -1;
    font-style: italic;
}

.gallery-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--cream-dark);
    overflow: hidden;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

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

.gallery-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gallery-badge.sold {
    background: var(--charcoal);
    color: var(--cream);
}

.gallery-badge.hold {
    background: var(--terracotta);
    color: var(--white);
}

.gallery-card-body {
    padding: 1rem 1.1rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-card-title {
    font-family: Georgia, serif;
    font-weight: 600;
    color: var(--charcoal);
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
}

.gallery-card-price {
    color: var(--terracotta-dark);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.gallery-card-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0;
}

/* -------------------- Contact -------------------- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 2.5rem;
    margin-top: 2.5rem;
    align-items: stretch;
}

.contact-info h3 {
    margin-top: 0;
    color: var(--walnut-dark);
    font-size: 1.4rem;
}

.contact-line {
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.contact-line strong {
    color: var(--charcoal);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 0.2rem;
}

.contact-map {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    min-height: 320px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
    display: block;
}

/* -------------------- Footer -------------------- */

.site-footer {
    background: var(--charcoal);
    color: var(--cream);
    padding: 2rem 0;
    text-align: center;
}

.footer-inner p { margin: 0.25rem 0; }
.footer-tag {
    font-family: Georgia, serif;
    font-style: italic;
    color: var(--cream-dark);
    opacity: 0.8;
}

/* -------------------- Lightbox -------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(45, 40, 32, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.lightbox[hidden] { display: none; }

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.lightbox-content {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--cream-dark);
    min-height: 300px;
}

.lightbox-info {
    padding: 2rem;
}

.lightbox-info h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.lightbox-price {
    color: var(--terracotta-dark);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.lightbox-status {
    margin-top: 1rem;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
}

.lightbox-status.sold {
    background: var(--charcoal);
    color: var(--cream);
}

.lightbox-status.hold {
    background: var(--terracotta);
    color: var(--white);
}

.lightbox-status.available {
    background: #d8e9d4;
    color: #3d5a35;
}

/* -------------------- Responsive -------------------- */

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .main-nav.open { display: flex; }

    .main-nav a {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
    }

    .main-nav a:last-child { border-bottom: none; }

    .hero { padding: 4rem 0 3.5rem; }
    .section { padding: 3.5rem 0; }

    .about-grid,
    .contact-grid,
    .teaser-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-heading-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .lightbox-content {
        grid-template-columns: 1fr;
    }

    .lightbox-content img {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn { text-align: center; }
}
