/* Layout: one screen at a time — home (text + hero image), a question card, the lead form, thanks.
   Single deliberate look (version C, approved by the client): royal blue ground, peach call to action. */
:root {
  --bg: #194FFC;
  --bg-deep: #1240D8;
  --circle: #3F7BFC;
  --navy: #07224B;
  --ink: #0B1F6B;
  --white: #FFFFFF;
  --muted: #E6EDFF;
  --line: rgba(255, 255, 255, 0.8);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.18);
  --track: rgba(255, 255, 255, 0.3);
  --peach: #F9BC7E;
  --peach-hover: #FFC994;
  --error: #FFD9A8;
  --error-line: #E5484D;
  --gold: #EDBB78;
  --font: 'Rubik', 'Assistant', 'Arial Hebrew', Arial, sans-serif;
  color-scheme: dark;
}

/* #app is a fixed, full-screen scroller, so long screens scroll the same way on the live site and inside the demo frame. */
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
button, input, select { font-family: inherit; }
h1, h2, p { margin: 0; }
h1, h2 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; }

#app {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.stage {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}
.demo-note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  opacity: 0.75;
  padding-top: 12px;
}
.demo-note a { color: var(--white); }

/* ---------- question screens: map background, gold lines, compass (globe.js) ---------- */
/* Questions only: the home screen, form and thanks keep the approved flat blue. */
#app { z-index: 2; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 42%, #2D5FD6 0%, #1F49B5 55%, #163A92 100%);
  opacity: 0; transition: opacity .6s ease;
}
.globe-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.bg-deco { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; color: var(--gold); opacity: 0; transition: opacity .6s ease; }
body.on-map::before, body.on-map .globe-canvas, body.on-map .bg-deco { opacity: 1; }
.bg-deco .curve { position: absolute; opacity: .55; }
.bg-deco .curve-top { width: min(30vw, 420px); top: 12vh; right: -2vw; transform: scaleX(-1); }
.bg-deco .curve-bottom { width: min(38vw, 520px); bottom: 2vh; left: -1vw; }
.bg-deco .rose { position: absolute; width: 118px; right: 4vw; bottom: 6vh; opacity: .45; }
.q-eyebrow { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--gold); margin-bottom: -8px; }
.q-eyebrow .mini-compass { width: 58px; height: 58px; }
.q-eyebrow span { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 500; color: var(--muted); }
.q-eyebrow span::before, .q-eyebrow span::after { content: ''; width: 56px; height: 1.5px; background: var(--gold); opacity: .8; }
@media (max-width: 700px) {
  .bg-deco .curve-top { width: 46vw; top: 15vh; }
  .bg-deco .curve-bottom { width: 70vw; bottom: 1vh; opacity: .4; }
  .bg-deco .rose { width: 78px; right: 3vw; bottom: 3vh; opacity: .35; }
  .q-eyebrow .mini-compass { width: 44px; height: 44px; }
  .q-eyebrow span { font-size: 15px; }
  .q-eyebrow span::before, .q-eyebrow span::after { width: 36px; }
}

/* ---------- shared pieces ---------- */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.lockup img { display: block; width: auto; }
.lockup .ow { height: 44px; }
.lockup .hrd { height: 36px; }
.lockup .x { color: var(--white); font-weight: 700; font-size: 20px; }

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  min-width: 260px;
  padding: 0 40px;
  border: none;
  border-radius: 999px;
  background: var(--peach);
  color: var(--navy);
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(7, 34, 75, 0.28);
  transition: transform .2s ease, background-color .2s ease, opacity .2s ease;
}
@media (hover: hover) { .cta:hover:not(:disabled) { transform: translateY(-3px); background: var(--peach-hover); } }
.cta:active:not(:disabled) { transform: scale(.98); }
.cta:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-size: 17px;
  cursor: pointer;
}
@media (hover: hover) { .ghost:hover { background: var(--glass-hover); } }
.ghost svg { flex: none; }

