/* ==========================================================================
   Адвокатский кабинет Иошкиной М. И. — styles.css
   Palette (contract): graphite #14161A · cream #F7F5F2 · brass #B08D57,
   plus tints / shades / opacity of these three. No other colours.
   Brass on cream fails contrast (2.84:1): on light backgrounds brass is
   decoration only; brass-tone text and focus rings there use --brass-ink.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --graphite: #14161A;
  --graphite-deep: #0E0F12;
  --graphite-hover: #2B2C30;   /* graphite + 10% cream */
  --cream: #F7F5F2;
  --brass: #B08D57;
  --brass-hover: #BB9D6E;      /* brass + 15% cream */
  --brass-ink: #7D5F32;        /* darkened brass: text / focus on cream, 5.4:1 */

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

  --maxw: 1200px;
  --gutter: 24px;
  --header-h: 76px;
  --callbar-h: 0px;
  --section-pad: clamp(4rem, 8.34vw, 7.5rem);   /* 64px mobile → 120px desktop */
  --t: 180ms;
  --ease: cubic-bezier(.25, .6, .3, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
@media (max-width: 1023.98px) { :root { --header-h: 64px; } }
@media (max-width: 767.98px)  { :root { --callbar-h: 60px; } }
@media (max-width: 480px)     { :root { --gutter: 16px; } }

/* Tones: every block sets its own background and text tokens. */
body, .tone-dark, .tone-deep, .site-header, .site-footer, .doc-header {
  --bg: var(--graphite);
  --fg: var(--cream);
  --muted: rgba(247, 245, 242, .74);   /* 9.4:1 on graphite */
  --faint: rgba(247, 245, 242, .64);   /* 7.4:1 */
  --rule: rgba(176, 141, 87, .4);      /* brass hairline */
  --rule-soft: rgba(247, 245, 242, .13);
  --field: rgba(247, 245, 242, .44);   /* 4:1 — outline button borders */
  --accent: var(--brass);
  --focus: var(--brass);               /* 5.9:1 */
  background-color: var(--bg);
  color: var(--fg);
}
.tone-deep { --bg: var(--graphite-deep); }
.tone-light, .doc {
  --bg: var(--cream);
  --fg: var(--graphite);
  --muted: rgba(20, 22, 26, .76);      /* 7.9:1 on cream */
  --faint: rgba(20, 22, 26, .68);      /* 5.9:1 */
  --rule: rgba(20, 22, 26, .14);
  --rule-soft: rgba(20, 22, 26, .1);
  --accent: var(--brass-ink);
  --focus: var(--brass-ink);           /* 5.4:1 */
  background-color: var(--bg);
  color: var(--fg);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* No transitions until main.js has seen the stylesheets applied (whenStyled in main.js). */
.js:not(.is-ready) *, .js:not(.is-ready) *::before, .js:not(.is-ready) *::after { transition: none !important; }
/* .btn and other display rules would otherwise override the browser's own [hidden] style. */
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--graphite);
  /* Focused elements and anchor targets stop clear of the sticky header and the mobile call bar. */
  scroll-padding-top: var(--header-h);
  scroll-padding-bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom, 0px));
}
/* Header-bar controls and the call bar never leave the screen, so keyboard focus on them must not
   scroll the page (scroll-padding above would move it): their scroll area sits under the header /
   above the call bar. Not for .nav__link below 1024px: inside the open menu links must scroll into view. */
.brand, .site-header__actions a, .burger, .doc-header__phone { scroll-margin-top: calc(-1 * var(--header-h)); scroll-margin-bottom: var(--header-h); }
@media (min-width: 1024px) { .nav__link { scroll-margin-top: calc(-1 * var(--header-h)); scroll-margin-bottom: var(--header-h); } }
.callbar { scroll-margin-top: var(--callbar-h); scroll-margin-bottom: calc(-1 * (var(--callbar-h) + env(safe-area-inset-bottom, 0px))); }
/* Smooth anchor scrolling once a link has focus (link clicks, keyboard); scripted scrolls
   and find-in-page stay instant, so nothing is left half-way. */
