<?php
// order.php — Dabil Order & Pay onboarding screen
// Matches the "Dining Made Simple" design (order.png)
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>Order &amp; Pay — Dabil</title>
<style>
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --primary:        #2563EB;
    --primary-dark:   #1D4ED8;
    --primary-bg:     #EFF6FF;
    --text:           #0F172A;
    --text-muted:     #64748B;
    --text-light:     #94A3B8;
    --bg:             #F0F4FF;
    --card-bg:        #FFFFFF;
    --card-border:    #E8EEFF;
    --radius-card:    18px;
    --radius-icon:    14px;
    --shadow-card:    0 2px 12px rgba(37,99,235,.07);
  }

  html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    overflow-x: hidden;
    color: var(--text);
  }

  .page {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    max-width: 430px;
    margin: 0 auto;
    background: var(--bg);
    position: relative;
  }

  /* ── Hero ── */
  .hero {
    position: relative;
    flex-shrink: 0;
    height: 48vw;
    min-height: 230px;
    max-height: 330px;
    overflow: hidden;
    border-radius: 0 0 28px 28px;
    background: linear-gradient(135deg, #D6E4FF 0%, #EEF3FF 50%, #E8D5FF 100%);
    animation: heroIn .5s cubic-bezier(.22,1,.36,1) both;
  }

  @keyframes heroIn {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  /* Fallback */
  .hero-fallback {
    position: absolute; inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
  }

  .hero-fallback .phone-mock {
    background: #fff;
    border-radius: 24px;
    width: 110px;
    height: 180px;
    box-shadow: 0 16px 40px rgba(37,99,235,.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
  }

  .phone-mock .pm-header {
    background: var(--primary);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .phone-mock .pm-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
  }

  .pm-row {
    background: #EFF6FF;
    border-radius: 6px;
    height: 14px;
  }

  .pm-row.accent { background: var(--primary); }
  .pm-row.sm { height: 10px; width: 70%; }

  .phone-mock.tilted {
    transform: rotate(-8deg) translateX(-6px);
  }

  .phone-mock.tilted2 {
    transform: rotate(6deg) translateX(6px) translateY(12px);
  }

  /* QR mockup on second phone */
  .pm-qr {
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    margin: 6px auto;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 3px;
    padding: 4px;
  }

  .pm-qr span {
    background: #0F172A;
    border-radius: 2px;
  }

  /* ── Content ── */
  .content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 22px;
    background: var(--bg);
    position: relative;
    z-index: 2;
  }

  /* ── Headline ── */
  .headline {
    text-align: center;
    padding: 28px 8px 24px;
  }

  .headline h1 {
    font-size: 1.72rem;
    font-weight: 800;
    letter-spacing: -.028em;
    line-height: 1.15;
    color: var(--text);
  }

  .headline h1 .accent {
    color: var(--primary);
  }

  .headline p {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-top: 9px;
  }

  /* ── Feature rows ── */
  .features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
  }

  .feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--card-bg);
    border-radius: var(--radius-card);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--card-border);
  }

  .feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-icon);
    background: #EFF6FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #DBEAFE;
  }

  .feature-icon svg {
    color: var(--primary);
  }

  .feature-body h3 {
    font-size: .97rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
  }

  .feature-body p {
    font-size: .795rem;
    color: var(--text-muted);
    line-height: 1.5;
  }

  /* ── CTA Button ── */
  .cta-wrap {
    margin-top: auto;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  }

  .btn-primary {
    display: block;
    width: 100%;
    padding: 17px;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
    text-align: center;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37,99,235,.35);
    transition: background .15s, transform .12s, box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
  }

  .btn-primary:active {
    background: var(--primary-dark);
    transform: scale(.98);
    box-shadow: 0 2px 10px rgba(37,99,235,.25);
  }

  /* ── Back link ── */
  .back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 18px 0 0;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .back-link svg { flex-shrink: 0; }

  /* ── Animations ── */
  .anim-up {
    animation: slideUp .5s cubic-bezier(.22,1,.36,1) both;
  }
  .anim-up.d1 { animation-delay: .08s; }
  .anim-up.d2 { animation-delay: .16s; }
  .anim-up.d3 { animation-delay: .22s; }
  .anim-up.d4 { animation-delay: .28s; }
  .anim-up.d5 { animation-delay: .34s; }

  @keyframes slideUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @media (prefers-reduced-motion: reduce) {
    *, .anim-up, .hero { animation: none !important; }
  }
