---
import Base from "../layouts/Base.astro";
---

<Base
  title="Tool voorstellen"
  description="Stel een Nederlandse AI-tool voor om te reviewen op AITestBank."
>
  <section class="intro">
    <h1>Stel een tool voor</h1>
    <p>
      Ken je een (bij voorkeur Nederlandse) AI-tool die een review verdient?
      Laat het weten, ik lees alles.
    </p>
  </section>

  <form method="post" action="/submit-tool" class="suggest-form">
    <div class="field">
      <label for="tool_naam">Naam van de tool <span class="req">*</span></label>
      <input type="text" id="tool_naam" name="tool_naam" required maxlength="120" />
    </div>

    <div class="field">
      <label for="tool_url">Website van de tool <span class="req">*</span></label>
      <input type="url" id="tool_url" name="tool_url" required placeholder="https://" maxlength="300" />
    </div>

    <div class="field">
      <label for="toelichting">Waarom deze tool?</label>
      <textarea id="toelichting" name="toelichting" rows="4" maxlength="2000"></textarea>
    </div>

    <div class="field-row">
      <div class="field">
        <label for="naam">Je naam <span class="opt">(optioneel)</span></label>
        <input type="text" id="naam" name="naam" maxlength="120" />
      </div>
      <div class="field">
        <label for="email">Je e-mail <span class="opt">(optioneel)</span></label>
        <input type="email" id="email" name="email" maxlength="200" placeholder="voor een reactie" />
      </div>
    </div>

    <!-- honeypot: verborgen voor mensen via CSS, bots vullen dit vaak automatisch in -->
    <div class="hp" aria-hidden="true">
      <label for="website">Website</label>
      <input type="text" id="website" name="website" tabindex="-1" autocomplete="off" />
    </div>

    <button type="submit">Versturen</button>
  </form>
</Base>

<style>
  section.intro {
    padding: 44px 0 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 32px;
  }
  section.intro h1 {
    font-size: 34px;
    margin: 0 0 12px;
    text-wrap: balance;
    letter-spacing: -0.01em;
  }
  section.intro p {
    margin: 0 0 30px;
    color: var(--muted);
    max-width: 58ch;
    font-size: 18px;
  }

  .suggest-form {
    max-width: 56ch;
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 80px;
  }
  .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .field { display: flex; flex-direction: column; gap: 6px; }
  label {
    font-family: var(--mono);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }
  .req { color: var(--accent); }
  .opt { text-transform: none; letter-spacing: 0; }

  input, textarea {
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
  }
  textarea { resize: vertical; }
  input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
  }

  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  button {
    align-self: start;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--paper);
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    padding: 12px 22px;
    cursor: pointer;
  }
  button:hover { opacity: 0.9; }

  @media (max-width: 560px) {
    .field-row { grid-template-columns: 1fr; }
  }
</style>
