/* РеставраТор v4 (v3 + раздел «Статьи»). Материалы мастерской: тёмный орех, бумага, зелёное сукно письменного стола (кнопки), латунь (мелкие акценты).
   Композиция: крупные фото работ, текст узкой колонкой, тёмные секции для людей и контактов. */
:root {
  --paper: #f3eee6;
  --paper-2: #e9e1d4;
  --card: #fbf8f3;
  --ink: #2a1f18;
  --ink-2: #6a5a4c;
  --line: #d8ccba;
  --walnut: #251b15;
  --walnut-2: #3a2c22;
  --on-dark: #efe6da;
  --on-dark-2: #b9a998;
  --sukno: #2f5443;
  --sukno-h: #24443a;
  --brass: #a8844a;
  --f-head: 'Lora', 'Georgia', 'Times New Roman', serif; /* v14: шрифт заголовков Lora — выбор владельца 04.10.2026 (вариант 3) */
  --f-text: 'IBM Plex Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --hd: 72px;
  --r: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hd) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--f-text); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
h1 { font-size: clamp(34px, 5vw, 60px); }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: 22px; line-height: 1.2; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--card); padding: 8px 12px; }
.muted { color: var(--ink-2); }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; max-width: 38em; }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); font-weight: 600; margin-bottom: 14px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: var(--r);
  background: var(--sukno); color: #f4efe6; font: 600 16px/1.2 var(--f-text); text-decoration: none; border: 1px solid var(--sukno); cursor: pointer; transition: background .2s; }
