@import url("/static/fonts/fonts.css");

:root {
  --bg: #FAF8F4;
  --bg-2: #F2EEE7;
  --ink: #17181C;
  --muted: #5E6168;
  --line: #E6E1D8;
  --accent: #C2410C;
  --accent-hover: #9A3412;
  --accent-soft: #FBEDE4;
  --white: #FFFFFF;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --radius: 14px;
  --page: 1160px;
  --text: 680px;
  --section: 96px;
  --section-wide: 160px;
}

*, *::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: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--text); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 8px 12px; z-index: 100; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 244, .94); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top__in { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { display: flex; align-items: baseline; gap: 2px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.logo b { color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 4px; font-size: 15px; font-weight: 500; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu__list { display: flex; }
.menu__list { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; gap: 4px; padding: 12px 24px 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
.menu__list a { padding: 10px 0; text-decoration: none; font-size: 18px; border-bottom: 1px solid var(--line); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent; font: 500 16px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn--main { background: var(--accent); color: var(--white); }
.btn--main:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.arrow { transition: transform .2s; }
.btn:hover .arrow, .link:hover .arrow { transform: translateX(3px); }
.link { color: var(--accent); text-decoration: none; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.link:hover { color: var(--accent-hover); }

/* Типографика */
h1, h2, h3 { font-family: var(--sans); letter-spacing: -.025em; margin: 0; }
.h-hero { font-size: clamp(40px, 6vw, 68px); line-height: 1.04; font-weight: 600; max-width: 15ch; }
.h-page { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.08; font-weight: 600; max-width: 20ch; }
.h-sec { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; font-weight: 600; max-width: 22ch; }
.lead { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.55; color: var(--muted); max-width: 36em; margin: 24px 0 0; }
.kicker { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 18px; }
.num { font-variant-numeric: tabular-nums; }

/* Секции */
.sec { padding: var(--section) 0; }
.sec--wide { padding: var(--section-wide) 0; }
.sec--tint { background: var(--bg-2); }
.sec--ink { background: var(--ink); color: var(--bg); }
.sec--ink .lead, .sec--ink .kicker { color: #B9BAC0; }
.sec__head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 48px; }

/* Первый экран */
.hero { padding: 72px 0 96px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero__note { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Отчёт-карточка (наш недельный отчёт) */
.report { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 26px 26px 22px; }
.report__top { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.report__top strong { color: var(--ink); font-weight: 600; font-size: 15px; }
.report table { width: 100%; border-collapse: collapse; font-size: 15px; }
.report td { padding: 9px 0; border-top: 1px solid var(--line); }
.report td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.report tr.total td { font-weight: 600; font-size: 17px; }
.report tr.total td:last-child { color: var(--accent); }
.report__diag { margin-top: 16px; padding: 12px 14px; background: var(--bg-2); border-radius: 10px; font-size: 14px; line-height: 1.45; }
.report__diag b { font-weight: 600; }
.report__src { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* Полоса цифр */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.fact { padding: 28px 24px 0 0; }
.fact__n { font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fact__t { margin-top: 8px; font-size: 15px; color: var(--muted); max-width: 22ch; }
.facts__src { margin-top: 20px; font-size: 13px; color: var(--muted); }

/* Список услуг строками */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1.1fr 1.6fr auto; gap: 32px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .2s; }
.row:hover { padding-left: 10px; }
.row:hover .row__name { color: var(--accent); }
.row__name { font-size: 22px; font-weight: 600; letter-spacing: -.02em; transition: color .2s; }
.row__text { color: var(--muted); font-size: 16px; }
.row__price { font-size: 15px; font-weight: 500; white-space: nowrap; }

/* Метод: шаги */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; }
.step { padding: 0 32px 0 0; counter-increment: step; }
.step::before { content: "0" counter(step); display: block; font-size: 14px; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.step h3 { font-size: 21px; font-weight: 600; margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted); }
.sec--ink .step p { color: #B9BAC0; }

/* Кейсы */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-decoration: none; transition: border-color .2s, transform .2s; }
.case:hover { border-color: var(--ink); transform: translateY(-2px); }
.case--big { grid-column: span 2; }
.case__niche { font-size: 14px; color: var(--muted); }
.case__n { margin-top: 18px; font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.case--big .case__n { font-size: 56px; }
.case__nt { margin-top: 8px; font-size: 15px; color: var(--muted); }
.case__title { margin-top: auto; padding-top: 24px; font-size: 18px; font-weight: 600; line-height: 1.3; }

/* Отзывы */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.quote { margin: 0; border-left: 2px solid var(--accent); padding-left: 20px; }
.quote p { font-family: var(--serif); font-size: 19px; line-height: 1.5; margin: 0; }
.quote cite { display: block; margin-top: 12px; font-style: normal; font-size: 14px; color: var(--muted); }

/* Об авторе */
.author { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
.author img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.author p { font-size: 18px; max-width: 34em; }

/* Вопросы */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-size: 19px; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 26px; font-weight: 300; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 22px; color: var(--muted); max-width: 40em; }
.faq details > div p { margin: 0 0 12px; }

/* Форма */
.lead-box { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.form { display: grid; gap: 14px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; min-height: 52px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font: 400 17px/1.4 var(--sans); color: var(--ink); transition: border-color .2s; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: #CFC8BB; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.sec--ink .field input, .sec--ink .field textarea { background: #22242A; border-color: #33363E; color: var(--bg); }
.sec--ink .field label { color: #B9BAC0; }
.form__legal { font-size: 13px; color: var(--muted); }
.sec--ink .form__legal { color: #9A9CA3; }
.form__legal a { color: inherit; }
.form__msg { font-size: 15px; min-height: 1.4em; }
.form__msg.ok { color: #2F7D4F; }
.sec--ink .form__msg.ok { color: #8FD1A8; }
.form__msg.err { color: var(--accent); }
.promise { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.promise li { padding-left: 28px; position: relative; }
.promise li::before { content: ""; position: absolute; left: 0; top: .62em; width: 14px; height: 2px; background: var(--accent); }

/* Хлебные крошки */
.crumbs { font-size: 14px; color: var(--muted); padding: 28px 0 0; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 8px; opacity: .6; }

/* Статья */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 60; }
.article-head { padding: 40px 0 0; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 24px; font-size: 15px; color: var(--muted); }
.meta a { color: var(--ink); text-decoration: none; font-weight: 500; }
.short { margin: 36px 0 0; padding: 24px 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); max-width: var(--text); }
.short__t { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.short ul { margin: 0; padding-left: 20px; }
.short li { margin: 6px 0; }
.layout { display: grid; grid-template-columns: minmax(0, var(--text)) 260px; gap: 80px; justify-content: space-between; padding: 48px 0 0; }
.toc { position: sticky; top: 100px; align-self: start; font-size: 14px; }
.toc__t { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); line-height: 1.4; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--accent); }
.toc-mobile { display: none; margin: 28px 0 0; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.toc-mobile summary { padding: 14px 18px; cursor: pointer; font-weight: 500; }
.toc-mobile ol { margin: 0; padding: 0 18px 16px 36px; }
.toc-mobile li { padding: 4px 0; }
.toc-mobile a { text-decoration: none; color: var(--muted); }

.prose { font-family: var(--serif); font-size: 19px; line-height: 1.68; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin-bottom: 0; }
.prose h2 { font-size: 30px; line-height: 1.2; font-weight: 600; margin-top: 2.1em; scroll-margin-top: 96px; }
.prose h3 { font-size: 22px; line-height: 1.3; font-weight: 600; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-hover); }
.prose strong { font-weight: 600; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; display: block; overflow-x: auto; }
.prose th { text-align: left; font-weight: 600; padding: 10px 14px 10px 0; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.prose td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: top; }
.prose .note, .prose .figure { font-family: var(--sans); font-size: 16px; line-height: 1.55; background: var(--bg-2); border-radius: 12px; padding: 18px 22px; }
.prose .big { font-family: var(--sans); font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -.03em; color: var(--accent); }
.prose img { border-radius: 12px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.inline-cta { margin: 2.4em 0 0; padding: 26px 28px; border-radius: var(--radius); background: var(--ink); color: var(--bg); font-family: var(--sans); display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; }
.inline-cta p { margin: 0; font-size: 17px; line-height: 1.5; }
.inline-cta strong { display: block; font-size: 20px; margin-bottom: 4px; }

.byline { display: flex; gap: 18px; align-items: center; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.byline img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top; }
.byline b { display: block; font-weight: 600; }
.byline span { color: var(--muted); font-size: 15px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s; }
.card:hover { border-color: var(--ink); }
.card__k { font-size: 13px; color: var(--muted); }
.card__t { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.card__d { font-size: 15px; color: var(--muted); }

/* Страница услуги */
.price-line { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 32px; }
.price-tag { font-size: 22px; font-weight: 600; }
.price-tag small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.page-body { padding: 56px 0 0; }
.page-body .prose { font-family: var(--sans); font-size: 18px; }

/* Подвал */
.foot { padding: 64px 0 48px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); font-weight: 600; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot__legal { margin-top: 48px; font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Появление */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* Планшет */
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .toc-mobile { display: block; }
  .hero__grid, .lead-box, .author { grid-template-columns: 1fr; gap: 40px; }
  .author img { max-width: 280px; }
  .cases { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}

/* Телефон */
@media (max-width: 760px) {
  :root { --section: 64px; --section-wide: 96px; }
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav, .top .btn { display: none; }
  .menu { display: block; }
  .hero { padding: 40px 0 64px; }
  .hero__actions .btn { width: 100%; }
  .sec__head { display: block; }
  .sec__head .link { margin-top: 16px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .row:hover { padding-left: 0; }
  .steps, .cases, .quotes, .cards { grid-template-columns: 1fr; gap: 28px; }
  .case--big { grid-column: auto; }
  .case--big .case__n { font-size: 44px; }
  .step { padding: 0; }
  .prose { font-size: 18px; }
  .prose h2 { font-size: 25px; }
  .inline-cta { grid-template-columns: 1fr; }
  .short { padding: 20px; }
  .foot__grid { grid-template-columns: 1fr; }
}
