/* =========================================================
   The Townes at Congers Creek — stylesheet
   Mobile-first; desktop styles under the max-width query below.
   ========================================================= */

:root {
    --color-primary: #1f3d2f;
    --color-primary-dark: #142018;
    --color-accent: #c9a15a;
    --color-accent-dark: #a9803e;
    --color-cream: #faf7f0;
    --color-white: #ffffff;
    --color-text: #2a2a28;
    --color-text-muted: #5c5c58;
    --color-border: #e4ddcc;

    --font-heading: 'Jost', 'Segoe UI', sans-serif;
    --font-body: 'Source Serif 4', Georgia, serif;

    --max-width: 1160px;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(20, 32, 24, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.65;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    line-height: 1.2;
    margin: 0 0 .5em;
}

h2 { font-size: 1.9rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a { color: var(--color-primary); }

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

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

.container.narrow { max-width: 760px; }

.section { padding: 64px 0; }
.section.alt { background: var(--color-cream); }

.section-sub {
    color: var(--color-text-muted);
    margin-top: -.5em;
    margin-bottom: 2em;
    max-width: 640px;
}
.model-home-address-note,
.location-note { max-width: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    padding: 13px 26px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: .95rem;
    letter-spacing: .02em;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: var(--color-accent);
    color: var(--color-primary-dark);
}
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,.8);
    color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,.15); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    text-decoration: none;
    line-height: 1.1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.brand-phase-tag {
    display: none;
    font-family: var(--font-heading);
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-accent-dark);
    font-weight: 700;
    white-space: nowrap;
    border-left: 1px solid var(--color-border);
    padding-left: 10px;
}
.brand-name {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary-dark);
    font-size: 1.15rem;
}
.brand-phase {
    display: block;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-accent-dark);
    font-weight: 600;
}

@media (min-width: 480px) {
    .brand-phase-tag { display: block; }
}

.nav-toggle {
    width: 40px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 0;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--color-primary-dark);
    border-radius: 2px;
}

.primary-nav {
    position: fixed;
    top: 61px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
}
.primary-nav.open { max-height: 480px; }
.primary-nav a {
    padding: 14px 20px;
    text-decoration: none;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 500;
    border-top: 1px solid var(--color-border);
}
.primary-nav a.nav-cta {
    color: var(--color-accent-dark);
    font-weight: 700;
}

/* ---------- Hero ---------- */
.hero {
    background-color: var(--color-primary-dark);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 90px 0 70px;
}
.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}
.eyebrow {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .8rem;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: .75em;
}
.hero h1 {
    color: #fff;
    font-size: 2.1rem;
    max-width: 720px;
}
.hero-sub {
    max-width: 560px;
    font-size: 1.05rem;
    color: #eef0ea;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 1.5em;
}

/* ---------- Intro ---------- */
.intro { padding: 56px 0 16px; }
.intro p { color: var(--color-text-muted); }

/* ---------- Homes ---------- */
.homes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.home-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.home-photo {
    display: block;
    width: 100%;
    height: auto;
    background: var(--color-cream);
}
.home-card-body {
    padding: 22px;
}
.home-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5em;
}
.home-lot {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary-dark);
}
.status-badge {
    font-family: var(--font-heading);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 4px 11px;
    border-radius: 999px;
}
.status-available { background: #e4f2e6; color: #1f6e3a; }
.status-pending { background: #fdf1dd; color: #9a6a12; }
.status-coming-soon { background: #e6ecf5; color: #2c4a7c; }

.home-price { margin-bottom: .1em; }
.home-address { color: var(--color-text-muted); margin-bottom: .6em; }
.home-style {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: .9rem;
    color: var(--color-primary-dark);
    margin-bottom: .4em;
}
.home-specs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0 0 1em;
    font-family: var(--font-heading);
    font-size: .88rem;
    color: var(--color-text);
}
.home-specs li:not(:first-child)::before {
    content: '\2022';
    display: inline-block;
    margin: 0 8px;
    color: var(--color-accent-dark);
}
.home-completion { font-size: .88rem; color: var(--color-text-muted); margin-bottom: 1em; }
.floor-plan-link {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: .88rem;
    color: var(--color-accent-dark);
    text-decoration: underline;
    margin-bottom: 1.2em;
}

/* ---------- Features / Upgrades ---------- */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.check-list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: .5em;
}
.check-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-accent-dark);
    font-weight: 700;
}

