/* ============ Dobie Ranch — styles ============ */
:root {
  --cream: #f5f0e4;
  --cream-2: #ece4d2;
  --sage: #5d6a4c;
  --sage-dark: #3f4a33;
  --rust: #8b4a26;
  --rust-dark: #6e3818;
  --ink: #2a2823;
  --muted: #6b665b;
  --line: #d8cfba;
  --available: #4f7a3a;
  --pending: #c58a1b;
  --sold: #a33a2a;
  --radius: 10px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--sans); font-weight: 400; color: var(--ink); background: var(--cream); line-height: 1.65; font-size: 17px; }
img, video { max-width: 100%; display: block; }
a { color: var(--rust); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; color: var(--sage-dark); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.7rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 92vw); margin: 0 auto; }
.section { padding: clamp(64px, 9vw, 110px) 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; font-weight: 500; color: #f1e6cf; margin-bottom: .9rem; }
.eyebrow.dark { color: var(--rust); }
.fine { font-size: .82rem; color: var(--muted); margin-top: 1.2rem; }
.text-link { font-weight: 500; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Buttons */
.btn { display: inline-block; background: var(--rust); color: #fff; text-decoration: none; padding: .9em 1.7em; border-radius: 999px; font-weight: 500; letter-spacing: .04em; border: 2px solid var(--rust); cursor: pointer; font-family: var(--sans); font-size: 1rem; transition: background .2s, border-color .2s, color .2s, transform .2s; }
.btn:hover { background: var(--rust-dark); border-color: var(--rust-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.85); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-outline { background: transparent; color: var(--rust); }
.btn-outline:hover { color: #fff; }
.btn-small { padding: .55em 1.2em; font-size: .9rem; }
.btn-block { width: 100%; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s; }
.site-header.scrolled, .site-header.open { background: rgba(245,240,228,.97); box-shadow: 0 2px 18px rgba(0,0,0,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 58px; width: auto; filter: brightness(0) invert(1) drop-shadow(0 1px 6px rgba(0,0,0,.5)); transition: filter .3s; }
.scrolled .brand img, .open .brand img { filter: none; }
.main-nav { display: flex; align-items: center; gap: 1.6rem; }
.main-nav a:not(.btn) { color: #fff; text-decoration: none; font-weight: 500; font-size: .95rem; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.scrolled .main-nav a:not(.btn) { color: var(--ink); text-shadow: none; }
.main-nav a:not(.btn):hover { color: var(--rust); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: #fff; margin: 6px 0; transition: .3s; }
.scrolled .nav-toggle span, .open .nav-toggle span { background: var(--ink); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; color: #fff; overflow: hidden; background: #6d6450 url("../assets/hero-poster.jpg") center/cover; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(25,22,16,.72) 0%, rgba(25,22,16,.35) 55%, rgba(25,22,16,.1) 100%), linear-gradient(0deg, rgba(25,22,16,.45), transparent 40%); }
.hero-content { position: relative; padding: 120px 0 90px; }
.hero h1 { color: #fff; font-size: clamp(3rem, 8vw, 6rem); font-weight: 600; margin-bottom: .3em; }
.hero-sub { max-width: 560px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 300; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.7); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: #fff; border-radius: 2px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* Stats */
.stats { background: var(--sage-dark); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stats-grid div { padding: 34px 10px; border-right: 1px solid rgba(255,255,255,.15); }
.stats-grid div:last-child { border-right: 0; }
.stats strong { display: block; font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; line-height: 1; }
.stats span { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; opacity: .85; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.features { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 1rem; }
.features li { display: flex; gap: .9rem; }
.features .ico { color: var(--rust); font-size: 1.1rem; line-height: 1.6; }
.features strong { display: block; color: var(--sage-dark); }
.about-photo { margin: 0; }
.about-photo img { border-radius: var(--radius); box-shadow: 0 20px 50px rgba(40,30,15,.22); cursor: zoom-in; }
.about-photo figcaption, .gallery figcaption { font-size: .85rem; color: var(--muted); margin-top: .7rem; }

/* Lots */
.lots { background: var(--cream-2); }
.section-head { max-width: 640px; margin-bottom: 2.4rem; }
.lot-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { background: transparent; border: 1.5px solid var(--line); color: var(--ink); padding: .45em 1.1em; border-radius: 999px; font: 500 .9rem var(--sans); cursor: pointer; }
.chip:hover { border-color: var(--sage); }
.chip.active { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }
.sort { font-size: .9rem; color: var(--muted); display: flex; gap: .6rem; align-items: center; }
.sort select { font: inherit; color: var(--ink); padding: .45em .8em; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; }
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.lot-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.25rem 1.1rem; text-align: left; cursor: pointer; font: inherit; color: inherit; position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; }
.lot-card:hover, .lot-card:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(40,30,15,.12); border-color: var(--sage); outline: none; }
.lot-card .lot-num { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; color: var(--sage-dark); line-height: 1; }
.lot-card .lot-acres { color: var(--muted); font-size: .92rem; margin: .25rem 0 .8rem; }
.lot-card .lot-price { font-size: 1.3rem; font-weight: 600; }
.lot-card .lot-ppa { font-size: .8rem; color: var(--muted); }
.lot-card .lot-cta { display: block; margin-top: .8rem; font-size: .85rem; font-weight: 500; color: var(--rust); }
.badge { position: absolute; top: 1rem; right: 1rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; padding: .25em .7em; border-radius: 999px; color: #fff; }
.badge.available { background: var(--available); }
.badge.pending { background: var(--pending); }
.badge.sold { background: var(--sold); }
.lot-card.is-sold { opacity: .62; }
.lot-card.is-sold .lot-price { text-decoration: line-through; }
.empty { grid-column: 1/-1; color: var(--muted); padding: 2rem 0; }

/* Plat */
.plat-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 70px); align-items: start; }
.plat-copy { position: sticky; top: 110px; }
.legend { display: flex; gap: 1.3rem; flex-wrap: wrap; font-size: .9rem; margin: 1.2rem 0; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: .45rem; vertical-align: -1px; }
.dot.available { background: var(--available); }
.dot.pending { background: var(--pending); }
.dot.sold { background: var(--sold); }
.lot-detail { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--rust); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1.2rem; }
.lot-detail h3 { margin-bottom: .2rem; }
.lot-detail p { margin: 0 0 .7rem; }
.plat-map { position: relative; }
.plat-svg { width: 100%; height: auto; overflow: visible; display: block; }
.plat-svg .road { fill: #6e685c; }
.plat-svg .canal { fill: #7fb3cf; }
.plat-svg .lot { fill: url(#g-avail); stroke: var(--cream); stroke-width: 3.5; stroke-linejoin: round; cursor: pointer; transition: fill .2s, stroke .2s; outline: none; }
.plat-svg .lot.pending { fill: url(#g-pend); }
.plat-svg .lot.sold { fill: url(#g-sold); }
.plat-svg .lot.featured { fill: url(#g-feat); }
.plat-svg .lot:hover, .plat-svg .lot:focus-visible { fill: #869b70; }
.plat-svg .lot.pending:hover, .plat-svg .lot.pending:focus-visible { fill: #cfa453; }
.plat-svg .lot.featured:hover, .plat-svg .lot.featured:focus-visible { fill: #6f8a8c; }
.plat-svg .lot.active { stroke: var(--rust); stroke-width: 5; }
.plat-svg .labels { pointer-events: none; }
.plat-svg .ln { font: 700 34px var(--serif); fill: #2f3826; text-anchor: middle; }
.plat-svg .la { font: 500 14px var(--sans); fill: #3f4a33; text-anchor: middle; letter-spacing: .06em; }
.plat-svg .lt { font: 600 11px var(--sans); text-anchor: middle; letter-spacing: .14em; }
.plat-svg .lt.pending { fill: #7a5410; }
.plat-svg .lt.sold { fill: #7e2a1d; }
.plat-svg .lt.featured { fill: #fff; }
.plat-svg .lot.featured ~ * { }
.plat-svg .streets text { font: 500 12px var(--sans); letter-spacing: .2em; fill: var(--muted); text-anchor: middle; }
.plat-svg .streets .water { fill: #4f88a8; }
.plat-svg .compass circle { fill: none; stroke: var(--rust); stroke-width: 1.5; }
.plat-svg .compass path { fill: var(--rust); }
.plat-svg .compass text { font: 600 13px var(--sans); fill: var(--rust); text-anchor: middle; }
.detail-badge .badge { position: static; display: inline-block; }

/* Featured home */
.featured { background: #2f3826; color: #e9e2d0; }
.featured h2 { color: #fff; }
.featured-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.builder-logo { width: 84px; height: auto; margin-bottom: 1.4rem; }
.featured-copy p { font-weight: 300; font-size: 1.08rem; max-width: 560px; }
.featured-ctas { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; margin-top: 1.6rem; }
.mls { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: #c9bfa6; }
.spec-card { background: var(--cream); color: var(--ink); border-radius: 14px; padding: clamp(24px, 3vw, 36px); box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.spec-price { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; color: var(--sage-dark); margin: 0; line-height: 1; }
.spec-status { color: var(--rust); font-weight: 500; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; margin: .5rem 0 1.4rem; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 1.2rem; border-top: 1px solid var(--line); }
.specs div { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.specs div:nth-child(odd) { padding-right: 1rem; }
.specs dt { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 0; font-weight: 500; }
.spec-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.spec-list li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .3em .9em; font-size: .85rem; }
.badge.featured { background: #4d6b6d; }
.dot.featured { background: #5f7d7f; }
.lot-card.has-home { border-color: #8fa5a6; background: linear-gradient(180deg, #fff, #f1f5f4); }

/* Video */
.video-tour { background: var(--sage-dark); color: #f3ede0; }
.video-tour h2 { color: #fff; }
.video-grid { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.video-frame { border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.4); aspect-ratio: 9/16; background: #000; }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.video-copy p { max-width: 460px; font-weight: 300; font-size: 1.1rem; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); cursor: zoom-in; transition: transform .3s, box-shadow .3s; }
.gallery img:hover { transform: scale(1.02); box-shadow: 0 14px 34px rgba(40,30,15,.18); }
.gallery .plat-fig img { object-fit: contain; background: var(--cream-2); padding: 12px; }

/* Location */
.location { background: var(--cream-2); }
.location-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.checklist { list-style: none; padding: 0; margin: 0 0 2rem; }
.checklist li { padding: .55rem 0 .55rem 1.9rem; position: relative; border-bottom: 1px solid var(--line); }
.checklist li::before { content: "\2713"; position: absolute; left: 0; color: var(--sage); font-weight: 600; }
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: 0 16px 40px rgba(40,30,15,.14); aspect-ratio: 4/3; }
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 70px); align-items: start; }
.agent-card { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.headshot { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(40,30,15,.18); }
.agent-title { color: var(--muted); margin-top: -.4rem; }
.agent-links { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.agent-links li { padding: .2rem 0; }
.agent-links a { text-decoration: none; font-weight: 500; }
.agent-links a:hover { text-decoration: underline; }
.agent-logos { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.agent-logos img:first-child { height: 86px; width: auto; }
.agent-logos img:last-child { height: 46px; width: auto; }
.inquiry { background: #fff; border-radius: 14px; padding: clamp(24px, 3vw, 36px); box-shadow: 0 16px 44px rgba(40,30,15,.12); }
.inquiry label { display: block; font-size: .86rem; font-weight: 500; color: var(--muted); margin-bottom: 1rem; }
.inquiry input, .inquiry select, .inquiry textarea { display: block; width: 100%; margin-top: .35rem; font: 400 1rem var(--sans); color: var(--ink); padding: .7em .85em; border: 1.5px solid var(--line); border-radius: 8px; background: #fdfbf6; }
.inquiry input:focus, .inquiry select:focus, .inquiry textarea:focus { outline: none; border-color: var(--sage); background: #fff; }
.inquiry .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hidden-field { position: absolute; left: -9999px; }

/* Footer */
.site-footer { background: #1f1d19; color: #c9c1b0; padding: 56px 0 40px; font-size: .9rem; }
.site-footer a { color: #e8dcc2; }
.footer-grid { display: grid; grid-template-columns: 200px 1fr 1.3fr; gap: 2.5rem; align-items: start; }
.footer-logo { width: 180px; background: rgba(255,255,255,.92); border-radius: 8px; padding: 8px 12px; }
.footer-fine p { font-size: .8rem; color: #9d968a; }
.eho { font-size: 1.1rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(15,13,10,.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 3rem; cursor: pointer; padding: 10px 18px; line-height: 1; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* Responsive */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .main-nav { position: fixed; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--cream); padding: 1rem 0 1.5rem; box-shadow: 0 12px 24px rgba(0,0,0,.1); transform: translateY(-130%); transition: transform .3s; }
  .open .main-nav { transform: translateY(0); }
  .main-nav a:not(.btn) { color: var(--ink); text-shadow: none; padding: .8rem 0; width: 100%; text-align: center; }
  .main-nav .btn { margin-top: .6rem; }
  .about-grid, .plat-grid, .location-grid, .contact-grid, .featured-grid { grid-template-columns: 1fr; }
  .plat-copy { position: static; }
  .video-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .video-frame { width: min(360px, 100%); }
  .video-copy p { margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid div:nth-child(2) { border-right: 0; }
  .stats-grid div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.15); }
  .gallery-grid { grid-template-columns: 1fr; }
  .agent-card { grid-template-columns: 1fr; }
  .headshot { max-width: 260px; }
  .inquiry .row { grid-template-columns: 1fr; gap: 0; }
  .lot-grid { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
  .lot-card { padding: 1rem; }
  .badge { position: static; display: inline-block; margin-bottom: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-video { display: none; }
  .scroll-cue span { animation: none; }
}
.lot-card.has-home .badge { position: static; display: inline-block; margin-bottom: .55rem; }
@media (max-width: 640px) {
  .plat-svg .ln { font-size: 46px; }
  .plat-svg .la { font-size: 24px; letter-spacing: 0; }
  .plat-svg .lt { font-size: 17px; letter-spacing: .04em; }
  .plat-svg .streets text { font-size: 19px; letter-spacing: .08em; }
  .plat-svg .lot { stroke-width: 5; }
}
/* Lot card with a home rendering behind it */
.lot-card.has-home { overflow: hidden; isolation: isolate; border-color: #6f8a8c; }
.lot-card.has-home::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--home-img) center/cover no-repeat; opacity: .5; }
.lot-card.has-home::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.15) 45%, rgba(255,255,255,.6) 100%); }
.lot-card.has-home .lot-acres, .lot-card.has-home .lot-ppa { color: #3b3a35; }
