/* ==========================================================================
   Чек-лист WEB-Regata — эффективность сервисов для продаж девелоперов
   Макет: Figma «Чек-лист эффективности сервисов» (фрейм 1104 px)
   ========================================================================== */

:root {
  /* Цвета бренда (из логотипа) */
  --c-blue: #0A4ECB;
  --c-blue-hover: #083fa6;
  --c-sky: #46B0FD;
  --c-orange: #FE4C04;
  --c-yellow: #FFC965;
  --c-navy: #2C3453;

  --c-bg: #f3f3f3;
  --c-card: #ffffff;
  --c-text: #000000;
  --c-muted: #5b6275;
  --c-line: rgba(123, 123, 123, .55); /* #7B7B7B из макета */
  --c-tint: #eef6ff;
  --c-error: #d93a00;
  --c-success: #0f8a4b;

  --radius: 20px;
  --gap-col: 4px;       /* между карточкой блока и пунктами */
  --gap-check: 6px;     /* между пунктом и колонкой с галочкой */
  --gap-group: 8px;     /* между блоками */
  --col-title: 231px;
  --col-check: 50px;

  --fs-title: 36px;
  --fs-item: 24px;
  --fs-body: 18px;

  --frame: 1104px;
  --pad: 24px;

  --shadow: 0 10px 40px rgba(10, 78, 203, .08);
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.35;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }
a { color: var(--c-blue); }
button, input { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Каркас ---------- */

.page {
  position: relative;
  overflow-x: clip;
  min-height: 100vh;
  padding: 0 max(var(--pad), env(safe-area-inset-right)) 0 max(var(--pad), env(safe-area-inset-left));
}
.page > * { position: relative; z-index: 1; max-width: calc(var(--frame) - 2 * 25px); margin-inline: auto; }
.page > .bg { position: absolute; inset: 0; z-index: 0; max-width: none; margin: 0; overflow: hidden; pointer-events: none; }

.card {
  background: var(--c-card);
  border-radius: var(--radius);
}

/* ---------- Фон (декор из макета) ---------- */

/* Все координаты — относительно фрейма 1104 px, отцентрированного по странице */
.bg__frame { position: absolute; top: 0; left: calc(50% - var(--frame) / 2); width: var(--frame); height: 100%; }

.bg__glow {
  position: absolute; left: -316.9px; top: 25px; width: 1688.119px; height: 1442.945px;
  display: flex; align-items: center; justify-content: center;
}
.bg__glow > div { position: relative; flex: none; width: 1428.348px; height: 1028.27px; transform: rotate(-19.32deg); }
.bg__glow img { position: absolute; top: -48.38%; left: -34.83%; width: 169.66%; height: 196.76%; max-width: none; display: block; }
.bg__glow--bottom { top: auto; bottom: -520px; left: -120px; transform: scaleX(-1); opacity: .8; }

.bg__circles {
  position: absolute; left: -224px; top: -85px; width: 588.992px; height: 555.517px;
  display: flex; align-items: center; justify-content: center;
}
.bg__circles img { flex: none; width: 555.517px; height: 588.992px; max-width: none; transform: rotate(-90deg) scaleY(-1); }

.bg__cube {
  position: absolute; left: 908px; top: 626px; width: 295.355px; height: 295.355px;
  display: flex; align-items: center; justify-content: center;
}
.bg__cube img { flex: none; width: 227.089px; height: 227.089px; max-width: none; object-fit: cover; transform: rotate(-21.88deg); }

/* ---------- Шапка ---------- */

.header { display: flex; justify-content: flex-end; padding-top: 42px; }
.header__logo { display: block; line-height: 0; border-radius: 8px; }
.header__logo img { display: block; width: 243px; height: auto; }
.header__logo:focus-visible { outline: 3px solid var(--c-sky); outline-offset: 6px; }

/* ---------- Заголовок ---------- */

.intro { padding: 46px 0 60px; }
.intro__title {
  position: relative; margin: 0;
  padding-left: 45px; max-width: 967px;
  font-size: var(--fs-title); font-weight: 700; line-height: 1.17;
}
.intro__mark { position: absolute; left: 5px; top: -9px; width: 26px; height: 62px; }
.intro__lead { margin: 18px 0 0 45px; max-width: 760px; color: var(--c-muted); font-size: var(--fs-body); font-weight: 500; }

/* ---------- Чек-лист ---------- */

.checklist { margin: 0; }
.checklist__groups { display: grid; gap: var(--gap-group); }

.group {
  display: grid;
  grid-template-columns: var(--col-title) 1fr;
  gap: var(--gap-col);
  margin: 0; padding: 0; border: 0; min-width: 0;
}
.group__title {
  display: flex; align-items: center;
  margin: 0; padding: 20px 24px 20px 44px;
  font-size: var(--fs-item); font-weight: 500; line-height: 1.17;
}
.group__items { display: grid; min-width: 0; }

.row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr var(--col-check);
  column-gap: var(--gap-check);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.row + .row::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--c-line); z-index: 1;
}

