/* ═══════════════════════════════════════════════
   WELCOME FORM MODAL — Luxury Concierge Intake
   Auto-shown on first visit
   ═══════════════════════════════════════════════ */

.wfm {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: stretch;
  justify-content: center;
  font-family: var(--font-ar);
  direction: rtl;
}

.wfm.is-open {
  display: flex;
  animation: wfmFadeIn 0.5s ease both;
}

@keyframes wfmFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wfm__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at center, rgba(11, 9, 8, 0.85) 0%, rgba(11, 9, 8, 0.96) 100%);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.wfm__dialog {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: auto;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg,
      rgba(28, 33, 41, 0.82) 0%,
      rgba(16, 20, 26, 0.92) 100%);
  border: 1px solid rgba(184, 148, 95, 0.22);
  border-radius: 22px;
  padding: 56px clamp(24px, 4vw, 56px) 44px;
  box-shadow:
    inset 0 1px 0 rgba(247, 245, 241, 0.06),
    0 30px 70px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(184, 148, 95, 0.08);
  overflow: hidden;
  animation: wfmSlideUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wfm__dialog::before,
.wfm__dialog::after {
  content: '';
  position: absolute;
  width: 42px;
  height: 42px;
  border: 0 solid rgba(196, 106, 54, 0.55);
  pointer-events: none;
}
.wfm__dialog::before {
  top: 16px;
  inset-inline-start: 16px;
  border-top-width: 1px;
  border-inline-start-width: 1px;
}
.wfm__dialog::after {
  bottom: 16px;
  inset-inline-end: 16px;
  border-bottom-width: 1px;
  border-inline-end-width: 1px;
}

@keyframes wfmSlideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wfm__close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 18, 24, 0.7);
  border: 1px solid rgba(217, 205, 184, 0.18);
  color: rgba(247, 245, 241, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.wfm__close:hover {
  background: rgba(196, 106, 54, 0.18);
  border-color: var(--terracotta);
  color: var(--terracotta);
  transform: rotate(90deg);
}

/* ═══ Scrollable body ═══ */
.wfm__body {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px;
  margin: 0 -4px;
  scrollbar-width: thin;
  scrollbar-color: var(--terracotta) transparent;
}
.wfm__body::-webkit-scrollbar { width: 5px; }
.wfm__body::-webkit-scrollbar-thumb {
  background: var(--terracotta);
  border-radius: 4px;
}

/* ═══ Intro screen ═══ */
.wfm__intro {
  text-align: center;
  padding: 12px 0 8px;
}

.wfm__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid rgba(184, 148, 95, 0.32);
  border-radius: 999px;
  background: rgba(184, 148, 95, 0.06);
  font: 500 12px var(--font-ar);
  color: #E8C786;
  letter-spacing: 0.18em;
  margin-bottom: 22px;
}
.wfm__brand::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 8px rgba(196, 106, 54, 0.6);
}

.wfm__title {
  font: 800 clamp(28px, 3.6vw, 40px)/1.25 var(--font-display);
  color: #F7F5F1;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.wfm__tagline {
  font: 700 clamp(15px, 1.6vw, 18px) var(--font-ar);
  color: #E8C786;
  margin: 0 0 18px;
  letter-spacing: 0.04em;
}

.wfm__desc {
  font: 400 clamp(14px, 1.2vw, 16px)/1.85 var(--font-ar);
  color: rgba(247, 245, 241, 0.78);
  max-width: 560px;
  margin: 0 auto 26px;
}

.wfm__featuresHead {
  font: 600 14px var(--font-ar);
  color: rgba(247, 245, 241, 0.92);
  margin: 0 0 14px;
}

.wfm__features {
  list-style: none;
  padding: 0;
  margin: 0 auto 32px;
  max-width: 460px;
  text-align: right;
  display: grid;
  gap: 10px;
}

.wfm__features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(15, 18, 24, 0.5);
  border: 1px solid rgba(217, 205, 184, 0.10);
  border-radius: 10px;
  font: 500 14px var(--font-ar);
  color: rgba(247, 245, 241, 0.85);
}

.wfm__features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-light), #E8C786);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(184, 148, 95, 0.4);
}

.wfm__start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
  color: #F7F5F1;
  font: 600 15px var(--font-ar);
  padding: 16px 38px;
  border-radius: 4px;
  border: 1px solid rgba(168, 85, 37, 0.55);
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow:
    0 12px 28px rgba(168, 85, 37, 0.32),
    inset 0 1px 0 rgba(247, 245, 241, 0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wfm__start:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px rgba(168, 85, 37, 0.42),
    inset 0 1px 0 rgba(247, 245, 241, 0.28);
}
.wfm__start span { font-size: 14px; opacity: 0.85; }

