/* ============ ШРИФТЫ GILROY ============ */
@font-face {
  font-family: 'Gilroy';
  src: url('fonts/Regular-BGIKGzAk.woff2') format('woff2'),
       url('fonts/Regular-CnbBW3eK.woff') format('woff'),
       url('fonts/Regular-Drm-eTQQ.ttf') format('truetype'),
       url('fonts/Regular-CwfQy20h.eot');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('fonts/Medium-B0L0cBlt.woff2') format('woff2'),
       url('fonts/Medium-BJbunviy.woff') format('woff'),
       url('fonts/Medium-Dj-JnWNf.ttf') format('truetype'),
       url('fonts/Medium-CtukZtlU.eot');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('fonts/SemiBold2-fQv7AVbs.woff2') format('woff2'),
       url('fonts/SemiBold-B1Xhmv-w.woff') format('woff'),
       url('fonts/SemiBold-C7gT_OK_.ttf') format('truetype'),
       url('fonts/SemiBold-CVNQPh30.eot');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('fonts/SemiBold2-fQv7AVbs.woff2') format('woff2'),
       url('fonts/SemiBold-B1Xhmv-w.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ============ БАЗА ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1a2030;
  --bg-card: #232a3d;
  --bg-card-hover: #2a3245;
  --border: #2f3850;
  --border-strong: #3d4763;
  --text: #ffffff;
  --text-muted: #9aa3b8;
  --text-dim: #6b7590;
  --accent: #e0d09a;          /* тёплый бежево-жёлтый */
  --accent-strong: #e8d8a8;
  --accent-border: #d9c88a;
  --radius: 8px;
}

html, body { height: 100%; }

body {
  font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100%; position: relative; }

.screen { min-height: 100vh; }
.screen[hidden] { display: none !important; }

/* ============ СТАРТ ============ */
.screen--start { display: flex; }

.start__media {
  flex: 0 0 52%;
  max-width: 52%;
  align-self: stretch;              /* растянуто по высоте */
  margin-left: 0;                   /* прижато к левому краю */
  background-image: url('hand.jpg');
  background-size: cover;
  background-position: center left; /* фокус сдвинут вправо, рука остаётся видна */
  background-repeat: no-repeat;
  background-color: #0e1623;
}
@media (max-width: 1024px) {
  .start__media { flex: 0 0 46%; max-width: 46%; }
}
@media (max-width: 860px) {
  .start__media { flex: 0 0 38%; max-width: 38%; }
}
@media (max-width: 640px) {
  .start__media { display: none; }  /* на телефоне фото скрываем */
}

.start__right {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 6rem 4rem 2rem;
}
@media (max-width: 860px) {
  .start__right { padding: 4.5rem 1.5rem 1.5rem; }
}

.start__logo {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.start__logo img { width: 92%; height: 92%; object-fit: contain; }
@media (max-width: 860px) {
  .start__logo { width: 4rem; height: 4rem; top: 1.25rem; right: 1.25rem; }
}

.start__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  max-width: 36rem;
}

.start__title {
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.start__text {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Реквизиты */
.start__legal {
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;                       /* расстояние между блоками реквизитов */
  color: var(--text-dim);
  font-size: .8125rem;
  line-height: 1.5;
  max-width: 36rem;
}

.legal__block { display: block; }

.legal__label {
  color: var(--text-muted);
  font-size: .75rem;
  letter-spacing: .02em;
  margin-bottom: .125rem;
}

.legal__value {
  color: var(--text);
  font-size: .875rem;
  line-height: 1.45;
  word-break: break-word;
}

/* ============ КНОПКИ ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3.25rem;
  padding: .75rem 2rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
  background: transparent;
  color: var(--text);
}
.btn--outline {
  border-color: var(--accent-border);
  color: var(--accent-strong);
  align-self: flex-start;
  min-width: 15rem;
}
.btn--outline:hover {
  background: rgba(224,208,154,.08);
  border-color: var(--accent);
  color: #fff;
}
.btn--submit {
  width: 100%;
  background: transparent;
  border: 1px solid var(--accent-border);
  color: var(--accent-strong);
  min-height: 3.5rem;
  position: relative;
  margin-top: .5rem;
}
.btn--submit:hover:not(:disabled) {
  background: rgba(224,208,154,.08);
  color: #fff;
}
.btn--submit:disabled { opacity: .6; cursor: not-allowed; }

.btn__spinner {
  width: 1.125rem; height: 1.125rem;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  position: absolute;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ QUIZ ============ */
.screen--quiz { display: flex; flex-direction: column; }

.quiz__wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;          /* ← тело квиза сужено */
  margin: 0 auto;
  padding: 5rem 2rem 2rem;
}
@media (max-width: 640px) { .quiz__wrap { padding: 3rem 1.25rem 1.5rem; } }

.quiz__progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
  z-index: 10;
}
.quiz__progress-bar {
  height: 100%; width: 0;
  background: var(--accent);
  transition: width .3s ease;
}

.quiz__body { flex: 1; }

.quiz__question-title {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
  max-width: 36rem;         /* ← заголовок сужен */
}

.quiz__options { display: grid; gap: .75rem; }
.quiz__options--two-cols { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) {
  .quiz__options--two-cols { grid-template-columns: 1fr; }
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.option:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }
.option.is-selected { border-color: var(--accent); background: var(--bg-card-hover); }

.option__radio {
  flex-shrink: 0;
  width: 1.25rem; height: 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  margin-top: .125rem;
  position: relative;
  transition: border-color .15s;
}
.option.is-selected .option__radio { border-color: var(--accent); }
.option.is-selected .option__radio::after {
  content: ""; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--accent);
}

