/* ===== ЦВЕТА И ШРИФТЫ — меняйте здесь ===== */
:root {
  --mist: #F1F6F3;     /* фон страницы */
  --mint: #D3EADF;     /* светлые блоки */
  --ink: #16312D;      /* основной текст */
  --teal: #2C7A6E;     /* акцент */
  --sun: #F4B73F;      /* кнопки */
  --sun-dark: #E3A12A; /* кнопка при наведении */
  --white: #FFFFFF;
  --muted: #4F6A65;
  --danger: #B3402F;

  --font-head: "Unbounded", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(24px, 3.6vw, 34px); }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - 40px); }

/* ===== КНОПКИ ===== */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font: 600 18px/1.3 var(--font-body);
  padding: 18px 32px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--sun-dark); }
.btn:active { transform: scale(.98); }
.btn--small { font-size: 15px; padding: 10px 20px; }
.btn--full { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ===== ШАПКА ===== */
.top { padding: 14px 0; }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 600 22px var(--font-head); }

/* ===== ГЛАВНЫЙ ЭКРАН ===== */
.hero { padding: 40px 0 72px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.lead { font-size: 20px; color: var(--muted); max-width: 34em; }
.note { margin: 14px 0 0; font-size: 15px; color: var(--muted); }

.path { margin: 0; background: var(--white); border-radius: 28px; padding: 24px 24px 20px; }
.path svg { display: block; width: 100%; height: auto; }
.path figcaption { font-size: 15px; color: var(--muted); margin-top: 10px; }
.path__axis { stroke: var(--mint); stroke-width: 2; }
.path__line {
  fill: none; stroke: var(--teal); stroke-width: 5;
  stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation: draw 2.6s ease-out .3s forwards;
}
.path__dot { fill: var(--white); stroke: var(--teal); stroke-width: 3; }
.path__goal { fill: var(--sun); stroke: var(--ink); stroke-width: 2; }
.path__label { font: 500 13px var(--font-body); fill: var(--muted); }
.path__label--goal { fill: var(--ink); font-weight: 600; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ===== СЕКЦИИ ===== */
.section { padding: 72px 0; }
.section--mint { background: var(--mint); }
.section__intro { font-size: 19px; color: var(--muted); max-width: 40em; margin-bottom: 36px; }

/* Сравнение: что мешало / как делаем иначе */
.pairs { border-top: 2px solid var(--ink); }
.pairs__head, .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 20px 0; border-bottom: 1px solid rgba(22, 49, 45, .2); }
.pairs__head { font: 600 14px var(--font-body); color: var(--muted); padding: 12px 0; }
.pair p { margin: 0; }
.pair__bad { color: var(--muted); }
.pair__good { font-weight: 500; padding-left: 20px; border-left: 4px solid var(--teal); }

/* Что вы получите */
.gives { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.gives li { padding: 22px 0; border-top: 2px solid var(--teal); }
.gives h3 { margin-bottom: .35em; }
.gives p { margin: 0; color: var(--muted); }

/* Шаги */
.steps { margin: 32px 0 0; padding: 0; list-style: none; counter-reset: step; max-width: 720px; }
.steps li { position: relative; padding: 0 0 28px 64px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal); color: var(--white);
  display: grid; place-items: center;
  font: 600 18px var(--font-head);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; top: 46px; bottom: 4px; width: 2px; background: var(--mint);
}

/* Обо мне */
.about { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.about__photo {
  width: 220px; height: 220px; border-radius: 50%;
  background: var(--white); color: var(--teal);
  display: grid; place-items: center; text-align: center;
  font: 600 18px var(--font-head);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Вопросы */
details { border-bottom: 1px solid rgba(22, 49, 45, .2); padding: 18px 0; }
details:first-of-type { border-top: 2px solid var(--ink); }
summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 26px; line-height: 1; color: var(--teal); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 12px 0 0; color: var(--muted); }

/* Финал */
.final { background: var(--teal); color: var(--white); padding: 88px 0; text-align: center; }
.final p { font-size: 20px; max-width: 30em; margin-inline: auto; margin-bottom: 28px; }

.foot { padding: 28px 0; font-size: 14px; color: var(--muted); }
.foot p { margin: 0; }

/* ===== ФОРМА (МОДАЛЬНОЕ ОКНО) ===== */
dialog {
  width: min(520px, 100% - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  border: 0; border-radius: 28px;
  padding: 32px 28px 28px;
  background: var(--white); color: var(--ink);
}
dialog::backdrop { background: rgba(22, 49, 45, .6); }
dialog[open] { animation: pop .25s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } }
dialog h2 { font-size: 24px; padding-right: 32px; }
.modal__sub { color: var(--muted); font-size: 16px; }
.modal__close {
  position: absolute; top: 14px; right: 16px;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--mist); color: var(--ink);
  font-size: 26px; line-height: 1; cursor: pointer;
}

.field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
label, legend { display: block; font-size: 15px; font-weight: 500; margin-bottom: 6px; padding: 0; }
input[type="text"], input[type="number"] {
  width: 100%; font: 400 17px var(--font-body); color: var(--ink);
  padding: 13px 14px; border: 2px solid var(--mint); border-radius: 14px; background: var(--white);
}
input[type="text"]:focus, input[type="number"]:focus { outline: none; border-color: var(--teal); }
input.invalid { border-color: var(--danger); }
#f-contact { margin-top: 10px; }

.chips { display: flex; gap: 10px; }
.chips label { margin: 0; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: block; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--mint); font-size: 16px; }
.chips input:checked + span { background: var(--teal); border-color: var(--teal); color: var(--white); }
.chips input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--muted); margin: 4px 0 18px; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--teal); }
.hp { position: absolute; left: -9999px; opacity: 0; }

.form-error { color: var(--danger); font-size: 15px; margin: 0 0 14px; }
.thanks__goal { font: 600 22px var(--font-head); color: var(--teal); }

/* ===== ПЛАНШЕТ И ТЕЛЕФОН ===== */
@media (max-width: 820px) {
  body { font-size: 17px; }
  .hero { padding: 24px 0 48px; }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 52px 0; }
  .pairs__head { display: none; }
  .pair { grid-template-columns: 1fr; gap: 10px; }
  .gives { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .about__photo { width: 180px; height: 180px; }
  .btn { width: 100%; padding: 18px 20px; }
  .btn--small { width: auto; }
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .field:first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .path__line { animation: none; stroke-dashoffset: 0; }
  dialog[open] { animation: none; }
}