/* ═══ Progress (step dots) ═══ */
.wfm__progress {
  margin-bottom: 32px;
  position: relative;
}

.wfm__progress-bar {
  position: absolute;
  top: 19px;
  inset-inline-start: calc(100% / (var(--steps, 3) * 2) + 22px);
  inset-inline-end: calc(100% / (var(--steps, 3) * 2) + 22px);
  height: 1px;
  background: rgba(217, 205, 184, 0.14);
  overflow: hidden;
  z-index: 0;
}

.wfm__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-light), var(--terracotta));
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.wfm__progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  gap: 8px;
}

.wfm__progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.wfm__progress-step .num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(16, 20, 26, 0.95);
  border: 1.5px solid rgba(217, 205, 184, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 13px var(--font-ar);
  color: rgba(247, 245, 241, 0.6);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wfm__progress-step .name {
  font: 500 11.5px var(--font-ar);
  color: rgba(247, 245, 241, 0.45);
  text-align: center;
  letter-spacing: 0.04em;
}

.wfm__progress-step.is-active .num {
  background: rgba(196, 106, 54, 0.12);
  border-color: var(--terracotta);
  color: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(196, 106, 54, 0.12), 0 4px 14px rgba(196, 106, 54, 0.28);
  transform: scale(1.06);
}
.wfm__progress-step.is-active .name {
  color: var(--terracotta);
  font-weight: 600;
}

.wfm__progress-step.is-done .num {
  background: rgba(74, 139, 142, 0.14);
  border-color: var(--teal-light);
  color: var(--teal-light);
}
.wfm__progress-step.is-done .num::after {
  content: '✓';
  font-size: 14px;
}
.wfm__progress-step.is-done .num span { display: none; }
.wfm__progress-step.is-done .name { color: rgba(74, 139, 142, 0.95); }

/* ═══ Step panels ═══ */
.wfm__step {
  display: none;
  border: none;
  padding: 0;
  margin: 0;
  animation: wfmStepIn 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.wfm__step.is-active { display: block; }

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

.wfm__step-title {
  font: 700 clamp(20px, 2.2vw, 24px) var(--font-ar);
  color: #F7F5F1;
  margin: 0 0 4px;
  padding: 0;
}

.wfm__step-hint {
  font: 400 14px var(--font-ar);
  color: rgba(247, 245, 241, 0.5);
  margin-bottom: 26px;
}

/* ═══ Question + field styles ═══ */
.wfm__q {
  margin-bottom: 26px;
}

.wfm__q-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font: 600 14.5px var(--font-ar);
  color: rgba(247, 245, 241, 0.92);
  margin-bottom: 12px;
  line-height: 1.5;
}

.wfm__q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(196, 106, 54, 0.14);
  color: var(--terracotta);
  font: 700 11px var(--font-ar);
  padding: 0 5px;
  letter-spacing: 0;
  flex-shrink: 0;
}

.wfm__q-required {
  color: var(--terracotta);
  font-weight: 700;
  margin-inline-start: 2px;
}

.wfm__input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(217, 205, 184, 0.22);
  border-radius: 0;
  padding: 12px 4px 14px;
  font: 500 15.5px var(--font-ar);
  color: #F7F5F1;
  transition: border-color 0.3s, background 0.3s;
}
.wfm__input:focus {
  outline: none;
  border-bottom-color: var(--terracotta);
  background: linear-gradient(to top, rgba(196, 106, 54, 0.05), transparent 60%);
}
.wfm__input::placeholder {
  color: rgba(247, 245, 241, 0.28);
  font-weight: 400;
}

/* ─── Radio options ─── */
.wfm__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wfm__opt {
  position: relative;
  display: block;
  cursor: pointer;
}
.wfm__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wfm__opt-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: rgba(15, 18, 24, 0.55);
  border: 1px solid rgba(217, 205, 184, 0.10);
  border-radius: 10px;
  font: 500 14px var(--font-ar);
  color: rgba(247, 245, 241, 0.82);
  transition: all 0.3s ease;
}

.wfm__opt-pill::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(217, 205, 184, 0.32);
  background: transparent;
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
}

.wfm__opt:hover .wfm__opt-pill {
  border-color: rgba(217, 205, 184, 0.22);
  background: rgba(20, 24, 31, 0.7);
}

.wfm__opt input:checked + .wfm__opt-pill {
  background: rgba(196, 106, 54, 0.10);
  border-color: var(--terracotta);
  color: #F7F5F1;
  box-shadow: 0 0 16px rgba(196, 106, 54, 0.18);
}
.wfm__opt input:checked + .wfm__opt-pill::before {
  border-color: var(--terracotta);
  background: var(--terracotta);
  box-shadow: inset 0 0 0 3px rgba(15, 18, 24, 0.95);
}