@media (prefers-reduced-motion: no-preference) { html:focus-within { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 17px/1.65 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (min-width: 1024px) { body { font-size: 18px; } }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variant-numeric: lining-nums;
  text-wrap: balance;
  overflow-wrap: break-word;
}
p, ul, ol, dl, dd { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; margin: 0; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .24em; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
strong { font-weight: 600; }
/* No automatic hyphenation: Chrome ignores hyphenate-limit-chars and splits Russian words
   after 2–3 letters («сви-детельствовать»). Rag is handled by text-wrap: pretty and the
   non-breaking spaces after short words in the markup. Long unbreakable strings still wrap. */
p, li, dd { overflow-wrap: break-word; }

.container {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  /* phone landscape: keep content clear of the notch / Dynamic Island */
  width: min(100% - max(var(--gutter), env(safe-area-inset-left, 0px)) - max(var(--gutter), env(safe-area-inset-right, 0px)), var(--maxw));
  margin-inline: auto;
}
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: rgba(176, 141, 87, .35); }

.skip-link {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 2px;
  background: var(--brass);
  color: var(--graphite);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
  transition: transform var(--t) var(--ease);
}
.skip-link:focus { transform: none; }
.skip-link:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: 2px;
  /* a <button class="btn"> must not paint the browser's grey button face */
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  font: 600 16px/1.25 var(--sans);
  letter-spacing: .01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), opacity var(--t) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn--primary { background: var(--brass); color: var(--graphite); }
@media (hover: hover) { .btn--primary:hover { background: var(--brass-hover); } }
.btn--ghost { border-color: var(--field); color: var(--cream); }
@media (hover: hover) { .btn--ghost:hover { border-color: var(--brass); } }
.tone-light .btn--primary { background: var(--graphite); color: var(--cream); }
@media (hover: hover) { .tone-light .btn--primary:hover { background: var(--graphite-hover); } }
.btn--sm { min-height: 44px; padding: 10px 22px; font-size: 15px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--rule-soft); }
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: none;
  min-height: 44px;
  color: var(--cream);
  text-decoration: none;
}
.brand__mark {
  font: 600 26px/1 var(--serif);
  letter-spacing: .01em;
  color: var(--brass);
  white-space: nowrap;
}
.brand__label {
  padding-left: 14px;
  border-left: 1px solid var(--rule);
  font: 600 11.5px/1.3 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.site-menu { flex: 1; display: flex; justify-content: center; }
.nav__list { display: flex; align-items: center; gap: clamp(18px, 2.3vw, 38px); }
.nav__link {
  position: relative;
  display: inline-block;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t) var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms var(--ease);
}
.nav__link.is-active { color: var(--cream); }
.nav__link.is-active::after { transform: scaleX(1); }
@media (hover: hover) {
  .nav__link:hover { color: var(--cream); }
  .nav__link:hover::after { transform: scaleX(1); }
}
.site-menu__contacts { display: none; }
.site-header__actions { display: flex; align-items: center; gap: 22px; flex: none; }
.site-header__phone {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  transition: color var(--t) var(--ease);
}
@media (hover: hover) { .site-header__phone:hover { color: var(--brass); } }
.burger, .callbar { display: none; }

@media (min-width: 1024px) and (max-width: 1199.98px) {
  .site-header__inner { gap: 20px; }
  .site-header .brand__label { display: none; }
}

