/* ═══════════════════════════════════════════════════════════════
   מרעש לבהירות — the noise resolves as you progress.
   Warm paper · deep teal ink · coral accent
   Frank Ruhl Libre (display) + Assistant (UI)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --paper: #f7f3ea;
  --paper-deep: #efe9db;
  --ink: #123a3d;          /* deep teal ink */
  --ink-soft: #3d5c5e;
  --teal: #0d7377;
  --coral: #e8734a;
  --coral-deep: #d4622e;
  --line: #d8cfbc;
  --card: #fffdf8;
  --shadow: 0 2px 4px rgba(18, 58, 61, .06), 0 18px 44px -18px rgba(18, 58, 61, .25);
  --radius: 18px;
  --font-display: "Frank Ruhl Libre", serif;
  --font-ui: "Assistant", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(13, 115, 119, .08), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(232, 115, 74, .09), transparent 55%),
    var(--paper);
  color: var(--ink);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  direction: rtl;
  overflow-x: hidden;
}

/* ── the noise layer: literally fades from רעש to בהירות ── */
/* Static, calm film-grain — no movement. A whisper of texture that fades to
   nothing as you progress (opacity set inline from app.js). */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: .12;
  transition: opacity 1.1s ease;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── top bar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 5vw, 48px) 8px;
  position: relative;
  z-index: 5;
}
.brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: .02em;
  color: var(--teal);
}
.progress { display: flex; align-items: center; gap: 12px; }
.progress[hidden] { display: none; }
.progress-label { font-size: 14px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.progress-track {
  width: clamp(90px, 22vw, 180px);
  height: 7px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(270deg, var(--teal), var(--coral));
  transition: width .6s cubic-bezier(.6, 0, .2, 1);
}

/* ── stage & screens ── */
.stage {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(16px, 4vh, 48px) 20px 40px;
  position: relative;
  z-index: 4;
}
.screen { display: none; }
.screen.is-active { display: block; animation: screen-in .55s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
.screen.is-active > * { animation: rise .6s cubic-bezier(.2, .7, .3, 1) both; }
.screen.is-active > *:nth-child(1) { animation-delay: .05s; }
.screen.is-active > *:nth-child(2) { animation-delay: .13s; }
.screen.is-active > *:nth-child(3) { animation-delay: .21s; }
.screen.is-active > *:nth-child(4) { animation-delay: .29s; }
.screen.is-active > *:nth-child(5) { animation-delay: .37s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ── type ── */
.kicker {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--coral-deep);
  background: rgba(232, 115, 74, .12);
  border: 1px solid rgba(232, 115, 74, .3);
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 22px;
}
.kicker-done { color: var(--teal); background: rgba(13, 115, 119, .1); border-color: rgba(13, 115, 119, .3); }
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(38px, 7.5vw, 60px);
  line-height: 1.12;
  margin-bottom: 20px;
  letter-spacing: -.01em;
}
.display em {
  font-style: normal;
  color: var(--coral);
  position: relative;
  white-space: nowrap;
}
.display em::after {
  content: "";
  position: absolute;
  right: 0; left: 0; bottom: .04em;
  height: .14em;
  background: rgba(232, 115, 74, .25);
  border-radius: 3px;
  z-index: -1;
}
.display-sm { font-size: clamp(30px, 6vw, 44px); }
.lede {
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 30px;
}
.lede strong { color: var(--ink); }
.microcopy { margin-top: 16px; font-size: 14px; color: var(--ink-soft); opacity: .85; }

/* ── question screens ── */
.question {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.25;
  margin-bottom: 30px;
  max-width: 22ch;
}
.answers { display: grid; gap: 14px; }
.answer {
  font-family: var(--font-ui);
  text-align: right;
  direction: rtl;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.answer:hover, .answer:focus-visible {
  border-color: var(--teal);
  transform: translateY(-2px);
  outline: none;
}
.answer:active { transform: scale(.985); }
.answer.is-picked {
  border-color: var(--coral);
  background: #fff4ee;
}
.answer-num {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--teal);
  background: rgba(13, 115, 119, .1);
  border-radius: 10px;
}
.answer-rich { flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 22px; }
.answer-title { font-size: 19px; font-weight: 800; color: var(--teal); }
.answer-sub { font-size: 15.5px; font-weight: 400; line-height: 1.55; color: var(--ink-soft); }

/* ── buttons ── */
.btn-primary {
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  border: none;
  border-radius: 14px;
  padding: 17px 34px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(232, 115, 74, .25), 0 16px 32px -12px rgba(232, 115, 74, .45);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.04); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: wait; transform: none; }

/* ── outcome ── */
.offer-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-right: 5px solid var(--teal);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}
.offer-title { font-weight: 800; font-size: 15px; letter-spacing: .04em; color: var(--teal); margin-bottom: 8px; }
.offer-body { font-size: 17px; line-height: 1.6; color: var(--ink); }

/* ── form ── */
.lead-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 15px; font-weight: 700; color: var(--ink); }
.field input, .field select {
  font-family: var(--font-ui);
  font-size: 17px;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  width: 100%;
  direction: rtl;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 115, 119, .12);
}
.field input.is-invalid, .field select.is-invalid { border-color: #c0392b; }
.form-error {
  font-size: 15px;
  font-weight: 700;
  color: #c0392b;
  background: rgba(192, 57, 43, .08);
  border-radius: 10px;
  padding: 10px 14px;
}
.proof {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: -14px 0 26px;
  padding-right: 16px;
  border-right: 3px solid var(--coral);
}
.proof strong { color: var(--teal); }
.btn-submit { width: 100%; font-size: 17.5px; line-height: 1.4; }
.bonus {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: rgba(13, 115, 119, .07);
  border-radius: 12px;
  padding: 12px 16px;
}

/* ── thanks ── */
.thanks-mark {
  width: 74px; height: 74px;
  display: grid; place-items: center;
  font-size: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #0a5c5f);
  border-radius: 50%;
  margin-bottom: 24px;
  box-shadow: 0 14px 30px -10px rgba(13, 115, 119, .5);
  animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── footer ── */
.foot {
  text-align: center;
  padding: 20px;
  font-size: 13.5px;
  color: var(--ink-soft);
  opacity: .7;
  position: relative;
  z-index: 4;
}

/* ── mobile ── */
@media (max-width: 480px) {
  .topbar { padding-top: 16px; }
  .answer { font-size: 16.5px; padding: 16px; }
  .answer-sub { font-size: 14.5px; }
  .btn-primary { width: 100%; }
}
