:root {
  --paper: #ECEEE8;
  --paper-2: #E2E6DF;
  --ink: #0E3A32;
  --ink-2: #16483E;
  --deep: #0A2C26;
  --line: #3F7D6C;
  --seal: #9E2235;
  --text: #18201D;
  --muted: #5D6A64;
  --rule: rgba(14, 58, 50, .18);
  --gilt: #C2A06A;
  --gilt-2: #8E7346;
  --foil: #F7E6B5;
  --focus: #9E2235;
  --focus-dark: #E8B4BC;

  --serif: "Old Standard TT", "Times New Roman", serif;
  --sans: "Golos Text", system-ui, sans-serif;

  --wrap: 1280px;
  --gutter: clamp(18px, 4vw, 48px);
  --header: 76px;
}

@property --fx { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
@property --fy { syntax: "<percentage>"; inherits: true; initial-value: 50%; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero :focus-visible,
.booking-intro :focus-visible,
.site-footer :focus-visible,
.mobile-bar :focus-visible,
.site-header[data-tone="dark"] :focus-visible { outline-color: var(--focus-dark); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: background .35s, border-color .35s, color .35s;
}
.site-header[data-tone="dark"] {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: var(--header);
}

.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
  transition: color .35s;
}
.brand-mark { width: 40px; height: 40px; color: var(--seal); transition: color .35s; }
.brand-name { font: 700 21px/1 var(--serif); letter-spacing: .01em; }
.brand-sub { display: block; font: 400 12.5px/1.2 var(--sans); color: var(--muted); margin-top: 4px; transition: color .35s; }
[data-tone="dark"] .brand { color: var(--paper); }
[data-tone="dark"] .brand-mark { color: var(--gilt); }
[data-tone="dark"] .brand-sub { color: color-mix(in srgb, var(--paper) 62%, transparent); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; }
.nav a:not(.btn) {
  font-size: 15.5px; color: var(--text);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .25s, color .35s;
  padding: 4px 0;
}
.nav a:not(.btn):hover { background-size: 100% 1px; }
.nav .phone { font-weight: 600; color: var(--ink); white-space: nowrap; }
[data-tone="dark"] .nav a:not(.btn) { color: var(--paper); }
[data-tone="dark"] .nav .btn-primary { background: var(--gilt); border-color: var(--gilt); color: var(--deep); }

.menu-btn {
  display: none;
  background: none; border: 1px solid var(--rule); border-radius: 2px;
  width: 46px; height: 46px; cursor: pointer; color: var(--ink);
  transition: color .35s, border-color .35s;
}
[data-tone="dark"] .menu-btn { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 30%, transparent); }
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 18px; height: 1.5px; background: currentColor;
  margin: 0 auto; position: relative; transition: transform .25s, background .25s;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 30px;
  font: 500 16px/1 var(--sans);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  border-radius: 2px; border: 1px solid var(--ink);
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }

