/* ========= Базовые переменные и сброс ========= */
:root {
  --navy: #0e2240;
  --navy-2: #13294b;
  --navy-dark: #0a1a32;
  --gold: #c2a25a;
  --gold-dark: #a8863f;
  --bg: #f6f7f9;
  --bg-2: #eef1f5;
  --text: #1c2430;
  --muted: #5b6573;
  --line: #e2e6ec;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 34, 64, 0.08);
  --shadow-lg: 0 20px 50px rgba(14, 34, 64, 0.14);
  --maxw: 1180px;
  --font-head: "Playfair Display", "Times New Roman", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; color: var(--navy); font-weight: 700; overflow-wrap: break-word; text-wrap: balance; }
p, li, td, th { overflow-wrap: break-word; }

a { color: var(--gold-dark); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--navy); }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--white); }
.section--navy { background: var(--navy); color: #dfe6f0; }
.section--navy h2, .section--navy h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 14px;
}
.section--navy .eyebrow { color: var(--gold); }

.section-title { font-size: clamp(28px, 4vw, 42px); margin-bottom: 18px; }
.section-lead { font-size: 18px; color: var(--muted); max-width: 720px; }
.section--navy .section-lead { color: #b9c4d6; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ========= Кнопки ========= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 10px; font-weight: 600;
  font-size: 16px; cursor: pointer; border: 2px solid transparent;
  transition: all .22s ease; text-align: center; line-height: 1;
}
.btn--gold { background: var(--gold); color: var(--navy-dark); }
.btn--gold:hover { background: var(--gold-dark); color: #fff; transform: translateY(-2px); }
.btn--outline { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn--outline:hover { background: var(--gold); color: var(--navy-dark); }
.btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--block { width: 100%; justify-content: center; }

/* ========= Шапка ========= */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__bar { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand__mark {
  width: 46px; height: 46px; border-radius: 9px;
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  color: var(--gold); display: grid; place-items: center;
  font-family: var(--font-head); font-size: 22px; font-weight: 700;
  border: 1px solid rgba(194,162,90,.4);
}
.brand__name { font-family: var(--font-head); font-size: 19px; color: var(--navy); line-height: 1.1; font-weight: 700; }
.brand__sub { font-size: 12px; color: var(--muted); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 22px; }
.nav__links { display: flex; gap: 17px; list-style: none; }
.nav__links a { color: var(--navy); font-weight: 500; font-size: 15px; position: relative; white-space: nowrap; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--gold); transition: width .25s ease;
}
.nav__links a:hover::after, .nav__links a.is-active::after { width: 100%; }
.nav__links a.is-active { color: var(--gold-dark); }

.header__phone { font-family: var(--font-head); font-size: 18px; color: var(--navy); font-weight: 700; white-space: nowrap; }
.header__phone small { display: block; font-family: var(--font-body); font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .05em; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { width: 26px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: .25s; }
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ========= Hero ========= */
.hero {
  position: relative; color: #eaf0f8;
  background:
    linear-gradient(120deg, rgba(10,26,50,.96) 0%, rgba(14,34,64,.9) 50%, rgba(19,41,75,.82) 100%),
    radial-gradient(1200px 500px at 80% -10%, rgba(194,162,90,.18), transparent 60%),
    var(--navy);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 46px 46px; pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; padding: 92px 0; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px;
  border: 1px solid rgba(194,162,90,.45); border-radius: 999px;
  color: var(--gold); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 22px;
}
.hero h1 { color: #fff; font-size: clamp(34px, 5vw, 56px); margin-bottom: 22px; }
.hero h1 .accent { color: var(--gold); }
.hero__lead { font-size: 19px; color: #c4d0e2; margin-bottom: 32px; max-width: 560px; }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 38px; }
.hero__stats { display: flex; gap: 38px; flex-wrap: wrap; }
.hero__stat .num { font-family: var(--font-head); font-size: 34px; color: var(--gold); font-weight: 700; }
.hero__stat .lbl { font-size: 13.5px; color: #aab8cd; }

.hero__card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 30px; backdrop-filter: blur(6px); box-shadow: var(--shadow-lg);
}
.hero__card h3 { color: #fff; font-size: 22px; margin-bottom: 6px; }
.hero__card p { color: #b9c4d6; font-size: 14.5px; margin-bottom: 20px; }

/* ========= Формы ========= */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; margin-bottom: 6px; color: inherit; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.95);
  font-family: var(--font-body); font-size: 15.5px; color: var(--text);
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.form-note { font-size: 12.5px; color: #93a1b8; margin-top: 12px; }
.form-light .field input, .form-light .field textarea, .form-light .field select { border-color: var(--line); background: #fff; }

/* Место для виджета «вы не робот» (Cloudflare Turnstile) — вставляется скриптом */
.turnstile-slot { margin: 4px 0 16px; }

.form-status { margin-top: 14px; padding: 12px 16px; border-radius: 10px; font-size: 14.5px; display: none; }
.form-status.is-ok { display: block; background: rgba(54,160,90,.14); color: #1d6b3c; border: 1px solid rgba(54,160,90,.35); }
.form-status.is-err { display: block; background: rgba(200,60,60,.12); color: #9a2727; border: 1px solid rgba(200,60,60,.3); }

/* ========= Сетки и карточки ========= */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__icon {
  width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--navy), var(--navy-2)); color: var(--gold);
  font-size: 24px; margin-bottom: 18px;
}
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }
.card__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600; font-size: 14.5px; }

/* направления — кликабельные */
.practice-card { display: flex; flex-direction: column; }
.practice-card ul { list-style: none; margin: 14px 0 0; }
.practice-card ul li { padding: 6px 0 6px 22px; position: relative; color: var(--muted); font-size: 14.5px; border-top: 1px solid var(--line); }
.practice-card ul li::before { content: "§"; position: absolute; left: 0; color: var(--gold-dark); font-weight: 700; }

/* преимущества */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature__num { font-family: var(--font-head); font-size: 26px; color: var(--gold); font-weight: 700; flex: none; width: 44px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14.5px; }

/* ========= О адвокате (блок) ========= */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.about__photo {
  border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, var(--navy), var(--navy-2));
  aspect-ratio: 4/5; display: grid; place-items: center; box-shadow: var(--shadow-lg); position: relative;
}
.about__photo .ph { text-align: center; color: #9fb0c9; padding: 20px; }
.about__photo .ph .initials { font-family: var(--font-head); font-size: 78px; color: var(--gold); font-weight: 700; }
.about__photo .ph small { font-size: 13px; letter-spacing: .05em; }
.about__photo::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(194,162,90,.35); border-radius: 12px; }
ul.creds { list-style: none; margin-top: 18px; }
ul.creds li { padding: 8px 0 8px 30px; position: relative; color: var(--text); }
ul.creds li::before { content: "✓"; position: absolute; left: 0; color: var(--gold-dark); font-weight: 700; }

/* ========= Документы / ходатайства ========= */
.doc-list { display: grid; gap: 16px; }
.doc-item {
  display: flex; align-items: center; gap: 18px; background: var(--white);
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.doc-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.doc-item__ic {
  flex: none; width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
  background: var(--bg-2); color: var(--navy); font-size: 20px; font-weight: 700; font-family: var(--font-head);
  border: 1px solid var(--line);
}
.doc-item__body { flex: 1; min-width: 0; }
.doc-item__body h3 { font-size: 17px; margin-bottom: 3px; }
.doc-item__body p { color: var(--muted); font-size: 13.5px; }
.doc-item__tag { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-dark); font-weight: 600; }
.doc-cats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.doc-cat { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; color: var(--navy); font-weight: 500; transition: .2s; }
.doc-cat:hover, .doc-cat.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ========= Призыв к действию ========= */
.cta-band {
  background: linear-gradient(120deg, var(--navy), var(--navy-2));
  border-radius: 20px; padding: 52px; color: #fff; text-align: center;
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.cta-band::before { content: "§"; position: absolute; font-family: var(--font-head); font-size: 320px; color: rgba(194,162,90,.07); right: -20px; top: -90px; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 14px; position: relative; }
.cta-band p { color: #c4d0e2; max-width: 600px; margin: 0 auto 26px; position: relative; }
.cta-band .btn { position: relative; }

/* ========= Подвал ========= */
.footer { background: var(--navy-dark); color: #aab8cd; padding: 60px 0 26px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 38px; }
.footer h4 { color: #fff; font-family: var(--font-body); font-size: 15px; letter-spacing: .04em; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 9px; }
.footer a { color: #aab8cd; font-size: 14.5px; }
.footer a:hover { color: var(--gold); }
.footer__brand .brand__name { color: #fff; }
.footer__brand p { font-size: 14px; margin-top: 14px; color: #8294ad; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #7286a0; }

/* ========= Хлебная крошка / шапка страниц ========= */
.page-head { background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 400px at 85% 0, rgba(194,162,90,.16), transparent 60%); }
.page-head h1 { color: #fff; font-size: clamp(30px, 4.4vw, 46px); position: relative; }
.page-head p { color: #c4d0e2; margin-top: 12px; max-width: 680px; position: relative; }
.crumbs { font-size: 13.5px; color: #9fb0c9; margin-bottom: 14px; position: relative; }
.crumbs a { color: var(--gold); }

/* ========= Аккордеон вопросов ========= */
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.faq-q { padding: 18px 22px; cursor: pointer; font-weight: 600; color: var(--navy); display: flex; justify-content: space-between; gap: 14px; align-items: center; font-size: 16.5px; }
.faq-q .pm { color: var(--gold-dark); font-size: 22px; transition: transform .2s; flex: none; }
.faq-item.is-open .pm { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 22px 18px; color: var(--muted); font-size: 15px; }

/* ========= Прочее ========= */
.lead-block { max-width: 820px; }
.prose p { margin-bottom: 16px; color: #38424f; }
.prose h2 { margin: 34px 0 14px; font-size: 28px; }
.prose h3 { margin: 26px 0 10px; font-size: 21px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: #38424f; }
.prose ul li, .prose ol li { margin-bottom: 8px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 40px 0; }

/* ========= Прайс / таблицы цен ========= */
.price-block { margin-bottom: 34px; }
.price-block__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.price-block__ic {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, var(--navy), var(--navy-2)); color: var(--gold); font-size: 22px;
}
.price-block__head h3 { font-size: 23px; }
.price-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.price-table th { text-align: left; background: var(--bg-2); color: var(--navy); font-family: var(--font-body); font-weight: 600; font-size: 14px; padding: 14px 22px; }
.price-table td { padding: 15px 22px; border-top: 1px solid var(--line); font-size: 15.5px; vertical-align: top; }
.price-table td.price { text-align: right; white-space: nowrap; font-weight: 600; color: var(--navy); font-family: var(--font-head); font-size: 17px; }
.price-table tr:hover td { background: #fafbfc; }
.price-note {
  background: #fff7e6; border: 1px solid #f0d99a; border-radius: 12px;
  padding: 18px 22px; font-size: 14.5px; color: #6b5414; margin-bottom: 30px;
}
.price-note strong { color: #5a4410; }
@media (max-width: 600px) {
  .price-table th:nth-child(1), .price-table td:nth-child(1) { padding-right: 10px; }
  .price-table th, .price-table td { padding-left: 14px; padding-right: 14px; }
  .price-table td.price { font-size: 15.5px; }
}

/* ========= Адаптив ========= */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; padding: 64px 0; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 360px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ========= Калькуляторы ========= */
.calc-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.calc-tab {
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); color: var(--muted); cursor: pointer;
  transition: all .2s ease;
}
.calc-tab:hover { border-color: var(--gold); color: var(--navy); }
.calc-tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.calc-panel { display: none; }
.calc-panel.is-active { display: block; }
.calc-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 34px 34px 30px;
}
.calc-card h2 { font-size: 26px; margin-bottom: 10px; }
.calc-lead { color: var(--muted); font-size: 15.5px; margin-bottom: 22px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.calc-field { display: flex; flex-direction: column; gap: 6px; }
.calc-field--wide { grid-column: 1 / -1; }
.calc-field label { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.calc-field input, .calc-field select {
  font-family: var(--font-body); font-size: 16px; color: var(--text);
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); outline: none; transition: border-color .2s ease; width: 100%;
}
.calc-field input:focus, .calc-field select:focus { border-color: var(--gold); background: var(--white); }
.calc-check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--text); cursor: pointer; }
.calc-check input { width: 18px; height: 18px; accent-color: var(--gold-dark); }
.calc-btn { margin-top: 22px; border: 0; cursor: pointer; font-size: 16px; }
.calc-result { margin-top: 8px; }
.calc-result:not(:empty) { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.calc-result__sum { font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.calc-result__note { font-size: 14.5px; color: var(--muted); margin-bottom: 8px; }
.calc-result__extra { background: var(--bg-2); border-left: 3px solid var(--gold); border-radius: 8px; padding: 14px 16px; font-size: 14.5px; color: var(--text); margin: 12px 0; }
.calc-error { color: #a33a2e; font-size: 15px; }
.calc-table-wrap { overflow-x: auto; margin-top: 10px; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.calc-table th { text-align: left; background: var(--bg-2); color: var(--navy); font-weight: 600; padding: 9px 12px; white-space: nowrap; }
.calc-table td { padding: 9px 12px; border-top: 1px solid var(--line); }
.calc-table td.num { text-align: right; white-space: nowrap; font-weight: 600; color: var(--navy); }
.calc-row { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 12px; align-items: end; margin-bottom: 12px; }
.calc-row__del {
  height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  color: var(--muted); font-size: 20px; cursor: pointer; transition: all .2s ease;
}
.calc-row__del:hover { color: #a33a2e; border-color: #a33a2e; }
.calc-add {
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600; color: var(--gold-dark);
  background: none; border: 1px dashed var(--gold); border-radius: 10px; padding: 9px 18px; cursor: pointer;
  transition: all .2s ease;
}
.calc-add:hover { background: var(--bg-2); color: var(--navy); }
.calc-disclaimer {
  margin-top: 28px; background: var(--bg-2); border-left: 3px solid var(--gold);
  border-radius: 10px; padding: 18px 22px; font-size: 14.5px; color: var(--muted);
}

@media (max-width: 1240px) {
  .nav__links, .header__phone { display: none; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; position: absolute; top: 78px; left: 0; right: 0;
    background: #fff; padding: 18px 22px; gap: 4px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.is-open .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--line); white-space: normal; }
  .burger { display: flex; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-band { padding: 36px 24px; }
  .hero__stats { gap: 24px; }
}
