:root {
    --color-bg: #ffffff;
    --color-soft: #ffffff;
    --color-soft-2: #ffffff;
    --color-text: #1c1b19;
    --color-muted: #625e58;
    --color-line: #e4e4e4;
    --color-accent: #a9825b;
    --color-accent-dark: #684a30;
    --color-dark: #141412;
    --shadow-soft: 0 18px 60px rgba(28, 27, 25, 0.1);
    --radius: 8px;
    --shell: min(1180px, calc(100vw - 40px));
    --font-main: Aptos, "Aptos Display", "Aptos Text", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
}

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

a {
    color: inherit;
    text-decoration: none;
}

p {
    margin: 0 0 1rem;
    color: var(--color-muted);
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-main);
    font-weight: 600;
    line-height: 1.05;
}

h1 {
    max-width: 760px;
    font-size: clamp(3rem, 7vw, 6.75rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: 1.35rem;
}

input,
select,
textarea,
button {
    font: inherit;
}

.site-shell {
    width: var(--shell);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.65rem 0.9rem;
    background: var(--color-dark);
    color: #fff;
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: transparent;
    border-bottom: 0;
}

.has-image-hero:not(.template-homepage) .site-header {
    color: #fff;
}

.has-image-hero:not(.template-homepage) .brand-logo-lockup {
    filter: brightness(0) invert(1);
}

.header-inner {
    position: relative;
    width: min(1560px, calc(100vw - 110px));
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    display: inline-flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 172px;
}

.brand-name {
    width: max-content;
    border-bottom: 1px solid currentColor;
    font-family: var(--font-main);
    font-size: 1.55rem;
    font-weight: 400;
    line-height: 1;
}

.brand-estate {
    font-weight: 700;
}

.brand-line {
    color: var(--color-accent-dark);
    font-family: var(--font-main);
    font-size: 0.72rem;
    letter-spacing: 0;
}

.brand-logo {
    width: auto;
    max-height: 42px;
    object-fit: contain;
}

.brand-logo-lockup {
    width: 300px;
    max-height: 56px;
}

.primary-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex: 1;
    color: #050505;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
}

.has-image-hero:not(.template-homepage) .primary-nav {
    color: #fff;
}

.primary-nav a:hover,
.text-link:hover,
.listing-card-link:hover .listing-card-title,
.simple-card a:hover {
    color: var(--color-accent-dark);
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(5, 5, 5, 0.2);
    border-radius: var(--radius);
    background: #fff;
    color: #050505;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
}

.nav-toggle-state {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.nav-toggle-state:focus-visible + .nav-toggle {
    outline: 2px solid #050505;
    outline-offset: 3px;
}

.nav-toggle-mark,
.nav-toggle-mark::before,
.nav-toggle-mark::after {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
}

.nav-toggle-mark {
    position: relative;
}

.nav-toggle-mark::before,
.nav-toggle-mark::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-mark::before {
    top: -5px;
}

.nav-toggle-mark::after {
    top: 5px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.85rem 1.2rem;
    border: 1px solid var(--color-dark);
    border-radius: var(--radius);
    background: var(--color-dark);
    color: #fff;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
    background: #000;
}

.button-secondary {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.button-secondary:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
}

.button-ghost {
    background: rgba(255, 255, 255, 0.82);
    color: var(--color-text);
    border-color: rgba(28, 27, 25, 0.28);
}

.button-ghost:hover {
    background: #fff;
    border-color: var(--color-dark);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.hero {
    position: relative;
    min-height: 76vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-soft);
}

.hero-bg,
.hero-fade {
    position: absolute;
    inset: 0;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

.hero-fade {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.82) 30%, rgba(255, 255, 255, 0.36) 58%, rgba(255, 255, 255, 0.04) 100%);
}

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

.hero-content h1 {
    max-width: 680px;
    font-size: clamp(2.75rem, 5.6vw, 5.5rem);
}

.hero-content p {
    max-width: 620px;
    margin-top: 1.25rem;
    font-size: 1.18rem;
}