.option__text { flex: 1; }
.option__text-title { font-weight: 600; margin-bottom: .25rem; }
.option__text-desc { color: var(--text-muted); font-size: .9375rem; font-weight: 400; }

.quiz__input {
  width: 100%;
  padding: 1.125rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.quiz__input::placeholder { color: var(--text-dim); }
.quiz__input:focus { border-color: var(--accent); }

/* Футер квиза: шаги слева, кнопки справа внутри той же 900px-колонки */
.quiz__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-top: 2.5rem;
}
.quiz__steps { display: flex; flex-direction: column; gap: .5rem; }
.quiz__step-label {
  font-size: .875rem;
  color: var(--text-muted);
  font-style: italic;
}
.quiz__dots { display: flex; gap: .375rem; }
.quiz__dot {
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--text-dim);
  transition: background-color .2s, border-color .2s;
}
.quiz__dot.is-done {
  background: var(--text);
  border-color: var(--text);
}
.quiz__dot.is-current {
  background: var(--accent);
  border-color: var(--accent);
}

.quiz__nav { display: flex; gap: .75rem; }

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 3.25rem;
  padding: .75rem 1.75rem;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.nav-btn--back { padding: .75rem 1rem; min-width: 3.25rem; }
.nav-btn:not(:disabled):hover { background: rgba(255,255,255,.05); }

/* Активная «Далее» — тёплая бежево-жёлтая */
.nav-btn--next {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a2030;
}
.nav-btn--next:not(:disabled):hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
.nav-btn--next:disabled {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: .6;
}
.nav-btn--next .arrow { transition: transform .15s; }
.nav-btn--next:not(:disabled):hover .arrow { transform: translateX(3px); }

/* ============ ФОРМА ============ */
.screen--form {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.25rem;
}
.form__wrap { width: 100%; max-width: 34rem; text-align: center; }

.form__title {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.form__subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
  line-height: 1.55;
}

.field { text-align: left; margin-bottom: 1.25rem; }
.field__label {
  display: block;
  color: var(--text-muted);
  font-size: .9375rem;
  margin-bottom: .5rem;
}
.field__control {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s;
}
.field__control:focus-within { border-color: var(--accent); }
.field__control--icon { padding-left: 1rem; gap: .75rem; }
.field__icon { color: var(--text-dim); font-size: 1.125rem; }
.field__country {
  padding: .875rem 1rem;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 1rem;
}
.field__control input {
  flex: 1;
  padding: 1rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  min-width: 0;
}
.field__control input::placeholder { color: var(--text-dim); }
.field__error {
  color: #e85a5a;
  font-size: .8125rem;
  min-height: 1rem;
  margin-top: .375rem;
}
.field.is-invalid .field__control { border-color: #e85a5a; }

/* ============ THANKS ============ */
.screen--thanks {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 1.25rem;
}
.thanks__title {
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.thanks__text { color: var(--text-muted); font-size: 1.0625rem; }