// data.jsx — mode copy, sample properties, readiness data

// Mode-aware copy
const MODES = {
  renter: {
    key: "renter",
    label: "Renting",
    icon: "key",
    goalShort: "2-bed in Dublin 6",
    goalDate: "by September 2026",
    interception: "Sep 18, 2026",
    interceptionShort: "Sep 18",
    interceptionDeltaDays: -12,
    metricLabel: "Move-in date",
    heroHeadline: "The keys, by the date you set.",
    heroSub: "Set your goal. We watch every Irish portal, draft your application, and tell you exactly when you'll have the keys.",
    primaryCta: "Set your goal",
    secondaryCta: "See how it works",
    weAreNot: "We're not another listings board. We're the AI that gets you in the door — first.",
    todayThing: "Two new D6 listings just dropped. We've drafted your viewing requests — review and send in one tap.",
    proofLine: "Built for the 600,000 renters Daft has stopped serving.",
    pricingTier: "Searcher",
    pricingPrice: 19,
  },
  saving: {
    key: "saving",
    label: "Saving to buy",
    icon: "stairs",
    goalShort: "First home in Kildare",
    goalDate: "by Q3 2027",
    interception: "Aug 04, 2027",
    interceptionShort: "Aug 04",
    interceptionDeltaDays: -34,
    metricLabel: "Mortgage-ready date",
    heroHeadline: "The plan that ends with the keys.",
    heroSub: "Set your goal. We read your real spending, model every scheme, and tell you exactly when you'll be mortgage-ready.",
    primaryCta: "Set your goal",
    secondaryCta: "See how it works",
    weAreNot: "We're not a mortgage calculator. We're the agent that gets you mortgage-ready and tells you when.",
    todayThing: "Cancel two unused subscriptions in your AIB account — it pulls your mortgage-ready date forward by 6 weeks.",
    proofLine: "We model AIB, BOI, PTSB, Avant, Haven, ICS, Finance Ireland — at today's live rates.",
    pricingTier: "Buyer",
    pricingPrice: 39,
  },
  buying: {
    key: "buying",
    label: "Buying now",
    icon: "home",
    goalShort: "3-bed semi in Wicklow",
    goalDate: "by Q2 2027",
    interception: "Apr 14, 2027",
    interceptionShort: "Apr 14",
    interceptionDeltaDays: -21,
    metricLabel: "Keys-in-hand date",
    heroHeadline: "Mission control for the biggest move of your life.",
    heroSub: "Set your goal. We score every property, fill every form, and tell you exactly when you'll have the keys.",
    primaryCta: "Set your goal",
    secondaryCta: "See how it works",
    weAreNot: "We're not a property portal. We're a buying agent in your pocket — without the 1.5% commission.",
    todayThing: "12 Beechwood Park, Bray went sale-agreed Tuesday. The chain looks fragile — we're watching for it to fall through.",
    proofLine: "Live-priced against the Property Price Register, planning portals and BER history.",
    pricingTier: "Buyer",
    pricingPrice: 39,
  },
  parent: {
    key: "parent",
    label: "Helping your kid",
    icon: "handshake",
    goalShort: "Help Conor onto the ladder",
    goalDate: "by Q4 2027",
    interception: "Nov 06, 2027",
    interceptionShort: "Nov 06",
    interceptionDeltaDays: -28,
    metricLabel: "Joint readiness date",
    heroHeadline: "Get your kid onto the ladder. Properly.",
    heroSub: "Set the goal together. We run the CAT thresholds, draft the gift letter, and keep sibling fairness honest — on one shared dashboard.",
    primaryCta: "Set your goal",
    secondaryCta: "See how it works",
    weAreNot: "We're not a forum or a Facebook group. We're the family-finance copilot for the biggest gift you'll ever give.",
    todayThing: "Your €60k gift to Conor uses 17.9% of his Group A CAT threshold. Niamh's still got hers untouched — fairness register updated.",
    proofLine: "CAT Group A & B thresholds, gift-letter wording, sworn declarations — all up-to-date with Revenue 2026.",
    pricingTier: "Family",
    pricingPrice: 59,
  },
  upsizing: {
    key: "upsizing",
    label: "Upsizing",
    icon: "stairs",
    goalShort: "4-bed family home in Malahide",
    goalDate: "by Q3 2027",
    interception: "Sep 22, 2027",
    interceptionShort: "Sep 22",
    interceptionDeltaDays: -19,
    metricLabel: "Chain-complete date",
    heroHeadline: "Sell the 2-bed. Land the family home.",
    heroSub: "Set your goal. We choreograph the chain, model the bridging finance, and tell you exactly when the keys to the new place are yours.",
    primaryCta: "Set your goal",
    secondaryCta: "See how it works",
    weAreNot: "We're not an estate agent. We're the chain choreographer that stops your move falling apart.",
    todayThing: "Your buyer's solicitor hasn't requisitioned title — 4 days lost. We've drafted the chase to McCann FitzGerald; one tap to send.",
    proofLine: "Live equity tracker · stamp duty at the higher tier · chain risk modelled hourly.",
    pricingTier: "Buyer",
    pricingPrice: 39,
  },
  downsizing: {
    key: "downsizing",
    label: "Downsizing",
    icon: "home",
    goalShort: "2-bed bungalow near Maeve",
    goalDate: "by Q1 2028",
    interception: "Feb 18, 2028",
    interceptionShort: "Feb 18",
    interceptionDeltaDays: -45,
    metricLabel: "Right-size date",
    heroHeadline: "Let go of the big house. Carefully.",
    heroSub: "Set your goal. We model the equity release, find the right-sized home near the people who matter, and pace the process to your life.",
    primaryCta: "Set your goal",
    secondaryCta: "See how it works",
    weAreNot: "We're not pushing you to move. We're the calm second opinion when you're ready — and patient when you're not.",
    todayThing: "Three 2-bed bungalows within 8 minutes of Maeve's house came on this week. Two have step-free entry — your physio flagged this matters.",
    proofLine: "Equity-release modelling · care-proximity filter · estate-planning view · sentiment-aware pace.",
    pricingTier: "Buyer",
    pricingPrice: 39,
  },
  investment: {
    key: "investment",
    label: "Investment",
    icon: "chart",
    goalShort: "1-bed BTL in Limerick city",
    goalDate: "by Q2 2027",
    interception: "Jun 03, 2027",
    interceptionShort: "Jun 03",
    interceptionDeltaDays: -16,
    metricLabel: "First tenant date",
    heroHeadline: "Buy the rental. Not the headache.",
    heroSub: "Set your goal. We model net yield after every Irish tax quirk, score each property as a landlord asset, and run the RTB compliance for you.",
    primaryCta: "Set your goal",
    secondaryCta: "See how it works",
    weAreNot: "We're not a hype channel. We're the underwriter that tells you when a BTL doesn't make sense — and why.",
    todayThing: "47 Henry Street, Limerick: 7.2% gross yield, BER C2, no RPZ uplift cap. Sold-price comps say €5k below asking is the move.",
    proofLine: "RTB landlord registration · gross / net yield with USC + PRSI · RPZ cap modelled · void-month buffer.",
    pricingTier: "Buyer",
    pricingPrice: 39,
  },
};

