/* MentMe - דף הצטרפות למאיץ. בנוי קודם למובייל */

:root {
  --ink: #11122b;
  --muted: #5b5d73;
  --blue: #087ff5;
  --purple: #a72cf0;
  --soft-purple: #eee8ff;
  --surface: #ffffff;
  --page-bg: #f6f6ff;
  --line: rgba(87, 62, 164, 0.14);
  --line-strong: rgba(87, 62, 164, 0.25);
  --green: #178052;
  --green-soft: #e8f7ef;
  /* גרסה כהה מעט של מעבר הצבע של המותג - עומדת בניגודיות לטקסט לבן */
  --gradient: linear-gradient(105deg, #0870dc 0%, #4a58e8 47%, #a12bdc 100%);
  --radius: 18px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 320px;
  font-family: "Heebo", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 4%, rgba(8, 127, 245, 0.10), transparent 26rem),
    radial-gradient(circle at 8% 40%, rgba(167, 44, 240, 0.07), transparent 24rem),
    var(--page-bg);
}

h1, h2, p { margin: 0; }
a { color: inherit; }
button { font: inherit; }

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid #0b62c4;
  outline-offset: 3px;
}
h1:focus, h2:focus { outline: none; }

.skip-link {
  position: fixed; top: 12px; right: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: #fff; font-weight: 700; text-decoration: none;
  transform: translateY(-160%); transition: transform .16s;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- כותרת עליונה ---------- */
.page-shell { width: 100%; min-height: 100vh; }

.brand-header {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  min-height: 76px;
  padding: 20px 20px 12px;
}
.brand-logo { display: block; width: 132px; height: auto; }

/* כפתור הנגישות צף בפינה השמאלית התחתונה */
.a11y { position: fixed; bottom: 16px; left: 12px; z-index: 50; }
.a11y-trigger {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--gradient); color: #fff; font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(74, 88, 232, 0.28);
}
.a11y-panel {
  position: absolute; bottom: 54px; left: 0;
  display: grid; gap: 8px;
  width: min(270px, calc(100vw - 24px));
  padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(33, 27, 71, 0.2);
}
.a11y-panel[hidden] { display: none; }
.a11y-heading { display: flex; justify-content: space-between; align-items: center; }
.a11y-close {
  display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 10px;
  background: #f2f1f8; color: var(--ink); font-size: 1.4rem; cursor: pointer;
}
.a11y-option {
  min-height: 46px; padding: 8px 12px;
  text-align: right; font-weight: 700; font-size: .9375rem;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 11px; cursor: pointer;
}
.a11y-option[aria-pressed="true"] { background: var(--soft-purple); border-color: #5544d6; color: #3d2fb1; }
.a11y-reset {
  min-height: 44px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: .875rem; text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- פתיחה ---------- */
.onboarding {
  width: min(100% - 32px, 720px);
  margin-inline: auto;
  padding: 22px 0 32px;
}

.intro { text-align: center; }

h1 {
  font-size: clamp(1.9rem, 8vw, 3.2rem);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.intro-lead {
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  font-weight: 600;
  color: var(--muted);
}

/* פס התקדמות דק במקום תיבה */
.progress {
  display: flex; align-items: center; gap: 10px;
  max-width: 360px; margin: 26px auto 0;
}
.progress-track {
  flex: 1; height: 8px; overflow: hidden;
  background: #e6e5f2; border-radius: 999px;
}
.progress-fill {
  display: block; height: 100%; width: 0;
  background: var(--gradient); border-radius: inherit;
  transition: width .4s cubic-bezier(.22, 1, .36, 1);
}
.progress-label { font-size: .8125rem; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* ---------- שלבים ---------- */
.steps {
  list-style: none; padding: 0;
  display: grid; gap: 16px;
  margin: 30px 0 0;
}

.step-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(72, 55, 133, 0.06);
}

.step-marker {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 14px;
  background: #f1f0f7; color: var(--muted);
  border: 1px solid var(--line-strong);
  font-weight: 850; font-size: 1.0625rem; line-height: 1;
}

.step-content { min-width: 0; }
.step-topline { display: flex; align-items: center; gap: 10px; min-height: 26px; margin-bottom: 8px; }

.status {
  display: inline-flex; align-items: center;
  min-height: 24px; padding: 2px 9px; border-radius: 999px;
  font-size: .75rem; font-weight: 800; line-height: 1;
  background: #ececf2; color: #4a4c60;
}
.step-meta { font-size: .8125rem; font-weight: 600; color: var(--muted); }

.step-card h2 {
  font-size: clamp(1.1rem, 4.4vw, 1.3rem);
  font-weight: 800; line-height: 1.35;
  margin-bottom: 8px;
}
.step-card p { font-size: .9375rem; line-height: 1.7; color: var(--muted); }

.important-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 14px !important;
  font-weight: 700; color: #5a3f78 !important;
}
.important-note > span {
  flex: 0 0 22px; display: grid; place-items: center;
  width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  background: #8a2fc8; color: #fff; font-size: .8125rem; line-height: 1;
}

/* מצבים: מה שלא רלוונטי למצב מוסתר */
.step-actions, .done-copy, .lock-copy { display: none; }

/* שלב פעיל */
.step-card.is-active {
  border-color: rgba(81, 85, 246, 0.45);
  box-shadow: 0 16px 40px rgba(72, 55, 133, 0.12), inset 0 3px 0 rgba(86, 78, 246, 0.72);
}
.is-active .step-marker { background: var(--gradient); color: #fff; border: 0; }
.is-active .status { background: var(--soft-purple); color: #4f3cca; }
.is-active .step-actions { display: grid; gap: 12px; margin-top: 20px; }

/* שלב נעול - בלי שקיפות, כדי שהטקסט יישאר קריא */
.step-card.is-locked { background: #f7f7fb; box-shadow: none; }
.is-locked h2 { color: #3b3d52; }
.is-locked .lock-copy {
  display: block; margin-top: 14px;
  font-size: .8125rem !important; font-weight: 700; color: #54566b !important;
}

/* שלב שהושלם */
.step-card.is-completed { background: #fbfefc; border-color: rgba(23, 128, 82, 0.28); box-shadow: none; }
.is-completed .step-marker { background: var(--green); color: #fff; border: 0; }
.is-completed .step-meta { display: none; }
.is-completed .status { background: var(--green-soft); color: #145f3e; }
.is-completed .step-content > p:not(.done-copy) { display: none; }
.is-completed .done-copy {
  display: flex; align-items: center; gap: 7px;
  font-size: .875rem !important; font-weight: 700; color: #145f3e !important;
}

/* כפתור ראשי */
.primary-action {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; min-height: 58px;
  padding: 8px 20px 8px 8px;
  border-radius: var(--radius);
  background: var(--gradient); color: #fff;
  font-size: 1.0625rem; font-weight: 800; text-decoration: none;
  box-shadow: 0 10px 24px rgba(74, 88, 232, 0.28);
  transition: transform .16s, box-shadow .16s;
}
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(74, 88, 232, 0.36); }
.primary-action:active { transform: scale(.98); }
.action-arrow {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 1.2rem; line-height: 1;
}

/* כפתור אישור - משני, זמין תמיד בשלב הפעיל (גם למי שסיים ממכשיר אחר) */
.confirm {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  width: 100%; min-height: 50px; padding: 8px 14px;
  background: #f6f3ff; color: #3f2fb0;
  border: 1px solid rgba(84, 69, 209, 0.35); border-radius: 15px;
  font-size: .9375rem; font-weight: 800; cursor: pointer;
  transition: background .16s, border-color .16s;
}
.confirm:hover { background: #eee9ff; border-color: rgba(84, 69, 209, 0.6); }
.confirm-box {
  display: grid; place-items: center;
  width: 24px; height: 24px; border: 1.5px solid currentColor; border-radius: 7px;
  font-size: .8125rem; line-height: 1;
}

/* ---------- סיום ---------- */
.completion {
  margin-top: 30px; padding: 30px 20px 26px;
  text-align: center;
  background: #fff; border: 1px solid rgba(23, 128, 82, 0.25); border-radius: 22px;
  box-shadow: 0 16px 40px rgba(72, 55, 133, 0.1);
  animation: rise .36s cubic-bezier(.22, 1, .36, 1) both;
}
.completion[hidden], .steps[hidden] { display: none; }
.completion-icon {
  display: grid; place-items: center;
  width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--green); color: #fff; border: 7px solid var(--green-soft);
  font-size: 1.45rem; font-weight: 900;
}
.completion h2 { font-size: clamp(1.5rem, 6vw, 2.1rem); font-weight: 850; line-height: 1.2; margin-bottom: 8px; }
.completion p { color: var(--muted); max-width: 520px; margin-inline: auto; }

/* ---------- תמיכה ותחתית ---------- */
.support {
  display: grid; justify-items: center; gap: 10px;
  margin-top: 28px; padding: 20px 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line); border-radius: 16px;
}
.support p { font-weight: 700; font-size: .9375rem; }
.whatsapp-action {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 8px 22px; border-radius: 14px;
  background: var(--green); color: #fff; font-weight: 800; text-decoration: none;
}
.whatsapp-action:hover { background: #136a44; }

.site-footer { padding: 12px 16px 84px; }
.site-footer nav { display: flex; justify-content: center; gap: 20px; }
.site-footer a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  font-size: .8125rem; color: #5b5d73; text-underline-offset: 3px;
}

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- מסכים גדולים ---------- */
@media (min-width: 760px) {
  .brand-header { min-height: 84px; padding-top: 24px; }
  .brand-logo { width: 140px; }
  .a11y { bottom: 20px; left: 20px; }
  .onboarding { padding-top: 36px; }
  .progress { margin-top: 32px; }
  .steps { gap: 18px; margin-top: 34px; }
  .step-card { grid-template-columns: 52px minmax(0, 1fr); gap: 18px; padding: 26px 28px; border-radius: 20px; }
  .step-marker { width: 48px; height: 48px; border-radius: 15px; }
  .is-active .step-actions { grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 12px; }
  .primary-action { width: auto; min-width: 290px; }
  .confirm { width: auto; }
  .completion { padding: 34px 30px; }
}

@media (min-width: 1050px) {
  .page-shell {
    width: min(100% - 56px, 940px);
    min-height: calc(100vh - 56px);
    margin: 28px auto;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(111, 89, 185, 0.08);
    border-radius: 32px;
    box-shadow: 0 18px 54px rgba(72, 55, 133, 0.1);
  }
}

/* ---------- הגדרות נגישות ---------- */
html.a11y-large { font-size: 112.5%; }
html.a11y-large body { font-size: 18px; }

html.a11y-contrast body { --ink: #000; --muted: #1f1f2e; --line: rgba(0,0,0,.5); --line-strong: rgba(0,0,0,.7); background: #fff; }
html.a11y-contrast .step-card,
html.a11y-contrast .support,
html.a11y-contrast .completion,
html.a11y-contrast .page-shell { background: #fff; border-color: #111; box-shadow: none; }
html.a11y-contrast .is-locked h2,
html.a11y-contrast .is-locked .lock-copy { color: #000 !important; }

html.a11y-no-motion,
html.a11y-no-motion * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
