// Mock data & constants

const BRAND = {
  name: "Loomly",
  url: "loomly.app",
  industry: "Productivity · Note-taking",
  desc: "A minimal, AI-native note app that turns messy thoughts into structured docs. For solo builders and small teams who write to think.",
  logoLetter: "L",
  logoBg: "oklch(0.42 0.08 260)",
  colors: ["#1E293B", "#F4A261", "#E9C46A", "#2A9D8F"],
  images: [
    { type: 'img', hue: 260 },
    { type: 'img', hue: 45 },
    { type: 'img', hue: 160 },
    { type: 'img', hue: 22 },
    { type: 'img', hue: 300 },
    { type: 'video', hue: 200 },
    { type: 'img', hue: 80 },
    { type: 'video', hue: 15 },
  ]
};

const PLANS = [
  {
    id: 'reddit',
    name: 'Reddit Growth',
    icon: 'Reddit',
    tag: 'Authentic community seeding where 68% of SaaS buyers do research.',
    price: '$2,400/mo',
    priceNote: '3-month commit',
    features: [
      'Subreddit research & ICP mapping',
      'Marketing calendar management',
      '6 managed accounts (warmed)',
      'Automated posting + live commenting',
      'Theme strategy + angle library',
    ],
    outcome: '~20 qualified threads/mo · 2–4K targeted clicks',
  },
  {
    id: 'producthunt',
    name: 'Product Hunt Launch',
    icon: 'PH',
    tag: 'End-to-end launch day orchestration with hunter + supporter network.',
    price: '$3,800',
    priceNote: 'one-time launch',
    features: [
      'Hunter matching & pre-launch teaser',
      'Maker comment drafting',
      'Supporter mobilization (500+ net)',
      'Launch-day live operator',
      'Post-launch follow-up sequencing',
    ],
    outcome: 'Top 5 Product of the Day, typical',
  },
];

const CONTROL_MODES = [
  {
    id: 'full',
    name: 'Full autopilot',
    desc: 'Kibie runs the full 30-day plan. You see daily reports; we flag only critical issues.',
  },
  {
    id: 'checkpoint',
    name: 'Milestone check-ins',
    desc: 'We pause at plan approval, first post, and weekly reviews. Everything else runs automatically.',
    recommended: true,
  },
  {
    id: 'manual',
    name: 'Approve every step',
    desc: 'Nothing ships without you. Every post, comment, and reply lands in your approval queue first.',
  },
];

const SUBREDDITS = [
  { name: 'r/productivity', size: '2.1M', tier: 'high', score: 86,
    desc: 'Broad productivity community. Permissive toward tools if posts lead with personal workflow, not promotion.',
    dims: [['Historical success', 82], ['Community tone', 78], ['Rule strictness', 88], ['Mod responsiveness', 75], ['Competitor saturation', 62], ['Conversion signal', 90]],
    chips: ['Self-promo: tolerated', 'No karma floor', 'Weekly thread allowed'],
    cases: 3 },
  { name: 'r/NoteTaking', size: '184K', tier: 'high', score: 91,
    desc: 'Hyper-targeted. Small but the highest-intent users we could find. Founders regularly AMA here.',
    dims: [['Historical success', 94], ['Community tone', 90], ['Rule strictness', 72], ['Mod responsiveness', 88], ['Competitor saturation', 45], ['Conversion signal', 96]],
    chips: ['Founders welcome', 'Tool comparison threads', 'AMA-friendly'],
    cases: 7 },
  { name: 'r/SaaS', size: '412K', tier: 'high', score: 79,
    desc: 'Founders and operators. Good for founder-voice storytelling; avoid "check out my product" framing.',
    dims: [['Historical success', 78], ['Community tone', 72], ['Rule strictness', 70], ['Mod responsiveness', 80], ['Competitor saturation', 85], ['Conversion signal', 72]],
    chips: ['Founder AMA', 'Show & tell', 'Build-in-public'],
    cases: 5 },
  { name: 'r/ObsidianMD', size: '298K', tier: 'med', score: 68,
    desc: 'Loyal to incumbent. Positioning as "lighter alternative" or companion works better than head-on.',
    dims: [['Historical success', 58], ['Community tone', 65], ['Rule strictness', 80], ['Mod responsiveness', 70], ['Competitor saturation', 92], ['Conversion signal', 58]],
    chips: ['Self-promo: restricted', 'Saturday-only showcase', 'Bring a plugin angle'],
    cases: 2 },
  { name: 'r/digitalnomad', size: '2.9M', tier: 'med', score: 64,
    desc: 'Large and noisy. Works if the content is lifestyle-first (e.g. "how I journal on the road"), not tool-first.',
    dims: [['Historical success', 60], ['Community tone', 72], ['Rule strictness', 58], ['Mod responsiveness', 55], ['Competitor saturation', 70], ['Conversion signal', 70]],
    chips: ['Lifestyle-first angle', 'Low promo tolerance', 'High traffic'],
    cases: 1 },
  { name: 'r/GetStudying', size: '1.4M', tier: 'med', score: 61,
    desc: 'Student-heavy. Budget users but strong word-of-mouth; good for free-tier seeding.',
    dims: [['Historical success', 55], ['Community tone', 80], ['Rule strictness', 72], ['Mod responsiveness', 60], ['Competitor saturation', 55], ['Conversion signal', 48]],
    chips: ['Students', 'Free-tier funnel', 'Exam-season spikes'],
    cases: 2 },
  { name: 'r/Entrepreneur', size: '4.2M', tier: 'low', score: 42,
    desc: 'Huge but mod team is strict on self-promo. Historical case studies show low ROI unless you’re already a name.',
    dims: [['Historical success', 32], ['Community tone', 55], ['Rule strictness', 38], ['Mod responsiveness', 70], ['Competitor saturation', 88], ['Conversion signal', 40]],
    chips: ['No links in comments', 'Karma floor: 500', 'Aggressive mod team'],
    cases: 0 },
];

