/* Palette matched to jrow.org/membership */
:root {
  --bg: #17121f;          /* page */
  --surface: #221b2e;     /* cards, panels */
  --surface-2: #2a2040;   /* raised / hover */
  --line: #43385a;        /* borders */
  --text: #ffffff;
  --text-2: #d4cde3;      /* body copy */
  --muted: #b3a9c9;
  --accent: #b9adf7;      /* lavender highlight */
  --accent-soft: rgba(185, 173, 247, .14);
  --btn: #ffffff;         /* white pill buttons */
  --btn-text: #2a2040;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --sans: "Open Sans", Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --info-w: 380px;
  --photo-w: 40%;

  /* category pin colors (tuned for dark map) */
  --c-Jewelers: #b9adf7;
  --c-Dine: #f29e8e;
  --c-Services: #7fd1c7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- Intro ---------- */
.intro { max-width: 1240px; margin: 0 auto; padding: 44px 24px 24px; text-align: center; }
/* ---------- Site header (matches jrow.org) ---------- */
.site-header {
  position: relative; z-index: 1000; background: #000;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px clamp(16px, 4vw, 52px);
}
.site-logo img { display: block; width: 125px; height: auto; }
.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: #fff; text-decoration: none; font: 400 18px/1 var(--sans); padding: 8px 0;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: #adadad; }
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .site-logo img { width: 104px; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px; border: 0; background: none; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #000; border-top: 1px solid var(--line); padding: 8px 16px 16px;
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
  }
  .site-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav a { padding: 14px 4px; border-bottom: 1px solid #1f1a28; font-size: 18px; }
}
.intro h1 { margin: 0; font: 300 clamp(36px, 5vw, 54px)/1.1 var(--sans); color: var(--text); }
.lede { margin: 12px auto 0; color: var(--text); max-width: 560px; font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.hint { margin: 6px auto 0; color: var(--muted); max-width: 560px; font-size: 15px; }

/* ---------- Stage ---------- */
.stage {
  position: relative;
  max-width: 1240px;
  height: min(78vh, 760px);
  min-height: 520px;
  margin: 0 auto;
  border-radius: 16px;
  border: 2px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
  isolation: isolate;
}
@media (max-width: 1287px) { .stage { margin: 0 24px; } }
#map { position: absolute; inset: 0; z-index: 0; background: #1d1828; }
.map-fallback {
  position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 24px;
  text-align: center; color: var(--text-2); font-size: 15px; line-height: 1.7;
}
.stage.no-map .toolbar { justify-content: flex-start; }
.stage.no-map .reset { display: none; }

/* Toolbar */
.toolbar {
  position: absolute; z-index: 500; top: 16px; left: 16px; right: 16px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  pointer-events: none;
  transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.toolbar > * { pointer-events: auto; }
.stage.is-open .toolbar, .stage.is-flying .toolbar { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.stage.is-open .toolbar > *, .stage.is-flying .toolbar > * { pointer-events: none; }
.chips {
  display: flex; gap: 4px; padding: 4px; background: rgba(34, 27, 46, .98);
  backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  overflow-x: auto; max-width: 100%; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .2s, color .2s;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--text)); }
.chip:hover { background: var(--accent-soft); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--btn); color: var(--btn-text); }
.search {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
  background: rgba(34, 27, 46, .98); backdrop-filter: blur(8px); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 14px; height: 40px; box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; width: 180px; color: var(--text); }
.search input::placeholder { color: var(--muted); }

.reset {
  position: absolute; z-index: 500; right: 16px; bottom: 28px;
  border: 0; background: var(--btn); color: var(--btn-text); border-radius: 999px; padding: 9px 18px;
  font-size: 13px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.4); cursor: pointer;
  transition: opacity .3s, background .2s;
}
.reset:hover { background: var(--accent); }
.stage.is-open .reset { opacity: 0; pointer-events: none; }