/* Кнопки на тёмном фоне */
.hero .btn-primary, .booking-intro .btn-primary, .mobile-bar .btn-primary { background: var(--gilt); border-color: var(--gilt); color: var(--deep); }
.hero .btn-primary:hover, .mobile-bar .btn-primary:hover { background: #D4B47E; border-color: #D4B47E; }
.hero .btn-ghost, .booking-intro .btn-ghost, .mobile-bar .btn-ghost { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 42%, transparent); }
.hero .btn-ghost:hover, .booking-intro .btn-ghost:hover, .mobile-bar .btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: var(--header);
  overflow: hidden;
  isolation: isolate;
  color: var(--paper);
  background: radial-gradient(90% 80% at 72% 48%, #145045 0%, var(--ink) 42%, var(--deep) 100%);
}
/* Затемнение под текстом — линии гильоша не спорят с заголовком */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, var(--deep) 0%, rgba(10, 44, 38, .82) 30%, rgba(10, 44, 38, 0) 62%);
}
/* Фактура бумаги */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-art {
  --rx: 0deg; --tx: 0px; --ty: 0px;
  position: absolute; z-index: 0;
  width: min(128vh, 1120px);
  aspect-ratio: 1;
  right: calc(min(128vh, 1120px) * -0.2);
  top: 50%;
  translate: 0 -48%;
}
.g-layer { position: absolute; inset: 0; }
.g-layer svg { width: 100%; height: 100%; overflow: visible; }
.g-layer path { fill: none; stroke: currentColor; }
.g-base { color: var(--gilt); opacity: .62; }
.g-moire {
  color: var(--gilt); opacity: 0;
  transform: rotate(var(--rx)) translate(var(--tx), var(--ty));
  will-change: transform;
  transition: opacity 1.6s ease;
}
.g-foil {
  color: var(--foil); opacity: 0;
  -webkit-mask-image: radial-gradient(circle at var(--fx) var(--fy), #000 0%, rgba(0, 0, 0, .45) 8%, transparent 20%);
          mask-image: radial-gradient(circle at var(--fx) var(--fy), #000 0%, rgba(0, 0, 0, .45) 8%, transparent 20%);
  transition: opacity 1.6s ease;
}
.hero-art.is-live .g-moire { opacity: .42; }
.hero-art.is-live .g-foil { opacity: 1; }
.hero-art.is-idle { animation: foil-drift 16s ease-in-out infinite alternate; }
@keyframes foil-drift {
  0%   { --fx: 24%; --fy: 30%; }
  35%  { --fx: 70%; --fy: 26%; }
  70%  { --fx: 78%; --fy: 70%; }
  100% { --fx: 30%; --fy: 76%; }
}

.seal {
  position: absolute;
  left: 38%; top: 38%; width: 24%; height: 24%;
  opacity: 0;
  transform: scale(1.6) rotate(-26deg);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45));
}
.seal.is-pressed { animation: press .6s cubic-bezier(.2, .9, .25, 1.15) forwards; }
@keyframes press {
  0%   { opacity: 0; transform: scale(1.6) rotate(-26deg); }
  60%  { opacity: 1; transform: scale(.95) rotate(-11deg); }
  100% { opacity: .94; transform: scale(1) rotate(-12deg); }
}

.hero-content {
  position: relative; z-index: 2;
  align-self: center;
  padding-top: clamp(32px, 6vh, 72px);
  padding-bottom: clamp(32px, 6vh, 72px);
}
.hero-kicker {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 clamp(20px, 3vh, 32px);
  font-size: 15.5px;
  color: color-mix(in srgb, var(--paper) 72%, transparent);
}
.hero-kicker::before { content: ""; width: 44px; height: 1px; background: var(--gilt); flex: none; }
.hero h1 {
  font: 400 clamp(60px, 10.4vw, 172px)/.9 var(--serif);
  letter-spacing: -.025em;
  margin: 0 0 clamp(24px, 4vh, 40px);
  color: var(--paper);
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; }
.hero h1 .line + .line { font-style: italic; padding-left: 1.05em; margin-top: -.08em; }
.js .hero h1 .line > span { transform: translateY(108%); transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.js .hero.is-ready h1 .line > span { transform: none; }
.js .hero.is-ready h1 .line + .line > span { transition-delay: .14s; }
.js .hero .hero-kicker, .js .hero .hero-lead, .js .hero .hero-actions, .js .hero .hero-foot { opacity: 0; transition: opacity 1s ease .5s; }
.js .hero.is-ready .hero-kicker, .js .hero.is-ready .hero-lead, .js .hero.is-ready .hero-actions, .js .hero.is-ready .hero-foot { opacity: 1; }

.hero-lead {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  max-width: 30em;
  margin: 0 0 clamp(28px, 4vh, 40px);
  color: color-mix(in srgb, var(--paper) 86%, transparent);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-actions .btn { gap: 0; }

.hero-foot { position: relative; z-index: 2; padding-bottom: clamp(24px, 4vh, 40px); }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 14px 56px; margin: 0; padding: 22px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--gilt) 32%, transparent);
  max-width: 760px;
}
.hero-facts dt { font-size: 13.5px; color: color-mix(in srgb, var(--paper) 60%, transparent); margin-bottom: 4px; }
.hero-facts dd { margin: 0; font: 400 20px/1.25 var(--serif); color: var(--paper); }

