:root {
  --bg: #0b0f16;
  --surface: #101622;
  --line: rgba(255, 255, 255, 0.1);
  --text: #edf1fb;
  --muted: #9aa6bf;
  --accent: #5bc0ff;
  --good: #7ef0cc;
  --error: #ff7f96;
  --radius: 14px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.02), transparent 40%);
  overflow-x: hidden;
}

.shell {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: 2.2rem;
  padding: 2rem 0;
}

.shell > * {
  transition: opacity 320ms ease, transform 320ms ease, filter 320ms ease;
}

.shell.is-transitioning > * {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(3px);
  pointer-events: none;
}

.brand-center {
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #dfe8fc;
}

.hero {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 100%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 2.4vw, 2.25rem);
}

.is-exit {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.is-hidden {
  display: none;
}

body.is-returning-signed-up #waitlist-form {
  display: none !important;
}

.confirmation-page {
  text-align: center;
}

.confirmation-title {
  margin: 0;
}

.confirmation-copy {
  margin: 0.75rem auto 0;
  max-width: 46ch;
  color: var(--muted);
}

.confirmation-actions {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
}

.confirmation-btn {
  border: 1px solid rgba(91, 192, 255, 0.4);
  background: rgba(91, 192, 255, 0.15);
  color: #dceeff;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 1rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

.confirmation-btn:hover {
  background: rgba(91, 192, 255, 0.25);
  border-color: rgba(91, 192, 255, 0.6);
}

.signup-summary {
  margin-top: 1.45rem;
  border: 1px solid rgba(126, 240, 204, 0.18);
  background: rgba(126, 240, 204, 0.05);
  border-radius: 12px;
  padding: 1rem;
}

.signup-summary.celebrate {
  animation: pop-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.signup-title {
  margin: 0;
  color: var(--good);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.signup-copy {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.signup-meta {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.signup-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.96rem;
}

.signup-label {
  color: #b8c1d8;
}

.signup-email-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.signup-email {
  color: #dfe8fc;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 0.22rem 0.48rem;
  overflow-wrap: anywhere;
  transition: opacity 100ms ease, transform 100ms ease;
}

.signup-email.is-transitioning {
  opacity: 0.6;
  transform: scale(0.98);
}

.signup-toggle {
  border: 1px solid rgba(91, 192, 255, 0.35);
  background: rgba(91, 192, 255, 0.12);
  color: #dceeff;
  border-radius: 8px;
  min-height: 30px;
  padding: 0 0.6rem;
  font: inherit;
  cursor: pointer;
}

.signup-toggle:hover {
  background: rgba(91, 192, 255, 0.2);
}

.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 40;
}

.confetti-piece {
  position: absolute;
  top: -14px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.95;
  transform: translate3d(0, 0, 0) rotate(var(--rot-start));
  animation: confetti-fall var(--duration) cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
  animation-delay: var(--delay);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: #7ebde7;
}

h1 {
  margin: 0.65rem 0 0;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-family: "Space Grotesk", sans-serif;
  text-wrap: balance;
}

.lead {
  margin: 1.1rem 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: clamp(1rem, 2vw, 1.125rem);
  max-width: 60ch;
}

.waitlist {
  margin-top: 1.65rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.waitlist input,
.waitlist button {
  border: 0;
  border-radius: 12px;
  min-height: 48px;
  font: inherit;
}

.waitlist input {
  background: rgba(5, 9, 20, 0.7);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0 0.95rem;
}

.waitlist input:focus-visible,
.waitlist button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.waitlist button {
  padding: 0 1.2rem;
  color: #05121f;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.waitlist button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(91, 192, 255, 0.26);
}

.status {
  margin: 0.95rem 0 0;
  color: var(--muted);
  min-height: 1.5em;
}

.status.success {
  color: var(--good);
}

.status.error {
  color: var(--error);
}

.status.signed-up {
  color: var(--good);
}

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

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: reveal-up 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes confetti-fall {
  100% {
    transform: translate3d(var(--drift), 112vh, 0) rotate(var(--rot-end));
    opacity: 0.2;
  }
}

@media (max-width: 680px) {
  .waitlist {
    grid-template-columns: 1fr;
  }

  .signup-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}
