:root {
  --bg: #070708;
  --ink: #f5f5f5;
  --muted: rgba(255, 255, 255, 0.72);
  --gold: #ffd133;
  --red: #d60a14;
  --action: #b8292e;
  --glass: rgba(18, 18, 20, 0.55);
  --stroke: rgba(255, 255, 255, 0.14);
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

body {
  min-height: 100dvh;
}

.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;
}

.stage {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem 2rem;
  overflow: hidden;
}

.backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.04);
  animation: backdrop-drift 18s ease-in-out infinite alternate;
}

.backdrop-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.82) 100%),
    radial-gradient(ellipse at 50% 18%, rgba(182, 41, 46, 0.22), transparent 55%);
}

.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: min(100%, 32rem);
  margin: 0 auto;
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  width: clamp(96px, 24vw, 120px);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.45));
}

.brand-wordmark {
  width: min(100%, 18rem);
  height: auto;
}

.pitch h1 {
  margin: 0;
  display: grid;
  gap: 0.1rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-transform: uppercase;
}

.line-white {
  font-size: clamp(1.9rem, 7vw, 2.55rem);
  color: #fff;
}

.line-gold {
  font-size: clamp(1.55rem, 5.8vw, 2rem);
  color: var(--gold);
}

.lede {
  margin: 0.75rem auto 0;
  max-width: 24rem;
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 400;
  color: var(--muted);
}

.install-cta {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.55rem;
  justify-items: center;
}

.install-phone-only {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  width: 100%;
}

.install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 20rem);
  border: 0;
  border-radius: 12px;
  padding: 0.95rem 1.25rem;
  background: linear-gradient(180deg, #c83338, var(--action));
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  transition: transform 160ms ease, filter 160ms ease;
}

.install-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.install-note {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.48);
}

.install-qr-block {
  display: none;
  gap: 0.5rem;
  justify-items: center;
}

.install-qr {
  width: 168px;
  height: 168px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(18, 18, 20, 0.85);
  padding: 0.65rem;
}

.install-qr-caption {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.52);
}

/* Phones: button only. Desktops/laptops: QR only. */
@media (min-width: 720px) {
  .install-phone-only {
    display: none;
  }

  .install-qr-block {
    display: grid;
  }
}

.waitlist-wrap {
  margin-top: 1.25rem;
  width: min(100%, 22rem);
}

/* With TestFlight: keep email quiet until someone opens it. */
body.has-testflight .waitlist-details:not([open]) .waitlist {
  display: none;
}

body.has-testflight .waitlist-summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

body.has-testflight .waitlist-summary::-webkit-details-marker {
  display: none;
}

body.has-testflight .waitlist-details[open] .waitlist-summary {
  margin-bottom: 0.7rem;
}

/* Without TestFlight: email is the main CTA. */
body:not(.has-testflight) .waitlist-summary {
  display: none;
}

body:not(.has-testflight) .waitlist-details {
  display: block;
}

body:not(.has-testflight) .waitlist {
  display: block;
}

.waitlist {
  margin-top: 0;
}

.waitlist-row {
  display: flex;
  gap: 0.55rem;
  align-items: stretch;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 0.4rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.waitlist input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.85rem 0.9rem;
}

.waitlist input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.waitlist button {
  border: 0;
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(180deg, #c83338, var(--action));
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 160ms ease, filter 160ms ease;
}

.waitlist button:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.waitlist button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.form-note {
  margin: 0.65rem 0 0;
  min-height: 1.1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.form-note.ok {
  color: #b8f0c2;
}

.form-note.err {
  color: #ffb4b4;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.delay-1 {
  animation-delay: 140ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backdrop-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(0, -1.2%, 0);
  }
}

@media (max-width: 560px) {
  .waitlist-row {
    flex-direction: column;
  }

  .waitlist button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .backdrop {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