/* ---------- Pins (anchored at their tip) ---------- */
/* (MapLibre positions .pin-wrap absolutely — don't override position/display here) */
/* Teardrop head is a 32px square turned 45°, so its point sits ~38px below the top. */
.pin-wrap {
  width: 32px; height: 38px; padding: 0; margin: 0;
  background: none; border: 0; cursor: pointer;
}
.pin-wrap:hover, .pin-wrap:focus-visible { z-index: 2; outline: none; }
.pin-wrap.is-active { z-index: 3; }
.pin {
  --c: var(--accent);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px;
  transform-origin: 16px 38px;
  transition: transform .35s var(--ease), filter .3s, opacity .3s;
}
.pin::before {
  content: ""; position: absolute; inset: 0; background: var(--c);
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 6px 14px -4px rgba(0,0,0,.7), inset 0 0 0 2px rgba(23,18,31,.85);
}
.pin-icon {
  position: absolute; left: 7px; top: 7px; width: 18px; height: 18px;
  fill: none; stroke: var(--bg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.cat-Jewelers .pin { --c: var(--c-Jewelers); }
.cat-Dine .pin { --c: var(--c-Dine); }
.cat-Services .pin { --c: var(--c-Services); }
.pin-wrap:hover .pin, .pin-wrap:focus-visible .pin { transform: scale(1.15); }
.pin-wrap.is-active .pin { transform: scale(1.35); }
.pin-wrap.is-active .pin-pulse {
  position: absolute; left: 50%; top: 100%; width: 46px; height: 18px; margin: -9px 0 0 -23px;
  border-radius: 50%; border: 2px solid var(--accent); animation: pulse 1.8s ease-out infinite;
}
.pin-wrap.is-dim .pin { opacity: .25; filter: grayscale(.8); }
@keyframes pulse { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

/* Name tag on hover */
.pin-label {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  background: var(--btn); color: var(--btn-text); border-radius: 8px; padding: 5px 10px;
  font: 700 12px/1.3 var(--sans); white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
}
.pin-label::after {
  content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: var(--btn);
}
.pin-wrap:hover .pin-label, .pin-wrap:focus-visible .pin-label { opacity: 1; transform: translate(-50%, 0); }
.stage.is-open .pin-wrap.is-active .pin-label { opacity: 0; }

.row-label {
  color: var(--accent); pointer-events: none;
  font: 700 13px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; white-space: nowrap;
  text-shadow: 0 0 8px var(--bg), 0 0 3px var(--bg);
}

/* MapLibre controls, dark */
.maplibregl-map { font-family: var(--sans); }
.maplibregl-ctrl-group { background: var(--surface) !important; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.35) !important; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
.maplibregl-ctrl-group button:hover { background: var(--surface-2) !important; }
.maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: invert(1) brightness(.9); }
.maplibregl-ctrl-attrib { background: rgba(23,18,31,.95) !important; color: var(--muted); font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--text-2) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }

/* ---------- Panels ---------- */
.panel {
  position: absolute; z-index: 600; top: 0; bottom: 0; margin: 0;
  transition: transform .75s var(--ease), opacity .5s var(--ease);
  will-change: transform;
}
.panel-info {
  left: 0; width: var(--info-w); background: var(--surface);
  backdrop-filter: blur(12px); border-right: 1px solid var(--line);
  transform: translateX(-104%); opacity: 0;
  display: flex; flex-direction: column;
  box-shadow: 14px 0 40px -20px rgba(0,0,0,.7);
  outline: none;
}
.panel-photo {
  right: 0; width: var(--photo-w); background: var(--bg);
  transform: translateX(104%); opacity: 0;
  overflow: hidden; border-left: 1px solid var(--line);
  box-shadow: -14px 0 40px -20px rgba(0,0,0,.7);
}
.stage.is-open .panel-info { transform: none; opacity: 1; }
.stage.is-open .panel-photo { transform: none; opacity: 1; transition-delay: .08s; }

.panel-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.icon-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); border-radius: 999px; height: 34px; padding: 0 12px 0 8px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.icon-btn:hover { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stepper { display: flex; gap: 6px; }
.stepper .icon-btn { width: 34px; padding: 0; justify-content: center; }

.panel-body { flex: 1; overflow-y: auto; padding: 22px 24px 28px; scrollbar-color: var(--line) transparent; }
.panel-body > * { animation: rise .6s var(--ease) both; }
.panel-body > *:nth-child(2) { animation-delay: .05s; }
.panel-body > *:nth-child(3) { animation-delay: .1s; }
.panel-body > *:nth-child(4) { animation-delay: .15s; }
.panel-body > *:nth-child(5) { animation-delay: .2s; }
.panel-body > *:nth-child(6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Logos stay on white so their own colors read correctly */
.logo-box {
  width: 112px; height: 112px; border-radius: 14px; background: #fff;
  border: 2px solid var(--line); display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 10px 26px -14px rgba(0,0,0,.8);
}
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.logo-box .mono { font: 700 38px/1 var(--sans); color: var(--btn-text); }
.mobile-photo { display: none; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.panel-body h2 { margin: 4px 0 0; font: 700 26px/1.2 var(--sans); color: var(--text); }
.fact {
  margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft);
  border: 1px solid rgba(185, 173, 247, .35); font-size: 14px; color: var(--text-2);
}
.fact b { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.contact { list-style: none; margin: 20px 0 0; padding: 0; }
.contact li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.contact li:last-child { border-bottom: 0; }
.contact svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact a { text-decoration: none; word-break: break-word; }
.contact a:hover { color: var(--accent); text-decoration: underline; }
.actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.btn {
  flex: 1 1 auto; display: inline-flex; justify-content: center; align-items: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: 10px; text-decoration: none;
  font-size: 14px; font-weight: 700; border: 2px solid var(--btn); transition: background .2s, color .2s, border-color .2s;
}
.btn.primary { background: var(--btn); color: var(--btn-text); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--btn); background: var(--btn); color: var(--btn-text); }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); transition: border-color .2s, background .2s;
}
.socials a:hover { border-color: var(--accent); background: var(--accent-soft); }
.socials svg { width: 16px; height: 16px; fill: var(--text-2); }

