:root {
  --blue: #48aadd;
  --blue-dark: #237fae;
  --ink: #25272c;
  --muted: #686d77;
  --line: #dfe5ea;
  --panel: rgba(255, 255, 255, 0.94);
  --danger: #d7343f;
  --success: #2ca96f;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #f7fbfd;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(72, 170, 221, 0.38);
  outline-offset: 3px;
}

.app {
  min-height: 100vh;
  overflow: hidden;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 48px;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.54)), var(--bg-image);
  background-position: center;
  background-size: cover;
}

.screen.is-active {
  display: grid;
  place-items: center;
}

.shell,
.quiz-card,
.form-card {
  width: min(1320px, 100%);
  min-height: min(820px, calc(100vh - 96px));
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(24, 43, 58, 0.12);
  position: relative;
}

.shell--intro {
  display: grid;
  align-items: center;
  padding: clamp(30px, 5.5vw, 76px);
  overflow: hidden;
}

.shell--intro::after {
  content: "";
  position: absolute;
  inset: 8% 5% 8% 50%;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(72, 170, 221, 0.26), rgba(255, 255, 255, 0.46)),
    repeating-linear-gradient(110deg, rgba(255, 255, 255, 0.5) 0 16px, rgba(255, 255, 255, 0.2) 16px 34px);
  transform: skewX(-6deg);
}

.intro-copy {
  width: min(650px, 100%);
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--blue-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1.06;
}

.intro-text,
.form-copy p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.intro-stats {
  display: flex;
  gap: 20px;
  margin: 28px 0 34px;
}

.intro-stats div {
  width: 190px;
  padding: 20px;
  border: 1px solid rgba(72, 170, 221, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.intro-stats strong {
  display: block;
  color: var(--blue-dark);
  font-size: 42px;
  line-height: 1;
}

.intro-stats span {
  color: var(--muted);
  font-weight: 700;
}

.btn,
.btn-submit {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 34px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 -5px 0 rgba(25, 82, 112, 0.22), 0 14px 26px rgba(72, 170, 221, 0.28);
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover,
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 -5px 0 rgba(25, 82, 112, 0.22), 0 18px 32px rgba(72, 170, 221, 0.34);
}

.btn:disabled,
.btn-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn--start {
  width: min(420px, 100%);
  min-height: 74px;
  font-size: 25px;
  text-transform: uppercase;
}

.quiz-card,
.form-card {
  padding: clamp(24px, 4vw, 52px);
}

.close-btn {
  position: absolute;
  top: 24px;
  right: 26px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.progress {
  width: min(760px, 100%);
  margin: 0 auto 54px;
  position: relative;
}

.progress__bar {
  height: 38px;
  overflow: hidden;
  border-radius: 24px;
  background: #f0f3f4;
}

.progress__bar span {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background:
    repeating-linear-gradient(105deg, rgba(255, 255, 255, 0.18) 0 12px, rgba(255, 255, 255, 0) 12px 25px),
    linear-gradient(90deg, #54bfd4, #5fc9d9);
  box-shadow: 0 0 0 3px rgba(86, 191, 212, 0.14);
}

.progress__text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #2e3238;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(210px, 330px) 1fr;
  gap: clamp(28px, 5vw, 84px);
  align-items: start;
}

.trust-panel {
  display: grid;
  justify-items: center;
}

.doc-card {
  width: min(320px, 100%);
  text-align: center;
}

.doc-card__paper {
  width: 142px;
  height: 208px;
  margin: 0 auto 18px;
  border: 10px solid #d6bd7f;
  background:
    linear-gradient(#f6edf0, #fff8f1),
    repeating-linear-gradient(#c8a9a9 0 2px, transparent 2px 18px);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7), 0 10px 22px rgba(0, 0, 0, 0.08);
}

.doc-card__title {
  margin: 0 0 12px;
  padding: 12px 20px;
  border-radius: 4px;
  background: linear-gradient(#5eb8e1, #3e9ccb);
  color: #183347;
  font-weight: 900;
}

.doc-card p:last-child {
  margin: 0;
  color: #3d4149;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.28;
}

.question-heading {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 64px;
}

.question-tag {
  flex: 0 0 auto;
  padding: 14px 28px;
  border-radius: 8px;
  background: linear-gradient(#58b6dc, #3c9bca);
  color: #1f2a34;
  font-size: 14px;
  font-weight: 900;
}

.question-heading h2 {
  margin: 2px 0 0;
  max-width: 720px;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.18;
}

.question-body {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(260px, 480px);
  gap: clamp(28px, 4vw, 58px);
  align-items: center;
}

.answers {
  display: grid;
  gap: 14px;
}

.answer {
  min-height: 72px;
  padding: 14px 22px;
  border: 1px solid #d6dce2;
  border-radius: 5px;
  background: #fff;
  color: #2b2e34;
  display: flex;
  align-items: center;
  gap: 22px;
  text-align: left;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.24;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.answer span {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f8fafb;
  position: relative;
}

.answer span::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 10px;
  width: 12px;
  height: 7px;
  border-left: 3px solid #d8e0e5;
  border-bottom: 3px solid #d8e0e5;
  transform: rotate(-45deg);
}

.answer:hover,
.answer.is-selected {
  border-color: rgba(72, 170, 221, 0.72);
  box-shadow: 0 12px 22px rgba(35, 127, 174, 0.12);
  transform: translateY(-1px);
}

.answer.is-selected span {
  background: var(--blue);
}

.answer.is-selected span::after {
  border-color: #fff;
}

.visual-card {
  min-height: 310px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.72)),
    url("assets/quiz-bg-main.jpg") center / cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 16px 34px rgba(29, 63, 89, 0.12);
}

.visual-card--alt,
.visual-card--time {
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.72)),
    url("assets/quiz-bg-alt.jpg");
}

.visual-card--third,
.visual-card--source {
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.72)),
    url("assets/quiz-bg-final.jpg");
}

.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 64px;
  padding-left: calc(min(330px, 25vw) + clamp(28px, 5vw, 84px));
}

