:root {
  --bg: #fbfaf8;
  --card: #ffffff;
  --line: #e4e0d6;
  --ink: #1c2230;
  --muted: #666f7d;
  --navy: #1c2b4a;
  --gold: #b98d3e;
}

* { box-sizing: border-box; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.16,.8,.24,1), transform .7s cubic-bezier(.16,.8,.24,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

header { border-bottom: 1px solid var(--line); background: #fff; }
header .inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--navy); text-decoration: none; }
.brand span { color: var(--gold); }
nav a { margin-left: 26px; color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color .15s; }
nav a:hover, nav a.active { color: var(--navy); }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  transition: transform .2s cubic-bezier(.16,.8,.24,1), box-shadow .2s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(28,43,74,0.28); }
.btn-outline { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { transform: translateY(-2px); }

.hero { padding: 60px 0 40px; }
.hero-grid { display: flex; align-items: center; gap: 56px; }
.hero-text { flex: 1.2; min-width: 280px; }
.hero-art { flex: 1; display: flex; justify-content: center; }
.hero-photo { width: 100%; height: 300px; border-radius: 12px; background-size: cover; background-position: center; }
.hero .kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700; color: var(--gold); }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 16px 0; letter-spacing: -0.02em; color: var(--navy); }
.hero p { color: var(--muted); max-width: 50ch; margin: 0; }

.filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 34px 0 10px;
}
.filter-btn {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.filter-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

section { padding: 50px 0 80px; }

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.listing {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  animation: cardIn .4s cubic-bezier(.16,.8,.24,1) backwards;
  transition: transform .3s cubic-bezier(.16,.8,.24,1), box-shadow .3s, border-color .3s;
}
.listing:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 16px 32px rgba(28,43,74,0.1);
}
.listing-img {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  font-size: 2rem;
}
.listing-body { padding: 20px; }
.listing-price { color: var(--navy); font-weight: 800; font-size: 1.2rem; margin-bottom: 4px; }
.listing-addr { font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.listing-meta { color: var(--muted); font-size: 0.84rem; display: flex; gap: 14px; margin-bottom: 14px; }
.listing-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1ede2;
  color: var(--gold);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
  display: none;
}

footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
footer a { color: var(--navy); font-weight: 600; }

.showing-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px;
}
.showing-row { margin-bottom: 16px; }
.showing-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 8px; }
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  font-family: inherit;
}
.showing-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(28,43,74,0.06);
  border: 1px solid rgba(28,43,74,0.15);
  font-size: 0.9rem;
  display: none;
}
.showing-result.show { display: block; }

@media (max-width: 800px) {
  nav { display: none; }
  .hero-grid { flex-direction: column-reverse; gap: 30px; text-align: center; }
  .hero-photo { height: 200px; }
  .listing-grid { grid-template-columns: 1fr; }
  .showing-row.two-col { grid-template-columns: 1fr; }
}
