/* =========================================================
   Кирилл Чигирин, юрист. Айдентика 2026: бумага, синий и янтарь.
   Настройки: смелость 5/10, анимация 7/10, плотность 7/10.
   Одна сетка, один шрифт для текста, один для заголовков.
   ========================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/cormorant-garamond-var-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/cormorant-garamond-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-var-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f8fafc;
  --paper-2: #e9eef5;
  --ink: #0f172a;
  --ink-soft: #475569;
  --blue: #1e3a8a;
  --blue-deep: #172554;
  --blue-soft: #dbe4f3;
  --accent: #b45309;
  --accent-deep: #8a3f07;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;

  --step-sm: 0.875rem;
  --step-body: 1.0625rem;
  --step-lead: 1.375rem;
  --step-head: clamp(1.875rem, 1.2rem + 1.9vw, 2.5rem);
  --step-subhead: clamp(1.625rem, 1.45rem + .55vw, 1.75rem);
  --step-display: clamp(3rem, 1.9rem + 5.1vw, 5.75rem);

  --wrap: 1240px;
  --gap: 28px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  hanging-punctuation: first last;
  max-width: 1600px;
  margin-inline: auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-body);
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}
a:hover { color: var(--blue-deep); text-decoration-thickness: 2px; }

::selection { background: var(--blue); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.contact :focus-visible,
.price-panel :focus-visible {
  outline-color: var(--paper);
}

svg { display: block; }

.wrap {
  width: 100%;
  padding-inline: var(--gap);
  margin-inline: auto;
}

html.lenis { scroll-behavior: auto; scroll-padding-top: 0; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--blue);
  color: var(--paper);
  font-size: var(--step-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* ---------- Типографика ---------- */
h1, h2, h3, .footer-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
}

