:root {
  --ink: #111111;
  --paper: #ffffff;
  --line: #111111;
}

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

body {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

.shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 40px 110px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 30px 0 0;
}
.wordmark {
  display: flex; gap: 34px;
  font-size: 17px; font-weight: 700; letter-spacing: 0.04em;
}
.site-header nav { display: flex; gap: 28px; }
.site-header nav a {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Page titles ---------- */
.page-title {
  text-align: right;
  font-size: clamp(64px, 9.5vw, 150px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 34px 0 54px;
}
.page-title.light { font-weight: 400; letter-spacing: -0.02em; }

/* ---------- Home ---------- */
.hero { border: 1px solid var(--line); }
.hero img {
  display: block; width: 100%;
  aspect-ratio: 1370 / 500;
  object-fit: cover;
}
.tagline {
  font-size: clamp(18px, 1.7vw, 24px);
  margin: 30px 0 110px;
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 70px;
}
.section-head h2 {
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.section-head .kicker { font-size: 18px; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
}
.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper);
  min-height: 440px;
  transition: background 0.15s, color 0.15s;
}
.card:hover { background: var(--ink); color: var(--paper); }
.card .card-media { flex: 1; overflow: hidden; min-height: 0; }
.card .card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.card .card-price {
  padding: 22px 24px 18px;
  font-size: clamp(20px, 1.8vw, 27px);
  font-weight: 400;
}
.card .card-name {
  padding: 20px 24px 26px;
  font-size: clamp(20px, 1.9vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* ---------- Map page ---------- */
.map-frame {
  border: 1px solid var(--line);
  height: 62vh; min-height: 420px;
  margin-bottom: 90px;
}
#map { width: 100%; height: 100%; }
.leaflet-tile-pane { filter: grayscale(1); }
.leaflet-marker-pane { filter: grayscale(1) brightness(0.6); }

.leaflet-popup-content-wrapper {
  border-radius: 0;
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--ink);
}
.leaflet-popup-tip { box-shadow: none; border: 1px solid var(--line); }
.leaflet-popup-content { font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; }
.popup h3 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.popup .type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
.popup .sold { font-size: 13px; margin: 6px 0; }
.popup a.view-btn {
  display: inline-block; margin-top: 4px; padding: 8px 16px;
  background: var(--ink); color: #fff !important;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
}
.popup a.view-btn:hover { text-decoration: none; opacity: 0.85; }

/* ---------- Property page ---------- */
.prop-title {
  text-align: right;
  font-size: clamp(36px, 4.6vw, 66px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 90px 0 14px;
}
.prop-meta {
  text-align: right;
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 64px;
}
.prop-meta .type-badge {
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; font-size: 12px;
}
.prop-meta .sep { margin: 0 10px; }

.back-link {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-top: 44px;
}
.back-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.gallery { margin-bottom: 90px; }
.gallery img {
  width: 100%; object-fit: cover;
  display: block; cursor: pointer;
  border: 1px solid var(--line);
}
.gallery .main img {
  aspect-ratio: 16 / 9;
  max-height: 720px;
  cursor: default;
}
.gallery .main-caption {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-top: 12px;
}
.gallery .thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.gallery .thumbs img { height: 110px; }
.gallery img.selected { outline: 3px solid var(--ink); outline-offset: -3px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 34px;
  margin-bottom: 90px;
}
.stat { border: 1px solid var(--line); padding: 22px 24px 26px; }
.stat .label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.stat .note { font-size: 12px; margin-top: 6px; }

.prop-desc { max-width: 760px; }
.prop-desc h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400; letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.prop-desc p { line-height: 1.7; font-size: 16px; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  padding: 24px;
}
.login-card {
  border: 1px solid var(--line);
  padding: 56px 48px;
  width: 100%; max-width: 420px;
}
.login-card .wordmark { justify-content: flex-start; margin-bottom: 8px; }
.login-card .tagline { font-size: 13px; margin: 0 0 40px; }
.login-card label {
  display: block;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin: 22px 0 8px;
}
.login-card input {
  width: 100%; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 0;
  font-size: 15px; font-family: inherit;
  background: var(--paper); color: var(--ink);
}
.login-card input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.login-card button {
  width: 100%; margin-top: 36px; padding: 15px;
  background: var(--ink); color: #fff;
  border: none; border-radius: 0;
  font-family: inherit; font-size: 13px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
}
.login-card button:hover { opacity: 0.85; }
.login-error {
  margin-top: 20px; padding: 12px 14px;
  border: 1px solid var(--line);
  font-size: 13px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .shell { padding: 0 20px 70px; }
  .card-grid { grid-template-columns: 1fr; }
  .card { min-height: 320px; }
  .section-head { flex-direction: column; gap: 8px; margin-bottom: 40px; }
  .tagline { margin-bottom: 60px; }
  .map-frame { height: 50vh; margin-bottom: 50px; }
  .gallery { grid-template-columns: 1fr; margin-bottom: 50px; }
  .gallery .thumbs { grid-template-rows: none; grid-template-columns: repeat(3, 1fr); }
  .gallery .main img { min-height: 280px; }
  .stats-grid { gap: 20px; margin-bottom: 50px; }
  .prop-title { margin-top: 50px; }
  .prop-meta { margin-bottom: 40px; }
  .wordmark { gap: 20px; }
}
