// Data-driven sub-pages: services hub, 4 service pages, for hub, 6 vertical pages

const {
  SubHero, ObservationGrid, ProcessRail, StatRow, DeliverablesList,
  FaqList, FitLine, SubCTA, HubGrid
} = window;

// ========================================================================
// /services — hub
// ========================================================================

const ServicesHub = () => (
  <React.Fragment>
    <SubHero
      eyebrow="Services"
      h2Line1="The four things we do"
      h2Line2="before the pipeline runs."
      body="Four capabilities sit underneath every outbound pipeline we run. Clean data. Signal-based targeting. Deliverability that lands. An audit that tells you which of the three is actually the problem. You can run one or run the stack. Most teams start where the biggest gap is."
      sig="Engagements are how you buy. Capabilities are what we do."
    />
    <HubGrid columns={2} cards={[
      {
        eyebrow:'01 Enrichment',
        h3:'Pipeline-ready data, not a half-filled CRM.',
        body:"Single-vendor enrichment tops out around 30–40% fill. We run a waterfall across multiple sources, validate every field, then write back natively to Dynamics 365, Salesforce, or HubSpot. No CSVs.",
        stats:'70%+ fill · $0.10/record · 2–4 weeks · direct CRM write-back',
        cta:'How the waterfall works',
        href:'#/services/crm-enrichment'
      },
      {
        eyebrow:'02 Outbound',
        h3:'The list is the message.',
        body:"Most outbound fails at targeting, not copy. Better writing won't save a list built on assumptions. We map the observable events that mean someone's in-market and hand-write sequences for the committee around each signal.",
        stats:'signal-based targeting · human-written sequences · committee mapping',
        cta:'The targeting playbook',
        href:'#/services/outbound-strategy'
      },
      {
        eyebrow:'03 Deliverability',
        h3:'Inbox, not spam. Verified weekly.',
        body:"Dedicated sending domains, full SPF/DKIM/DMARC, warmup protocols that run 2–3 weeks before the first cold email ships, and seed-list tests across Gmail, Outlook, and Yahoo. Your primary domain never touches cold outreach.",
        stats:'~95% inbox placement · weekly seed testing · primary domain protected',
        cta:'What the infra looks like',
        href:'#/services/deliverability-setup'
      },
      {
        eyebrow:'04 Audit',
        h3:'Thirty minutes on your CRM, live.',
        body:"We screen-share into your CRM, score fill rates, flag duplicates, size the enrichment opportunity, and send a written report inside 24 hours. If enrichment moves the needle we'll say so. If it doesn't, we'll say that too. Free either way.",
        stats:'30 min · live walkthrough · 24-hour report · D365 / SF / HubSpot',
        cta:'What the audit covers',
        href:'#/services/crm-audit'
      }
    ]}/>
    <section style={{background:'var(--bone)', padding:'100px 0', borderBottom:'1px solid var(--rule)'}}>
      <div style={{maxWidth:1200, margin:'0 auto', padding:'0 40px', display:'grid', gridTemplateColumns:'260px 1fr', gap:80}} className="two-col">
        <div style={{position:'sticky', top:100, alignSelf:'start'}}>
          <div style={{fontFamily:'var(--mono)', fontSize:11, letterSpacing:'0.14em', textTransform:'uppercase', color:'var(--ink-3)', display:'flex', alignItems:'center', gap:10, marginBottom:20}}>
            <span style={{width:5, height:5, borderRadius:'50%', background:'var(--accent)'}}/>How it connects
          </div>
          <h2 style={{fontFamily:'var(--serif)', fontSize:40, lineHeight:1.08, letterSpacing:'-0.02em', fontWeight:400, margin:0}}>
            Run one.<br/><span style={{fontStyle:'italic'}}>Or run the chain.</span>
          </h2>
        </div>
        <div>
          <p style={{fontFamily:'var(--serif)', fontSize:22, lineHeight:1.55, color:'var(--ink-2)', margin:0}}>
            Enrichment decides whether targeting is possible. Targeting decides whether messaging is relevant. Deliverability decides whether any of it reaches a human. Most teams buy these from three different vendors and watch them fail to line up. We run the whole chain so each step makes the next one work harder. Start wherever the biggest gap is. The audit tells you which gap that is.
          </p>
          <div style={{fontFamily:'var(--mono)', fontSize:12, letterSpacing:'0.04em', color:'var(--ink-3)', marginTop:32, lineHeight:1.7}}>
            ↳ If you'd rather see these bundled as an engagement, Pipeline-first pilot, TAM audit, or the 90-day reset live on the <a href="#/" style={{color:'var(--accent)'}}>homepage</a>.
          </div>
        </div>
      </div>
    </section>
    <SubCTA
      h2Line1="Not sure which one you need?"
      h2Line2="The audit answers that in thirty minutes."
      body="Screen-share, live walkthrough, written report inside 24 hours. No pitch attached."
    />
  </React.Fragment>
);

