// Industry data — one entry per sector page. Pains, tools, case study reference.

const INDUSTRIES = {
  architecture: {
    slug: "architecture",
    code: "01",
    sector: "ARCHITECTURE",
    name: "Architecture",
    painsTitle: { lead: "Where partner-hours", tail: "quietly disappear." },
    headlineLead: "Software for",
    headlineEmph: "design-led practices.",
    sub: "Project management, authority submissions, drawing review — automation that keeps the partner doing partner work, not re-typing dimensions into a council form.",
    intro: "We co-build with practising architects, so the tools fit the studio — not the other way around. Every system below has shipped, and every workflow has survived an authority deadline.",
    pains: [
      { title: "Authority submissions eat half a partner-day",
        body: "Re-typing project metadata into five different forms. Re-checking dimensions against ever-changing codes. Re-doing it when the council updates the template." },
      { title: "Drawing review bottlenecks at one screen",
        body: "Juniors can't ship without sign-off, but the partner has fourteen projects open. Comments live in PDF markups that never make it back to the model." },
      { title: "Project finances live in someone's Excel",
        body: "Fees, consultant invoices, variations, retention — all in one battered spreadsheet that broke in 2023 and nobody's fixed." },
      { title: "Client communications are scattered across email",
        body: "No single record of what was agreed, and when. Six months later, nobody can prove what was promised." },
    ],
    tools: [
      { name: "Project Pipeline",       desc: "Phase tracking, fee schedules, partner approvals — purpose-built for design-led workflow." },
      { name: "Submission Generator",   desc: "LLM-drafted authority submissions, contract addenda and consultant briefs from the live project record." },
      { name: "Drawing Reviewer",       desc: "CV that pre-flags dimensional inconsistencies and code-clash risks before they reach the partner." },
      { name: "Consultant Hub",         desc: "One dashboard for every engaged consultant with deliverable tracking and fee status." },
      { name: "Variation Tracker",      desc: "Every scope change logged against contract and fee, with partner-grade audit trail." },
      { name: "Client Portal",          desc: "Status, decisions and payment schedule visible to the client — without exposing your CAD files." },
    ],
    caseRef: "001",
    caseStudy: {
      client: "Architecture practice (NDA)",
      title: "Project management & AI document generator for a multi-disciplinary practice.",
      summary: "We rebuilt their project workflow end-to-end — phase tracking, fee schedules, partner approvals — and embedded a domain-tuned LLM that drafts authority submissions and contract addenda directly from the live project record. Half-day drafts now arrive in three minutes.",
      tags: ["Project Management", "LLM Doc-Gen", "React", "Postgres", "Role-based Access"],
      metric: "−85%", metricLabel: "draft turnaround",
    },
    practitioner: "co-developed with practising architects",
  },

  law: {
    slug: "law",
    code: "02",
    sector: "LAW",
    name: "Law",
    painsTitle: { lead: "The billable hours", tail: "nobody got around to logging." },
    headlineLead: "Software for",
    headlineEmph: "practising lawyers.",
    sub: "OCR intake, matter management, drafting — the unglamorous work of running a practice, automated. Lawyers keep authority; the software keeps the bookkeeping.",
    intro: "Built alongside practising litigators and corporate counsel — so the tools fit the matter file, the billable, and the limitation period, not a generic 'legal SaaS' template.",
    pains: [
      { title: "Scanned client documents pile up untyped",
        body: "Every new file means paralegals retyping names, dates, clauses and amounts from a pile of PDFs and photos." },
      { title: "Templates are everywhere — and out of date",
        body: "Demand letters in Word, response templates on the network drive, the version a partner actually likes in their email." },
      { title: "Court deadlines tracked across three calendars",
        body: "Outlook, the paralegal's notebook, and a print-out on the wall. Easy to miss. Expensive when you do." },
      { title: "Time entry happens at month-end",
        body: "Billable hours rebuilt from memory and old emails — every missed hour is money lost." },
    ],
    tools: [
      { name: "OCR Intake",         desc: "Scanned documents → structured matter records with bounding-box citations back to the source page." },
      { name: "Letter Drafter",     desc: "Auto-drafted demand letters and response notes against firm templates, ready for partner review." },
      { name: "Matter Pipeline",    desc: "Single source of truth per case file — pleadings, correspondence, exhibits, deadlines." },
      { name: "Deadline Tracker",   desc: "Court dates and limitation periods with escalation rules. No partner ever finds out from the other side." },
      { name: "Conflict Checker",   desc: "Cross-reference new clients against the existing matter book before you accept." },
      { name: "Time Capture",       desc: "Passive billable-hour logging from email and calendar — partner reviews, not reconstructs." },
    ],
    caseRef: "002",
    caseStudy: {
      client: "Litigation firm · regional (NDA)",
      title: "Offline-capable OCR PWA that turns scanned documents into structured matters.",
      summary: "A progressive web app that ingests scanned legal documents — affidavits, contracts, court orders — and extracts parties, dates, clauses and quantum into the matter record. Lawyers auto-draft response letters against firm templates, with every value cited back to a bounding box on the source page.",
      tags: ["OCR", "LLM Drafting", "PWA", "Offline-first", "Matter Pipeline"],
      metric: "12 min", metricLabel: "to first draft response",
    },
    practitioner: "co-developed with practising litigators",
  },

  housing: {
    slug: "housing",
    code: "03",
    sector: "HOUSING",
    name: "Real Estate",
    painsTitle: { lead: "Guesswork", tail: "dressed up as a forecast." },
    headlineLead: "Software for",
    headlineEmph: "residential investment.",
    sub: "Pricing, ROI, listing intelligence — for agencies that need to be right, not just first. Deep-learning models with confidence intervals, not vibes with a chart.",
    intro: "Co-built with investment-focused agents and analysts — so every output is a number a partner is willing to put in front of a client, with the working shown.",
    pains: [
      { title: "Price estimates are still guesswork",
        body: "One comparable, one rule of thumb, one prayer. The model an agent uses depends on the agent." },
      { title: "ROI lives in tabs and spreadsheets",
        body: "Every agent has their own broken model. Assumptions buried in cells. Updating the rental yield input takes an afternoon." },
      { title: "Listing data fragmented across portals",
        body: "Copy-pasted into a CRM that doesn't talk to anything. Stale by the time it's reviewed." },
      { title: "Trend analysis needs a data analyst you don't have",
        body: "Quarterly market briefs are six weeks late and assembled in PowerPoint by the most senior agent in the office." },
    ],
    tools: [
      { name: "Price Estimator",      desc: "Deep-learning unit-level pricing with confidence intervals and a ranked comparables panel." },
      { name: "ROI Calculator",       desc: "Multi-factor 5-year projections with assumptions you can override and audit." },
      { name: "Comparable Engine",    desc: "Auto-ranked comparables across transit proximity, yield trajectory and supply pipeline." },
      { name: "Portal Aggregator",    desc: "Listing data unified from major portals into a single ingestion-ready feed." },
      { name: "Market Brief",         desc: "One-click trend reports for client meetings — narrative + charts, partner-ready." },
      { name: "Lead Scorer",          desc: "Buyer-intent ranking from CRM activity, so agents call the right person first." },
    ],
    caseRef: "003",
    caseStudy: {
      client: "Residential investment platform (NDA)",
      title: "A deep-learning analyst for residential investment — price, trend, and ROI in one model.",
      summary: "A multi-task neural network trained on 14 years of transaction data, rental yields and supply-pipeline signals. Agents see a per-unit ROI projection, a confidence interval, and ranked comparables in one screen — instead of three tools and a spreadsheet.",
      tags: ["Deep Learning", "Time-series", "Geospatial", "Forecasting", "FastAPI"],
      metric: "±3.1%", metricLabel: "price estimation MAE",
    },
    practitioner: "co-developed with practising agents and analysts",
  },

  accounting: {
    slug: "accounting",
    code: "04",
    sector: "ACCOUNTING",
    name: "Accounting",
    painsTitle: { lead: "Eleven years of Excel", tail: "and nobody dares touch it." },
    headlineLead: "Software for",
    headlineEmph: "multi-entity practices.",
    sub: "Ledger, query, audit — for the partners who still want to write their own SQL when it matters, and the AI layer to answer when it doesn't.",
    intro: "Built with practising accountants who already know what they wish their system did differently — fewer chained VLOOKUPs, more auditable answers.",
    pains: [
      { title: "Eleven years of Excel reconciliations",
        body: "Nobody's brave enough to touch the master workbook. Everyone has a personal copy that may or may not be current." },
      { title: "Client questions take three hours to answer",
        body: "When the answer is one query away. The query, of course, lives in a partner's head." },
      { title: "Month-end means everyone's nights are gone",
        body: "Reconciliations that should run unattended require a human at every step. Errors compound." },
      { title: "Audit trail is 'I emailed Janet about it'",
        body: "Good enough until the inspector asks. Then not so much." },
    ],
    tools: [
      { name: "Unified Ledger",         desc: "Single PostgreSQL source replacing decade-old spreadsheet sprawl — with the same chart of accounts you already trust." },
      { name: "Plain-English Query",    desc: "Text → auditable SQL with line-by-line explanation, so partners verify before signing off." },
      { name: "Margin Monitor",         desc: "Automatic flagging of trending margin issues, per client, before the partner has to ask." },
      { name: "Audit Pipeline",         desc: "Every change tracked. Every figure traceable to source. Inspector-ready by default." },
      { name: "Month-End Automator",    desc: "Reconciliation pipelines that run unattended overnight — humans review exceptions only." },
      { name: "Partner Dashboard",      desc: "KPIs at the level partners actually use, not the level the BI vendor decided was 'enterprise'." },
    ],
    caseRef: "004",
    caseStudy: {
      client: "Mid-tier accounting practice (NDA)",
      title: "A unified financial ledger and AI query layer for a multi-entity practice.",
      summary: "Eleven years of spreadsheet reconciliations consolidated into a single PostgreSQL ledger, with a typed SQL interface for accountants who still want to write their own joins. The AI layer answers plain-English questions by emitting auditable SQL with line-by-line explanations.",
      tags: ["PostgreSQL", "Text-to-SQL", "Data Engineering", "BI", "Audit Trail"],
      metric: "−72%", metricLabel: "month-end hours",
    },
    practitioner: "co-developed with practising accountants",
  },

  healthcare: {
    slug: "healthcare",
    code: "05",
    sector: "HEALTHCARE",
    name: "Healthcare",
    painsTitle: { lead: "What the filing room", tail: "can't tell you in time." },
    headlineLead: "Software for",
    headlineEmph: "specialist clinics.",
    sub: "Records, cohorts, prescribing — clinical software that respects clinical judgement. The system shows its working; the clinician decides.",
    intro: "Co-built with practising specialists and clinic managers, so the tools sit alongside the consultation — not in place of it. PDPA-compliant by default; on-prem deployments available.",
    pains: [
      { title: "18 years of handwritten patient charts in a filing room",
        body: "Searching for last year's results means physically walking to a cabinet. New patients arrive with old paper too." },
      { title: "Finding a cohort needs the longest-serving nurse",
        body: "Years of knowledge held in one head. When she retires, so does the practice's ability to search itself." },
      { title: "Drug interaction checks happen by memory",
        body: "Most of the time it's fine. The exceptions are catastrophic." },
      { title: "Lab reports arrive as PDFs nobody reads twice",
        body: "Filed, forgotten, occasionally rediscovered when a patient gets worse." },
    ],
    tools: [
      { name: "Chart OCR",           desc: "Handwritten notes, lab results and Rx stubs → structured longitudinal EMR, with citation back to the original page." },
      { name: "Cohort Query",        desc: "Plain-English questions about the patient base — \"diabetic patients on metformin with HbA1c trending above 8\" — returns a clickable cohort." },
      { name: "Interaction Checker", desc: "One-click drug-interaction lookup against the patient's full chart, including notes from external prescribers." },
      { name: "Lab Intake",          desc: "PDF reports auto-parsed into the patient timeline with abnormal-result highlighting." },
      { name: "Recall Engine",       desc: "Automatic flagging of patients due for follow-up, screening or chronic-care review." },
      { name: "Prescription Pad",    desc: "Formulary-aware Rx with renewal tracking and dose-range guard-rails." },
    ],
    caseRef: "005",
    caseStudy: {
      client: "Specialist clinic group (NDA)",
      title: "From 18 years of paper charts to an AI-queryable patient record.",
      summary: "Eighteen years of handwritten patient notes, lab reports and prescription stubs digitised into a longitudinal electronic record. A medical-domain language model lets clinicians ask plain questions and returns a citation-backed cohort with one-click drug-interaction checks.",
      tags: ["OCR", "Medical NLP", "EMR", "HL7-FHIR", "PDPA-compliant"],
      metric: "96.4%", metricLabel: "chart extraction accuracy",
    },
    practitioner: "co-developed with practising clinicians",
  },

  insurance: {
    slug: "insurance",
    code: "06",
    sector: "INSURANCE",
    name: "Insurance",
    painsTitle: { lead: "Where the adjuster's day", tail: "actually goes." },
    headlineLead: "Software for",
    headlineEmph: "general insurance brokerages.",
    sub: "Claims intake, triage, fraud — workflow that lets adjusters be adjusters, not data-entry clerks with a clipboard.",
    intro: "Built with practising adjusters and brokerage operations leads, so the system supports the judgement call rather than replaces it. Adjusters retain final authority at every step.",
    pains: [
      { title: "First-notice-of-loss is still a 12-page paper form",
        body: "Or a phone call followed by a 12-page form. Either way, retyped into the system twice." },
      { title: "Minor claims still need a physical inspection",
        body: "An adjuster's day spent driving to a fender-bender that any photo would have answered." },
      { title: "Fraud signals get lost in volume",
        body: "Patterns across thousands of claims that no single adjuster can spot at their desk." },
      { title: "Adjusters spend half their time routing",
        body: "Triage, assignment and reserve-setting consume the hours that should be spent on the cases that actually need judgement." },
    ],
    tools: [
      { name: "Mobile Intake",        desc: "Capture claim, photos and policy document through one mobile flow — adjuster or claimant can use it." },
      { name: "Damage Scorer",        desc: "CV-graded severity for instant triage, with bounding-box evidence on the photo for adjuster review." },
      { name: "Fraud Classifier",     desc: "Inconsistency flags against historic patterns, surfaced with the specific signals that fired." },
      { name: "Routing Engine",       desc: "Claims auto-assigned to the right adjuster with a recommended reserve and rationale." },
      { name: "Policy OCR",           desc: "Coverage details extracted from scanned policy documents so claims start with the right context." },
      { name: "Adjuster Workbench",   desc: "A single screen with photos, policy, history and recommended actions — no tab-juggling." },
    ],
    caseRef: "006",
    caseStudy: {
      client: "General insurance brokerage (NDA)",
      title: "A claims pipeline that triages, scores and routes within seconds.",
      summary: "A claims-intake system that ingests photographs, repair invoices and policy documents through one mobile capture flow. CV scores damage severity, a fraud classifier flags inconsistencies, and a routing engine assigns each claim with a recommended reserve. Adjusters keep final authority.",
      tags: ["Computer Vision", "Fraud Detection", "Workflow Orchestration", "React Native"],
      metric: "−63%", metricLabel: "claim triage time",
    },
    practitioner: "co-developed with practising adjusters",
  },

  engineering: {
    slug: "engineering",
    code: "07",
    sector: "ENGINEERING",
    name: "Engineering",
    painsTitle: { lead: "The senior-engineer weeks", tail: "that never touch design." },
    headlineLead: "Software for",
    headlineEmph: "engineering consultancies.",
    sub: "Calcs, submissions, site reports — the unglamorous backbone of structural, civil and MEP practice, automated. Engineers retain the stamp; the software does the typing.",
    intro: "We co-build with practising engineers — structural, civil, MEP — so every tool fits the design office and the site visit, not a generic project-management template. PE-stamped output, traceable working, locally compliant.",
    pains: [
      { title: "Design calculations live in 14 spreadsheet versions",
        body: "Master.xlsx, Master_v2.xlsx, Master_v2_FINAL.xlsx — and the one a senior engineer actually trusts is on their laptop, not the network." },
      { title: "Authority submissions are a paperwork tax",
        body: "Form D, Form QP, structural plans, calculations — same data re-typed into five formats with different field names. A senior engineer-week per project, wasted." },
      { title: "Site reports get written twice",
        body: "Once on a clipboard at site, once back at the office in Word. Photos live in WhatsApp. The next inspector starts again from scratch." },
      { title: "Drawing markups never make it back to the model",
        body: "RFIs answered on a PDF, edits made on a different PDF, and the central model lags both. Three weeks later, nobody knows what's current." },
    ],
    tools: [
      { name: "Calc Library",          desc: "Versioned, peer-reviewed calculation templates with locked assumptions and inline citations to the governing code." },
      { name: "Submission Generator",  desc: "Authority submissions auto-drafted from the live project record — BCA, LTA, PUB, JTC formats, ready for QP review." },
      { name: "Site Report Capture",   desc: "Mobile flow for inspections — photo, location, defect tag, voice note — landing as a structured report before you're back at the office." },
      { name: "RFI Tracker",           desc: "Every RFI logged against drawing, sheet and revision, with status and aging visible at the partner dashboard." },
      { name: "Drawing Register",      desc: "Single source of truth for issued drawings — revisions, transmittals, recipient log — no more 'which version did we send?'." },
      { name: "Project Margin Monitor",desc: "Live fee burn vs phase, flagging projects that are quietly going underwater before month-end does." },
    ],
    caseRef: null,
    noCase: true,
    practitioner: "in co-development with practising engineers",
    cohortNote: "Pilot cohort opens Q3 2026 — three firms, six-month engagement, full source on delivery.",
  },

  consulting: {
    slug: "consulting",
    code: "08",
    sector: "CONSULTING",
    name: "Consulting",
    painsTitle: { lead: "The unbilled hours", tail: "that drain the practice." },
    headlineLead: "Software for",
    headlineEmph: "boutique advisory firms.",
    sub: "Proposals, knowledge, time — the unbilled hours that drain a consulting practice, automated. Partners stay senior; the system handles the leverage.",
    intro: "Built alongside practising strategy and management consultants who already know what their stack should do. Knowledge that compounds, proposals that don't start from scratch, time entries that don't depend on memory.",
    pains: [
      { title: "Every proposal starts from a blank document",
        body: "Or worse — from a half-remembered deck a partner used in 2023. Reusable assets exist; finding them takes longer than rewriting." },
      { title: "Engagement knowledge dies when the analyst rolls off",
        body: "Six months of frameworks, models and interview notes — boxed up in a SharePoint folder nobody opens again." },
      { title: "Utilisation is a month-end argument",
        body: "Partners and senior associates reconstructing where the week went from calendar archaeology. The associate's version disagrees with the timesheet." },
      { title: "Client deliverables fork uncontrollably",
        body: "Three versions of the deck circulating in email by Tuesday. By Friday, nobody knows which one the partner approved." },
    ],
    tools: [
      { name: "Proposal Composer",     desc: "Auto-drafted proposals from the firm's case library, partner CVs and pricing rules — partner reviews, doesn't write from scratch." },
      { name: "Knowledge Vault",       desc: "Engagement artefacts indexed and queryable in plain English — frameworks, interviews, models, sanitised outputs." },
      { name: "Time Capture",          desc: "Passive utilisation from calendar + Slack + email, mapped to engagement codes — partner reviews exceptions only." },
      { name: "Deliverable Register",  desc: "Single source of truth for what's been sent, when, to whom, with read receipts and partner-approval state." },
      { name: "Engagement Pipeline",   desc: "Sales pipeline tied to capacity — never sell what you can't staff, and see it the week the gap appears, not after." },
      { name: "Partner Dashboard",     desc: "Margin, mix, pipeline and utilisation at partner-meeting cadence, not BI-tool cadence." },
    ],
    caseRef: null,
    noCase: true,
    practitioner: "in co-development with practising consultants",
    cohortNote: "Pilot cohort opens Q3 2026 — three firms, six-month engagement, full source on delivery.",
  },

  fnb: {
    slug: "fnb",
    code: "09",
    sector: "F&B",
    name: "Food & Beverage",
    painsTitle: { lead: "Where the margin", tail: "leaks after close." },
    headlineLead: "Software for",
    headlineEmph: "restaurant groups.",
    sub: "Costing, inventory, orders, rosters — the back-of-house spreadsheets that quietly bleed margin, automated. Operators keep the recipes; the software keeps the numbers honest.",
    intro: "We co-build with operators who actually run the pass — so the tools fit the outlet, the supplier run and the Friday-night rush, not a generic POS add-on. Multi-outlet by default; works with the till you already have.",
    pains: [
      { title: "Recipe costs drift the moment suppliers move",
        body: "Food-cost percentages set six months ago, supplier prices that change weekly, and a dish that's quietly losing money on every order." },
      { title: "Inventory and waste run on gut feel",
        body: "Stock counts in a notebook, par levels in someone's head, and end-of-night waste that nobody logs until it's a budget problem." },
      { title: "Orders arrive on five different channels",
        body: "Dine-in, phone, and three delivery apps — each with its own tablet, its own beep, and its own way of getting an order wrong." },
      { title: "Rosters and labour cost are a weekly puzzle",
        body: "Scheduling built around who's available, not forecast covers — so you're overstaffed on a quiet Tuesday and slammed on Saturday." },
    ],
    tools: [
      { name: "Recipe & Costing",     desc: "Live food-cost per dish that recalculates as supplier prices move — flagging the items eating your margin." },
      { name: "Inventory & Waste",    desc: "Stock counts, par levels and waste logging with auto-reorder suggestions before you run out mid-service." },
      { name: "Order Aggregator",     desc: "Dine-in, phone and every delivery-app order in one queue — one screen, one source of truth for the kitchen." },
      { name: "Roster Planner",       desc: "Labour-cost-aware scheduling against forecast covers, so staffing matches demand, not guesswork." },
      { name: "Supplier Hub",         desc: "Purchase orders, invoices and price history per supplier — catch the silent price creep automatically." },
      { name: "Outlet Dashboard",     desc: "Sales, margin and waste per outlet at a glance — partner-ready, not buried in the POS export." },
    ],
    caseRef: null,
    noCase: true,
    practitioner: "in co-development with practising operators",
    cohortNote: "Pilot cohort opens Q3 2026 — three outlets, six-month engagement, full source on delivery.",
  },

  sales: {
    slug: "sales",
    code: "10",
    sector: "SALES",
    name: "Sales",
    painsTitle: { lead: "The revenue machinery", tail: "stuck in one rep's spreadsheet." },
    headlineLead: "Software for",
    headlineEmph: "sales-led teams.",
    sub: "Pipeline, quoting, commission, forecast — the revenue machinery that lives in one rep's spreadsheet, rebuilt as a system. Reps keep selling; the software keeps the numbers straight.",
    intro: "Built alongside working sales leaders and reps — so the tools fit the deal cycle, the comp plan and the Monday forecast call, not a bloated enterprise CRM nobody updates. Tied to revenue, not vanity activity.",
    pains: [
      { title: "Pipeline lives in one rep's head",
        body: "And a spreadsheet that's stale by Tuesday. When the rep is out — or leaves — the deals go with them." },
      { title: "Every quote starts from a blank document",
        body: "Pricing pulled from an old email, a discount nobody approved, and a proposal that takes a day to assemble." },
      { title: "Commission is a month-end argument",
        body: "Reconciled by hand from three spreadsheets — and the rep's number never agrees with finance's number." },
      { title: "Forecasts are vibes, not numbers",
        body: "Best-guess close dates, optimism baked in, and a quarter-end that surprises everyone every single quarter." },
    ],
    tools: [
      { name: "Pipeline CRM",       desc: "Opportunities, stages and next-actions tied to revenue — so the forecast reflects reality, not optimism." },
      { name: "Quote Builder",      desc: "Configured quotes and proposals from a live product and pricing catalog, with approval rules baked in." },
      { name: "Commission Engine",  desc: "Auto-calculated, auditable commission with per-rep statements — the argument ends before it starts." },
      { name: "Forecast Model",     desc: "Weighted pipeline plus historical close-rates with a confidence band, not a hopeful sum of best cases." },
      { name: "Lead Router",        desc: "Inbound leads scored and assigned in seconds, so the right rep calls the right prospect first." },
      { name: "Rep Dashboard",      desc: "Quota, pipeline and activity in one view — the numbers reps actually use to run their week." },
    ],
    caseRef: null,
    noCase: true,
    practitioner: "in co-development with working sales teams",
    cohortNote: "Pilot cohort opens Q3 2026 — three teams, six-month engagement, full source on delivery.",
  },
};