/* "Other" option custom text input */
.wfm__other {
  margin-top: 8px;
  display: none;
}
.wfm__opt input[value="__other__"]:checked ~ .wfm__other {
  display: block;
}
.wfm__other-input {
  width: 100%;
  background: rgba(15, 18, 24, 0.55);
  border: 1px solid rgba(217, 205, 184, 0.18);
  border-radius: 8px;
  padding: 10px 14px;
  font: 500 14px var(--font-ar);
  color: #F7F5F1;
}
.wfm__other-input:focus {
  outline: none;
  border-color: var(--terracotta);
}

/* ═══ Error states ═══ */
.wfm__q.has-error .wfm__input {
  border-bottom-color: #E44966;
}
.wfm__q.has-error .wfm__opt-pill {
  border-color: rgba(228, 73, 102, 0.45);
}
.wfm__q-error {
  display: none;
  font: 400 12px var(--font-ar);
  color: #E44966;
  margin-top: 8px;
}
.wfm__q.has-error .wfm__q-error {
  display: block;
}

/* ═══ Actions ═══ */
.wfm__actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(217, 205, 184, 0.08);
}
.wfm__step[data-step="0"] .wfm__actions {
  justify-content: flex-end;
}

.wfm__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  font: 600 14px var(--font-ar);
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.wfm__btn--primary {
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
  color: #F7F5F1;
  border-color: rgba(168, 85, 37, 0.55);
  box-shadow:
    0 12px 28px rgba(168, 85, 37, 0.28),
    inset 0 1px 0 rgba(247, 245, 241, 0.22);
}
.wfm__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px rgba(168, 85, 37, 0.38),
    inset 0 1px 0 rgba(247, 245, 241, 0.28);
}

.wfm__btn--ghost {
  background: transparent;
  color: rgba(247, 245, 241, 0.78);
  border-color: rgba(217, 205, 184, 0.22);
}
.wfm__btn--ghost:hover {
  color: var(--teal-light);
  border-color: var(--teal-light);
  background: rgba(74, 139, 142, 0.06);
}

/* ═══ Success ═══ */
.wfm__done {
  text-align: center;
  padding: 32px 8px;
  display: none;
}
.wfm__done.is-active { display: block; }

.wfm__done-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: rgba(196, 106, 54, 0.12);
  border: 1.5px solid var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terracotta);
  font-size: 32px;
  font-weight: 700;
  animation: wfmPop 0.6s cubic-bezier(0.16, 1.4, 0.3, 1);
}
@keyframes wfmPop {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.wfm__done-title {
  font: 700 clamp(22px, 2.8vw, 28px) var(--font-display);
  color: #F7F5F1;
  margin: 0 0 10px;
}
.wfm__done-body {
  font: 400 15px/1.85 var(--font-ar);
  color: rgba(247, 245, 241, 0.7);
  max-width: 440px;
  margin: 0 auto 24px;
}
.wfm__done-close {
  background: transparent;
  color: var(--teal-light);
  border: 1px solid var(--teal-light);
  padding: 12px 26px;
  border-radius: 4px;
  font: 600 14px var(--font-ar);
  cursor: pointer;
  transition: all 0.3s ease;
}
.wfm__done-close:hover {
  background: rgba(74, 139, 142, 0.1);
}

/* ═══ Mobile ═══ */
@media (max-width: 640px) {
  .wfm__dialog {
    border-radius: 18px;
    padding: 44px 18px 28px;
    max-height: 96vh;
  }
  .wfm__dialog::before,
  .wfm__dialog::after {
    width: 26px;
    height: 26px;
  }
  .wfm__intro { padding-top: 4px; }
  .wfm__features { max-width: none; }
  .wfm__features li { font-size: 13px; padding: 10px 12px; }
  .wfm__step-title { font-size: 18px; }
  .wfm__step-hint { font-size: 13px; margin-bottom: 20px; }
  .wfm__q { margin-bottom: 22px; }
  .wfm__q-label { font-size: 13.5px; }
  .wfm__opt-pill { font-size: 13.5px; padding: 11px 14px; }
  .wfm__actions { gap: 8px; }
  .wfm__btn { flex: 1; padding: 12px 16px; font-size: 13px; justify-content: center; }
  .wfm__progress-step .name { font-size: 10.5px; }
  .wfm__progress-step .num { width: 34px; height: 34px; font-size: 12px; }
  .wfm__progress-bar { top: 17px; }
}

/* Lock page scroll while modal open */
html.wfm-lock,
body.wfm-lock {
  overflow: hidden !important;
}

/* Hide the legacy register section now that the modal form is primary */
#register {
  display: none !important;
}