// ========================================================================
// /services/crm-enrichment
// ========================================================================

const ServiceCrmEnrichment = () => (
  <React.Fragment>
    <SubHero
      eyebrow="Services · Enrichment"
      h2Line1="Pipeline-ready data."
      h2Line2="Not a half-filled CRM."
      body="Single-vendor enrichment tops out around 30–40% fill. That's half your records still guessing. We run a waterfall across multiple sources, validate every field, and write back natively to your CRM. No CSVs, no manual imports, no spreadsheet round-trip."
      sig="The list is the message. This is how the list gets built."
    />
    <ObservationGrid
      eyebrow="Why single-source fails"
      h2="One provider only has what one provider has."
      intro="Apollo, ZoomInfo, Cognism, Clearbit, all of them cover different slices of the same world. A waterfall treats each one as a filter in series, keeping the first valid match for every field. The cost per record stays around $0.10 because providers only charge when they're the one who returns the answer."
      cards={[
        { tag:'Observation A', h3:'Single-vendor ceilings are real.', body:'Apollo is strong in NA B2B. ZoomInfo is strong in US mid-market. Cognism is strong in EMEA. Clearbit is strong on tech-stack. Buy any one of them and you inherit that one sweet spot.' },
        { tag:'Observation B', h3:'Missing fields compound downstream.', body:'An empty phone number is one row. An empty phone number times 10,000 records is a dead outbound motion, a guessing AE team, and a forecast nobody trusts.' },
        { tag:'Observation C', h3:'Validation matters more than volume.', body:'An email that bounces hurts sender reputation. A cell phone that rings a stranger burns the rep on the call. Validated data is the only kind worth writing back.' },
        { tag:'Observation D', h3:'CSVs are a lie.', body:"If the data lives in a spreadsheet next to the CRM, the sales team is working off the stale copy. Write-back happens natively or it doesn't count."}
      ]}
    />
    <ProcessRail
      eyebrow="How the waterfall runs"
      h2="Four steps, in this order."
      subhead="Nothing exotic. What's unusual is running all four on the same record, with the same care, start to finish."
      steps={[
        { tag:'scope', h3:'Define the target list.', body:'We start from your ICP, not your total addressable market. A 5,000-row list enriched to 70%+ beats a 50,000-row list enriched to 30%, every time. The audit gives us the scope.' },
        { tag:'run', h3:'Waterfall across providers.', body:'Records route through Apollo, ZoomInfo, Cognism, Clearbit and a handful of specialist tools. First valid match wins. Fields we still lack route to the next provider in sequence. Clay orchestrates.' },
        { tag:'validate', h3:'Verify every field.', body:'Emails validated against SMTP. Phone numbers validated against line-type and carrier. Titles cross-checked against LinkedIn. Nothing writes back until it passes.' },
        { tag:'write', h3:'Native CRM write-back.', body:'Direct API into Dynamics 365, Salesforce, or HubSpot. Custom objects, custom fields, dedup rules respected. No intermediate spreadsheet, no Dataloader batch job.' }
      ]}
    />
    <StatRow
      eyebrow="What it tends to ship"
      stats={[
        { n:'70%+', label:'Fill rate on target list' },
        { n:'$0.10', label:'Per record, all-in' },
        { n:'2–4 wk', label:'Turnaround, kickoff to delivery' },
        { n:'100%', label:'Direct CRM write-back' }
      ]}
    />
    <DeliverablesList
      eyebrow="What you get"
      h2="A written deliverable, not a dashboard."
      items={[
        'Target list scoped and validated against your ICP.',
        'Enriched records in the CRM, in the exact fields your team already uses.',
        'Verified emails, direct dials, titles, and firmographic fields.',
        'Duplicate detection and dedup applied to write-back.',
        'Technographic and intent fields where the providers have them.',
        'Documentation of what each field came from and how it was validated.'
      ]}
    />
    <FaqList
      eyebrow="FAQ"
      items={[
        { q:"What if we already run Apollo or ZoomInfo?", a:"Good. We keep your existing contract and layer the waterfall on top. The single-vendor coverage becomes the floor, not the ceiling. Most engagements see fill rate roughly double without changing the incumbent tool." },
        { q:"Do you work with custom objects?", a:"Yes. Salesforce custom objects, Dynamics custom entities, HubSpot custom objects across all tiers. The write-back respects your schema, your validation rules, and your dedup logic." },
        { q:"Where does the data come from?", a:"Apollo, ZoomInfo, Cognism, Clearbit are the anchor providers. LeadMagic, Hunter, Dropcontact, Prospeo, ContactOut rotate in for gap-filling. Each provider only charges when it's the one returning a field, which keeps cost around $0.10 per record." },
        { q:"How fast is a first pass?", a:"A typical 5,000-row list takes 2–4 weeks from kickoff to full write-back. Larger lists extend proportionally, but the 2-week mark is usually where the first validated batch is live in the CRM." }
      ]}
    />
    <FitLine text="This runs standalone, or as the input layer to signal-based outbound. See /services for the full stack."/>
    <SubCTA
      h2Line1="Want to see your fill rate, live?"
      h2Line2="Thirty minutes on your CRM."
      body="Screen-share, fill-rate score, enrichment opportunity sized, written report inside 24 hours. Free either way."
    />
  </React.Fragment>
);