// Slugs that have a full landing page (Hero / Pains / Tools / etc).
// "general" is intentionally NOT a page — the Nav routes it to #contact.
const INDUSTRY_ORDER = ["architecture", "law", "housing", "accounting", "healthcare", "insurance", "engineering", "consulting", "fnb", "sales"];

// "Other / General" tile metadata — used by Nav dropdown only.
// Has no slug, no page — clicking routes to the contact section.
const INDUSTRY_GENERAL = {
  code: "11",
  sector: "OTHER",
  name: "Your firm isn't here?",
  sub: "We co-build with most professional-services workflows. Tell us about yours.",
};

// Detect page context so Nav can rewrite links correctly.
// - Main index.html → section ids scroll-spy locally
// - industries/<slug>.html → links to "../index.html#section"
// - about.html → also a sub-page; same treatment as industry pages for nav links
function getPageContext() {
  const p = (typeof window !== "undefined" ? window.location.pathname : "");
  const isIndustryPage = p.includes("/industries/") || (typeof window !== "undefined" && !!window.__INDUSTRY_SLUG);
  const isAboutPage = (typeof window !== "undefined" && !!window.__ABOUT_PAGE)
    || /(^|\/)about\.html?$/i.test(p);
  // Anything that isn't the main index.html acts as a "sub-page" for routing.
  const isSubPage = isIndustryPage || isAboutPage;
  return {
    isIndustryPage,
    isAboutPage,
    isSubPage,
    slug: typeof window !== "undefined" ? window.__INDUSTRY_SLUG : null,
    // On main page: hash anchors scroll. On sub-pages: navigate to main.
    linkToMain: (id) => isSubPage ? `index.html#${id}` : `#${id}`,
    // Industry links work the same from anywhere; industry pages use
    // <base href="../"> so this resolves correctly there too.
    linkToIndustry: (slug) => `industries/${slug}.html`,
    linkToRoot: () => isSubPage ? "index.html" : "#top",
  };
}

Object.assign(window, { INDUSTRIES, INDUSTRY_ORDER, INDUSTRY_GENERAL, getPageContext });