.duration {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 17px;
}

.a11y-link { color: var(--muted); font-size: 14px; opacity: 0.85; text-underline-offset: 3px; }
.a11y-link:hover { opacity: 1; }
.send-err { color: var(--error); font-weight: 500; text-align: center; }
.send-err:empty { display: none; }
.cta:disabled { opacity: 0.6; cursor: wait; }

/* Turnstile bot check: invisible unless Cloudflare asks the visitor to tick a box. */
.ts-box { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; }

/* ---------- home ---------- */
.home {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 640px);
  align-items: center;
  gap: 40px;
}
.home-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  min-width: 0;
}
.home-text h1 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.15; font-weight: 800; }
.home-text p { font-size: clamp(17px, 1.7vw, 22px); color: var(--muted); max-width: 30ch; }
.home-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 4px; }

.hero {
  container-type: inline-size;
  position: relative;
  width: min(100%, calc(100vh - 120px));
  min-width: 280px;
  max-width: 100%;
  justify-self: center;
  aspect-ratio: 1;
}
.hero-float { position: absolute; inset: 0; }
.hero img.hero-img { width: 100%; height: 100%; display: block; }
.hero-title {
  position: absolute;
  top: 57.5%;
  left: 0;
  width: 98%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.7cqw;
}
.hero-title .name { font-size: 5.3cqw; line-height: 1.1; font-weight: 800; white-space: nowrap; }
.hero-title .name .a { color: var(--ink); }
.hero-title .lockup { gap: 2cqw; }
.hero-title .lockup .ow { height: 8.5cqw; }
.hero-title .lockup .hrd { height: 7cqw; }
.hero-title .lockup .x { font-size: 3.6cqw; }