.spec-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
}
.spec-group {
    break-inside: avoid;
}
.spec-group h3 {
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: .3em;
    margin-bottom: .6em;
}
.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}
.spec-table tr {
    border-bottom: 1px solid var(--color-border);
}
.spec-table tr:last-child { border-bottom: none; }
.spec-table th, .spec-table td {
    text-align: left;
    padding: 9px 8px;
    vertical-align: top;
    font-weight: 400;
}
.spec-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary-dark);
    width: 40%;
    white-space: nowrap;
}
.price-table td:first-child { padding-right: 16px; }
.price-cell {
    text-align: right;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-accent-dark);
    white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: .85rem; }

/* ---------- Gallery ---------- */
.gallery-group {
    margin-bottom: 3em;
    padding-bottom: 3em;
    border-bottom: 1px solid var(--color-border);
}
.gallery-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.gallery-group-title {
    font-size: 1.3rem;
    margin-bottom: .8em;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.photo-thumb {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
}
.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.photo-thumb:hover img { transform: scale(1.05); }

.site-plan-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.site-plan-thumb {
    display: block;
    width: 100%;
    aspect-ratio: auto;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: #fff;
    cursor: zoom-in;
}
.site-plan-thumb img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
.site-plan-thumb:hover img { transform: none; }

.empty-note {
    color: var(--color-text-muted);
    font-style: italic;
    background: #fff;
    border: 1px dashed var(--color-border);
    padding: 20px;
    border-radius: var(--radius);
}
.empty-note code {
    background: var(--color-cream);
    padding: 2px 6px;
    border-radius: 4px;
}

.amenity-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0 0 1.5em;
}
.amenity-list li {
    background: #fff;
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: .9rem;
}

.model-home-note {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 1.5em;
}

.video-wrap { margin-top: 2.5em; }
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ---------- Map ---------- */
.map-embed {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    padding-bottom: 65%;
    height: 0;
}
.map-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ---------- HOA ---------- */
.hoa-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 1.5em 0;
}
.hoa-box {
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
}
.hoa-note { color: var(--color-text-muted); font-size: .9rem; }

/* ---------- Contact ---------- */
.contact-blurb {
    color: var(--color-text-muted);
    font-size: .95rem;
    margin-bottom: 1.8em;
}
.contact-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.contact-photo {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow);
}
.contact-details h3 { margin-bottom: .3em; }
.contact-details p { margin-bottom: .3em; }

@media (min-width: 480px) {
    .contact-photo { width: 130px; height: 130px; }
}

/* ---------- Builder ---------- */
.builder-intro {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 1.8em;
}
.builder-logo {
    display: block;
    width: 100%;
    height: auto;
}
.builder-intro p { margin: 0; }
.builder-communities-label { font-weight: 600; margin-bottom: .6em; }
.builder-communities {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
}
.builder-communities li {
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: .9rem;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-primary-dark);
    color: #d9dbd4;
    padding: 40px 0;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.footer-inner a { color: #fff; }
.footer-brand .brand-name { color: #fff; }
.footer-brokerage {
    font-size: .78rem;
    color: #9aa196;
    line-height: 1.6;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer-brokerage a { color: #c7ccc3; }
.footer-copy { font-size: .8rem; color: #9aa196; }

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow);
    font-size: 1.1rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 10, .92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 6px;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
}

/* =========================================================
   Desktop / larger screens
   ========================================================= */
@media (min-width: 900px) {
    h2 { font-size: 2.3rem; }

    .nav-toggle { display: none; }

    .primary-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 4px;
        max-height: none;
        overflow: visible;
        background: none;
        border: none;
    }
    .primary-nav a {
        border-top: none;
        padding: 8px 12px;
        font-size: .92rem;
    }
    .primary-nav a.nav-cta {
        background: var(--color-accent);
        color: var(--color-primary-dark) !important;
        border-radius: 999px;
        padding: 8px 20px;
        font-weight: 700;
    }

    .hero { padding: 130px 0 100px; }
    .hero h1 { font-size: 3.1rem; }

    .homes-grid { grid-template-columns: repeat(3, 1fr); }
    .spec-groups { grid-template-columns: repeat(2, 1fr); align-items: start; }
    .builder-intro { flex-direction: row; align-items: center; }
    .builder-logo { width: 240px; flex-shrink: 0; }
    .photo-grid { grid-template-columns: repeat(3, 1fr); }
    .hoa-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
    .photo-grid { grid-template-columns: repeat(4, 1fr); }
}
