/* Общие стили для визитки и всех посадочных страниц */
:root {
  --ink: #1c2230;
  --ink-soft: #4a5263;
  --muted: #6f7686;
  --paper: #f5f3ef;
  --card: #ffffff;
  --line: #e2ded6;
  --navy: #1f2d4d;
  --navy-deep: #151f36;
  --brass: #a8834c;
  --brass-soft: #f1e7d6;
  --wa: #1f9d57;
  --tg: #2a8bd0;
  --radius: 14px;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(25px, 3.6vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--white { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brass); font-weight: 600;
}
.lead { font-size: 19px; color: var(--ink-soft); max-width: 640px; }

/* Контекст внутренней страницы */
.breadcrumbs {
  display: flex; align-items: center; gap: 9px; padding-top: 18px; padding-bottom: 18px;
  color: rgba(255, 255, 255, .7); font-size: 14px;
  /* фон на всю ширину экрана, в тон первому экрану */
  background: var(--navy); box-shadow: 0 0 0 100vmax var(--navy); clip-path: inset(0 -100vmax);
  /* заходит на первый экран на 1px, чтобы на стыке не просвечивал светлый фон */
  position: relative; z-index: 1; margin-bottom: -1px;
}
.breadcrumbs a { color: #d9bb8a; text-underline-offset: 3px; }
.breadcrumbs [aria-current="page"] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Шапка */
.topbar { background: var(--navy-deep); color: #fff; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: block; line-height: 0; }
.brand img { width: 40px; height: 40px; }
.topbar__phone { color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.topbar { position: relative; z-index: 30; }
.topbar__right { display: flex; align-items: center; gap: 14px; }

/* Меню-бургер */
.burger { position: relative; }
.burger summary {
  list-style: none; cursor: pointer; width: 44px; height: 44px; margin-right: -10px;
  display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.burger summary::-webkit-details-marker { display: none; }
.burger summary:hover { background: rgba(255, 255, 255, .08); }
.burger summary span, .burger summary span::before, .burger summary span::after {
  display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px;
  position: relative; transition: transform .2s, background .2s;
}
.burger summary span::before, .burger summary span::after { content: ""; position: absolute; left: 0; }
.burger summary span::before { top: -7px; }
.burger summary span::after { top: 7px; }
.burger[open] summary span { background: transparent; }
.burger[open] summary span::before { transform: translateY(7px) rotate(45deg); }
.burger[open] summary span::after { transform: translateY(-7px) rotate(-45deg); }
.burger__panel {
  position: absolute; right: -10px; top: calc(100% + 16px); width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 100px); overflow-y: auto;
  list-style: none; margin: 0; padding: 8px 20px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(20, 30, 50, .22);
}
.burger__panel li + li { border-top: 1px solid var(--line); }
.burger__panel a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; font-size: 16px; }
.burger__panel a:hover { color: var(--navy); text-decoration: underline; }
.burger__panel a[aria-current] { color: var(--brass); font-weight: 600; }
.burger__panel a span { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Кнопки */
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 10px;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .1s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(20, 30, 50, .14); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-deep); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--tg { background: var(--tg); color: #fff; }
.btn--mail { background: #8a6a3a; color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--block { width: 100%; }

/* Визитка */
.card-hero { padding: 48px 0 56px; }
.card-hero__grid { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: center; }
.photo { border-radius: var(--radius); overflow: hidden; background: #6b6e73; aspect-ratio: 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.title-role { font-size: 20px; color: var(--ink-soft); margin-bottom: 20px; }
.facts { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 8px; color: var(--ink-soft); }
.facts li { position: relative; padding-left: 16px; }
.facts li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }
.save-contact { margin-top: 14px; font-size: 15px; color: var(--muted); }
.save-contact a { font-weight: 600; }

/* Мобильная визитка для QR-кода */
.vcard-page {
  min-height: 100vh; background: var(--navy-deep); color: var(--ink);
  padding: max(28px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}
.vcard-shell {
  width: min(100%, 440px); margin: 0 auto; padding: 28px 20px 22px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 22px;
  background: var(--paper); box-shadow: 0 24px 70px rgba(0, 0, 0, .25); text-align: center;
}
.vcard-photo {
  width: 148px; height: 148px; margin: 0 auto 20px; overflow: hidden;
  border: 3px solid var(--brass); border-radius: 50%; background: #555;
}
.vcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.vcard-shell .eyebrow { margin-bottom: 8px; }
.vcard-shell h1 { margin-bottom: 6px; font-size: clamp(29px, 9vw, 38px); }
.vcard-role { margin-bottom: 22px; color: var(--ink-soft); font-size: 16px; }
.vcard-actions { display: grid; gap: 10px; }
.vcard-actions .btn { width: 100%; min-height: 54px; }
.vcard-actions .btn--contact { background: var(--brass-soft); color: var(--navy); border-color: var(--brass); }
.vcard-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }

@media (max-width: 380px) {
  .vcard-page { padding-left: 10px; padding-right: 10px; }
  .vcard-shell { padding: 24px 14px 18px; }
  .vcard-photo { width: 128px; height: 128px; }
}

/* Посадочная: первый экран */
.hero { background: var(--navy); color: #fff; padding: 56px 0 64px; }
.hero h1 { color: #fff; max-width: 720px; }
.hero .lead { color: rgba(255, 255, 255, .82); }
.h1-note { display: block; margin-top: 8px; font: 500 18px/1.3 var(--sans); color: #d9bb8a; letter-spacing: .02em; }
.hero .eyebrow { color: #d9bb8a; }
.hero__grid { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: end; }
.hero__person { text-align: center; color: rgba(255, 255, 255, .8); font-size: 14px; }
.hero__person .photo { margin-bottom: 12px; }
.hero__person b { display: block; color: #fff; font-family: var(--serif); font-size: 17px; }
.hero .btn--primary { background: #fff; color: var(--navy); }
.hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero__note { margin-top: 18px; font-size: 14px; color: rgba(255, 255, 255, .7); }

/* Блок «что делать сейчас» */
.steps { counter-reset: s; display: grid; gap: 14px; margin-top: 28px; }
.step {
  counter-increment: s; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px 20px 72px;
}
.step::before {
  content: counter(s); position: absolute; left: 22px; top: 20px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brass-soft); color: var(--brass);
  font: 700 16px/32px var(--serif); text-align: center;
}
.step h3 { margin-bottom: 4px; font-size: 18px; }
.step p { margin: 0; color: var(--ink-soft); }
.law { font-size: 13px; color: var(--muted); margin-top: 6px !important; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.tile { background: var(--paper); border-radius: 12px; padding: 22px; }
.tile h3 { font-size: 18px; margin-bottom: 6px; }
.tile p { margin: 0; color: var(--ink-soft); font-size: 16px; }

.process { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.process li { border-top: 3px solid var(--brass); padding-top: 14px; }
.process b { display: block; font-family: var(--serif); font-size: 18px; margin-bottom: 4px; }
.process span { color: var(--ink-soft); font-size: 15px; }

.price { margin-top: 28px; padding: 22px 24px; border-radius: 12px; background: var(--brass-soft); }
.price p { margin: 0; }

.about { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: start; }

/* FAQ */
.faq { margin-top: 24px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-family: var(--serif); font-size: 19px; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 26px/1 var(--sans); color: var(--brass); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-soft); padding-bottom: 8px; }

.contact__list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; color: var(--ink-soft); }

/* Контекстные ссылки между направлениями практики */
.related-services { padding-top: 46px; padding-bottom: 46px; border-top: 1px solid var(--line); }
.related-services__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.related-services__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--navy); font-weight: 600; text-decoration: none;
}
.related-services__links a:hover { border-color: var(--brass); color: var(--brass); }

/* Карта: статичная картинка, по клику открываются Яндекс Карты */
.map {
  position: relative; display: block; margin-top: 24px; height: 380px;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
}
.map img { width: 100%; height: 100%; object-fit: cover; }
.map__open {
  position: absolute; right: 14px; bottom: 14px; padding: 10px 16px; border-radius: 9px;
  background: var(--card); color: var(--navy); font-weight: 600; font-size: 15px;
  box-shadow: 0 4px 14px rgba(20, 30, 50, .18);
}
.map:hover .map__open { background: var(--navy); color: #fff; }
.map__credit { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.map__credit a { color: inherit; }

/* Подвал */
.footer { background: var(--navy-deep); color: rgba(255, 255, 255, .7); font-size: 14px; padding: 32px 0 40px; }
.footer a { color: rgba(255, 255, 255, .9); }
.footer p { margin: 0 0 6px; }

/* Нижняя панель на мобильном */
.mbar { display: none; }

/* Cookie */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 560px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20, 30, 50, .18); padding: 16px 18px; font-size: 14px;
  display: none;
}
.cookie.is-shown { display: block; }
.cookie p { margin: 0 0 12px; color: var(--ink-soft); }
.cookie .btns .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }

@media (max-width: 860px) {
  .card-hero__grid, .hero__grid, .about { grid-template-columns: 1fr; gap: 28px; }
  .card-hero__grid .photo { max-width: 240px; }
  .hero__person { display: flex; align-items: center; gap: 14px; text-align: left; order: -1; }
  .hero__person .photo { width: 64px; margin: 0; border-radius: 50%; }
  .about .photo { max-width: 180px; }
  .process { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 48px 0; }
  .hero { padding: 36px 0 44px; }
  .btns .btn { flex: 1 1 100%; }
  .process { grid-template-columns: 1fr; }
  .map { height: 280px; }
  .step { padding-left: 64px; }
  .step::before { left: 18px; }
  .brand img { width: 36px; height: 36px; }
  .topbar__phone { font-size: 15px; }
  .topbar__right { gap: 6px; }
}

@media (max-width: 420px) {
  /* На узком экране номер остаётся в кнопках «Позвонить» */
  .topbar__phone { display: none; }
  /* На посадочных — закреплённые кнопки связи */
  .has-mbar { padding-bottom: 72px; }
  .has-mbar .mbar {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
  }
  .has-mbar .mbar .btn { min-height: 46px; padding: 0 8px; font-size: 14px; }
  .has-mbar .cookie { bottom: 84px; }
}

/* Юридические страницы: политика, условия */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 24px; }
.legal h2 { font-size: 21px; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 20px; margin: 0 0 1em; }
.legal__date { color: var(--muted); font-size: 15px; margin-top: -12px; }
.legal__note { color: #17603a !important; font-size: 15px; }

/* Главная: обо мне и схема стадий дела */
.about-me > p, .about-me .ethics-note { max-width: 760px; }
.about-me p { font-size: 18px; color: var(--ink-soft); }

.practice-section { background: var(--paper); }
.practice-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px;
}
.practice-grid a {
  display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  color: var(--ink); text-decoration: none; transition: transform .12s, border-color .12s, box-shadow .12s;
}
.practice-grid a:hover { transform: translateY(-2px); border-color: var(--brass); box-shadow: 0 8px 22px rgba(20, 30, 50, .08); }
.practice-grid b { font: 700 19px/1.25 var(--serif); color: var(--navy); }
.practice-grid span { color: var(--ink-soft); font-size: 15px; }

.stages {
  counter-reset: st; list-style: none; padding: 0; margin: 32px 0 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
}
.stages li { counter-increment: st; position: relative; padding-top: 52px; }
.stages li::before {
  content: counter(st); position: absolute; top: 0; left: 0; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff; font: 700 16px/36px var(--serif); text-align: center;
}
.stages li::after {
  content: ""; position: absolute; top: 17px; left: 36px; right: 0; height: 2px; background: var(--brass);
}
.stages li:last-child::after { display: none; }
.stages a, .stages div { display: block; padding-right: 16px; color: var(--ink); text-decoration: none; }
.stages b { display: block; font-family: var(--serif); font-size: 18px; margin-bottom: 4px; }
.stages span { display: block; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.stages a b { color: var(--navy); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 4px; }
.stages a:hover b { color: var(--brass); }

@media (max-width: 860px) {
  .practice-grid { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr; gap: 20px; }
  .stages li { padding: 4px 0 0 56px; min-height: 36px; }
  .stages li::after { top: 36px; left: 17px; right: auto; bottom: -20px; width: 2px; height: auto; }
}

@media (max-width: 600px) {
  .breadcrumbs { padding-top: 12px; padding-bottom: 12px; }
  .cookie { left: 10px; right: 10px; bottom: 10px; padding: 12px 14px; font-size: 13px; }
  .cookie p { margin-bottom: 8px; line-height: 1.4; }
  .cookie .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cookie .btns .btn { min-height: 38px; padding: 0 8px; font-size: 12px; }
}

@media (max-width: 420px) {
  .has-mbar .cookie { bottom: 76px; }
}
.about-me__sub { margin: 36px 0 0; font-size: 22px; }
.about-me .grid-2 { margin-top: 16px; }
.ethics-note {
  margin: 28px 0 0; padding: 18px 22px; border-left: 3px solid var(--brass);
  background: var(--brass-soft); border-radius: 0 10px 10px 0;
  font-size: 16px !important; color: var(--ink-soft);
}
