/* RealProz — shared styles */
:root {
  --blue: #3952a4;
  --blue-deep: #2b3f84;
  --ink: #1b2550;
  --purple: #80287e;
  --red: #ee1d22;
  --red-strong: #c9141a; /* white text passes 4.5:1 */
  --paper: #ffffff;
  --mist: #f2f4fa;
  --line: #d9deec;
  --muted: #55607f;

  --role-broker: var(--blue);
  --role-buyer: var(--purple);
  --role-seller: var(--red-strong);

  --font: "Archivo", system-ui, sans-serif;
  --radius-s: 4px;
  --radius-m: 8px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; display: block; }

a { color: var(--blue); }

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-s);
  z-index: 10;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 5;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}
.brand img { width: 56px; height: 56px; }
.site-header .wrap > .btn { margin-left: auto; }
.main-nav { display: flex; gap: 4px; margin-right: auto; }
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-s);
}
.main-nav a:hover { background: var(--mist); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-s);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease;
}
.btn-primary { background: var(--red-strong); color: #fff; }
.btn-primary:hover { background: #a91015; }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-outline:hover { background: var(--mist); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 0; }
.hero h1 {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.25rem, 1.2rem + 4.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 14ch;
}
.hero p.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 40px;
}

/* ---------- Search panel ---------- */
.search-tabs { display: flex; gap: 2px; }
.search-tabs button {
  font: inherit;
  font-weight: 600;
  border: 0;
  padding: 12px 24px;
  min-height: 44px;
  background: var(--mist);
  color: var(--ink);
  border-radius: var(--radius-m) var(--radius-m) 0 0;
  cursor: pointer;
}
.search-tabs button[aria-selected="true"] { background: var(--blue); color: #fff; }

.search-panel {
  background: var(--blue);
  color: #fff;
  padding: 24px;
  border-radius: var(--radius-m);
  display: grid;
  grid-template-columns: 2.2fr repeat(4, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .875rem; font-weight: 500; }
.field input, .field select {
  font: inherit;
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-s);
  background: #fff;
  color: var(--ink);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231b2550' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.search-panel :focus-visible { outline-color: #fff; }
.search-panel .btn { min-height: 48px; padding: 0 28px; }

/* ---------- Sections ---------- */
section.block { padding: 80px 0; }
section.block.tint { background: var(--mist); }
.block h2 {
  font-stretch: 112%;
  font-weight: 750;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.block .section-intro { color: var(--muted); margin: 0 0 32px; max-width: 60ch; }

/* ---------- Listings ---------- */
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.results-count { color: var(--muted); margin: 0 0 24px; }
.listings {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px 24px;
}
.listing a { color: inherit; text-decoration: none; display: block; }
.listing a:hover h3 { text-decoration: underline; }
.listing .art {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
}
.listing .art svg { width: 100%; height: 100%; display: block; }
.listing .tag {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #fff;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-s);
}
.listing .price { font-size: 1.35rem; font-weight: 700; font-stretch: 110%; margin: 0; }
.listing h3 { font-size: 1rem; font-weight: 500; margin: 2px 0 4px; }
.listing .facts { color: var(--muted); font-size: .9rem; margin: 0; }
.listing .facts span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--line); margin: 0 8px; vertical-align: middle; }

.empty {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-m);
  padding: 40px 24px;
  text-align: center;
}
.empty p { margin: 0 0 16px; }

/* ---------- Roles ---------- */
.roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.role {
  background: #fff;
  border-radius: var(--radius-m);
  border-top: 8px solid var(--role-color);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.role[data-role="broker"] { --role-color: var(--role-broker); }
.role[data-role="buyer"] { --role-color: var(--role-buyer); }
.role[data-role="seller"] { --role-color: var(--role-seller); }
.role h3 { font-stretch: 115%; font-weight: 750; font-size: 1.5rem; margin: 0 0 8px; color: var(--role-color); }
.role p { margin: 0 0 16px; }
.role ul { margin: 0 0 24px; padding-left: 20px; color: var(--muted); }
.role ul li + li { margin-top: 4px; }
.role .actions { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.role .btn-role { background: var(--role-color); color: #fff; }
.role .btn-role:hover { filter: brightness(.88); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c8cee3; padding: 48px 0; font-size: .95rem; }
.site-footer .wrap { display: flex; gap: 32px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.site-footer img { width: 64px; height: 64px; border-radius: var(--radius-s); }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #fff; }

/* ---------- Login page ---------- */
.login-main { padding: 56px 0 96px; }
.login-card {
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-top: 8px solid var(--role-color, var(--blue));
  border-radius: var(--radius-m);
  padding: 32px;
  transition: border-color .2s ease;
}
.login-card h1 { font-stretch: 115%; font-weight: 800; font-size: 2rem; line-height: 1.1; margin: 0 0 8px; }
.login-card .sub { color: var(--muted); margin: 0 0 24px; }
.role-switch {
  border: 0;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.role-switch legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.role-switch input { position: absolute; opacity: 0; pointer-events: none; }
.role-switch label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--radius-s);
  background: var(--mist);
  font-weight: 600;
  cursor: pointer;
}
.role-switch input:checked + label { background: var(--c); color: #fff; }
.role-switch input:focus-visible + label { outline: 3px solid var(--purple); outline-offset: 2px; }
.login-form .field { margin-bottom: 16px; }
.login-form .field input { box-shadow: inset 0 0 0 1.5px var(--line); }
.login-form .field input:focus-visible { box-shadow: inset 0 0 0 1.5px var(--ink); }
.login-form .hint { font-size: .85rem; color: var(--muted); }
.login-form .btn { width: 100%; margin-top: 8px; }
.form-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  background: var(--mist);
  font-size: .95rem;
}
.form-note[hidden] { display: none; }
.login-foot { margin-top: 24px; text-align: center; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .search-panel { grid-template-columns: 1fr 1fr; }
  .search-panel .field-location { grid-column: 1 / -1; }
  .search-panel .btn { grid-column: 1 / -1; }
  .roles { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* Phones: the menu becomes a row under the logo instead of disappearing. */
  .site-header .wrap { flex-wrap: wrap; row-gap: 4px; }
  .main-nav { order: 3; flex-basis: 100%; margin: 0 -8px; overflow-x: auto; scrollbar-width: none; }
  .main-nav a { white-space: nowrap; flex: none; }
  .site-header .wrap { justify-content: space-between; }
  .hero { padding-top: 40px; }
  section.block { padding: 56px 0; }
  .search-panel { padding: 16px; }
  .login-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.listing .art img.cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-map { height: 340px; border-radius: 8px; border: 1px solid var(--line); margin: 0 0 28px; background: var(--mist); z-index: 0; }
.map-note { font-size: .88rem; color: var(--muted); margin: -20px 0 24px; }
.map-fallback { padding: 16px; color: var(--muted); }
.leaflet-tooltip.price-tip { font: 700 12px/1.2 var(--font); color: var(--ink); padding: 2px 6px; }
.include-contract { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-weight: 500; }
.include-contract input { width: 20px; height: 20px; accent-color: var(--blue); }
.status-badge { position: absolute; left: 12px; bottom: 12px; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 4px; }
.status-badge.tone-open { background: #17663a; color: #fff; }
.status-badge.tone-contract { background: #a05a00; color: #fff; }
.pill.tone-open { background: #e3f3e8; color: #17663a; }
.pill.tone-contract { background: #fff2d6; color: #7a4b00; }
.btn-contact { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); font-size: .92rem; min-height: 40px; padding: 6px 14px; text-align: left; line-height: 1.3; margin-top: 10px; }
.btn-contact:hover { background: #e6eaf6; }
.status-badge.tone-off { background: #55607f; color: #fff; }
.contact-dialog { border: 0; border-radius: 8px; padding: 28px; width: min(480px, calc(100% - 32px)); color: var(--ink); }
.contact-dialog::backdrop { background: rgba(27, 37, 80, .55); }
.contact-dialog .close { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 1.5rem; cursor: pointer; }
.contact-dialog h2 { font-stretch: 112%; font-size: 1.5rem; margin: 0 0 8px; padding-right: 40px; }
.contact-dialog h2:focus { outline: none; }
.cp-about { color: var(--muted); margin: 0 0 18px; }
.cp-about strong { color: var(--ink); }
.cp-form .field { display: grid; gap: 6px; margin-bottom: 14px; }
.cp-form .field label { font-size: .875rem; font-weight: 500; }
.cp-form input:not([type=checkbox]), .cp-form select, .cp-form textarea { font: inherit; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--line); background: #fff; color: var(--ink); }
.cp-form textarea { min-height: 96px; resize: vertical; }
.cp-form .check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 4px 0 12px; }
.cp-form .check input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--blue); }
.cp-form .btn-primary { width: 100%; }
.cp-err:empty { display: none; }
.cp-err { color: var(--red-strong); font-weight: 600; margin: 0 0 12px; }
.hint { font-size: .85rem; color: var(--muted); font-weight: 400; }
.btn-contact { width: 100%; justify-content: flex-start; }

/* Phones with a notch or rounded corners (also inside the iPhone and Android apps) */
.site-header { padding-top: env(safe-area-inset-top); }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); }
.search-panel { grid-template-columns: 1.6fr 1.4fr repeat(4, 1fr) auto; }
.listing .snippet { margin: 6px 0 0; font-size: .88rem; color: var(--ink); background: #fff8d6; padding: 4px 8px; border-radius: 4px; }
.listing .rec-line { margin: 4px 0 0; font-size: .78rem; color: var(--muted); letter-spacing: .03em; font-variant-numeric: tabular-nums; }
@media (max-width: 960px) { .search-panel .field-keywords { grid-column: 1 / -1; } }

/* ---------- Banner Builder: the REalPro chyron on the first photo ---------- */
/* In cards the banner is its own button laid over the bottom of the photo (a button can't sit
   inside the card link). The photo is 4:3 and full width, so its bottom edge is at 75cqi. */
.listing { position: relative; container-type: inline-size; }
.gallery-main, .banner-stage { container-type: inline-size; }
.rp-banner {
  --rb-bg: rgba(27, 37, 80, .9); --rb-fg: #fff; --rb-sub: rgba(255, 255, 255, .86); --rb-edge: var(--red);
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; align-items: center; gap: 2.6cqi; width: 100%; box-sizing: border-box;
  margin: 0; padding: 2.2cqi 3cqi; border: 0;
  background: var(--rb-bg); color: var(--rb-fg);
  border-top: max(2px, .8cqi) solid var(--rb-edge);
  font: inherit; font-size: clamp(9px, 3.3cqi, 15px); line-height: 1.25; text-align: left;
}
.listing > .rp-banner { bottom: auto; top: 75cqi; transform: translateY(-100%); border-radius: 0 0 var(--radius-m) var(--radius-m); }
button.rp-banner { cursor: pointer; transition: filter .15s; }
button.rp-banner:hover { filter: brightness(1.12); }
button.rp-banner:hover .rb-cta { text-decoration: underline; }
button.rp-banner:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.rp-banner.theme-purple { --rb-bg: rgba(84, 22, 82, .9); --rb-edge: #f4b8f2; }
.rp-banner.theme-red { --rb-bg: rgba(150, 14, 18, .92); --rb-edge: #fff; }
.rp-banner.theme-light { --rb-bg: rgba(255, 255, 255, .94); --rb-fg: var(--ink); --rb-sub: var(--muted); --rb-edge: var(--blue); }
.rp-banner img.rb-face, .rp-banner .rb-face {
  flex: none; width: clamp(28px, 13cqi, 64px); height: clamp(28px, 13cqi, 64px); border-radius: 50%;
  object-fit: cover; border: 2px solid var(--rb-fg); background: var(--blue);
}
.rp-banner .rb-initials { display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.05em; }
.rp-banner .rb-text { min-width: 0; flex: 1; display: block; }
.rp-banner .rb-text > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-banner .rb-firm { font-weight: 700; font-size: 1.05em; }
.rp-banner .rb-pro::after { content: " · "; font-weight: 400; }
.rp-banner .rb-line { color: var(--rb-sub); font-size: .9em; }
.rp-banner .rb-cta { flex: none; display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: .95em; padding: .35em .5em .35em .8em; border-radius: 999px; border: 1.5px solid currentColor; }
.rp-banner .rb-cta svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2.5; }
.rp-banner img.rb-logo {
  flex: none; width: auto; height: clamp(24px, 11cqi, 56px); max-width: 24cqi; object-fit: contain;
  background: #fff; border-radius: 4px; padding: 2px;
}
@container (max-width: 520px) { .rp-banner .rb-cta { font-size: 0; padding: 3px; } .rp-banner .rb-cta svg { width: 16px; height: 16px; } }
@container (max-width: 360px) { .rp-banner .rb-pro { display: none; } }
.gallery-main:has(.rp-banner) figcaption { bottom: auto; top: 12px; }
.listing:has(> .rp-banner) .status-badge { bottom: auto; top: 46px; }
.listing:has(> .rp-banner) .photo-count { bottom: auto; top: 12px; right: 64px; }