.row__text,
.row__check { background: var(--c-card); transition: background-color .2s var(--ease); }

.row__text {
  display: flex; align-items: center;
  min-height: 55px; padding: 11px 10px 11px 18px;
  font-size: var(--fs-item); font-weight: 500; line-height: 1.17;
}
.row:first-child .row__text,
.row:first-child .row__check { padding-top: 14px; }
.row:last-child .row__text,
.row:last-child .row__check { padding-bottom: 14px; }
.row:first-child .row__text  { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.row:first-child .row__check { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.row:last-child .row__text   { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.row:last-child .row__check  { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }

.row__check { position: relative; display: grid; place-items: center; }
.row__check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }

/* Пустой кружок-подсказка */
.tick {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  border: 1.6px dashed rgba(44, 52, 83, .28);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
/* Рукописная галочка из макета */
/* group.svg 55×50 — коробка 46.9×41.8 + выступы тени (inset 0 -8.51% -19.21% -8.57%) */
.tick img {
  position: absolute; left: calc(50% - 25.5px); top: calc(50% - 23px); width: 55px; height: 50px; max-width: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .35s var(--ease);
}

@media (hover: hover) {
  .row:hover .row__text,
  .row:hover .row__check { background: #f7fbff; }
  .row:hover .tick { border-color: var(--c-blue); transform: scale(1.06); }
}

.row__check input:focus-visible + .tick { outline: 3px solid var(--c-sky); outline-offset: 4px; }

.row.is-checked .row__text,
.row.is-checked .row__check { background: var(--c-tint); }
.row.is-checked .tick { border-color: transparent; }
.row.is-checked .tick img { clip-path: inset(0 0 0 0); }

/* Карандаш-подсказка над первой галочкой (из макета) */
.pen { position: absolute; left: -32.4px; top: -35.3px; width: 47px; height: 36px; pointer-events: none; z-index: 2; transition: opacity .4s var(--ease), transform .4s var(--ease); }
.pen span { position: absolute; display: block; transform: scaleY(-1); }
.pen img { position: absolute; display: block; max-width: none; }
.pen .p3 { left: 0;    top: 0;    width: 31.8px;  height: 30.9px; }
.pen .p3 img { inset: -2.56% -2.48% -2.57% -2.48%; width: 104.96%; height: 105.13%; }
.pen .p2 { left: 19.9px; top: 13.9px; width: 13.9px; height: 17.9px; }
.pen .p2 img { top: -4.42%; left: -5.68%; width: 111.36%; height: 108.84%; }
.pen .p0 { left: 23.8px; top: 16.9px; width: 22.85px; height: 22.85px; }
.pen .p0 img { top: -3.46%; left: -3.46%; width: 106.92%; height: 106.92%; }
.pen .p1 { left: 30.8px; top: 31.8px; width: 4px; height: 2.93px; }
.pen .p1 img { top: -26.5%; left: -19.88%; width: 139.76%; height: 153%; }
.checklist.is-touched .pen { opacity: 0; transform: translate(-6px, -6px); }

/* Липкая панель прогресса */
.bar {
  position: sticky; bottom: 12px; z-index: 5;
  display: flex; align-items: center; gap: 16px;
  margin-top: 20px; padding: 12px 12px 12px 22px;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-radius: 999px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(10, 78, 203, .06);
}
.bar__count { white-space: nowrap; font-weight: 600; font-size: 16px; }
.bar__count b { color: var(--c-blue); font-weight: 800; }
.bar__track { flex: 1; min-width: 40px; height: 8px; border-radius: 99px; background: #e4ecf8; overflow: hidden; }
.bar__track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--c-sky), var(--c-blue)); transition: width .45s var(--ease); }
.bar__actions { display: flex; gap: 8px; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border: 0; border-radius: 999px;
  font-size: 16px; font-weight: 700; line-height: 1.1; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--c-sky); outline-offset: 3px; }
.btn--primary { background: var(--c-blue); color: #fff; box-shadow: 0 8px 20px rgba(10, 78, 203, .25); }
.btn--primary:hover { background: var(--c-blue-hover); }
.btn--ghost { background: transparent; color: var(--c-navy); }
.btn--ghost:hover { background: rgba(44, 52, 83, .07); }
.btn--lg { min-height: 60px; padding: 16px 32px; font-size: 18px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn svg { flex: none; }

.btn__spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Результат ---------- */

.result {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--gap-group);
  padding-top: 72px;
  scroll-margin-top: 16px;
}
.result .card { padding: 36px 40px; box-shadow: var(--shadow); }

.eyebrow { margin: 0 0 6px; color: var(--c-blue); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.result__score { display: flex; align-items: center; gap: 28px; }
.result__title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.2; }
.result__text { margin: 10px 0 0; color: var(--c-muted); font-weight: 500; }

.score { position: relative; flex: none; width: 132px; height: 132px; }
.score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score circle { fill: none; stroke-width: 10; }
.score__track { stroke: #e4ecf8; }
.score__value {
  stroke: var(--c-blue); stroke-linecap: round;
  stroke-dasharray: calc(var(--p) * 1) 100;
  transition: stroke-dasharray .6s var(--ease), stroke .3s;
}
.score[data-level="low"] .score__value { stroke: var(--c-orange); }
.score[data-level="mid"] .score__value { stroke: var(--c-sky); }
.score__num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.score__num b { font-size: 44px; font-weight: 800; }
.score__num > span { margin-top: 4px; color: var(--c-muted); font-size: 15px; font-weight: 600; }

.result__groups { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 18px; }
.rg__head { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.rg__head b { font-weight: 800; white-space: nowrap; }
.rg__track { margin-top: 8px; height: 8px; border-radius: 99px; background: #e4ecf8; overflow: hidden; }
.rg__track span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c-blue); transition: width .5s var(--ease); }
.rg__todo { margin: 8px 0 0; padding: 0 0 0 18px; color: var(--c-muted); font-size: 15px; font-weight: 500; }
.rg__todo li + li { margin-top: 4px; }
.rg__todo li::marker { color: var(--c-orange); }
.rg__done { margin: 8px 0 0; color: var(--c-success); font-size: 15px; font-weight: 600; }

/* ---------- Отправка на почту ---------- */

.send { align-self: start; position: sticky; top: 16px; }
.send__title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.2; }
.send__text { margin: 10px 0 24px; color: var(--c-muted); font-weight: 500; }
.send__form { display: grid; gap: 14px; }

.field { display: grid; gap: 6px; }
.field__label { font-size: 15px; font-weight: 600; }
.field__label span { color: var(--c-orange); }
.field__input {
  width: 100%; min-height: 54px; padding: 14px 18px;
  border: 1.5px solid #d6dde9; border-radius: 14px; background: #fff;
  font-size: 17px; font-weight: 500;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field__input::placeholder { color: #9aa2b3; }
.field__input:hover { border-color: #b5c1d6; }
.field__input:focus { outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 4px rgba(70, 176, 253, .25); }
.field__input[aria-invalid="true"] { border-color: var(--c-error); }
.field__error { margin: 0; min-height: 0; color: var(--c-error); font-size: 14px; font-weight: 600; }
.field__error:empty { display: none; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { position: relative; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--c-muted); cursor: pointer; }
.consent input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; }
.consent__box {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 1.5px solid #b5c1d6; border-radius: 6px; background: #fff center / 14px no-repeat;
  transition: background-color .15s, border-color .15s;
}
.consent input:checked + .consent__box {
  background-color: var(--c-blue); border-color: var(--c-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.consent input:focus-visible + .consent__box { outline: 3px solid var(--c-sky); outline-offset: 2px; }
.consent input[aria-invalid="true"] + .consent__box { border-color: var(--c-error); }

.send__status { margin: 0; font-size: 15px; font-weight: 600; }
.send__status:empty { display: none; }
.send__status.is-ok { color: var(--c-success); }
.send__status.is-error { color: var(--c-error); }

/* ---------- CTA ---------- */

.cta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px;
  min-height: 360px; padding: 64px 0 40px;
}
.cta__cube { width: 460px; height: 460px; max-width: none; margin: 0 0 -120px -225px; object-fit: contain; object-position: bottom; align-self: end; pointer-events: none; }
.cta__inner { display: grid; justify-items: start; gap: 24px; padding-right: 60px; }
.cta__title { margin: 0; font-size: 31px; font-weight: 700; line-height: 1.17; }

/* ---------- Подвал ---------- */

.footer {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(123, 123, 123, .25);
  color: var(--c-muted); font-size: 15px; font-weight: 500;
}
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--c-blue); }

.noscript { padding: 24px; background: #fff; border-radius: var(--radius); }

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 1151px) {
  :root { --fs-title: 32px; --fs-item: 20px; --col-title: 210px; }
  .group__title { padding-left: 28px; }
}

@media (max-width: 960px) {
  :root { --fs-title: 28px; --fs-item: 18px; --fs-body: 17px; --col-title: 180px; }
  .result { grid-template-columns: 1fr; }
  .send { position: static; }
  .cta { grid-template-columns: 1fr; justify-items: start; min-height: 0; }
  .cta__cube { position: absolute; right: -120px; bottom: -40px; width: 300px; height: 300px; margin: 0; opacity: .9; }
  .cta__inner { position: relative; padding-right: 0; }
}

@media (max-width: 720px) {
  :root { --fs-title: 24px; --fs-item: 16px; --fs-body: 16px; --radius: 16px; --pad: 16px; --col-check: 52px; --gap-check: 4px; }

  .header { justify-content: flex-start; padding-top: 20px; }
  .header__logo img { width: 150px; }

  .intro { padding: 28px 0 28px; }
  .intro__title { padding-left: 32px; }
  .intro__mark { left: 2px; top: -3px; width: 18px; height: 43px; }
  .intro__lead { margin-left: 32px; margin-top: 12px; }

  /* Название блока — над пунктами */
  .group { grid-template-columns: 1fr; gap: var(--gap-col); }
  .group__title { padding: 14px 18px; font-size: 17px; font-weight: 700; color: var(--c-blue); }
  .group__title br { display: none; }

  .row__text { min-height: 52px; padding: 12px 12px 12px 16px; }
  .tick { width: 30px; height: 30px; }

  .pen { display: none; }

  .bar { bottom: max(10px, env(safe-area-inset-bottom)); gap: 10px; padding: 8px 8px 8px 16px; flex-wrap: nowrap; }
  .bar__count { font-size: 14px; }
  .bar .btn { min-height: 42px; padding: 10px 16px; font-size: 14px; }
  .bar [data-reset] { display: none; }

  .result { padding-top: 48px; }
  .result .card { padding: 24px 20px; }
  .result__score { flex-direction: column; align-items: flex-start; gap: 18px; }
  .result__title, .send__title { font-size: 21px; }
  /* на телефоне список «что настроить» не дублируем — он придёт в письме */
  .rg__todo { display: none; }
  .result__groups { margin-top: 24px; gap: 14px; }
  .score { width: 112px; height: 112px; }
  .score__num b { font-size: 38px; }

  .cta { padding: 44px 0 150px; }
  .cta__title { font-size: 23px; }
  .cta__cube { right: -70px; bottom: -30px; width: 220px; height: 220px; }
  .btn--lg { min-height: 54px; font-size: 16px; }

  .bg__glow { left: -600px; }
  .bg__circles { left: -300px; top: -160px; }
  .bg__cube { display: none; }
}

@media (max-width: 380px) {
  .bar__track { display: none; }
}