.template-homepage .primary-nav a {
    padding-bottom: 0.45rem;
    border-bottom: 2px solid transparent;
}

.template-homepage .primary-nav a:first-child,
.template-homepage .primary-nav a:hover {
    color: #050505;
    border-bottom-color: #795f2a;
}

.template-homepage .hero {
    min-height: 100svh;
    background: #253443;
}

.template-homepage .hero-fade {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.72) 13%, rgba(255, 255, 255, 0.18) 32%, rgba(255, 255, 255, 0) 48%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.44) 20%, rgba(255, 255, 255, 0) 48%),
        linear-gradient(180deg, rgba(12, 18, 22, 0.04) 0%, rgba(12, 18, 22, 0.02) 32%, rgba(12, 18, 22, 0.2) 100%);
}

.template-homepage .hero-content {
    width: min(1560px, calc(100vw - 110px));
    padding-block: 78px 0;
    transform: translateY(-1rem);
}

.template-homepage .hero-title {
    display: inline-block;
    max-width: 900px;
    padding: 1rem 1.35rem;
    background: rgba(14, 14, 13, 0.82);
    color: #fff;
    font-family: var(--font-main);
    font-size: clamp(1.45rem, 1.8vw, 2.13rem);
    font-weight: 400;
    line-height: 1.35;
    text-shadow: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.template-homepage .hero-title span {
    display: block;
}

.template-homepage .hero-title-accent {
    margin-top: 0.15rem;
    margin-left: 0;
    color: #fff;
}

.template-homepage .hero-title strong {
    font-weight: 800;
}

.template-homepage .hero-title em {
    font-style: italic;
}

.section {
    padding-block: 5.5rem;
}

.section-muted {
    background: var(--color-soft);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 2rem;
}

.section-heading p {
    margin-top: 1rem;
    font-size: 1.08rem;
}

.section-heading-row {
    max-width: none;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
}

.text-link {
    color: var(--color-accent-dark);
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.featured-properties-section {
    background: #fff;
    padding-block: 4.25rem 5.2rem;
}

.audience-flow-section {
    background: #fff;
}

.audience-flow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.audience-flow-card {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    padding: 1.35rem;
    border: 1px solid #e7e0d8;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 32px rgba(28, 27, 25, 0.08);
}

.audience-flow-card h3 {
    font-size: 1.42rem;
    line-height: 1.12;
}

.audience-flow-card p {
    margin: 0;
}

.audience-flow-card .button {
    width: max-content;
    margin-top: 0.35rem;
}

.featured-properties-shell {
    width: min(1560px, calc(100vw - 40px));
}

.featured-properties-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem;
    margin-bottom: 1.85rem;
}

.featured-properties-heading-main h2 {
    font-size: clamp(1.7rem, 2.4vw, 2.35rem);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.featured-properties-heading-main::after {
    content: "";
    display: block;
    width: min(870px, 100%);
    height: 1px;
    margin-top: 1.8rem;
    background: #151515;
}

.featured-properties-link {
    margin-bottom: 1.4rem;
    color: #7b6124;
    font-size: 1.05rem;
    font-weight: 800;
    text-underline-offset: 0.45rem;
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.55rem;
}

.simple-card,
.empty-state,
.listing-card,
.detail-sidebar,
.inline-cta {
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #fff;
}

.simple-card p {
    margin-top: 0.7rem;
}

.listing-card {
    overflow: hidden;
    border-color: #e7e0d8;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(28, 27, 25, 0.1);
}

.listing-card-link {
    display: block;
    height: 100%;
    color: inherit;
}

.listing-image {
    display: block;
    position: relative;
    aspect-ratio: 1.69 / 1;
    background: var(--color-soft-2);
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 200ms ease;
}

.listing-card:hover .listing-image img {
    transform: scale(1.025);
}

.listing-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    background: rgba(151, 120, 39, 0.82);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.listing-card-body {
    display: block;
    padding: 1.3rem 1.45rem 1.75rem;
}

.listing-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-top: 1rem;
}

.listing-card-title {
    display: block;
    margin-top: 0.2rem;
    color: var(--color-text);
    font-size: clamp(1.25rem, 1.7vw, 1.6rem);
    font-weight: 650;
    line-height: 1.15;
}

.listing-location,
.listing-price {
    margin: 0.5rem 0 0;
}

.listing-price,
.detail-price {
    color: var(--color-text);
    font-weight: 800;
}

.listing-price {
    display: block;
    margin-top: 0;
    font-size: clamp(1.55rem, 2vw, 2rem);
    line-height: 1.15;
}

.listing-location {
    display: block;
    color: var(--color-muted);
    font-size: 1rem;
}

.listing-fact {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--color-text);
    font-size: 0.97rem;
    font-weight: 500;
    line-height: 1;
}