// Readiness matrix per mode
const READINESS = {
  renter: [
    { id: "deposit", label: "Deposit ready", state: "green", detail: "€3,400 — 2 months' rent + buffer", action: null },
    { id: "income", label: "Income proof", state: "green", detail: "3 payslips verified via Open Banking", action: null },
    { id: "savings", label: "Savings history", state: "green", detail: "8 months of consistent €700/mo", action: null },
    { id: "refs", label: "References secured", state: "yellow", detail: "1 of 2 confirmed — chase Karen at Murphy & Co.", action: "Send reminder" },
    { id: "rtb", label: "RTB history clean", state: "green", detail: "No prior disputes" },
    { id: "id", label: "PPS / ID verified", state: "green", detail: "Documents in vault" },
    { id: "bank", label: "Bank account clean", state: "green", detail: "No flags last 6 months" },
    { id: "pack", label: "Application pack", state: "yellow", detail: "Draft saved — polish intro letter", action: "Polish with AI" },
    { id: "afford", label: "Affordability cushion", state: "green", detail: "Net income 3.4× target rent" },
    { id: "movein", label: "Move-in funds liquid", state: "red", detail: "Need €1,200 more for first bills + agent fee", action: "See plan" },
  ],
  saving: [
    { id: "deposit", label: "Deposit on track", state: "yellow", detail: "€38,200 saved · 76% to target (€50k)", action: "See plan" },
    { id: "aip", label: "AIP secured", state: "red", detail: "Not started — 4 lenders pre-matched for you", action: "Start AIP" },
    { id: "credit", label: "Credit profile", state: "green", detail: "Clean CCR · no missed payments 24 months" },
    { id: "emp", label: "Employment stability", state: "green", detail: "Permanent · 4y 2m · probation passed" },
    { id: "ratio", label: "Affordability ratio", state: "green", detail: "3.1× LTI · comfortably within mortgage limits" },
    { id: "debt", label: "Existing debt", state: "yellow", detail: "Car loan €218/mo — reduces borrowing by €52k", action: "Model paydown" },
    { id: "htb", label: "HTB eligibility", state: "green", detail: "Eligible · €30,000 refund modelled" },
    { id: "fhs", label: "First Home Scheme", state: "yellow", detail: "Eligible — adds €50k buying power, decide by Sep", action: "Compare" },
    { id: "source", label: "Source of funds", state: "red", detail: "€8,400 lodgement from 11 Mar unexplained", action: "Add explanation" },
    { id: "stamp", label: "Stamp duty + fees ready", state: "yellow", detail: "€4,200 of €6,800 reserved", action: "Set aside" },
    { id: "gift", label: "Family gift declared", state: "green", detail: "€10k from parents · gift letter co-signed" },
    { id: "sol", label: "Solicitor instructed", state: "red", detail: "Not yet — 3 vetted firms shortlisted", action: "Choose" },
  ],
  buying: [
    { id: "deposit", label: "Deposit ready", state: "green", detail: "€68,000 · 12.4% of target price" },
    { id: "aip", label: "AIP active", state: "green", detail: "AIB · €510,000 · valid to 18 Jul 2027" },
    { id: "credit", label: "Credit profile", state: "green", detail: "Clean CCR · no missed payments" },
    { id: "emp", label: "Employment stability", state: "green", detail: "Both incomes permanent · joint app" },
    { id: "ratio", label: "Affordability ratio", state: "green", detail: "3.4× joint LTI · within limits" },
    { id: "sol", label: "Solicitor instructed", state: "green", detail: "Hayes & Partners · on standby" },
    { id: "survey", label: "Surveyor lined up", state: "yellow", detail: "Two firms quoted — pick one", action: "Decide" },
    { id: "source", label: "Source of funds", state: "green", detail: "All lodgements documented" },
    { id: "stamp", label: "Stamp duty + fees", state: "green", detail: "€7,200 in instant-access" },
    { id: "buyerpack", label: "Buyer pack", state: "green", detail: "Cover, AIP, proof of funds, ID — one tap" },
    { id: "shortlist", label: "Shortlist scored", state: "yellow", detail: "3 active leads · 1 sale-agreed watching", action: "Open shortlist" },
    { id: "negotiate", label: "Negotiation coach", state: "green", detail: "Comparables ready for Beechwood Park" },
  ],
  parent: [
    { id: "cap", label: "Your gift capacity", state: "green", detail: "Up to €82,000 without CAT implications" },
    { id: "cat", label: "CAT Group A tracker", state: "yellow", detail: "Conor: €60k of €335k used (17.9%) after this gift", action: "See breakdown" },
    { id: "fair", label: "Sibling fairness register", state: "yellow", detail: "Niamh: €0 received. Owed equivalent.", action: "Set aside" },
    { id: "gift", label: "Gift letter (joint)", state: "green", detail: "Drafted · awaiting Dad's e-signature", action: null },
    { id: "deed", label: "Deeds structure clear", state: "green", detail: "Pure gift · you're not on the deeds (correct)" },
    { id: "kid-savings", label: "Conor's savings", state: "yellow", detail: "€19,200 · needs €31k of his own contribution", action: "See his plan" },
    { id: "kid-aip", label: "Conor's AIP", state: "red", detail: "Not yet started — we've pre-matched lenders", action: "Start with Conor" },
    { id: "kid-credit", label: "Conor's credit profile", state: "green", detail: "Clean CCR · no flags" },
    { id: "stamp", label: "Stamp duty + fees", state: "green", detail: "€5,400 reserved jointly" },
    { id: "ftb", label: "FTB / HTB preserved", state: "green", detail: "Structure protects Conor's first-time buyer status" },
  ],
  upsizing: [
    { id: "equity", label: "Current home equity", state: "green", detail: "€212,000 free after mortgage redemption" },
    { id: "value", label: "Current home valued", state: "green", detail: "€465k · 2 surveyors, 3-week average" },
    { id: "list", label: "Listed for sale", state: "yellow", detail: "Live 11 days · 14 viewings · no offer at asking", action: "Repricing model" },
    { id: "buyer", label: "Buyer identified", state: "red", detail: "Not yet — 2 offers below asking, both reviewed", action: "Counter" },
    { id: "aip", label: "Upsize AIP", state: "green", detail: "BOI · €720,000 · valid to 04 Aug 2027" },
    { id: "ratio", label: "Joint LTI within limits", state: "green", detail: "3.2× combined · headroom of €38k" },
    { id: "bridge", label: "Bridging finance ready", state: "yellow", detail: "Avant short-term facility pre-approved · 5.9%", action: "Compare" },
    { id: "stamp", label: "Stamp duty higher tier", state: "green", detail: "1% modelled at €7,200 — already reserved" },
    { id: "chain", label: "Chain risk monitored", state: "yellow", detail: "Your seller's chain has 3 links — 1 fragile", action: "See chain" },
    { id: "sol", label: "Solicitor on both sides", state: "green", detail: "Hayes & Partners briefed on simultaneous close" },
    { id: "moving", label: "Move-day logistics", state: "red", detail: "School transfer not yet filed — 12-week notice", action: "File now" },
    { id: "cgt", label: "Principal residence relief", state: "green", detail: "No CGT on sale — PPR full 9 years" },
  ],
  downsizing: [
    { id: "equity", label: "Current home equity", state: "green", detail: "€520,000 free · mortgage redeemed in 2019" },
    { id: "value", label: "Valuation refreshed", state: "green", detail: "€640k · in line with PPR comps" },
    { id: "release", label: "Equity release modelled", state: "green", detail: "€340k freed after right-size · €18k/yr drawdown plan" },
    { id: "tax", label: "PPR / CGT clean", state: "green", detail: "Principal residence — no CGT exposure" },
    { id: "cat", label: "Estate planning view", state: "yellow", detail: "Will current to 2019 — needs refresh post-move", action: "Update" },
    { id: "right", label: "Right-size criteria set", state: "green", detail: "2-bed · single storey · garden · ≤8 min Maeve's" },
    { id: "access", label: "Step-free accessibility", state: "yellow", detail: "Physio flagged stairs · 12 of 18 candidates pass", action: "Filter" },
    { id: "care", label: "Care-proximity scored", state: "green", detail: "Tallaght Hospital · GP · Maeve · 6 min radius" },
    { id: "pace", label: "Sentiment-aware pace", state: "yellow", detail: "You paused 9 days last week. We respect that.", action: "Adjust pace" },
    { id: "sol", label: "Solicitor instructed", state: "green", detail: "Maguire & Co. · briefed on dual transaction" },
    { id: "buyer", label: "Buyer for old home", state: "red", detail: "Not listed yet — agent-direct pack drafted", action: "Go live" },
  ],
  investment: [
    { id: "cash", label: "Cash for deposit + costs", state: "green", detail: "€68,000 · 30% LTV deposit + buffer" },
    { id: "btl-aip", label: "BTL mortgage AIP", state: "yellow", detail: "ICS · €175k · 4.45% · valid to Oct 2026", action: "Refresh" },
    { id: "yield", label: "Net yield model", state: "green", detail: "5.1% net after USC, PRSI, mgmt, voids · 7.2% gross" },
    { id: "rpz", label: "RPZ status checked", state: "green", detail: "Limerick city centre · 2% cap modelled for 24 months" },
    { id: "btl-credit", label: "Existing credit clean", state: "green", detail: "No flags · existing PPR mortgage current" },
    { id: "ltv", label: "Overall LTV at limit", state: "yellow", detail: "Combined property LTV 67% — €30k more would breach", action: "See cap" },
    { id: "rtb", label: "RTB landlord registration", state: "red", detail: "Required within 1 month of first tenancy", action: "Pre-file" },
    { id: "tax", label: "Tax structure decided", state: "yellow", detail: "Personal vs Ltd · €1,840/yr difference modelled", action: "Compare" },
    { id: "insure", label: "Landlord insurance quoted", state: "green", detail: "AXA · €418/yr · contents + loss of rent" },
    { id: "mgmt", label: "Management strategy", state: "yellow", detail: "Self-manage vs 8% agent · 4hr/mo difference", action: "Decide" },
    { id: "void", label: "Void-month buffer", state: "red", detail: "€2,800 reserve needed — currently €0", action: "Set aside" },
    { id: "sol", label: "Solicitor + tax adviser", state: "green", detail: "Walls & Toomey · BTL-specialised, briefed" },
  ],
};

