/* =====================================================
   Lubo Finance – שאלון התאמה (fit questionnaire)
   Short (post-landing) + Full (Instagram) modes.
   Brand tokens + components shared with variant-b.
   ===================================================== */

/* ---------- TOKENS ---------- */
:root {
  --green:        #60b867;
  --green-deep:   #136427;
  --green-darker: #0d4a1d;
  --green-soft:   #d6f5dc;
  --bg:           #f8fff7;
  --bg-2:         #eef9ef;
  --ink:          #0e2417;
  --ink-soft:     #345244;
  --ink-mute:     #6c8579;
  --line:         #e0ebe1;
  --line-2:       #c6dec9;
  --white:        #ffffff;

  --coral:        #e3553d;
  --amber:        #f5b342;
  --gold:         #c89b3c;
  --gold-soft:    #e9c97a;
  --gold-deep:    #8a6822;

  --danger:       #e3553d;
  --danger-bg:    #fff5f3;

  --shadow-sm: 0 2px 8px rgba(13, 74, 29, 0.06);
  --shadow-md: 0 8px 28px rgba(13, 74, 29, 0.10);
  --shadow-lg: 0 24px 60px rgba(13, 74, 29, 0.18);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --container: 720px;
  --transition: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: var(--green-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
input, textarea { font-family: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- TOP BAR ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 255, 247, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(19, 100, 39, 0.08);
}
.topbar__inner { display: flex; align-items: center; justify-content: center; padding-block: 12px; }
.topbar__tag {
  font-size: 12px; font-weight: 600; color: var(--green-deep);
  background: var(--green-soft); padding: 6px 12px; border-radius: 999px;
}

/* ---------- APP / SCREENS ---------- */
.app { min-height: calc(100vh - 60px); position: relative; }
.screen { display: none; min-height: calc(100vh - 60px); padding: 28px 0 60px; }
.screen.is-active { display: block; animation: screenIn 0.5s var(--transition); }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===================================================
   SCREEN 1: LANDING
   =================================================== */
.screen--landing {
  background: linear-gradient(165deg, var(--green-darker) 0%, var(--green-deep) 55%, #0a3a18 100%);
  color: var(--white); position: relative; overflow: hidden;
  padding: 44px 0 60px;
}
.landing__bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; }
.orb--1 { width: 380px; height: 380px; background: var(--green); top: -120px; right: -90px; }
.orb--2 { width: 260px; height: 260px; background: var(--amber); bottom: -80px; left: -60px; opacity: .22; }
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, black 30%, transparent 75%);
}
.landing__inner {
  position: relative; z-index: 1; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 12px;
}
.landing__avatar {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; margin-bottom: 22px;
  border: 3px solid rgba(255,255,255,0.28);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.landing__title {
  font-size: clamp(30px, 6.4vw, 50px);
  font-weight: 900; letter-spacing: -0.025em; line-height: 1.1;
  margin-bottom: 18px; max-width: 620px;
}
.text-accent { color: var(--gold-soft); }
.landing__sub {
  font-size: clamp(16px, 2.2vw, 19px);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px; line-height: 1.6; max-width: 560px;
}
.landing__legal {
  font-size: 13px; color: rgba(255,255,255,0.66);
  margin-top: 20px; max-width: 500px; line-height: 1.6;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px;
  font-weight: 800; font-size: 16px; font-family: inherit; cursor: pointer;
  border: 0; text-decoration: none; color: var(--white);
  transition: transform .2s var(--transition), box-shadow .2s, background .2s, filter .2s;
}
.btn--primary { background: var(--green-deep); box-shadow: 0 8px 18px rgba(19,100,39,0.25); }
.btn--primary:hover:not(:disabled) {
  background: var(--green-darker); transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(19,100,39,0.35); text-decoration: none;
}
.btn--primary:disabled { background: var(--line-2); color: var(--ink-mute); box-shadow: none; cursor: not-allowed; }
.btn--xl { width: 100%; height: 60px; font-size: 17px; }
.btn__arrow { font-size: 20px; transition: transform .2s; }
.btn:hover:not(:disabled) .btn__arrow { transform: translateX(-4px); }

/* landing + gate submit = gold CTA */
.btn--landing {
  max-width: 420px;
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 52%, var(--gold-deep) 100%);
  color: var(--green-darker); box-shadow: 0 16px 34px rgba(200,155,60,0.42);
}
/* hover: keep the exact gold gradient (no color shift), just grow + deepen shadow */
.btn--landing:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 52%, var(--gold-deep) 100%);
  transform: scale(1.04);
  box-shadow: 0 22px 46px rgba(200,155,60,0.5); color: var(--green-darker);
}