/* Tablet + mobile: burger and full-screen menu */
@media (max-width: 1023.98px) {
  .site-header__inner { gap: 12px; }
  .brand { margin-right: auto; }
  .site-header__phone { display: none; }
  .burger {
    display: inline-flex;
    flex: none;                  /* never squeezed by the brand on narrow screens */
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    margin-right: -8px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: none;
    color: var(--cream);
    cursor: pointer;
    visibility: hidden;          /* shown once main.js is running (no dead control without JS) */
    -webkit-tap-highlight-color: transparent;
  }
  .js .burger { visibility: visible; }
  .burger:focus-visible { outline-offset: -2px; }
  .burger__box { position: relative; display: block; width: 26px; height: 10px; }
  .burger__box::before, .burger__box::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    transition: transform 200ms var(--ease);
  }
  .burger__box::before { top: 0; }
  .burger__box::after { bottom: 0; }
  .burger[aria-expanded="true"] .burger__box::before { transform: translateY(4.25px) rotate(45deg); }
  .burger[aria-expanded="true"] .burger__box::after { transform: translateY(-4.25px) rotate(-45deg); }

  .site-menu {
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 16px var(--gutter) calc(32px + var(--callbar-h) + env(safe-area-inset-bottom));
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
    background: var(--graphite);
    border-top: 1px solid var(--rule-soft);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    transition: opacity 200ms var(--ease), visibility 0s linear 200ms;
  }
  .site-menu.is-open { visibility: visible; opacity: 1; transition: opacity 200ms var(--ease); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule-soft);
    font: 500 clamp(30px, 8vw, 40px)/1.15 var(--serif);
    letter-spacing: -.01em;
    color: var(--cream);
    white-space: normal;
  }
  .nav__link::after { display: none; }
  .site-menu__contacts { display: grid; justify-items: start; gap: 2px; }
  .site-menu__phone {
    padding: 8px 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--cream);
    text-decoration: none;
  }
  .site-menu__link {
    padding: 8px 0;
    font-size: 16px;
    color: var(--muted);
    text-decoration-color: var(--rule);
  }
  html.menu-open { overflow: hidden; }
}
@media (max-width: 767.98px) {
  .site-header__actions { display: none; }
  body { padding-bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom)); }
  .callbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 3;                  /* above the open menu: the call bar never disappears */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: calc(var(--callbar-h) + env(safe-area-inset-bottom));
    padding: 0 var(--gutter) env(safe-area-inset-bottom);
    background: var(--brass);
    color: var(--graphite);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .01em;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .callbar .icon { width: 20px; height: 20px; stroke-width: 1.8; }
  .callbar__num { font-weight: 500; }
  .callbar:active { background: var(--brass-hover); }
  .callbar:focus-visible { outline: 2px solid var(--graphite); outline-offset: -6px; }
}
/* Press feedback on every width (touch screens get no hover; main.js enables :active on iOS) */
.btn:active { opacity: .85; }
.faq__q:active { color: var(--brass-ink); }
/* iPhone SE 1st gen, mini / SE with Display Zoom: the label would push the burger off screen */
@media (max-width: 359.98px) { .brand__label { display: none; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }
.section--ruled { position: relative; }
.section--ruled::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: min(100% - 2 * var(--gutter), var(--maxw));
  width: min(100% - max(var(--gutter), env(safe-area-inset-left, 0px)) - max(var(--gutter), env(safe-area-inset-right, 0px)), var(--maxw));
  height: 1px;
  background: var(--rule);
  transform: translateX(-50%);
}
.section-title {
  margin-bottom: clamp(2rem, 1.2rem + 2.4vw, 3.5rem);
  font-size: clamp(2.125rem, 1.35rem + 3.1vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -.018em;
}
.section-lead {
  max-width: 60ch;
  font-size: clamp(1.0625rem, .95rem + .4vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero__media { position: relative; }
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 0%;
  background: rgba(247, 245, 242, .06);
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(20, 22, 26, 0) 42%,
    rgba(20, 22, 26, .16) 54%,
    rgba(20, 22, 26, .46) 68%,
    rgba(20, 22, 26, .8) 84%,
    rgba(20, 22, 26, .96) 94%,
    var(--graphite) 100%);
}
.hero__req { margin-top: 24px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.hero__req-org { font-weight: 600; color: var(--brass); }
.hero__title { display: block; }
.hero__name {
  display: block;
  font-size: clamp(2.4rem, 10.9vw, 3.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  text-wrap: balance;
}
@media (min-width: 768px)  { .hero__name { font-size: clamp(3rem, 6.4vw, 3.75rem); } }
/* ≥1024: sized so that «Адвокат Иошкина / Маргарита Ивановна» sits on two lines */
@media (min-width: 1024px) { .hero__name { font-size: clamp(3.5rem, 5.9vw, 4.5rem); } }
.hero__subtitle {
  display: block;
  max-width: 31ch;
  margin-top: 28px;
  font: 400 clamp(1.125rem, .98rem + .5vw, 1.375rem)/1.5 var(--sans);
  letter-spacing: 0;
  color: rgba(247, 245, 242, .84);
  text-wrap: pretty;
}
.hero__subtitle::before {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  margin-bottom: 24px;
  background: var(--brass);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }
.facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.facts li {
  padding: 24px 28px 28px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(247, 245, 242, .88);
}
.facts li:first-child { padding-left: 0; }
.facts li + li { border-left: 1px solid var(--rule); }

@media (min-width: 768px) {
  .hero {
    display: grid;
    grid-template-rows: 1fr auto;
    /* capped at 860px: the hero crop has only 432×576 real pixels (raise once hi-res originals arrive) */
    min-height: clamp(600px, calc(100vh - var(--header-h)), 860px);
    min-height: clamp(600px, calc(100svh - var(--header-h)), 860px);
  }
  .hero__media {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    /* the photo starts at 57% of the container and bleeds to the right edge */
    left: calc(max(var(--gutter), (100% - var(--maxw)) / 2) + min(100% - 2 * var(--gutter), var(--maxw)) * .57);
    left: calc(max(var(--gutter), env(safe-area-inset-left, 0px), (100% - var(--maxw)) / 2) + min(100% - max(var(--gutter), env(safe-area-inset-left, 0px)) - max(var(--gutter), env(safe-area-inset-right, 0px)), var(--maxw)) * .57);
    z-index: -1;
  }
  .hero__body {
    display: flex;
    align-items: center;
    padding-block: clamp(48px, 8vh, 104px) clamp(40px, 6vh, 72px);
  }
  .hero__content { max-width: calc(57% - clamp(28px, 4vw, 64px)); }
}
/* wide screens: the photo ends at the container edge instead of growing with the window */
@media (min-width: 1500px) { .hero__media { right: calc((100% - var(--maxw)) / 2); } }
@media (min-width: 1200px) { .facts li { font-size: 16px; } }
@media (max-width: 767.98px) {
  .hero__media {
    aspect-ratio: 4 / 5;
    max-height: calc(100vh - var(--header-h) - 140px);
    max-height: calc(100svh - var(--header-h) - 140px);
    min-height: 340px;
    width: 100%;
  }
  .hero__body { position: relative; margin-top: calc(-1 * clamp(80px, 23vw, 128px)); }
  .hero__actions { flex-direction: column; margin-top: 28px; }
  .hero__actions .btn { width: 100%; }
  .hero__subtitle { margin-top: 20px; }
  .hero__subtitle::before { margin-bottom: 18px; }
  .hero__facts { margin-top: 36px; }
  .facts { grid-template-columns: 1fr; border-top: 0; }
  .facts li, .facts li:first-child { padding: 15px 0; border-top: 1px solid var(--rule); }
  .facts li + li { border-left: 0; }
}
/* Phone landscape: the photo fills the screen between header and call bar, the text starts below it */
@media (max-width: 767.98px) and (orientation: landscape) {
  .hero__media { aspect-ratio: auto; height: calc(100vh - var(--header-h) - var(--callbar-h)); height: calc(100svh - var(--header-h) - var(--callbar-h)); min-height: 220px; max-height: none; }
  .hero__img { object-position: 55% 8%; }
  .hero__media::after { background: linear-gradient(to bottom, rgba(20, 22, 26, 0) 70%, var(--graphite) 100%); }
  .hero__body { margin-top: 28px; }
}

/* ---------- Emergency ---------- */
.emergency { padding-block: var(--section-pad); }
.emergency__frame {
  border: 1px solid var(--brass);
  border-radius: 2px;
  padding: clamp(24px, 5.4vw, 76px);
}
.emergency__head { display: grid; gap: clamp(18px, 2vw, 28px); }
.emergency__title {
  font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -.02em;
}
.emergency__lead {
  max-width: 54ch;
  font-size: clamp(1.0625rem, .95rem + .45vw, 1.3125rem);
  line-height: 1.6;
  color: var(--muted);
}
.ecards { margin-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--rule); }
.ecard { padding: 26px 0 30px; }
.ecard + .ecard { border-top: 1px solid var(--rule); }
.ecard__title {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.125rem);
  font-weight: 600;
  line-height: 1.1;
}
.ecard p { max-width: 62ch; font-size: 16.5px; line-height: 1.65; color: var(--muted); }
.emergency__call {
  display: grid;
  gap: 22px;
  align-items: center;
  padding-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--rule);
}
.btn--xl {
  min-height: 80px;
  padding: 16px 36px 16px 30px;
  gap: 16px;
  justify-content: flex-start;
  text-align: left;
}
.btn--xl .icon { width: 24px; height: 24px; stroke-width: 1.7; }
.btn__text { display: grid; gap: 2px; }
.btn__label { font-size: 19px; font-weight: 700; line-height: 1.2; }
.btn__sub { font-size: 15px; font-weight: 500; letter-spacing: .02em; }
.emergency__hours {
  max-width: 56ch;
  font-size: clamp(1.0625rem, 1rem + .2vw, 1.1875rem);
  line-height: 1.6;
  color: var(--muted);
}
.emergency__hours strong { display: block; margin-bottom: 4px; color: var(--cream); }
.emergency__note { margin-top: 28px; font-size: 14px; line-height: 1.5; color: var(--faint); }