// ========================================================================
// /services/outbound-strategy
// ========================================================================

const ServiceOutboundStrategy = () => (
  <React.Fragment>
    <SubHero
      eyebrow="Services · Outbound"
      h2Line1="The list is the message."
      h2Line2="Targeting carries the writing."
      body="Most outbound fails at targeting, not copy. Better writing won't save a list built on assumptions. We map the observable events that mean someone's in-market, hires, funding rounds, stack changes, leadership moves, and hand-write sequences for the committee around each signal. No templates with a name token."
      sig="AI does the research. A human does the sending."
    />
    <ObservationGrid
      eyebrow="What breaks most outbound"
      h2="The inbox learned to pattern-match."
      intro="A sophisticated reader knows the shape of an AI sequence inside the first line. Once they know, the message is dead before it's read. The fix isn't better prompts. It's a smaller list, sharper signals, and sentences written by someone who read the signal."
      cards={[
        { tag:'Observation A', h3:'Volume is what you do when you don\'t know who to talk to.', body:'Ten messages to the right ten people beats ten thousand to a hand-waved ICP, every time, on every metric that matters. The word for this isn\'t personalization. It\'s relevance.' },
        { tag:'Observation B', h3:'Signals exist. Read them.', body:'A new VP in the role that owns your problem. A funding round that unlocks budget. A stack change that creates an integration point. These are events in the world, not guesses.' },
        { tag:'Observation C', h3:'B2B sales are committee sales.', body:'One persona is never the whole picture. The economic buyer, the technical evaluator, the end user, and the champion all have different questions. We map the committee per signal.' },
        { tag:'Observation D', h3:'Copy is finishing work.', body:'Once the list and the signal are right, the sequence writes itself in a way it never does cold. A human sits down and writes it. Not an agent. Not a template with a merge field.' }
      ]}
    />
    <ProcessRail
      eyebrow="How we build the motion"
      h2="Four steps, in this order."
      subhead="Signal, message, delivery. Strategy before copy, targeting before volume, and every step documented so the motion can be handed to an AE team."
      steps={[
        { tag:'icp', h3:'Read the last 10–20 closed deals.', body:'Your actual customer base tells us the pattern. Industry, employee count, funding stage, stack, role of the buyer. This becomes the ICP, not a guess, not a workshop output.' },
        { tag:'signals', h3:'Select observable signals.', body:'For each ICP segment, we identify two to four signals that reliably indicate an in-market moment. Hiring a role, a funding round, a leadership change, a product launch, a regulatory shift.' },
        { tag:'committee', h3:'Map the buying committee.', body:'Per segment, we map who you actually need to reach. Economic buyer, technical evaluator, end user, champion. Each gets a different sequence, different angle, same underlying signal.' },
        { tag:'write', h3:'Hand-write the sequences.', body:'A human writes every first email, reply, and follow-up. AI does the research underneath, reading LinkedIn, parsing news, finding the signal. A person writes the sentence that earns the reply.' }
      ]}
    />
    <StatRow
      eyebrow="What it tends to ship"
      stats={[
        { n:'3–4 wk', label:'Kickoff to first meetings' },
        { n:'~15%', label:'Reply rate on signal segments' },
        { n:'1-to-1', label:'Human-written sequences' },
        { n:'~95%', label:'Inbox placement' }
      ]}
    />
    <DeliverablesList
      eyebrow="What you get"
      h2="A documented motion, not a retainer of activity."
      items={[
        'ICP definition sourced from your closed-won deals, not from a workshop.',
        'Signal map: which events to watch for, per segment, with sources.',
        'Committee map: which roles to reach per account, in what order.',
        'Human-written sequences per segment and per persona.',
        'Sending infrastructure: dedicated domains, warmup, deliverability setup.',
        'Weekly reporting on reply rate, meeting rate, and signal coverage.'
      ]}
    />
    <FaqList
      eyebrow="FAQ"
      items={[
        { q:"Do you send, or do you build the motion for us?", a:"Both are on the table. Most engagements start with us running sending ourselves so the motion proves out quickly, then hand off to an in-house AE or SDR team once the signals and sequences are documented. Some engagements stay with us long-term." },
        { q:"What if our ICP isn't defined?", a:"Then enrichment and outbound both come second. The audit usually tells us within twenty minutes whether the ICP needs work before anything else. If it does, we'll say so on the call." },
        { q:"How many emails a day?", a:"Low. The opposite of spray-and-pray. A signal-based motion usually ships tens of messages a day per rep, not thousands. The volume is a function of how many in-market signals actually surfaced that week." },
        { q:"What about LinkedIn?", a:"Used in parallel when the buyer lives there. HeyReach for LinkedIn outbound alongside email. It's a channel, not a replacement." }
      ]}
    />
    <FitLine text="Targeting runs on top of clean data. See /services/crm-enrichment for the input layer, or /services for the full stack."/>
    <SubCTA
      h2Line1="Want the motion scoped?"
      h2Line2="Start with a thirty-minute audit."
      body="We'll look at your CRM, size the signals that work for your market, and tell you whether the method fits before either side commits."
    />
  </React.Fragment>
);

