/* Сайт эксперта. Цвета и шрифт приходят из content.json через theme.js */
:root {
  --bg: #F3F4F6;
  --ink: #0B1220;
  --accent: #19C37D;
  --accent-ink: #04130C;
  --font-display: "Manrope", "Onest", system-ui, sans-serif;
  --font-text: "Onest", system-ui, sans-serif;
  --display-weight: 800;

  --muted: color-mix(in srgb, var(--ink) 58%, var(--bg));
  --line: color-mix(in srgb, var(--ink) 13%, var(--bg));
  --surface: color-mix(in srgb, var(--ink) 5%, var(--bg));
  --paper: color-mix(in srgb, #fff 70%, var(--bg));
  --inv-bg: var(--ink);
  --inv-ink: var(--bg);
  --inv-muted: color-mix(in srgb, var(--bg) 62%, var(--ink));
  --inv-line: color-mix(in srgb, var(--bg) 16%, var(--ink));

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
[data-mode="dark"] { --paper: color-mix(in srgb, var(--ink) 7%, var(--bg)); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font-text);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); margin: 0; letter-spacing: -0.035em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.num { font-family: var(--font-display); font-weight: var(--display-weight); font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px; border-radius: 14px;
  font: 600 16px/1 var(--font-text); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* шапка */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; text-decoration: none; min-width: 0; }
.brand b { font: var(--display-weight) 17px/1.15 var(--font-display); letter-spacing: -0.02em; }
.brand span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top nav { display: flex; gap: 28px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.top .btn { min-height: 44px; padding: 0 18px; font-size: 15px; border-radius: 12px; }

/* первый экран */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }
.hero h1 { font-size: clamp(40px, 6.1vw, 84px); line-height: 0.98; }
.hero .lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); max-width: 54ch; margin-top: 24px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(40px, 5vw, 64px); }
.stat { border-top: 1px solid var(--line); padding-top: 14px; }
.stat .num { font-size: clamp(30px, 3.4vw, 46px); line-height: 1; display: block; }
.stat span:last-child { display: block; font-size: 14px; color: var(--muted); margin-top: 8px; }

.portrait { position: relative; }
.frame {
  aspect-ratio: 3 / 4; border-radius: var(--r-l); overflow: hidden;
  background: var(--surface);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame.empty { display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); font-size: 14px;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--ink) 4%, transparent) 14px 15px),
    var(--surface); }
.statement {
  position: absolute; left: clamp(-40px, -3vw, -16px); bottom: 28px; width: min(320px, 86%);
  background: var(--inv-bg); color: var(--inv-ink); border-radius: var(--r-m); padding: 18px 20px 16px;
  box-shadow: 0 30px 60px -28px color-mix(in srgb, var(--ink) 55%, transparent);
}
.statement h4 { margin: 0 0 10px; font: 500 12px/1.2 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--inv-muted); }
.statement .row { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid var(--inv-line); font-size: 14px; }
.statement .row span:first-child { color: var(--inv-muted); }
.statement .row .lead-dots { flex: 1; border-bottom: 1px dotted var(--inv-line); transform: translateY(-4px); }
.statement .row b { font: 700 16px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.statement .row:last-of-type b { color: var(--accent); }
.statement small { display: block; margin-top: 10px; font-size: 12px; color: var(--inv-muted); }

/* секции */
section { scroll-margin-top: 80px; }
.sec { padding: clamp(56px, 7vw, 96px) 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head h2 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1; }
.sec-head p { color: var(--muted); max-width: 40ch; }

/* боли — нумерованный список */
.pains .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 80px); }
.pains h2 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1; position: sticky; top: 100px; align-self: start; }
.pain { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 26px 0; border-top: 1px solid var(--line); }
.pain:last-child { border-bottom: 1px solid var(--line); }
.pain .n { font: var(--display-weight) 15px/1.6 var(--font-display); color: var(--muted); font-variant-numeric: tabular-nums; }
.pain h3 { font-size: clamp(21px, 2vw, 27px); line-height: 1.15; letter-spacing: -0.02em; }
.pain p { color: var(--muted); margin-top: 8px; }

/* кейсы — выписка */
.ledger { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.ledger-head, .case { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); gap: 28px; padding: 0 clamp(18px, 3vw, 36px); }
.ledger-head { padding-top: 16px; padding-bottom: 16px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.ledger-head span:last-child { text-align: right; }
.case { padding-top: clamp(24px, 3vw, 36px); padding-bottom: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--line); align-items: start; }
.case:last-child { border-bottom: 0; }
.case h3 { font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; }
.case .meta { font-size: 14px; color: var(--muted); margin-top: 6px; }
.case .problem { font-size: 16px; }
.case ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.case li { font-size: 15px; color: var(--muted); padding-left: 18px; position: relative; }
.case li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1.5px; background: var(--muted); }
.case .result { text-align: right; }
.case .result .num { display: inline; font-size: clamp(38px, 4.6vw, 64px); line-height: 1;
  background: linear-gradient(transparent 70%, color-mix(in srgb, var(--accent) 55%, transparent) 70% 92%, transparent 92%);
  padding: 0 2px; }
