/* Association site primitives.
   Design tokens + repeated component primitives only. Tailwind utilities own
   one-off page layout; this file owns the canonical visual decisions. */

:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, 0.08);
  --line-strong: rgba(17, 24, 39, 0.14);
  --accent: #0d6e5e;
  --accent-deep: #0a5648;
  --accent-soft: #d6f0ea;
  /* Brand font. Defaults to the bundled Inter; the branding bridge in app.js
     overrides --font-sans (and loads the webfont) from account branding.font. */
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --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(15, 23, 42, 0.08);
  --radius-xl: 14px;
  --radius-lg: 12px;
  --radius-sm: 8px;
  --content: 1240px;
}

* { box-sizing: border-box; }
body { font-family: var(--font-sans); }
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; }

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

/* .site-header — sticky top nav. 1 caller (chrome). Solid brand-green bar with
   white text (matches the association's public site). Background tracks
   --accent-deep so it recolors with per-site branding. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--accent-deep);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

/* .brand — header/footer brand block. ~3 callers. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand img {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  border-radius: 8px;
  flex: none;
}
.brand__name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
/* White on the green header bar; the footer reuses .brand__name on a white
   card and keeps the default ink. */
.site-header .brand__name { color: #fff; }

/* .site-nav — primary nav. 1 caller. */
.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
/* Top-level entries: direct links + dropdown parents (.nav-top). White on the
   green bar. (Submenu links are styled separately, below.) */
.site-nav > a,
.nav-top {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.site-nav > a.active,
.site-nav > a:hover,
.nav-top.active,
.nav-top:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* .nav-item — dropdown parent wrapper. ~2 callers (About, Members). */
.nav-item { position: relative; }
/* Transparent bridge across the gap to the submenu so hover isn't lost when the
   pointer travels from the parent down to the menu card. */
.nav-item::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
}
.nav-caret {
  margin-left: 5px;
  font-size: 0.7em;
  opacity: 0.8;
  transition: transform 0.12s ease;
}
.nav-item:hover .nav-caret,
.nav-item:focus-within .nav-caret { transform: rotate(180deg); }

/* .nav-submenu — the second layer, a white card under a parent. Revealed on
   hover or keyboard focus within the parent group. */
.nav-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin-top: 6px;
  padding: 6px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  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(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav-submenu a.active,
.nav-submenu a:hover { color: var(--accent-deep); background: var(--accent-soft); }

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

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

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

/* .stat-card — homepage stats row tile. 3 callers. */
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 6px;
}
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
  line-height: 1.1;
}
.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* .banner — page-header band on interior pages. ~5 callers (about/board/
   past-presidents/past-boards/join). */
.banner {
  background: var(--accent-deep);
  color: #fff;
}
.banner h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.banner p {
  margin: 12px auto 0;
  max-width: 60ch;
  opacity: 0.85;
}

/* .prose-col — readable long-text column (about/vision/mission/benefits).
   ~6 callers. */
.prose-col {
  max-width: 70ch;
  font-size: 1.075rem;
  line-height: 1.7;
  color: var(--ink);
}
.prose-col > * + * { margin-top: 16px; }
.prose-col h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 0;
}

/* .roster-card — board member / past-president / past-board tile. Cloned per
   row of the whole-array content blocks (board.members, past_presidents,
   past_boards). ~3 template callers, many runtime clones. */
.roster-card {
  text-align: center;
  display: grid;
  gap: 6px;
}
.roster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--bg);
}
.roster-card--wide img { aspect-ratio: 4 / 3; }
.roster-card__name { font-weight: 700; letter-spacing: -0.01em; }
.roster-card__meta { color: var(--accent-deep); font-size: 0.9rem; font-weight: 600; }

/* .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(--bg);
  flex: none;
}
.member-card__name { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.member-card__kind { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.member-card__headline { margin: 0; font-weight: 600; }
.member-card__desc { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* .property-card — shared-listing tile (members 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(--bg);
}
.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; letter-spacing: -0.01em; }

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

/* .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(--accent);
  background: var(--accent-soft);
}

/* .notice — empty/error/auth-gate panel. ~9 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(--muted); }

/* .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.5fr 1fr 1fr;
  gap: 20px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-card__desc { margin-top: 10px; max-width: 48ch; }
.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(--muted);
  font-size: 0.92rem;
}
.footer-card ul a:hover { color: var(--ink); }

/* .social-row / .social-link — footer social icon links. 1 caller. */
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--accent-deep);
  background: var(--accent-soft);
}
.social-link:hover { color: #fff; background: var(--accent-deep); }

.footer-meta {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}
