/* Robins Land Company — design system
   Desert-modern: warm sand surfaces, deep ink, terracotta action color, sage support. */

:root {
  --sand: #f6f2ea;
  --paper: #ffffff;
  --ink: #262119;
  --ink-soft: #5c5548;
  --line: #e3dbcb;
  --clay: #b3502a;
  --clay-dark: #94401f;
  --sage: #67775a;
  --sage-dark: #4f5d45;
  --gold: #c2913c;
  --ok: #3e7a4e;
  --warn: #a33d2f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(38, 33, 25, 0.06), 0 8px 24px rgba(38, 33, 25, 0.07);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--clay); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }

section { padding: 56px 0; }
.section-tight { padding: 32px 0; }

.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sage-dark); margin-bottom: 10px;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 46rem; }

/* ---------------------------------------------------------------- header/nav */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 500;
}
.nav {
  display: flex; align-items: center; gap: 28px;
  height: 66px; max-width: 1120px; margin: 0 auto; padding: 0 20px;
}
.brand {
  font-family: var(--font-display); font-size: 1.28rem; font-weight: 700;
  color: var(--ink); white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .brand-est { display: block; font-family: var(--font-body); font-size: 0.62rem;
  font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--clay); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; font-size: 1.6rem; color: var(--ink); cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.98rem; border: 0; cursor: pointer;
  font-family: var(--font-body); line-height: 1.3; text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--clay); color: #fff; }
.btn-primary:hover { background: var(--clay-dark); }
.btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-secondary:hover { box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }

/* ---------------------------------------------------------------- hero */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(194, 145, 60, 0.18), transparent 60%),
    linear-gradient(180deg, #2d2820 0%, #3a3226 100%);
  color: #f4efe5; padding: 84px 0 96px; position: relative; overflow: hidden;
}
.hero h1 { color: #fdfaf3; max-width: 17ch; }
.hero .lead { color: #cfc6b4; margin: 20px 0 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; }
.hero-badges span { font-size: 0.88rem; color: #d8cfbc; }
.hero-badges b { color: var(--gold); }
.hero-ridge {
  position: absolute; bottom: -1px; left: 0; right: 0; height: 60px;
  color: var(--sand);
}

/* ---------------------------------------------------------------- cards/grid */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }

.listing-card { display: flex; flex-direction: column; transition: transform 0.12s ease; }
.listing-card:hover { transform: translateY(-2px); text-decoration: none; }
.listing-media { aspect-ratio: 16/10; background: #ddd4c2 center/cover no-repeat; position: relative; }
.listing-media .badge { position: absolute; top: 12px; left: 12px; z-index: 1; }

/* Locator map (used when a parcel has no photo) */
.listing-map { overflow: hidden; }
.listing-map .scene-svg { display: block; width: 100%; height: 100%; }
.listing-body { padding: 16px 18px 18px; color: var(--ink); }
.listing-price { font-size: 1.3rem; font-weight: 700; }
.listing-terms { color: var(--sage-dark); font-size: 0.9rem; font-weight: 600; margin-top: 2px; }
.listing-meta { color: var(--ink-soft); font-size: 0.92rem; margin-top: 8px; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--paper); color: var(--sage-dark); border: 1px solid var(--line);
}
.badge-sale { background: var(--sage); color: #fff; border-color: var(--sage); }
.badge-pending { background: #8a6414; color: #fff; border-color: #8a6414; }
.badge-sold { background: var(--ink-soft); color: #fff; border-color: var(--ink-soft); }

/* ---------------------------------------------------------------- facts/tables */
.facts { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.facts th, .facts td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { color: var(--ink-soft); font-weight: 600; white-space: nowrap; width: 38%; }

.table-scroll { overflow-x: auto; }
.table-scroll-tall { max-height: 70vh; overflow-y: auto; }
.amort { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.amort th, .amort td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--line); }
.amort th { background: var(--sand); position: sticky; top: 0; }
.amort td:first-child, .amort th:first-child { text-align: left; }

/* ---------------------------------------------------------------- property page */
.prop-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .prop-layout { grid-template-columns: 1fr; } }

.price-box { position: sticky; top: 86px; }
.price-main { font-size: 2rem; font-weight: 700; font-family: var(--font-display); }
.price-sub { color: var(--ink-soft); font-size: 0.95rem; }
.price-alt { border-top: 1px dashed var(--line); margin-top: 16px; padding-top: 16px; }

.calc label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); display: block; margin: 14px 0 4px; }
.calc-row { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 0; font-size: 0.97rem; }
.calc-row b { font-variant-numeric: tabular-nums; }
.calc-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 1.05rem; }

#map, .prop-map { height: 420px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.gallery button { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; }
.gallery img { border-radius: 6px; aspect-ratio: 4/3; object-fit: cover; width: 100%; display: block; }
.gallery button[aria-pressed="true"] img { outline: 3px solid var(--clay); outline-offset: 1px; }

/* ---------------------------------------------------------------- notices */
.notice {
  background: #fdf8ef; border: 1px solid #ecdfc3; border-radius: var(--radius);
  padding: 18px 20px; font-size: 0.94rem; color: #5f5233;
}
.notice-strong { background: #f7ece5; border-color: #e5cdbd; color: #6d4630; }
.notice h4 { font-family: var(--font-body); font-size: 0.95rem; margin-bottom: 6px; }

/* ---------------------------------------------------------------- buy flow steps */
.buy-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; font-size: 0.82rem; }
.buy-step {
  padding: 6px 12px; border-radius: 99px; background: var(--paper);
  color: var(--ink-soft); border: 1px solid var(--line);
}
.buy-step-done { background: var(--sage); color: #fff; border-color: var(--sage); }
a.buy-step-done:hover { background: var(--sage-dark); text-decoration: none; }
.buy-step-current { background: var(--clay); color: #fff; border-color: var(--clay); font-weight: 600; }

/* Visible keyboard focus everywhere — the default outline is removed by some resets. */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 3px solid var(--clay); outline-offset: 2px; border-radius: 4px;
}

/* ---------------------------------------------------------------- steps */
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: 0 0 40px; height: 40px; border-radius: 50%;
  background: var(--sage); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--font-display); font-size: 1.1rem;
}
.step h3 { margin-bottom: 4px; }
.step p { color: var(--ink-soft); font-size: 0.96rem; }

