from pathlib import Path
from urllib.parse import quote
from html import escape
import json

ROOT = Path(__file__).resolve().parent
DIST = ROOT / 'dist'
DOMAIN = 'https://aragonreltd.com'
EMAIL = 'contact@aragonreltd.com'
PROFILE = '2026-11-14 AragonRe Company Profile Private Capital and Insurance Services v02 Draft.pdf'
PDF = '/downloads/' + quote(PROFILE)
DISCLAIMER = 'Aragon Re is a doing business as trade name for AragonRe Ltd Incorporated'
NAV = [('about', 'About', '/about/'), ('approach', 'Our approach', '/approach/'), ('capabilities', 'Capabilities', '/capabilities/'), ('contact', 'Contact', '/contact/')]

def image(name, alt, cls='', eager=False):
    return f'<img src="/assets/{name}.webp" alt="{escape(alt, quote=True)}" width="1536" height="1024" class="{cls}" loading="{"eager" if eager else "lazy"}" decoding="async">'

def wordmark():
    return '<a class="wordmark" href="/" aria-label="AragonRe home"><img src="/assets/monogram.webp" width="37" height="37" alt=""><span>AragonRe</span></a>'

def download_button(label='Download company profile', cls='button', download=True):
    action = f'download="{escape(PROFILE, quote=True)}"' if download else 'target="_blank" rel="noopener"'
    return f'<a class="{cls}" href="{PDF}" {action}>{label}</a>'

def header(key):
    links = ''.join(f'<a href="{url}"' + (' aria-current="page"' if key == page else '') + f'>{label}</a>' for page, label, url in NAV)
    return f'''<a class="skip-link" href="#main">Skip to content</a>
    <header class="site-header"><div class="header-inner">{wordmark()}
    <button type="button" class="menu-toggle" aria-expanded="false" aria-controls="primary-navigation" aria-label="Open navigation"><span>Menu</span><span class="menu-lines" aria-hidden="true"><i></i><i></i></span></button>
    <nav class="desktop-nav" id="primary-navigation" aria-label="Primary navigation"><div class="nav-links">{links}</div>{download_button('Company profile', 'button button-small header-download')}</nav></div></header>'''

def footer():
    links = ''.join(f'<a href="{url}">{label}</a>' for _, label, url in NAV)
    return f'''<footer class="site-footer"><div class="container">
    <div class="footer-main"><div><span class="eyebrow">Start a conversation</span><h2>Build on<br>what matters.</h2></div>
    <div class="footer-contact"><p>For business owners considering their next stage, private investment partners and specialists who share our approach.</p><a class="footer-email" href="mailto:{EMAIL}">{EMAIL}</a></div></div>
    <div class="footer-nav">{wordmark()}<nav class="footer-links" aria-label="Footer navigation">{links}<a href="{PDF}" download="{escape(PROFILE, quote=True)}">Company profile</a></nav></div>
    <div class="footer-meta"><span>© 2026 AragonRe Ltd Incorporated</span><span>Images are illustrative and do not depict AragonRe offices or personnel.</span></div>
    <p class="disclaimer">{DISCLAIMER}</p></div></footer>'''

def profile_section():
    return f'''<section class="section download-section" aria-labelledby="profile-heading"><div class="container download-grid">
    <a class="profile-preview" href="{PDF}" target="_blank" rel="noopener" aria-label="View the AragonRe company profile PDF in a new tab"><img src="/assets/profile-cover.webp" width="1920" height="1280" alt="AragonRe company profile cover: Experience, renewed." loading="lazy" decoding="async"></a>
    <div><span class="eyebrow">Company profile</span><h2 id="profile-heading">A closer look<br>at AragonRe.</h2><p>Our investment philosophy, the capabilities we develop and the way we bring capital, people and technology together.</p><div class="actions">{download_button()}{download_button('View PDF', 'button button-outline', False)}</div><span class="file-note">8 pages · PDF · 18.2 MB · November 2026</span></div></div></section>'''