const STAFF = [
  { handle: 'u/markdown_mike', role: 'Lead writer', hue: 260, status: 'warming', days: 3 },
  { handle: 'u/quiet_jules', role: 'Commenter', hue: 45, status: 'warming', days: 4 },
  { handle: 'u/notetaker_rn', role: 'Commenter', hue: 160, status: 'warming', days: 2 },
  { handle: 'u/foldernauts', role: 'Writer', hue: 22, status: 'linked', days: 0 },
  { handle: 'u/cmd_k_sarah', role: 'Replier', hue: 320, status: 'warming', days: 5 },
  { handle: 'u/wip_thoughts', role: 'Replier', hue: 200, status: 'warming', days: 6 },
];

const CALENDAR = (() => {
  const days = [];
  for (let i = 0; i < 30; i++) {
    let phase = 'sustain';
    if (i < 7) phase = 'warmup';
    else if (i >= 7 && i < 14) phase = 'launch';
    const posts = i < 7 ? (i % 2 === 0 ? 1 : 0) : (i % 3 === 0 ? 2 : 1);
    days.push({ day: i + 1, phase, posts });
  }
  return days;
})();

const CONTENT_THEMES = [
  { day: 2, sub: 'r/NoteTaking', title: 'Warm-up: personal comment — "My minimal note setup after 3 years"', status: 'published', author: 'u/markdown_mike', engagement: { up: 47, comments: 12, clicks: 0 } },
  { day: 5, sub: 'r/productivity', title: 'How I stopped losing ideas between tabs (workflow + tool I ended up building)', status: 'scheduled', author: 'u/foldernauts', engagement: null, preview: "Around month 3 of consulting I noticed I had the same idea 4 times across 4 tabs. Here's the workflow that finally stuck, and the scratchpad I built after realizing Notion was overkill for 80% of what I wrote…" },
  { day: 8, sub: 'r/NoteTaking', title: 'Show & tell: a lightweight alternative to Obsidian for fast capture', status: 'draft', author: 'u/markdown_mike', engagement: null, preview: "I've been a heavy Obsidian user for 2 years. Love it for the vault, but the startup time kills me when I have a thought in the elevator. Built this instead for the <30s capture case…" },
  { day: 11, sub: 'r/SaaS', title: 'Build in public: 0 → $12K MRR in 8 months with a note-taking tool (what worked, what didn\'t)', status: 'draft', author: 'u/foldernauts', engagement: null },
  { day: 14, sub: 'r/ObsidianMD', title: 'Saturday showcase: a companion app for quick capture → Obsidian export', status: 'draft', author: 'u/markdown_mike', engagement: null },
];

const ACTIVITY = [
  { time: '09:14', who: 'u/markdown_mike', action: 'posted', where: 'r/NoteTaking',
    body: 'Warm-up post: "My minimal note setup after 3 years" — soft mention at the end.',
    stats: { up: 47, comments: 12, saves: 8 } },
  { time: '10:32', who: 'u/quiet_jules', action: 'commented', where: 'r/productivity',
    body: 'Replied to u/pmthoughts thread "Tools that actually saved my week" — organic mention of Loomly as scratch-to-doc.',
    stats: { up: 14, replies: 3 } },
  { time: '13:08', who: 'Kibie', action: 'flagged', where: 'r/Entrepreneur',
    body: 'Skipped scheduled post. Mod auto-filter triggered on new account. Recommend holding 2 more days.',
    stats: null },
  { time: '15:41', who: 'u/notetaker_rn', action: 'replied', where: 'r/NoteTaking',
    body: 'Answered "What do you use for quick capture?" — 3-sentence reply, no link.',
    stats: { up: 22, replies: 5 } },
  { time: '18:20', who: 'u/foldernauts', action: 'posted', where: 'r/SaaS',
    body: 'Founder AMA teaser — "building a note app without VC money, AMA tomorrow 10am PT"',
    stats: { up: 31, comments: 18 } },
];

Object.assign(window, { BRAND, PLANS, CONTROL_MODES, SUBREDDITS, STAFF, CALENDAR, CONTENT_THEMES, ACTIVITY });
