feat: waitlist page for launch signups (name, email, phone)

Standalone page served at /waitlist/. Phone numbers are normalised to E.164
(+251 for local numbers). ENDPOINT must be set before public use; until
then signups are kept only in the visitor's browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kirukib 2026-10-16 22:17:29 +03:00
parent 9b8da0b245
commit 69cb247d8e
2 changed files with 294 additions and 0 deletions

View File

@ -8,6 +8,8 @@ Video courses for makeup artists in Amharic, Afaan Oromoo, Tigrinya and English.
- **Design:** [`design/inspo/README.md`](design/inspo/README.md) (Logosmental reference), [`design/tokens.json`](design/tokens.json), [`design/audit-2026-10-06.md`](design/audit-2026-10-06.md).
- **Live demo (Phase 0, Claude-hosted):** https://claude.ai/artifact/Rv2YqqccDs9GtAWbzHUCHE. It's private, so ask the owner for access. Payments, SMS and email are simulated.
**Waitlist page:** `apps/demo/public/waitlist/index.html` is a standalone page (name, email, phone) served at `/waitlist/` on Vercel. Set `ENDPOINT` in it before sharing it publicly. Until then, signups stay in the visitor's browser.
## Layout
| Path | What |

View File

@ -0,0 +1,292 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>MakeUp Academy — Join the waitlist</title>
<meta name="description" content="Video makeup courses from working Ethiopian artists, in Amharic, Afaan Oromoo, Tigrinya and English. Join the waitlist to hear the day we open." />
<meta name="theme-color" content="#FFF8F6" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&family=Noto+Serif+Ethiopic:wght@500;700&display=swap" />
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Crect width='34' height='34' rx='10' fill='%231D3557'/%3E%3Cpath d='M7 22c3.5-6 7-6 10 0s6.5 6 10 0' fill='none' stroke='%23A8DADC' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='23.5' cy='11' r='3.5' fill='%23E63946'/%3E%3C/svg%3E" />
<style>
:root {
--ink: #1D3557; --ink-2: #4A5D78; --ink-3: #7A8799;
--bg: #FFF8F6; --card: #FFFFFF; --line: #F0E2DE; --blush: #FAD7DA; --blush-2: #FDECEC; --nude: #F3E3DA;
--accent: #E63946; --accent-hover: #CB1928; --ok: #2E7D5B; --ok-soft: #E3F4EA;
--sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
--serif: 'Instrument Serif', Georgia, serif;
--eth: 'Noto Serif Ethiopic', serif;
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--shadow: 0 1px 2px rgba(29, 53, 87, .04), 0 12px 32px rgba(142, 75, 69, .08);
color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(38% 420px at 28% 260px, rgba(250, 215, 218, .8), transparent 70%), radial-gradient(32% 380px at 74% 180px, rgba(168, 218, 220, .45), transparent 70%), var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* nav: pills left, waitlist button right (inspo: Hotle) */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; }
.pills { display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pill.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 720px) { .pills { display: none; } }
/* hero */
.hero { position: relative; text-align: center; padding: 40px 0 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--blush); margin-left: 6px; }
h1 { font-size: clamp(42px, 7.6vw, 88px); line-height: 1; letter-spacing: -.035em; font-weight: 600; margin: 22px auto 0; max-width: 13ch; }
h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--accent); }
.am { font-family: var(--eth); font-size: clamp(18px, 2.4vw, 22px); color: var(--ink-2); margin: 16px 0 0; }
.lead { max-width: 560px; margin: 14px auto 0; color: var(--ink-2); font-size: clamp(16px, 1.9vw, 18px); }
.art { display: block; width: min(560px, 100%); height: auto; margin: 8px auto -12px; }
/* form card */
.join { max-width: 640px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); text-align: left; scroll-margin-top: 24px; }
.fields { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } .join { padding: 16px; border-radius: 20px; } }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input { min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease; }
input::placeholder { color: var(--ink-3); }
input:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(29, 53, 87, .08); }
input[aria-invalid="true"] { border-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 150ms ease; }
.btn:hover { background: #142844; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn.red { background: var(--accent); } .btn.red:hover { background: var(--accent-hover); }
.fine { margin: 12px 2px 0; font-size: 13px; color: var(--ink-3); text-align: center; }
.err { margin: 10px 2px 0; font-size: 14px; color: var(--accent-hover); font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.done { text-align: center; padding: 18px 8px; }
.done .tick { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--ok-soft); color: var(--ok); }
.done h3 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.done p { margin: 6px 0 0; color: var(--ink-2); }
.done, .join form { transition: opacity 250ms var(--ease-out), translate 250ms var(--ease-out); }
@starting-style { .done { opacity: 0; translate: 0 8px; } }
/* courses at launch: shade swatches instead of logos (inspo: Hotle "trusted by" row) */
.section { padding: 72px 0 0; }
.center { text-align: center; }
h2 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; margin: 0; }
.sub { color: var(--ink-2); margin: 10px auto 0; max-width: 520px; }
.shades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 28px auto 0; max-width: 880px; padding: 0; list-style: none; }
@media (max-width: 760px) { .shades { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shade { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.shade .dot { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .12), inset 6px 6px 12px rgba(255, 255, 255, .55); }
.shade strong { font-size: 15px; line-height: 1.3; }
.shade span { font-size: 13px; color: var(--ink-3); }
/* why */
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }
.why > div { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.why .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--blush-2); color: var(--accent); }
.why h3 { margin: 16px 0 4px; font-size: 18px; letter-spacing: -.01em; }
.why p { margin: 0; color: var(--ink-2); font-size: 15px; }
/* faq (native details) */
.faq { max-width: 720px; margin: 0 auto; }
.faq h2 { margin-bottom: 20px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary svg { flex: none; transition: transform 200ms var(--ease-out); }
details[open] summary svg { transform: rotate(45deg); }
details p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); }
/* closing CTA + footer with oversized wordmark (inspo: Hotle footer, Sumo dark hero) */
.cta { margin-top: 72px; border-radius: 28px; padding: 40px 24px; background: linear-gradient(135deg, #1D3557, #315A93); color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; position: relative; overflow: hidden; }
.cta::after { content: ''; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F5AFB5, #E63946 70%); opacity: .5; }
@media (max-width: 560px) { .cta::after { width: 160px; height: 160px; right: -70px; top: -70px; } }
.cta h2 { color: #fff; position: relative; } .cta h2 em { color: #F5AFB5; }
.cta .btn { position: relative; }
footer { margin-top: 64px; border-top: 1px solid var(--line); overflow: hidden; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 0; font-size: 13px; color: var(--ink-3); }
.foot a { text-decoration: none; } .foot a:hover { color: var(--ink); }
.word { font-weight: 800; font-size: clamp(44px, 11.2vw, 200px); line-height: .8; letter-spacing: -.06em; white-space: nowrap; text-align: center; margin: 0 0 -.12em; background: linear-gradient(180deg, var(--ink) 30%, rgba(29, 53, 87, .12)); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
/* first-visit entrance: rare, so it may stagger (emil-design-eng) */
.rise { animation: rise 600ms var(--ease-out) both; }
.rise:nth-child(2) { animation-delay: 60ms; } .rise:nth-child(3) { animation-delay: 120ms; } .rise:nth-child(4) { animation-delay: 180ms; } .rise:nth-child(5) { animation-delay: 240ms; } .rise:nth-child(6) { animation-delay: 300ms; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
</style>
</head>
<body>
<div class="wrap">
<header class="nav">
<a class="brand" href="#top" aria-label="MakeUp Academy home">
<svg width="34" height="34" viewBox="0 0 34 34" aria-hidden="true"><rect width="34" height="34" rx="10" fill="#1D3557"/><path d="M7 22c3.5-6 7-6 10 0s6.5 6 10 0" fill="none" stroke="#A8DADC" stroke-width="3" stroke-linecap="round"/><circle cx="23.5" cy="11" r="3.5" fill="#E63946"/></svg>
MakeUp Academy
</a>
<nav class="pills" aria-label="Sections">
<a class="pill" href="#courses">Courses</a>
<a class="pill" href="#why">Why us</a>
<a class="pill" href="#faq">FAQ</a>
</nav>
<a class="pill dark" href="#join" data-focus>Join the waitlist</a>
</header>
<main id="top">
<section class="hero">
<span class="eyebrow rise"><i></i>Opening soon · 4 languages</span>
<h1 class="rise">Your <em>signature look</em> starts here.</h1>
<p class="am rise" lang="am">በቅርቡ ይከፈታል</p>
<p class="lead rise">Video makeup courses from working Ethiopian artists, in Amharic, Afaan Oromoo, Tigrinya and English. Join the list and we'll tell you the day classes open.</p>
<!-- Hero object: eyeshadow palette, lipstick and brush (stands in for a product photo) -->
<svg class="art rise" viewBox="0 0 560 330" role="img" aria-label="An open eyeshadow palette with a lipstick and a makeup brush">
<defs>
<radialGradient id="shine" cx="35%" cy="30%" r="70%"><stop offset="0" stop-color="#fff" stop-opacity=".6"/><stop offset=".5" stop-color="#fff" stop-opacity="0"/></radialGradient>
<linearGradient id="gold" x1="0" x2="1"><stop offset="0" stop-color="#D9A88F"/><stop offset=".5" stop-color="#F6DCCB"/><stop offset="1" stop-color="#C98B6B"/></linearGradient>
<filter id="soft" x="-20%" y="-20%" width="140%" height="160%"><feDropShadow dx="0" dy="18" stdDeviation="16" flood-color="#8E4B45" flood-opacity=".18"/></filter>
</defs>
<ellipse cx="280" cy="300" rx="230" ry="16" fill="#8E4B45" opacity=".08"/>
<!-- brush -->
<g transform="rotate(-24 120 200)" filter="url(#soft)">
<rect x="30" y="196" width="100" height="16" rx="8" fill="#1D3557"/>
<rect x="126" y="192" width="40" height="24" rx="4" fill="url(#gold)"/>
<path d="M164 190 C 210 172, 240 186, 250 204 C 240 222, 210 236, 164 218 Z" fill="#F5AFB5"/>
<path d="M200 186 C 226 184, 244 194, 250 204 C 244 214, 226 224, 200 222 Z" fill="#E9B8A7"/>
</g>
<!-- palette -->
<g transform="rotate(-5 280 180)" filter="url(#soft)">
<rect x="115" y="80" width="330" height="182" rx="26" fill="#1D3557"/>
<g id="pans"></g>
</g>
<!-- lipstick -->
<g transform="rotate(10 470 180)" filter="url(#soft)">
<rect x="448" y="168" width="48" height="112" rx="8" fill="#1D3557"/>
<rect x="448" y="144" width="48" height="28" rx="3" fill="url(#gold)"/>
<path d="M455 146 L455 82 Q455 62 472 52 L490 40 L490 146 Z" fill="#E63946"/>
<path d="M478 50 L490 40 L490 146 L482 146 Z" fill="#CB1928"/>
</g>
</svg>
<div class="join rise" id="join">
<form id="form" novalidate>
<div class="fields">
<label class="full">Full name<input id="name" name="name" autocomplete="name" placeholder="Selam Tesfaye" required maxlength="80" /></label>
<label>Email<input id="email" name="email" type="email" autocomplete="email" placeholder="you@example.com" required maxlength="120" /></label>
<label>Phone<input id="phone" name="phone" type="tel" autocomplete="tel" inputmode="tel" placeholder="+251 9XX XXX XXX" required maxlength="20" /></label>
<button class="btn red full" id="submit">Get notified
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg>
</button>
</div>
<p class="err" id="err" role="alert"></p>
<p class="fine">One message when we open. We never share your details.</p>
</form>
</div>
</section>
<section class="section center" id="courses">
<h2>Courses at <em>launch</em></h2>
<p class="sub">Start with the basics, or go straight to the looks clients book you for.</p>
<ul class="shades">
<li class="shade"><i class="dot" style="background:#E9B8A7"></i><strong>Makeup foundations</strong><span>Skin tone, base and color</span></li>
<li class="shade"><i class="dot" style="background:#E63946"></i><strong>Bridal &amp; events</strong><span>Looks that last a 14-hour day</span></li>
<li class="shade"><i class="dot" style="background:#A8DADC"></i><strong>Skin prep &amp; care</strong><span>The canvas before the color</span></li>
<li class="shade"><i class="dot" style="background:#8E4B45"></i><strong>Building your clientele</strong><span>Pricing, kit and bookings</span></li>
</ul>
</section>
<section class="section" id="why">
<div class="center"><h2>Learn the craft, <em>your way</em></h2></div>
<div class="why">
<div><span class="ic"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/></svg></span><h3>In your language</h3><p>Every lesson in Amharic, Afaan Oromoo, Tigrinya or English.</p></div>
<div><span class="ic"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><rect x="3" y="6" width="18" height="13" rx="2"/><path d="M3 10h18M7 15h4"/></svg></span><h3>Pay once, keep it</h3><p>One payment per course with Telebirr or CBE Birr. Yours for life.</p></div>
<div><span class="ic"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><rect x="7" y="2" width="10" height="20" rx="2"/><path d="M11 18h2"/></svg></span><h3>Made for your phone</h3><p>Short video lessons that work on a mobile data plan.</p></div>
</div>
</section>
<section class="section faq" id="faq">
<h2><em>Frequently</em> asked questions</h2>
<details><summary>When will classes open?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>We're finishing the first courses now. Everyone on the waitlist hears first, by SMS or email, on opening day.</p></details>
<details><summary>How much will courses cost?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>Each course has one price in birr, shown before you pay. You pay once and keep the course for life. Some lessons are free to preview.</p></details>
<details><summary>How do I pay?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>Telebirr or CBE Birr in Ethiopia. International cards are coming for students abroad.</p></details>
<details><summary>What will you do with my details?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>Only tell you when we open. We don't sell or share them, and you can ask us to delete them at any time.</p></details>
</section>
<section class="cta">
<h2>Be first in <em>the chair</em>.</h2>
<a class="btn red" href="#join" data-focus>Join the waitlist</a>
</section>
</main>
</div>
<footer>
<div class="wrap foot"><span>© <span id="year"></span> MakeUp Academy</span><a href="#top">Back to top ↑</a></div>
<p class="word" aria-hidden="true">MakeUp Academy</p>
</footer>
<script>
// ponytail: no waitlist backend yet. Set ENDPOINT to a URL that accepts a JSON POST
// ({ name, email, phone, locale, createdAt }) before sharing this page publicly.
// Until then, signups are kept only in this browser's localStorage (demo only).
const ENDPOINT = '';
const pans = ['#F3D5C4', '#E9B8A7', '#C98B6B', '#8E4B45', '#FAD7DA', '#F5AFB5', '#E63946', '#A8DADC'];
document.getElementById('pans').innerHTML = pans.map((c, i) => {
const x = 137 + (i % 4) * 74, y = 102 + Math.floor(i / 4) * 74;
return `<rect x="${x}" y="${y}" width="64" height="64" rx="10" fill="#142844"/><circle cx="${x + 32}" cy="${y + 32}" r="26" fill="${c}"/><circle cx="${x + 32}" cy="${y + 32}" r="26" fill="url(#shine)"/>`;
}).join('');
document.getElementById('year').textContent = new Date().getFullYear();
document.querySelectorAll('[data-focus]').forEach((a) => a.addEventListener('click', () => setTimeout(() => document.getElementById('name')?.focus({ preventScroll: true }), 400)));
const form = document.getElementById('form'), err = document.getElementById('err'), btn = document.getElementById('submit');
const $ = (id) => document.getElementById(id);
const digits = (p) => p.replace(/[\s()-]/g, '');
// Ethiopian numbers may be typed as 09…, 9…, or +2519…; anything else must be international (+ and 8–15 digits).
function normPhone(p) {
const d = digits(p);
if (/^0[79]\d{8}$/.test(d)) return '+251' + d.slice(1);
if (/^[79]\d{8}$/.test(d)) return '+251' + d;
if (/^\+\d{8,15}$/.test(d)) return d;
return null;
}
function check() {
const name = $('name').value.trim(), email = $('email').value.trim(), phone = normPhone($('phone').value);
const bad = [];
if (name.length < 2) bad.push(['name', 'Please enter your name.']);
if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email)) bad.push(['email', 'Please enter a valid email.']);
if (!phone) bad.push(['phone', 'Please enter a phone number, e.g. 0911 234 567 or +1 202 555 0100.']);
['name', 'email', 'phone'].forEach((k) => $(k).setAttribute('aria-invalid', String(bad.some(([b]) => b === k))));
return bad.length ? { error: bad[0] } : { data: { name, email: email.toLowerCase(), phone, locale: navigator.language || 'en', createdAt: new Date().toISOString() } };
}
form.addEventListener('input', (e) => { if (e.target.getAttribute('aria-invalid') === 'true') check(); });
form.addEventListener('submit', async (e) => {
e.preventDefault(); err.textContent = '';
const r = check();
if (r.error) { err.textContent = r.error[1]; $(r.error[0]).focus(); return; }
btn.disabled = true;
try {
if (ENDPOINT) {
const res = await fetch(ENDPOINT, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(r.data) });
if (!res.ok) throw new Error(res.status);
} else {
let list = []; try { list = JSON.parse(localStorage.getItem('waitlist') || '[]'); } catch {}
if (!list.some((x) => x.email === r.data.email)) list.push(r.data);
try { localStorage.setItem('waitlist', JSON.stringify(list)); } catch {}
console.warn('Waitlist ENDPOINT not set: signup saved in this browser only.', r.data);
}
const first = r.data.name.split(' ')[0];
form.parentElement.innerHTML = `<div class="done" role="status"><div class="tick"><svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7"/></svg></div><h3>You're on the list, ${first.replace(/[<>&"]/g, '')}.</h3><p>We'll message you the day classes open.</p></div>`;
} catch {
err.textContent = "Something went wrong. Please try again in a moment.";
btn.disabled = false;
}
});
</script>
</body>
</html>