.btn:hover { background: var(--sukno-h); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.link { font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 28px; }
.action-line { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.action-line .muted { flex: 1 1 280px; }

/* Шапка */
.hd { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hd-in { display: flex; align-items: center; gap: 24px; height: var(--hd); }
.logo { font: 700 25px/1 var(--f-head); text-decoration: none; letter-spacing: .01em; flex-shrink: 0; }
.logo span { color: var(--brass); }
.logo small { display: block; max-width: 230px; font: 400 11.5px/1.3 var(--f-text); color: var(--ink-2); letter-spacing: .02em; margin-top: 5px; }
.nav { display: flex; gap: clamp(12px, 1.4vw, 24px); margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--ink); }
.hd-phone { font-weight: 600; text-decoration: none; white-space: nowrap; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; position: relative; cursor: pointer; margin-left: 4px; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); content: ""; transition: transform .2s; }
.burger span { top: 21px; } .burger span::before { top: -7px; left: 0; } .burger span::after { top: 7px; left: 0; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }
.mnav { display: grid; gap: 4px; padding: 12px var(--gut) 24px; border-top: 1px solid var(--line); background: var(--paper); }
.mnav a:not(.btn) { padding: 12px 0; font-size: 18px; text-decoration: none; border-bottom: 1px solid var(--line); }
.mnav .btn { margin-top: 16px; }
.mnav[hidden] { display: none; }
@media (min-width: 1181px) { .mnav { display: none; } }
@media (max-width: 1400px) { .hd-cta { display: none; } .logo small { max-width: 190px; } }
@media (max-width: 1180px) { .nav { display: none; } .burger { display: block; } .hd-phone { margin-left: auto; } }
@media (max-width: 420px) { .logo small { display: none; } .hd-phone { font-size: 15px; } }

/* Нижняя панель связи (телефон) */
.mbar { display: none; }
@media (max-width: 760px) {
  .mbar { display: grid; grid-template-columns: 1.3fr 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--walnut); padding-bottom: env(safe-area-inset-bottom, 0px); border-top: 1px solid var(--walnut-2); }
  .mbar a { color: var(--on-dark); text-decoration: none; text-align: center; padding: 15px 4px; font-weight: 600; font-size: 15px; }
  .mbar a + a { border-left: 1px solid var(--walnut-2); }
  .mbar .mbar-call { background: var(--sukno); color: #f4efe6; }
  body { padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
}

/* Секции */
.sec { padding-block: clamp(64px, 8vw, 112px); }
.sec--paper2 { background: var(--paper-2); }
.sec--dark { background: var(--walnut); color: var(--on-dark); }
.sec--dark .muted, .sec--dark .sh p { color: var(--on-dark-2); }
.sec--dark .btn--ghost { color: var(--on-dark); border-color: var(--on-dark); }
.sh { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 8px 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
.sh .eyebrow { grid-column: 1 / -1; margin: 0; }
.sh p:not(.eyebrow) { color: var(--ink-2); max-width: 32em; }
@media (max-width: 860px) { .sh { grid-template-columns: 1fr; } }

/* Первый экран */
.hero { padding-block: clamp(36px, 5vw, 72px) clamp(40px, 5vw, 64px); }
.hero-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero-text .lead { margin-top: 22px; }
.msg-line { margin-top: 18px; color: var(--ink-2); }
.hero-fig { margin: 0; }
.hero-fig .ba { max-height: min(78svh, 720px); margin-inline: auto; }
.hero-fig figcaption { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.facts { list-style: none; margin: clamp(32px, 4vw, 52px) 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 28px; }
.facts li { display: grid; gap: 2px; }
.facts b { font-family: var(--f-head); font-size: 20px; }
.facts span { font-size: 14px; color: var(--ink-2); }
.facts--inline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; } .hero-fig { order: -1; } .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .hero-fig .ba { max-height: 62svh; } .hero .actions .btn { flex: 1 1 100%; } }

/* До/после */
.ba { position: relative; overflow: hidden; border-radius: var(--r); background: var(--paper-2); max-width: 100%; --pos: 50%; user-select: none; touch-action: pan-y; }
.ba .pic, .ba picture, .ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fffaf2; box-shadow: 0 0 0 1px rgba(0,0,0,.15); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: #fffaf2; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.ba-knob::before, .ba-knob::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent; }
.ba-knob::before { left: 7px; border-right-color: var(--ink); }
.ba-knob::after { right: 7px; border-left-color: var(--ink); }
.ba-tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 2px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; background: rgba(37,27,21,.72); color: #f4efe6; pointer-events: none; }
.ba-tag--b { left: 12px; } .ba-tag--a { right: 12px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba-range:focus-visible + * , .ba:focus-within .ba-knob { outline: 2px solid var(--brass); outline-offset: 2px; }

/* Кейсы */
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 4vw, 56px) clamp(24px, 3vw, 40px); }
.case { display: grid; gap: 18px; align-content: start; }
.case .ba { max-height: 640px; }
.case-cat { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); font-weight: 600; margin-bottom: 6px; }
.case-place { color: var(--ink-2); text-transform: none; letter-spacing: 0; font-weight: 500; }
.case-place::before { content: " · "; }
.case-dl { margin: 12px 0 0; display: grid; gap: 8px; }
.case-dl div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
.case-dl dt { font-weight: 600; color: var(--ink-2); font-size: 15px; }
.case-dl dd { margin: 0; }
.case-proc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.case-proc figure { margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: 2px; }
.case-proc img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .cases { grid-template-columns: 1fr; } .case-dl div { grid-template-columns: 1fr; gap: 0; } }

/* О мастерской */
.about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.about > div:first-child > * + * { margin-top: 18px; }
.about h2 { margin-bottom: 6px; }
.obj-h { font-weight: 600; margin-top: 28px !important; }
.objects { list-style: none; padding: 0; margin: 10px 0 0; columns: 2; column-gap: 32px; }
.objects li { padding: 7px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.about-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about-pics figure { margin: 0; }
.about-pics figure:nth-child(2) { margin-top: 48px; }
.about-pics .pic img, .pic[style] img { width: 100%; height: 100%; object-fit: cover; }
.pic[style] { display: block; overflow: hidden; border-radius: var(--r); }
.about-pics figcaption { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .objects { columns: 1; } }

/* Услуги */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.services li { border-bottom: 1px solid var(--line); }
.services li:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); }
.services a { display: grid; gap: 6px; padding: 22px 22px 26px; text-decoration: none; height: 100%; transition: background .2s; }
.services a:hover { background: var(--card); }
.sv-t { font: 700 21px/1.2 var(--f-head); }
.sv-t::after { content: " →"; color: var(--brass); }
.sv-d { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 900px) { .services { grid-template-columns: 1fr; } .services li:not(:nth-child(3n+1)) { border-left: 0; } .services a { padding-inline: 0; } }