</style>
</head>
<body>

<div class="page">

  <!-- ── Hero ── -->
  <div class="hero">
    <img class="hero-img"
         src="assets/img/order-hero.png"
         alt="Scan QR code and pay with Dabil"
         onerror="this.style.display='none'">

    <!-- Fallback illustration -->
    <div class="hero-fallback">
      <!-- Phone 1: wallet screen -->
      <div class="phone-mock tilted">
        <div class="pm-header">
          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
            <rect x="2" y="5" width="20" height="14" rx="2"/>
            <path d="M16 12h2"/>
          </svg>
        </div>
        <div class="pm-body">
          <div class="pm-row accent" style="height:22px;border-radius:8px;display:flex;align-items:center;justify-content:center">
            <span style="color:#fff;font-size:8px;font-weight:700">₦20,000</span>
          </div>
          <div class="pm-row sm"></div>
          <div class="pm-row"></div>
          <div class="pm-row sm" style="width:55%"></div>
          <div class="pm-row"></div>
        </div>
      </div>
      <!-- Phone 2: QR scanner -->
      <div class="phone-mock tilted2">
        <div class="pm-header" style="background:#1E3A8A">
          <span style="color:#fff;font-size:7px;font-weight:700">Scan QR code</span>
        </div>
        <div class="pm-body" style="align-items:center">
          <div class="pm-qr">
            <span></span><span style="background:transparent"></span><span></span>
            <span style="background:transparent"></span><span></span><span style="background:transparent"></span>
            <span></span><span style="background:transparent"></span><span></span>
          </div>
          <div class="pm-row sm" style="margin-top:4px"></div>
          <div class="pm-row sm" style="width:55%"></div>
        </div>
      </div>
    </div>
  </div>

  <!-- ── Content ── -->
  <div class="content">

    <a href="welcome.php" class="back-link">
      <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round">
        <polyline points="15 18 9 12 15 6"/>
      </svg>
      Back
    </a>

    <!-- Headline -->
    <div class="headline anim-up d1">
      <h1>Dining Made <span class="accent">Simple</span></h1>
      <p>Scan, order, and pay — all from your phone</p>
    </div>

    <!-- Feature list -->
    <div class="features">

      <div class="feature anim-up d2">
        <div class="feature-icon">
          <!-- QR icon -->
          <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
            <rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/>
            <rect x="3" y="14" width="7" height="7"/>
            <path d="M14 14h1v1h-1zM17 14h1v1h-1zM14 17h1v1h-1zM17 17h3v3h-3z"/>
          </svg>
        </div>
        <div class="feature-body">
          <h3>Scan &amp; Order</h3>
          <p>Access menus instantly with QR</p>
        </div>
      </div>

      <div class="feature anim-up d3">
        <div class="feature-icon">
          <!-- Wallet / checkout icon -->
          <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
            <rect x="2" y="5" width="20" height="14" rx="2"/>
            <path d="M2 10h20"/>
            <circle cx="16" cy="15" r="1" fill="currentColor"/>
          </svg>
        </div>
        <div class="feature-body">
          <h3>Fast Checkout</h3>
          <p>Pay in seconds with your Dabil wallet.</p>
        </div>
      </div>

      <div class="feature anim-up d4">
        <div class="feature-icon">
          <!-- Lightning / check-in icon -->
          <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
            <polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/>
          </svg>
        </div>
        <div class="feature-body">
          <h3>QR Check-in</h3>
          <p>Enjoy seamless cashless dining</p>
        </div>
      </div>

    </div>

    <!-- CTA -->
    <div class="cta-wrap anim-up d5">
      <a href="signup.php" class="btn-primary">Continue</a>
    </div>

  </div><!-- /.content -->

</div><!-- /.page -->

</body>
</html>