h1 {
  font-size: var(--step-display);
  line-height: .96;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h2 {
  font-size: var(--step-head);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
}

h3 { line-height: 1.15; text-wrap: balance; }

.lead {
  font-size: var(--step-lead);
  line-height: 1.42;
  color: var(--ink);
  max-width: 46ch;
}

p, li, dd { text-wrap: pretty; }

.about p, .faq-text p, .service p, .case p {
  hyphens: auto;
  hyphenate-limit-chars: 7 3 3;
}

.note {
  font-size: var(--step-sm);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
}

.nowrap { white-space: nowrap; }

.subhead {
  margin-top: clamp(36px, 5vw, 56px);
  font-family: var(--font-sans);
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- Кнопки и ссылки-действия ---------- */
.btn {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 24px;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: var(--step-body);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); color: #fff; }
.btn:active { transform: translateY(1px); }

.btn--paper { background: var(--paper); color: var(--blue); }
.btn--paper:hover { background: #fff; color: var(--blue-deep); }

.link-plain {
  font-size: var(--step-body);
  font-weight: 500;
  color: var(--ink);
  text-decoration-color: var(--blue);
  text-decoration-thickness: 2px;
}
.link-plain:hover { color: var(--blue); }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--blue);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.005em;
}
.brand__role {
  margin-top: 3px;
  font-size: var(--step-sm);
  color: var(--ink-soft);
}

.nav {
  display: flex;
  gap: 22px;
  margin-inline: auto;
}
.nav a {
  font-size: var(--step-sm);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.nav a[aria-current="true"] { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.header-phone {
  font-size: var(--step-sm);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { color: var(--blue); }
.header-actions .btn { min-height: 44px; padding: 11px 20px; font-size: var(--step-sm); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: var(--step-sm);
  font-weight: 500;
  cursor: pointer;
}
.menu-toggle__bars {
  position: relative;
  width: 22px;
  height: 2px;
  background: var(--blue);
  transition: background .2s;
}
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--blue);
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.menu-toggle__bars::before { top: -7px; }
.menu-toggle__bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- Первый экран: портрет только сверху ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: stretch;
  min-height: calc(100svh - var(--header-h));
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(32px, 6vh, 64px) var(--gap) clamp(40px, 7vh, 80px) 0;
}

.hero h1 { max-width: 12ch; }

.hero-role {
  margin-top: 18px;
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.3;
  max-width: 52ch;
}

.hero-lead {
  margin-top: 22px;
  max-width: 42ch;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 34px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: clamp(36px, 6vh, 68px);
}
.hero-facts strong {
  display: block;
  margin-bottom: 5px;
  font-size: var(--step-sm);
  font-weight: 600;
  color: var(--blue);
}
.hero-facts span {
  display: block;
  font-size: var(--step-sm);
  line-height: 1.5;
  color: var(--ink-soft);
}

.hero-portrait {
  align-self: stretch;
  padding: 24px 0 var(--gap);
}
.hero-portrait__frame {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: var(--paper-2);
}
.hero-portrait__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transform: translate3d(0, var(--px, 0px), 0) scale(1.06);
  will-change: transform;
}

/* ---------- О практике ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.about-copy h2 { margin-bottom: 22px; }
.about p {
  max-width: 46ch;
  margin-top: 14px;
  color: var(--ink-soft);
}
.about .lead { margin-top: 0; color: var(--ink); }
.about p b { color: var(--ink); }
.about .lead::first-letter {
  float: left;
  padding: .06em .12em 0 0;
  font-family: var(--font-serif);
  font-size: 3.9em;
  font-weight: 600;
  line-height: .72;
  color: var(--blue);
}
.about__note {
  padding: 18px 20px;
  background: var(--paper-2);
  color: var(--ink) !important;
}

.about-side .facts { margin-top: 0; }
.about-side .map-plate { margin-top: 32px; }

.facts {
  display: grid;
  gap: 18px;
  margin-top: 32px;
  max-width: 52ch;
}
.facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; }
.facts dt { font-size: var(--step-sm); font-weight: 600; color: var(--blue); }
.facts dd { font-size: var(--step-sm); line-height: 1.55; color: var(--ink-soft); }

.map-plate { margin-top: 36px; }
.map-plate img {
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.02);
}
.map-plate figcaption {
  display: flex;
  font-family: var(--font-serif);
  font-size: var(--step-body);
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 18px;
  margin-top: 12px;
  color: var(--ink-soft);
}

/* ---------- Порядок работы ---------- */
.process-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas:
    "head steps"
    "foot steps";
  gap: 20px clamp(40px, 6vw, 88px);
  align-items: start;
}
.process-head { grid-area: head; }
.process-head h2 { margin-bottom: 20px; }
.process-head .lead {
  max-width: 40ch;
  font-size: var(--step-body);
  line-height: 1.6;
  color: var(--ink-soft);
}
.process-foot {
  grid-area: foot;
  align-self: end;
  margin-top: 24px;
}

.steps {
  grid-area: steps;
  display: grid;
  gap: 24px;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding-left: 46px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step) ".";
  position: absolute;
  left: 0;
  top: -4px;
  font-family: var(--font-serif);
  font-size: var(--step-subhead);
  font-weight: 600;
  line-height: 1.1;
  color: var(--accent);
  font-variant-numeric: tabular-nums lining-nums;
}
.steps h3 { font-size: var(--step-lead); font-weight: 700; }
.steps p { margin-top: 6px; max-width: 44ch; font-size: var(--step-sm); color: var(--ink-soft); }

.process__out {
  padding: 18px 22px;
  background: var(--blue);
  color: var(--paper);
  font-size: var(--step-body);
  font-weight: 500;
}
.process .note { margin-top: 20px; }

/* ---------- Фотополоса ---------- */
.band { margin-top: clamp(56px, 8vw, 110px); }
.band__media {
  height: min(46vh, 480px);
  overflow: hidden;
  background: var(--paper-2);
}
.band__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  filter: grayscale(1) contrast(1.03);
  transform: translate3d(0, var(--px, 0px), 0) scale(1.08);
  will-change: transform;
}
.band figcaption {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: var(--step-body);
  color: var(--ink-soft);
}