/* ===================================================
   SCREEN 2: QUIZ
   =================================================== */
.screen--quiz { background: var(--bg); padding: 18px 0 60px; }
.quiz__container { max-width: 640px; }

.quiz__top { display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.quiz__progress { flex: 1 1 auto; }
.quiz__progress-track { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.quiz__progress-fill {
  height: 100%; width: 16.66%;
  background: linear-gradient(90deg, var(--green) 0%, var(--gold) 100%);
  border-radius: 999px; transition: width 0.55s var(--transition);
}
.quiz__progress-label {
  display: block; margin-top: 6px; font-size: 12px; font-weight: 600;
  color: var(--ink-soft); text-align: center;
}

.quiz-card {
  background: var(--white); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); padding: 28px 24px 22px;
  border: 1px solid rgba(255,255,255,0.6);
  min-height: 380px; display: flex; flex-direction: column;
}
@media (max-width: 480px) { .quiz-card { padding: 22px 16px 18px; border-radius: var(--radius-lg); } }

.quiz__stage { flex: 1 1 auto; position: relative; }

.qstep { animation: stepIn 0.4s var(--transition); }
.qstep[hidden] { display: none; }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.qstep__num {
  display: inline-block; font-weight: 800; font-size: 12px;
  color: var(--green-deep); background: var(--green-soft);
  padding: 4px 10px; border-radius: 999px; letter-spacing: 0.02em; margin-bottom: 14px;
}
.qstep__q {
  font-size: clamp(20px, 4vw, 26px); font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 8px; line-height: 1.25;
}
.qstep__hint { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; line-height: 1.5; }
.qstep__error { color: var(--danger); font-size: 14px; font-weight: 700; text-align: center; margin-top: 14px; }
.qstep__error[hidden] { display: none; }

.quiz-card__footer { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.quiz-card__footer[hidden] { display: none; }

/* ----- Age: numeric input ----- */
.numinput-wrap { max-width: 320px; margin: 8px auto 0; }
.numinput {
  width: 100%; height: 72px; padding: 0 18px;
  font-size: clamp(28px, 5vw, 36px); font-weight: 800; color: var(--green-deep);
  background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius);
  text-align: center; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  transition: border-color .2s, background .2s;
}
.numinput:focus { outline: none; border-color: var(--green); background: var(--white); }
.numinput::placeholder { color: var(--ink-mute); opacity: 0.5; }

/* ----- Choice options (radio) ----- */
.opts { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.opt {
  display: flex; align-items: center; gap: 13px;
  width: 100%; min-height: 62px; padding: 14px 18px;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  text-align: start; font-size: 16px; font-weight: 600; color: var(--ink);
  transition: transform .15s var(--transition), border-color .15s, background .15s, box-shadow .15s;
  position: relative;
}
.opt::before {
  content: ''; flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line-2); background: var(--white);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.opt:hover { border-color: var(--green); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.opt.is-selected {
  border-color: var(--green-deep);
  background: linear-gradient(135deg, #f0fbf2 0%, #e7f6ea 100%);
  box-shadow: 0 6px 18px rgba(19, 100, 39, 0.15);
}
.opt.is-selected::before {
  border-color: var(--green-deep); background: var(--green-deep);
  box-shadow: inset 0 0 0 4px var(--white);
}

/* ----- Goal: textarea ----- */
.goal-input {
  width: 100%; min-height: 132px; padding: 14px 16px;
  font-size: 16px; font-family: inherit; line-height: 1.6; color: var(--ink);
  background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius);
  resize: vertical; transition: border-color .2s, background .2s;
}
.goal-input:focus { outline: none; border-color: var(--green); background: var(--white); }
.goal-input::placeholder { color: var(--ink-mute); opacity: 0.7; }

/* ----- Back button ----- */
.quiz__bottom { margin-top: 20px; display: flex; justify-content: center; }
.quiz__back {
  background: var(--white); border: 1px solid var(--line); color: var(--ink-soft);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  min-height: 38px; display: inline-flex; align-items: center; gap: 4px;
  transition: background .2s, border-color .2s, color .2s;
}
.quiz__back:hover { background: var(--bg-2); border-color: var(--green); color: var(--green-deep); }
.quiz__back[hidden] { display: none; }

/* ===================================================
   SCREEN 3: GATE (full mode form)
   =================================================== */
.screen--gate { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); padding: 28px 0 60px; }
.gate__container { max-width: 560px; }

.ready { text-align: center; margin-bottom: 26px; }
.ready__pulse { position: relative; width: 72px; height: 72px; margin: 0 auto 16px; }
.ready__pulse-ring { position: absolute; inset: 0; border: 3px solid var(--green); border-radius: 50%; animation: ringPulse 2s ease-out infinite; }
.ready__pulse-dot {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px;
  background: var(--green-deep); color: var(--white); border-radius: 50%;
  display: grid; place-items: center; font-size: 32px; font-weight: 900;
  box-shadow: 0 8px 24px rgba(19, 100, 39, 0.3);
}
@keyframes ringPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.ready__title { font-size: clamp(24px, 4.5vw, 32px); font-weight: 900; color: var(--green-deep); letter-spacing: -0.02em; margin-bottom: 6px; }
.ready__sub { font-size: clamp(14px, 2vw, 17px); color: var(--ink-soft); }

.gate-form {
  background: var(--white); padding: 24px 22px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] {
  width: 100%; height: 56px; padding: 0 16px; font-size: 16px; font-family: inherit;
  background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, background .2s; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--green); background: var(--white); }
.field--error input { border-color: var(--danger); background: var(--danger-bg); }
.field__error { font-size: 12px; color: var(--danger); min-height: 16px; font-weight: 600; }

.checkbox {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--ink-soft); cursor: pointer; line-height: 1.5; padding: 4px 0;
}
.checkbox input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--green-deep); width: 18px; height: 18px; }
.checkbox a { color: var(--green-deep); font-weight: 700; text-decoration: underline; }

