<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
$avi_lang = 'en';
if ( function_exists( 'avi_get_current_lang' ) ) { $avi_lang = avi_get_current_lang(); }
if ( $avi_lang === 'en' && isset( $_SERVER['REQUEST_URI'] ) ) {
    $req = $_SERVER['REQUEST_URI'];
    if ( strpos( $req, '/fr/' ) === 0 ) { $avi_lang = 'fr'; }
    elseif ( strpos( $req, '/es/' ) === 0 ) { $avi_lang = 'es'; }
}
if ( $avi_lang !== 'en' ) { set_query_var( 'avi_lang', $avi_lang ); }
$is_fr = ( $avi_lang === 'fr' );
$is_es = ( $avi_lang === 'es' );
$avi_meta_title = 'About Avision';
$avi_meta_desc  = 'Avision is the automated local SEO platform built by practitioners, for practitioners.';
$avi_schema_json = array(
	'@context'    => 'https://schema.org',
	'@graph'      => array(
		array(
			'@type' => 'AboutPage',
			'name'  => 'About Avision',
			'url'   => 'https://avision.org/about/',
		),
		array(
			'@type'        => 'Organization',
			'name'         => 'Avision',
			'legalName'    => 'Advantage Synergies LLP',
			'url'          => 'https://avision.org',
			'foundingDate' => '2022-10',
			'address'      => array(
				'@type'           => 'PostalAddress',
				'addressLocality' => 'London',
				'addressCountry'  => 'GB',
			),
		),
	),
);

if ( ! class_exists( 'Avision_Page_Template' ) ) {
	require_once AVISION_PLUGIN_DIR . 'includes/class-avision-page-template.php';
}

// Hero géré dans le body (section 1) — pas de bandeau hero dupliqué.
$hero = array();

// Footer déjà rendu par Avision_Page_Template::render() — éviter le doublon wp_footer thème.
add_action(
	'wp_footer',
	static function () {
		remove_action( 'wp_footer', 'avi_inject_elite_footer', 99 );
	},
	1
);