/* ---------- Секции ---------- */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-head { max-width: 640px; }
.section-head h2 { margin-bottom: 20px; }
.section-head .note { margin-top: 22px; }

/* ---------- Услуги ---------- */
.services-grid { display: block; }
.services-grid .section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 52px); }
.services-grid .section-head h2 { margin-bottom: 18px; }
.services-grid .lead { font-size: var(--step-body); line-height: 1.6; color: var(--ink-soft); }

.chooser { margin-top: 36px; }
.chooser__q { font-weight: 600; }
.chooser__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 12px;
}
.chooser__opts a { font-size: var(--step-lead); font-weight: 500; color: var(--blue); }
.chooser__out {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--paper-2);
  font-size: var(--step-sm);
  line-height: 1.55;
  color: var(--ink);
}
.chooser__out[hidden] { display: none; }
.chooser__out:not([hidden]) { animation: answer-in .4s var(--ease) both; }
@keyframes answer-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 48px) clamp(32px, 4vw, 56px);
}
.service { scroll-margin-top: calc(var(--header-h) + 24px); }
.service h3 { font-size: var(--step-subhead); }
.service p {
  max-width: 50ch;
  margin-top: 10px;
  color: var(--ink-soft);
}
.service p b { font-weight: 600; color: var(--ink); }

/* ---------- Практика ---------- */
.cases-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
  margin-top: 12px;
}
.cases-photo {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}
.cases-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  object-position: 50% 44%;
  filter: grayscale(1) contrast(1.03);
}
.cases-photo figcaption {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: var(--step-body);
  color: var(--ink-soft);
}

.cases { display: grid; gap: clamp(40px, 6vh, 64px); }
.case h3 { font-size: var(--step-subhead); }
.case__meta {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: var(--step-body);
  line-height: 1.35;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums lining-nums;
}
.case p {
  max-width: 56ch;
  margin-top: 12px;
  color: var(--ink-soft);
}
.case p b { font-weight: 600; color: var(--ink); }
.case p.case__result b { color: var(--accent); }
.case__result { color: var(--ink) !important; }
.cases + .note, #cases .note { margin-top: 36px; }

/* ---------- Стоимость ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.pricing-grid .lead { color: var(--ink-soft); }
.factors {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.factors li {
  max-width: 56ch;
  font-size: var(--step-body);
  color: var(--ink-soft);
}
.factors b { font-weight: 600; color: var(--ink); }

.price-panel {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  padding: clamp(24px, 3vw, 36px);
  background: var(--blue);
  color: var(--paper);
}
.price-panel h3 { color: var(--paper); font-size: var(--step-subhead); }
.price-panel p {
  margin-top: 12px;
  font-size: var(--step-body);
  line-height: 1.55;
  color: var(--paper);
}
.price-panel ul {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.price-panel li {
  position: relative;
  padding-left: 18px;
  font-size: var(--step-sm);
  line-height: 1.5;
}
.price-panel li::before {
  content: "·";
  position: absolute;
  left: 2px;
  top: 0;
  font-weight: 700;
}
.price-panel__terms { margin-top: 26px !important; font-size: var(--step-sm) !important; color: rgba(248, 250, 252, .88) !important; }
.price-panel .btn { margin-top: 22px; width: 100%; }

/* ---------- Вопросы ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.faq-text { columns: 2; column-gap: 40px; }
.faq-text p {
  break-inside: avoid;
  margin-bottom: 18px;
  font-size: var(--step-body);
  line-height: 1.55;
  color: var(--ink-soft);
}
.faq-text b { font-weight: 600; color: var(--ink); }

/* ---------- Контакты ---------- */
.contact {
  padding: clamp(64px, 8vw, 104px) 0 clamp(48px, 7vw, 80px);
  background: var(--blue);
  color: var(--paper);
}
.contact h2 { color: var(--paper); }
.contact__lead {
  margin-top: 18px;
  max-width: 48ch;
  font-size: var(--step-body);
  line-height: 1.55;
  color: rgba(248, 250, 252, .86);
}
.contact__phone {
  display: inline-block;
  white-space: nowrap;
  margin-top: clamp(32px, 6vh, 60px);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7.6vw, 5.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--paper);
  text-decoration: none;
}
.contact__phone:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 10px; }

