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

:root {
  --white: #ffffff;
  --off: #f7f8fc;
  --light: #eef1f8;
  --border: #e2e6f0;
  --black: #08090f;
  --dark: #111320;
  --muted: #6b7280;
  --blue: #1a56ff;
  --blue-light: #e8edff;
  --blue-mid: #4f75ff;
  --cyan: #00d4ff;
  --live: #10b981;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
  min-height: 100vh;
}

/* =========================
   PAGE WRAPPER
========================= */
.waitlist-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--white);
  overflow: hidden;
}

/* Background grid */
.waitlist-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black, transparent);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black, transparent);
  pointer-events: none;
  z-index: 0;
}

/* Ambient glow */
.waitlist-page::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(26,86,255,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(0,212,255,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* =========================
   MAIN CONTAINER
========================= */
.waitlist-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  position: relative;
  z-index: 1;
}

/* =========================
   FORM CARD
========================= */
.waitlist-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(36px, 5vw, 56px) clamp(28px, 5vw, 52px);
  width: 100%;
  max-width: 520px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(26,86,255,0.08), 0 4px 16px rgba(0,0,0,0.04);
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Top accent bar */
.waitlist-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

/* =========================
   BADGE
========================= */
.wl-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(26,86,255,0.08);
}

.wl-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  animation: blink 2s infinite;
  flex-shrink: 0;
}

/* =========================
   HEADING
========================= */
.waitlist-card h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--dark);
  line-height: 1.1;
  margin-bottom: 10px;
}

.waitlist-card h1 span {
  color: var(--blue);
  position: relative;
}

.waitlist-card h1 span::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 2px;
  opacity: 0.4;
}

.wl-subtitle {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 36px;
}

/* =========================
   FORM
========================= */
.wl-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.wl-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  letter-spacing: 0.3px;
}

.wl-field label .required {
  color: var(--blue);
  margin-left: 3px;
}

.wl-input,
.wl-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--dark);
  background: var(--off);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.wl-input::placeholder { color: #b0b8cc; font-weight: 300; }

.wl-input:focus,
.wl-select:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,86,255,0.08);
}

.wl-input.error,
.wl-select.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}

/* Custom select arrow */
.wl-select-wrap { position: relative; }

.wl-select-wrap::after {
  content: '';
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--muted);
  pointer-events: none;
}

.wl-select { cursor: pointer; padding-right: 40px; }

/* Role field — hidden until Staffing selected */
.wl-field.role-field {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  gap: 0;
  transition:
    max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    opacity    0.28s ease,
    gap        0.3s ease;
}

.wl-field.role-field.visible {
  max-height: 120px;
  opacity: 1;
  gap: 8px;
}

/* Field error text */
.wl-error-msg {
  font-size: 12px;
  color: #ef4444;
  display: none;
  align-items: center;
  gap: 5px;
}

.wl-error-msg.show { display: flex; }

/* =========================
   DIVIDER
========================= */
.wl-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* =========================
   SUBMIT BUTTON
========================= */
.wl-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 32px rgba(26,86,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}

.wl-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.wl-submit:hover:not(:disabled) {
  background: var(--blue-mid);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(26,86,255,0.4);
}

.wl-submit:active:not(:disabled) { transform: translateY(0); }
.wl-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.wl-submit .btn-arrow { transition: transform 0.2s; }
.wl-submit:hover:not(:disabled) .btn-arrow { transform: translateX(3px); }

.wl-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
  flex-shrink: 0;
}

.wl-submit.loading .wl-spinner { display: block; }
.wl-submit.loading .btn-text,
.wl-submit.loading .btn-arrow  { display: none; }

/* =========================
   TRUST ROW
========================= */
.wl-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.wl-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
  white-space: nowrap;
}

.wl-trust-item i { color: var(--blue); font-size: 13px; }

/* =========================
   SUCCESS STATE
========================= */
.wl-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
  animation: cardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wl-success.show { display: flex; }

.wl-success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(16,185,129,0.1);
  border: 2px solid rgba(16,185,129,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--live);
  margin-bottom: 24px;
  animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.wl-success h2 {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--dark);
  margin-bottom: 10px;
}

.wl-success p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
  max-width: 340px;
  margin: 0 auto 28px;
}

.wl-success-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-light);
  border: 1px solid rgba(26,86,255,0.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--blue);
  font-weight: 500;
  margin-bottom: 28px;
  word-break: break-all;
}

.wl-back-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.wl-back-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* =========================
   TOAST
========================= */
.wl-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--dark);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 9999;
  max-width: calc(100vw - 32px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

.wl-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.wl-toast.toast-error   { border-left: 3px solid #ef4444; }
.wl-toast.toast-success { border-left: 3px solid var(--live); }

.wl-toast i { font-size: 15px; flex-shrink: 0; }
.wl-toast.toast-error   i { color: #ef4444; }
.wl-toast.toast-success i { color: var(--live); }

/* =========================
   KEYFRAMES
========================= */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

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

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

@keyframes popIn {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* =========================
   RESPONSIVE — 1024px (tablets landscape)
========================= */
@media (max-width: 1024px) {
  .waitlist-container {
    padding: 110px 32px 80px;
  }
}

/* =========================
   RESPONSIVE — 768px (tablets portrait)
========================= */
@media (max-width: 768px) {
  .waitlist-page::before {
    background-size: 48px 48px;
    opacity: 0.25;
  }

  .waitlist-container {
    padding: 100px 20px 60px;
    align-items: flex-start;
  }

  .waitlist-card {
    max-width: 100%;
    border-radius: 16px;
  }

  .wl-trust { gap: 14px; }
}

/* =========================
   RESPONSIVE — 480px (mobile)
========================= */
@media (max-width: 480px) {
  .waitlist-page::before {
    background-size: 40px 40px;
    opacity: 0.2;
  }

  .waitlist-container {
    padding: 90px 16px 48px;
    align-items: flex-start;
  }

  .waitlist-card {
    padding: 28px 20px 32px;
    border-radius: 14px;
  }

  .waitlist-card h1 {
    font-size: 26px;
    letter-spacing: -1px;
  }

  .wl-badge {
    font-size: 10px;
    padding: 4px 12px;
  }

  /* Prevent iOS zoom on input focus */
  .wl-input,
  .wl-select {
    font-size: 16px;
    padding: 13px 14px;
  }

  .wl-submit {
    font-size: 14px;
    padding: 14px 20px;
  }

  .wl-trust {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
  }

  .wl-success h2  { font-size: 20px; }
  .wl-success p   { font-size: 13px; }

  .wl-success-email-chip {
    font-size: 12px;
    padding: 5px 12px;
    text-align: center;
    flex-wrap: wrap;
    justify-content: center;
  }

  .wl-toast {
    bottom: 16px;
    font-size: 12px;
    padding: 10px 14px;
    white-space: normal;
    text-align: left;
  }
}

/* =========================
   RESPONSIVE — 360px (small Android)
========================= */
@media (max-width: 360px) {
  .waitlist-container {
    padding: 80px 12px 40px;
  }

  .waitlist-card {
    padding: 24px 16px 28px;
  }

  .waitlist-card h1 { font-size: 22px; }
  .wl-subtitle      { font-size: 13px; }

  .wl-trust-item:last-child { display: none; }
}

/* =========================
   ULTRA WIDE — 1600px+
========================= */
@media (min-width: 1600px) {
  .waitlist-container {
    padding: 140px 40px 100px;
  }

  .waitlist-card {
    max-width: 560px;
    padding: 64px 60px;
  }
}