/* PLAREB site primitives.
   Design tokens + repeated component primitives only. Tailwind utilities own
   one-off page layout; this file owns the canonical visual decisions.
   Brand green #046741, body text #5b5b5b, Manrope. */

:root {
  --bg: #f6f8f7;
  --panel: #ffffff;
  --ink: #1d2521;
  --body: #5b5b5b;
  --line: rgba(4, 103, 65, 0.12);
  --line-strong: rgba(4, 103, 65, 0.24);
  --brand: #046741;
  --brand-deep: #034d31;
  --brand-soft: #e3f1eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 32px rgba(4, 103, 65, 0.12);
  --radius-xl: 14px;
  --radius-lg: 12px;
  --radius-sm: 8px;
  --content: 1200px;
}

* { box-sizing: border-box; }
body { color: var(--body); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { color: var(--ink); }

/* .shell — page-width wrapper. ~8 callers (header/footer/banner chrome). */
.shell {
  width: min(var(--content), calc(100% - 32px));
  margin: 0 auto;
}

/* .site-header — sticky top nav. 1 caller (chrome). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

/* .brand — header/footer brand block. ~3 callers. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand img {
  height: 58px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  flex: none;
}
.brand__name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--brand);
}

/* .site-nav — primary nav. 1 caller. */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--body);
  font-size: 0.92rem;
  font-weight: 600;
}
.site-nav a.active,
.site-nav a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

/* Nav dropdown — parent with a submenu, shown on hover/focus. ~3 callers. */
.nav-item { position: relative; }
.nav-caret { font-size: 0.7em; opacity: 0.65; margin-left: 3px; }
.nav-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  margin-top: 4px;
  padding: 6px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 60;
}
.nav-item:hover > .nav-submenu,
.nav-item:focus-within > .nav-submenu { display: block; }
.nav-submenu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav-submenu a:hover { color: var(--brand); background: var(--brand-soft); }

/* .button / .ghost-button — primary + secondary CTAs. ~10 + ~4 callers. */
.button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
}
.button { background: var(--brand); color: #fff; }
.button:hover { background: var(--brand-deep); }
.ghost-button { border-color: var(--line-strong); color: var(--brand); background: var(--panel); }
.ghost-button:hover { background: var(--brand-soft); }

/* .text-link — inline accent link. ~4 callers. */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-weight: 700;
}
.text-link:hover { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 3px; }

/* .muted — secondary text color. ~6 callers. */
.muted { color: var(--body); }

/* .banner — interior-page hero band over banner.png, green overlay. ~5 callers. */
.banner {
  position: relative;
  background-image: linear-gradient(rgba(3, 77, 49, 0.72), rgba(3, 77, 49, 0.72)), url("img/banner.png");
  background-size: cover;
  background-position: center;
  color: #fff;
}
.banner h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

/* .card — generic feature/content tile. ~8 callers. */
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.card h3 { margin: 0; font-size: 1.2rem; font-weight: 700; }

/* .icon-badge — circular brand icon chip on feature cards. ~3 callers. */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
}
.icon-badge svg { width: 28px; height: 28px; }

/* .member-card — directory firm tile. Cloned per member firm. */
.member-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.member-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.member-card__head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.member-card__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--brand-soft);
  flex: none;
}
.member-card__name { margin: 0; font-size: 1.15rem; font-weight: 700; }
.member-card__kind { color: var(--brand); font-size: 0.85rem; font-weight: 600; }
.member-card__headline { margin: 0; font-weight: 600; color: var(--ink); }
.member-card__desc { margin: 0; color: var(--body); font-size: 0.92rem; }

/* .property-card — shared-listing tile (MLS page). Cloned per listing. */
.property-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.property-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.property-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--brand-soft);
}
.property-card__media img { width: 100%; height: 100%; object-fit: cover; }
.property-card__body { padding: 18px; display: grid; gap: 10px; }
.property-card h3 { margin: 0; font-size: 1.15rem; font-weight: 700; }

/* .price / .price-row / .listing-summary — listing card text rows. */
.price { letter-spacing: -0.03em; font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--brand); }
.price-row,
.listing-summary,
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}
.listing-summary { color: var(--body); }

/* .pill — small status chip. ~2 callers. */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
}

/* .notice — empty/error/auth-gate panel. ~6 callers. */
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 12px;
  justify-items: start;
}
.notice__title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.notice__body { margin: 0; color: var(--body); }

/* .detail — single-listing detail layout (detail page). 1 caller. */
.detail {
  display: grid;
  gap: 28px;
}
@media (min-width: 900px) {
  .detail { grid-template-columns: 1.15fr 1fr; align-items: start; }
}
.detail__gallery {
  display: grid;
  gap: 10px;
}
.detail__photo {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--brand-soft);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.detail__photo:first-child { aspect-ratio: 16 / 10; }
.detail__body { display: grid; gap: 16px; align-content: start; }
.detail__title { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.01em; }
.detail__listed-by { margin: 0; font-size: 0.95rem; }
.detail__attrs {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}
.detail__attr { display: grid; gap: 2px; }
.detail__attr dt { margin: 0; font-size: 0.82rem; }
.detail__attr-value { margin: 0; font-weight: 700; color: var(--ink); }
.detail__section { display: grid; gap: 8px; }
.detail__section-title { margin: 0; font-size: 1.1rem; font-weight: 700; }
.detail__description { margin: 0; white-space: pre-wrap; line-height: 1.65; }
.detail__contact {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.detail__contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* .footer-card — footer surface. 1 caller (chrome). */
.footer-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 28px auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 20px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-card__desc { margin-top: 10px; max-width: 46ch; }
.footer-card h4 { margin: 0 0 10px; font-size: 0.95rem; }
.footer-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--body);
  font-size: 0.92rem;
}
.footer-card ul a:hover { color: var(--brand); }
.footer-meta {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  color: var(--body);
  font-size: 0.85rem;
}
