@import url('fonts.css');

/* «Алименты по закону». Спокойный шалфейный фон, ягодный цвет для действий,
   документ — в PT Serif, как настоящий лист для суда. Акцент один: живой расчёт суммы. */
:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --sage: #e4ede8;
  --sage-2: #d3e1d9;
  --ink: #1a2420;
  --ink-2: #4e5a55;
  --ink-3: #85908b;
  --line: #d9e1dc;
  --berry: #9a2b5c;
  --berry-dark: #7a1f48;
  --berry-soft: #f6e5ed;
  --ok: #1e7a4c;
  --ok-soft: #e1f1e8;
  --warn: #8a5300;
  --warn-soft: #fbf0d9;
  --err: #b3261e;

  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --wrap: 1120px;
  --r: 14px;
  --r-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--sans); }
img, svg { display: block; max-width: 100%; }
a { color: var(--berry); text-underline-offset: 3px; }
a:hover { color: var(--berry-dark); }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 750; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--berry); color: #fff; font: 650 18px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--berry-dark); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { background: var(--surface); color: var(--ink); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn--wide { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- шапка и подвал ---------- */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 18px; }
.brand svg { width: 30px; height: 30px; }
.top__cta { white-space: nowrap; }
@media (max-width: 560px) { .top__cta { display: none; } }

.foot { margin-top: 80px; padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.foot p { margin: 0 0 4px; }
.foot nav { display: flex; flex-direction: column; gap: 6px; }
.foot a { color: var(--ink-2); }

/* ---------- первый экран ---------- */
.hero { padding: 24px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero__lead { font-size: 20px; color: var(--ink-2); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 28px 0 14px; }
.hero__note { font-size: 15px; color: var(--ink-2); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--ink-2); }
.hero__facts li { display: flex; gap: 8px; align-items: center; }
.hero__facts svg { width: 18px; height: 18px; color: var(--ok); flex: none; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 28px; } }

