/* Оформление общих частей всех страниц: меню на телефоне, «хлебные крошки», страница с текстом, карточки, подвал.
   Подключается на каждой странице после site.css. */

.page-hero__grid, .prose-grid, .foot__cols { grid-template-columns: minmax(0, 1fr); }

/* ── меню на телефоне ─────────────────────────────────────────────────────── */
.top__end { display: flex; align-items: center; gap: 10px; }
.menu > summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 4px; cursor: pointer; list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: rgba(244, 238, 230, .1); }
.menu__icon, .menu__icon::before, .menu__icon::after { display: block; width: 22px; height: 2px; border-radius: 4px; background: var(--cream); transition: transform .2s, background .2s; }
.menu__icon { position: relative; }
.menu__icon::before, .menu__icon::after { content: ""; position: absolute; left: 0; }
.menu__icon::before { top: -7px; }
.menu__icon::after { top: 7px; }
.menu[open] .menu__icon { background: transparent; }
.menu[open] .menu__icon::before { transform: translateY(7px) rotate(45deg); }
.menu[open] .menu__icon::after { transform: translateY(-7px) rotate(-45deg); }
.menu__panel { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100dvh - 66px); overflow-y: auto; overscroll-behavior: contain; padding: 6px var(--gutter) 26px; background: var(--dark); border-top: 1px solid rgba(244, 238, 230, .12); box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.menu__call { margin-top: 22px; }

