/* Space Up — minimalist real-estate portfolio. White, black, rounded cards. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Keep anchored sections clear of the sticky header. */
section[id], form[id] { scroll-margin-top: 84px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 12px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #666;
  margin-bottom: 10px;
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
  background: #f1f1f1;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
.footnote { font-size: 0.8rem; color: #888; margin-top: 10px; }

/* Buttons */
.btn {
  display: inline-block;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 26px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-dark { background: #111; color: #fff; }
.btn-dark:hover { background: #000; }
.btn-light { background: #fff; color: #111; }
.btn-outline { background: #fff; color: #111; border: 1.5px solid #111; }
.btn-outline:hover { background: #111; color: #fff; }
.btn-small { padding: 9px 20px; font-size: 0.9rem; }
.btn-block { width: 100%; text-align: center; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #eee;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: #111; color: #fff;
  border-radius: 10px;
  font-size: 1.05rem;
}
.main-nav { display: flex; gap: 28px; }
.main-nav a { text-decoration: none; font-weight: 500; color: #333; }
.main-nav a:hover { color: #000; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: #111; border-radius: 2px; }

/* Hero */
.hero { padding: 56px 0 0; }
.hero-sub { max-width: 640px; color: #555; font-size: 1.08rem; }
.hero-media { margin: 32px 0 0; }
.hero-media img {
  width: 100%;
  height: clamp(280px, 52vw, 520px);
  object-fit: cover;
  border-radius: 28px;
}

/* Search card (overlaps hero image) */
.search-card {
  position: relative;
  margin: -64px auto 0;
  max-width: 960px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
  padding: 28px 30px;
}
.search-card h2 { font-size: 1.4rem; margin-bottom: 18px; }
.search-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}
.field { display: block; text-align: left; }
.field > span { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field select, .field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  border: 1.5px solid #ddd;
  border-radius: 12px;
  padding: 11px 13px;
  background: #fff;
  color: #111;
}
.field select:focus, .field input:focus, .field textarea:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.btn-search { white-space: nowrap; }
.search-note { margin: 14px 0 0; font-size: 0.92rem; color: #444; min-height: 1.4em; }
.search-note:empty { display: none; }

/* Sections */
.section { padding: 88px 0; }
.section-soft { background: #f7f7f5; }
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.section-sub { color: #555; max-width: 560px; }

/* Listing cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10); }
.card-media { position: relative; }
.card-media img { width: 100%; height: 220px; object-fit: cover; }
.card-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: #111; color: #fff;
  font-size: 0.78rem; font-weight: 600;
  border-radius: 999px;
  padding: 5px 13px;
}
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-price { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.card-body h3 { margin-bottom: 2px; }
.card-location { color: #666; font-size: 0.95rem; }
.card-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 12px 0 20px;
  color: #444;
  font-size: 0.92rem;
}
.card-meta li::before { content: "• "; color: #bbb; }
.card-body .btn { margin-top: auto; }
.empty-state {
  text-align: center;
  color: #555;
  background: #f7f7f5;
  border-radius: 20px;
  padding: 28px;
  margin-top: 8px;
}

/* Split / stats */
.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.split-media img { border-radius: 28px; width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.split-body p:not(.eyebrow):not(.footnote) { color: #555; }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}
.stat { border-top: 2px solid #111; padding-top: 12px; }
.stat strong { display: block; font-size: 1.9rem; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { color: #666; font-size: 0.92rem; }

/* Offers + agents */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0 64px;
}
.offer {
  border: 1px solid #eee;
  border-radius: 24px;
  padding: 28px;
}
.offer-icon {
  display: inline-flex;
  width: 48px; height: 48px;
  align-items: center;
  justify-content: center;
  background: #f1f1f1;
  border-radius: 14px;
  margin-bottom: 16px;
}
.offer-icon svg { width: 24px; height: 24px; }
.offer p { color: #555; }
.agents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.agents-head h3 { margin: 0; font-size: 1.4rem; }
.agents {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.agent {
  text-align: center;
  border: 1px solid #eee;
  border-radius: 24px;
  padding: 28px 16px;
}
.avatar {
  display: inline-flex;
  width: 64px; height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.agent strong { display: block; }
.agent span:last-child { color: #666; font-size: 0.9rem; }

/* CTA */
.cta { position: relative; overflow: hidden; }
.cta > img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.cta-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.cta-inner {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 110px 24px;
}
.cta-inner h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); max-width: 720px; margin: 0 auto 12px; }
.cta-inner p { color: rgba(255, 255, 255, 0.85); margin-bottom: 24px; }

/* Contact */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}
.contact-form .field-full { grid-column: 1 / -1; }
.contact-form .btn { justify-self: start; }
.form-note { font-size: 0.95rem; color: #1a7a3a; font-weight: 600; }
.form-note:empty { display: none; }

/* Footer */
.site-footer { border-top: 1px solid #eee; padding: 36px 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; color: #555; font-size: 0.95rem; }
.footer-nav a:hover { color: #000; }
.footer-note { width: 100%; color: #888; font-size: 0.85rem; margin: 4px 0 0; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 30px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 { font-size: 1.4rem; }
.modal-property { color: #555; margin-bottom: 18px; }
.modal form { display: grid; gap: 16px; }
.modal-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: 0;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
}

/* Responsive */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .offer-grid { grid-template-columns: 1fr; margin-bottom: 48px; }
  .agents { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split-media img { min-height: 0; max-height: 380px; }
  .search-fields { grid-template-columns: 1fr 1fr; }
  .btn-search { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hide-mobile { display: none; }
  .hero { padding-top: 36px; }
  .section { padding: 64px 0; }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 8px 24px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-top: 1px solid #f1f1f1; }
  .menu-toggle { display: flex; }
  .header-actions .btn-small { display: none; }
  .search-card { margin-top: -32px; padding: 22px 20px; border-radius: 20px; }
  .search-fields { grid-template-columns: 1fr; }
  .btn-search { grid-column: auto; }
  .cards { grid-template-columns: 1fr; }
  .agents { grid-template-columns: 1fr 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form .btn { width: 100%; text-align: center; }
  .cta-inner { padding: 84px 24px; }
}