/* Гильош-лента — как защитная кайма на гербовом бланке */
.band {
  height: 18px;
  background-color: var(--deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='18'%3E%3Cg fill='none' stroke='%23C2A06A' stroke-width='.7'%3E%3Cpath d='M0 9 C8 1 16 1 24 9 S40 17 48 9'/%3E%3Cpath d='M0 9 C8 17 16 17 24 9 S40 1 48 9'/%3E%3Cpath d='M0 9 C8 5 16 5 24 9 S40 13 48 9' opacity='.55'/%3E%3Cpath d='M0 9 C8 13 16 13 24 9 S40 5 48 9' opacity='.55'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  border-top: 1px solid color-mix(in srgb, var(--gilt) 40%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--gilt) 40%, transparent);
}

/* ---------- Sections ---------- */

section { scroll-margin-top: var(--header); }
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section + .section { border-top: 1px solid var(--rule); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 20px 56px;
  margin-bottom: clamp(40px, 5vw, 72px);
  align-items: end;
}
.section-head h2, .booking-intro h2, .contacts-title {
  font: 400 clamp(38px, 5vw, 68px)/1.02 var(--serif);
  color: var(--ink);
  margin: 0;
  letter-spacing: -.015em;
}
.section-head p { margin: 0; color: var(--muted); max-width: 38em; }

/* ---------- Practice ---------- */

.practice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 64px;
}
.practice-group h3 { font: 400 italic 28px/1.2 var(--serif); color: var(--ink); margin: 0 0 8px; }
.practice-group > p { color: var(--muted); margin: 0 0 20px; font-size: 15.5px; }

.acc { border-top: 1px solid var(--rule); }
.acc:last-child { border-bottom: 1px solid var(--rule); }
.acc-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; cursor: pointer;
  padding: 19px 0;
  font: 500 18px/1.35 var(--sans);
  color: var(--text);
  text-align: left;
  transition: color .2s, padding .3s;
}
.acc-btn:hover { color: var(--ink); padding-left: 6px; }
.acc-icon {
  flex: none; width: 24px; height: 24px; position: relative;
  border: 1px solid var(--rule); border-radius: 50%;
  transition: transform .35s, border-color .35s, background .35s;
}
.acc-icon::before, .acc-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 9px; height: 1.4px; background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform .35s, background .35s;
}
.acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc-btn[aria-expanded="true"] .acc-icon { background: var(--ink); border-color: var(--ink); transform: rotate(180deg); }
.acc-btn[aria-expanded="true"] .acc-icon::before,
.acc-btn[aria-expanded="true"] .acc-icon::after { background: var(--paper); }
.acc-btn[aria-expanded="true"] .acc-icon::after { transform: translate(-50%, -50%) rotate(0deg); }

.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.acc-panel > div { overflow: hidden; }
.acc-panel.is-open { grid-template-rows: 1fr; }
.acc-panel p { margin: 0 0 8px; color: var(--muted); max-width: 36em; }
.acc-panel ul { margin: 0 0 22px; padding-left: 18px; color: var(--muted); }
.acc-panel li { margin: 3px 0; }
.acc-panel li::marker { color: var(--gilt-2); }

/* ---------- Lawyers ---------- */

.lawyers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.lawyer:nth-child(2) { margin-top: clamp(0px, 10vw, 160px); }
.portrait {
  aspect-ratio: 4 / 5;
  background: radial-gradient(80% 70% at 50% 40%, var(--ink-2), var(--deep));
  color: var(--paper);
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  margin-bottom: 32px;
}
.portrait svg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--gilt); opacity: .42; }
.portrait::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none; z-index: 2;
  border: 1px solid color-mix(in srgb, var(--gilt) 50%, transparent);
  outline: 1px solid color-mix(in srgb, var(--gilt) 22%, transparent);
  outline-offset: -6px;
}
.portrait span { position: relative; font: 400 clamp(72px, 9vw, 128px)/1 var(--serif); letter-spacing: .02em; color: var(--paper); }
/* Фотография в фирменном дуотоне: любое фото с телефона ложится в общую гамму */
.portrait img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(1.06);
  mix-blend-mode: luminosity;
}
.lawyer h3 { font: 400 clamp(30px, 3vw, 40px)/1.08 var(--serif); color: var(--ink); margin: 0 0 8px; }
.lawyer .role { color: var(--seal); font-size: 15px; margin: 0 0 18px; }
.lawyer p { margin: 0 0 12px; max-width: 34em; }
.lawyer dl {
  margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: auto 1fr; gap: 8px 22px; font-size: 15px;
}
.lawyer dt { color: var(--muted); }
.lawyer dd { margin: 0; }

