:root {
  --home-green: #20603d;
  --home-green-dark: #17482f;
  --home-green-soft: #eef8f2;
  --home-red: #0077a8;
  --home-blue: #00a1de;
  --home-yellow: #fad201;
  --home-paper: #f5f9fb;
  --home-line: #d8e4ea;
  --home-ink: #102a43;
  --home-muted: #5e6f7d;
}

.home-hero {
  position: relative;
  min-height: 466px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

.home-hero-media {
  position: absolute;
  inset: 0;
  display: block;
}

.home-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 53%;
}

.home-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 30, 48, 0.24), rgba(8, 36, 43, 0.7)),
    linear-gradient(90deg, rgba(6, 42, 62, 0.48), rgba(6, 52, 56, 0.08));
}

.home-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  padding-block: 42px 38px;
  text-align: center;
}

.public-beta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  background: rgba(8, 38, 25, 0.55);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.public-beta-badge span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #69e49d;
}

.home-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(36px, 4.1vw, 59px);
  font-weight: 800;
  line-height: 1.06;
}

.home-lead {
  max-width: 820px;
  margin: 12px 0 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.5;
}

.home-lead strong {
  color: #fff;
  font-weight: 800;
}

.home-search-shell {
  width: min(100%, 1050px);
  padding: 12px;
  border-radius: 8px;
  background: rgba(8, 25, 19, 0.92);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
  text-align: left;
}

.home-search-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 9px;
}

