:root {
  --ink: #1f2430;
  --paper: #f7f0e4;
  --paper-strong: #fffaf2;
  --accent: #a04d2d;
  --accent-deep: #68311e;
  --sage: #51634b;
  --line: rgba(31, 36, 48, 0.12);
  --shadow: 0 24px 60px rgba(74, 45, 24, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(160, 77, 45, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(81, 99, 75, 0.18), transparent 28%),
    linear-gradient(135deg, #f3ead9 0%, #f9f5ee 45%, #efe2ce 100%);
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.6;
  pointer-events: none;
}

.backdrop-one {
  top: 8vh;
  right: -8rem;
  width: 20rem;
  height: 20rem;
  background: rgba(160, 77, 45, 0.18);
}

.backdrop-two {
  left: -4rem;
  bottom: 6vh;
  width: 18rem;
  height: 18rem;
  background: rgba(81, 99, 75, 0.18);
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero,
.results-panel {
  position: relative;
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  padding: 3rem;
  margin-bottom: 1.5rem;
  animation: rise 500ms ease-out;
}

.eyebrow,
.panel-kicker,
.source-badge,
.listing-status {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 800;
}

.eyebrow,
.panel-kicker {
  color: var(--accent);
}

h1,
h2 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  line-height: 1.02;
}

h1 {
  max-width: 11ch;
  margin-top: 0.4rem;
  font-size: clamp(3rem, 9vw, 5.8rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.hero-copy {
  max-width: 42rem;
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(31, 36, 48, 0.8);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

.primary-button,
.radius-control select {
  border: 0;
  border-radius: 999px;
  font: inherit;
}

.primary-button {
  padding: 1rem 1.4rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(104, 49, 30, 0.25);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(104, 49, 30, 0.3);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.radius-control {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.35rem 0.4rem 0.35rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.6);
}

.radius-control select {
  padding: 0.55rem 0.85rem;
  background: var(--paper-strong);
}

.status-message {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  color: var(--sage);
  font-weight: 700;
}

.results-panel {
  padding: 2rem;
  animation: rise 650ms ease-out;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.source-badge {
  padding: 0.7rem 0.85rem;
  color: var(--accent-deep);
  background: rgba(160, 77, 45, 0.1);
  border-radius: 999px;
}

.results-meta {
  margin-top: 0.75rem;
  color: rgba(31, 36, 48, 0.7);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.listing-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  animation: rise 350ms ease-out;
}

.listing-photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, rgba(81, 99, 75, 0.22), rgba(160, 77, 45, 0.18));
}

.listing-photo[data-brand='zillow'] {
  background: linear-gradient(145deg, rgba(0, 106, 255, 0.22), rgba(130, 191, 255, 0.2));
}

.listing-photo[data-brand='realtor'] {
  background: linear-gradient(145deg, rgba(211, 53, 42, 0.22), rgba(247, 177, 147, 0.2));
}

.listing-photo[data-brand='redfin'] {
  background: linear-gradient(145deg, rgba(183, 35, 35, 0.22), rgba(239, 160, 160, 0.2));
}

.listing-photo[data-brand='maps'] {
  background: linear-gradient(145deg, rgba(49, 140, 87, 0.22), rgba(176, 225, 188, 0.2));
}

.listing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  color: rgba(31, 36, 48, 0.72);
}

.search-brand {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.35rem;
}

.listing-body {
  padding: 1rem;
}

.listing-price-row {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

.listing-price {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
}

.listing-status {
  color: var(--accent);
}

.listing-address,
.listing-facts {
  margin: 0.7rem 0 0;
  line-height: 1.5;
}

.listing-address {
  font-weight: 700;
}

.listing-facts {
  color: rgba(31, 36, 48, 0.74);
}

.listing-link {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--accent-deep);
  font-weight: 800;
  text-decoration: none;
}

.hidden {
  display: none;
}

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 1rem, 1120px);
    padding-top: 0.5rem;
  }

  .hero,
  .results-panel {
    border-radius: 22px;
  }

  .hero {
    padding: 1.4rem;
  }

  .results-panel {
    padding: 1.4rem;
  }

  .panel-heading {
    flex-direction: column;
    align-items: start;
  }
}
