// ─────────────────────────────────────────────────────────────────────────
// BRAND_CONFIG — edit this section for each brand fork.
// `BRANDS[0]` is the primary brand shown by default. Add competitors below.
// `logoTile` (3 chars max) + `logoName` render as the sidebar wordmark.
// ─────────────────────────────────────────────────────────────────────────
const BRANDS = [
  { id: "psf", name: "PSFnetwork", url: "psfnetwork.com", initials: "PSF", color: "#0E1418", logoTile: "psf", logoName: "network" },
  { id: "arrived", name: "Arrived", url: "arrived.com", initials: "AR", color: "#3C6E47", logoTile: "arr", logoName: "ived" },
  { id: "fundrise", name: "Fundrise", url: "fundrise.com", initials: "FR", color: "#2B4DA0", logoTile: "fr", logoName: "undrise" },
  { id: "lofty", name: "Lofty", url: "lofty.ai", initials: "LO", color: "#B5532E", logoTile: "lo", logoName: "fty" },
];

const KPIS = [
  { l: "Organic clicks", v: "184,392", d: "+12.4%", tone: "up", spark: [12,14,15,13,16,18,17,19,21,20,22,24] },
  { l: "Impressions",    v: "3.42M",   d: "+8.1%",  tone: "up", spark: [8,9,9,10,10,11,12,12,13,13,14,14] },
  { l: "Avg. position",  v: "12.4",    d: "−1.6",   tone: "up", spark: [16,15.5,15,14.5,14,13.8,13.5,13,12.8,12.6,12.5,12.4] },
  { l: "CTR",            v: "5.39%",   d: "+0.42pp",tone: "up", spark: [4.2,4.4,4.5,4.6,4.7,4.9,5.0,5.1,5.2,5.3,5.35,5.39] },
];

// Daily traffic for last 30d (clicks, impressions)
const TRAFFIC = Array.from({length: 30}, (_, i) => {
  const base = 5500 + Math.sin(i / 3) * 700 + i * 60;
  const wknd = (i % 7 === 5 || i % 7 === 6) ? -1500 : 0;
  return {
    d: i,
    clicks: Math.round(base + wknd + (Math.random()-0.5) * 400),
    imp: Math.round((base + wknd) * 18 + (Math.random()-0.5) * 8000),
  };
});

const TOP_PAGES = [
  { url: "/learn/fractional-real-estate/what-is",    clicks: 18420, imp: 312900, ctr: 5.88, pos: 4.2,  d: +18 },
  { url: "/learn/getting-started-real-estate",       clicks: 12180, imp: 248100, ctr: 4.91, pos: 6.1,  d: +9  },
  { url: "/compare/psfnetwork-vs-arrived",           clicks: 9870,  imp: 142200, ctr: 6.94, pos: 3.4,  d: +24 },
  { url: "/learn/reit-vs-fractional",                clicks: 8410,  imp: 198300, ctr: 4.24, pos: 7.8,  d: -3  },
  { url: "/reviews/arrived-homes",                   clicks: 7260,  imp: 121400, ctr: 5.98, pos: 5.6,  d: +12 },
  { url: "/learn/fees-explained",                    clicks: 6120,  imp: 98400,  ctr: 6.22, pos: 6.9,  d: +5  },
  { url: "/learn/lockups-liquidity",                 clicks: 4380,  imp: 88700,  ctr: 4.93, pos: 9.2,  d: -1  },
  { url: "/learn/tax-1099-div",                      clicks: 3210,  imp: 67800,  ctr: 4.73, pos: 11.4, d: +2  },
];