/* ---------- География ---------- */

.geo {
  background: radial-gradient(70% 90% at 20% 20%, #134A40, var(--deep) 75%);
  color: var(--paper);
  border-top: 0;
  overflow-x: clip;
}
.geo + .section { border-top: 0; }
.geo :focus-visible { outline-color: var(--focus-dark); }
.geo .section-head h2 { color: var(--paper); }
.geo .section-head p { color: color-mix(in srgb, var(--paper) 76%, transparent); }

.route { max-width: 860px; margin: 0 auto clamp(32px, 5vw, 56px); }
.route-svg { width: 100%; height: auto; overflow: visible; }
.route-line { stroke: var(--gilt); stroke-width: 1.6; stroke-dasharray: 2 8; stroke-linecap: round; }
.route-reveal { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.js .route-reveal { stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s cubic-bezier(.45, 0, .25, 1); }
.js .route.is-in .route-reveal { stroke-dashoffset: 0; }
.route-dot { fill: var(--foil); filter: drop-shadow(0 0 6px var(--gilt)); opacity: 0; }
.route.is-in .route-dot { opacity: 1; }
.route-km { font: 400 italic 17px var(--serif); fill: var(--foil); letter-spacing: .02em; }
.js .route-km { opacity: 0; transition: opacity .8s ease 1.4s; }
.js .route.is-in .route-km { opacity: 1; }

.stamp circle { fill: none; stroke: currentColor; stroke-width: 2; }
.stamp circle.thin { stroke-width: .8; }
.stamp text { fill: currentColor; font-family: var(--serif); }
.stamp-ring { font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px; }
.stamp-code { font-size: 46px; }
.stamp-home { color: var(--gilt); }
.stamp-away { color: #D9A3AC; }
/* Штемпель «ставится» с лёгким ударом: сначала крупнее и прозрачный */
.js .stamp { opacity: 0; transition: opacity .35s ease, scale .35s cubic-bezier(.3, 1.6, .5, 1); scale: 1.25; transform-box: fill-box; transform-origin: center; }
.js .route.is-in .stamp { opacity: 1; scale: 1; }
.js .route.is-in .stamp-home { transition-delay: .1s; }
.js .route.is-in .stamp-away { transition-delay: 1.75s; }

.regions {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 96px);
}
.region { border-top: 1px solid color-mix(in srgb, var(--gilt) 35%, transparent); padding-top: 26px; }
.region-kicker { margin: 0 0 6px; font-size: 13.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gilt); }
.region:nth-child(2) .region-kicker { color: #D9A3AC; }
.region h3 { font: 400 clamp(30px, 3vw, 40px)/1.08 var(--serif); margin: 0 0 14px; color: var(--paper); }
.region > p:not(.region-kicker) { margin: 0 0 18px; color: color-mix(in srgb, var(--paper) 78%, transparent); max-width: 34em; }
.region ul { margin: 0; padding-left: 18px; color: color-mix(in srgb, var(--paper) 88%, transparent); font-size: 15.5px; }
.region li { margin: 4px 0; }
.region li::marker { color: var(--gilt); }
.region-office { margin: 18px 0 0; font: 400 19px/1.3 var(--serif); color: var(--paper); }

.geo-how {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 40px;
  margin: clamp(48px, 6vw, 80px) 0 0; padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--gilt) 22%, transparent);
}
.geo-how dt { font-size: 13.5px; color: color-mix(in srgb, var(--paper) 60%, transparent); margin-bottom: 4px; }
.geo-how dd { margin: 0; font: 400 19px/1.3 var(--serif); color: var(--paper); }

/* ---------- Steps ---------- */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  counter-reset: step;
}
.steps li { counter-increment: step; padding: 0 28px 0 0; position: relative; }
.steps li::before {
  content: counter(step);
  display: block;
  font: 400 italic 72px/1 var(--serif);
  color: var(--gilt-2);
  margin-bottom: 18px;
}
.steps li::after {
  content: ""; position: absolute; top: 36px; left: 52px; right: 16px;
  height: 1px; background: var(--rule);
}
.steps li:last-child::after { display: none; }
.steps h3 { font: 600 18px/1.3 var(--sans); margin: 0 0 8px; color: var(--ink); }
.steps p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- Booking ---------- */