/* Преимущества */
.perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 40px; }
.perks li { border-top: 2px solid var(--ink); padding-top: 18px; }
.perks p { margin-top: 10px; color: var(--ink-2); }

/* Люди */
.lead-person { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 64px); align-items: center; margin-bottom: 56px; }
.lead-person > div > * + * { margin-top: 14px; }
.lead-person h3 { font-size: clamp(30px, 3vw, 40px); }
.tm-r { color: var(--brass); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.team { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.tm { display: grid; gap: 8px; align-content: start; }
.tm .pic { margin-bottom: 8px; filter: saturate(.85); }
.tm-t { color: var(--on-dark-2); font-size: 15px; line-height: 1.55; }
.discount { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--walnut-2); color: var(--on-dark-2); }
.discount a { color: var(--on-dark); font-weight: 600; }
@media (max-width: 1100px) { .team { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .lead-person { grid-template-columns: 1fr; }
  .scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px;
    margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); scroll-padding-inline: var(--gut); padding-bottom: 6px; }
  .scroller > * { scroll-snap-align: start; }
}

/* Порядок работы */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 0; padding: 22px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); grid-row: span 2; font: 700 32px/1 var(--f-head); color: var(--brass); }
.steps p { color: var(--ink-2); margin-top: 6px; }
.steps li > p:only-of-type:first-child { color: var(--ink); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Отзывы */
.reviews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.rv { margin: 0; padding: 22px; background: var(--card); border-radius: var(--r); display: grid; gap: 16px; align-content: space-between; }
.rv p { font-size: 15.5px; line-height: 1.6; }
.rv footer { display: grid; font-size: 14px; }
.rv footer span { color: var(--ink-2); }
@media (max-width: 1100px) { .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* FAQ */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; }
.faq-g h3 { font-size: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 24px; font-weight: 400; color: var(--brass); }
.faq details[open] summary::after { content: "−"; }
.ans { padding: 0 0 18px; color: var(--ink-2); max-width: 62ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* Финальный блок и форма */
.final-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.final-in .lead { margin-top: 18px; color: var(--on-dark-2); }
.contacts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.contacts li { display: grid; gap: 2px; }
.c-l { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.c-msg { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; }
.c-big { font: 700 clamp(26px, 3vw, 34px)/1.15 var(--f-head); text-decoration: none; }
.sec--dark .muted { color: var(--on-dark-2); }
.after { margin: 28px 0 0; padding-left: 20px; color: var(--on-dark-2); display: grid; gap: 6px; }
.form { background: var(--card); color: var(--ink); padding: clamp(22px, 3vw, 36px); border-radius: var(--r); display: grid; gap: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, .lbl { font-size: 14px; font-weight: 600; }
.req { font-weight: 400; color: var(--ink-2); }
.field input, .field textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-height: 50px; width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--sukno); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sukno) 20%, transparent); }
.field [aria-invalid="true"] { border-color: #a23b2a; }
.file { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border: 1px dashed var(--ink-2); border-radius: var(--r); cursor: pointer; font-weight: 600; width: fit-content; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hint { font-size: 14px; color: var(--ink-2); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.status { padding: 12px 14px; border-radius: var(--r); background: var(--paper-2); font-size: 15px; }
@media (max-width: 860px) { .final-in { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; } .form .btn { width: 100%; } }

/* Страница работ */
.page-head { padding-block: clamp(36px, 5vw, 64px) 8px; }
.page-head h1 { margin-top: 14px; }
.page-head .lead { margin-top: 16px; }
.crumbs { font-size: 14px; color: var(--ink-2); }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.filter button { font: 500 15px/1 var(--f-text); padding: 12px 16px; min-height: 44px; border-radius: 40px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.anchor { position: absolute; }
[data-cat][hidden] { display: none !important; }
.stories { display: grid; gap: 40px; }
.story { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 28px; align-items: center; }
.story-pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.story-pics figure { margin: 0; aspect-ratio: 3/4; overflow: hidden; border-radius: 2px; }
.story-pics img { width: 100%; height: 100%; object-fit: cover; }
.story p:not(.case-cat) { margin-top: 10px; color: var(--ink-2); }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 18px; }
.gi { margin: 0; }
.gi picture { display: block; aspect-ratio: 4/5; overflow: hidden; border-radius: 2px; background: var(--paper-2); }
.gi img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gi:hover img { transform: scale(1.03); }
.gi figcaption { margin-top: 10px; font-size: 15px; display: grid; }
.gi figcaption span { font-size: 13px; color: var(--ink-2); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* /wood */
.wood-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-bottom: clamp(40px, 5vw, 72px); }
.wood-head figure { margin: 0; }
.founder { max-width: 860px; }
.founder h2 { margin-bottom: 20px; }
.quote { margin: 32px 0 0; padding-left: 24px; border-left: 3px solid var(--brass); font: 500 clamp(20px, 2vw, 25px)/1.45 var(--f-head); }
@media (max-width: 860px) { .wood-head { grid-template-columns: 1fr; } }

/* Политика */
.prose { max-width: 820px; }
.prose h1 { font-size: clamp(30px, 4vw, 44px); margin-block: 14px 24px; }
.prose h2 { font-size: 22px; margin-top: 32px; }
.prose p { margin-top: 12px; color: var(--ink-2); }

/* Подвал */
.ft { background: var(--walnut); color: var(--on-dark-2); padding-block: 56px 28px; border-top: 1px solid var(--walnut-2); }
.ft-in { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr 1fr; gap: 32px; }
.ft a { color: var(--on-dark); }
.logo--ft { color: var(--on-dark); margin-bottom: 10px; }
.ft-h { color: var(--brass); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; margin-bottom: 8px; }
.ft-legal { margin-top: 40px; font-size: 13px; }
@media (max-width: 900px) { .ft-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ft-in { grid-template-columns: 1fr; } }

/* Появление при прокрутке: блок виден изначально, анимация только если JS отметил его */
.rv-in { animation: rise .6s ease both; }
@keyframes rise { from { opacity: .001; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- v3: кнопки связи по очереди после разделов (стандарт владельца для всех сайтов, 02–03.10.2026) ----------
   Позвонить — зелёный «цвет звонка» #1A7F3C (контраст с белым 5,07:1); Telegram — градиент логотипа telegram.org;
   MAX — фирменная кнопка max.ru. Цвета одинаковые на светлых и тёмных разделах. */
.section-contact { margin-top: clamp(32px, 4vw, 56px); }
.contact-btn { white-space: nowrap; }
@media (max-width: 420px) { .contact-btn { white-space: normal; text-align: center; } }
.contact-btn[data-contact-kind="phone"] { background: linear-gradient(180deg, #1E8E3E 0%, #1A7F3C 100%); border-color: #1A7F3C; color: #fff; font-weight: 700; }
.contact-btn[data-contact-kind="phone"]:hover { background: linear-gradient(180deg, #1A7F3C 0%, #146C34 100%); }
.contact-btn[data-contact-kind="telegram"] { background: linear-gradient(180deg, #2AABEE 0%, #229ED9 100%); border-color: #229ED9; color: #fff; font-weight: 700; text-shadow: 0 1px 1px rgba(0, 0, 0, .28); }
.contact-btn[data-contact-kind="telegram"]:hover { background: linear-gradient(180deg, #229ED9 0%, #1A8BC2 100%); }
.contact-btn[data-contact-kind="max"] { background: linear-gradient(135deg, #007AFF 0%, #7C42FA 65%, #8D28C8 100%); border-color: transparent; color: #fff; font-weight: 700; }
.contact-btn[data-contact-kind="max"]:hover { background: linear-gradient(135deg, #006AE0 0%, #6C35E6 65%, #7A1FB0 100%); }
.contact-btn[data-contact-kind]:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
@media (max-width: 760px) { .section-contact .contact-btn, .action-line .contact-btn { width: 100%; } }
/* Нижняя панель на телефоне: звонок зелёный, Telegram — фирменный */
@media (max-width: 760px) {
  .mbar .mbar-call { background: linear-gradient(180deg, #1E8E3E 0%, #1A7F3C 100%); color: #fff; }
  .mbar .mbar-tg { background: linear-gradient(180deg, #2AABEE 0%, #229ED9 100%); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .28); }
}
.ft-legal p + p { margin-top: 8px; }

/* ---------- v3: крупный текст на компьютере (решение владельца, 02.10.2026): 14→16, 20→24 px и пропорционально.
   H1/H2 и шапку не трогаем (меню, телефон и кнопка уже занимают ширину шапки). Мобильная версия без изменений. ---------- */
@media (min-width: 1181px) {
  body { font-size: 20px; }
  .lead { font-size: 24px; }
  h3 { font-size: 25px; }
  .eyebrow, .case-cat, .c-l, .ft-h { font-size: 15px; }
  .btn { font-size: 18px; }
  .hd .btn--sm { font-size: 15px; }
  .hero-fig figcaption, .about-pics figcaption, .facts span, .tm-r, .rv footer, .field label, .lbl, .hint, .crumbs { font-size: 16px; }
  .facts b { font-size: 24px; }
  .case-dl dt, .tm-t, .status, .filter button, .gi figcaption { font-size: 17px; }
  .gi figcaption span, .ft-legal { font-size: 15px; }
  .sv-t { font-size: 24px; }
  .sv-d, .rv p { font-size: 18px; }
  .faq-g h3 { font-size: 24px; }
  .consent { font-size: 15.5px; }
  .prose h2 { font-size: 25px; }
}
/* Кнопка «Отправить фото» в шапке не помещалась в одну строку ни на одной ширине (в v2 переносилась на 2 строки) —
   скрыта; в шапке остаётся телефон, «Отправить фото на оценку» — в первом экране и в мобильном меню. */
.hd-cta { display: none; }

/* ---------- v4: статьи и юридические страницы ---------- */
.art-sec { padding-top: 8px; }
.article-body { max-width: 760px; }
.article-body > p, .article-body li { color: var(--ink); }
.article-body h2 { font-size: clamp(26px, 3vw, 34px); margin-top: 44px; }
.article-body h3 { margin-top: 24px; font-size: 21px; }
.article-body ul, .doc ul { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 8px; color: var(--ink-2); }
.doc h3 { margin-top: 22px; font-size: 20px; }
.doc .lead { margin-top: 4px; color: var(--ink); }
.doc .muted { margin-top: 10px; }
.art-meta { margin-top: 18px; }
.art-figs { display: grid; gap: 12px; margin: 26px 0 6px; }
.art-figs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.art-figs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.art-figs figure { margin: 0; }
.art-figs--2 picture, .art-figs--3 picture { display: block; aspect-ratio: 3/4; overflow: hidden; border-radius: 2px; }
.art-figs--2 img, .art-figs--3 img { width: 100%; height: 100%; object-fit: cover; }
.art-figs figcaption, .art-case figcaption { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.art-case { margin: 26px 0 6px; max-width: 560px; }
.doc-contact { margin-top: 32px !important; }
.art-author { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.art-author p { margin: 0 !important; }
.art-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.art-card { display: grid; gap: 10px; align-content: start; }
.art-card h2 { font-size: clamp(22px, 2vw, 26px); }
.art-card h2 a { text-decoration: none; }
.art-card h2 a:hover { text-decoration: underline; }
@media (max-width: 900px) { .art-list { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .art-figs--3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1181px) { .art-figs figcaption, .art-case figcaption { font-size: 16px; } .article-body h3 { font-size: 24px; } }
/* v4: пункт «Статьи» в меню — шапка не помещалась (1181 px: +39 px, 1440: +45, 1920: +72). Шрифт не меняем, сужаем промежутки и подпись логотипа. */
@media (min-width: 1181px) {
  .nav { gap: 16px; }
  .hd-in { gap: 18px; }
  .logo small { max-width: 175px; }
}
@media (min-width: 1181px) and (max-width: 1279px) { .nav { gap: 11px; } .hd-in { gap: 14px; } }
.prose .lead { color: var(--ink); }

/* ---------- v12 (04.10.2026, стандарт владельца) ----------
   1) На телефоне кнопки в тексте страницы — на всю ширину: две кнопки подряд всегда одной ширины.
   2) WhatsApp — фирменный зелёный WhatsApp (#25D366 → #1DA851, whatsapp.com/brand); белый жирный текст с тенью, как у Telegram. */
@media (max-width: 760px) {
  main .btn { width: 100%; }
  .mbar .mbar-wa { background: linear-gradient(180deg, #25D366 0%, #1DA851 100%); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .3); }
}

/* «Философия и ценности» (/wood, 5 пунктов): на компьютере три сверху и два снизу, нижние — той же ширины, по центру (владелец, 04.10.2026) */
@media (min-width: 1024px) {
  .perks--3-2 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .perks--3-2 > li { grid-column: span 2; }
  .perks--3-2 > li:nth-child(4) { grid-column: 2 / span 2; }
}

/* Кнопка связи после блока «Основатель» — по краю колонки текста, а не страницы (владелец, 04.10.2026) */
.founder + .section-contact { max-width: 860px; }

/* Сотрудники: колонок столько, сколько людей (4 → 4), на планшете — 2 или 3 без «сирот»; ряд на всю ширину (владелец, 04.10.2026) */
.team { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
@media (max-width: 1100px) { .team { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 18px; } }
@media (max-width: 900px) { .team { grid-template-columns: repeat(var(--n2, 2), minmax(0, 1fr)); } }
/* Отзывы: на компьютере 2 колонки, у каждого — круглое фото автора, как на старом сайте */
.reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.rv footer { display: flex; align-items: center; gap: 14px; }
.rv-who { display: grid; }
.rv-who span { color: var(--ink-2); }
.rv .rv-ph { width: 56px; height: 56px; flex: none; border-radius: 50%; overflow: hidden; }
.rv .rv-ph img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .team.scroller, .reviews.scroller { grid-template-columns: none; } }

/* Просмотр фото на весь экран (v12) */
.zoomable { cursor: zoom-in; }
.zoomable:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: #140f0b; color: #f4efe6; }
.lb::backdrop { background: #140f0b; }
.lb-fig { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 64px 24px; gap: 12px; }
.lb-fig img { max-width: 100%; max-height: calc(100% - 48px); object-fit: contain; border-radius: 2px; }
.lb-cap { font-size: 16px; color: #d9cfc2; text-align: center; max-width: 60ch; }
.lb button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 50%; width: 52px; height: 52px; font-size: 32px; line-height: 1; cursor: pointer; }
.lb button:hover, .lb button:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }
.lb-x { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb--one .lb-prev, .lb--one .lb-next { display: none; }
.lb-n { position: absolute; top: 24px; left: 20px; margin: 0; font-size: 15px; color: #d9cfc2; }
@media (max-width: 760px) {
  .lb-fig { padding: 64px 8px 16px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

/* Отзывы на телефоне: не карусель, а список — 4 отзыва и кнопка «Показать все» (владелец, 04.10.2026) */
.rv-more { display: none; }
@media (max-width: 760px) {
  .reviews { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .reviews:not(.is-open) > .rv:nth-child(n+5) { display: none; }
  .rv-more { display: flex; width: 100%; margin-top: 16px; }
}

/* v12: колонок столько, сколько элементов — ряды всегда на всю ширину, без «сирот» (стандарт владельца 04.10.2026) */
.case-proc { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.story-pics { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.art-list { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.perks--n { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
@media (max-width: 1100px) { .perks--n { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.actions > .btn { flex: 1 1 0; }
@media (max-width: 760px) {
  .art-list, .perks--n { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) { .actions > .btn { flex: 1 1 100%; } }

/* v13: две кнопки рядом — строго одной ширины на компьютере (длинный текст «Позвонить +7…» не растягивает свою) */
@media (min-width: 761px) {
  .actions:not(:has(> :not(.btn))) { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}

/* v14: пара кнопок — текст в одну строку; не помещаются рядом — встают друг под другом, тоже одной ширины.
   Логотип Lora шире Alegreya — на телефоне чуть меньше, чтобы шапка не вылезала за экран. */
@media (min-width: 761px) {
  .actions:not(:has(> :not(.btn))) { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); max-width: 640px; }
  .actions > .btn { white-space: nowrap; padding: 0 18px; }
}
@media (max-width: 760px) { .logo { font-size: 22px; } }
@media (max-width: 400px) { .logo { font-size: 20px; } }
@media (max-width: 380px) { .hd-phone { font-size: 14px; } .logo { font-size: 19px; } }
/* v15: отзыв без фото — круг с первой буквой имени, в тон сайта */
.rv .rv-ph--letter { display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); font: 700 24px/1 var(--f-head); }
