/* ============================================================================
   Aurus.ai — Waitlist / Early Access Modal
   ----------------------------------------------------------------------------
   Self-contained. Every class is `wl-` prefixed so nothing here can collide
   with main.css, components.css, demo-modal.css, or policy-modals.css — and
   nothing in those files can reach in and restyle this.

   Paired with assets/js/waitlist-modal.js, which injects the markup.
   ========================================================================== */

.wl-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;                      /* above the fixed navbar */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(6, 28, 57, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
  overflow-y: auto;
}

.wl-overlay.wl-active {
  opacity: 1;
  visibility: visible;
}

.wl-dialog {
  width: 100%;
  max-width: 640px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(6, 28, 57, .38);
  overflow: hidden;
  transform: translateY(14px) scale(.985);
  transition: transform .22s ease;
  font-family: 'Inter', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  margin: auto;
}

.wl-overlay.wl-active .wl-dialog {
  transform: translateY(0) scale(1);
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.wl-header {
  position: relative;
  background: #061C39;
  padding: 22px 68px 22px 28px;
}

.wl-header h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.wl-close {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .12);
  border: none;
  border-radius: 9px;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease;
}

.wl-close:hover { background: rgba(255, 255, 255, .24); }
.wl-close:focus-visible { outline: 2px solid #FFC000; outline-offset: 2px; }

/* ── Body ─────────────────────────────────────────────────────────────────── */

.wl-body { padding: 24px 28px 28px; }

.wl-intro {
  margin: 0 0 20px;
  font-size: .92rem;
  line-height: 1.55;
  color: #64748b;
}

.wl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.wl-field { display: flex; flex-direction: column; }
.wl-field.wl-full { grid-column: 1 / -1; }

.wl-field label {
  margin: 0 0 7px;
  font-size: .84rem;
  font-weight: 700;
  color: #0f172a;
}

.wl-req { color: #dc2626; margin-left: 2px; }

.wl-field input,
.wl-field textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: .93rem;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  transition: border-color .16s ease, box-shadow .16s ease;
  -webkit-appearance: none;
  appearance: none;
}

.wl-field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.5;
}

.wl-field input::placeholder,
.wl-field textarea::placeholder { color: #94a3b8; }

.wl-field input:focus,
.wl-field textarea:focus {
  outline: none;
  border-color: #1B7A94;
  box-shadow: 0 0 0 3px rgba(27, 122, 148, .14);
}

.wl-field input.wl-invalid,
.wl-field textarea.wl-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .1);
}

.wl-hint {
  margin: 6px 0 0;
  font-size: .78rem;
  color: #94a3b8;
  font-style: italic;
}

/* Honeypot — off-screen, never focusable, invisible to humans. */
.wl-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ── Footer / submit ──────────────────────────────────────────────────────── */

.wl-foot {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wl-submit {
  flex: 0 0 auto;
  min-width: 220px;
  padding: 13px 30px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: #061C39;
  background: #FFC000;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background .16s ease, transform .1s ease;
}

.wl-submit:hover:not(:disabled) { background: #F5A623; }
.wl-submit:active:not(:disabled) { transform: translateY(1px); }
.wl-submit:focus-visible { outline: 2px solid #061C39; outline-offset: 2px; }

.wl-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.wl-note {
  flex: 1 1 200px;
  margin: 0;
  font-size: .78rem;
  line-height: 1.5;
  color: #94a3b8;
}

.wl-error {
  margin: 14px 0 0;
  padding: 11px 14px;
  font-size: .86rem;
  font-weight: 600;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 9px;
  display: none;
}

.wl-error.wl-show { display: block; }

/* ── Success state ────────────────────────────────────────────────────────── */

.wl-done {
  display: none;
  position: relative;      /* confetti anchors to this */
  padding: 44px 32px 40px;
  text-align: center;
  overflow: hidden;
}

.wl-done.wl-show { display: block; }

.wl-done-inner { position: relative; z-index: 2; }

.wl-done-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  color: #061C39;
  background: #FFC000;
  border-radius: 50%;
  animation: wl-pop .45s cubic-bezier(.2, 1.5, .4, 1) both;
}

@keyframes wl-pop {
  from { transform: scale(.3); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.wl-done h3 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #061C39;
}

.wl-done p {
  margin: 0 auto 14px;
  max-width: 400px;
  font-size: .94rem;
  line-height: 1.6;
  color: #64748b;
}

.wl-ride {
  margin: 0 auto 22px !important;
  font-size: .9rem !important;
  color: #1B7A94 !important;
  font-weight: 600;
}

.wl-ride strong { color: #061C39; }

.wl-ride span {
  display: inline-block;
  min-width: 1ch;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.wl-done-go {
  display: block;
  width: 100%;
  max-width: 260px;
  margin: 0 auto 10px;
  padding: 12px 32px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 800;
  color: #061C39;
  background: #FFC000;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background .16s ease;
}

.wl-done-go:hover { background: #F5A623; }

.wl-done-close {
  padding: 8px 20px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  transition: color .16s ease;
}

.wl-done-close:hover { color: #64748b; }

/* ── Confetti ─────────────────────────────────────────────────────────────── */
/* Dependency-free: absolutely-positioned shards on a CSS fall animation, torn
   down by JS once they land. Purely decorative — aria-hidden, never focusable. */

.wl-confetti {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.wl-confetti i {
  position: absolute;
  top: -16px;
  display: block;
  opacity: 0;
  animation-name: wl-fall;
  animation-timing-function: cubic-bezier(.25, .5, .5, 1);
  animation-fill-mode: forwards;
}

@keyframes wl-fall {
  0%   { opacity: 1; transform: translate3d(0, -10px, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate3d(var(--wl-x, 0), 340px, 0) rotate(var(--wl-r, 360deg)); }
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */

@media (max-width: 560px) {
  .wl-overlay { padding: 12px; align-items: flex-start; }
  .wl-dialog  { max-width: 100%; border-radius: 14px; }
  .wl-header  { padding: 18px 60px 18px 20px; }
  .wl-header h2 { font-size: 1.2rem; }
  .wl-close   { right: 14px; width: 34px; height: 34px; }
  .wl-body    { padding: 20px 20px 24px; }
  .wl-grid    { grid-template-columns: 1fr; gap: 14px; }
  .wl-foot    { flex-direction: column; align-items: stretch; }
  .wl-submit  { width: 100%; min-width: 0; }
  .wl-note    { text-align: center; }
}

/* Respect reduced-motion preferences. The confetti is skipped in JS too. */
@media (prefers-reduced-motion: reduce) {
  .wl-overlay, .wl-dialog, .wl-submit { transition: none; }
  .wl-done-mark { animation: none; }
  .wl-confetti { display: none; }
}