.listing-fact + .listing-fact {
    margin-left: 1.15rem;
    padding-left: 1.15rem;
    border-left: 1px solid var(--color-line);
}

.listing-fact-icon {
    width: 1.35rem;
    height: 1.35rem;
    color: #806526;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.listing-card-description {
    display: block;
    margin-top: 1.05rem;
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.45;
}

.listing-demo-note {
    display: block;
    margin: 0.35rem 0 0;
    color: #7b6124;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.listing-demo-badge {
    background: rgba(5, 1, 1, 0.82);
}

.small-label {
    color: var(--color-accent-dark);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.empty-state {
    padding: 2rem;
}

.contact-section {
    padding-block: 5.5rem;
    background: var(--color-soft);
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 3rem;
}

.contact-grid > div > p {
    margin-top: 1rem;
    font-size: 1.08rem;
}

.contact-route-panel {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.1rem;
    border: 1px solid rgba(208, 165, 87, 0.35);
    border-radius: var(--radius);
    background: #fff;
}

.contact-route-actions,
.contact-reveal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.contact-reveal-placeholder,
.contact-reveal-empty {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.92rem;
}

.listing-results-section {
    padding-block: 0 5.5rem;
    background: #fff;
}

.listing-search-panel {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(180px, 1.35fr) minmax(160px, 0.95fr) minmax(150px, 0.95fr) minmax(130px, 0.75fr) minmax(130px, 0.75fr) minmax(170px, 0.85fr);
    gap: 1rem;
    align-items: end;
    margin-top: -4.2rem;
    margin-bottom: 2.2rem;
    padding: 1.2rem;
    border: 1px solid rgba(228, 228, 228, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.16);
}

.listing-search-panel label,
.result-sort {
    display: grid;
    gap: 0.4rem;
}

.listing-search-panel span,
.result-sort span {
    color: var(--color-text);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.listing-search-panel input,
.listing-search-panel select,
.result-sort select {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-text);
    font-family: var(--font-main);
}

.listing-search-submit {
    width: 100%;
    min-height: 50px;
    font-size: 0.86rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
}

.listing-results-fragment.htmx-request,
.listing-search-panel.htmx-request {
    opacity: 0.62;
}

.results-count {
    margin: 0;
    color: var(--color-text);
    font-size: 1.05rem;
}

.results-count strong {
    color: var(--color-accent-dark);
    font-size: 1.35rem;
}

.results-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.result-action {
    min-height: 42px;
    padding: 0.65rem 0.95rem;
    border: 1px solid #d7d7d7;
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 750;
    text-transform: uppercase;
}

.result-sort {
    grid-auto-flow: column;
    align-items: center;
}

.result-sort select {
    min-width: 150px;
    min-height: 42px;
}

.lead-form,
.listing-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.2rem;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
}

.lead-form label,
.listing-filter label {
    display: grid;
    gap: 0.4rem;
}

.lead-form span,
.listing-filter span {
    color: var(--color-muted);
    font-size: 0.84rem;
    font-weight: 750;
}

.lead-form input,
.lead-form select,
.lead-form textarea,
.listing-filter input,
.listing-filter select {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-text);
}

.lead-form textarea {
    resize: vertical;
}

.form-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.form-span {
    grid-column: 1 / -1;
}