@media (max-width: 767.98px) {
  .btn--xl { width: 100%; padding: 14px 20px; justify-content: center; }
  .btn__label { font-size: 18px; }
}
@media (max-width: 480px) {
  .emergency__frame { padding: 28px 20px 24px; }
}
@media (min-width: 768px) {
  .emergency__call { justify-items: start; }
}
@media (min-width: 1024px) {
  .emergency__call { grid-template-columns: auto minmax(0, 1fr); gap: 40px; }
}
/* 768–1199: one card per row (title · text); three columns only from 1200, where they stay readable.
   57ch, not 58ch: 58ch let a line reach 71 characters at 1024–1199 (limit 70); 57ch gives ≤ 67 */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .ecard { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 28px; }
  .ecard__title { margin: 0; }
  .ecard p { max-width: 57ch; }
}
@media (min-width: 1200px) {
  .ecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ecard { padding: 36px 36px 44px 0; }
  .ecard + .ecard { padding-left: 36px; border-top: 0; border-left: 1px solid var(--rule); }
  .ecard:last-child { padding-right: 0; }
}

/* ---------- About ---------- */
.about__grid { display: grid; gap: 40px; }
.about__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 2px;
  background: rgba(20, 22, 26, .06);
}
.about__body p { max-width: 62ch; }
.about__body p + p { margin-top: 1.1em; }
.about__list { max-width: 62ch; margin-top: .55em; }
.about__list li { position: relative; padding-left: 30px; }
.about__list li + li { margin-top: .4em; }
.about__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .82em;
  width: 18px;
  height: 1px;
  background: var(--brass);
}
.about__principles { margin-top: clamp(40px, 5vw, 64px); }
.about__subtitle {
  margin-bottom: 18px;
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
  font-weight: 600;
  line-height: 1.12;
}
.principles { max-width: 62ch; border-top: 1px solid var(--rule); }
.principles li { position: relative; padding: 17px 0 17px 48px; border-bottom: 1px solid var(--rule); }
.principles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(17px + .82em);
  width: 28px;
  height: 1px;
  background: var(--brass);
}
.requisites {
  max-width: 62ch;
  margin-top: clamp(40px, 5vw, 56px);
  padding-left: 20px;
  border-left: 1px solid var(--brass);
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.requisites__org { color: var(--fg); font-weight: 600; }
@media (min-width: 768px) {
  .about__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6.5vw, 104px); align-items: start; }
  .about__media { position: sticky; top: calc(var(--header-h) + 40px); }
  .about__body p:first-child { font-size: 1.1em; line-height: 1.6; }
}
/* Phones: the heading comes first, then the photo (the menu jump to #about lands on the heading) */
@media (max-width: 767.98px) {
  .about__grid { display: flex; flex-direction: column; gap: 0; }
  .about__text { display: contents; }
  .about__text > .section-title { order: 0; }
  .about__grid > .about__media { order: 1; margin-bottom: 40px; }
  .about__text > :not(.section-title) { order: 2; }
}

