.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  position: relative;
}

.page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(107, 140, 174, 0.08), transparent 60%);
  pointer-events: none;
}

.back-link {
  position: fixed;
  top: 32px;
  left: 40px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
  z-index: 10;
}
.back-link:hover { color: var(--text); }
.back-link svg { width: 14px; height: 14px; }

.waitlist-layout {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 96px;
  align-items: center;
  max-width: 1160px;
  width: 100%;
}

.waitlist-sell {
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding-right: 24px;
}

.sell-block h2 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 18px;
  font-weight: 600;
}

.sell-block p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin: 0;
  max-width: 42ch;
}

.sell-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sell-block li {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
  max-width: 42ch;
}

.sell-block li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
}

.waitlist-form-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .page {
    padding-top: 100px;
  }
  .waitlist-layout {
    grid-template-columns: 1fr;
    gap: 56px;
    max-width: 460px;
  }
  .waitlist-sell {
    padding-right: 0;
    text-align: left;
  }
  .waitlist-form-col {
    align-items: stretch;
  }
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px 44px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 100px -50px rgba(0,0,0,0.7);
}

/* ---------- Form state ---------- */
.form-state {
  display: flex;
  flex-direction: column;
  gap: 28px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.card.submitting .form-state,
.card.done .form-state {
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  pointer-events: none;
  position: absolute;
  inset: 48px 44px;
}

.form-head {
  text-align: left;
}

.form-head h1 {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  line-height: 1.15;
}

.form-head p {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
}

#waitlistForm {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.field input {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.field input::placeholder {
  color: var(--text-dim);
  opacity: 0.7;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 140, 174, 0.15);
}

.field input.touched:invalid {
  border-color: #a15c56;
}

.custom-select-trigger.touched-invalid {
  border-color: #a15c56;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ---------- Custom language dropdown ---------- */
.custom-select {
  position: relative;
}

.custom-select-trigger {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 140, 174, 0.15);
}

.custom-select.open .custom-select-trigger {
  border-color: var(--accent);
}

.custom-select-value {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-select-value.filled {
  color: var(--text);
}

.custom-select-value .flag {
  font-size: 1.05rem;
  line-height: 1;
}

.custom-select-chevron {
  width: 11px;
  height: 7px;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.custom-select.open .custom-select-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.custom-select-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.7);
  max-height: 260px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.custom-select.open .custom-select-list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.custom-select-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 5px;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease;
}

.custom-select-list li:hover,
.custom-select-list li.active {
  background: rgba(107, 140, 174, 0.12);
}

.custom-select-list .flag {
  font-size: 1.05rem;
  line-height: 1;
}

.required {
  color: var(--accent);
}

.submit-btn {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #0D0F12;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 14px 22px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.submit-btn:hover {
  background: #7d9dbc;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -6px rgba(107, 140, 174, 0.5);
}
.submit-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(13,15,18,0.3);
  border-top-color: #0D0F12;
  animation: spin 0.7s linear infinite;
  display: none;
}
.card.submitting .spinner { display: inline-block; }
.card.submitting .submit-label { display: none; }

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

.form-foot {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 4px;
}

.mock-disclaimer {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.6;
  text-align: center;
  line-height: 1.6;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

/* ---------- Success state ---------- */
.success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
  position: absolute;
  inset: 48px 44px;
  pointer-events: none;
}

.card.done .success-state {
  opacity: 1;
  transform: translateY(0);
  position: static;
  pointer-events: auto;
}

.check-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.check-ring::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  transform: scale(0.7);
}

.card.done .check-ring::before {
  animation: ring-pop 0.6s ease 0.3s forwards;
}

@keyframes ring-pop {
  0% { opacity: 1; transform: scale(0.7); }
  70% { opacity: 0.4; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1.3); }
}

.check-ring svg {
  width: 28px;
  height: 28px;
}

.check-ring svg path {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}

.card.done .check-ring svg path {
  animation: draw-check 0.45s ease 0.5s forwards;
}

@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

.success-state h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.success-state p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
  max-width: 32ch;
}

.queue-position {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.queue-position .num {
  color: var(--accent);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.queue-position .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
}

@media (max-width: 520px) {
  .card { padding: 40px 28px; }
  .field-row { grid-template-columns: 1fr; }
}