Avision_Page_Template::render(
	'about',
	$hero,
	static function () use ( $avi_schema_json ) {
		$founder_photo = 'https://avision.org/wp-content/uploads/2026/05/moi-photo.jpg';
		$contact_url   = home_url( '/contact/' );
		?>
		<div class="avi-about-page">
			<style>
				.avi-about-page { color: #0A1628; font-family: inherit; line-height: 1.65; }
				.avi-about-page * { box-sizing: border-box; }
				.avi-about-page__inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
				.avi-about-page__hero { background: #fff; padding: 56px 0 64px; }
				.avi-about-page__hero-grid { display: flex; align-items: flex-start; gap: 48px; }
				.avi-about-page__hero-copy { flex: 1; min-width: 0; }
				.avi-about-page__hero-copy h1 { margin: 0 0 24px; font-size: 2.35rem; line-height: 1.2; color: #0A1628; font-weight: 800; }
				.avi-about-page__hero-copy p { margin: 0 0 18px; font-size: 1.08rem; color: #0A1628; }
				.avi-about-page__hero-copy p:last-child { margin-bottom: 0; }
				.avi-about-page__point { font-weight: 700; color: #6C3FC5; }
				.avi-about-page__photo-wrap { flex-shrink: 0; text-align: center; }
				.avi-about-page__photo {
					width: 180px;
					height: 180px;
					border-radius: 50%;
					object-fit: cover;
					object-position: center top;
					border: 3px solid #6C3FC5;
					display: block;
				}
				.avi-about-page__dashboards { background: #F8FAFF; padding: 64px 0; }
				.avi-about-page__dashboards h2 { margin: 0 0 32px; font-size: 1.85rem; line-height: 1.25; font-weight: 800; text-align: center; color: #0A1628; }
				.avi-about-page__built h2 { margin: 0 0 32px; font-size: 1.85rem; line-height: 1.25; font-weight: 800; text-align: center; color: #fff; }
				.avi-about-page__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
				.avi-about-page__card { background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(10, 22, 40, 0.08); padding: 28px 28px 32px; }
				.avi-about-page__card h3 { margin: 0 0 14px; font-size: 1.25rem; color: #6C3FC5; font-weight: 800; }
				.avi-about-page__card p { margin: 0 0 14px; font-size: 1rem; color: #0A1628; }
				.avi-about-page__card p:last-child { margin-bottom: 0; }
				.avi-about-page__built { background: #0A1628; color: #fff; padding: 64px 0; }
				.avi-about-page__list { list-style: none; margin: 0; padding: 0; max-width: 820px; margin-left: auto; margin-right: auto; }
				.avi-about-page__list li { position: relative; padding: 0 0 16px 32px; font-size: 1.05rem; }
				.avi-about-page__list li:last-child { padding-bottom: 0; }
				.avi-about-page__list li::before { content: "✦"; position: absolute; left: 0; top: 0; color: #6C3FC5; font-weight: 700; }
				.avi-about-page__tagline { margin: 32px 0 0; text-align: center; font-style: italic; font-size: 1.15rem; color: #F59E0B; font-weight: 600; }
				.avi-about-page__company { background: #fff; padding: 48px 0 64px; text-align: center; font-size: 0.95rem; color: #64748b; }
				.avi-about-page__company p { margin: 0 0 10px; }
				.avi-about-page__company a { color: #6C3FC5; text-decoration: none; font-weight: 600; }
				.avi-about-page__company a:hover { text-decoration: underline; }
				@media (max-width: 1024px) {
					.avi-about-page__hero-copy h1 { font-size: 2rem; }
					.avi-about-page__hero-grid { gap: 32px; }
				}
				@media (max-width: 768px) {
					.avi-about-page__hero { padding: 40px 0 48px; }
					.avi-about-page__hero-grid { flex-direction: column-reverse; align-items: center; }
					.avi-about-page__hero-copy h1 { font-size: 1.75rem; text-align: center; }
					.avi-about-page__hero-copy p { text-align: left; }
					.avi-about-page__cards { grid-template-columns: 1fr; }
					.avi-about-page__dashboards,
					.avi-about-page__built { padding: 48px 0; }
				}
				@media (max-width: 480px) {
					.avi-about-page__inner { padding: 0 16px; }
					.avi-about-page__hero-copy h1 { font-size: 1.45rem; }
					.avi-about-page__photo { width: 180px; height: 180px; }
					.avi-about-page__card { padding: 22px 20px 26px; }
					.avi-about-page__list li { font-size: 0.98rem; padding-left: 28px; }
				}
			</style>

			<section class="avi-about-page__hero" aria-labelledby="avi-about-hero-title">
				<div class="avi-about-page__inner">
					<div class="avi-about-page__hero-grid">
						<div class="avi-about-page__hero-copy">
							<h1 id="avi-about-hero-title">Built by someone who&apos;s been inside the problem.</h1>
							<p>I spent years leading SEO strategy at a pan-European cloud communications group. What struck me wasn&apos;t the complexity of SEO at scale — it was something simpler: almost no company, including those in the group, was taking Google Business Profile seriously.</p>
							<p>GBP was treated as a checkbox. Fill in the address, add a photo, forget about it. Meanwhile, a well-managed GBP listing is one of the most direct ways to benefit from the Google Zero-Click reality — where over 60% of local searches now end without a website visit, answered directly by the local pack, maps, and AI Overviews. The businesses showing up there, with reviews answered, photos fresh, and content active, capture that attention at the exact moment of intent. Everyone else is invisible.</p>
							<p>Reviews went unanswered for weeks. Profiles edited by strangers — wrong address, wrong hours, sometimes a competitor&apos;s phone number. Agencies managing dozens of clients had no way to catch these problems before their clients did.</p>
							<p>I built Avision to fix that. Not report on it. Fix it.</p>
						</div>
						<div class="avi-about-page__photo-wrap">
							<img
								class="avi-about-page__photo"
								src="<?php echo esc_url( $founder_photo ); ?>"
								alt="Anthony, founder of Avision"
								width="180"
								height="180"
								loading="eager"
								decoding="async"
							/>
						</div>
					</div>
				</div>
			</section>

			<section class="avi-about-page__dashboards" aria-labelledby="avi-about-dashboards-title">
				<div class="avi-about-page__inner">
					<h2 id="avi-about-dashboards-title">Two dashboards. Two audiences. One platform.</h2>
					<div class="avi-about-page__cards">
						<article class="avi-about-page__card">
							<h3>For local businesses</h3>
							<p>a visibility score /100, a clear action plan that updates as you progress, and Guardian Mode protecting your Google profile 24/7 across 9 active shields. Unanswered reviews handled. Unauthorized edits caught. Keyword positions tracked. And AVI, your AI coach, doesn&apos;t wait for you to ask — it proactively surfaces alerts and answers your questions with real data from your actual profile, not generic advice written for everyone.</p>
							<p><span class="avi-about-page__point">You don&apos;t need to become an SEO expert. That&apos;s the point.</span></p>
						</article>
						<article class="avi-about-page__card">
							<h3>For agencies</h3>
							<p>a fleet command centre with a helicopter view across every client location simultaneously. Bulk actions across your entire portfolio. Automated Guardian responses published under your brand. Per-client read-only reporting links your clients can access anytime. And an AI fleet intelligence engine that surfaces the highest-impact action across every profile, every day.</p>
							<p>Every product activated — Guardian Mode or Growth Radar — is billed at wholesale per-location rates, decreasing as your portfolio grows. The more clients you manage, the better your margin. Your agency scales. Your cost per client doesn&apos;t.</p>
							<p><span class="avi-about-page__point">You stop managing each location individually. That&apos;s the point.</span></p>
						</article>
					</div>
				</div>
			</section>

			<section class="avi-about-page__built" aria-labelledby="avi-about-built-title">
				<div class="avi-about-page__inner">
					<h2 id="avi-about-built-title">Built to last</h2>
					<ul class="avi-about-page__list">
						<li>Official Google Business Profile API — homologation received May 15, 2026</li>
						<li>Cryptographically verified payments — automatic account provisioning, zero manual steps</li>
						<li>Tenant-level access control — every request verified against the user&apos;s authorised profiles</li>
						<li>AI intelligence engine — 8,000+ lines of orchestration logic, 25+ expert knowledge corpora on GBP rules and Google 2025–2026 updates</li>
						<li>35 automated integrity checks running on every deployment</li>
						<li>English, French, Spanish</li>
					</ul>
					<p class="avi-about-page__tagline">One person built this in 4 months. It&apos;s not a prototype.</p>
				</div>
			</section>

			<section class="avi-about-page__company" aria-label="Company information">
				<div class="avi-about-page__inner">
					<p><strong>Advantage Synergies LLP</strong> — registered in England &amp; Wales, London</p>
					<p>Founded October 2022 — Avision launched May 2026</p>
					<p><a href="mailto:contact@avision.org">contact@avision.org</a> · <a href="https://avision.org/contact/">https://avision.org/contact/</a></p>
				</div>
			</section>
		</div>
		<script type="application/ld+json"><?php echo wp_json_encode( $avi_schema_json, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); ?></script>
		<?php
	}
);