def page(key, title, description, content, path):
    canonical = DOMAIN + path
    schema = {'@context': 'https://schema.org', '@type': 'Organization', 'name': 'AragonRe', 'legalName': 'AragonRe Ltd Incorporated', 'alternateName': 'Aragon Re', 'url': DOMAIN, 'email': EMAIL, 'description': 'Private capital and business development for the companies that support insurance.', 'logo': DOMAIN + '/assets/monogram.webp'}
    return f'''<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>{escape(title)}</title><meta name="description" content="{escape(description, quote=True)}"><meta name="theme-color" content="#152637"><link rel="canonical" href="{canonical}"><link rel="icon" href="/assets/favicon.png" type="image/png"><link rel="preload" href="/assets/fonts/noto-serif-display-regular.woff2" as="font" type="font/woff2" crossorigin><link rel="stylesheet" href="/assets/styles.css"><script src="/assets/site.js" defer></script><meta property="og:site_name" content="AragonRe"><meta property="og:title" content="{escape(title, quote=True)}"><meta property="og:description" content="{escape(description, quote=True)}"><meta property="og:type" content="website"><meta property="og:url" content="{canonical}"><meta property="og:image" content="{DOMAIN}/assets/profile-cover.webp"><meta property="og:image:alt" content="AragonRe — Experience, renewed."><meta name="twitter:card" content="summary_large_image"><script type="application/ld+json">{json.dumps(schema)}</script><noscript><style>@media(max-width:980px){{.desktop-nav{{display:flex;position:static;box-shadow:none;max-height:none}}.header-inner{{display:block;padding-block:20px}}.menu-toggle{{display:none}}.nav-links{{flex-wrap:wrap;flex-direction:row;gap:20px}}}}</style></noscript></head>
<body>{header(key)}<main id="main">{content}</main>{footer()}</body></html>'''

home = f'''
<section class="home-hero" aria-labelledby="hero-title"><img class="hero-image" src="/assets/architecture.webp" width="1536" height="1024" alt="" fetchpriority="high" decoding="async"><div class="container"><div class="hero-content"><span class="eyebrow">Private capital &amp; business development</span><h1 id="hero-title">Experience,<br><em>renewed.</em></h1><p class="hero-intro">We bring private capital and practical business development to the companies that support insurance. Preserving valuable experience. Renewing commercial purpose.</p><div class="actions"><a class="button button-light" href="/approach/">Explore our approach</a>{download_button('Company profile', 'button button-ghost')}</div><p class="hero-small">Capital, governance and technology. With people at the centre.</p></div></div></section>
<div class="principles"><div class="container"><span>Direct private capital</span><span>Majority ownership</span><span>Practical business development</span></div></div>
<section class="section light-section"><div class="container split"><div class="copy"><span class="eyebrow">The value already there</span><h2>Strong businesses<br>begin with people.</h2><p class="lead">Knowledge earned over years. Relationships built on trust. Teams who understand their customers.</p><p>AragonRe recognises these strengths and helps put them to more productive use. Our model combines majority ownership with active governance, management development and technology integration.</p><a class="text-link" href="/about/">Get to know AragonRe</a></div><div class="image-wrap">{image('experience', 'Illustrative image of experienced professionals reviewing information together.', 'editorial-image wide')}</div></div></section>
<section class="section"><div class="container"><div class="section-heading"><div><span class="eyebrow">What we bring</span><h2>Capital with an<br>operating purpose.</h2></div><a class="text-link" href="/capabilities/">Explore our capabilities</a></div><div class="capability-preview"><article class="preview-item"><h3>Investment &amp; ownership</h3><p>Direct private capital connected to a clear development plan, sustained management involvement and accountability for how resources are used.</p></article><article class="preview-item"><h3>Direction &amp; development</h3><p>Clear governance, financial discipline and practical support that help leaders renew commercial focus and teams work with greater purpose.</p></article><article class="preview-item"><h3>Technology &amp; capability</h3><p>Useful systems that make specialist knowledge easier to apply, management information more valuable and experienced people more effective.</p></article></div></div></section>
<section class="section dark-section"><div class="container statement"><span class="eyebrow">Our belief</span><h2>We preserve valuable capability<br>and give it <span>renewed commercial purpose.</span></h2><p class="lead">An established sales force represents an investment in knowledge, relationships and trust. We help preserve and refocus that value, equipping people for a technology-enhanced world.</p><a class="text-link" href="/approach/">How we approach change</a></div></section>
<section class="section light-section"><div class="container split"><div class="image-wrap">{image('technology', 'Illustrative image of experienced colleagues applying technology to their work.', 'editorial-image wide')}</div><div class="copy"><span class="eyebrow">The businesses we develop</span><h2>Strengthening the<br>services behind insurance.</h2><p>We look for businesses whose knowledge, systems or relationships help other parts of the insurance sector work better.</p><ul class="service-list"><li>Customer service and distribution support</li><li>Insurance administration technology</li><li>Workflow, reporting and risk information</li><li>Specialist business infrastructure</li></ul><a class="text-link" href="/capabilities/#business-support">See our areas of focus</a></div></div></section>
{profile_section()}'''