/* ---------- question ---------- */
.q-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.q-head .back { justify-self: start; }
.q-head .lockup { justify-self: end; }
.progress { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.progress-label { font-size: 16px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress-label b { color: var(--white); font-weight: 800; }
.bar { width: 100%; height: 12px; border-radius: 6px; background: var(--track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 6px; background: var(--peach); transition: width .5s ease; }

.q-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 28px;
}
.q-card {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.q-title { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.q-title h1 { font-size: clamp(26px, 3.6vw, 46px); line-height: 1.2; font-weight: 800; outline: none; }
.q-title p { font-size: clamp(15px, 1.5vw, 19px); color: var(--muted); }

.options {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;   /* every option in a question is the same height */
  gap: 16px;
}
.opt {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: var(--glass);
  color: var(--white);
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .12s ease, color .12s ease, transform .12s ease, opacity .12s ease;
}
/* Hover only on devices that really hover: on phones it sticks to the last tapped option. */
@media (hover: hover) {
  .opt:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--glass-hover); transform: translateY(-2px); }
}
.opt:active:not(:disabled) { transform: scale(.98); }
.opt { position: relative; border-width: 1.5px; border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .07);
  box-shadow: 0 8px 22px rgba(7, 20, 70, .18); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.opt[aria-pressed="true"] { background: #3A66EA; border: 2px solid var(--peach); color: var(--white);
  box-shadow: 0 0 0 4px rgba(249, 188, 126, .16), 0 10px 26px rgba(7, 20, 70, .28); }
.opt { padding-inline: 58px; }
.opt .check { position: absolute; inset-inline-end: 20px; top: 50%; margin-top: -14px; width: 28px; height: 28px; }
.opt:disabled { opacity: .5; cursor: not-allowed; }
.opt.wide { grid-column: 1 / -1; }


.other-input { width: 100%; }

/* ---------- lead form ---------- */
.form-screen { flex: 1; display: flex; justify-content: center; padding-block: 8px 24px; }
.form-card { width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 22px; }
.form-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.eyebrow {
  display: inline-block;
  background: var(--peach);
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 999px;
}
.form-head h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.15; font-weight: 800; outline: none; }
.form-head p { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 46ch; }

.summary {
  background: var(--bg-deep);
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary h2 { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--glass-hover);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 16px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: var(--white);
  color: var(--navy);
  font-size: 18px;
  padding: 0 16px;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2307224B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: left 16px center;
  background-size: 14px 14px;
  background-repeat: no-repeat;
  padding-left: 44px;
}
.field textarea { height: auto; min-height: 76px; padding: 12px 16px; font-family: inherit; line-height: 1.4; resize: vertical; color-scheme: light; }
.field textarea::placeholder { color: #6B7A99; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--peach); outline-offset: 1px; }
.field[data-invalid] input, .field[data-invalid] select { border-color: var(--error-line); }
.field .err, .consent .err { color: var(--error); font-size: 15px; min-height: 0; }
.field .err:empty, .consent .err:empty { display: none; }

.consents { display: flex; flex-direction: column; gap: 12px; }
.consent { display: flex; flex-direction: column; gap: 4px; }
.consent label { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--peach); color-scheme: light; }
.field input, .field select { color-scheme: light; }
.privacy { font-size: 14px; color: var(--muted); }
.privacy a { color: var(--white); }
.form-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ---------- thanks ---------- */
.thanks { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding-block: 32px; }
.thanks .badge { width: 96px; height: 96px; border-radius: 50%; background: var(--peach); display: grid; place-items: center; animation: pop .6s ease .1s both; }
.thanks h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; outline: none; }
.thanks p { font-size: clamp(18px, 1.8vw, 22px); color: var(--muted); max-width: 32ch; }
.thanks .restart { border: 2px solid var(--line); }
.thanks .share { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 24px; border-radius: 18px; background: var(--bg-deep); }
.thanks .share h2 { font-size: 18px; font-weight: 500; }
.thanks .share-icons { display: flex; justify-content: center; gap: 28px; }
.share-ic { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--white); text-decoration: none; font-size: 15px; font-weight: 500; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.share-ic .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--white); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(7, 34, 75, .25); transition: transform .15s ease; }
.share-ic .ic svg { width: 34px; height: 34px; }
.share-ic:active .ic { transform: scale(.94); }
@media (hover: hover) { .share-ic:hover .ic { transform: translateY(-3px); } }

/* ---------- motion ---------- */
@keyframes fu { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes zin { from { opacity: 0; transform: scale(.9) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.4%); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes leave { to { opacity: 0; transform: translateY(-18px); } }
.fu { animation: fu .7s cubic-bezier(.2, .7, .2, 1) both; }
.d1 { animation-delay: .15s; } .d2 { animation-delay: .3s; } .d3 { animation-delay: .45s; }
.hero { animation: zin 1s cubic-bezier(.2, .7, .2, 1) both; }
.hero-float { animation: bob 6s ease-in-out 1s infinite; }
.hero-title { animation: fu .7s ease .9s both; }
.enter { animation: fu .45s cubic-bezier(.2, .7, .2, 1) both; }
.leaving { animation: leave .22s ease-in both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
  .home { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 20px; align-content: start; }
  .hero { order: -1; width: min(100%, 440px); }
  .home-actions { width: 100%; }
  .home-actions .cta { width: 100%; max-width: 420px; }
}
@media (max-width: 700px) {
  .q-head { grid-template-columns: auto 1fr; row-gap: 12px; }
  .q-head .progress { grid-column: 1 / -1; grid-row: 2; align-items: stretch; }
  .q-head .lockup .ow { height: 36px; }
  .q-head .lockup .hrd { height: 30px; }
  .q-main { align-items: flex-start; padding-block: 18px; }
  .options { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .opt { min-height: 56px; border-radius: 14px; padding: 10px 44px; }
  .opt .check { inset-inline-end: 12px; width: 24px; height: 24px; margin-top: -12px; }
  .q-card .cta, .form-actions .cta { width: 100%; }
  .fields { grid-template-columns: minmax(0, 1fr); }
}
