/* ============================================================
   Адвокат Маркович — markovich-pravo.ru
   Стили сайта-визитки. Всё в одном файле, без внешних зависимостей.
   ============================================================ */

:root {
  /* Палитра */
  --ink:        #16202f;   /* основной тёмный */
  --ink-soft:   #3d4a5c;   /* текст пониженной контрастности */
  --muted:      #6b7787;   /* подписи */
  --line:       #dfe3e8;   /* границы */
  --paper:      #ffffff;   /* фон карточек */
  --bg:         #f6f5f2;   /* фон страницы (тёплая бумага) */
  --bg-alt:     #eeece7;   /* фон чередующихся секций */
  --accent:     #8a6d3b;   /* бронза — акцент */
  --accent-dk:  #6d552c;
  --navy:       #12233c;   /* глубокий синий для тёмных блоков */

  /* Типографика */
  --font-serif: Georgia, "Times New Roman", "PT Serif", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Размеры */
  --container: 1140px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(18, 35, 60, .06), 0 8px 24px rgba(18, 35, 60, .07);
  --shadow-lg: 0 2px 4px rgba(18, 35, 60, .08), 0 18px 40px rgba(18, 35, 60, .12);
  --header-h: 72px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-dk); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 820px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: #1b3155; color: #fff; box-shadow: var(--shadow-lg); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dk); background: rgba(138,109,59,.06); }

.btn-sm { padding: 11px 20px; font-size: 16.5px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 245, 242, .92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header-h);
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.brand:hover { color: var(--ink); }
/* Знак адвокатского образования в шапке. Полный логотип с надписью
   здесь не нужен: рядом и так стоит название филиала текстом. */
.brand-emblem { flex: none; width: auto; height: 62px; }
.brand-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
/* Первая строка — должность и адвокатское образование, вторая — имя.
   Имя оставлено крупным: это то, что человек ищет глазами. */
.brand-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.3;
}
.brand-name { font-family: var(--font-serif); font-size: 22px; font-weight: 700; white-space: nowrap; }

@media (max-width: 520px) {
  .brand-name { font-size: 18px; white-space: normal; }
  .brand-role { font-size: 11.5px; font-weight: 600; }
  .brand-emblem { height: 52px; }
}