.checkbox-label {
    grid-template-columns: auto 1fr;
    align-items: start;
}

.checkbox-label input {
    width: 18px;
    min-height: 18px;
    margin-top: 0.2rem;
}

.form-note {
    margin: 0;
    padding: 0.9rem 1rem;
    border-left: 3px solid #d0a557;
    background: #fbf7ef;
    color: #5f5646;
    font-size: 0.92rem;
    line-height: 1.5;
}

.page-hero,
.listing-detail-hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding-block: calc(6rem + 78px) 5.5rem;
    background: var(--color-dark);
}

.page-hero.compact {
    min-height: 400px;
    padding-block: calc(5rem + 78px) 4.5rem;
}

.listing-results-hero {
    min-height: 470px;
    padding-bottom: 7.5rem;
}

.page-hero-bg,
.page-hero-shade {
    position: absolute;
    inset: 0;
}

.page-hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-hero-shade {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.4) 48%, rgba(0, 0, 0, 0.66) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.34) 52%, rgba(0, 0, 0, 0.16) 100%);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.hero-copy-panel {
    width: min(760px, 100%);
    padding: 1.25rem 1.45rem 1.35rem;
    border-left: 3px solid #d0a557;
    background: rgba(5, 1, 1, 0.76);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(6px);
}

.page-hero-content h1,
.page-hero-content p,
.page-hero-content .small-label {
    color: #fff;
}

.page-hero-content h1,
.hero-copy-panel h1 {
    max-width: 780px;
    font-size: clamp(2.35rem, 4.2vw, 4.55rem);
}

.page-hero-content p,
.hero-copy-panel p {
    max-width: 660px;
    margin-top: 1rem;
    font-size: 1.16rem;
}

.hero-copy-panel .small-label {
    margin-bottom: 0.6rem;
}

.page-hero-content .detail-price {
    color: #fff;
}

.listing-detail-content {
    max-width: 820px;
}

.detail-gallery img,
.image-grid img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
}

.prose {
    max-width: 760px;
}

.prose h2,
.prose h3 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.prose p,
.prose li {
    color: var(--color-muted);
}

.inline-cta {
    margin-top: 2.5rem;
    padding: 1.5rem;
}

.legal-section {
    background: #fff;
}

.legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 3rem;
    align-items: start;
}

.legal-prose {
    max-width: 860px;
}

.legal-prose h2 {
    font-size: clamp(1.45rem, 2vw, 2.1rem);
    line-height: 1.14;
}

.legal-prose h3 {
    font-size: 1.18rem;
}

.legal-review-note {
    margin-bottom: 2rem;
    padding: 1rem 1.1rem;
    border-left: 3px solid #d0a557;
    background: #fbf7ef;
    color: #5f5646;
    font-size: 0.95rem;
}

.legal-details-panel {
    position: sticky;
    top: 6.5rem;
    padding: 1.2rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-soft);
}

.legal-details-panel h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
}

.legal-details-panel p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.legal-details-panel p + p {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(5, 1, 1, 0.1);
}

.legal-details-panel strong {
    color: var(--color-text);
}

.inline-cta .button {
    margin-top: 0.5rem;
}

.card-list {
    display: grid;
    gap: 1rem;
}

.simple-card {
    padding: 1.4rem;
}

.listing-filter {
    align-items: end;
    margin-bottom: 2rem;
}

.listing-detail-hero {
    padding-block: calc(4.5rem + 78px) 4.5rem;
    background: var(--color-soft);
}

.listing-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 3rem;
    align-items: center;
}

.detail-price {
    margin-block: 1rem;
    font-size: 1.5rem;
}

.detail-facts {
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.detail-gallery img {
    aspect-ratio: 1.45 / 1;
    box-shadow: var(--shadow-soft);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 3rem;
    align-items: start;
}

.detail-sidebar {
    padding: 1.3rem;
    position: sticky;
    top: 100px;
}

.detail-sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.detail-sidebar dl {
    margin: 0;
}

.detail-sidebar div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.75rem;
    border-top: 1px solid var(--color-line);
}