/* ---------------------------------------------------------------- FAQ */
details.faq {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 20px; margin-bottom: 10px;
}
details.faq summary {
  cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; position: relative;
}
details.faq summary::after { content: "+"; position: absolute; right: 2px; color: var(--sage-dark); font-size: 1.2rem; }
details.faq[open] summary::after { content: "–"; }
details.faq p { padding: 0 0 16px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- forms */
form .field { margin-bottom: 16px; }
form label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 5px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="date"], select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 8px;
  font-family: var(--font-body); font-size: 1rem; background: var(--paper); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sage); border-color: var(--sage); }
.field-hint { font-size: 0.82rem; color: #514b40; margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

.flash { border-radius: var(--radius); padding: 13px 16px; margin-bottom: 18px; font-size: 0.95rem; }
.flash-ok { background: #eef5ea; border: 1px solid #cfe0c6; color: var(--ok); }
.flash-err { background: #f9ecea; border: 1px solid #e8cbc4; color: var(--warn); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: #2d2820; color: #b8ae9b; padding: 48px 0 36px; margin-top: 40px; font-size: 0.93rem; }
.site-footer a { color: #d8cfbc; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #f0e9da; font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.site-footer li { list-style: none; margin-bottom: 7px; }
.footer-legal { border-top: 1px solid #453d30; margin-top: 36px; padding-top: 20px; font-size: 0.82rem; color: #8d8471; }

/* ---------------------------------------------------------------- admin */
.admin-bar { background: var(--ink); color: #fff; }
.admin-bar .nav { height: 54px; }
.admin-bar a { color: #cfc6b4; font-size: 0.92rem; font-weight: 500; }
.admin-bar a.active, .admin-bar a:hover { color: #fff; text-decoration: none; }
.admin-bar .brand { color: #fff; font-size: 1.05rem; }
.admin-main { padding: 34px 0 60px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 1.7rem; font-family: var(--font-display); }
.stat span { color: var(--ink-soft); font-size: 0.85rem; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 0.93rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--sand); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.admin-table tr:hover td { background: #fbf9f4; }
.admin-table input[type="text"] { padding: 6px 9px; font-size: 0.92rem; }

.thumb { width: 84px; height: 63px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* ---------------------------------------------------------------- print (amortization / contract) */
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; font-size: 12px; }
  section { padding: 10px 0; }
  .amort th { position: static; }
  /* All 180 payment rows must print, not just the first screenful. */
  .table-scroll, .table-scroll-tall { max-height: none !important; overflow: visible !important; }
  .card { overflow: visible !important; box-shadow: none !important; }
  .amort tr { page-break-inside: avoid; }
}