about = f'''
<section class="page-hero split-hero"><div class="container"><div><span class="eyebrow">About AragonRe</span><h1>Private capital with an operating purpose.</h1><p class="lead">An owner's commitment to the companies that support insurance.</p></div>{image('governance', 'Illustrative image of business leaders reviewing a development plan.', '', True)}</div></section>
<div class="container"><p class="identity-line">AragonRe refers to ARAGONRE LTD INCORPORATED, incorporated in Puerto Rico.</p></div>
<section class="section light-section"><div class="container split split-top"><div><span class="eyebrow">Who we are</span><h2>Investment.<br>Attention.<br>Practical progress.</h2></div><div class="copy"><p class="lead">AragonRe is a private investor and business development partner focused on the companies that serve the insurance sector. We combine capital with the management attention needed to put it to productive use.</p><p>Our approach begins with understanding where value already exists. We look at the people, knowledge, relationships and systems that underpin the business, then identify what would make them more effective.</p><p>The experience behind AragonRe includes redirecting businesses, renewing team motivation and restoring financial focus while preserving valuable knowledge and relationships. That experience informs a measured approach to change, with attention to the people who must deliver it and the financial results that make it sustainable.</p></div></div></section>
<section class="section"><div class="container"><span class="eyebrow">What guides us</span><h2>Build on what matters.</h2><div class="values-grid"><article class="value"><h3>Respect experience</h3><p>Established knowledge, customer trust and experienced teams are assets to understand, develop and put to work.</p></article><article class="value"><h3>Apply discipline</h3><p>Clear responsibilities and useful financial information connect investment decisions with service quality, cash generation and lasting business value.</p></article><article class="value"><h3>Make change useful</h3><p>Development should improve everyday work. We connect technology and management support with the needs of the people expected to use them.</p></article></div></div></section>
<section class="section dark-section"><div class="container split"><div><span class="eyebrow">Our ambition</span><h2>Capable management.<br>Dependable service.</h2></div><div><p class="lead">We aim to build businesses known for disciplined performance and a high standard of service across the insurance support sector.</p><p>Our ambition is best-in-class service, built through practical improvement and accountable leadership.</p><a class="text-link" href="/approach/">Discover our approach</a></div></div></section>
{profile_section()}'''

approach = f'''
<section class="page-hero"><div class="container"><span class="eyebrow">Our approach</span><h1>Build the future<br>on experience.</h1><p class="lead">Preserve what gives a business its value. Renew its direction. Give people the tools and support to perform.</p></div></section>
<section class="section light-section"><div class="container split split-top"><div><span class="eyebrow">Commercial renewal</span><h2>Make experience<br>more productive.</h2></div><div class="copy"><p class="lead">An established sales force represents a substantial investment in knowledge, relationships and trust. Its value develops through years of understanding customers and exercising judgment.</p><p>We help management renew commercial direction, make priorities clear and equip teams to work with greater purpose. Practical coaching, relevant information and well-designed incentives support that change.</p><p>Better systems should give people more time for meaningful customer conversations, consistent follow-up and the work that calls for their expertise.</p></div></div></section>
<section class="section"><div class="container"><div class="section-heading"><div><span class="eyebrow">How we work</span><h2>A practical path<br>to development.</h2></div><p>Change works best when its purpose is clear, its pace is manageable and progress can be reviewed.</p></div><div class="steps"><article class="step"><h3>Understand the business</h3><p>We examine what customers value, where performance is constrained and which capabilities deserve further investment. Commercial and operational understanding establishes the starting point.</p></article><article class="step"><h3>Set a practical direction</h3><p>We work with leadership to agree priorities, responsibilities and resources. Financial discipline connects the development plan to the capacity of the business.</p></article><article class="step"><h3>Equip people to deliver</h3><p>Management development, useful information and well-designed systems help teams work with greater purpose. Training and clear ownership are part of implementation.</p></article><article class="step"><h3>Review progress</h3><p>Regular review connects service quality, commercial activity and financial performance. Improvements follow a sequence the business can absorb, with agreed measures of progress.</p></article></div></div></section>
<section class="approach-banner dark-section">{image('experience', 'Illustrative image of experienced colleagues sharing knowledge and working together.')}<div class="copy"><span class="eyebrow">People and technology</span><h2>Better tools.<br>Greater contribution.</h2><p>Customer information becomes more accessible. Managers gain a clearer view of activity. Experienced colleagues can share what they know.</p><p>We connect implementation with training, appropriate controls and review of how the tools perform in everyday work.</p><a class="text-link" href="/capabilities/#technology">Technology integration</a></div></section>
<section class="section"><div class="container faq"><span class="eyebrow">A closer look</span><h2>Understanding our approach.</h2><details><summary>How do you approach an established sales force?</summary><p>We begin by recognising the investment already made in experience, relationships and trust. Our approach is to preserve and refocus that value through clear direction, practical coaching, useful information and systems that help people work more effectively.</p></details><details><summary>What role does majority ownership play?</summary><p>Our investment model centres on majority ownership as a basis for clear decision-making, sustained management involvement and accountability. Capital is connected to a defined purpose and a practical development plan.</p></details><details><summary>How do you choose which technology to introduce?</summary><p>We start with the work that needs to improve: information that is hard to obtain, repeated effort and avoidable delays. The choice of tools follows those needs, with attention to fit, reliable information, training and adoption.</p></details><details><summary>What kinds of businesses fit your focus?</summary><p>We look at businesses supporting the insurance sector, including customer service and distribution support, administration technology, workflow and reporting, risk information and specialist business infrastructure.</p></details></div></section>'''