.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a {
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  padding: 4px 0;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
}
.site-nav .nav-cta { color: #fff; }
.site-nav .nav-cta:hover { color: #fff; }
.site-nav .nav-cta::after { display: none; }

/* Кнопка меню: без рамки, одни полоски. Область нажатия 48x48 —
   это минимум, при котором в неё уверенно попадают пальцем. */
.nav-toggle {
  display: none;
  width: 56px; height: 56px;
  flex: none;
  background: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:hover { background: rgba(18, 35, 60, .06); }
.nav-toggle span {
  display: block;
  width: 30px; height: 3px;
  margin: 7px auto;
  border-radius: 2px;
  background: var(--navy);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ---------- Первый экран ---------- */
.hero {
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(138,109,59,.10), transparent 60%),
    linear-gradient(180deg, #fbfaf8 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 80px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-dk);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(32px, 4.2vw, 46px); margin-bottom: 20px; }
.lead { font-size: 19px; color: var(--ink-soft); max-width: 40em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 36px; }

.hero-facts {
  list-style: none;
  margin: 0; padding: 24px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--font-serif); font-size: 26px; }
.hero-facts span { font-size: 14px; color: var(--muted); }

.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-photo {
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, #e7e4de, #d8d4cc);
  display: grid;
  place-items: center;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  color: #8d8a83;
  text-align: center;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.photo-placeholder small { font-size: 11px; text-transform: none; letter-spacing: 0; }
.hero-card-body { padding: 20px 22px 24px; }
.hero-card-name { font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.hero-card-role { font-size: 14px; color: var(--muted); margin: 0 0 14px; }

.link-arrow { font-weight: 600; font-size: 15px; }
.link-arrow::after { content: " →"; }

/* ---------- Секции ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }

.section-eyebrow {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-dk);
  font-weight: 600;
  margin-bottom: 10px;
}
.section-title { font-size: clamp(27px, 3.4vw, 38px); margin-bottom: 12px; }
.section-lead { color: var(--ink-soft); max-width: 60ch; margin-bottom: 40px; }

/* ---------- Направления работы ---------- */
.practice-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 900px) {
  .practice-groups { grid-template-columns: repeat(2, 1fr); }
}

.practice {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.practice:hover { box-shadow: var(--shadow-lg); border-color: #cdd2d9; }

.practice-num {
  font-size: 13px;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--accent-dk);
  margin: 0 0 10px;
}
.practice h3 { font-size: 23px; margin: 0 0 6px; }
.practice-sub {
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.practice-list {
  list-style: none;
  counter-reset: item;
  margin: 0;
  padding: 0;
}
.practice-list > li {
  position: relative;
  padding: 0 0 15px 36px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
}
.practice-list > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.practice-list > li::before {
  counter-increment: item;
  content: counter(item);
  position: absolute;
  left: 0; top: 2px;
  width: 25px; height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(138, 109, 59, .12);
  color: var(--accent-dk);
  font-size: 13px;
  font-weight: 700;
}

.practice-sublist {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.practice-sublist li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 5px;
  font-size: 15px;
  color: var(--ink-soft);
}
.practice-sublist li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.practice-note { color: var(--muted); }

/* ---------- Внутренняя страница направления ---------- */
.breadcrumbs {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-dk); }
.breadcrumbs span { margin: 0 8px; opacity: .6; }

.article h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  margin: 44px 0 14px;
}
.article h3 { font-size: 20px; margin: 28px 0 10px; }
.article p { color: var(--ink-soft); }
.article > p:first-of-type { font-size: 19px; }

.article ul:not(.check-list):not(.practice-sublist) {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}
.article ul:not(.check-list):not(.practice-sublist) li {
  position: relative;
  padding: 0 0 10px 22px;
  color: var(--ink-soft);
}
.article ul:not(.check-list):not(.practice-sublist) li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Выделенный блок с важным замечанием (например, о сроках) */
.callout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 28px 0;
}
.callout p { margin: 0; }
.callout strong { color: var(--ink); }

/* ---------- Словарик «как говорят / как называется» ---------- */
.glossary {
  margin: 24px 0 12px;
  border-top: 1px solid var(--line);
}
.glossary-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 700px) {
  .glossary-row {
    grid-template-columns: 250px 1fr;
    gap: 28px;
    align-items: baseline;
  }
}
.glossary dt {
  font-weight: 600;
  color: var(--ink);
}
.glossary dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---------- Об адвокате ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-grid p { color: var(--ink-soft); }

.credentials {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.credentials li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  color: var(--ink-soft);
}
.credentials strong { color: var(--ink); }

.about-note {
  background: var(--navy);
  color: #e9edf3;
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-lg);
}
.about-note h3 { color: #fff; font-size: 20px; }
.check-list { list-style: none; margin: 0 0 18px; padding: 0; }
.check-list li {
  position: relative;
  padding: 8px 0 8px 28px;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 8px;
  color: #cba86a;
  font-weight: 700;
}
.note-small { font-size: 14px; color: #a9b6c8; margin: 0; }

/* ---------- Адвокатское образование ---------- */
.bar-section { background: var(--bg-alt); }

.bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
@media (min-width: 900px) {
  .bar { grid-template-columns: 300px 1fr; gap: 56px; }
}

.bar-logo {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: grid;
  place-items: center;
}
.bar-logo img { width: 100%; height: auto; }

.bar-title {
  font-size: clamp(21px, 2.4vw, 27px);
  margin: 0 0 14px;
}
.bar-text { color: var(--ink-soft); max-width: 62ch; }

.bar-req {
  margin: 24px 0 18px;
  border-top: 1px solid var(--line);
}
.bar-req > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 620px) {
  .bar-req > div { grid-template-columns: 210px 1fr; gap: 24px; align-items: baseline; }
}
.bar-req dt { font-size: 14px; color: var(--muted); }
.bar-req dd { margin: 0; color: var(--ink-soft); }

/* эмблема в подвале */
.footer-emblem {
  width: 210px;
  height: auto;
  opacity: .85;
  margin-bottom: 16px;
}

/* ---------- Порядок работы ---------- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  counter-reset: step;
}
.steps li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  position: relative;
}
.step-num {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 17px;
  margin-bottom: 14px;
}
.steps h3 { font-size: 19px; margin-bottom: 6px; }
.steps p { color: var(--ink-soft); font-size: 16px; margin: 0; }

/* ---------- Вопросы ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 44px 20px 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-family: var(--font-sans);
  color: var(--accent-dk);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent-dk); }
.faq-body { padding: 0 40px 20px 0; }
.faq-body p { color: var(--ink-soft); margin: 0; }

/* ---------- Контакты ---------- */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  color: var(--ink);
}
.contact-card-static { background: transparent; border-style: dashed; }
.contact-label {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-value { font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
.contact-note { font-size: 14px; color: var(--muted); }

.cta-band {
  margin-top: 40px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-lg);
}
.cta-band p { margin: 0; font-family: var(--font-serif); font-size: 21px; max-width: 34em; }
.cta-band .btn-primary { background: #cba86a; color: var(--navy); }
.cta-band .btn-primary:hover { background: #d9bb84; color: var(--navy); }

/* ---------- Подвал ---------- */
.site-footer {
  background: #101a29;
  color: #9fb0c4;
  padding: 56px 0 24px;
  font-size: 15px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  padding-bottom: 28px;
}
.footer-name { font-family: var(--font-serif); font-size: 19px; color: #fff; margin-bottom: 10px; }
.footer-small { font-size: 13.5px; line-height: 1.6; color: #8496ab; margin-bottom: 10px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #c6d2e0; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.10);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: #7c8da2;
}
.to-top-link { color: #c6d2e0; }
.to-top-link:hover { color: #fff; }

/* ---------- Кнопка «наверх» ---------- */
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 19px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 90;
}
.to-top:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Появление секций при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { max-width: 380px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* Меню крупное, поэтому в строку оно помещается только на широком экране.
   Ниже 1000 px переключаемся на «бургер» — раньше, чем остальная вёрстка. */
@media (max-width: 1000px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
  .site-nav a.is-active::after { display: none; }
  .site-nav .nav-cta { margin-top: 14px; border-bottom: none; text-align: center; }
}

@media (max-width: 780px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }
  .hero { padding: 52px 0 60px; }

  .hero-facts { gap: 22px; }
  .cta-band { padding: 26px 22px; }
  .cta-band p { font-size: 18px; }
  .footer-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Печать ---------- */
@media print {
  .site-header, .to-top, .hero-actions, .cta-band, .nav-toggle { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .section { padding: 18pt 0; }
}
