<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * About — the agency story, vision, philosophy, team.
 */
#[\AllowDynamicProperties]
class About extends Public_Controller {

	public function __construct()
	{
		parent::__construct();
		$this->load->model(array('page_model', 'team_model'));
	}

	public function index()
	{
		$page = $this->page_model->by_slug('about');
		$blocks = $page ? decode_json($page['blocks']) : array();

		$this->meta(array(
			'title'       => ($page['meta_title'] ?? 'About — Bloom Iris Agency'),
			'description' => ($page['meta_desc'] ?? setting('meta_description')),
		));

		$this->render('about/index', array(
			'page'     => $page,
			'blocks'   => $blocks,
			'founders' => $this->team_model->founders(),
			'staff'    => $this->team_model->staff(),
			'partners' => $this->partner_model->featured(),
		));
	}
}