capabilities = f'''
<section class="page-hero"><div class="container"><span class="eyebrow">Our capabilities</span><h1>Strengthening the services behind insurance.</h1><p class="lead">Private capital, active ownership and practical support for the next stage of a business.</p></div></section>
<div class="container"><nav class="capability-jump" aria-label="Capability sections"><a href="#capital">Capital &amp; ownership</a><a href="#financing">Group financing</a><a href="#governance">Governance</a><a href="#management">Management</a><a href="#technology">Technology</a><a href="#business-support">Business support</a></nav></div>
<section class="section"><div class="container"><div class="capability-details">
<article class="capability" id="capital"><h2>Direct private capital<br>and active ownership</h2><p>Our investment model centres on direct private capital and majority ownership. Investment is connected to a defined business purpose, sustained management involvement and accountability for how capital is used.</p><p>We examine the quality of revenue, the cost of delivering service, working-capital needs and the resources required for improvement.</p><p class="focus">Capital connected to a practical development plan.</p></article>
<article class="capability" id="financing"><h2>Group financing<br>and bond programmes</h2><p>Our model includes the development and oversight of group financing and bond programmes. The remit covers financing plans, programme governance, monitoring the allocation of funds and reporting on commitments.</p><p>It includes coordination with the professionals appointed to the relevant financing arrangements.</p><p class="focus">A clear view of capital, commitments and obligations.</p></article>
<article class="capability" id="governance"><h2>Governance<br>and financial oversight</h2><p>We help establish clear responsibilities, useful management information and a regular discipline of review. Leaders need to understand what they are accountable for and when an issue requires attention.</p><p>The focus includes service economics, cash generation, working-capital needs and the demands growth places on people and resources.</p><p class="focus">Information that helps management make sound decisions.</p></article>
<article class="capability" id="management"><h2>Management development<br>and commercial renewal</h2><p>We help leaders clarify priorities, improve delegation and strengthen how teams communicate and deliver. Practical coaching and appropriate incentives support renewed motivation and commercial focus.</p><p>Clear expectations and regular feedback help people see progress while maintaining accountability for service quality and results.</p><p class="focus">Experienced people equipped for their next stage.</p></article>
<article class="capability" id="technology"><h2>Technology<br>integration</h2><p>Customer management tools, workflow automation, reporting and appropriate AI applications can make specialist knowledge easier to apply and teams more effective.</p><p>Implementation includes training, clear responsibility, appropriate access controls, data handling and review of how tools perform in everyday work.</p><p class="focus">Technology measured by the work it helps people do.</p></article>
<article class="capability" id="business-support"><h2>Coordinated<br>business support</h2><p>Our investment focus includes customer service and distribution support, insurance administration technology, workflow and reporting services, risk information and specialist business infrastructure.</p><p>We look for businesses whose knowledge, systems or relationships make other parts of the insurance sector work better.</p><p class="focus">Stronger capabilities across the insurance support sector.</p></article>
</div><p class="scope-note">Our scope centres on investment, governance, management development, technology integration and business support; regulated activities remain with appropriately authorized operating entities.</p></div></section>
<section class="section light-section"><div class="container split"><div class="image-wrap">{image('technology', 'Illustrative image of business experience and technology expertise working together.', 'editorial-image wide')}</div><div class="copy"><span class="eyebrow">One connected purpose</span><h2>Make valuable<br>businesses stronger.</h2><p class="lead">Capital, governance, people and technology work together.</p><p>Our approach connects investment with the practical changes needed to improve service, renew commercial focus and develop lasting business value.</p><a class="text-link" href="/contact/">Discuss an opportunity</a></div></div></section>
{profile_section()}'''

