// content-tiers.jsx — LIFE180 brand tokens + main pyramid content model.
// Config-driven per the master spec: nothing about tiers/streams is hardcoded
// into the components — they read from L180_DATA.

window.L180_BRAND = {
  cyan: "#1FC9E5",
  green: "#24CE62",
  navy: "#141415",
  navy2: "#0F0F10",
  ink: "#0A0A0B",
  // risk gradient (Conservative -> Aggressive)
  risk: ["#1FC9E5", "#24CE62", "#FBBF24", "#F97316", "#DC2626"],
  riskLabels: ["Conservative", "Conservative–Moderate", "Moderate", "Growth", "Aggressive"],
};

// Shared calendar scheduler. Used by streams with funnelType "schedule" and by
// the "Schedule a call" buttons inside the educational pop-ups.
window.L180_SCHEDULE_URL = ""; // TODO: calendar scheduler link (Calendly / GHL booking, etc.)

// Each tier: geometry (topW/botW for the trapezoid), positioning, tagline,
// and three streams. Each stream carries the three depth layers
// (website / funnel / agent) so the agent toggle can surface deeper content.
window.L180_TIERS = [
  {
    n: 5, name: "Tax & Legacy", positioning: "Efficiency, Protection & Heritage",
    tagline: "Build it, protect it, pass it on.",
    topW: 168, botW: 300,
    intro: "The M4 — the Millionaires' 4 Objectives: increase return, increase control, decrease risk, decrease tax exposure.",
    streams: [
      {
        name: "Tax Strategy", cta: "Run the Tax Diagnostic", funnelType: "diagnostic",
        one: "Stop donating to the IRS by accident — find the buckets quietly taxing your future.",
        purpose: "Find the buckets quietly taxing your future and stop overpaying the IRS.",
        website: "Three types of money, a 'tax bucket' diagnostic, and the most common mistakes — with a teaser snapshot PDF.",
        funnel: "Full tax-position diagnostic, Roth conversion ladder, asset-location strategy, income-shifting, Design-specific considerations.",
        agent: "Custom tax-positioning analysis, multi-year projection modeling, CPA / tax-attorney coordination, and Tier 3 foundation-asset integration for tax-free income.",
        secondary: { label: "View Example", kind: "example" },
        edu: {
          kind: "example",
          eyebrow: "The three buckets of money",
          headline: "Taxed later vs. never taxed again",
          lead: "Most people pile everything into accounts the IRS gets to tax on the way out — at rates nobody can predict. A foundation strategy moves more of your future income into the bucket that's never taxed again.",
          compare: {
            left: {
              title: "Tax-Deferred (401k / Traditional IRA)",
              points: [
                "Taxed as ordinary income when you withdraw",
                "RMDs force withdrawals whether you need them or not",
                "You're betting future tax rates stay low",
                "The IRS is a silent partner in the balance",
              ],
            },
            right: {
              title: "Tax-Free (Roth + Whole Life)",
              points: [
                "Qualified withdrawals come out tax-free",
                "No required minimum distributions",
                "Growth compounds with no annual tax drag",
                "You control when and how income is taken",
              ],
            },
          },
          close: "Same balance — very different spendable income. The goal isn't just to save, it's to keep what you saved.",
          ctaLabel: "Schedule a strategy call",
          disclaimer: "For educational purposes only and not tax advice. Retirement-account rules, contribution limits, and tax treatment vary by situation and can change. Whole life is subject to underwriting and carrier approval, and dividends are not guaranteed. Consult a licensed tax professional before acting.",
        },
      },
      {
        name: "Asset Protection", cta: "Map My Vulnerabilities", funnelType: "tool",
        one: "What you don't protect, you don't really own. See where you're exposed.",
        purpose: "Map where you're exposed so what you've built can't be taken.",
        website: "What asset protection is and isn't, the basic toolbox, and a personal vulnerability map. Teaser PDF.",
        funnel: "State-specific exemptions, entity basics (LLC / S-corp / C-corp), layering, trust structures, and Design-specific entity recommendations.",
        agent: "Custom roadmap, entity-formation strategy, attorney coordination, pre-litigation planning, and operating agreements.",
        secondary: { label: "View Example", kind: "example" },
        edu: {
          kind: "example",
          eyebrow: "Exposed vs. protected",
          headline: "What you don't protect, you don't really own",
          lead: "One lawsuit, one judgment, one creditor can reach assets sitting in your own name. Structure and exemptions put a wall between what you've built and what can be taken.",
          compare: {
            left: {
              title: "Held in your own name",
              points: [
                "Exposed to lawsuits and judgments",
                "Creditors can reach it directly",
                "Commingled — one claim can touch everything",
                "No barrier between you and a plaintiff",
              ],
            },
            right: {
              title: "Properly structured*",
              points: [
                "Entities and trusts separate the risk",
                "State exemptions shield key assets*",
                "Layered so one claim can't reach it all",
                "Whole life cash value protected in many states*",
              ],
            },
          },
          close: "Asset protection isn't about hiding — it's about owning what you've built in a way no single event can undo.",
          ctaLabel: "Schedule a strategy call",
          disclaimer: "*Asset protection and creditor exemptions vary significantly by state and are not absolute. For educational purposes only and not legal advice. Entity and trust structures must be properly established and maintained to be effective. Consult a licensed attorney for your situation.",
        },
      },
      {
        name: "Estate & Legacy", cta: "Find My Legacy Gap", funnelType: "reflection",
        one: "Inheritance transfers money. Heritage transfers meaning. Build both.",
        purpose: "Pass on both the money and the meaning — efficiently and on purpose.",
        website: "Inheritance vs. heritage, the basic toolbox (wills, trusts, beneficiaries, directives, POAs), and a legacy gap map.",
        funnel: "Revocable vs. irrevocable trusts, generation-skipping, beneficiary audits, spousal coordination, Design-specific legacy considerations.",
        agent: "Full estate needs analysis, trust strategy, heritage planning (values transfer, family meetings, written legacy statements), and Legacy OS integration.",
        secondary: { label: "View Example", kind: "example" },
        edu: {
          kind: "example",
          eyebrow: "Inheritance vs. heritage",
          headline: "Pass on the money — and the meaning",
          lead: "An inheritance transfers dollars. A heritage transfers values, intent, and the story behind the money. The strongest plans do both — efficiently and on purpose.",
          compare: {
            left: {
              title: "No plan in place",
              points: [
                "Probate — public, slow, and costly",
                "The state decides who gets what",
                "Heirs receive money with no context",
                "Taxes and fees erode the transfer",
              ],
            },
            right: {
              title: "Intentional estate + legacy plan",
              points: [
                "Trusts transfer privately and quickly",
                "You decide who, what, and when",
                "Values and intent passed on with the money",
                "Structured to minimize tax and friction",
              ],
            },
          },
          close: "Money with no meaning gets spent. Money with a story gets stewarded. Plan for both.",
          ctaLabel: "Schedule a strategy call",
          disclaimer: "For educational purposes only and not legal or tax advice. Estate, trust, and probate rules vary by state and change over time. Documents must be properly drafted and executed to be effective. Consult a licensed estate attorney.",
        },
      },
    ],
  },
  {
    n: 4, name: "Investor Pathways", positioning: "Choose the Path That Fits How You're Wired", routing: true,
    tagline: "There is no universal best — only what's aligned for you.",
    topW: 300, botW: 432,
    intro: "Four Investor Designs. Each one builds wealth differently — the right path is the one that matches how you're actually wired. Every Design then shares the same Growth Layer.",
    streams: [
      {
        name: "The Founder", cta: "Explore the Founder Path", funnelType: "founder",
        one: "Designed to build. Products, teams, and systems that scale — the enterprise is the vehicle.",
        purpose: "Turn a business into a wealth engine — structure, cash flow, and exit.",
        website: "Business as the vehicle — building something people pay for, repeatedly, at scale.",
        funnel: "Founder path deep dive: entity structure, cash-flow extraction, foundation-asset integration as business capital, and exit-readiness planning.",
        agent: "Founder path assignment with operating entity strategy, IP protection, revenue-to-asset deployment plan, and Tier 5 legacy integration.",
      },
      {
        name: "The Steward", cta: "Explore the Steward Path", funnelType: "steward",
        one: "Designed to compound. Dirt, doors, and discipline — wealth through property you can see, improve, and control.",
        purpose: "Find the real-estate entry point that fits your capital and capacity today.",
        website: "Real estate as the vehicle — from passive REITs to active development. Your entry point depends on your current capacity.",
        funnel: "Full Steward sub-pyramid: six levels from passive REIT foundation through active commercial development, calibrated to your risk profile and capital.",
        agent: "Steward path assignment with entry-level calibration, financing strategy, Tier 3 foundation-asset integration, and deal-flow education track.",
      },
      {
        name: "The Artisan", cta: "Explore the Artisan Path", funnelType: "artisan",
        one: "Designed to master and guide. Elite skill or trusted advice, converted into ownership.",
        purpose: "Convert premium income into lasting assets before the income stops.",
        website: "Your expertise is the engine — the goal is converting premium income into lasting assets before the income stops.",
        funnel: "Artisan path deep dive: income optimization, practice entity strategy, foundation-asset as income bridge, and transition planning.",
        agent: "Artisan path assignment with income-to-asset conversion strategy, practice protection, and tax-positioning tied to high-income years.",
      },
      {
        name: "The Originator", cta: "Explore the Originator Path", funnelType: "originator",
        one: "Designed to create. IP, creative output, and bold bets — wealth built through what only you can make.",
        purpose: "Turn ideas and IP into assets that pay you long after the work is done.",
        website: "Ideas, content, and intellectual property as the vehicle — building assets that pay you long after the work is done.",
        funnel: "Originator path deep dive: IP structuring, licensing strategy, foundation-asset as creative runway, and monetization architecture.",
        agent: "Originator path assignment with IP-holding entity structure, royalty and licensing strategy, and Tier 3 foundation-asset as funding for the next creative leap.",
      },
      {
        name: "The Growth Layer", cta: "Explore the Growth Layer", funnelType: "growth",
        one: "Shared by every Design. Research, allocation, and patient compounding in the markets.",
        purpose: "Build a market portfolio calibrated to your risk tolerance and time horizon.",
        website: "Every Design ends up here — markets as the shared growth engine, from index foundations to conviction positions. Your risk tolerance shapes your pyramid.",
        funnel: "Full Growth Layer sub-pyramid: six levels from foundation allocation through peak speculative positions, with risk-profile filtering across Conservative, Moderate, Growth, and Aggressive.",
        agent: "Growth Layer build-out with risk-tolerance assessment, portfolio construction strategy, time-horizon overlay, and continuous education track — layered on top of whichever Design the client leads with.",
      },
    ],
  },
  {
    n: 3, name: "Savings & Velocity", positioning: "Your Foundation Asset — Where Everything Gets Built",
    tagline: "The same dollar, doing more jobs.",
    topW: 432, botW: 564,
    intro: "Everyone needs the same foundation. What sits on top depends on your Design.",
    streams: [
      {
        name: "The 6 Jobs of Money", cta: "See One Dollar, Six Jobs", funnelType: "edu",
        embed: "/six-jobs.html?v=6",
        one: "Most dollars do one job. A foundation dollar does six — all at the same time.",
        purpose: "Make every dollar do six jobs at once instead of just one.",
        website: "An interactive look at the same dollar doing one job in a savings account versus six jobs inside a foundation asset, side by side.",
        funnel: "Each of the six jobs explored in depth and compared to its traditional single-job equivalent.",
        agent: "Client-specific modeling of the consolidation savings from making one dollar do six jobs.",
        edu: {
          kind: "education",
          eyebrow: "The 6 Jobs of Money",
          headline: "One dollar. Six jobs.",
          lead: "Traditionally, you save a dollar and it does exactly one thing — it sits in an account and waits. A properly built foundation asset asks one dollar to do six jobs at once, without giving any of them up.",
          contrast: {
            traditional: "A dollar in a savings account earns a little interest. One job. Done.",
            foundation: "The same dollar in a foundation asset is your emergency fund AND opportunity capital AND a volatility buffer AND tax-advantaged growth AND protection AND legacy.",
          },
          items: [
            { name: "Emergency", body: "Cash you can reach in days, not weeks — without a penalty or a credit check." },
            { name: "Opportunity", body: "Capital that's ready the moment a deal, a downturn, or an idea shows up." },
            { name: "Volatility", body: "A stable bucket you draw from so you're never forced to sell investments at a loss." },
            { name: "Growth", body: "Compounding that keeps working even while the dollar is busy doing every other job." },
            { name: "Protection", body: "A death benefit and living benefits that guard the family if life doesn't go to plan." },
            { name: "Legacy", body: "What's left transfers efficiently — heritage, not just inheritance." },
          ],
          close: "That's the whole idea behind this tier: stop making your dollars choose one job. Make each one do six.",
          ctaLabel: "Schedule a call with an agent",
        },
      },
      {
        name: "Debtor, Saver, Optimizer", cta: "Which One Are You?", funnelType: "edu",
        embed: "/debtor-saver-optimizer.html?v=8",
        one: "Debtor, saver, or optimizer? Three people, three very different outcomes.",
        purpose: "See which of the three money personalities your dollars are living out today.",
        website: "An interactive look at how a debtor, a saver, and an optimizer each handle the same dollar over time — and why only one keeps compounding.",
        funnel: "Account-by-account review with education on how each test's relevance changes by life stage.",
        agent: "Full reposition strategy across accounts, with tax considerations.",
        edu: {
          kind: "education",
          eyebrow: "The Three Tests",
          headline: "Debtor. Saver. Builder.",
          lead: "Where your money sits says a lot about which of three people you are. A debtor's money works for the bank. A saver's money sits still. A builder's money passes all three tests below — so it can be put to work again and again.",
          items: [
            { name: "Liquidity", body: "Can you get to it — fast, in full, without permission? A debtor's money is trapped in things they owe on. A builder keeps capital reachable." },
            { name: "Use", body: "Can you use the money and still have it working? A saver parks a dollar and it stops. A builder borrows against it so it keeps growing while it's deployed." },
            { name: "Control", body: "Do you control it — or does a bank, a plan administrator, or the IRS? A builder keeps the rules in their own hands." },
          ],
          close: "Run your own accounts through the three tests. Whatever fails isn't really your foundation yet.",
          ctaLabel: "Schedule a call with an agent",
        },
      },
      {
        name: "The Best Place to Save", cta: "Schedule a Strategy Call", funnelType: "schedule",
        one: "Where do we believe the best place to save is?",
        purpose: "See why a foundation dollar stays liquid, protected, and always working.",
        secondary: { label: "View Example", kind: "example" },
        website: "Why a properly designed whole life policy is the strongest place to save a foundation — with a worked example of one dollar recycling.",
        funnel: "Velocity scenarios — real estate down payments, business capital, debt extinguishment — with the mechanics behind each.",
        agent: "Custom velocity strategy tied to the client's Design path and live opportunity pipeline.",
        edu: {
          kind: "example",
          eyebrow: "Worked example",
          headline: "The Best Place to Save — side by side",
          image: {
            src: "assets/best-place-to-save-example.png",
            alt: "Best Place to Save Money calculator comparing a fixed account vs. whole life insurance across 30 years",
          },
          assumptions: {
            inputs: [
              { label: "Year 1 Front-Load", value: "$0" },
              { label: "Annual Savings", value: "$12,000" },
              { label: "Current Age", value: "35" },
              { label: "Term Rider", value: "20 Years" },
              { label: "Fixed Account Rate", value: "3.5%" },
              { label: "Tax on Gains", value: "25.0%" },
            ],
            note: "Taxes on growth hit the fixed account every year. Whole life cash value grows tax-deferred — and you can access it tax-free through policy loans.",
            rates: [
              { label: "10-Year Treasury", now: "4.24%", avg: "3.15%" },
              { label: "HYSA (Top Banks)", now: "4.50%", avg: "1.50%" },
              { label: "12-Month CD", now: "4.00%", avg: "1.75%" },
            ],
          },
          compare: {
            left: {
              title: "Fixed Savings Account",
              points: [
                "Growth taxed every single year",
                "Rates fluctuate — nothing guaranteed",
                "No living or death benefits",
                "No asset protection",
                "Liquid — but that's all it does",
              ],
            },
            right: {
              title: "Whole Life Policy",
              points: [
                "Grows tax-deferred",
                "Guaranteed growth + dividends — no wild swings",
                "Living + death benefits included",
                "Asset protection*",
                "Liquid — borrow without interrupting growth",
              ],
            },
          },
          disclaimer: "*Asset protection varies by state. For educational purposes only and not a guarantee of future results. Whole life coverage is subject to underwriting and carrier approval, and dividends are not guaranteed. Consult a licensed professional before making any decisions.",
          close: "Same dollars, more outcomes — liquidity, protection, and growth in one place. Want to see it run on your numbers?",
          ctaLabel: "Schedule a strategy call",
        },
      },
    ],
  },
  {
    n: 2, name: "Foundational Floor", positioning: "Build the Floor Before the Ceiling",
    tagline: "Defense before offense.",
    topW: 564, botW: 696,
    intro: "You can't build wealth on a foundation that can be wiped out. Protect the engine before you push the gas.",
    video: "",
    streams: [
      {
        name: "Cash Flow & Debt Design", cta: "Design My Cash Flow", funnelType: "tool",
        one: "Find the money that's sleeping, then align every debt — defense before offense.",
        purpose: "Free up the money that's sleeping and put every debt on defense before offense.",
        website: "A combined walkthrough: income, expenses, surplus vs. deficit, and money working vs. sleeping — plus a debt inventory sorted aligned / misaligned / neutral. Visual breakdown + teaser PDF.",
        funnel: "Full cash-flow design and debt analysis together: leak-point identification, surplus deployment, payoff and restructuring scenarios, and order-of-attention ranking.",
        agent: "HELM integration for ongoing tracking, plus full restructuring strategy and modeling of debt-extinguishing scenarios using foundation assets.",
      },
      {
        name: "Wealth Protection Assessment", cta: "Map My Protection Gaps", funnelType: "diagnostic",
        one: "Defense before offense — protect who and what matters most.",
        purpose: "Map your protection gaps so a single event can't wipe out everything you've built.",
        website: "Top protection categories, a short diagnostic per category, and a green / yellow / red gap map. Teaser PDF.",
        funnel: "Adds health / HSA strategy, business protection, coverage-adequacy modeling, and coverage-type education.",
        agent: "Full needs analysis using human-life-value methodology, carrier-specific recommendations, and underwriting pre-screening.",
      },
      {
        name: "Aligned Wealth Blueprint", cta: "Open the Blueprint", funnelType: "tool", agentOnly: true,
        link: "", // TODO: scheduling-call link for now; software workflow coming later
        one: "The educational wing — every asset across Secure, Structure, and Grow, in one living map.",
        website: "Agent-guided education across all 30 asset vaults.",
        funnel: "Agent-guided education across all 30 asset vaults.",
        agent: "Agent-driven education across the three pillars — Secure (what guards the life you're building), Structure (how your money is organized), and Grow (where your money works for you) — spanning all 30 asset vaults and linking directly into the Aligned Wealth software.",
      },
      {
        name: "Financial X-Ray", cta: "Run My Financial X-Ray", funnelType: "diagnostic",
        link: "", // TODO: hosted X-Ray fact-finder slug
        one: "Our in-depth fact-finder — a full picture of where you are and where you're heading.",
        purpose: "Capture a full, honest picture of where you are and where you're heading.",
        website: "A guided fact-finder you can complete yourself: assets, liabilities, cash flow, protection, and goals — producing a clear snapshot of your current position.",
        funnel: "The complete fact-finder across every category, building the data picture the whole plan stands on.",
        agent: "Agent-led X-Ray walkthrough with the client — or client self-complete — capturing the full financial picture that feeds the Aligned Wealth Blueprint and every downstream strategy.",
      },
    ],
  },
  {
    n: 1, name: "Clarity and Alignment", positioning: "Where are you trying to go?",
    tagline: "Aligning your values with your money.",
    topW: 696, botW: 828,
    intro: "We believe in personal growth and expansion — and in aligning your money with your values and beliefs. You will never outgrow yourself, so before anything else, you get clear on who you're becoming.",
    video: "",
    streams: [
      {
        name: "Investor Design Assessment", cta: "Discover Your Design", funnelType: "dna", isGateway: true,
        link: "https://alignedwealth.app/assessment/life180",
        one: "What type of wealth creator are you? Find your Investor Design.",
        purpose: "Reveal how you're wired to build wealth so we can route you to the path that fits.",
        website: "A guided assessment that reveals your wealth-creation wiring — Founder, Steward, Artisan, or Originator — and the path that fits how you're actually built.",
        funnel: "Full Design assessment with risk-tolerance calibration and current-reality routing into the right pathway pyramid.",
        agent: "Complete Design profile with primary + secondary wiring, a risk overlay, and an agent-facing report that routes the client to their sub-pyramid and entry level.",
      },
      {
        name: "Clarity Experience", cta: "Begin the Clarity Experience", funnelType: "reflection",
        link: "https://alignedwealth.app/clarity/life180",
        one: "How do you really view money? See where you're aligned today.",
        purpose: "Align your money with your real values and beliefs before any strategy begins.",
        website: "A guided experience that surfaces how you view money and what you truly value — so your strategy is aligned with your beliefs instead of fighting them.",
        funnel: "Full clarity exercise: money beliefs, values ranking, lifestyle and legacy prompts, and 'what does enough look like.'",
        agent: "Full worksheet, a separate spousal version for alignment-gap comparison, and a written clarity statement reviewed live.",
      },
      {
        name: "Clarity Check", cta: "Find My Freedom Number", funnelType: "diagnostic",
        link: "https://alignedwealth.app/retirement-check/life180",
        one: "Do you know the answers to the 4 most important numbers behind your Freedom Number?",
        purpose: "Surface the four numbers behind your Freedom Number and where you stand today.",
        website: "A quick questionnaire across the four numbers most people can't answer — the inputs that reveal your Freedom Number and exactly where you stand against it.",
        funnel: "Full questionnaire walkthrough: each of the four numbers, how they interact, and the gap between where you are today and your Freedom Number.",
        agent: "Live modeling of the four answers, scenario testing, and the plan to close the gap to the client's Freedom Number.",
      },
    ],
  },
];
