:root {
  color-scheme: dark;
  --bg: #070611;
  --card: rgba(14, 13, 25, 0.96);
  --card-soft: rgba(18, 17, 31, 0.92);
  --field: #111320;
  --field-focus: #171a2b;
  --line: rgba(128, 112, 182, 0.28);
  --line-strong: rgba(153, 112, 228, 0.52);
  --purple: #a82cff;
  --purple-deep: #7416dc;
  --purple-soft: #bd77ff;
  --muted: #a8a7b7;
  --white: #f8f7ff;
  --error: #ff9eac;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -12%, rgba(125, 27, 255, 0.16), transparent 36%),
    radial-gradient(circle at 6% 60%, rgba(58, 18, 126, 0.08), transparent 34%),
    linear-gradient(180deg, #0a0715 0%, var(--bg) 48%, #05050d 100%);
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.landing-shell {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 468px);
  align-items: start;
  justify-content: center;
  padding: 50px 18px 42px;
}

.starfield,
.starfield::before,
.starfield::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
}

.starfield {
  background-image:
    radial-gradient(circle at 15% 19%, rgba(196, 165, 255, 0.22) 0 1px, transparent 1.7px),
    radial-gradient(circle at 29% 74%, rgba(138, 74, 255, 0.25) 0 1px, transparent 1.8px),
    radial-gradient(circle at 73% 22%, rgba(226, 211, 255, 0.2) 0 1px, transparent 1.7px),
    radial-gradient(circle at 92% 63%, rgba(162, 99, 255, 0.24) 0 1px, transparent 1.8px);
  opacity: 0.62;
}

.starfield::before {
  background: radial-gradient(ellipse at center, transparent 0 36%, rgba(0, 0, 0, 0.28) 82%, rgba(0, 0, 0, 0.62) 100%);
}

.starfield::after {
  background: linear-gradient(180deg, rgba(3, 2, 9, 0.06), rgba(3, 2, 9, 0.34));
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(131, 119, 174, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% -20%, rgba(126, 36, 255, 0.1), transparent 45%),
    linear-gradient(180deg, rgba(18, 17, 30, 0.98), rgba(11, 10, 20, 0.98));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.56),
    0 0 54px rgba(106, 35, 208, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  padding: 50px 44px 36px;
}

.hero-panel::before {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(143, 126, 201, 0.12);
  border-radius: 5px;
  pointer-events: none;
  content: "";
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
  justify-items: center;
  text-align: center;
}

.brand-mark {
  display: grid;
  width: 224px;
  min-height: 59px;
  place-items: center;
}

.brand-mark img {
  display: block;
  width: 224px;
  height: 59px;
  object-fit: contain;
  user-select: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--purple-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: var(--white);
  font-size: clamp(2.25rem, 6vw, 2.75rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.subcopy,
.success-card p {
  max-width: 310px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.45;
}

.signup-card,
.success-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-top: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.form-step {
  display: none;
  gap: 13px;
}

.form-step.is-active {
  display: grid;
}

.field {
  display: grid;
  gap: 7px;
  color: rgba(246, 244, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(142, 133, 171, 0.28);
  border-radius: 9px;
  background: var(--field);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 700;
  outline: none;
  padding: 13px 14px;
  text-transform: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #79798b;
  opacity: 1;
}

.field textarea {
  min-height: 74px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--line-strong);
  background: var(--field-focus);
  box-shadow: 0 0 0 3px rgba(151, 67, 255, 0.1), 0 0 24px rgba(127, 31, 238, 0.12);
}

.terms-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 4px;
  border: 1px solid rgba(141, 132, 170, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.45;
  padding: 11px 12px;
}

.terms-row input {
  appearance: none;
  display: grid;
  width: 17px;
  height: 17px;
  margin: 0;
  place-items: center;
  border: 1px solid rgba(185, 168, 225, 0.56);
  border-radius: 3px;
  background: #161625;
}

.terms-row input::after {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  content: "";
  opacity: 0;
  transform: rotate(-45deg) translateY(-1px);
}

.terms-row input:checked {
  border-color: var(--purple);
  background: var(--purple);
  box-shadow: 0 0 12px rgba(168, 44, 255, 0.35);
}

.terms-row input:checked::after {
  opacity: 1;
}

.legal-link {
  border: 0;
  background: transparent;
  color: var(--purple-soft);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  padding: 0;
}

.legal-link:hover,
.legal-link:focus-visible {
  color: #e4c8ff;
  outline: none;
  text-decoration: underline;
}

.feedback {
  min-height: 18px;
  margin: 0;
  color: rgba(222, 219, 236, 0.72);
  font-size: 0.78rem;
  font-weight: 650;
}

.feedback[data-tone="error"] {
  color: var(--error);
}

.turnstile-shell {
  display: grid;
  width: 100%;
  min-height: 65px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(153, 112, 228, 0.34);
  border-radius: 9px;
  background: rgba(17, 19, 32, 0.72);
  padding: 7px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.primary-button,
.ghost-button {
  display: inline-grid;
  min-height: 56px;
  grid-auto-flow: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.primary-button {
  border: 1px solid rgba(209, 145, 255, 0.4);
  background:
    radial-gradient(circle at 16% 0, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, var(--purple), var(--purple-deep));
  box-shadow:
    0 14px 26px rgba(72, 11, 147, 0.32),
    inset 0 -10px 18px rgba(43, 0, 102, 0.2);
  color: #ffffff;
  padding: 0 20px;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  padding: 0 20px;
}

.primary-button:hover,
.primary-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible {
  filter: brightness(1.08);
  outline: none;
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.ghost-button:focus-visible,
.terms-row input:focus-visible {
  box-shadow: 0 0 0 3px rgba(190, 126, 255, 0.28);
}

.primary-button:disabled {
  cursor: wait;
  filter: saturate(0.7);
  opacity: 0.8;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: #ffffff;
  border-radius: 999px;
}

.signup-card.is-loading .spinner {
  display: block;
  animation: spin 720ms linear infinite;
}

.success-card {
  text-align: center;
}

.success-card h2 {
  margin-bottom: 8px;
  font-size: 1.7rem;
  letter-spacing: -0.035em;
}

.success-card p {
  margin-inline: auto;
}

.success-card .primary-button {
  margin-top: 8px;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  background: rgba(4, 2, 12, 0.8);
  padding: 18px;
}

.legal-modal.is-visible {
  display: grid;
}

.legal-panel {
  position: relative;
  overflow: hidden;
  width: min(920px, 100%);
  height: min(760px, calc(100svh - 40px));
  border: 1px solid rgba(167, 117, 237, 0.42);
  border-radius: 10px;
  background: #0d0b18;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65);
}

.legal-panel h2 {
  height: 58px;
  margin: 0;
  border-bottom: 1px solid rgba(167, 117, 237, 0.22);
  color: var(--white);
  font-size: 1rem;
  padding: 18px 58px 0 18px;
}

.legal-close {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
}

.legal-panel iframe {
  width: 100%;
  height: calc(100% - 58px);
  border: 0;
  background: #ffffff;
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 520px) {
  .landing-shell {
    align-items: start;
    padding: 24px 12px 28px;
  }

  .hero-panel {
    border-radius: 8px;
    padding: 36px 22px 26px;
  }

  .brand-lockup {
    gap: 22px;
  }

  .brand-mark,
  .brand-mark img {
    width: 190px;
    height: auto;
  }

  h1 {
    font-size: 2.15rem;
  }

  .signup-card,
  .success-card {
    margin-top: 27px;
  }
}
