/* ===== Цвета и шрифты — меняются здесь ===== */
:root {
  --navy: #1f2a44;
  --navy-dark: #151d31;
  --accent: #b08d57;        /* декоративный (линии, на тёмном фоне) */
  --accent-dark: #85652f;   /* кнопки и текст на белом — с достаточным контрастом */
  --text: #2b2f36;
  --muted: #5a6170;
  --bg: #ffffff;
  --bg-alt: #f5f4f0;
  --border: #e3e1da;
  --error: #b42318;
  --ok: #1e6b3a;
  --radius: 6px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--bg); }

a { color: var(--navy); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); color: #fff; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 10px; top: 10px; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 12px 22px;
  background: var(--accent-dark); color: #fff; font: inherit; font-weight: 600;
  text-decoration: none; border: 2px solid var(--accent-dark); border-radius: var(--radius);
  cursor: pointer; transition: background .15s, color .15s;
}
.btn:hover { background: #6e5226; border-color: #6e5226; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-outline { background: transparent; border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-small { padding: 8px 14px; font-size: .95rem; white-space: nowrap; }
.text-link { font-weight: 600; color: var(--accent-dark); }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--navy); text-decoration: none; line-height: 1.1; }
.logo span { display: block; font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--text); font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--accent-dark); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--navy); }

/* ---- Hero / page header ---- */
.hero { background: var(--navy); color: #dfe3ec; padding: 88px 0 96px; }
.hero h1 { max-width: 760px; }
.page-header { background: var(--navy); color: #dfe3ec; padding: 56px 0 52px; }
.page-header h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: .3em; }
.page-header .lead { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--accent); font-weight: 600; }
.lead { font-size: 1.15rem; max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---- Sections ---- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--muted); max-width: 640px; margin-bottom: 36px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 24px; }
.card p { color: var(--muted); margin: 0; }
.card-link { text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.card-link:hover { box-shadow: 0 6px 18px rgba(31,42,68,.1); transform: translateY(-2px); }

.about { display: grid; grid-template-columns: 3fr 2fr; gap: 48px; align-items: start; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.facts li:first-child { border-top: 1px solid var(--border); }
.facts strong { color: var(--navy); }

.cta { border-top: 1px solid var(--border); }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-row .hero-actions { margin: 0; }
.cta-row p { margin: 0; color: var(--muted); }

.practice { padding: 28px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 90px; }
.practice:first-child { padding-top: 0; }
.practice h2 { font-size: 1.5rem; }
.practice p { margin: 0; }
.note { margin-top: 32px; background: var(--bg-alt); padding: 20px 24px; border-radius: var(--radius); }
.note p { margin: 0; }

/* ---- Photos (появляются, только если файл есть в public/images) ---- */
.hero, .page-header { position: relative; overflow: hidden; }
.bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero.has-img::before, .page-header.has-img::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(21,29,49,.92) 0%, rgba(21,29,49,.78) 45%, rgba(21,29,49,.45) 100%);
}
.hero.has-img > .container, .page-header.has-img > .container { position: relative; z-index: 2; }
.hero.has-img { padding: 120px 0 128px; }

.card.has-img { padding: 0 0 24px; overflow: hidden; border-top: 0; }
.card-img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 20px; border-bottom: 3px solid var(--accent); }
.card.has-img h3, .card.has-img p { padding: 0 24px; }

.side-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; }

.practice.has-img { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.practice.has-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

/* ---- Legal text ---- */
.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }

/* ---- Contact ---- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
.contact-info { display: grid; gap: 28px; }
.contact-item { border-left: 3px solid var(--accent); padding-left: 16px; }
.contact-item h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; font-family: var(--sans); color: var(--muted); margin-bottom: .3em; }
.contact-item a, .contact-item address { font-style: normal; font-weight: 600; word-break: break-word; }
.contact-item p { margin: 0; }

.form-wrap { background: var(--bg-alt); border-radius: var(--radius); padding: 32px; scroll-margin-top: 90px; }
.notice { background: #fff; border-left: 3px solid var(--accent); padding: 14px 16px; font-size: .92rem; margin-bottom: 20px; }
.form-status:empty { display: none; }
.form-status { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-weight: 600; }
.form-status.is-error { background: #fdecea; color: var(--error); }
.form-status.is-ok { background: #e7f4ec; color: var(--ok); }

.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid #c9c6bc; border-radius: var(--radius); padding: 10px 12px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(176,141,87,.45); border-color: var(--accent-dark); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; }
.checkbox input { width: 18px; height: 18px; margin-top: 4px; flex: none; }
.checkbox label { font-weight: 400; font-size: .92rem; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Footer ---- */
.site-footer { background: var(--navy-dark); color: #b9c0cf; padding: 48px 0 32px; font-size: .92rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.footer-name { font-family: var(--serif); font-size: 1.2rem; color: #fff; font-weight: 700; }
.footer-head { color: #fff; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer li a { color: #b9c0cf; text-decoration: none; }
.site-footer li a:hover { color: #fff; text-decoration: underline; }
.disclaimer { font-size: .82rem; color: #9aa2b3; max-width: 820px; border-top: 1px solid #2a3450; padding-top: 20px; }
.disclaimer strong { color: #fff; }
.copy { margin: 0; font-size: .82rem; color: #9aa2b3; }

/* ---- Mobile ---- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .about, .contact-layout { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .header-row { flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding-top: 10px; }
  .nav { order: 3; width: 100%; margin: 0; gap: 18px; overflow-x: auto; padding-bottom: 6px; font-size: .95rem; white-space: nowrap; }
  .grid, .field-row, .footer-grid { grid-template-columns: 1fr; }
  .practice.has-img { grid-template-columns: 1fr; gap: 16px; }
  .hero.has-img { padding: 72px 0 80px; }
  .hero.has-img::before, .page-header.has-img::before { background: rgba(21,29,49,.82); }
  .hero { padding: 56px 0 64px; }
  .page-header { padding: 40px 0; }
  .section { padding: 52px 0; }
  .form-wrap { padding: 22px 18px; }
}