// ========================================================================
// /services/deliverability-setup
// ========================================================================

const ServiceDeliverabilitySetup = () => (
  <React.Fragment>
    <SubHero
      eyebrow="Services · Deliverability"
      h2Line1="Inbox, not spam."
      h2Line2="Verified weekly."
      body="Dedicated sending domains, full SPF/DKIM/DMARC, warmup protocols that run 2–3 weeks before the first cold email ships, and seed-list tests that tell you where your mail is actually landing across Gmail, Outlook, and Yahoo. Your primary domain never touches cold outreach."
      sig="Delivery is a technical problem. It has a technical answer."
    />
    <ObservationGrid
      eyebrow="Why delivery fails"
      h2="The inbox isn't a math problem."
      intro="It's a filter. Gmail, Outlook, and Yahoo each apply their own rules, and those rules change. A setup that landed last quarter may be landing in spam this quarter. Weekly verification catches drift before it becomes a silent outage."
      cards={[
        { tag:'Observation A', h3:'Primary domains are for customers.', body:'Cold outreach from your primary domain is how a sender reputation built over years gets torched in months. Dedicated sending domains keep the brand domain clean.' },
        { tag:'Observation B', h3:'Warmup isn\'t optional.', body:'A cold domain that sends 500 emails day one looks like a bot to every filter on earth. Warmup runs 2–3 weeks before the first real message ships. The schedule is boring and it works.' },
        { tag:'Observation C', h3:'Records drift.', body:'SPF, DKIM, and DMARC get misconfigured, overwritten, or drift out of sync when someone touches DNS. We verify the records weekly and re-certify after any change.' },
        { tag:'Observation D', h3:'Seed tests surface silence.', body:'Bounce rate tells you almost nothing. Inbox placement tells you everything. Seed tests across Gmail, Outlook, and Yahoo show where the messages actually land, primary, promotions, spam, or missing.' }
      ]}
    />
    <ProcessRail
      eyebrow="How the infrastructure is set up"
      h2="Four steps, then weekly verification."
      subhead="Nothing fancy. What's unusual is running the whole chain, cleanly, and then not touching it except to verify."
      steps={[
        { tag:'domains', h3:'Buy and configure sending domains.', body:'Dedicated domains separate from your primary brand domain. Usually 2–5 per engagement depending on volume. Each one gets full SPF, DKIM, and DMARC records.' },
        { tag:'warmup', h3:'Run the 2–3 week warmup.', body:'Gradual send-volume ramp through warmup networks. The domain establishes a sending reputation with Gmail, Outlook, and Yahoo before any cold mail ships. Boring, necessary, non-negotiable.' },
        { tag:'seed', h3:'Seed-test the placement.', body:'Controlled inboxes across every major provider. We send a sample, read where it landed, and tune from there. Placement target is ~95% primary inbox, verified, not claimed.' },
        { tag:'verify', h3:'Re-check every week.', body:'Seed tests re-run weekly. DNS records re-checked. Sending volume monitored for drift. If placement slips, we catch it before the team does.' }
      ]}
    />
    <StatRow
      eyebrow="What it tends to ship"
      stats={[
        { n:'~95%', label:'Inbox placement, verified' },
        { n:'2–3 wk', label:'Domain warmup before first send' },
        { n:'Weekly', label:'Seed-list verification' },
        { n:'0%', label:'Cold mail from primary domain' }
      ]}
    />
    <DeliverablesList
      eyebrow="What you get"
      h2="Infrastructure the team doesn't have to think about."
      items={[
        'Dedicated sending domains, purchased and configured.',
        'SPF, DKIM, and DMARC records set, verified, and documented.',
        'Warmup schedule run start-to-finish before any cold mail ships.',
        'Seed-list placement report across Gmail, Outlook, and Yahoo.',
        'Sending-platform setup in Instantly or SmartLead (or the CRM-native tool).',
        'Weekly verification and a report when placement drifts.'
      ]}
    />
    <FaqList
      eyebrow="FAQ"
      items={[
        { q:"Does this work on our existing domain?", a:"It can, but we'd rather you didn't. Your primary domain is worth more than the few weeks of warmup a dedicated one costs. We set up dedicated sending domains that mirror the brand without risking it." },
        { q:"What platform do you run on?", a:"Instantly is the default for multi-domain cold outbound. SmartLead works as a second option if you already use it. HeyReach for LinkedIn. CRM-native cadences (Salesforce, HubSpot, Dynamics) when the AE team lives in the CRM." },
        { q:"What if placement drops?", a:"Weekly seed tests catch it first. We re-verify records, pause sending on the affected domain, run warmup on a new domain, and rotate. Nothing goes out on a domain that isn't placing." },
        { q:"Can this run standalone?", a:"Yes. Deliverability setup is a common first engagement when the other pieces (data, strategy) are already in place. Once it's built, it keeps working." }
      ]}
    />
    <FitLine text="Deliverability is the last mile of the chain. See /services for the full stack or /services/outbound-strategy for what runs on top."/>
    <SubCTA
      h2Line1="Want to see where your mail lands?"
      h2Line2="The audit includes a placement snapshot."
      body="Screen-share, seed-test sample, DNS check, written report inside 24 hours. Free either way."
    />
  </React.Fragment>
);