const KEYWORDS = [
  { kw: "fractional real estate",          pos: 3,  prev: 5,  vol: 18100, ctr: 18.4, url: "/learn/fractional-real-estate/what-is" },
  { kw: "how to invest in real estate",    pos: 8,  prev: 11, vol: 27100, ctr: 4.2,  url: "/learn/getting-started-real-estate" },
  { kw: "psfnetwork vs arrived",           pos: 1,  prev: 2,  vol: 1900,  ctr: 32.8, url: "/compare/psfnetwork-vs-arrived" },
  { kw: "reit vs fractional",              pos: 4,  prev: 4,  vol: 4400,  ctr: 11.6, url: "/learn/reit-vs-fractional" },
  { kw: "arrived homes review",            pos: 6,  prev: 9,  vol: 8100,  ctr: 8.1,  url: "/reviews/arrived-homes" },
  { kw: "real estate investing for beginners", pos: 14, prev: 12, vol: 14800, ctr: 1.9, url: "/learn/getting-started-real-estate" },
  { kw: "fundrise fees",                   pos: 11, prev: 18, vol: 2400,  ctr: 2.4,  url: "/learn/fees-explained" },
  { kw: "minimum to invest in real estate",pos: 5,  prev: 7,  vol: 6600,  ctr: 9.8,  url: "/learn/getting-started-real-estate" },
  { kw: "is fractional real estate safe",  pos: 9,  prev: 15, vol: 1300,  ctr: 5.2,  url: "/learn/fractional-real-estate/what-is" },
  { kw: "1099-div fractional real estate", pos: 2,  prev: 3,  vol: 720,   ctr: 21.6, url: "/learn/tax-1099-div" },
];

const BACKLINKS = [
  { domain: "bloomberg.com",   dr: 94, refs: 4,  type: "dofollow", anchor: "fractional real estate platforms", first: "Mar 14" },
  { domain: "investopedia.com",dr: 92, refs: 12, type: "dofollow", anchor: "PSFnetwork model",                 first: "Feb 22" },
  { domain: "nerdwallet.com",  dr: 89, refs: 7,  type: "dofollow", anchor: "buy real estate by the square foot",first: "Mar 02" },
  { domain: "wsj.com",         dr: 95, refs: 2,  type: "nofollow", anchor: "PSFnetwork (psfnetwork.com)",       first: "Apr 04" },
  { domain: "forbes.com",      dr: 93, refs: 5,  type: "dofollow", anchor: "fractional ownership",              first: "Feb 11" },
  { domain: "reddit.com",      dr: 91, refs: 28, type: "nofollow", anchor: "psfnetwork.com",                    first: "Jan 18" },
  { domain: "morningstar.com", dr: 88, refs: 3,  type: "dofollow", anchor: "PSFnetwork research",               first: "Mar 28" },
];

const TECH = [
  { c: "Indexable pages",        v: 1284, total: 1340, tone: "ok", note: "96% indexed" },
  { c: "Crawl errors (4xx/5xx)", v: 7,    total: 1340, tone: "warn", note: "0.5% — review 404 redirects" },
  { c: "Mobile usability",       v: 1340, total: 1340, tone: "ok", note: "All pages pass" },
  { c: "Core Web Vitals (LCP)",  v: 92,   total: 100,  tone: "ok", note: "92% Good" },
  { c: "Core Web Vitals (INP)",  v: 78,   total: 100,  tone: "warn", note: "22% Needs improvement" },
  { c: "Core Web Vitals (CLS)",  v: 96,   total: 100,  tone: "ok", note: "96% Good" },
  { c: "Schema coverage",        v: 1188, total: 1340, tone: "ok", note: "89% with FAQPage" },
  { c: "Broken internal links",  v: 3,    total: 0,    tone: "warn", note: "3 to fix" },
];

const AI_MENTIONS = [
  { engine: "ChatGPT",      cited: 142, share: 24.1, d: +18, queries: ["how to start real estate investing", "fractional real estate platforms", "PSFnetwork review"] },
  { engine: "Perplexity",   cited: 98,  share: 31.2, d: +24, queries: ["best fractional real estate", "real estate by square foot"] },
  { engine: "Google AIO",   cited: 76,  share: 12.4, d: +6,  queries: ["fractional real estate investing", "real estate $100"] },
  { engine: "Claude",       cited: 54,  share: 18.8, d: +11, queries: ["PSFnetwork minimum", "how does fractional real estate work"] },
];

const COMPETITORS = [
  { name: "PSFnetwork", clicks: 184392, kw: 1842, dr: 64, share: 28.4, you: true },
  { name: "Arrived",    clicks: 248100, kw: 2104, dr: 71, share: 38.2 },
  { name: "Fundrise",   clicks: 412800, kw: 3284, dr: 78, share: 63.6 },
  { name: "Lofty",      clicks:  62400, kw:  728, dr: 52, share: 9.6  },
];

Object.assign(window, { BRANDS, KPIS, TRAFFIC, TOP_PAGES, KEYWORDS, BACKLINKS, TECH, AI_MENTIONS, COMPETITORS });
