:root {
  --bg: #f7fbff;
  --surface: #ffffff;
  --surface-soft: #eef7f4;
  --ink: #16232f;
  --muted: #5c6c7b;
  --line: #dce8ef;
  --blue: #246bfe;
  --blue-dark: #184fc1;
  --green: #1d9f72;
  --amber: #f4b740;
  --shadow: 0 20px 60px rgba(36, 107, 254, .13);
  --radius: 8px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 56px);
  background: rgba(247, 251, 255, .92);
  border-bottom: 1px solid rgba(220, 232, 239, .85);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand__logo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: block;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-phone {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.option:focus-visible,
.modal__close:focus-visible,
.form-field input:focus-visible {
  outline: 3px solid rgba(36, 107, 254, .28);
  outline-offset: 2px;
}

.button--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 28px rgba(36, 107, 254, .25);
}

.button--primary:hover {
  background: var(--blue-dark);
}

.button--ghost,
.button--light {
  background: #fff;
  border-color: var(--line);
}

.button--pulse {
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(36, 107, 254, .22); }
  50% { box-shadow: 0 12px 34px rgba(29, 159, 114, .28); }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  min-height: calc(100vh - 72px);
  padding: clamp(28px, 6vw, 80px) clamp(16px, 4vw, 56px) 36px;
}

.hero__content {
  max-width: 760px;
  align-self: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(32px, 8vw, 68px);
  line-height: 1.03;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.hero__lead {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.8vw, 22px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.trust-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.trust-list li {
  position: relative;
  padding: 12px 14px 12px 38px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trust-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 11px;
  height: 7px;
  border-left: 3px solid var(--green);
  border-bottom: 3px solid var(--green);
  transform: rotate(-45deg);
}

.hero__visual {
  min-height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero__visual img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: block;
  object-fit: cover;
}

.quick-quiz,
.steps,
.compliance {
  padding: clamp(44px, 7vw, 88px) clamp(16px, 4vw, 56px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 24px;
}

.section-heading p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.quiz-shell {
  width: 100%;
  max-width: 900px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.quiz-shell--modal {
  box-shadow: none;
}

.quiz-progress {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.progress-bar {
  height: 8px;
  background: #dfe9f2;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width .28s ease;
}

.quiz-body {
  padding: clamp(18px, 4vw, 34px);
}

.quiz-question {
  margin: 0 0 18px;
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.12;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.option {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.option:hover,
.option.is-selected {
  border-color: rgba(36, 107, 254, .7);
  background: #f2f7ff;
}

.option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
}

.quiz-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}

.loader {
  display: grid;
  gap: 16px;
  place-items: center;
  min-height: 220px;
  text-align: center;
}

.loader__ring {
  width: 62px;
  height: 62px;
  border: 7px solid #e7eff6;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.lead-form {
  display: grid;
  gap: 14px;
}

.lead-form__intro {
  margin: 0 0 6px;
  color: var(--muted);
}

.form-field {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.messengers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

fieldset.form-field {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset.form-field legend {
  padding: 0;
}

.messengers label {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 750;
  cursor: pointer;
}

.messengers input {
  position: absolute;
  opacity: 0;
}

.messengers label:has(input:checked) {
  border-color: var(--green);
  background: var(--surface-soft);
}

.form-note,
.form-error {
  margin: 0;
  font-size: 13px;
}

.form-note {
  color: var(--muted);
}

.form-note a {
  color: var(--blue);
}

.form-error {
  min-height: 20px;
  color: #b42318;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.step-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.step-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--amber);
  color: #1f2933;
  font-weight: 900;
}

.step-card p {
  margin: 0;
  color: var(--muted);
}

.compliance {
  display: grid;
  gap: 18px;
  background: #eaf5ff;
}

.compliance p:last-child {
  max-width: 900px;
  margin: 0;
  color: #263747;
  font-size: 18px;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 35, 47, .55);
}

.modal__panel {
  position: relative;
  width: min(940px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  padding: 18px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .22);
}

.modal__panel h2 {
  margin: 0 48px 16px 0;
  font-size: clamp(24px, 5vw, 36px);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.site-footer {
  padding: 34px clamp(16px, 4vw, 56px);
  background: #16232f;
  color: #eef6fb;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.footer-grid p,
.footer-note,
.copyright {
  color: #c8d6e2;
}

.footer-grid a {
  color: #fff;
}

.footer-note {
  margin: 24px 0 0;
  max-width: 920px;
}

.copyright {
  margin: 18px 0 0;
  font-size: 14px;
}

.doc-page,
.thanks-page {
  background: var(--bg);
}

.doc,
.thanks {
  width: min(920px, calc(100% - 32px));
  margin: 40px auto;
  padding: clamp(22px, 5vw, 42px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.doc h1,
.thanks h1 {
  max-width: none;
  font-size: clamp(30px, 6vw, 54px);
}

.doc h2 {
  margin-top: 28px;
  font-size: 24px;
}

.doc p,
.doc li,
.thanks p {
  color: var(--muted);
}

.thanks {
  min-height: calc(100vh - 80px);
  display: grid;
  align-content: center;
  gap: 18px;
}

@media (min-width: 720px) {
  .trust-list,
  .step-grid,
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .option-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1020px) {
  .hero {
    grid-template-columns: minmax(470px, .88fr) minmax(420px, 1.12fr);
    align-items: center;
  }

  .hero h1 {
    max-width: 13ch;
  }

  .hero__visual {
    min-height: 560px;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
  }

  .header-actions {
    display: grid;
    justify-items: end;
  }

  .header-phone {
    font-size: 14px;
  }

  .header-actions .button {
    min-height: 38px;
    padding: 9px 10px;
    font-size: 13px;
  }

  .hero__actions .button,
  .quiz-controls .button,
  .lead-form .button {
    width: 100%;
  }

  .messengers {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