/* дерево разделов: группы раскрываются по нажатию, все закрыты */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree { max-width: 620px; }
.tree > li { border-bottom: 1px solid rgba(244, 238, 230, .12); }
.tree summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 6px 4px; color: var(--cream); font: 500 21px/1.2 var(--serif); cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary::after { content: ""; flex: none; width: 9px; height: 9px; margin: -5px 8px 0 0; border-right: 2px solid var(--copper-light); border-bottom: 2px solid var(--copper-light); transform: rotate(45deg); transition: transform .2s, margin .2s; }
.tree details[open] > summary::after { margin-top: 5px; transform: rotate(-135deg); }
.tree summary:hover { color: #fff; }
.tree__group--l1 > ul { padding-bottom: 12px; }
.tree__group--l2 > summary { min-height: 48px; padding-left: 16px; color: var(--copper-light); font: 600 13px/1.2 var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.tree a { display: flex; align-items: center; min-height: 44px; padding: 8px 4px 8px 16px; color: #e9e1d6; font-size: 16px; line-height: 1.3; text-decoration: none; border-left: 2px solid transparent; }
.tree__group--l2 a { padding-left: 32px; font-size: 15.5px; }
.tree a:hover { color: #fff; background: rgba(244, 238, 230, .05); }
.tree a[aria-current="page"] { color: #fff; border-left-color: var(--copper); }
.tree .tree__all { color: var(--copper-light); font-weight: 600; }
.tree .tree__top { min-height: 54px; padding-left: 4px; color: var(--cream); font: 500 21px/1.2 var(--serif); }
@media (min-width: 1280px) { .menu { display: none; } }
@media (max-width: 420px) { .top__end .btn--small { display: none; } }

/* ── «хлебные крошки» ─────────────────────────────────────────────────────── */
.crumbs { padding-top: 18px; font-size: 13.5px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: #b9ad9d; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--copper-deep); text-decoration: underline; }

/* ── страница с текстом: первый экран ─────────────────────────────────────── */
.page-hero { padding-top: clamp(22px, 4vw, 44px); padding-bottom: clamp(30px, 5vw, 60px); }
.page-hero__grid { display: grid; gap: clamp(26px, 5vw, 56px); align-items: center; }
.page-hero h1 { font-size: clamp(36px, 7vw, 62px); }
.page-hero .lead { margin-top: 18px; }
.page-hero .actions { margin-top: 26px; }
.page-hero .facts div { grid-template-columns: 6.4em 1fr; }
@media (min-width: 900px) {
  .page-hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .page-hero__media { max-width: 440px; width: 100%; justify-self: end; }
}

/* ── текст и оглавление ───────────────────────────────────────────────────── */
.prose-wrap { padding-top: clamp(20px, 4vw, 40px); }
.prose-grid { display: grid; gap: 28px; align-items: start; }
.toc { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: 14.5px; }
.toc p { margin-bottom: 8px; color: var(--copper-deep); font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; list-style: decimal; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--copper-deep); text-decoration: underline; }
@media (min-width: 1000px) { .prose-grid { grid-template-columns: 250px minmax(0, 720px); gap: 56px; } .toc { position: sticky; top: 90px; } }
.prose { max-width: 720px; font-size: 17.5px; line-height: 1.7; color: #33302c; }
.prose section { scroll-margin-top: 90px; }
.prose section + section { margin-top: clamp(34px, 5vw, 52px); }
.prose h2 { margin-bottom: 14px; font-size: clamp(27px, 4.4vw, 36px); }
.prose h3 { margin: 22px 0 8px; font-size: 21px; }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + ol, .prose ol + p, .prose p + table, .prose table + p, .prose h3 + p { margin-top: 14px; }
.prose h3 + p { margin-top: 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--copper); }
.prose a { color: var(--copper-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--paper); color: var(--ink); font-weight: 600; }

/* ── карточки-ссылки ──────────────────────────────────────────────────────── */
.cards { display: grid; gap: clamp(22px, 3vw, 34px) clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); list-style: none; margin: 0; padding: 0; }
.card a { display: grid; align-content: start; gap: 6px; height: 100%; color: var(--ink); text-decoration: none; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; margin-bottom: 10px; background: #d8cfc3; transition: filter .3s; }
.card a:hover img { filter: brightness(1.06) saturate(1.05); }
.card b { font: 500 21px/1.22 var(--serif); }
.card b::after { content: " \2192"; color: var(--copper); transition: margin .2s; }
.card a:hover b { color: var(--copper-deep); }
.card span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.card--text a { gap: 8px; padding: 22px 22px 24px; border: 1px solid var(--line); border-top: 2px solid var(--copper); border-radius: 4px; background: #fff; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card--text a:hover { border-color: var(--copper); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20, 34, 56, .07); }
.section--paper .card--text a { background: var(--cream); }

/* ── мозаика покрытий: крупные надписи заглавными ─────────────────────────── */
.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 3vw, 34px) clamp(12px, 2vw, 24px); list-style: none; margin: 0; padding: 0; }
.mosaic__tile--wide { grid-column: span 2; }
.mosaic__tile a { display: grid; align-content: start; height: 100%; color: var(--ink); text-decoration: none; }
.mosaic__media { position: relative; display: block; overflow: hidden; border-radius: 4px; background: #d8cfc3; }
.mosaic__media img { width: 100%; height: clamp(180px, 30vw, 340px); object-fit: cover; transition: transform .7s ease; }
.mosaic__tile a:hover img { transform: scale(1.04); }
.mosaic .tag { position: absolute; top: 10px; left: 10px; }
@media (max-width: 619px) { .mosaic__tile:not(.mosaic__tile--wide) .tag { max-width: calc(100% - 16px); left: 8px; top: 8px; padding: 6px 7px 5px; font-size: 9.5px; line-height: 1.2; letter-spacing: .08em; white-space: normal; } }
.mosaic__num { margin-top: 14px; color: var(--copper-deep); font: 600 12.5px/1 var(--sans); letter-spacing: .14em; }
.mosaic__name { margin-top: 8px; color: var(--dark); font: 800 clamp(19px, 2.5vw, 32px)/.98 var(--sans); letter-spacing: -.005em; text-transform: uppercase; overflow-wrap: break-word; hyphens: manual; }
.mosaic__tile a:hover .mosaic__name { color: var(--copper-deep); }
.mosaic__text { margin-top: 8px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.mosaic + .swipe, .mosaic + .finishes { margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 900px) {
  .mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* широкая плитка: фото слева, крупная надпись справа внизу — как ячейки «… MATERIAL» */
  .mosaic__tile--wide a { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: 1fr auto auto auto; column-gap: 24px; }
  .mosaic__tile--wide .mosaic__media { grid-column: 1; grid-row: 1 / -1; height: 100%; }
  .mosaic__tile--wide img { height: 100%; min-height: clamp(180px, 30vw, 340px); }
  .mosaic__tile--wide .mosaic__num { grid-column: 2; grid-row: 2; }
  .mosaic__tile--wide .mosaic__name { grid-column: 2; grid-row: 3; font-size: clamp(20px, 1.9vw, 28px); }
  .mosaic__tile--wide .mosaic__text { grid-column: 2; grid-row: 4; }
}

/* ── кто свяжется ─────────────────────────────────────────────────────────── */
.contact-person { margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--copper); background: var(--paper); color: #33302c; font-size: 15.5px; line-height: 1.5; }
.contact-person b { color: var(--ink); }

/* ── подвал в несколько колонок ───────────────────────────────────────────── */
.foot__cols { display: grid; gap: 30px; }
.foot__title { margin: 0 0 10px; color: var(--copper-light); font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.foot__nav ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.foot__nav a { color: #d6d1c8; text-decoration: none; }
.foot__nav a:hover { color: #fff; text-decoration: underline; }
.foot__contact a { color: var(--cream); }
.foot__cols .foot__fine { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid rgba(244, 238, 230, .12); }
@media (min-width: 700px) { .foot__cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .foot__cols { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }

/* заголовок карточки покрытия на главной — ссылка на страницу покрытия */
.finish h3 a { color: inherit; text-decoration: none; }
.finish h3 a:hover { color: var(--copper-deep); }

/* ── версия 3: меньше шаблонности ─────────────────────────────────────────── */
@view-transition { navigation: auto; }                       /* плавный переход между страницами */
h1, h2 { letter-spacing: -0.02em; }
.link::after { content: none; }
.reveal, .reveal--in { animation: none; }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section__head h2 { max-width: 18em; }
/* блок из двух колонок: заголовок слева, содержимое справа */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.split__head h2 { font-size: clamp(28px, 4.4vw, 40px); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 64px; }
  .split__head { position: sticky; top: 100px; align-self: start; }
  #process > .wrap, section#faq > .wrap:not(.split) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 64px; align-items: start; }
  #process > .wrap > .section__head, section#faq > .wrap:not(.split) > .section__head { grid-row: 1 / span 3; position: sticky; top: 100px; margin-bottom: 0; }
  #process .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.split .faq { max-width: none; margin: 0; }
/* ссылки «смотрите также» — строками; при наведении всплывает фото */
.rel { border-top: 1px solid var(--line); }
.rel li { border-bottom: 1px solid var(--line); }
.rel a { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding: 16px 0; color: var(--ink); text-decoration: none; }
.rel b { font: 500 clamp(19px, 2.4vw, 24px)/1.2 var(--serif); transition: color .15s; }
.rel span { color: var(--muted); font-size: 15px; }
.rel a:hover b, .rel a:focus-visible b { color: var(--copper-deep); }
.rel__img { display: none; }
@media (hover: hover) and (min-width: 900px) {
  .rel__img { display: block; position: absolute; right: 0; top: 50%; z-index: 3; width: 150px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; box-shadow: 0 18px 40px -18px rgba(20, 34, 56, .55); opacity: 0; transform: translateY(-46%); pointer-events: none; transition: opacity .18s ease-out, transform .18s ease-out; }
  .rel a:hover .rel__img, .rel a:focus-visible .rel__img { opacity: 1; transform: translateY(-50%); }
}
/* фото-кнопка и просмотр на весь экран */
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 4px; }
.zoom img { transition: transform .5s cubic-bezier(.23, 1, .32, 1); }
.work .zoom, .shot .zoom { overflow: hidden; }
@media (hover: hover) { .zoom:hover img { transform: scale(1.025); } }
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(16, 22, 34, .96); }
.lightbox::backdrop { background: rgba(16, 22, 34, .96); }
.lightbox[open] { display: grid; place-items: center; animation: lightbox-in .22s cubic-bezier(.23, 1, .32, 1); }
.lightbox img { max-width: 96vw; max-height: 92vh; max-height: 92dvh; width: auto; height: auto; object-fit: contain; cursor: zoom-out; }
.lightbox__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(244, 238, 230, .14); color: var(--cream); font: 400 26px/1 var(--sans); cursor: pointer; }
.lightbox__close:hover { background: rgba(244, 238, 230, .26); }
@keyframes lightbox-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes lightbox-out { to { opacity: 0; transform: scale(.98); } }
.lightbox.is-closing { animation: lightbox-out .18s ease-in forwards; }
.lightbox img { opacity: 0; transition: opacity .25s ease-out; }
.lightbox img.is-ready { opacity: 1; }
/* фото и карточки ниже первого экрана проявляются при прокрутке (класс ставит скрипт) */
.will-reveal { opacity: 0; transform: translateY(18px); }
.will-reveal.is-in { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.23, 1, .32, 1), transform .7s cubic-bezier(.23, 1, .32, 1); transition-delay: var(--reveal-delay, 0ms); }
/* отклик кнопок на нажатие */
.btn:active, .social a:active, .lightbox__close:active { transform: scale(.97); }
/* верхнее фото страницы открывается «шторкой» — один раз, только оно */
@media (prefers-reduced-motion: no-preference) {
  .page-hero__media .shot { animation: unveil .8s cubic-bezier(.23, 1, .32, 1) both; }
  @keyframes unveil { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
}
@media (prefers-reduced-motion: reduce) { .lightbox[open], .lightbox.is-closing { animation: none; } .lightbox img { transition: none; } .will-reveal { opacity: 1; transform: none; } .zoom img, .rel__img { transition: none; } }

/* соцсети и почта */
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--copper-deep); border-radius: 999px; color: var(--copper-deep); transition: background .2s, color .2s; }
.social a:hover, .social a:focus-visible { background: var(--copper-deep); color: #fff; }
.social svg { width: 21px; height: 21px; }
.social--light a { border-color: var(--copper-light); color: var(--copper-light); }
.social--light a:hover, .social--light a:focus-visible { background: var(--copper-light); color: var(--dark); }
.reach { margin-top: 14px; }
.reach a { color: var(--copper-deep); font-weight: 600; }
.facts dd a { color: var(--copper-deep); }
/* последняя плитка мозаики на главной — ссылка на все покрытия */
.mosaic__tile--more .mosaic__name::after { content: "\00a0\2192"; color: var(--copper); } /* стрелка не уходит одна на новую строку */
.mosaic__tile--more .mosaic__text { color: var(--copper-deep); font-weight: 500; }
/* без номеров у плиток: название сразу под фото */
.mosaic__name { margin-top: 14px; }
/* фото рядом с текстом раздела */
.inline-shots { display: grid; gap: 14px; margin-top: 22px; }
.inline-shots--1 { max-width: 420px; }
.inline-shots--2, .inline-shots--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .inline-shots--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.inline-shots .work figcaption { margin-top: 8px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.inline-shots .work figcaption b { font-weight: 500; }
@media (max-width: 619px) { .inline-shots--3 .work:last-child { grid-column: 1 / -1; } }
/* значок «листайте вбок» над лентой на телефоне */
.swipe-hint { display: flex; justify-content: flex-end; margin: -6px 0 8px; transition: opacity .4s ease; }
.swipe-hint.is-gone { opacity: 0; pointer-events: none; }
.swipe-hint__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: rgba(20, 34, 56, .06); color: var(--copper-deep); }
.swipe-hint__icon svg { width: 26px; height: 26px; }
@media (prefers-reduced-motion: no-preference) {
  .swipe-hint__icon svg { animation: swipe-nudge 1.8s ease-in-out infinite; }
  @keyframes swipe-nudge { 0%, 100% { transform: translateX(3px); } 50% { transform: translateX(-3px); } }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* соцсети в меню под кнопкой с телефоном */
.menu__social { margin-top: 18px; }
/* значки соцсетей в шапке — только на широком экране, где хватает места */
.top__social { display: none; margin: 0 4px 0 0; gap: 6px; list-style: none; padding: 0; }
.top__social a { width: 34px; height: 34px; border-width: 1.2px; }
.top__social svg { width: 16px; height: 16px; }
@media (min-width: 1240px) { .top__social { display: flex; } }
@media (min-width: 1240px) and (max-width: 1439px) { .top__nav { gap: 20px; } .top__row { gap: 12px; } }
.top__nav a, .top__end .btn { white-space: nowrap; }

/* ── три главных ответа под первым экраном страницы покрытия ── */
.answers { padding: 8px 0 44px; }
.answers__sum { margin: 0 0 22px; padding-top: 26px; border-top: 1px solid var(--line); max-width: 36em; font: 400 clamp(21px, 2.4vw, 28px)/1.3 var(--serif); color: var(--ink); }
.answers__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.answers__item { padding: 20px 22px 22px; border: 1px solid var(--line); border-radius: var(--radius, 6px); }
.answers__item h2 { margin: 0 0 8px; font: 500 19px/1.25 var(--sans); letter-spacing: 0; text-transform: none; color: var(--copper-deep); }
.answers__item p { margin: 0; font-size: 16.5px; line-height: 1.5; color: var(--muted); }
@media (min-width: 760px) { .answers__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } .answers__item { padding: 24px 26px 26px; } }