.detail-sidebar dt {
    color: var(--color-muted);
}

.detail-sidebar dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
}

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

.image-grid img {
    aspect-ratio: 1.45 / 1;
}

.local-market-section {
    background: #050101;
    color: #fff;
}

.local-market-section h2,
.local-market-section p {
    color: #fff;
}

.local-market-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 2.4rem;
    align-items: center;
}

.local-area-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.local-area-list a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 750;
}

.local-area-list a:hover {
    border-color: #d0a557;
    color: #d0a557;
}

.message-stack {
    padding-top: 1rem;
}

.message {
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-line);
    background: #fff;
}

.message-success {
    border-color: #98c7a0;
}

.message-error {
    border-color: #d59c9c;
}

.internal-auth-shell {
    max-width: 520px;
}

.internal-auth-form {
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.internal-auth-form label {
    display: grid;
    gap: 0.4rem;
}

.internal-auth-form span,
.internal-card-status {
    color: var(--color-muted);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.internal-auth-form input {
    min-height: 48px;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    font-family: var(--font-main);
}

.form-error {
    margin: 0;
    color: #8b2424;
    font-weight: 750;
}

.internal-dashboard-shell .section-heading {
    max-width: 760px;
}

.internal-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.internal-dashboard-card {
    min-height: 180px;
    padding: 1.35rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 14px 38px rgba(28, 27, 25, 0.07);
}

.internal-dashboard-card h3 {
    margin-top: 0.75rem;
}

.internal-dashboard-card p {
    margin-top: 0.75rem;
}

.site-footer {
    padding-block: 2.6rem 2.4rem;
    background: #050101;
    color: #fff;
    border-top: 0;
}

.site-footer p,
.site-footer a {
    color: #fff;
}

.site-footer a:hover {
    color: #d0a557;
}

.footer-layout {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(220px, 1fr);
    gap: 2.2rem;
    align-items: start;
}

.footer-branding {
    display: grid;
    gap: 0.65rem;
    justify-items: start;
}

.footer-logo-link {
    display: inline-flex;
    width: min(260px, 100%);
    margin-bottom: 0.35rem;
}

.footer-logo {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.footer-ppra {
    margin: 0;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
}

.footer-summary {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    line-height: 1.45;
}

.footer-legal-links {
    display: grid;
    gap: 0.62rem;
    align-content: start;
    justify-items: center;
    justify-content: center;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.25;
}

.footer-legal-links a {
    white-space: nowrap;
}

.footer-actions {
    display: grid;
    justify-items: end;
    gap: 0.9rem;
}

.footer-social-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    color: #fff;
}

.footer-social-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.footer-social-icon-muted {
    opacity: 0.75;
}

.footer-login-links {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 650;
}

.footer-login-links a,
.footer-login-links span {
    display: inline;
    margin: 0;
    color: inherit;
}

.footer-copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
}

@media (max-width: 1040px) {
    .header-inner {
        flex-wrap: wrap;
        justify-content: space-between;
        padding-block: 0.8rem;
    }

    .primary-nav {
        order: 3;
        flex-basis: 100%;
        justify-content: flex-start;
        gap: 1.15rem;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scrollbar-width: none;
    }

    .primary-nav::-webkit-scrollbar {
        display: none;
    }

    .template-homepage .header-inner {
        width: var(--shell);
        gap: 1rem;
    }

    .brand-logo-lockup {
        width: 250px;
        max-height: 48px;
    }

    .featured-properties-heading {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 1rem;
    }

    .featured-properties-link {
        width: max-content;
        margin-bottom: 0;
    }

    .listing-grid,
    .audience-flow-grid,
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .listing-search-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .listing-search-submit {
        grid-column: span 3;
    }

    .contact-grid,
    .local-market-layout,
    .listing-detail-grid,
    .detail-layout,
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar,
    .legal-details-panel {
        position: static;
    }

    .footer-layout {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .footer-legal-links {
        justify-items: start;
        justify-content: flex-start;
    }

    .footer-actions {
        justify-items: start;
    }
}

@media (max-width: 720px) {
    :root {
        --shell: min(100vw - 28px, 1180px);
    }

    h1 {
        font-size: clamp(2.65rem, 15vw, 4.5rem);
    }

    .header-inner {
        min-height: 70px;
        align-items: flex-start;
    }

    .brand-logo-lockup {
        width: min(230px, calc(100vw - 28px));
    }

    .primary-nav {
        display: none;
        position: absolute;
        top: calc(100% + 0.6rem);
        left: 0;
        right: 0;
        z-index: 80;
        flex-basis: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 0.4rem 0.85rem;
        border: 1px solid rgba(5, 5, 5, 0.14);
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(18px);
        box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
        font-size: 0.94rem;
        overflow: visible;
    }

    .site-header.nav-open .primary-nav {
        display: flex;
    }

    .nav-toggle-state:checked ~ .primary-nav {
        display: flex;
    }

    .primary-nav a {
        width: 100%;
        padding: 0.8rem 0.1rem;
        border-bottom: 1px solid rgba(5, 5, 5, 0.1);
    }

    .primary-nav a:first-child,
    .primary-nav a:hover {
        border-bottom-color: rgba(5, 5, 5, 0.1);
    }

    .primary-nav a:last-child {
        border-bottom: 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .hero {
        min-height: 82vh;
    }

    .hero-content {
        padding-block: 5rem;
    }

    .template-homepage .hero {
        min-height: 100svh;
    }

    .template-homepage .hero-bg {
        object-position: 68% center;
    }

    .template-homepage .hero-content {
        width: var(--shell);
        padding-block: 12rem 4rem;
        transform: none;
    }

    .page-hero,
    .listing-detail-hero {
        min-height: 390px;
        padding-block: calc(3.5rem + 70px) 3.5rem;
    }

    .page-hero.compact {
        min-height: 350px;
        padding-block: calc(3rem + 70px) 3rem;
    }

    .listing-results-hero {
        min-height: 420px;
        padding-bottom: 6rem;
    }

    .template-homepage .hero-title {
        max-width: 100%;
        padding: 0.75rem 0.9rem;
        font-size: clamp(1.1rem, 5vw, 1.45rem);
        line-height: 1.22;
    }

    .template-homepage .hero-title-accent {
        margin-top: 0.25rem;
        margin-left: 0;
    }

    .hero-fade {
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.76) 58%, rgba(255, 255, 255, 0.44) 100%);
    }

    .section,
    .contact-section {
        padding-block: 3.5rem;
    }

    .section-heading-row {
        display: grid;
        align-items: start;
    }

    .featured-properties-section {
        padding-block: 3.4rem 4rem;
    }

    .featured-properties-heading-main::after {
        margin-top: 1.25rem;
    }

    .hero-copy-panel {
        padding: 1rem 1.1rem 1.1rem;
    }

    .hero-copy-panel h1 {
        font-size: clamp(2rem, 10vw, 3.15rem);
    }

    .internal-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .listing-grid,
    .audience-flow-grid,
    .lead-form,
    .listing-filter,
    .listing-search-panel,
    .image-grid {
        grid-template-columns: 1fr;
    }

    .listing-search-panel {
        margin-top: -3.2rem;
    }

    .listing-search-submit {
        grid-column: auto;
    }

    .results-toolbar {
        display: grid;
        align-items: start;
    }

    .results-actions {
        justify-content: flex-start;
    }

    .result-sort {
        grid-auto-flow: row;
    }

    .has-image-hero:not(.template-homepage) .primary-nav {
        color: #050505;
    }

    .button-row {
        display: grid;
    }

    .button-row .button {
        width: 100%;
    }

    .audience-flow-card .button,
    .contact-route-actions .button,
    .contact-reveal-actions .button {
        width: 100%;
    }

    .footer-social-icons,
    .footer-login-links {
        justify-content: flex-start;
    }

    .footer-legal-links a {
        white-space: normal;
    }
}
