/* =========================================================================
   Wasel Club — registration site styles
   Mobile-first, RTL. Design tokens live in :root so the CTO can re-theme by
   editing one block. Colors come from the brand SVGs (pink/navy).
   ========================================================================= */

:root {
  /* Brand */
  --color-pink:        #E464FF;
  --color-pink-dark:   #D04DF0;
  --color-navy:        #084F8F;
  --color-navy-deep:   #074F8E;

  /* Neutrals (sampled from the design) */
  --color-bg:          #FFFFFF;
  --color-surface:     #F1F5FA;   /* cards + inputs */
  --color-surface-2:   #E6EDF5;   /* hover / pressed */
  --color-text:        var(--color-navy);
  --color-text-muted:  #5E7391;
  --color-hint:        #7F8FA6;
  --color-border:      #D9E2EE;
  --color-error:       #D93F3F;
  --color-error-bg:    #FDEDED;
  --color-success:     var(--color-pink);

  /* Type */
  --font-family: 'Baloo Bhaijaan 2', 'Tajawal', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Shape */
  --radius-card:   24px;
  --radius-input:  16px;
  --radius-button: 14px;

  /* Layout */
  --page-max-width: 430px;
  --gutter: 24px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

/* On wide screens the phone column sits in a soft card in the middle. */
@media (min-width: 640px) {
  body { background: #F7F9FC; }
  .page {
    margin: 32px auto;
    background: var(--color-bg);
    border-radius: 32px;
    box-shadow: 0 12px 40px rgba(8, 79, 143, 0.08);
    min-height: 0;              /* content defines the height on wide screens */
  }
}

.page {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 40px var(--gutter) 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Logo ---------- */
.logo { display: flex; justify-content: center; margin-bottom: 36px; }
.logo img { width: 110px; height: auto; display: block; }

/* ---------- Landing ---------- */
.hero { text-align: center; margin-bottom: 28px; }
.hero__title {
  margin: 0;
  color: var(--color-pink);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
}
.hero__subtitle {
  margin: 4px 0 0;
  color: var(--color-navy);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
}

.section-title {
  margin: 20px 0 14px;
  font-size: 21px;
  font-weight: 700;
  color: var(--color-navy);
}

.benefits { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.benefit {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: 18px 20px;
}
.benefit__icon { width: 32px; height: 32px; flex: 0 0 32px; }
.benefit__text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-navy);
  line-height: 1.5;
}

/* Hook */
.hero__kicker {
  margin: 10px 0 0;
  color: var(--color-navy);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}
.hero__lead {
  margin: 18px 0 0;
  color: var(--color-text-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
}
.hero__lead-line { display: block; }

/* Numbered steps ("نساعدك تعرف") */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.step {
  counter-increment: step;
  display: flex; align-items: center; gap: 14px;
  background: var(--color-surface);
  border-radius: 18px;
  padding: 12px 16px;
  font-size: 15px; font-weight: 600; color: var(--color-navy);
}
.step::before {
  content: counter(step);
  flex: 0 0 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--color-pink); color: #fff;
  font-size: 15px; font-weight: 700;
}

/* "تخيل 100 شخص" card */
.imagine {
  margin-top: 28px;
  padding: 22px 20px;
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, rgba(228,100,255,0.12), rgba(8,79,143,0.06));
  border: 1px solid rgba(228,100,255,0.25);
}
.imagine__title { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: var(--color-navy); }
.imagine__quote { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--color-pink); }
.imagine__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--color-navy); }
.imagine__list li::before { content: '•'; color: var(--color-pink); margin-left: 8px; font-weight: 800; }
.imagine__footer { margin: 14px 0 0; font-size: 15px; font-weight: 700; color: var(--color-navy); line-height: 1.6; }
.imagine__footer span { color: var(--color-pink); }

/* Sticky CTA on phones so the button is always one tap away */
.cta {
  position: sticky; bottom: 0;
  margin: 0 calc(-1 * var(--gutter));
  padding: 12px var(--gutter) max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0));
}
@media (min-width: 640px) { .cta { position: static; margin: 0; padding: 0; background: none; } }