/* ---------- Practice ---------- */
.practice__group + .practice__group { margin-top: clamp(56px, 7vw, 104px); }
.group-title {
  margin-bottom: clamp(24px, 3vw, 40px);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.625rem);
  line-height: 1.1;
}
.cards { display: grid; gap: 40px clamp(24px, 3.4vw, 56px); }
.card, .format { position: relative; padding-top: 24px; border-top: 1px solid var(--rule); }
.card::before, .format::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 40px;
  height: 1px;
  background: var(--brass);
}
.card__title {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 1.3rem + .6vw, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
}
.card p { max-width: 62ch; font-size: 16px; line-height: 1.65; color: var(--muted); }
@media (min-width: 768px)  { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Process ---------- */
.steps { display: grid; counter-reset: step; }
.step { position: relative; counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero);
  font: 500 48px/1 var(--serif);
  font-variant-numeric: lining-nums;
  letter-spacing: -.01em;
  color: var(--brass);
}
.step__title {
  margin-bottom: 10px;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
}
.step p { font-size: 16px; line-height: 1.6; color: var(--muted); }
/* < 768: vertical list on a brass thread */
@media (max-width: 767.98px) {
  .step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 14px;
    padding-bottom: 36px;
  }
  .step::before { grid-row: 1 / span 2; font-size: 40px; }
  .step::after {
    content: "";
    position: absolute;
    left: 20px; top: 54px; bottom: 14px;
    width: 1px;
    background: var(--rule);
  }
  .step > * { grid-column: 2; }
  .step:last-child { padding-bottom: 0; }
  .step:last-child::after { display: none; }
}
/* 768–1199: rows — number · title · text */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .steps { border-top: 1px solid var(--rule); }
  .step {
    display: grid;
    grid-template-columns: 76px minmax(0, 4fr) minmax(0, 7fr);
    column-gap: 24px;
    align-items: baseline;
    padding: 28px 0 30px;
    border-bottom: 1px solid var(--rule);
  }
  .step::before { font-size: 40px; }
  .step__title { margin: 0; }
  .step p { max-width: 58ch; }   /* 60ch reached 71 characters per line at 1100–1199 (limit 70) */
}
/* ≥ 1200: horizontal ribbon */
@media (min-width: 1200px) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 32px; }
  .step::before { display: block; margin-bottom: 32px; }
  .step::after {
    content: "";
    position: absolute;
    top: 24px; left: 72px; right: -20px;
    height: 1px;
    background: var(--rule);
  }
  .step:last-child::after { display: none; }
}