.booking {
  background: radial-gradient(70% 90% at 80% 30%, #134A40, var(--deep) 75%);
  color: var(--paper);
  border-top: 0;
  overflow-x: clip;
}
.booking + .section { border-top: 0; }
.booking-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.booking-intro { position: sticky; top: calc(var(--header) + 32px); }
.booking-intro h2 { color: var(--paper); margin-bottom: 20px; }
.booking-intro > p { color: color-mix(in srgb, var(--paper) 78%, transparent); margin: 0 0 40px; max-width: 30em; }
.urgent { border-top: 1px solid color-mix(in srgb, var(--gilt) 35%, transparent); padding-top: 28px; }
.urgent h3 { font: 400 26px/1.15 var(--serif); margin: 0 0 10px; }
.urgent p { margin: 0 0 12px; color: color-mix(in srgb, var(--paper) 76%, transparent); font-size: 15.5px; max-width: 28em; }
.urgent a.big { font: 400 clamp(28px, 3vw, 36px)/1.2 var(--serif); text-decoration: none; display: inline-block; margin: 4px 0 16px; color: var(--gilt); }
.urgent .messengers { display: flex; gap: 10px; flex-wrap: wrap; }

/* Бланк: бумага в гильош-кайме */
.document {
  padding: 14px;
  background-color: var(--paper-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg fill='none' stroke='%238E7346' stroke-width='.6' opacity='.75'%3E%3Cpath d='M0 12 Q6 0 12 12 T24 12'/%3E%3Cpath d='M0 12 Q6 24 12 12 T24 12'/%3E%3Cpath d='M12 0 Q0 6 12 12 T12 24'/%3E%3Cpath d='M12 0 Q24 6 12 12 T12 24'/%3E%3C/g%3E%3C/svg%3E");
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), 0 2px 0 rgba(255, 255, 255, .06) inset;
  transform: rotate(-.6deg);
  color: var(--text);
}
.sheet {
  position: relative;
  background: var(--paper);
  padding: clamp(24px, 4vw, 52px);
  outline: 1px solid color-mix(in srgb, var(--gilt-2) 50%, transparent);
  outline-offset: -8px;
}
.doc-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding-bottom: 20px; margin-bottom: 32px;
  border-bottom: 3px double color-mix(in srgb, var(--ink) 35%, transparent);
}
.doc-title { font: 400 clamp(26px, 2.6vw, 34px)/1.1 var(--serif); color: var(--ink); margin: 0 0 6px; }
.doc-no { margin: 0; color: var(--muted); font-size: 14.5px; }
.doc-mark { width: 48px; height: 48px; color: var(--seal); flex: none; }

