/* =====================================================
   STUB / FORTHCOMING — for routes not yet built out
   ===================================================== */

const STUB_META = {
  '/products':        { eyebrow: 'PRODUCTS', title: 'Four modules. One platform.', body: 'A short hub introducing the portfolio. The four product pages — Voice, Safe, Ops, Signal — are linked from the global navigation and the homepage.' },
  '/products/safe':   { eyebrow: 'CORTEXA SAFE — SAFETY INTELLIGENCE', title: 'Every conversation, watched for the things that put your people at risk.', body: 'The Safe product page is specified in section  of the brief. Build follows the Voice template — Hero, 2×3 capability grid, scenario narrative, outputs, Understanding cross-link, closing CTA.' },
  '/products/ops':    { eyebrow: 'CORTEXA OPS — OPERATIONAL INTELLIGENCE', title: 'The right communications, in the right order, at the right time.', body: 'The Ops product page is specified in section . Three capability blocks (operator rounds, startup/shutdown, shift handover), the 06:35 round scenario, structured outputs, Understanding cross-link.' },
  '/products/signal': { eyebrow: 'CORTEXA SIGNAL — CUSTOM INTELLIGENCE', title: 'You define what matters. Cortexa finds it.', body: 'The Signal product page is specified in section . Three sections (define, evaluate, improve), representative-customer examples, Understanding cross-link.' },

  '/solutions':                            { eyebrow: 'SOLUTIONS', title: 'Solutions for the problems your operation actually has.', body: 'A hub page listing every solution grouped by buyer concern: Safety & Compliance, Operations & Procedure, Extensibility & Analytics.' },
  '/solutions/permit-to-work':             { eyebrow: 'SOLUTION', title: 'Permit-to-work, verified in conversation.', body: 'Hero, problem statement, five outcome bullets, modules that power it (Voice + Safe + optional Signal), industries.' },
  '/solutions/procedural-compliance':      { eyebrow: 'SOLUTION', title: 'The right words, in the right order, every time.', body: 'Hero, problem, what Cortexa does, modules (Voice + Ops + Signal), industries.' },
  '/solutions/shift-handover':             { eyebrow: 'SOLUTION', title: 'Nothing falls between shifts.', body: 'Hero, problem, what Cortexa does, modules (Voice + Ops), industries.' },
  '/solutions/alarm-response':             { eyebrow: 'SOLUTION', title: 'Gas, Fire & Hazard Alarm Response.', body: 'V2 detail page. Five-section template from the brief. To be expanded.' },
  '/solutions/incident-detection':         { eyebrow: 'SOLUTION', title: 'Incident Detection & Reconstruction.', body: 'V2 detail page. Five-section template from the brief. To be expanded.' },
  '/solutions/custom-detection':           { eyebrow: 'SOLUTION', title: 'Custom Event Detection.', body: 'V2 detail page. Five-section template from the brief. To be expanded.' },
  '/solutions/multilingual-operations':    { eyebrow: 'SOLUTION', title: 'Multilingual Field Operations.', body: 'V2 detail page. Five-section template from the brief. To be expanded.' },

  '/industries':                       { eyebrow: 'INDUSTRIES', title: 'Built for environments where radio is the backbone of operations.', body: 'Hub page with one card per industry — Energy, Aviation, Mining, Construction, Emergency Services, Defense, Logistics.' },
  '/industries/energy':                { eyebrow: 'INDUSTRY · ENERGY & UTILITIES', title: 'Voice intelligence built for the way energy operations actually run.', body: 'Reality paragraph, use-case list, compliance regimes, typical module mix.' },
  '/industries/aviation':              { eyebrow: 'INDUSTRY · AVIATION', title: 'Ramp, MRO, ground handling — coordinated by voice, verified by Cortexa.', body: 'Ramp ops, FOD reporting, pushback, MRO handover.' },
  '/industries/construction':          { eyebrow: 'INDUSTRY · CONSTRUCTION & HEAVY INDUSTRY', title: 'For multi-site, multilingual, multi-crew operations.', body: 'Permits, contractor tracking, multilingual briefings.' },
  '/industries/emergency-services':    { eyebrow: 'INDUSTRY · EMERGENCY SERVICES', title: 'Multi-agency communications, structured.', body: 'Incident reconstruction, multi-agency review, dispatch QA.' },
  '/industries/mining':                { eyebrow: 'INDUSTRY · MINING', title: 'Surface and underground operations, structured.', body: 'V2 industry page. Six-section template from the brief.' },
  '/industries/defense':               { eyebrow: 'INDUSTRY · DEFENSE', title: 'Multi-agency operations, training facilities, base security.', body: 'V2 industry page. Six-section template from the brief.' },
  '/industries/logistics':             { eyebrow: 'INDUSTRY · LOGISTICS & PORTS', title: 'Terminal control, cargo handling, ramp operations.', body: 'V2 industry page. Six-section template from the brief.' },

  '/platform':                       { eyebrow: 'PLATFORM', title: 'The platform underneath every Cortexa module.', body: 'Hub. Five capability bands — Understanding, Data Sovereignty, Security, Multi-Site, Integrations.' },
  '/platform/security':              { eyebrow: 'PLATFORM · SECURITY & COMPLIANCE', title: 'Engineered for regulated environments.', body: 'Role-based access, per-domain segregation, audit logging, identity integration.' },
  '/platform/multi-site':            { eyebrow: 'PLATFORM · MULTI-SITE & MULTI-CHANNEL', title: 'One platform. Every site. Every channel.', body: 'Per-site deployment + central management, per-channel configuration, cross-site insight.' },
  '/platform/integrations':          { eyebrow: 'PLATFORM · INTEGRATIONS', title: 'Connects to the radio, identity, and operational systems you already run.', body: 'PTT & PMR networks, identity providers, reporting & warehousing, notifications.' },

  '/about':   { eyebrow: 'ABOUT', title: 'A platform built for the messy reality of industrial radio.', body: 'Hero, what we do, why this matters, two-entities-one-product, partner validation, contact CTA.' },
  '/contact': { eyebrow: 'CONTACT', title: 'Talk to the team.', body: 'Form (name, work email, company, country, industry, topic, message) and direct details per region.' },
  '/demo':    { eyebrow: 'REQUEST A PILOT', title: 'Bring Cortexa to one site.', body: 'Hero, three-phase pilot timeline, pilot form, what-we-ask-for-in-return.' },

  '/legal/privacy': { eyebrow: 'LEGAL · PRIVACY', title: 'Privacy.', body: 'Stub. Privacy policy issued by Cortexa Labs Ltd, governed by the laws of England and Wales.' },
  '/legal/terms':   { eyebrow: 'LEGAL · TERMS', title: 'Terms.', body: 'Stub. Terms of service issued by the contracting entity.' },
  '/legal/cookies': { eyebrow: 'LEGAL · COOKIES', title: 'Cookies.', body: 'Stub. Cookie policy issued by the contracting entity.' },
};