.case .result span:last-child { display: block; color: var(--muted); font-size: 15px; margin-top: 10px; }

/* услуги — прайс */
.price { border-top: 1px solid var(--line); }
.svc { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); gap: 28px; padding: 30px clamp(0px, 2vw, 28px); border-bottom: 1px solid var(--line); align-items: center; border-radius: 0; }
.svc h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -0.025em; }
.svc .for { color: var(--muted); margin-top: 6px; font-size: 15px; }
.svc .inc { font-size: 15px; color: var(--muted); }
.svc .inc b { color: var(--ink); font-weight: 500; }
.svc .cost { text-align: right; }
.svc .cost .num { font-size: clamp(24px, 2.4vw, 32px); display: block; line-height: 1.1; }
.svc .cost small { color: var(--muted); font-size: 14px; display: block; margin: 4px 0 14px; }
.svc .cost .btn { min-height: 44px; font-size: 15px; padding: 0 18px; border-radius: 12px; }
.svc.featured { background: var(--inv-bg); color: var(--inv-ink); border-radius: var(--r-l); border-bottom-color: transparent; margin: 8px 0; }
.svc.featured .for, .svc.featured .inc, .svc.featured .cost small { color: var(--inv-muted); }
.svc.featured .inc b { color: var(--inv-ink); }
.svc .tag { display: inline-block; font: 600 12px/1 var(--font-text); letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: 6px 9px; border-radius: 6px; margin-bottom: 12px; }

/* как работаем */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.step { position: relative; padding-top: 30px; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0; font: var(--display-weight) 14px/1 var(--font-display); color: var(--accent-ink); background: var(--accent); padding: 5px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.step::after { content: ""; position: absolute; top: 12px; left: 46px; right: -28px; height: 1px; background: var(--line); }
.step:last-child::after { display: none; }
.step h3 { font-size: 22px; letter-spacing: -0.02em; margin-top: 18px; }
.step p { color: var(--muted); margin-top: 8px; font-size: 16px; }

/* обо мне */
.about .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.about .frame { aspect-ratio: 4 / 3; }
.about h2 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1; margin-bottom: 24px; }
.about p + p { margin-top: 14px; }
.about p { font-size: 18px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.facts div { border-top: 1px solid var(--line); padding-top: 14px; }
.facts .num { font-size: clamp(34px, 3.6vw, 48px); line-height: 1; display: block; }
.facts span:last-child { color: var(--muted); font-size: 14px; display: block; margin-top: 8px; }

/* отзывы */
.reviews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.review { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 22px; justify-content: space-between; }
.review p { font: 500 clamp(19px, 1.8vw, 23px)/1.4 var(--font-text); letter-spacing: -0.01em; }
.review footer { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.review footer::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.review footer span { color: var(--muted); }

/* вопросы */
.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font: 600 clamp(18px, 1.7vw, 21px)/1.3 var(--font-text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); position: relative; transition: transform .25s var(--ease); }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); }
.faq summary i::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .25s var(--ease); }
.faq details[open] summary i::after { transform: translate(-50%, -50%) rotate(0); }
.faq details p { color: var(--muted); padding: 0 48px 24px 0; }

/* финал */
.final { background: var(--inv-bg); color: var(--inv-ink); border-radius: clamp(20px, 3vw, 36px); margin: 0 var(--gutter); }
.final .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); }
.final h2 { font-size: clamp(34px, 5vw, 68px); line-height: 1; }
.final p { color: var(--inv-muted); font-size: 18px; margin-top: 18px; max-width: 46ch; }
.final .btn { margin-top: 30px; }
.qr { background: #fff; border-radius: var(--r-m); padding: 14px; width: 220px; text-align: center; color: #0B0F0C; }
.qr img, .qr svg { width: 100%; height: auto; }
.qr span { display: block; font-size: 13px; margin-top: 8px; color: #4B5160; }

.foot { padding: 36px 0 44px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* появление */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* адаптив */
@media (max-width: 1000px) {
  .top nav { display: none; }
  .hero .wrap, .about .wrap, .pains .wrap { grid-template-columns: 1fr; }
  .portrait { max-width: 520px; }
  .statement { left: 16px; }
  .pains h2 { position: static; }
  .ledger-head { display: none; }
  .case { grid-template-columns: 1fr; gap: 14px; }
  .case .result { text-align: left; }
  .svc { grid-template-columns: 1fr; gap: 14px; padding: 26px 20px; }
  .svc .cost { text-align: left; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step::after { display: none; }
  .final .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .stats { gap: 12px; }
  .pain { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  .stat .num { font-size: 26px; }
  .stat span:last-child { font-size: 13px; }
  .hero .ctas .btn { flex: 1 1 100%; }
  .statement { position: relative; left: auto; bottom: auto; width: auto; margin: -56px 12px 0; }
  .sec-head { flex-direction: column; align-items: start; }
  .steps, .reviews, .facts { grid-template-columns: 1fr; }
  .final { margin: 0 8px; }
  .qr { display: none; }
  .brand span { display: none; }
}