.form { display: grid; gap: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: grid; gap: 8px; }
.field > label:not(.consent), .legend { font-size: 14.5px; color: var(--muted); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.legend { padding: 0; margin-bottom: 10px; }

.input, .select, .textarea {
  width: 100%;
  font: 400 18px/1.4 var(--sans);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(14, 58, 50, .38);
  border-radius: 0;
  padding: 10px 0;
  transition: border-color .2s;
}
.input::placeholder, .textarea::placeholder { color: #7D8983; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-bottom-color: var(--ink); box-shadow: 0 1px 0 0 var(--ink); }
.select {
  appearance: none; padding-right: 24px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230E3A32' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 4px center;
}
.textarea { resize: vertical; min-height: 84px; }
.field.has-error .input, .field.has-error .select { border-bottom-color: var(--seal); }
.err { font-size: 13.5px; color: var(--seal); }
.err:empty { margin-top: -8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid rgba(14, 58, 50, .42);
  border-radius: 22px;
  font-size: 15px; color: var(--ink);
  transition: background .2s, color .2s, border-color .2s;
}
.chip input:hover + span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip input:disabled + span { opacity: .35; text-decoration: line-through; cursor: not-allowed; }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { display: flex; }
.day span {
  flex-direction: column; justify-content: center; gap: 2px;
  border-radius: 2px; min-height: 66px; padding: 0 4px; width: 100%;
  text-align: center; line-height: 1.1;
}
.day small { font-size: 12px; opacity: .75; }
.day b { font: 400 23px/1 var(--serif); }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }

.doc-sign {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-top: 8px;
}

.done { display: none; }
.done.is-visible { display: block; animation: rise .5s ease both; }
.done h3:focus { outline: none; }
.done h3 { font: 400 clamp(30px, 3vw, 40px)/1.1 var(--serif); margin: 0 0 12px; color: var(--ink); }
.done p { margin: 0 0 24px; color: var(--muted); max-width: 32em; }
.done .summary {
  font-size: 16px; margin: 0 0 28px; display: grid; grid-template-columns: auto 1fr; gap: 0 24px;
  max-width: 30em;
}
.done .summary dt, .done .summary dd { padding: 10px 0; border-bottom: 1px dashed rgba(14, 58, 50, .25); margin: 0; }
.done .summary dt { color: var(--muted); }
.done .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.doc-seal {
  position: absolute; right: clamp(14px, 4vw, 52px); top: clamp(150px, 17vw, 200px);
  mix-blend-mode: multiply;
  width: clamp(110px, 14vw, 160px); height: clamp(110px, 14vw, 160px);
  opacity: 0; pointer-events: none;
  transform: scale(1.7) rotate(8deg);
}
.sheet.is-stamped .doc-seal { animation: press-doc .6s cubic-bezier(.2, .9, .25, 1.15) .35s forwards; }
@keyframes press-doc {
  0%   { opacity: 0; transform: scale(1.7) rotate(8deg); }
  60%  { opacity: .92; transform: scale(.95) rotate(-6deg); }
  100% { opacity: .85; transform: scale(1) rotate(-8deg); }
}

/* ---------- Reviews ---------- */

.rating { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 48px; align-items: center; }
.rating-num { font: 400 clamp(96px, 12vw, 180px)/.85 var(--serif); color: var(--ink); letter-spacing: -.03em; }
.rating-stars { display: flex; gap: 6px; color: var(--gilt-2); margin-bottom: 14px; }
.rating-stars svg { width: 22px; height: 22px; }
.rating p { margin: 0 0 14px; color: var(--muted); max-width: 34em; }
.rating blockquote {
  margin: 0 0 20px; padding-left: 20px; border-left: 1px solid var(--gilt);
  font: 400 italic clamp(22px, 2.2vw, 28px)/1.35 var(--serif); color: var(--ink); max-width: 28em;
}
.text-link { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--seal); }

/* ---------- FAQ ---------- */

.faq { max-width: 900px; }
.faq .acc-btn { font: 400 clamp(20px, 2vw, 24px)/1.3 var(--serif); padding: 24px 0; }

/* ---------- Contacts ---------- */

.contacts { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); }
.contacts-title { margin-bottom: 40px; }
.contact-list { display: grid; gap: 24px; margin: 0; }
.contact-list dt { color: var(--muted); font-size: 14.5px; margin-bottom: 4px; }
.contact-list dd { margin: 0; font: 400 24px/1.3 var(--serif); color: var(--ink); }
.contact-list dd a { text-decoration: none; }
.contact-list dd a:hover { text-decoration: underline; text-underline-offset: 4px; }
.map { min-height: 420px; background: var(--paper-2); overflow: hidden; border: 1px solid var(--rule); }
.map-facade {
  height: 100%; min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 24px; color: var(--muted);
  background: repeating-linear-gradient(45deg, transparent 0 22px, var(--rule) 22px 23px);
}
.map-facade p { margin: 0; font: 400 22px/1.3 var(--serif); color: var(--ink); }
.map-facade .btn { color: var(--ink); border-color: var(--ink); }
.map-facade small { font-size: 13px; }
.map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; filter: saturate(.75); }

/* ---------- Footer ---------- */

.site-footer { background: var(--deep); color: color-mix(in srgb, var(--paper) 66%, transparent); font-size: 14px; padding-bottom: 40px; }
.footer-mark {
  font: 400 clamp(52px, 11vw, 190px)/.95 var(--serif);
  letter-spacing: -.03em;
  color: var(--paper);
  margin: clamp(48px, 8vw, 110px) 0 clamp(28px, 4vw, 48px);
}
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  border-top: 1px solid color-mix(in srgb, var(--gilt) 28%, transparent); padding-top: 22px;
}
.footer-row p { margin: 0; max-width: 60em; }

