/* ISRAFIX quiz. Кольори бренду — зі скринів Marquiz і лого. */
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #99be3a;          /* лайм: кнопки, прогрес, галочка в лого */
  --brand-hover: #8aad2f;
  --brand-text: #6f8f1c;     /* лайм для тексту/посилань — контрастніший */
  --brand-soft: #c9dd94;     /* неактивна кнопка */
  --navy: #172b44;           /* темно-синій з лого */
  --text: #2e2e2e;
  --muted: #6e6e6e;
  --border: #e3e3e3;
  --radio: #e6e6e6;
  --side: #f7f7f7;           /* сайдбар з менеджером */
  --bubble: #efefef;
  --online: #03a34b;
  --error: #e5383b;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #fff; color: var(--text); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand-text); }
h1, h2 { outline: none; }

.quiz { min-height: 100vh; min-height: 100dvh; display: flex; }
.quiz > section { width: 100%; min-height: 100vh; min-height: 100dvh; }
.noscript { padding: 40px; text-align: center; width: 100%; }

/* ---------- кнопки ---------- */
.btn { font: inherit; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(153, 190, 58, .45); outline-offset: 3px; }
.btn--primary { background: var(--brand); color: #fff; font-size: 18px; font-weight: 500; padding: 0 28px; height: 54px; border-radius: 999px; box-shadow: 0 8px 20px -8px rgba(153, 190, 58, .9); }
.btn--primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn--primary:disabled { background: var(--brand-soft); box-shadow: none; cursor: not-allowed; }
.btn--back { width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 1px solid var(--border); color: var(--muted); flex: none; }
.btn--back:hover { border-color: #c8c8c8; color: var(--text); }

/* ---------- старт ---------- */
.start { display: grid; grid-template-columns: 58fr 42fr; }
.start__banner { position: relative; overflow: hidden; background: #f3f3f3; }
.start__banner picture, .start__banner img { width: 100%; height: 100%; }
.start__banner img { object-fit: cover; object-position: left top; position: absolute; inset: 0; }
.start__side { display: flex; flex-direction: column; min-width: 0; }
.start__header { display: flex; align-items: center; gap: 28px; padding: 16px 40px; border-bottom: 1px solid var(--border); min-height: 62px; }
.start__logo { height: 30px; width: auto; }
.start__tagline { font-size: 14px; color: var(--text); }
.start__content { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 40px; }
.start__title { font-size: 26px; font-weight: 600; line-height: 1.3; color: var(--text); margin: 0 0 16px; max-width: 480px; }
.start__subtitle { font-size: 15px; color: var(--muted); margin: 0 0 24px; max-width: 460px; }
.btn--start { font-size: 16px; height: 50px; padding: 0 26px; }
.start__footer { padding: 20px 40px 28px; }
.start__footer a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; }

/* ---------- кроки ---------- */
.step { display: grid; grid-template-columns: minmax(0, 1fr) 325px; }
.step__main { display: flex; flex-direction: column; padding: 56px 36px 24px; min-width: 0; }
.step__title { font-size: 32px; font-weight: 500; line-height: 1.3; color: var(--text); margin: 0 0 24px; max-width: 880px; }

.options { display: grid; gap: 20px; max-width: 885px; }
.options--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.option { position: relative; display: flex; align-items: center; gap: 20px; min-height: 64px; padding: 14px 20px; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.option:hover { border-color: #cfcfcf; box-shadow: 0 4px 14px rgba(0, 0, 0, .05); }
.option.is-checked { border-color: var(--brand); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option__mark { width: 26px; height: 26px; border-radius: 50%; background: var(--radio); flex: none; display: grid; place-items: center; transition: background .15s; }
.option.is-checked .option__mark { background: var(--brand); }
.option.is-checked .option__mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.option:has(input:focus-visible) { outline: 3px solid rgba(153, 190, 58, .45); outline-offset: 2px; }
.option__label { font-size: 19px; color: var(--text); }

.input { font: inherit; font-size: 18px; width: 100%; height: 64px; padding: 0 20px; border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--text); transition: border-color .15s; }
.input:focus { outline: none; border-color: var(--brand); }
.input::placeholder { color: #a6a6a6; }
.step__main > .input { max-width: 885px; }

.step__bottom { margin-top: auto; padding-top: 40px; display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; max-width: 885px; }
.progress { flex: 1; max-width: 620px; padding-top: 6px; }
.progress__label { font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.progress__label strong { color: var(--brand); font-weight: 600; margin-left: 12px; }
.progress__bar { height: 8px; background: #e3e3e3; border-radius: 99px; overflow: hidden; }
.progress__bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7d9a35, var(--brand) 60%, #b5d36a); transition: width .3s ease; }
.nav { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.nav__buttons { display: flex; gap: 24px; align-items: center; }
.btn--next { min-width: 134px; }
.nav__hint { font-size: 14px; color: var(--muted); }
.nav__hint strong { font-weight: 600; color: #555; }

/* ---------- сайдбар менеджера ---------- */
.bubble { background: var(--side); padding: 18px 18px 24px 20px; }
.bubble__head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.bubble__avatar { position: relative; width: 52px; height: 52px; border-radius: 50%; background: #fff; flex: none; box-shadow: 0 0 0 1px #eee; }
.bubble__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; }
.bubble__avatar::after { content: ""; position: absolute; right: 0; bottom: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--online); border: 2px solid var(--side); }
.bubble__name { font-size: 16px; color: var(--muted); }
.bubble__text { margin: 0; background: var(--bubble); border-radius: 0 18px 18px 18px; padding: 18px 22px; font-size: 16px; line-height: 1.45; color: var(--text); }

/* ---------- форма ---------- */
.lead { display: grid; grid-template-columns: 56fr 44fr; }
.lead__info { position: relative; padding: 96px 64px 64px 76px; border-right: 1px solid var(--border); }
.lead__title { font-size: 34px; font-weight: 400; line-height: 1.4; color: var(--text); margin: 0 0 32px; max-width: 470px; }
.notice { font-size: 17px; color: var(--muted); max-width: 532px; }
.notice__title { font-weight: 600; margin-bottom: 14px; }
.notice p { margin: 0 0 14px; }
.notice strong { font-weight: 600; color: #555; }
.notice hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0 20px; }
.notice__example { font-size: 18px; }
.lead__arrow { color: var(--brand); position: absolute; right: 36px; margin-top: -8px; }
.lead__form { padding: 120px 52px 64px 50px; display: flex; flex-direction: column; max-width: 560px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 19px; color: var(--muted); margin-bottom: 10px; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: #a3a3a3; pointer-events: none; }
.input-wrap--icon .input { padding-left: 68px; }
.phone { display: flex; border: 1px solid var(--border); border-radius: 4px; transition: border-color .15s; }
.phone:focus-within { border-color: var(--brand); }
.phone__prefix { display: flex; align-items: center; gap: 6px; padding: 0 22px 0 30px; border-right: 1px solid var(--border); font-size: 19px; color: var(--text); flex: none; }
.phone:focus-within .phone__prefix { border-right-color: var(--brand); }
.phone__flag { flex: none; }
.phone__field { position: relative; flex: 1; min-width: 0; }
.phone__inner-label { position: absolute; left: 14px; top: 8px; font-size: 11px; color: var(--brand-text); pointer-events: none; }
.phone .input { border: 0; padding: 16px 14px 0; height: 66px; }
.field.has-error .input-wrap .input, .field.has-error .phone { border-color: var(--error); }
.field.has-error .phone__inner-label { color: var(--error); }
.field__error { color: var(--error); font-size: 14px; margin-top: 8px; }
.field__error:empty { display: none; }
.lead__form .btn--primary { width: 100%; height: 62px; font-size: 20px; margin-top: 4px; }
.form__error { color: var(--error); font-size: 14px; text-align: center; margin-top: 10px; }
.form__error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text); margin-top: 22px; cursor: pointer; position: relative; }
.consent a { color: var(--brand-text); text-decoration: none; }
.consent a:hover { text-decoration: underline; }
.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent__box { width: 20px; height: 20px; border: 2px solid #c9c9c9; border-radius: 4px; flex: none; background: #fff; display: grid; place-items: center; margin-top: 0; }
.consent input:checked + .consent__box { background: var(--brand); border-color: var(--brand); }
.consent input:checked + .consent__box::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.consent input:focus-visible + .consent__box { outline: 3px solid rgba(153, 190, 58, .45); outline-offset: 2px; }
.consent.has-error .consent__box { border-color: var(--error); }

/* ---------- фінальні екрани ---------- */
.final { padding: 64px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.final__logo { height: 56px; width: auto; margin-bottom: 48px; }
.final__title { font-size: 34px; font-weight: 500; color: var(--text); margin: 0 0 16px; }
.final p { font-size: 18px; color: var(--muted); margin: 0 0 8px; max-width: 560px; }
.final .btn { margin-top: 28px; }
.final__icon { width: 76px; height: 76px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; margin-bottom: 24px; box-shadow: 0 10px 24px -10px rgba(153, 190, 58, .9); }

/* ---------- планшет ---------- */
@media (max-width: 1100px) {
  .step { grid-template-columns: minmax(0, 1fr) 280px; }
  .step__title { font-size: 26px; }
  .lead__info { padding: 64px 40px; }
  .lead__form { padding: 80px 40px 48px; }
  .lead__title { font-size: 28px; }
}

/* ---------- мобільна версія ---------- */
@media (max-width: 860px) {
  .quiz > section { min-height: 0; }

  .start { grid-template-columns: 1fr; }
  .start__banner { order: 1; aspect-ratio: 2940 / 2770; }
  .start__side { display: contents; }
  .start__header { order: 0; padding: 12px 16px; gap: 16px; min-height: 0; }
  .start__logo { height: 26px; }
  .start__tagline { font-size: 13px; }
  .start__content { order: 2; padding: 24px 16px 8px; }
  .start__title { font-size: 22px; }
  .start__subtitle { font-size: 15px; }
  .btn--start { width: 100%; height: 56px; font-size: 17px; }
  .start__footer { order: 3; padding: 16px 16px 24px; text-align: center; }

  .step { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; }
  .bubble { order: -1; display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; }
  .bubble__head { margin: 0; }
  .bubble__avatar { width: 40px; height: 40px; }
  .bubble__name { display: none; }
  .bubble__text { font-size: 14px; padding: 10px 14px; border-radius: 0 14px 14px 14px; }
  .step__main { padding: 20px 16px 16px; }
  .step__title { font-size: 21px; margin-bottom: 18px; }
  .options { gap: 10px; }
  .options--grid { grid-template-columns: 1fr; }
  .option { min-height: 56px; padding: 12px 16px; gap: 14px; }
  .option__label { font-size: 17px; }
  .input { height: 56px; font-size: 17px; }
  .step__bottom { flex-direction: column; gap: 16px; padding-top: 24px; position: sticky; bottom: 0; background: #fff; padding-bottom: 4px; }
  .progress { width: 100%; max-width: none; }
  .nav { width: 100%; }
  .nav__buttons { width: 100%; gap: 12px; }
  .btn--next { flex: 1; }
  .nav__hint { display: none; }

  .lead { grid-template-columns: 1fr; }
  .lead__info { padding: 28px 16px 8px; border-right: 0; }
  .lead__title { font-size: 22px; margin-bottom: 18px; }
  .notice { font-size: 14px; }
  .notice__example { font-size: 15px; }
  .notice hr { margin: 12px 0 14px; }
  .lead__arrow { display: none; }
  .lead__form { padding: 12px 16px 32px; max-width: none; }
  .field label { font-size: 16px; }
  .phone__prefix { padding: 0 12px 0 14px; font-size: 17px; }
  .phone .input { height: 58px; }
  .lead__form .btn--primary { height: 58px; font-size: 18px; }

  .btn--big { width: 100%; }
  .final { padding: 40px 20px; min-height: 100vh; min-height: 100dvh; }
  .final__logo { height: 44px; margin-bottom: 36px; }
  .final__title { font-size: 26px; }
  .final p { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