/* калькулятор — главный акцент страницы */
.calc { background: var(--surface); border-radius: 22px; padding: 26px; box-shadow: 0 1px 2px rgba(26,36,32,.05), 0 24px 48px -28px rgba(26,36,32,.35); }
.calc h2 { font-size: 22px; margin-bottom: 18px; }
.calc__row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; margin-bottom: 14px; }
.calc label { font-weight: 600; font-size: 15px; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font: 600 22px/1 var(--sans); color: var(--ink); cursor: pointer; }
.stepper button:hover { background: var(--sage); }
.stepper output { min-width: 34px; text-align: center; font-weight: 700; font-size: 18px; }
.money { position: relative; }
.money input { width: 100%; height: 52px; border: 2px solid var(--line); border-radius: 12px; padding: 0 44px 0 14px; font: 600 20px var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); background: #fff; }
.money input:focus { border-color: var(--berry); outline: none; }
.money::after { content: '₽'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; }
.calc__result { margin-top: 18px; padding: 18px; border-radius: 14px; background: var(--berry-soft); }
.calc__sum { font-size: clamp(38px, 6vw, 52px); font-weight: 800; color: var(--berry); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.calc__per { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.calc__year { margin-top: 10px; font-weight: 600; }
.calc__hint { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }

/* полоса про пособие */
.notice { background: var(--ink); color: #e9efec; }
.notice .wrap { display: flex; gap: 18px; align-items: flex-start; padding-top: 22px; padding-bottom: 22px; }
.notice b { color: #fff; }
.notice p { margin: 0; max-width: 62em; }
.notice svg { width: 26px; height: 26px; flex: none; color: #f2b8cf; margin-top: 2px; }

/* ---------- секции ---------- */
.section { padding: 72px 0 0; }
.section > .wrap > h2 { max-width: 20em; }
.section__lead { font-size: 19px; color: var(--ink-2); max-width: 40em; margin-bottom: 32px; }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; background: var(--surface); border-radius: var(--r); padding: 24px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--sage); font-weight: 800; margin-bottom: 14px; }
.steps p { margin: 0; color: var(--ink-2); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.pack { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.pack ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.pack li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.pack li svg { width: 24px; height: 24px; color: var(--berry); margin-top: 2px; }
.pack li b { display: block; }
.pack li span { color: var(--ink-2); font-size: 15px; }
@media (max-width: 860px) { .pack { grid-template-columns: 1fr; } }

/* лист документа */
.paper { background: #fff; border-radius: 6px; padding: 30px 30px 24px; font: 400 14px/1.5 var(--serif); color: #222; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 18px 40px -24px rgba(26,36,32,.45); position: relative; overflow: hidden; }
.paper__head { margin-left: 42%; margin-bottom: 14px; font-size: 13px; }
.paper__head b { font-weight: 700; }
.paper__head div { margin: 0; }
.paper__head .gap { height: 8px; }
.paper__title { text-align: center; font-weight: 700; margin: 10px 0 2px; }
.paper__sub { text-align: center; margin-bottom: 12px; }
.paper p { text-indent: 1.6em; text-align: justify; margin: 0 0 8px; }
.paper ul { margin: 0 0 8px 1.6em; padding: 0; list-style: '— '; }
.paper .fill { background: var(--berry-soft); color: var(--berry-dark); border-radius: 3px; padding: 0 2px; }
.paper__fade { position: relative; height: 150px; margin-top: -60px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 60%); }
.paper__lines { display: grid; gap: 9px; margin-top: 4px; }
.paper__lines i { display: block; height: 9px; border-radius: 3px; background: #eceeed; }
.paper__lines i:nth-child(3n) { width: 82%; }
.paper__lines i:nth-child(4n) { width: 64%; }
.paper__lock { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 18px; font: 600 14px var(--sans); white-space: nowrap; }
@media (max-width: 560px) { .paper { padding: 22px 18px; font-size: 13px; } .paper__head { margin-left: 18%; } }

/* сравнение */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: var(--r); overflow: hidden; font-size: 16px; }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--sage); font-size: 15px; }
.compare tr:last-child td { border-bottom: 0; }
.compare .us { background: var(--berry-soft); }
.compare thead .us { background: var(--berry); color: #fff; }
.compare td:first-child { color: var(--ink-2); width: 26%; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); }
.scroll-x .compare { min-width: 640px; }

.nofit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nofit div { background: var(--surface); border-radius: var(--r); padding: 20px; border-left: 4px solid var(--sage-2); }
.nofit b { display: block; margin-bottom: 6px; }
.nofit p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 820px) { .nofit { grid-template-columns: 1fr; } }

.faq { max-width: 780px; }
.faq details { background: var(--surface); border-radius: var(--r); margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: var(--ink-3); }
.faq details[open] summary::after { content: '−'; }
.faq details > div { padding: 0 20px 18px; color: var(--ink-2); }

.final { margin-top: 72px; background: var(--ink); color: #eef3f0; border-radius: 24px; padding: 44px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.final h2 { color: #fff; margin: 0 0 8px; }
.final p { margin: 0; color: #c5d1cb; }
@media (max-width: 760px) { .final { grid-template-columns: 1fr; padding: 28px; } }

/* ---------- анкета ---------- */
.form-page { max-width: 720px; margin: 0 auto; padding: 8px 20px 40px; }
.progress { height: 6px; background: var(--sage); border-radius: 99px; overflow: hidden; margin: 6px 0 8px; }
.progress i { display: block; height: 100%; background: var(--berry); width: 0; transition: width .25s; }
.progress-txt { font-size: 14px; color: var(--ink-3); margin-bottom: 18px; }
.card { background: var(--surface); border-radius: 20px; padding: 28px; }
@media (max-width: 560px) { .card { padding: 20px 16px; border-radius: 16px; } }
.q { font-size: clamp(24px, 3.4vw, 30px); font-weight: 750; margin: 0 0 8px; line-height: 1.2; }
.q-hint { color: var(--ink-2); margin: 0 0 20px; }
.field { margin-bottom: 16px; }
.field > label, .field > .lbl { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--ink-3); margin-top: 5px; }
input[type=text], input[type=email], input[type=date], input[type=tel], input[type=number], select, textarea {
  width: 100%; min-height: 50px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 400 17px var(--sans);
}
input:focus, select:focus, textarea:focus { border-color: var(--berry); outline: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; }
.opt:hover { border-color: var(--sage-2); background: #fbfcfb; }
.opt input { margin: 3px 0 0; width: 20px; height: 20px; accent-color: var(--berry); flex: none; }
.opt b { display: block; }
.opt span { color: var(--ink-2); font-size: 15px; }
.opt:has(input:checked) { border-color: var(--berry); background: var(--berry-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--berry); flex: none; }
.kid { border: 2px dashed var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.kid h3 { font-size: 16px; margin-bottom: 10px; display: flex; justify-content: space-between; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }
.err { color: var(--err); background: #fdeceb; border-radius: 10px; padding: 12px 14px; margin: 14px 0 0; font-size: 15px; }
.verdict { border-radius: 16px; padding: 20px; margin-bottom: 18px; }
.verdict--ok { background: var(--ok-soft); }
.verdict--stop { background: var(--warn-soft); }
.verdict h3 { margin-bottom: 6px; }
.verdict ul { margin: 8px 0 0; padding-left: 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- заказ ---------- */
.order { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: start; padding-top: 8px; }
@media (max-width: 920px) { .order { grid-template-columns: 1fr; } }
.order h1 { font-size: clamp(28px, 4vw, 40px); }
.buy { position: sticky; top: 16px; }
.buy__price { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.buy__old { color: var(--ink-3); font-size: 15px; }
.buy ul { margin: 16px 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.buy li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 15px; }
.buy li svg { width: 20px; height: 20px; color: var(--ok); margin-top: 2px; }
.buy .check { margin: 14px 0; }
.buy__safe { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 24px; }
.facts div { background: var(--surface); border-radius: 14px; padding: 16px; }
.facts b { display: block; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.facts span { font-size: 14px; color: var(--ink-2); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
.dl { display: grid; gap: 12px; margin: 20px 0; }
.dl a { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border-radius: 14px; text-decoration: none; color: var(--ink); border: 2px solid var(--line); }
.dl a:hover { border-color: var(--berry); }
.dl svg { width: 44px; height: 44px; color: var(--berry); }
.dl small { display: block; color: var(--ink-2); }
.todo { margin: 0; padding-left: 22px; }
.todo li { margin-bottom: 8px; }
.loading { padding: 80px 0; text-align: center; color: var(--ink-2); }

/* ---------- юридические страницы ---------- */
.legal { background: var(--surface); border-radius: 20px; padding: 36px; max-width: 860px; margin: 0 auto; font-size: 16px; }
.legal h1 { font-size: 30px; }
.legal h2 { font-size: 20px; margin-top: 1.6em; }
.legal table { border-collapse: collapse; width: 100%; }
.legal td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.legal .rev { color: var(--ink-3); }
@media (max-width: 560px) { .legal { padding: 22px 16px; } }

/* ---------- cookie ---------- */
.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 50; max-width: 420px; background: var(--ink); color: #e9efec; border-radius: 16px; padding: 16px; font-size: 14px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.5); }
.cookie p { margin: 0 0 12px; }
.cookie a { color: #f2b8cf; }
.cookie div { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie .btn--ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
@media (max-width: 560px) { .cookie { left: 8px; right: 8px; bottom: 8px; max-width: none; padding: 10px 12px; font-size: 13px; } .cookie p { margin-bottom: 8px; } .cookie .btn--small { min-height: 34px; padding: 0 12px; font-size: 13px; } }