// Sample properties (shared across all modes for the property intel demo)
const PROPERTIES = [
  {
    id: "p1",
    address: "12 Beechwood Park, Bray",
    eircode: "A98 X1Y2",
    type: "3-bed semi · 112 m²",
    price: 495000,
    score: 92,
    ber: "B3",
    days: 3,
    photo: "https://images.unsplash.com/photo-1568605114967-8130f3a36994?auto=format&fit=crop&w=600&q=70",
    pros: ["+12 min DART to your office", "Within €15k of your AIP", "BER B3 — bills modelled at €98/mo"],
    cons: ["Asking is 3% above sold comps in this Eircode"],
    flag: null,
  },
  {
    id: "p2",
    address: "44 Glenview Avenue, Bray",
    eircode: "A98 K4L8",
    type: "3-bed end-terrace · 96 m²",
    price: 465000,
    score: 81,
    ber: "C1",
    days: 14,
    photo: "https://images.unsplash.com/photo-1576941089067-2de3c901e126?auto=format&fit=crop&w=600&q=70",
    pros: ["€30k below your AIP ceiling", "BER C1 — upgrade to B3 with SEAI grant"],
    cons: ["28 min commute at 8:30am (your usual)", "Planning application 50m away: 12-unit apartment"],
    flag: "Planning watch",
  },
  {
    id: "p3",
    address: "8 Killarney Heights, Greystones",
    eircode: "A63 R8M2",
    type: "3-bed semi · 108 m²",
    price: 525000,
    score: 74,
    ber: "B2",
    days: 21,
    photo: "https://images.unsplash.com/photo-1518780664697-55e3ad937233?auto=format&fit=crop&w=600&q=70",
    pros: ["Excellent BER · bills €72/mo", "9 min walk to St Brigid's NS"],
    cons: ["€15k above your AIP — would need top-up", "Time on market: 21 days · room to negotiate"],
    flag: "Stale — bid low",
  },
];