.link-btn {
  border: 0;
  background: transparent;
  color: #4e545c;
  cursor: pointer;
  font-weight: 850;
}

.btn--next {
  width: 200px;
}

.form-card {
  min-height: auto;
}

.progress--final {
  width: min(1020px, 100%);
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(320px, 520px);
  gap: clamp(32px, 6vw, 92px);
  align-items: start;
  padding: clamp(4px, 3vw, 18px) clamp(4px, 5vw, 72px) 10px;
}

.form-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 3.7vw, 48px);
  line-height: 1.1;
}

.lead-form {
  width: 100%;
}

.form-group {
  margin-bottom: 11px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #40464e;
  font-weight: 850;
}

.lead-form input[type="text"],
.lead-form input[type="tel"] {
  width: 100%;
  min-height: 58px;
  border: 2px solid transparent;
  border-radius: 8px;
  outline: 0;
  background: #f4f5f6;
  color: var(--ink);
  padding: 0 22px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.lead-form input:focus {
  border-color: rgba(72, 170, 221, 0.76);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(72, 170, 221, 0.14);
}

.phone-field .iti {
  width: 100%;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.checkbox-group input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

.checkbox-group label {
  font-size: 14px;
  font-weight: 750;
}

.error {
  min-height: 19px;
  margin-top: 6px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 750;
}

.btn-submit {
  width: 100%;
  min-height: 60px;
  margin-top: 8px;
  font-size: 20px;
}

.spinner-wrapper {
  display: none;
  justify-content: center;
  align-items: center;
  min-height: 64px;
  margin-top: 10px;
  color: var(--blue-dark);
}

.form-status {
  display: none;
  margin-top: 14px;
  border: 1px solid rgba(215, 52, 63, 0.22);
  border-radius: 8px;
  background: #fff3f4;
  color: #92232b;
  padding: 14px 16px 14px 48px;
  position: relative;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.form-status::before {
  content: "!";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
}

.form-status.is-visible {
  display: block;
}

.consent {
  margin: 12px 0 0;
  color: #737985;
  font-size: 12px;
  line-height: 1.35;
}

.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(9, 21, 33, 0.62);
  backdrop-filter: blur(10px);
}

.success-overlay.is-visible {
  display: grid;
}

.success-overlay__panel {
  width: min(520px, 100%);
  border-radius: 10px;
  background: #fff;
  padding: 42px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.success-mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--success);
  color: #fff;
  font-size: 38px;
  font-weight: 900;
}

.success-overlay h2 {
  margin-bottom: 12px;
  font-size: 30px;
}

.success-overlay p {
  color: var(--muted);
  line-height: 1.5;
}

body.has-overlay {
  overflow: hidden;
}

@media (max-width: 1050px) {
  .screen {
    padding: 28px;
  }

  .shell,
  .quiz-card,
  .form-card {
    min-height: calc(100vh - 56px);
  }

  .quiz-layout,
  .question-body,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .trust-panel {
    display: none;
  }

  .question-heading {
    margin-bottom: 32px;
  }

  .visual-card {
    min-height: 220px;
    order: -1;
  }

  .quiz-actions {
    padding-left: 0;
    margin-top: 34px;
  }

  .form-grid {
    padding-inline: 0;
  }
}

@media (max-width: 640px) {
  .screen {
    padding: 12px;
  }

  .shell,
  .quiz-card,
  .form-card {
    min-height: calc(100vh - 24px);
    border-radius: 8px;
  }

  .shell--intro,
  .quiz-card,
  .form-card {
    padding: 22px;
  }

  .shell--intro::after {
    display: none;
  }

  .intro-stats {
    flex-direction: column;
  }

  .intro-stats div,
  .btn--start {
    width: 100%;
  }

  .progress {
    margin-bottom: 28px;
  }

  .progress__bar {
    height: 32px;
  }

  .progress__text {
    font-size: 12px;
  }

  .question-heading {
    display: block;
  }

  .question-tag {
    display: inline-flex;
    margin-bottom: 16px;
  }

  .answer {
    min-height: 62px;
    padding: 12px 14px;
    gap: 14px;
  }

  .answer span {
    width: 32px;
    height: 32px;
  }

  .answer span::after {
    left: 10px;
    top: 9px;
  }

  .quiz-actions {
    align-items: stretch;
  }

  .btn--next {
    width: 150px;
  }

  .success-overlay__panel {
    padding: 30px 22px;
  }
}
