/* ==========================================================================
   WAITLIST MODAL
   Submits to /.netlify/functions/waitlist-signup which proxies to the app's
   /api/founding-spot route (Resend email handled by the app).
   ========================================================================== */

.wl-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.wl-modal[data-wl-open] {
  opacity: 1;
  pointer-events: auto;
}
.wl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.wl-dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 16px;
  padding: 32px 32px 28px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 24px 48px -12px rgba(15, 23, 42, 0.18),
    0 48px 96px -24px rgba(15, 23, 42, 0.22);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.wl-modal[data-wl-open] .wl-dialog {
  transform: translateY(0) scale(1);
}
.wl-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}
.wl-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.wl-close:focus-visible {
  outline: 2px solid #e05d36;
  outline-offset: 2px;
}

.wl-header {
  margin-bottom: 22px;
}
.wl-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  line-height: 1.2;
}
.wl-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

.wl-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wl-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wl-field label {
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  letter-spacing: -0.005em;
}
.wl-field input {
  font: inherit;
  font-size: 14.5px;
  color: #0f172a;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.wl-field input::placeholder {
  color: #94a3b8;
}
.wl-field input:focus {
  outline: none;
  border-color: #e05d36;
  box-shadow: 0 0 0 3px rgba(224, 93, 54, 0.12);
}

.wl-submit {
  margin-top: 6px;
  background: #e05d36;
  border: 0;
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.18s ease,
    transform 0.05s ease;
}
.wl-submit:hover {
  background: #c24a26;
}
.wl-submit:active {
  transform: translateY(1px);
}
.wl-submit:focus-visible {
  outline: 2px solid #e05d36;
  outline-offset: 2px;
}
.wl-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.wl-meta {
  font-size: 12px;
  color: #94a3b8;
  margin: 4px 0 0;
  text-align: center;
}

.wl-success,
.wl-error {
  display: none;
}
.wl-success[data-wl-show],
.wl-error[data-wl-show] {
  display: block;
}
.wl-form[data-wl-hide] {
  display: none;
}
.wl-success {
  text-align: center;
  padding: 12px 0 4px;
}
.wl-success-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 22px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-weight: 700;
}
.wl-success h3 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.018em;
  margin: 0 0 6px;
}
.wl-success p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}
.wl-error {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fee2e2;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 480px) {
  .wl-dialog {
    padding: 26px 22px 22px;
  }
  .wl-title {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wl-modal,
  .wl-dialog {
    transition: none;
  }
}
