:root {
  --bg: #f7f6fb;
  --bg-deep: #ffffff;
  --ink: #12101c;
  --ink-soft: #3a3648;
  --muted: #6b6578;
  --line: rgba(18, 16, 28, 0.1);
  --line-strong: rgba(18, 16, 28, 0.16);
  --purple: #8273ff;
  --purple-deep: #6b5ce6;
  --purple-soft: rgba(130, 115, 255, 0.14);
  --purple-glow: rgba(130, 115, 255, 0.22);
  --ring: rgba(18, 16, 28, 0.07);
  --font: 'Outfit', system-ui, sans-serif;
}

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

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

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

.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 45% at 50% 42%, rgba(130, 115, 255, 0.1), transparent 70%),
    radial-gradient(ellipse 40% 35% at 85% 90%, rgba(130, 115, 255, 0.08), transparent 65%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 100%);
}

.rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
}

.rings__ring {
  position: absolute;
  border: 1px solid var(--ring);
  border-radius: 50%;
  aspect-ratio: 1;
}

.rings__ring:nth-child(1) {
  width: min(92vw, 720px);
}
.rings__ring:nth-child(2) {
  width: min(120vw, 980px);
}
.rings__ring:nth-child(3) {
  width: min(150vw, 1240px);
}
.rings__ring:nth-child(4) {
  width: min(180vw, 1500px);
}

.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: var(--purple);
  filter: blur(0.5px);
}

.orb--a {
  width: 14px;
  height: 14px;
  top: 18%;
  left: 14%;
  opacity: 0.85;
  animation: float 7s ease-in-out infinite;
}

.orb--b {
  width: 10px;
  height: 10px;
  right: 16%;
  bottom: 22%;
  opacity: 0.7;
  animation: float 9s ease-in-out infinite reverse;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 6vh, 4rem);
  padding: clamp(1.5rem, 4vw, 3.5rem) 0;
}

.hero {
  width: min(720px, 100%);
  padding: 0 clamp(1.5rem, 4vw, 3.5rem);
  text-align: center;
  animation: rise 0.7s ease both;
}

.wordmark {
  display: block;
  width: min(100%, 280px);
  height: auto;
  margin: 0 auto 1.35rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
}

.tagline {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.tagline em {
  font-style: normal;
  color: var(--purple);
}

.lede {
  margin: 1.15rem auto 0;
  max-width: 36rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.55;
  color: var(--muted);
  font-weight: 400;
}

.join-form {
  margin: 1.85rem auto 0;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.join-form__input--name {
  width: 100%;
}

.join-form__row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}

.join-form__input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line-strong);
  background: var(--bg-deep);
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  box-shadow: 0 1px 2px rgba(18, 16, 28, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.join-form__input::placeholder {
  color: #9a94a8;
}

.join-form__input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px var(--purple-soft);
}

.join-form__button,
.btn-primary {
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.35rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 28px rgba(18, 16, 28, 0.16);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    opacity 0.15s ease;
}

.join-form__button:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  background: #000;
  box-shadow: 0 16px 34px rgba(18, 16, 28, 0.22);
}

.join-form__button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
}

.btn-ghost:hover {
  background: rgba(18, 16, 28, 0.04);
}

.already-prompt {
  margin: 1.1rem auto 0;
  max-width: 34rem;
  padding: 1rem 1.15rem;
  border-radius: 1.1rem;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(18, 16, 28, 0.06);
  animation: rise 0.3s ease both;
  text-align: left;
}

.already-prompt p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

.already-prompt__actions {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.form-error {
  margin: 0.85rem auto 0;
  max-width: 34rem;
  color: #b42318;
  font-size: 0.92rem;
  font-weight: 500;
}

.success {
  margin: 1.35rem auto 0;
  max-width: 34rem;
  animation: rise 0.35s ease both;
}

.success__title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--purple);
}

.success__body {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.brands {
  width: 100%;
  animation: rise 0.85s 0.1s ease both;
}

.brands__label {
  margin: 0 0 1.1rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.brands__viewport {
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}

.brands__viewport:hover .brands__track {
  animation-play-state: paused;
}

.brands__track {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  width: max-content;
  padding: 0.35rem 0;
  animation: brands-marquee 40s linear infinite;
}

.brands__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
}

.brands__item img {
  display: block;
  width: auto;
  max-width: 140px;
  height: 28px;
  object-fit: contain;
  opacity: 0.35;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.brands__item--wide img {
  max-width: 180px;
  height: 22px;
}

.brands__item:hover img {
  opacity: 1;
  transform: scale(1.04);
}

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

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(6px, -10px);
  }
}

@keyframes brands-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 640px) {
  .stage {
    padding: 1.5rem 0 2.25rem;
    gap: 2.25rem;
  }

  .hero {
    padding: 0 1.15rem;
  }

  .wordmark {
    width: min(100%, 220px);
  }

  .join-form__row {
    flex-direction: column;
  }

  .join-form__button {
    width: 100%;
  }

  .tagline {
    font-size: clamp(1.7rem, 8vw, 2.25rem);
  }

  .brands__track {
    gap: 2.25rem;
    animation-duration: 32s;
  }

  .brands__item img {
    max-width: 110px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .brands__track {
    animation: none !important;
    flex-wrap: wrap;
    width: min(920px, 100%);
    margin: 0 auto;
    justify-content: center;
    padding: 0 1rem;
  }

  .brands__item[aria-hidden='true'] {
    display: none;
  }
}
