:root {
  --ink: #14233f;
  --ink-soft: #2b3b58;
  --slate: #5a6478;
  --line: #dde3ec;
  --mist: #eef2f8;
  --brass: #a17a3f;
  --brass-deep: #7f5e2b;
  --danger: #c0392b;
  --white: #ffffff;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --lift: 0 1px 0 #fff inset,
          0 0 0 1px rgba(20, 35, 63, .05),
          0 22px 44px -16px rgba(20, 35, 63, .30),
          0 4px 12px -2px rgba(20, 35, 63, .08);
  --lift-sm: 0 1px 0 #fff inset,
             0 8px 18px -8px rgba(20, 35, 63, .22),
             0 1px 3px rgba(20, 35, 63, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: #eef2f8;
  min-height: 100vh;
}
h1, h2, h3, p, ul, ol { margin: 0; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(161, 122, 63, .55); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

/* ---------- Background ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(160deg, #e9eef6 0%, #f6f8fb 46%, #e7edf5 100%);
}
.bg .glow { position: absolute; border-radius: 50%; filter: blur(60px); }
.bg .glow-a { width: 620px; height: 620px; left: -220px; top: -180px; background: rgba(20, 35, 63, .16); }
.bg .glow-b { width: 560px; height: 560px; right: -200px; bottom: -200px; background: rgba(161, 122, 63, .20); }
.bg svg { position: absolute; fill: none; stroke: rgba(20, 35, 63, .11); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.bg .scales { left: -3vw; top: 9vh; width: min(34vw, 470px); }
.bg .columns { right: -2vw; bottom: -1vh; width: min(46vw, 680px); stroke-width: 2; stroke: rgba(20, 35, 63, .095); }

/* ---------- Layout ---------- */
.page { padding: 28px 16px 64px; }
.screen { margin: 0 auto; }
.card {
  background: var(--white);
  border-radius: 26px;
  box-shadow: var(--lift);
}
.narrow { max-width: 720px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 34px;
  border: 0; border-radius: 16px; cursor: pointer;
  font-weight: 600; font-size: 17px; letter-spacing: .01em;
  color: #fff;
  background: linear-gradient(180deg, #1d3560 0%, var(--ink) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 12px 22px -10px rgba(20, 35, 63, .65);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: progress; filter: grayscale(.3) brightness(1.15); transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  max-width: 1080px; margin: 0 auto; min-height: 700px;
  padding: 64px 56px 60px;
}
.hero-photo {
  position: absolute; top: 0; right: 2%;
  width: min(44%, 470px); aspect-ratio: 780 / 1080;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 46%, transparent 96%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 46%, transparent 96%);
}
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-copy { position: relative; z-index: 1; max-width: 56%; }
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(36px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -.015em;
  color: var(--ink);
}
.hero .sub {
  margin-top: 22px; max-width: 34em;
  font-size: 19px; line-height: 1.5; color: var(--ink-soft);
}
.lawyer { margin-top: 36px; }
.lawyer-name {
  font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.1;
  padding-top: 14px; border-top: 3px solid var(--brass); display: inline-block; min-width: 92px;
}
.facts { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 10px; }
.facts li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 13px 18px;
  border-radius: 14px;
  background: rgba(20, 35, 63, .045);
  border: 1px solid rgba(20, 35, 63, .08);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 16.5px; line-height: 1.45;
}
.facts svg { flex: none; width: 22px; height: 22px; margin-top: 1px; stroke: var(--brass-deep); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.facts strong { font-weight: 600; }
.hero .lead { margin-top: 32px; max-width: 30em; font-size: 19px; font-weight: 500; line-height: 1.5; }
.hero .btn { margin-top: 26px; }

/* ---------- Quiz ---------- */
.progress { margin-bottom: 16px; padding: 0 4px; }
.progress-label { display: flex; justify-content: space-between; font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.progress-track {
  margin-top: 8px; height: 8px; border-radius: 99px; overflow: hidden;
  background: rgba(20, 35, 63, .12);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.progress-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--ink), var(--brass)); transition: width .35s ease; }

.quiz-card { padding: 40px 36px 36px; }
.quiz-card.swap { animation: swap .28s ease; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.q-title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(25px, 3.2vw, 32px); line-height: 1.2; letter-spacing: -.01em;
}
.options { margin-top: 26px; display: grid; gap: 14px; }
.option {
  display: flex; align-items: center; gap: 16px;
  width: 100%; text-align: left; cursor: pointer;
  padding: 18px 20px;
  background: #fff;
  border: 1.5px solid var(--line); border-radius: 16px;
  box-shadow: var(--lift-sm);
  font-size: 17px; line-height: 1.4; font-weight: 500;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.option:hover { border-color: var(--ink-soft); transform: translateY(-1px); }
.option .mark {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #b7c0cf; background: #fff;
  display: grid; place-items: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.option .mark::after {
  content: ""; width: 10px; height: 6px; margin-top: -2px;
  border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .15s ease;
}
.option.is-selected { border-color: var(--ink); background: #f4f7fc; }
.option.is-selected .mark { background: var(--ink); border-color: var(--ink); }
.option.is-selected .mark::after { transform: rotate(-45deg) scale(1); }

.link-btn {
  margin: 18px 0 0 4px; padding: 6px 4px; border: 0; background: none; cursor: pointer;
  font-size: 16px; font-weight: 500; color: var(--ink-soft);
  text-decoration: underline; text-decoration-color: rgba(20, 35, 63, .3); text-underline-offset: 4px;
}
.link-btn:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ---------- Form ---------- */
.form-card { padding: 40px 36px 36px; }
.form-intro { font-family: var(--serif); font-size: 23px; line-height: 1.35; font-weight: 500; letter-spacing: -.005em; }
form { margin-top: 28px; display: grid; gap: 20px; }
.field label { display: block; margin-bottom: 7px; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.control {
  width: 100%; min-height: 54px; padding: 0 16px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  box-shadow: inset 0 2px 4px rgba(20, 35, 63, .05);
  font-size: 17px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.control::placeholder { color: #9aa3b4; }
.control:hover { border-color: #c3ccdb; }
.control:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(20, 35, 63, .10); }
.phone-row { display: grid; grid-template-columns: minmax(130px, 40%) 1fr; gap: 10px; }
select.control { appearance: none; -webkit-appearance: none; padding-right: 38px; text-overflow: ellipsis; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2314233f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
.error { display: none; margin-top: 7px; font-size: 14.5px; font-weight: 500; color: var(--danger); }
.field.has-error .error { display: block; }
.field.has-error .control { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(192, 57, 43, .12); }

.consent {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; border-radius: 16px; cursor: pointer;
  background: rgba(20, 35, 63, .04); border: 1.5px solid transparent;
  font-size: 15.5px; line-height: 1.5;
  transition: background-color .2s ease, border-color .2s ease;
}
.consent input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; }
.consent .box {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px;
  background: #fff; border: 2px solid #9ea9bc;
  display: grid; place-items: center;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.consent .box::after {
  content: ""; width: 11px; height: 6px; margin-top: -2px;
  border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .15s ease;
}
.consent input:checked + .box { background: var(--ink); border-color: var(--ink); }
.consent input:checked + .box::after { transform: rotate(-45deg) scale(1); }
.consent input:focus-visible + .box { outline: 3px solid rgba(161, 122, 63, .55); outline-offset: 3px; }
.consent-error { display: none; margin: -8px 0 0 4px; font-size: 14.5px; font-weight: 500; color: var(--danger); }
.consent.is-alert { background: rgba(192, 57, 43, .07); border-color: rgba(192, 57, 43, .55); animation: glow 1.5s ease-in-out infinite; }
.consent.is-alert .box { border-color: var(--danger); }
.consent.is-alert + .consent-error { display: block; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(192, 57, 43, .20), 0 0 22px rgba(192, 57, 43, .28); }
}
.form-alert { padding: 14px 16px; border-radius: 12px; background: rgba(192, 57, 43, .08); color: var(--danger); font-weight: 500; font-size: 15.5px; }
form .btn { width: 100%; margin-top: 4px; }

/* ---------- How it works ---------- */
.how {
  margin-top: 26px; padding: 30px 32px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 14px 32px -16px rgba(20, 35, 63, .25);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.how h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -.005em; }
.how ol { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 16px; counter-reset: step; }
.how li { position: relative; padding-left: 46px; font-size: 16px; line-height: 1.5; counter-increment: step; }
.how li::before {
  content: counter(step);
  position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 1.5px solid var(--brass);
  font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--brass-deep);
}

/* ---------- Thank you ---------- */
.thanks-card { padding: 56px 36px 52px; text-align: center; }
.thanks-icon { width: 84px; height: 84px; margin: 0 auto 26px; }
.thanks-icon circle { fill: none; stroke: var(--brass); stroke-width: 3; stroke-dasharray: 227; stroke-dashoffset: 227; animation: draw .7s ease forwards; }
.thanks-icon path { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: draw .4s .55s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.thanks-card h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 4vw, 40px); line-height: 1.15; }
.thanks-card p { margin: 16px auto 0; max-width: 26em; font-size: 19px; line-height: 1.5; color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 56px 36px 52px; }
  .hero-copy { max-width: 60%; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .page { padding: 14px 12px 48px; }
  .card { border-radius: 22px; }
  .hero { min-height: 0; padding: clamp(250px, 74vw, 420px) 22px 32px; }
  .hero-photo { right: 0; width: 72%; -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 30%, transparent 95%); mask-image: linear-gradient(to bottom, #000 0%, #000 30%, transparent 95%); }
  .hero-copy { max-width: none; }
  .hero .sub, .hero .lead { font-size: 17px; }
  .lawyer { margin-top: 28px; }
  .lawyer-name { font-size: 25px; }
  .facts li { padding: 12px 14px; font-size: 15.5px; }
  .hero .btn { width: 100%; }
  .quiz-card, .form-card { padding: 28px 18px 24px; }
  .option { padding: 16px 16px; font-size: 16px; }
  .form-intro { font-size: 20px; }
  .phone-row { grid-template-columns: 1fr; }
  .how { padding: 24px 20px; }
  .thanks-card { padding: 44px 22px 40px; }
  .bg .scales { width: 60vw; left: -12vw; }
  .bg .columns { width: 90vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .consent.is-alert { box-shadow: 0 0 0 4px rgba(192, 57, 43, .25); }
}