/* Photo panel: picture/Street View on top, name bar underneath (keeps Google's controls uncovered) */
.panel-photo { display: flex; flex-direction: column; }
.media { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #0f0b15; }
.hero { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
img.hero { object-fit: cover; object-position: center; transform: scale(1.08); transition: transform 1.6s var(--ease); }
.stage.is-open img.hero { transform: scale(1); }
.placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 30% 20%, #3a2d55, var(--bg) 70%); color: var(--text); padding: 24px;
}
.placeholder .ph-logo { width: 120px; height: 120px; border-radius: 16px; background: #fff; margin: 0 auto 16px; display: grid; place-items: center; overflow: hidden; }
.placeholder .ph-logo img { width: 100%; height: 100%; object-fit: contain; }
.placeholder p { margin: 0; color: var(--muted); font-size: 13px; }
.panel-photo figcaption {
  flex: none; padding: 14px 18px; background: var(--surface); border-top: 1px solid var(--line);
  color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.panel-photo figcaption strong { display: block; font: 700 18px/1.25 var(--sans); }
.panel-photo figcaption span { font-size: 13px; color: var(--text-2); }
.cap-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.seg button {
  border: 0; background: transparent; color: var(--text-2); border-radius: 999px; padding: 5px 12px;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--btn); color: var(--btn-text); }
.sv-link {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-2);
  font-size: 12px; font-weight: 700; text-decoration: none;
}
.sv-link:hover { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }

/* ---------- Directory ---------- */
.directory { max-width: 1240px; margin: 0 auto; padding: 56px 24px 24px; }
.dir-group + .dir-group { margin-top: 44px; }
.dir-group h3 {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font: 700 22px/1.2 var(--sans); color: var(--text);
}
.dir-group h3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.dir-group h3 small {
  font: 700 12px var(--sans); color: var(--btn-text); background: var(--accent);
  border-radius: 999px; padding: 2px 9px;
}
.dir-group.far { padding-top: 36px; border-top: 1px dashed var(--line); }
.dir-group.far .note { margin: -8px 0 16px; color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card {
  display: flex; gap: 14px; align-items: center; text-align: left; width: 100%;
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 12px;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s, background .25s;
}
.card:hover, .card:focus-visible { transform: translateY(-2px); border-color: var(--accent); background: var(--surface-2); box-shadow: 0 14px 30px -16px rgba(0,0,0,.8); outline: none; }
.card.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.card .thumb { flex: none; width: 54px; height: 54px; border-radius: 10px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.card .thumb .mono { font: 700 20px var(--sans); color: var(--btn-text); }
.card strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--text); }
.card span { display: block; font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }

.site-footer {
  margin-top: 56px; padding: 36px 24px 28px; text-align: center; border-top: 1px solid var(--line);
  color: var(--text-2); font-size: 14px;
}
.site-footer p { margin: 0 0 10px; }
.foot-social { display: flex; align-items: center; justify-content: center; gap: 12px; text-transform: uppercase; font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.foot-social a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); transition: background .2s, border-color .2s;
}
.foot-social a:hover { background: var(--btn); border-color: var(--btn); }
.foot-social a:hover svg { fill: var(--btn-text); }
.foot-social svg { width: 17px; height: 17px; fill: #fff; }
.foot-credit { font-size: 11px; color: var(--muted); }
.foot-credit a { color: var(--text-2); }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  :root { --info-w: 340px; --photo-w: 36%; }
}

/* ---------- Mobile: info becomes bottom sheet, photo moves inside it ---------- */
@media (max-width: 820px) {
  .intro { padding: 28px 16px 18px; }
  .stage { margin: 0 16px; height: 78vh; min-height: 560px; border-radius: 14px; }
  .directory { padding: 40px 16px 16px; }
  .foot-social { flex-wrap: wrap; }
  .toolbar { top: 12px; left: 12px; right: 12px; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .reset { right: 12px; bottom: 24px; }
  .panel-photo { display: none; }
  .panel-info {
    top: auto; left: 0; right: 0; width: auto; height: 64%;
    border-right: 0; border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0; transform: translateY(104%);
    box-shadow: 0 -14px 40px -16px rgba(0,0,0,.8);
  }
  .stage.is-open .panel-info { transform: none; }
  .mobile-photo {
    display: block; position: relative; margin: -22px -24px 0; height: 220px; overflow: hidden; background: var(--bg);
  }
  .logo-box { width: 84px; height: 84px; margin-top: 16px; }
  .panel-body h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}