/* ---------- Pricing ---------- */
.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head .section-title { margin-bottom: 0; }
@media (min-width: 1024px) {
  .section-head { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: end; }
}
.formats { display: grid; gap: 40px clamp(24px, 3.4vw, 56px); }
.format { padding-top: 28px; }
.format__title {
  margin-bottom: 14px;
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
}
.format p { max-width: 52ch; font-size: 16.5px; line-height: 1.65; color: var(--muted); }
@media (min-width: 768px) and (max-width: 1023.98px) {
  .formats { row-gap: 0; }
  .format { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: 32px; padding: 28px 0 32px; }
  .format__title { margin: 0; }
}
@media (min-width: 1024px) { .formats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; }
.faq__list { border-top: 1px solid var(--rule); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  list-style: none;
  cursor: pointer;
  font: 600 clamp(1.5rem, 1.3rem + .6vw, 1.75rem)/1.25 var(--serif);
  letter-spacing: -.005em;
  transition: color var(--t) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::marker { content: ""; }
@media (hover: hover) { .faq__q:hover { color: var(--brass-ink); } }
.faq__q:focus-visible { outline-offset: 4px; }
.faq__q-text { text-wrap: balance; }
.faq__icon { position: relative; flex: none; width: 22px; height: 22px; margin-top: .25em; }
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: transform 200ms var(--ease);
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__a { padding: 0 46px 28px 0; }
.faq__a p { max-width: 58ch; color: var(--muted); }
@media (min-width: 1024px) {
  .faq__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .faq .section-title { position: sticky; top: calc(var(--header-h) + 40px); }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    .faq__item::details-content {
      block-size: 0;
      overflow-y: clip;
      transition: block-size 260ms var(--ease), content-visibility 260ms allow-discrete;
    }
    .faq__item[open]::details-content { block-size: auto; }
  }
}