/* ---------- Mobile bar ---------- */

.mobile-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  grid-template-columns: 1fr 1.35fr; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--deep) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid color-mix(in srgb, var(--gilt) 30%, transparent);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), visibility 0s .4s;
}
.mobile-bar.is-visible { transform: none; visibility: visible; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.mobile-bar .btn { min-height: 50px; padding: 0 12px; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 0; }
  .steps li:nth-child(2)::after { display: none; }
}

@media (max-width: 960px) {
  :root { --header: 68px; }

  .nav {
    position: fixed; inset: var(--header) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 24px;
    max-height: calc(100dvh - var(--header)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s, visibility 0s .25s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity .25s, transform .25s; }
  .nav a:not(.btn), [data-tone="dark"] .nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--rule); font: 400 24px/1.2 var(--serif); background: none; color: var(--ink); }
  .nav .phone { font: 600 18px/1.2 var(--sans) !important; }
  .nav .btn { margin-top: 18px; min-height: 52px; }
  [data-tone="dark"] .nav .btn-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .menu-btn { display: block; }
  .site-header:has(.nav.is-open) { background: var(--paper); }
  .site-header:has(.nav.is-open) .brand { color: var(--ink); }
  .site-header:has(.nav.is-open) .brand-mark { color: var(--seal); }
  .site-header:has(.nav.is-open) .menu-btn { color: var(--ink); border-color: var(--rule); }

  /* Первый экран на телефоне: розетка сверху, текст у нижнего края — под большой палец */
  .hero { grid-template-rows: 1fr auto auto; }
  .hero::before { background: linear-gradient(0deg, var(--deep) 0%, var(--deep) 30%, rgba(10, 44, 38, .7) 52%, rgba(10, 44, 38, 0) 74%); }
  .hero { grid-template-rows: 1fr auto; }
  .hero-art {
    width: min(118vw, 640px);
    right: auto; left: 50%;
    top: calc(var(--header) - min(14vw, 76px));
    translate: -50% 0;
  }
  .hero-content { align-self: end; padding-top: min(60vw, 360px); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .hero-kicker { font-size: 14.5px; }
  .hero-kicker::before { width: 28px; }
  .hero h1 { font-size: clamp(54px, 15.5vw, 120px); margin-bottom: 20px; }
  .hero h1 .line + .line { padding-left: .9em; }
  .hero-lead { margin-bottom: 26px; }
  .hero-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
  .hero-actions .btn { padding: 0 12px; }
  .hero-foot { display: none; }

  .section-head, .practice, .lawyers, .booking-grid, .contacts, .regions { grid-template-columns: 1fr; }
  .geo-how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .practice { gap: 56px; }
  .lawyer:nth-child(2) { margin-top: 0; }
  .booking-intro { position: static; }
  .document { transform: none; }
  .rating { grid-template-columns: 1fr; }

  .mobile-bar { display: grid; }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .opt { display: none; }
  .brand-sub { display: none; }
  .brand-name { font-size: 20px; }
  .section { padding: 72px 0; }
  .form-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps li { display: grid; grid-template-columns: 64px 1fr; padding: 0; }
  .steps li::before { font-size: 52px; margin: 0; grid-row: span 2; }
  .steps li::after { display: none; }
  .acc-btn:hover { padding-left: 0; }

  .document { padding: 8px; margin: 0 calc(var(--gutter) * -.5); }
  .sheet { padding: 28px 20px; outline-offset: -5px; }
  .doc-head { margin-bottom: 24px; }
  .doc-mark { width: 40px; height: 40px; }
  .days {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 66px;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
    margin-right: -20px; padding-right: 20px;
    scrollbar-width: none;
  }
  .days::-webkit-scrollbar { display: none; }
  .day { scroll-snap-align: start; }
  .doc-sign .btn, .done .actions .btn { width: 100%; }

  .portrait { aspect-ratio: 1; }
  .lawyer dl { grid-template-columns: 1fr; gap: 0; }
  .lawyer dt { margin-top: 10px; }
  .contact-list dd { font-size: 21px; }
  .geo-how { grid-template-columns: 1fr; gap: 16px; }
  .route { margin-left: calc(var(--gutter) * -.5); margin-right: calc(var(--gutter) * -.5); }
  .route-km { font-size: 22px; }
  .map, .map iframe { min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* ---------- Подвал: ссылки на тёмном ---------- */

.site-footer .text-link { color: var(--paper); }
.site-footer .text-link:hover { color: var(--foil); }

/* ---------- Правовые страницы (politika.html, soglasie.html) ---------- */

.legal { max-width: 46em; margin: 0 auto; padding: 48px var(--gutter) 96px; }
.legal-back { display: inline-block; margin-bottom: 32px; }
.legal h1 { font: 400 clamp(30px, 5vw, 46px)/1.1 var(--serif); color: var(--ink); margin: 0 0 12px; }
.legal h2 { font: 700 20px/1.3 var(--serif); color: var(--ink); margin: 40px 0 12px; }
.legal .legal-meta { color: var(--muted); margin: 0 0 32px; }
.legal li { margin: 6px 0; }
.legal .todo { background: color-mix(in srgb, var(--gilt) 30%, transparent); padding: 0 4px; }

/* ---------- Запись: подсказки и ловушка для ботов ---------- */

.days .hint { margin: 0; color: var(--muted); font-size: 15px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Страница записи клиента (zapis.html) ---------- */

.record-page { background: var(--deep) radial-gradient(70% 900px at 80% 0, #134A40, var(--deep) 75%) no-repeat; min-height: 100vh; }
.record-header { padding: 22px 0; }
.record-header .brand { display: inline-flex; }
.record { padding: clamp(16px, 4vw, 48px) 0 72px; }
.record-doc { max-width: 680px; margin: 0 auto; }
/* Печать ставится справа от сводки, а не поверх текста; на узком экране места нет — без неё. */
.rec-sum { position: relative; }
.rec-sum .summary { max-width: 23em !important; }
.rec-sum .doc-seal { top: 50%; right: -8px; margin-top: -70px; width: 140px; height: 140px; }
#rec .summary {
  font-size: 16px; margin: 0 0 28px; display: grid; grid-template-columns: auto 1fr; gap: 0 24px; max-width: 32em;
}
#rec .summary dt, #rec .summary dd { padding: 10px 0; border-bottom: 1px dashed rgba(14, 58, 50, .25); margin: 0; }
#rec .summary dt { color: var(--muted); }
.rec-status { font: 400 clamp(30px, 3vw, 40px)/1.1 var(--serif); margin: 0 0 12px; color: var(--ink); }
.rec-badge {
  display: inline-block; margin: 0 0 14px; padding: 6px 12px; border: 1px solid currentColor;
  font: 700 13px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.rec-badge.rec-proposed, .rec-badge.rec-new { color: #8a5a00; }
.rec-badge.rec-declined, .rec-badge.rec-cancelled, .rec-badge.rec-expired, .rec-badge.rec-no_show { color: var(--seal); }
.rec-lead { margin: 0 0 24px; color: var(--muted); max-width: 32em; }
.rec-options { display: grid; gap: 10px; margin: 0 0 28px; max-width: 26em; }
.rec-option { justify-content: flex-start; white-space: normal; text-align: left; min-height: 52px; }
.rec-none { background: none; border: 0; padding: 4px 0; font: inherit; cursor: pointer; justify-self: start; color: var(--muted); }
.rec-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rec-confirm { flex-basis: 100%; margin: 0; color: var(--ink); }
.rec-error { margin: 16px 0 0; color: var(--seal); min-height: 1.2em; font-size: 15px; }
.record-foot { text-align: center; margin: 36px 0 0; color: color-mix(in srgb, var(--paper) 72%, transparent); font-size: 15px; line-height: 2; }
.record-foot a { color: var(--gilt); white-space: nowrap; }
@media (max-width: 640px) {
  .record-doc { transform: none; padding: 8px; }
  #rec .summary { grid-template-columns: 1fr; }
  .rec-sum .doc-seal { display: none; }
  #rec .summary dt { border-bottom: 0; padding-bottom: 0; }
  .rec-actions .btn { flex: 1 1 100%; }
}
