/* ── Money Magnets · Thursday Referral Group ─────────────────────────── */

:root {
  --bg: #F7F4EE;
  --card: #FFFFFF;
  --ink: #1D1B16;
  --ink-soft: #57534A;
  --ink-faint: #8A857A;
  --green: #143B2E;
  --green-soft: #1D5240;
  --gold: #A67C2E;
  --gold-bright: #C9A45C;
  --line: #E7E1D5;
  --line-strong: #D8D0BF;
  --shadow: 0 1px 2px rgba(29, 27, 22, 0.05), 0 4px 14px rgba(29, 27, 22, 0.06);
  --shadow-lift: 0 2px 4px rgba(29, 27, 22, 0.06), 0 10px 28px rgba(29, 27, 22, 0.10);
  --radius: 14px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero {
  background:
    radial-gradient(1100px 420px at 50% -160px, rgba(201, 164, 92, 0.16), transparent 70%),
    var(--green);
  color: #F4EFE4;
  padding: 56px 24px 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(201, 164, 92, 0.28);
  border-radius: 10px;
  pointer-events: none;
}

.hero-inner { max-width: 760px; margin: 0 auto; position: relative; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.badge-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(201, 164, 92, 0.55);
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(44px, 8vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: #FBF7EE;
}

.hero-sub {
  margin-top: 16px;
  font-size: clamp(15px, 2.2vw, 17px);
  color: rgba(244, 239, 228, 0.78);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub #member-total { color: var(--gold-bright); font-weight: 600; }

/* ── Search ───────────────────────────────────────────────────────── */

.search-shell {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(var(--bg) 78%, rgba(247, 244, 238, 0));
  padding: 0 24px 10px;
}

.search-wrap {
  max-width: 680px;
  margin: -30px auto 0;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--ink-faint);
  pointer-events: none;
}

#search {
  width: 100%;
  height: 60px;
  padding: 0 56px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-lift);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

#search::placeholder { color: var(--ink-faint); }

#search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(166, 124, 46, 0.18), var(--shadow-lift);
}

#search::-webkit-search-cancel-button { display: none; }

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg);
  color: var(--ink-soft);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.clear-btn:hover { background: var(--line); color: var(--ink); }
.clear-btn svg { width: 16px; height: 16px; }

.result-count {
  max-width: 680px;
  margin: 10px auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
  min-height: 20px;
}

.result-count strong { color: var(--gold); font-weight: 600; }

/* ── Grid & Cards ─────────────────────────────────────────────────── */

main { max-width: 1180px; margin: 0 auto; padding: 22px 24px 80px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: var(--line-strong);
}

.card-head { display: flex; gap: 14px; align-items: flex-start; }

.logo {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  color: #FBF7EE;
  background: var(--green);
  overflow: hidden;
  border: 1px solid var(--line);
}

.logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; }

.card-title { min-width: 0; }

.biz-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.22;
  color: var(--ink);
}

.chip {
  display: inline-block;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(166, 124, 46, 0.09);
  border: 1px solid rgba(166, 124, 46, 0.22);
  padding: 3px 10px;
  border-radius: 999px;
}

.blurb { font-size: 13.5px; color: var(--ink-soft); }

.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  min-height: 44px;
}

.row-ico { flex: none; width: 16px; height: 16px; color: var(--ink-faint); }

.row-val {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: none;
  border: none;
  padding: 4px 6px;
  margin: 0 -6px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, color 0.15s ease;
}

.row-val:hover { background: rgba(166, 124, 46, 0.08); color: var(--gold); }
.row-val:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.row-val.copied { color: var(--green-soft); background: rgba(20, 59, 46, 0.07); }

.row-open {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--ink-faint);
  transition: background 0.15s ease, color 0.15s ease;
}

.row-open:hover { background: var(--bg); color: var(--green-soft); }
.row-open svg { width: 15px; height: 15px; }

.member { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.member .row-ico { color: var(--gold); }
.member strong { color: var(--ink); font-weight: 600; }

.card-actions { margin-top: auto; display: flex; gap: 10px; }

.btn-copy {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
  background: transparent;
  border: 1.5px solid var(--green);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-copy svg { width: 15px; height: 15px; }

.btn-copy:hover { background: var(--green); color: #F4EFE4; }

.btn-copy.copied {
  background: var(--green);
  border-color: var(--green);
  color: var(--gold-bright);
}

/* ── Empty state ──────────────────────────────────────────────────── */

.empty {
  text-align: center;
  padding: 70px 24px;
  color: var(--ink-soft);
}

.empty svg { width: 44px; height: 44px; color: var(--line-strong); margin-bottom: 14px; }
.empty-title { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--ink); }
.empty-sub { margin-top: 6px; font-size: 14px; }

.btn-ghost {
  margin-top: 18px;
  padding: 10px 22px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  background: none;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.btn-ghost:hover { background: var(--gold); color: #fff; }

/* ── Toast ────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--ink);
  color: #F4EFE4;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 100;
  max-width: calc(100vw - 48px);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; color: var(--gold-bright); flex: none; }

/* ── Footer ───────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  padding: 36px 24px 44px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

footer strong { color: var(--green); }
.foot-sub { margin-top: 6px; font-size: 12.5px; color: var(--ink-faint); font-style: italic; }

/* ── Responsive & a11y ────────────────────────────────────────────── */

@media (max-width: 420px) {
  .hero { padding: 44px 18px 80px; }
  main { padding: 22px 14px 60px; }
  .search-shell { padding: 0 14px 10px; }
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