.home-search-tabs button,
.home-search-tabs a {
  min-height: 33px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  padding: 0 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.home-search-tabs button[aria-selected="true"] {
  border-color: #fff;
  background: #fff;
  color: var(--home-green-dark);
}

.home-search-tabs a {
  margin-left: auto;
  border-color: #2ba864;
  background: #15803d;
  color: #fff;
}

.home-search-primary {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(170px, 0.65fr) auto;
  gap: 7px;
}

.home-search-advanced {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 7px;
}

.home-search-form input,
.home-search-form select,
.home-search-form button {
  width: 100%;
  min-width: 0;
  height: 48px;
  border-radius: 5px;
  font: inherit;
}

.home-search-form input,
.home-search-form select {
  border: 1px solid #d7dfda;
  background: #fff;
  color: var(--home-ink);
  padding: 0 13px;
  font-size: 13px;
}

.home-search-form button {
  border: 0;
  padding: 0 28px;
  background: var(--home-red);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.home-search-form button:hover {
  background: #b91c1c;
}

.home-search-advanced input,
.home-search-advanced select {
  height: 40px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.97);
}

.home-partner-strip {
  border-bottom: 1px solid var(--home-line);
  background: #fff;
}

.home-partner-strip .market-container {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

.home-partner-strip span {
  border-radius: 4px;
  background: #eaf6ee;
  padding: 6px 8px;
  color: var(--home-green-dark);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-partner-strip strong {
  color: var(--home-ink);
  font-size: 13px;
}

.home-partner-strip a {
  color: var(--home-green-dark);
  font-size: 12px;
  font-weight: 800;
  text-underline-offset: 3px;
}

.home-ai-band {
  padding-block: 34px;
  border-bottom: 1px solid var(--home-line);
  background: #fff;
}

.home-ai-band .ai-search-heading {
  margin-bottom: 12px;
}

.home-ai-band .ai-search-heading h2 {
  color: var(--home-blue);
  font-size: 22px;
}

.home-ai-band .ai-search-heading p {
  margin-top: 3px;
  font-size: 13px;
}

.home-ai-band .ai-search-form {
  max-width: none;
}

.home-featured,
.home-agents,
.home-map {
  padding: 60px 0;
}

.home-featured,
.home-map {
  background: #fff;
}

.home-agents {
  background: var(--home-paper);
}

.home-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.home-section-heading p {
  margin: 0 0 7px;
  color: var(--home-green);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-section-heading h2 {
  margin: 0;
  color: var(--home-ink);
  font-size: 29px;
  line-height: 1.2;
}

.home-section-heading > a {
  color: var(--home-green-dark);
  font-size: 13px;
  font-weight: 800;
  text-underline-offset: 3px;
}

.home-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-property-card {
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(20, 56, 38, 0.08);
}

.home-property-media,
.home-property-media-empty {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  background: linear-gradient(140deg, #e8f2ec, #cfe5d8);
}

.home-property-media-empty {
  display: grid;
  place-items: center;
  color: var(--home-green-dark);
  font-size: 26px;
  font-weight: 800;
}

.home-property-copy {
  padding: 16px;
}

.home-property-copy small {
  color: var(--home-green);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-property-copy h3 {
  margin: 7px 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.home-property-copy h3 a {
  text-decoration: none;
}

.home-property-copy p {
  margin: 0;
  color: var(--home-muted);
  font-size: 12px;
}

.home-property-price {
  margin-top: 12px !important;
  color: var(--home-ink) !important;
  font-size: 16px !important;
  font-weight: 800;
}

.home-card-skeleton {
  min-height: 320px;
  border: 1px solid var(--home-line);
  border-radius: 7px;
  background:
    linear-gradient(100deg, transparent 20%, rgba(255,255,255,.7) 40%, transparent 60%) #edf2ef;
  background-size: 200% 100%;
  animation: home-shimmer 1.4s infinite;
}

@keyframes home-shimmer {
  to { background-position-x: -200%; }
}

.home-featured-empty,
.home-agents-empty {
  min-height: 170px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  border: 1px solid var(--home-line);
  border-radius: 7px;
  background: #fff;
  padding: 28px;
}

.home-featured-empty[hidden] {
  display: none;
}

.home-featured-empty h3,
.home-agents-empty h3 {
  margin: 0 0 7px;
  font-size: 18px;
}

.home-featured-empty p,
.home-agents-empty p {
  max-width: 720px;
  margin: 0;
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.6;
}

.home-featured-empty > a,
.home-agents-empty > a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--home-green);
  padding: 0 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.agent-empty-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f5ed;
  color: var(--home-green-dark);
  font-size: 23px;
  font-weight: 800;
}

.map-status {
  border-radius: 999px;
  background: #edf7f1;
  padding: 7px 10px;
  color: var(--home-green-dark);
  font-size: 11px;
  font-weight: 800;
}

.home-map-frame {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: 7px;
  background: #e5ece8;
}

.home-map-image {
  width: 100%;
  height: 510px;
  display: block;
  object-fit: cover;
}

#home-map-canvas { touch-action: pan-x pan-y; }

.home-map-placeholder {
  background:
    radial-gradient(circle at 50% 45%, rgba(24, 129, 75, 0.2), transparent 24%),
    linear-gradient(135deg, #e8f4ed, #dbece2);
}

.home-map-note {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: 310px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--home-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  padding: 13px 15px;
  box-shadow: 0 8px 24px rgba(12, 44, 29, 0.15);
}

.home-map-attribution {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 6px;
  color: #334038;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.home-map-attribution:hover,
.home-map-attribution:focus-visible {
  color: var(--home-green-dark);
  text-decoration: underline;
}

.home-map-note strong {
  font-size: 13px;
}

.home-map-note span {
  color: var(--home-muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .home-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-card-skeleton:last-child {
    display: none;
  }

}

@media (max-width: 720px) {
  .home-hero {
    min-height: 590px;
  }

  .home-hero-media img { object-position: 58% center; }

  .home-hero-shade {
    background: rgba(5, 29, 19, 0.72);
  }

  .home-hero-content {
    padding-block: 34px;
  }

  .home-hero h1 {
    font-size: 36px;
  }

  .home-lead {
    font-size: 14px;
  }

  .home-search-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .home-search-tabs a {
    margin-left: 0;
  }

  .home-search-primary,
  .home-search-advanced {
    grid-template-columns: 1fr;
  }

  .home-search-advanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-search-advanced label:last-child {
    grid-column: 1 / -1;
  }

  .home-partner-strip .market-container {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-block: 14px;
  }

  .home-featured,
  .home-agents,
  .home-map {
    padding: 44px 0;
  }

  .home-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .home-section-heading h2 {
    font-size: 25px;
  }

  .home-featured-grid {
    grid-template-columns: 1fr;
  }

  .home-card-skeleton:nth-child(n+2) {
    display: none;
  }

  .home-featured-empty,
  .home-agents-empty {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .home-featured-empty > a,
  .home-agents-empty > a {
    width: 100%;
  }

  .home-map-frame,
  .home-map-image {
    height: 420px;
    min-height: 420px;
  }

  .home-map-note {
    right: 12px;
    left: 12px;
    bottom: 12px;
    max-width: none;
  }

  .home-map-attribution {
    top: 6px;
    right: 8px;
    bottom: auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  .home-card-skeleton {
    animation: none;
  }
}