.contact__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 26px 40px;
  margin-top: clamp(36px, 6vh, 56px);
  font-size: var(--step-sm);
  line-height: 1.55;
  color: rgba(248, 250, 252, .88);
}
.contact__foot > div { max-width: 32ch; }
.contact__label {
  display: block;
  margin-bottom: 4px;
  font-size: var(--step-sm);
  color: rgba(248, 250, 252, .7);
}
.contact__foot a { color: var(--paper); text-decoration-color: rgba(248, 250, 252, .5); }
.contact__foot a:hover { color: #fff; text-decoration-color: #fff; }
.contact__vcard {
  align-self: flex-end;
  padding: 10px 0;
  font-weight: 600;
  text-decoration-thickness: 2px;
}

/* ---------- Footer ---------- */
.site-footer { padding: clamp(56px, 8vw, 96px) 0 28px; }
.footer-brand {
  font-size: var(--step-display);
  line-height: .95;
  letter-spacing: -.025em;
}
.footer-role {
  margin-top: 16px;
  font-size: var(--step-body);
  color: var(--ink-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-top: clamp(40px, 6vw, 56px);
}
.footer-col h2 {
  margin-bottom: 16px;
  font-family: var(--font-sans);
  font-size: var(--step-sm);
  font-weight: 600;
  color: var(--ink);
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { font-size: var(--step-sm); color: var(--ink-soft); text-decoration: none; }
.footer-col a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 40px;
  margin-top: clamp(40px, 6vw, 56px);
  padding: 22px 24px;
  background: var(--paper-2);
  font-size: var(--step-sm);
  line-height: 1.55;
  color: var(--ink-soft);
}
.footer-bottom p { flex: 1 1 320px; }
.footer-requisites { flex-basis: 100%; }
.credits { flex-basis: 100%; }
.credits a { color: var(--ink-soft); }

/* ---------- Кнопка «наверх» ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: var(--blue);
  cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--paper);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.to-top:hover { background: var(--blue-deep); transform: translateY(-3px); }
.to-top[hidden] { display: none; }

/* ---------- Юридические страницы ---------- */
.legal { padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 110px); }
.legal__back {
  display: inline-block;
  margin-bottom: 30px;
  font-size: var(--step-sm);
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.legal__back::before { content: "← "; color: var(--blue); }
.legal__back:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }

.legal-meta {
  margin: 12px 0 34px;
  font-size: var(--step-sm);
  color: var(--ink-soft);
}

.prose { max-width: 760px; }
.prose h1 { font-size: var(--step-head); }
.prose h2 { margin: 44px 0 14px; font-size: var(--step-lead); font-family: var(--font-sans); font-weight: 600; }
.prose h3 { margin: 28px 0 10px; font-size: var(--step-body); font-weight: 600; }
.prose p, .prose li { color: var(--ink-soft); }
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.legal-contact {
  margin-top: 40px;
  padding: 24px 26px;
  background: var(--paper-2);
}

.placeholder {
  padding: 1px 6px;
  background: var(--blue-soft);
  color: var(--blue-deep);
}

/* ---------- 404 ---------- */
.error-page {
  min-height: 70vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
  padding-block: 60px;
}
.error-page__code {
  font-family: var(--font-serif);
  font-size: clamp(6rem, 18vw, 12rem);
  font-weight: 600;
  line-height: .9;
  color: var(--blue);
}
.error-page h1 { font-size: var(--step-head); }
.error-page p { color: var(--ink-soft); max-width: 44ch; }

/* ---------- Появление при скролле ---------- */
.js-boot .reveal > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}
.js-boot .reveal.is-in > * { opacity: 1; transform: none; }
.js-boot .reveal.is-in > *:nth-child(2) { transition-delay: .08s; }
.js-boot .reveal.is-in > *:nth-child(3) { transition-delay: .16s; }
.js-boot .reveal.is-in > *:nth-child(4) { transition-delay: .24s; }
.js-boot .reveal.is-in > *:nth-child(5) { transition-delay: .32s; }
.js-boot .reveal.is-in > *:nth-child(6) { transition-delay: .40s; }

