<?php
/**
 * Contact page: our details plus the order request form.
 * The form posts to thank-you.php, which validates, sends and confirms.
 */
declare(strict_types=1);

require __DIR__ . '/includes/site.php';
require __DIR__ . '/includes/order-form.php';

$config = sw_boot();

header('X-Content-Type-Options: nosniff');
header('Referrer-Policy: strict-origin-when-cross-origin');

$values = [
    'name'     => '',
    'email'    => '',
    'phone'    => '',
    'candy'    => '',
    'quantity' => '',
    'message'  => '',
    'consent'  => false,
];

$form = sw_order_form($config, $values);

sw_head(
    'Contact & Order Requests | Sugarwren Candy Co., Minneapolis',
    'Send an order request for handmade candy and unusual lollipops in Minneapolis. Our address, phone, '
    . 'opening hours and a form that reaches a person.',
    'contact.php'
);
sw_header('contact.php');
?>
<main id="main">
  <section class="page-head">
    <div class="wrap">
      <p class="breadcrumb"><a href="index.html">Home</a><span>/</span>Contact</p>
      <p class="eyebrow">Order requests &amp; questions</p>
      <h1>Tell us what you have in mind</h1>
      <p class="lead">Use the form below for orders, availability questions or anything else. It goes to
      <?= e($config['site_email']) ?> and is read by a person who makes the candy — usually answered within two
      business days, often the same day.</p>
    </div>
  </section>

  <section class="section section--tight">
    <div class="wrap contact-grid">
      <div>
        <h2 id="order-form">Order request form</h2>
        <p style="margin-bottom:1.4rem;">No basket, no checkout, no card details. Tell us what sounds good and
        we will come back with availability, price and pickup times.</p>
        <?= $form ?>
      </div>

      <div id="visit">
        <div class="contact-card">
          <h2>Find us</h2>
          <address>
            <strong>Sugarwren Candy Co.</strong><br>
            9301 3rd Ave S<br>
            Minneapolis, MN 55420<br>
            United States
          </address>
          <p style="margin-top:.8rem;"><a href="https://www.google.com/maps/search/?api=1&amp;query=9301+3rd+Ave+S+Minneapolis+MN+55420" rel="noopener" target="_blank">Open the address in Google Maps</a></p>
        </div>

        <div class="contact-card">
          <h2>Talk to us</h2>
          <p>Phone: <a href="<?= e($config['phone_href']) ?>"><?= e($config['phone']) ?></a></p>
          <p>Email: <a href="mailto:<?= e($config['site_email']) ?>"><?= e($config['site_email']) ?></a></p>
          <p style="color:#6f6068;font-size:.9rem;">The phone is answered in the kitchen, so during a boil it may
          ring a few times. Leave a message and we will call back.</p>
        </div>

        <div class="contact-card">
          <h2>Opening hours</h2>
          <ul class="hours-list">
            <li><span>Tuesday – Thursday</span><span>11:00 – 18:00</span></li>
            <li><span>Friday</span><span>11:00 – 19:00</span></li>
            <li><span>Saturday</span><span>10:00 – 16:00</span></li>
            <li><span>Sunday – Monday</span><span>Closed</span></li>
          </ul>
          <p style="margin-top:.9rem;color:#6f6068;font-size:.9rem;">Pickups are scheduled by appointment so
          someone is free to hand you your box.</p>
        </div>

        <div class="contact-card">
          <h2>What happens next</h2>
          <ol style="margin:0;padding-left:1.2rem;font-size:.95rem;">
            <li>We check what is on the bench and what can be made in time.</li>
            <li>You get a reply with availability, the total price and pickup windows.</li>
            <li>If you are happy, we confirm the order and schedule it.</li>
            <li>Payment is arranged when we confirm — never on this website.</li>
          </ol>
        </div>
      </div>
    </div>
  </section>

  <section class="section section--tight">
    <div class="wrap">
      <div class="note-box" style="max-width:820px;">
        <p><strong>Quick answers.</strong> Storage, allergens, shipping and the ingredient question are all
        covered in the <a href="faq.html">FAQ</a>. If you are ordering for a wedding or an office, tell us the
        date as early as you can — in summer, big orders need more notice than in January.</p>
      </div>
    </div>
  </section>
</main>
<?php
sw_footer();
