<?php
/** Pulsera plans — PLANS. 3 tier cards + full comparison matrix + FAQ. Copy: Gale. Build: Betty. */
require __DIR__ . '/_chrome.php';
$catalog = require '/var/www/vhosts/pulseratalent.com/subdomains/plans/app/catalog.php';

$highlights = [
    'essential_care' => ['Security updates and patches', 'Regular backups', 'Uptime monitoring', 'Email support'],
    'website_care'   => ['Everything in Essential', 'Ongoing accessibility upkeep, re-checked on every content change', 'Ongoing blog publishing', 'Priority support and a monthly check-in'],
    'complete_care'  => ['Everything in Website Care', 'Server and infrastructure maintenance', 'Security hardening', 'Priority response'],
];
$guidance = [
    'Essential is for a simple site you want kept online, secure, and backed up.',
    'Website Care adds the work that keeps a site healthy over time: accessibility upkeep, content publishing, and priority help. This is the right fit for most businesses, and the required fit for anyone with a legal accessibility or compliance obligation.',
    'Complete Care adds server and infrastructure management for teams who want the whole stack handled.',
];
$faq = [
    ['What is included in a plan?', 'Each plan covers ongoing maintenance for your website. Essential keeps your site secure, backed up, and online. Website Care adds accessibility upkeep, content publishing, and priority support. Complete Care adds server and infrastructure management. See the full comparison above for details.'],
    ['My hosting provider already includes backups and security. Why do I need this?', 'Because hosting and care are two different jobs. Your hosting provider keeps the platform your site runs on: the servers, uptime, and platform-level backups. That is real, but it is infrastructure, not attention to your actual site. A care plan is the hands-on work a host does not do: keeping your site current and working the way it should and fixing it when something breaks, keeping your content published, keeping the site as accessible as your platform allows, and giving you people who know your specific site rather than a general help desk. Hosting is where your website lives. A care plan is who looks after it.'],
    ['Do I need a new website, or can you maintain the one I have?', 'You do not need a new site. A care plan looks after and fixes the website you already have, as it is. A full rebuild is separate project work with its own quote, for the times a site genuinely cannot do what you need. Most clients simply want the site they have kept current and working, and that is exactly what these plans are for.'],
    ['How does billing work?', 'Plans are a flat monthly rate, billed in advance through Stripe. Your card is charged securely and the plan renews each month until you cancel.'],
    ['Can I cancel anytime?', 'Yes. Cancel anytime from your billing portal. Your plan stays active through the end of the month you already paid for, and you are not charged again after that.'],
    ['Can I change plans later?', 'Yes. You can move up or down a plan as your needs change.'],
    ['Do you work on my server too?', 'Server and infrastructure maintenance is included in Complete Care. Website Care and Essential focus on your website itself.'],
    ['Will you keep my site accessible?', 'On Website Care and Complete Care, yes. We keep your site as accessible as your platform allows and re-check it whenever your content changes, and we align it to WCAG 2.1 AA wherever we can edit the site\'s code. On some website builders the platform limits how far that can go, so if you have a legal requirement we confirm what your specific site can reach up front. Essential does not include accessibility work.'],
    ['What if I have an accessibility or compliance requirement?', 'Choose Website Care or Complete Care. Both include the ongoing, per-change accessibility upkeep that a legal mandate needs. Essential is not built for that.'],
];

page_head(
    'Plans & pricing | Pulsera care plans',
    'Three website care plans, one flat monthly price each: Essential, Website Care, and Complete Care. Compare every feature side by side.',
    '/plans'
);
?>
<main id="main" tabindex="-1">
  <h1 class="page">Care plans and pricing</h1>
  <p class="page-intro">Three plans, one flat monthly price each. Start with the quick view, then compare every feature line by line.</p>

  <h2 class="section" id="choose">Choose your plan</h2>
  <ul class="cards">
    <?php foreach ($catalog['order'] as $key): $p = $catalog['plans'][$key]; ?>
    <li class="plan<?= !empty($p['featured']) ? ' featured' : '' ?>">
      <?php if (!empty($p['featured'])): ?><span class="flag">Most popular</span><?php endif; ?>
      <h3 class="pname"><?= e($p['name']) ?></h3>
      <p class="tag"><?= e($p['tagline']) ?></p>
      <p class="price"><?= e($p['price']) ?> <span><?= e($p['cadence']) ?></span></p>
      <ul class="hi">
        <?php foreach ($highlights[$key] as $f): ?><li><span class="ic" aria-hidden="true">&#10003;</span><span><?= e($f) ?></span></li><?php endforeach; ?>
      </ul>
      <?php if (!empty($p['disclosure'])): ?><p class="note" role="note"><?= e($p['disclosure']) ?></p><?php endif; ?>
      <p class="more"><a href="#compare">See full comparison</a></p>
      <div class="choose"><a class="btn" href="/signup.php?plan=<?= e($key) ?>">Choose <?= e($p['name']) ?></a></div>
    </li>
    <?php endforeach; ?>
  </ul>

  <h2 class="section" id="compare">Compare every feature</h2>
  <ul class="guide">
    <?php foreach ($guidance as $g): ?><li><?= e($g) ?></li><?php endforeach; ?>
  </ul>
  <ul class="grid">
    <?php foreach ($catalog['order'] as $key): $p = $catalog['plans'][$key]; $inc = array_flip($p['includes']); ?>
    <li class="plan<?= !empty($p['featured']) ? ' featured' : '' ?>">
      <?php if (!empty($p['featured'])): ?><span class="flag">Most popular</span><?php endif; ?>
      <h3 class="pname"><?= e($p['name']) ?></h3>
      <p class="tag"><?= e($p['tagline']) ?></p>
      <p class="price"><?= e($p['price']) ?> <span><?= e($p['cadence']) ?></span></p>
      <ul class="matrix">
        <?php foreach ($catalog['matrix'] as $feat): $has = isset($inc[$feat]); ?>
        <li class="<?= $has ? 'yes' : 'no' ?>">
          <span class="ic" aria-hidden="true"><?= $has ? '&#10003;' : '&#10007;' ?></span>
          <span><span class="vh"><?= $has ? 'Included' : 'Not included' ?>: </span><?= e($feat) ?></span>
        </li>
        <?php endforeach; ?>
      </ul>
      <?php if (!empty($p['disclosure'])): ?><p class="note" role="note"><?= e($p['disclosure']) ?></p><?php endif; ?>
      <div class="choose"><a class="btn" href="/signup.php?plan=<?= e($key) ?>">Choose <?= e($p['name']) ?></a></div>
    </li>
    <?php endforeach; ?>
  </ul>

  <div class="belownote">
    <h2>A note on accessibility and compliance</h2>
    <p>If your organization has a legal accessibility obligation (for example, a healthcare or Medicaid-billing provider), choose Website Care or Complete Care. Essential does not include ongoing accessibility monitoring, and a legal mandate needs the continuous, per-change upkeep those plans provide. Because full WCAG 2.1 AA conformance depends on how your site is built, we confirm what your specific site can achieve before you rely on it.</p>
    <p class="cta"><a href="#choose">Choose your plan</a></p>
  </div>

  <section class="faq" aria-labelledby="faq-h">
    <h2 id="faq-h">Frequently asked questions</h2>
    <dl>
      <?php foreach ($faq as $qa): ?>
      <dt><?= e($qa[0]) ?></dt>
      <dd><?= e($qa[1]) ?></dd>
      <?php endforeach; ?>
    </dl>
  </section>
</main>
<?php page_foot();