function StubPage({ path }) {
  useReveal();
  const meta = STUB_META[path] || { eyebrow: 'PAGE', title: path, body: 'This route is part of the v1 sitemap but not yet built out in this design pass.' };
  return (
    <>
      <section className="on-dark" style={{ paddingTop: 96, paddingBottom: 128, borderBottom: '1px solid rgba(255,255,255,0.06)', position: 'relative', overflow: 'hidden' }}>
        <div className="bg-grid" style={{ position: 'absolute', inset: 0, opacity: 0.4 }} />
        <div style={{ position: 'absolute', inset: 0, background: 'radial-gradient(50% 70% at 75% 25%, rgba(46,125,122,0.10), transparent 70%)' }} />
        <div className="container" style={{ position: 'relative' }}>
          <SectionEyebrow text={meta.eyebrow} onDark />
          <h1 style={{ fontSize: 'clamp(44px, 6vw, 88px)', color: '#fff', marginTop: 24, maxWidth: '18ch', letterSpacing: '-0.03em', lineHeight: 1.0, fontFamily: 'var(--font-display)', fontWeight: 500 }}>
            {meta.title}
          </h1>
          <p style={{ marginTop: 28, fontSize: 17.5, color: 'var(--slate-200)', maxWidth: '60ch', lineHeight: 1.6 }}>
            {meta.body}
          </p>

          <div style={{ marginTop: 56, padding: '28px 32px', border: '1px solid rgba(255,255,255,0.10)', background: 'rgba(255,255,255,0.02)', maxWidth: 720, display: 'grid', gridTemplateColumns: 'auto 1fr', gap: '12px 24px' }}>
            <span className="font-mono" style={{ fontSize: 11, color: 'var(--slate-400)', letterSpacing: '0.14em' }}>PATH</span>
            <span className="font-mono" style={{ fontSize: 13, color: 'var(--slate-100)' }}>{path}</span>
            <span className="font-mono" style={{ fontSize: 11, color: 'var(--slate-400)', letterSpacing: '0.14em' }}>STATUS</span>
            <span className="font-mono" style={{ fontSize: 13, color: 'var(--amber)' }}>SPECIFIED · BUILD AS PER BRIEF</span>
            <span className="font-mono" style={{ fontSize: 11, color: 'var(--slate-400)', letterSpacing: '0.14em' }}>SITE</span>
            <span className="font-mono" style={{ fontSize: 13, color: 'var(--slate-100)' }}>cortexalabs.uk · GLOBAL</span>
          </div>

          <div style={{ marginTop: 40, display: 'flex', gap: 14, flexWrap: 'wrap' }}>
            <Link to="/" className="btn btn-ghost-dark">← Back to homepage</Link>
            <Link to="/platform/understanding" className="btn btn-primary">See a fully built page <span className="arrow">→</span></Link>
          </div>
        </div>
      </section>

      <ClosingCTA
        headline="Bring Cortexa to your operation."
        subhead="The fastest path through this site is a 30-minute call. We'll show you what Cortexa looks like in your environment, in your languages, on your radios."
        primary={{ label: 'Request a Pilot', to: '/demo' }}
        secondary={{ label: 'Talk to the team', to: '/contact' }}
      />
    </>
  );
}

Object.assign(window, { StubPage });
