/* ---------- Design tokens ---------- */
:root {
  --bg: #f4f4f5;
  --ink: #0a0a0a;
  --ink-soft: #52525b;
  --field-bg: #ffffff;
  --field-border: #e4e4e7;
  --accent: #0a0a0a;          /* dark "Join" button, matches mockup */
  --accent-ink: #ffffff;
  --ok: #16a34a;
  --err: #dc2626;
  --radius-pill: 999px;
  --shadow-soft: 0 30px 60px -20px rgba(0, 0, 0, 0.25);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Poppins", var(--font-body);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------- */
.page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) 24px clamp(40px, 10vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100svh;
}

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}
.logo__img {
  height: clamp(30px, 8vw, 38px);
  width: auto;
  display: block;
}

/* ---------- Headline ---------- */
.headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 11vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: clamp(28px, 7vw, 44px) 0 0;
}
.subhead {
  color: var(--ink-soft);
  font-size: clamp(14px, 3.6vw, 18px);
  line-height: 1.45;
  margin: clamp(14px, 3.5vw, 18px) 0 0;
  max-width: none;        /* keep each <br> segment on its own line = 2 lines */
  text-wrap: balance;
}

/* ---------- Waitlist form ---------- */
.waitlist {
  display: flex;
  align-items: center;
  width: min(100%, 420px);
  margin: clamp(26px, 6vw, 38px) 0 0;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.waitlist:focus-within {
  border-color: #d4d4d8;
  box-shadow: 0 0 0 4px rgba(10, 10, 10, 0.05);
}
.waitlist__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: clamp(15px, 4vw, 16px);
  color: var(--ink);
  padding: 12px 12px 12px 18px;
}
.waitlist__input::placeholder { color: #a1a1aa; }

/* Honeypot — kept in the layout flow off-screen so bots still "see" it. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.waitlist__btn {
  flex: 0 0 auto;
  position: relative;
  border: 0;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(15px, 4vw, 16px);
  border-radius: var(--radius-pill);
  padding: 11px 22px;
  transition: transform 0.08s ease, opacity 0.15s ease, background 0.15s ease;
}
.waitlist__btn:hover { background: #262626; }
.waitlist__btn:active { transform: scale(0.97); }
.waitlist__btn:disabled { cursor: default; opacity: 0.7; }

/* spinner shown while submitting */
.waitlist__spinner {
  display: none;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.waitlist.is-loading .waitlist__btn-label { visibility: hidden; }
.waitlist.is-loading .waitlist__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Status message ---------- */
.status {
  min-height: 1.2em;
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.status.is-visible { opacity: 1; transform: none; }
.status.is-ok  { color: var(--ok); }
.status.is-err { color: var(--err); }

/* success: collapse the form, celebrate */
.waitlist.is-done { display: none; }

/* ---------- Phone video (thick black border, iPhone-style corners) ---------- */
.phone-wrap {
  margin-top: clamp(30px, 7vw, 52px);
  display: flex;
  justify-content: center;
  width: 100%;
}
.phone {
  position: relative;
  width: clamp(260px, 78vw, 340px);
  margin: 0 auto;
  border: clamp(9px, 2.8vw, 13px) solid #000;       /* thick black border */
  border-radius: clamp(40px, 12vw, 56px);           /* iPhone-style rounded corners */
  overflow: hidden;
  line-height: 0;
  /* Branded placeholder shown until the video loads (or if it fails). */
  background:
    radial-gradient(120% 60% at 50% 18%, rgba(255, 255, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #1d9bf6 0%, #0e2a45 55%, #050608 100%);
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.22));
}
.phone__placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34%;
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.92;
  z-index: 0;
}
.phone__video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1574;     /* matches the encoded video; reserves height */
  object-fit: cover;
}

/* ---------- Motion / accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  .waitlist__spinner { animation: none; }
}

/* slightly more breathing room on large desktops */
@media (min-width: 1024px) {
  .page { max-width: 760px; }
}