.note {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  margin: 24px 0 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--color-pink);
  color: #fff;
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn:hover { background: var(--color-pink-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(228, 100, 255, 0.4); outline-offset: 2px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.7; cursor: not-allowed; }
.btn__arrow { font-size: 22px; line-height: 1; }

.spacer { flex: 1 1 auto; }

/* ---------- Form ---------- */
.form-title {
  margin: 0 0 22px;
  color: var(--color-pink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
}

.field { margin-bottom: 22px; }
.field__label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 2px;
}
.field__hint {
  display: block;
  font-size: 12px;
  color: var(--color-hint);
  margin-bottom: 8px;
}
.field__label + .field__control,
.field__label + .multiselect { margin-top: 8px; }

.field__control,
.multiselect__trigger {
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  border: 2px solid transparent;
  border-radius: var(--radius-input);
  background: var(--color-surface);
  color: var(--color-navy);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  direction: rtl;
  text-align: right;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field__control::placeholder { color: #9AA8BB; font-weight: 400; }
.field__control:focus,
.multiselect__trigger:focus-visible,
.multiselect.is-open .multiselect__trigger {
  border-color: var(--color-pink);
  background: #fff;
}
input[type="email"].field__control,
input[type="tel"].field__control { direction: ltr; text-align: right; unicode-bidi: plaintext; }
textarea.field__control { resize: vertical; min-height: 120px; line-height: 1.6; }

/* Select: chevron on the LEFT (RTL) like the design */
.select-wrap { position: relative; }
.select-wrap select { padding-left: 44px; cursor: pointer; }
.select-wrap select:invalid, .select-wrap select.is-placeholder { color: #9AA8BB; }
.select-wrap::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: translateY(-70%) rotate(-45deg);
  pointer-events: none;
}

/* Phone: dial-code picker (right, RTL) + number (left) */
.phone { display: flex; gap: 10px; }
.phone__code-wrap { flex: 0 0 128px; }
.phone__code { padding-left: 34px !important; padding-right: 12px; font-variant-numeric: tabular-nums; }
.phone__code-wrap::after { left: 14px; }
.phone__number { flex: 1; min-width: 0; }

/* Multi-select (custom, keyboard accessible) */
.multiselect { position: relative; }
.multiselect__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: right;
}
.multiselect__trigger-text { flex: 1; color: #9AA8BB; font-weight: 400; }
.multiselect__trigger-text.has-value { color: var(--color-navy); font-weight: 500; }
.multiselect__chevron {
  width: 10px; height: 10px; margin-right: 12px;
  border-left: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: translateY(-3px) rotate(-45deg);
  transition: transform 0.15s ease;
}
.multiselect.is-open .multiselect__chevron { transform: translateY(3px) rotate(135deg); }

.multiselect__panel {
  display: none;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  box-shadow: 0 10px 30px rgba(8, 79, 143, 0.12);
  overflow: hidden;
}
.multiselect.is-open .multiselect__panel { display: block; }
.multiselect__search {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--color-navy);
  background: var(--color-surface);
  outline: none;
}
.multiselect__list { max-height: 280px; overflow-y: auto; margin: 0; padding: 6px 0; list-style: none; }
.multiselect__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 15px;
  color: var(--color-navy);
}
.multiselect__option:hover, .multiselect__option:focus-within { background: var(--color-surface); }
.multiselect__option input { width: 18px; height: 18px; accent-color: var(--color-pink); margin: 0; }
.multiselect__option[hidden] { display: none; }
.multiselect__empty { padding: 14px 16px; color: var(--color-hint); font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  background: rgba(228, 100, 255, 0.14);
  color: var(--color-navy);
  font-size: 13px;
  font-weight: 600;
}
.chip__remove {
  border: 0; background: transparent; cursor: pointer;
  color: var(--color-navy); font-size: 16px; line-height: 1; padding: 0 4px;
}

/* Errors */
.field.has-error .field__control,
.field.has-error .multiselect__trigger { border-color: var(--color-error); background: #fff; }
.field__error {
  display: none;
  margin-top: 6px;
  color: var(--color-error);
  font-size: 13px;
  font-weight: 600;
}
.field.has-error .field__error { display: block; }

.form-alert {
  display: none;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--color-error-bg);
  color: var(--color-error);
  font-size: 14px;
  font-weight: 600;
}
.form-alert.is-visible { display: block; }

/* Honeypot: hidden from humans, visible to bots.
   Uses clip instead of a negative offset: in RTL a negative `left` would make
   the page horizontally scrollable. */
.hp {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0;
}

/* ---------- Success ---------- */
.success { text-align: center; display: flex; flex-direction: column; align-items: center; }
.success__icon { width: 140px; height: 140px; margin: 24px 0 36px; }
.success__title { margin: 0; color: var(--color-navy); font-size: 32px; font-weight: 700; }
.success__text  { margin: 6px 0 0; color: var(--color-text-muted); font-size: 15px; font-weight: 500; }
.success__ref   { margin-top: 14px; color: var(--color-hint); font-size: 13px; }
.success__ref span { font-weight: 700; color: var(--color-navy); }

.powered { text-align: center; margin-top: 40px; }
.powered__label { display: block; font-size: 13px; color: var(--color-text-muted); margin-bottom: 8px; }
.powered img { width: 120px; height: auto; }

/* Utilities */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
