---
import BaseLayout from '../../layouts/BaseLayout.astro';
---

<BaseLayout
  title="You're in — Kiln"
  description="Your Kiln subscription is active. Check your email for the license key."
  noindex={true}
>
  <section class="checkout-success">
    <div class="container">
      <img src="/assets/kiln-logo-dark-notext.svg" alt="Kiln" width="64" height="64" class="logo-icon">
      <h1>You're in.</h1>
      <p class="lead">Payment confirmed. Your Kiln license key is on its way — check your inbox (and spam, just in case).</p>

      <div class="next-steps">
        <h2>Next steps</h2>
        <ol>
          <li>
            <strong>Install Kiln</strong> if you haven't yet:
            <pre><code>pip install kiln3d</code></pre>
          </li>
          <li>
            <strong>Activate your license</strong> when the email arrives:
            <pre><code>kiln license activate &lt;your-key&gt;</code></pre>
            Or export it: <code>export KILN_LICENSE_KEY=&lt;your-key&gt;</code>
          </li>
          <li>
            <strong>Confirm your tier</strong>:
            <pre><code>kiln license status</code></pre>
          </li>
        </ol>
      </div>

      <p class="fallback">
        Email didn't arrive in 5 minutes?
        <a href="/account/recover">Re-send my license key</a>
        — you'll need the email you paid with. Still stuck?
        <a href="mailto:adam@kiln3d.com?subject=Missing%20license%20key">Email us</a>
        and we'll re-issue within the hour.
      </p>

      <div class="cta-row">
        <a href="/docs" class="btn">Read the docs</a>
        <a href="/account" class="btn btn-ghost">Manage subscription</a>
      </div>
    </div>
  </section>
</BaseLayout>

<style>
  .checkout-success {
    padding: 100px 0 120px;
    text-align: center;
  }
  .checkout-success .container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px;
  }
  .logo-icon {
    margin-bottom: 24px;
  }
  .checkout-success h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
  }
  .checkout-success .lead {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 48px;
  }
  .next-steps {
    text-align: left;
    background: var(--bg-card, #f8f8f8);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 10px;
    padding: 28px 32px;
    margin-bottom: 32px;
  }
  .next-steps h2 {
    font-size: 18px;
    margin: 0 0 16px;
  }
  .next-steps ol {
    margin: 0;
    padding-left: 20px;
    line-height: 1.7;
  }
  .next-steps ol > li {
    margin-bottom: 16px;
  }
  .next-steps pre {
    background: #111;
    color: #eee;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin: 8px 0 0;
    overflow-x: auto;
  }
  .next-steps code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  }
  .fallback {
    color: var(--text-muted);
    font-size: 14px;
    margin: 24px 0 40px;
  }
  .cta-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .btn-ghost {
    background: transparent;
    border: 1px solid var(--border, #d5d5d5);
    color: var(--text, inherit);
  }
</style>
