/* The public home page: a gym-poster hero whose phone is the live demo. The three questions are
   three weight plates that fill as the visitor answers. */
:root {
  --bg: #eef1f4; --surface: #ffffff; --ink: #121a24; --muted: #586372; --line: #d6dce3;
  --blue: #1f4fa8; --blue-soft: #e3eaf7; --red: #c4342c; --yellow: #d9a514; --green: #2e8656;
  --them: #f1f3f8; --me: #e3eaf7; --on-blue: #ffffff; --marker: #ffe066; --error: #b42318;
  --display: "Secular One", "Arial Hebrew", system-ui, sans-serif;
  --body: "IBM Plex Sans Hebrew", "Arial Hebrew", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1319; --surface: #161d26; --ink: #e7ecf1; --muted: #9ba7b5; --line: #2a3441;
    --blue: #7aa2f0; --blue-soft: #1b2638; --red: #ef7b70; --yellow: #eec650; --green: #6dc995;
    --them: #1d2530; --me: #1b2638; --on-blue: #0e1319; --marker: #8a6d00; --error: #ff8a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1319; --surface: #161d26; --ink: #e7ecf1; --muted: #9ba7b5; --line: #2a3441;
  --blue: #7aa2f0; --blue-soft: #1b2638; --red: #ef7b70; --yellow: #eec650; --green: #6dc995;
  --them: #1d2530; --me: #1b2638; --on-blue: #0e1319; --marker: #8a6d00; --error: #ff8a80;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); }
[hidden] { display: none !important; }
.page { max-width: 1120px; margin: 0 auto; display: grid; gap: 56px;
  padding-block: max(20px, env(safe-area-inset-top, 0px)) 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; margin: 0; }
p { margin: 0; }
.timer { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.small { font-size: 13px; color: var(--muted); }
.error { color: var(--error); font-size: 14px; min-height: 1em; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-size: 22px; display: flex; align-items: center; gap: 8px; }
.logo .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.bar a { color: var(--muted); text-decoration: none; font-size: 15px; }
.bar a:hover { color: var(--ink); text-decoration: underline; }

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.pitch { display: grid; gap: 18px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 6.2vw, 72px); line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--blue); }
.lede { font-size: 19px; color: var(--muted); max-width: 34em; }
.starts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.cta { font: 600 18px var(--body); background: var(--blue); color: var(--on-blue); border: 0; border-radius: 12px;
  padding: 14px 24px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.cta:disabled { opacity: .55; cursor: default; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.facts span + span::before { content: "·"; margin-inline-end: 14px; }

/* the stage: the example conversation at rest, the live demo once started */
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 18px 16px 16px;
  box-shadow: 0 18px 40px -24px rgba(18, 26, 36, .35); display: flex; flex-direction: column; gap: 12px;
  min-height: 480px; min-width: 0; }
.stage.live { border-color: var(--blue); }
.stage-top { display: flex; justify-content: space-between; align-items: center; }
.plates { display: flex; align-items: center; gap: 6px; }
.plate { border-radius: 50%; border: 3px solid currentColor; display: grid; place-items: center; font: 600 10px var(--body);
  transition: background-color .4s ease; }
.plate b { font-weight: 500; color: var(--muted); }
.plate.p1 { width: 22px; height: 22px; color: var(--green); }
.plate.p2 { width: 28px; height: 28px; color: var(--yellow); }
.plate.p3 { width: 34px; height: 34px; color: var(--red); }
.plate.full { background: currentColor; }
.plate.full b { color: var(--surface); }
.plate.now { box-shadow: 0 0 0 3px var(--blue-soft); }
.rod { width: 18px; height: 4px; background: var(--line); border-radius: 2px; }

.who { display: flex; gap: 12px; align-items: center; }
.who b { display: block; font-weight: 600; }
.who small { color: var(--muted); font-size: 13px; }
/* the voice ring: grows and glows with whoever is speaking (--lvl from 0 to 1, set by home.js) */
.ring { --lvl: 0; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  box-shadow: 0 0 0 calc(2px + var(--lvl) * 10px) var(--blue-soft), 0 0 0 calc(3px + var(--lvl) * 10px) var(--blue);
  transition: box-shadow 80ms linear; }
.ring.listening { box-shadow: 0 0 0 calc(2px + var(--lvl) * 10px) var(--me), 0 0 0 calc(3px + var(--lvl) * 10px) var(--green); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font-family: var(--display); font-size: 22px; line-height: 1; }

.chat { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 340px; }
.msg { border-radius: 14px; padding: 10px 12px; font-size: 15px; line-height: 1.5; unicode-bidi: plaintext; text-align: start; }
.msg.them { background: var(--them); margin-inline-end: 28px; }
.msg.me { background: var(--me); margin-inline-start: 28px; }
.msg .q { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.msg.appear { animation: appear .35s ease both; }
/* the "aha": the interviewer's catch, painted on the visitor's own words with a highlighter */
mark.caught { color: inherit; background: linear-gradient(var(--marker), var(--marker)) no-repeat right center / 0% 80%;
  border-radius: 3px; padding: 0 2px; transition: background-size .7s ease; }
mark.caught.on { background-size: 100% 80%; }

.status { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); min-height: 24px; }
.level { display: flex; gap: 3px; align-items: end; height: 18px; }
.level i { width: 4px; height: 12px; border-radius: 2px; background: var(--green); transform-origin: bottom; }
.stage:not(.live) .level i, .stage.listening .level i { animation: lvl 1.1s ease-in-out infinite alternate; }
.level i:nth-child(2) { animation-delay: .2s; } .level i:nth-child(3) { animation-delay: .4s; } .level i:nth-child(4) { animation-delay: .1s; }
@keyframes lvl { from { transform: scaleY(.4); } to { transform: scaleY(1.3); } }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .level i, .msg.appear { animation: none !important; }
  mark.caught, .ring, .plate { transition: none; }
}

.controls { display: grid; }
.btn { font: 600 15px var(--body); border-radius: 10px; padding: 11px 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--blue); color: var(--on-blue); border-color: var(--blue); }
.typed, .end { display: grid; gap: 8px; }
.typed label, .end label { font-size: 13px; color: var(--muted); }
textarea, input[type=email] { font: 15px var(--body); width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
input[type=email] { direction: ltr; text-align: left; }
.done-mark { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.thanks { font-family: var(--display); font-size: 22px; color: var(--green); }

.promise { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--line); padding-top: 28px; }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; } }
.promise h3 { font-size: 20px; margin-bottom: 4px; }
.promise p { color: var(--muted); font-size: 15px; max-width: 30em; }