/* Honeypot — visually-hidden, no horizontal overflow */
.hp-field {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; pointer-events: none;
}
.gate-form__legal { font-size: 12px; color: var(--ink-soft); text-align: center; margin-top: 6px; line-height: 1.6; }

/* Gate submit = gold conversion CTA */
.gate-form .btn--primary {
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 52%, var(--gold-deep) 100%);
  color: var(--green-darker); box-shadow: 0 12px 28px rgba(200,155,60,0.42);
}
.gate-form .btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 52%, var(--gold-deep) 100%);
  color: var(--green-darker); transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(200,155,60,0.5);
}

/* ===================================================
   SCREEN 4: THANK YOU
   =================================================== */
.screen--thanks { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); padding: 48px 0 60px; }
.thanks__container { max-width: 560px; }
.thanks__card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); padding: 44px 30px; text-align: center;
  margin-top: 4vh;
}
.thanks__check { color: var(--green-deep); margin-bottom: 16px; display: flex; justify-content: center; }
.thanks__check svg { width: 72px; height: 72px; }
.thanks__title { font-size: clamp(26px, 5vw, 34px); font-weight: 900; color: var(--green-deep); letter-spacing: -0.02em; margin-bottom: 14px; }
.thanks__sub { font-size: 16px; color: var(--ink-soft); line-height: 1.7; }

/* ---------- FOOTER ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,0.65); padding: 22px 0; }
.footer__inner { display: flex; align-items: center; justify-content: center; text-align: center; }
.footer__legal { font-size: 11px; color: rgba(255,255,255,0.4); }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .ready__pulse-ring { animation: none; }
}

/* ---------- VERY SMALL SCREENS ---------- */
@media (max-width: 380px) {
  .quiz-card { padding: 18px 12px 14px; }
  .opt { min-height: 56px; padding: 12px 14px; font-size: 15px; }
  .numinput { height: 64px; }
}