contact = f'''
<section class="page-hero"><div class="container"><span class="eyebrow">Contact AragonRe</span><h1>Let's discuss<br>what comes next.</h1><p class="lead">The starting point is a clear understanding of the business, the value already within it and the future we can build together.</p></div></section>
<section class="section light-section"><div class="container"><div class="contact-grid"><div><span class="eyebrow">Start a conversation</span><h2>We welcome<br>your introduction.</h2><a class="contact-email" href="mailto:{EMAIL}">{EMAIL}</a><p class="microcopy">Email us with a brief introduction to your business or area of interest.</p><div class="actions"><a class="button" href="mailto:{EMAIL}">Email AragonRe</a></div></div><aside class="contact-aside"><h2>Explore our company profile.</h2><p class="muted">Read about our investment philosophy, operating approach and capabilities before getting in touch.</p><div class="actions">{download_button()}</div><span class="file-note">8 pages · PDF · 18.2 MB</span></aside></div>
<div class="contact-types"><article class="contact-type"><h3>Business owners</h3><p>Considering the next stage for a business with valuable knowledge, relationships or specialist capability?</p><a class="text-link" href="mailto:{EMAIL}?subject=Business%20owner%20introduction">Introduce your business</a></article><article class="contact-type"><h3>Investment partners</h3><p>Interested in our approach to private capital, active ownership and the development of insurance support businesses?</p><a class="text-link" href="mailto:{EMAIL}?subject=Investment%20partner%20introduction">Discuss your interest</a></article><article class="contact-type"><h3>Specialist collaborators</h3><p>Bring expertise in management, technology, governance or the services that support insurance?</p><a class="text-link" href="mailto:{EMAIL}?subject=Specialist%20collaboration%20introduction">Explore collaboration</a></article></div></div></section>
<section class="section"><div class="container split"><div class="copy"><span class="eyebrow">Your introduction</span><h2>A clear place<br>to begin.</h2><p class="lead">Tell us what your business does, the strengths you want to build on and the next stage you have in mind.</p><p>This gives an initial conversation a practical focus.</p></div><div class="image-wrap">{image('architecture', 'Warm stone architecture with brass details, reflecting stability and stewardship.', 'editorial-image wide')}</div></div></section>'''

pages = [
    ('home', 'AragonRe | Experience, renewed.', 'Private capital and practical business development for the companies that support insurance. Active ownership, governance, people and technology.', home, '/', DIST/'index.html'),
    ('about', 'About AragonRe | Private Capital & Business Development', 'AragonRe brings an owner’s commitment to the development of insurance support businesses, combining private capital with practical management attention.', about, '/about/', DIST/'about/index.html'),
    ('approach', 'Our Approach | AragonRe', 'Preserve valuable experience, renew commercial direction and equip people with useful technology. Explore the AragonRe approach to business development.', approach, '/approach/', DIST/'approach/index.html'),
    ('capabilities', 'Our Capabilities | AragonRe', 'Direct private capital, active ownership, group financing oversight, governance, management development and technology integration for insurance support businesses.', capabilities, '/capabilities/', DIST/'capabilities/index.html'),
    ('contact', 'Contact AragonRe | Start a Conversation', 'Contact AragonRe at contact@aragonreltd.com. Introduce your business, discuss investment interests or explore specialist collaboration.', contact, '/contact/', DIST/'contact/index.html')
]
for key, title, description, content, path, out in pages:
    out.parent.mkdir(parents=True, exist_ok=True)
    out.write_text(page(key, title, description, content, path), encoding='utf-8')
not_found = '<div class="container not-found"><span class="eyebrow">Page not found</span><h1>Let’s get you<br>back on track.</h1><p>The page you’re looking for may have moved. Explore AragonRe from our home page.</p><div><a class="button" href="/">Return to AragonRe</a></div></div>'
(DIST/'404.html').write_text(page('', 'Page Not Found | AragonRe', 'Return to the AragonRe website.', not_found, '/404.html'), encoding='utf-8')
(DIST/'robots.txt').write_text('User-agent: *\nAllow: /\nSitemap: '+DOMAIN+'/sitemap.xml\n', encoding='utf-8')
(DIST/'sitemap.xml').write_text('<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n'+''.join(f'<url><loc>{DOMAIN}{p[4]}</loc></url>\n' for p in pages)+'</urlset>\n', encoding='utf-8')
print('Built 5 pages, a custom 404 page, robots.txt and sitemap.xml.')