// Mortgage application form fields (for the auto-fill animation)
const MORTGAGE_FIELDS = [
  { label: "Applicant 1 — Full Name", value: "Aoife Brennan", group: 1 },
  { label: "PPS Number", value: "8765432W", group: 1 },
  { label: "Date of Birth", value: "14 / 06 / 1993", group: 1 },
  { label: "Marital Status", value: "Cohabiting", group: 1 },
  { label: "Employer", value: "Stripe Payments Ireland", group: 2 },
  { label: "Gross Annual Income", value: "€78,500", group: 2 },
  { label: "Employment Type", value: "Permanent · 4y 2m", group: 2 },
  { label: "Applicant 2 — Full Name", value: "Cian O'Sullivan", group: 3 },
  { label: "Gross Annual Income", value: "€64,200", group: 3 },
  { label: "Combined LTI Ratio", value: "3.41×", group: 3 },
  { label: "Property — Target Price", value: "€495,000", group: 4 },
  { label: "Deposit (12.4%)", value: "€61,380", group: 4 },
  { label: "HTB Refund Applied", value: "€30,000", group: 4 },
  { label: "Source of Deposit", value: "Personal savings + HTB", group: 4 },
  { label: "Loan Required", value: "€433,620", group: 4 },
  { label: "Term", value: "30 years", group: 4 },
];

window.MODES = MODES;
window.READINESS = READINESS;
window.PROPERTIES = PROPERTIES;
window.MORTGAGE_FIELDS = MORTGAGE_FIELDS;