.js-boot .hero-portrait { animation: media-in .9s var(--ease) .08s both; }
@keyframes media-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 1160px) {
  .header-phone { display: none; }
  .nav { gap: 16px; }
}

@media (max-width: 1024px) {
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px var(--gap) 24px;
    background: var(--paper);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; font-size: var(--step-body); }
  .menu-toggle { display: inline-flex; }
  .header-actions .btn { display: inline-flex; }
  .header-phone { display: none; }
  .cases-grid { grid-template-columns: minmax(0, 1fr); }
  .cases-photo { position: static; max-width: 520px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-panel { position: static; max-width: 560px; }
  .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .site-header { position: sticky; top: 0; }
  .hero-grid { display: flex; flex-direction: column; min-height: 0; }
  .hero-portrait {
    order: -1;
    width: 100%;
    height: 34svh;
    min-height: 240px;
    padding: 0;
  }
  .hero-copy { padding: 24px 0 56px; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .about-grid, .process-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-areas: "head" "steps" "foot"; }
  .process-foot { margin-top: 0; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .facts { max-width: 54ch; }
  .services { grid-template-columns: 1fr; }
  .faq-text { columns: 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .hero-portrait { height: 40svh; }
  .hero-portrait__frame img { object-position: 50% 62%; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .to-top { display: none; }
  .header-actions { gap: 12px; }
  .header-actions .btn { min-height: 42px; padding: 10px 16px; font-size: var(--step-sm); }
  .hero-facts { grid-template-columns: 1fr; gap: 18px; }
  .hero-actions { align-items: flex-start; }
  .hero-actions .btn { width: 100%; }
  .link-plain { display: inline-block; padding: 4px 0; }
  .section { padding: 64px 0; }
  .band__media { height: 36vh; min-height: 220px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
  .contact__foot { flex-direction: column; }
  .contact__vcard { align-self: flex-start; }
}

@media (max-width: 520px) {
  :root { --gap: 20px; }
  .brand__role { display: none; }
  .brand__name { font-size: var(--step-body); }
  .brand__mark { width: 36px; height: 36px; font-size: 1.375rem; }
  .header-phone { display: none; }
  .header-inner { gap: 12px; }
  .menu-toggle__label { display: none; }
  .hero h1 { max-width: 14ch; }
  .hero-facts { gap: 16px; }
  .facts div { gap: 3px; }
  .about .lead { font-size: var(--step-body); }
  .contact__foot { gap: 22px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .js-boot .reveal > * { opacity: 1; transform: none; }
  .band__media img { transform: none; }
  .hero-portrait img { transform: none; }
}

/* Подпись студии — встроена в нижний блок с данными */
.vd-stamp{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:0;color:inherit;font:inherit}
.vd-stamp__mark{display:flex;align-items:center;gap:8px;color:inherit;text-decoration:none}
.vd-stamp__box{border:1px solid currentColor;padding:3px 6px;font-size:10px;line-height:1;letter-spacing:.12em;text-transform:uppercase;opacity:.85;white-space:nowrap}
.vd-stamp__box i{font-style:normal;opacity:.6;margin-left:.25em}
.vd-stamp__year{font-size:10px;letter-spacing:.1em;opacity:.65}
.vd-stamp__note{opacity:.8}
.vd-stamp__note a{color:inherit;text-decoration:underline;text-underline-offset:2px}

.vd-stamp__logo { width: 13px; height: 13px; flex: none; }
