/* =========================================================
   JDA Mockups — shared styles
   Grayscale wireframe + 1 accent. Desktop / tablet / mobile.
   ========================================================= */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-alt: #fafaf8;
  --border: #dcdcd5;
  --border-strong: #b8b8b0;
  --text: #1f1e1c;
  --text-muted: #6b6a65;
  --text-faint: #9a998f;
  --accent: #c96442;
  --accent-soft: #f7ebe4;
  --placeholder: #e8e8e0;
  --placeholder-dark: #d0d0c5;

  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,.06);

  --nav-h: 56px;
  --content-max: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* =========================================================
   Wireframe annotation helpers
   ========================================================= */

/* Wireframe annotations removed — kept class hidden so existing HTML doesn't break */
.wf-label, .wf-toggle { display: none !important; }

.wf-placeholder {
  background: var(--placeholder);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.wf-placeholder.dark { background: var(--placeholder-dark); color: var(--text-muted); }

.wf-text-line {
  height: 8px;
  background: var(--placeholder);
  border-radius: 2px;
  margin: 6px 0;
}
.wf-text-line.short { width: 40%; }
.wf-text-line.med { width: 65%; }
.wf-text-line.long { width: 90%; }

.wf-hint {
  font-size: 11px;
  color: var(--text-faint);
  font-style: italic;
  margin-top: 4px;
}

/* =========================================================
   Top nav
   ========================================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
.nav-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-logo .tag {
  font-size: 10px;
  color: var(--text-faint);
  font-weight: 400;
  margin-left: 6px;
  border: 1px dashed var(--border-strong);
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.nav-links a {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.nav-links a:hover { color: var(--text); }
.nav-spacer { flex: 1; }
.nav-cta {
  font-size: 13px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
}
.nav-cta:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.nav-mobile-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}
.nav-mobile-toggle span,
.nav-mobile-toggle span::before,
.nav-mobile-toggle span::after {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--text);
  display: block;
  position: relative;
}
.nav-mobile-toggle span::before { position: absolute; top: -5px; left: 0; }
.nav-mobile-toggle span::after { position: absolute; top: 5px; left: 0; }

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 16px;
    border-bottom: 1px solid var(--border);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav-mobile-toggle {
    display: flex;
    margin-left: auto;
    order: 99;
  }
  .nav-cta { display: none; }
  .nav-spacer { display: none; }
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 32px 24px 24px;
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}
.footer-col li a:hover { color: var(--accent); }
.footer-brand {
  font-weight: 600;
  margin-bottom: 8px;
}
.footer-bottom {
  max-width: var(--content-max);
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* =========================================================
   Content primitives
   ========================================================= */

.page-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px;
}

.section {
  margin: 48px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.section-caption {
  font-size: 13px;
  color: var(--text-muted);
}
.section-link {
  font-size: 13px;
  color: var(--accent);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 16px;
  line-height: 1.3;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-faint); padding: 0 2px; }
.breadcrumb > * { white-space: nowrap; }

/* Breadcrumb with horizontal scroll when long */
.breadcrumb-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.breadcrumb-scroll::-webkit-scrollbar { display: none; }

/* Grid / card */
.grid {
  display: grid;
  gap: 16px;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Property card (reused everywhere) */
.pcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.pcard:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.pcard-img {
  aspect-ratio: 4 / 3;
  background: var(--placeholder);
  position: relative;
  cursor: pointer;
}
.pcard-img::after {
  content: "photo";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pcard-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
}
.pcard-map-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}
.pcard-map-btn svg { width: 16px; height: 16px; display: block; }
.pcard-map-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.pcard-map-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pcard-body {
  padding: 12px;
  cursor: pointer;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pcard-price {
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.price-sep {
  color: var(--text-faint);
  font-weight: 400;
}
.price-rent {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.dual-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pcard-title {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}
.pcard-loc {
  font-size: 12px;
  color: var(--text-muted);
}
.pcard-specs {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  white-space: nowrap;
}
.btn:hover { border-color: var(--text); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #b55936; border-color: #b55936; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-alt); border-color: var(--border); }
.btn-sm { font-size: 12px; padding: 5px 10px; }
.btn-lg { font-size: 14px; padding: 11px 20px; }

/* Form */
.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { min-height: 100px; resize: vertical; font-family: inherit; }
.label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.field { margin-bottom: 14px; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
}
.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}
.modal-close:hover { background: var(--surface-alt); color: var(--text); }
.modal-body { padding: 22px; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 4px;
}
.tab {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.tab:hover { color: var(--text); }

/* Utility */
.stack-sm > * + * { margin-top: 8px; }
.stack-md > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
