/* ---------- Design tokens ---------- */
:root {
  --color-bg: #faf6ef;
  --color-surface: #ffffff;
  --color-ink: #2b2420;
  --color-ink-soft: #5c5248;
  --color-border: #e4dccc;

  --color-brand: #5c3d2e;      /* saddle brown */
  --color-brand-dark: #40291d;
  --color-accent: #6f7d4e;     /* pasture green */
  --color-accent-dark: #56613b;
  --color-gold: #c98a3d;       /* warm gold for CTAs */
  --color-gold-dark: #a86f2b;

  --color-available: #4c7a3e;
  --color-reserved: #b4802f;
  --color-sold: #8a4a3d;
  --color-unknown: #7a7268;

  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 10px;
  --shadow-card: 0 1px 3px rgba(43, 36, 32, 0.08), 0 6px 16px rgba(43, 36, 32, 0.06);
  --container-width: 1140px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--color-brand-dark);
}
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

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

.section { padding: 3.5rem 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-header p { color: var(--color-ink-soft); }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-gold); color: #fff; }
.btn-primary:hover { background: var(--color-gold-dark); }
.btn-secondary { background: var(--color-brand); color: #fff; }
.btn-secondary:hover { background: var(--color-brand-dark); }
.btn-outline { background: transparent; border-color: var(--color-brand); color: var(--color-brand); }
.btn-outline:hover { background: var(--color-brand); color: #fff; }
.btn-small { padding: 0.5rem 1.1rem; font-size: 0.85rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-mark { height: 62px; width: auto; }

.site-nav ul { display: flex; gap: 1.75rem; }
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-brand-dark);
  border-bottom-color: var(--color-gold);
}
nav a.nav-disabled,
nav a.nav-disabled:hover {
  pointer-events: none;
  opacity: 0.45;
  color: var(--color-ink-soft);
  border-bottom-color: transparent;
}

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  width: 28px;
  height: 22px;
  position: relative;
  cursor: pointer;
}
.nav-toggle-label span,
.nav-toggle-label::before,
.nav-toggle-label::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-brand-dark);
  transition: transform 0.2s ease;
}
.nav-toggle-label::before { top: 0; }
.nav-toggle-label span { top: 10px; }
.nav-toggle-label::after { top: 20px; }

@media (max-width: 780px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
  }
  .site-nav a { display: block; padding: 0.65rem 0; }
  .nav-toggle:checked ~ .site-nav { max-height: 320px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
  color: #fff;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 5rem 0 7rem;
  max-width: 640px;
}
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4vw, 3rem); }
.hero p { color: rgba(255, 255, 255, 0.85); font-size: 1.1rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: auto;
  z-index: 0;
  opacity: 0.9;
}

/* ---------- Feature strip ---------- */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.feature-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.feature-item h3 { font-size: 1.05rem; }
.feature-item p { color: var(--color-ink-soft); margin: 0; font-size: 0.95rem; }

/* ---------- Grids / Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--color-bg);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.1rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.card-title { font-size: 1.1rem; margin: 0; }
.card-meta { color: var(--color-ink-soft); font-size: 0.88rem; margin: 0; }
.card-price { font-weight: 700; color: var(--color-brand-dark); margin: 0.25rem 0 0.75rem; }
.card-price-bulk { font-weight: 600; font-size: 0.85rem; color: var(--color-ink-soft); margin: -0.35rem 0 0.75rem; }
.card-body .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: #fff;
}
.card-media .badge { position: absolute; top: 0.75rem; left: 0.75rem; }
.badge-available { background: var(--color-available); }
.badge-reserved { background: var(--color-reserved); }
.badge-sold { background: var(--color-sold); }
.badge-unknown { background: var(--color-unknown); }

/* ---------- Status / empty / error messages ---------- */
.state-message {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-ink-soft);
}
.state-message .btn { margin-top: 1rem; }
#featured-status,
#listing-status {
  text-align: center;
  color: var(--color-ink-soft);
  padding: 2rem 0;
}

/* ---------- Page header (list pages, about, contact) ---------- */
.page-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 2.75rem 0;
  text-align: center;
}
.page-header p { color: var(--color-ink-soft); max-width: 560px; margin: 0.5rem auto 0; }

/* ---------- Listing detail ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  color: var(--color-ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.back-link:hover { color: var(--color-brand-dark); text-decoration: underline; }

.listing-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .listing-layout { grid-template-columns: 1fr; }
}
.listing-gallery img {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  height: auto;
}
.gallery-thumbs { display: flex; gap: 0.6rem; margin-top: 0.75rem; flex-wrap: wrap; }
.gallery-thumb {
  padding: 0;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  width: 72px;
  height: 54px;
}
.gallery-thumb:hover { border-color: var(--color-gold); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.listing-info h1 { margin-top: 0.75rem; }
.listing-price { font-size: 1.5rem; font-weight: 700; color: var(--color-brand-dark); }
.listing-price-bulk { font-size: 1rem; font-weight: 600; color: var(--color-ink-soft); }
.listing-price + .listing-price-bulk { margin-top: -0.6em; }
.listing-note { font-size: 0.85rem; color: var(--color-ink-soft); margin-top: 0.75rem; }
.spec-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.spec-list dt { font-weight: 600; color: var(--color-ink-soft); }
.spec-list dd { margin: 0; }
.listing-description { color: var(--color-ink-soft); }
.cta-group { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 1.5rem; }
.stripe-note { font-size: 0.85rem; color: var(--color-ink-soft); margin-top: 0.75rem; }

/* ---------- About ---------- */
.prose { max-width: 720px; margin: 0 auto; }
.prose p { color: var(--color-ink-soft); font-size: 1.05rem; }

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
}
@media (max-width: 780px) {
  .contact-layout { grid-template-columns: 1fr; }
}
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: fit-content;
}
.contact-card a { display: block; margin-top: 0.5rem; font-weight: 600; text-decoration: none; color: var(--color-brand); }
.contact-card button {
  display: block;
  margin-top: 0.5rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-brand);
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.contact-card button:hover { color: var(--color-brand-dark); }

.form-field { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-weight: 600; font-size: 0.9rem; }
.form-field input,
.form-field textarea {
  font: inherit;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-ink);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 1px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-brand-dark);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  padding: 2.75rem 0 1.75rem;
}
.footer-brand-mark {
  height: 44px;
  width: auto;
  background: var(--color-bg);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}
.footer-brand p { color: rgba(255, 255, 255, 0.65); max-width: 260px; margin-top: 0.75rem; }
.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a { text-decoration: none; color: rgba(255, 255, 255, 0.85); }
.footer-nav a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-contact a { text-decoration: none; color: rgba(255, 255, 255, 0.85); }
.footer-contact button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
}
.footer-contact button:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Contact modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 36, 32, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 200;
}
.modal-overlay[hidden] { display: none; }
.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 2rem;
}
.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-ink-soft);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--color-border); color: var(--color-ink); }
.modal-dialog h2 { margin-bottom: 0.25rem; }
.modal-context { color: var(--color-ink-soft); font-size: 0.9rem; margin-bottom: 1.25rem; }
.modal-error {
  background: rgba(138, 74, 61, 0.1);
  border: 1px solid rgba(138, 74, 61, 0.3);
  color: var(--color-sold);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.modal-success h3 { margin-bottom: 0.4rem; }
.modal-success p { color: var(--color-ink-soft); margin: 0; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }
body.modal-open { overflow: hidden; }