/* ---------- Contacts ---------- */
.contacts__grid { display: grid; gap: 40px; }
.contacts__org {
  max-width: none;
  margin-bottom: 28px;
  font: 500 clamp(1.625rem, 1.3rem + 1vw, 2.125rem)/1.2 var(--serif);
  letter-spacing: -.01em;
  text-wrap: balance;
}
.contact-list { border-top: 1px solid var(--rule); }
.contact-row { display: grid; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.contact-row dt {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brass);
}
.contact-row dd { font-size: 17px; line-height: 1.6; }
.contact-row a {
  text-decoration: underline;
  text-decoration-color: rgba(247, 245, 242, .3);
  transition: color var(--t) var(--ease), text-decoration-color var(--t) var(--ease);
}
/* every contact link is its own ≥ 44px tap row; inline-flex (not inline-block) keeps the baseline
   on the first line, so the label stays level with the first line of a wrapped address */
.contact-row dd a { display: inline-flex; padding-block: 10px; }
@media (hover: hover) { .contact-row a:hover { color: var(--brass); text-decoration-color: var(--brass); } }
.contact-row__phone { font-weight: 600; }
.contact-row__urgent { color: var(--brass); }
/* Map: a quiet panel until the visitor asks for the map; main.js then lays the iframe over it,
   so the box keeps its size (no overflow: hidden on purpose — the focus ring must show). */
.contacts__map { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 340px; border: 1px solid var(--rule); border-radius: 2px; background: rgba(247, 245, 242, .035); }
.map-ph { display: grid; justify-items: start; gap: clamp(18px, 2.4vw, 28px); padding: clamp(20px, 3.2vw, 44px); }
.map-ph__addr { max-width: 20ch; font: 500 clamp(1.375rem, 1.15rem + 1.1vw, 2.125rem)/1.18 var(--serif); letter-spacing: -.01em; font-variant-numeric: lining-nums; text-wrap: balance; }
.map-ph__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.map-ph__route { display: inline-flex; align-items: center; min-height: 44px; color: var(--brass); text-decoration: underline; text-decoration-color: rgba(176, 141, 87, .5); transition: text-decoration-color var(--t) var(--ease); }
@media (hover: hover) { .map-ph__route:hover { text-decoration-color: var(--brass); } }
.contacts__map.is-loaded .map-ph { visibility: hidden; }
.contacts__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1);
}
@media (min-width: 480px) {
  .contact-row { grid-template-columns: 136px minmax(0, 1fr); gap: 16px; align-items: baseline; }
}
/* no aspect-ratio here: with the panel's content-based minimum it widened the box past 320px */
@media (max-width: 767.98px) { .contacts__map { min-height: 260px; } }
/* tablet: one column (details, then the map panel at full width) */
@media (min-width: 768px) and (max-width: 1023.98px) { .contacts__map { min-height: 360px; } }
@media (min-width: 1024px) {
  .contacts__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
}
@media (min-width: 1200px) {
  .contacts__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
}