// ========================================================================
// /services/crm-audit
// ========================================================================

const ServiceCrmAudit = () => (
  <React.Fragment>
    <SubHero
      eyebrow="Services · Audit"
      h2Line1="Thirty minutes on your CRM."
      h2Line2="Live, on a screen-share."
      body="We screen-share into your CRM, score fill rates, flag duplicates, size the enrichment opportunity, and send a written report inside 24 hours. If enrichment moves the needle we'll say so. If it doesn't, we'll say that too. Free either way."
      sig="A bad fit for us is a worse fit for you."
    />
    <ObservationGrid
      eyebrow="What we look at"
      h2="The CRM tells the whole story in twenty minutes."
      intro="Fill rate on core fields. Duplicate density. Data recency. Pipeline coverage against ICP. None of this requires a questionnaire. We open the tool, look at what's there, and size the gap."
      cards={[
        { tag:'Observation A', h3:'Fill rate across core fields.', body:'Direct email, phone, current title, current company, industry, employee count. A working CRM is above 70% on all of them. A CRM that can\'t run outbound usually isn\'t.' },
        { tag:'Observation B', h3:'Duplicate and stale records.', body:"Records with the same email across two accounts. Titles that haven't changed in four years. Contacts at companies that were acquired or closed. Dedup is usually bigger than teams expect."},
        { tag:'Observation C', h3:'Pipeline coverage vs. ICP.', body:'Whether the accounts in the CRM actually match the ICP that closes. Often the gap between "accounts in system" and "accounts that fit" is the real outbound problem.' },
        { tag:'Observation D', h3:'System-of-record hygiene.', body:'Who writes to the CRM, from where, and whether anything other than the UI is a source of truth. Spreadsheets next to the CRM are a tell.' }
      ]}
    />
    <ProcessRail
      eyebrow="How the audit runs"
      h2="One call, one written report."
      subhead="No pre-call form. No implementation plan disguised as a discovery. Thirty minutes, structured, and you get the report whether we work together or not."
      steps={[
        { tag:'share', h3:'You share your screen.', body:'Live look at the CRM. We need read access only. No credentials change hands. We don\'t need a sandbox or a cleaned view. We want to see what the sales team sees.' },
        { tag:'score', h3:'We score the fields.', body:'Core field fill rates calculated live. Duplicate density measured on a sample. ICP alignment checked against your top closed-won accounts.' },
        { tag:'size', h3:'We size the opportunity.', body:'How many records are reachable with enrichment. How many are beyond saving. What the first pass would cost and what it would ship in two weeks.' },
        { tag:'report', h3:'You get a written report.', body:'Inside 24 hours. Every number we read, every gap we flagged, the proposed first pass, and a plain-language verdict on whether enrichment or outbound strategy is the right next step.' }
      ]}
    />
    <StatRow
      eyebrow="What the audit delivers"
      stats={[
        { n:'30 min', label:'Live walkthrough' },
        { n:'24 hr', label:'Written report turnaround' },
        { n:'3', label:'CRMs supported (D365, SF, HS)' },
        { n:'$0', label:'Always, no catch' }
      ]}
    />
    <DeliverablesList
      eyebrow="What's in the report"
      h2="Numbers, not narrative."
      items={[
        'Fill-rate scores on direct email, phone, title, company, industry, employee count.',
        'Duplicate density measured on a representative sample.',
        'ICP alignment score against your closed-won accounts.',
        'Reachable-records estimate and the cost to enrich that subset.',
        "Two-week first-pass plan if enrichment is the right call.",
        "An honest no if it isn't."
      ]}
    />
    <FaqList
      eyebrow="FAQ"
      items={[
        { q:"What's the catch?", a:"There isn't one. Most of our engagements start with an audit because the audit is the fastest way to know whether we can help. About half the time the answer is yes and we go from there. The other half, we point at what actually needs fixing and part ways." },
        { q:"Do you need admin access?", a:"No. Read-only is enough. We run the whole thing on a screen-share so your data never leaves your system." },
        { q:"What CRMs do you audit?", a:"Dynamics 365, Salesforce, HubSpot (all tiers). Pipedrive, Close, and Copper on request, the logic is similar and most of the scoring works the same way." },
        { q:"Who from our side should be on the call?", a:"RevOps if you have them. Sales leadership if not. The audit is read-only, so nobody needs to prepare or clean anything beforehand." }
      ]}
    />
    <FitLine text="The audit usually precedes any engagement. See /services for what's on the other side."/>
    <SubCTA
      h2Line1="Book the thirty minutes."
      h2Line2="No pitch attached."
      body="Screen-share, live walkthrough, written report inside 24 hours. If the method fits we'll say so. If it doesn't, we'll say that too."
    />
  </React.Fragment>
);

Object.assign(window, {
  ServicesHub, ServiceCrmEnrichment, ServiceOutboundStrategy,
  ServiceDeliverabilitySetup, ServiceCrmAudit
});