/* ---------- Footer (shared) ---------- */
.site-footer {
  padding-block: 48px 52px;
  border-top: 1px solid var(--rule-soft);
  font-size: 14px;
  line-height: 1.65;
  color: var(--faint);
}
.site-footer__inner { display: grid; gap: 14px; }
/* balance: the greedy wrap leaves a 72-character middle line (digits and «·» are narrow); balanced, ≤ 66 */
.site-footer__org { max-width: 62ch; color: var(--muted); text-wrap: balance; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0 28px; }
.site-footer__links a { display: inline-block; padding-block: 12px; }
.site-footer__note { max-width: 62ch; }
.site-footer a {
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: rgba(247, 245, 242, .32);
  transition: color var(--t) var(--ease), text-decoration-color var(--t) var(--ease);
}
@media (hover: hover) { .site-footer a:hover { color: var(--brass); text-decoration-color: var(--brass); } }

/* ---------- Sub-pages: privacy.html, 404.html ---------- */
.page-doc { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.doc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--rule-soft);
}
.doc-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100%; }
.doc-header__phone {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t) var(--ease);
}
@media (hover: hover) { .doc-header__phone:hover { color: var(--brass); } }
@media (max-width: 479.98px) { .doc-header .brand__label { display: none; } }
.doc { flex: 1 0 auto; padding-block: clamp(48px, 7vw, 104px) clamp(64px, 8vw, 120px); }
/* aligned with the brand and the footer (left edge of the container), text lines ≤ 70 characters */
.prose { max-width: 760px; margin-inline: 0; }
/* em, not rem: 576px at the 18px desktop size, 544px at 17px below 1024 (36rem gave 74 characters there) */
.prose :is(p, ul, ol) { max-width: 32em; }
.prose > :first-child { margin-top: 0; }
.prose h1 {
  margin-bottom: 20px;
  font-size: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -.018em;
}
.prose h2 {
  margin: 2.2em 0 .6em;
  font-size: clamp(1.625rem, 1.35rem + 1vw, 2.125rem);
  font-weight: 600;
  line-height: 1.15;
}
.prose h3 { margin: 1.6em 0 .5em; font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.prose p, .prose ul, .prose ol, .prose table { margin: 0 0 1em; }
.prose .prose-meta { margin-bottom: 40px; font-size: 15px; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--brass-ink); }
.prose a { color: var(--brass-ink); text-decoration: underline; }
@media (hover: hover) { .prose a:hover { color: var(--graphite); } }
.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}
.prose th, .prose td { padding: 12px 20px 12px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { font-weight: 600; }

/* ---------- Motion: soft reveal (main.js marks only below-the-fold items) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .is-pending { opacity: 0; transform: translate3d(0, 16px, 0); }
  .is-revealed { transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
  .cards > .is-revealed:nth-child(3n+2),
  .ecards > .is-revealed:nth-child(2),
  .formats > .is-revealed:nth-child(2),
  .steps > .is-revealed:nth-child(2) { transition-delay: 90ms; }
  .cards > .is-revealed:nth-child(3n),
  .ecards > .is-revealed:nth-child(3),
  .formats > .is-revealed:nth-child(3),
  .steps > .is-revealed:nth-child(3) { transition-delay: 180ms; }
  .steps > .is-revealed:nth-child(4) { transition-delay: 270ms; }
  .steps > .is-revealed:nth-child(5) { transition-delay: 360ms; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .callbar, .skip-link, .contacts__map, .hero__actions { display: none !important; }
  body, .tone-dark, .tone-deep, .tone-light, .site-footer, .doc-header { background: none !important; color: var(--graphite) !important; }
  .hero__media { position: static; max-width: 40%; }
  .hero__media::after { display: none; }
  /* paper: graphite text (cream tokens would print near-white), every block visible */
  html { background: none; }
  body, .tone-dark, .tone-deep, .tone-light, .site-footer, .doc-header, .doc { --fg: #14161A; --muted: rgba(20, 22, 26, .78); --faint: rgba(20, 22, 26, .7); --rule: rgba(20, 22, 26, .25); --accent: #7D5F32; }
  .is-pending { opacity: 1 !important; transform: none !important; }
  .hero__subtitle, .facts li, .emergency__hours strong, .site-footer a, .doc-header__phone { color: #14161A !important; }
  .brand__mark, .hero__req-org, .contact-row dt, .contact-row__urgent, .step::before { color: #7D5F32 !important; }
}
