/* =========================================================
   Единое меню сайта: восемь пунктов сверху, разбиты пополам —
   четыре слева и четыре справа, ближе к краям. Середина остаётся
   свободной под название «АРСЕНАЛ».

   Стиль взят с каталога: Playfair, разрядка, светло-серый по покою,
   золото на наведении, тень под буквами ради читаемости на фото.

   Файл общий для всего сайта: его подключают и статические страницы
   в public/, и React-страницы (через app/layout.js). Правка здесь
   меняет меню везде разом.

   Шрифт: на React-страницах приходит переменной от next/font,
   на статических — напрямую из Google Fonts, отсюда запасной вариант.
   ========================================================= */

.sm-nav {
  position: fixed; z-index: 70; top: 26px;
  display: flex; align-items: baseline;
  gap: clamp(16px, 1.9vw, 34px);
  pointer-events: none;   /* мимо букв клики уходят на страницу */
}
.sm-nav.left  { left: 30px; }
.sm-nav.right { right: 30px; }

.sm-nav a {
  pointer-events: auto;
  font-family: var(--font-display, "Playfair Display"), serif;
  font-size: clamp(12px, 1vw, 14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b6ae9d;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  transition: color 0.22s ease, text-shadow 0.22s ease;
}
.sm-nav a:hover { color: #e6c47a; text-shadow: 0 0 14px rgba(203, 161, 90, 0.6), 0 1px 8px rgba(0, 0, 0, 0.9); }
/* пункт текущей страницы — светлее прочих, с чуть большей разрядкой */
.sm-nav a[aria-current="page"] { color: #efe6d6; letter-spacing: 0.24em; }

/* Кнопки панелей (контакты, доставка, сотрудничество) выглядят как ссылки */
.sm-nav button {
  pointer-events: auto;
  font: inherit; background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer;
  font-family: var(--font-display, "Playfair Display"), serif;
  font-size: clamp(12px, 1vw, 14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b6ae9d;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  transition: color 0.22s ease, text-shadow 0.22s ease;
}
.sm-nav button:hover { color: #e6c47a; text-shadow: 0 0 14px rgba(203, 161, 90, 0.6), 0 1px 8px rgba(0, 0, 0, 0.9); }

/* --- светлые страницы ------------------------------------------------------
   «Экспертиза», «Производители», страница объекта залиты кремовым. Светло-серые
   буквы с тёмной тенью на них не читаются, поэтому там меню перекрашивается.
   Класс на <html> ставит скрипт, измерив настоящую заливку страницы.

   Цвет — гранит #3a3a3a (та же переменная --graphite, что и в палитре сайта).
   До 01.08.2026 здесь стоял тёплый #6f6353: на кремовом фоне он давал контраст
   всего 1:5, и мелкий разряженный Playfair из него расплывался — меню было
   почти не видно. Гранит даёт 1:9,6. Насыщенность букв поднята до 500: у этого
   шрифта на 12–14 px волосяные штрихи тонут даже в тёмном цвете. */
.sm-on-light .sm-nav a,
.sm-on-light .sm-nav button {
  color: #3a3a3a;
  font-weight: 500;
  text-shadow: none;
}
.sm-on-light .sm-nav a:hover,
.sm-on-light .sm-nav button:hover {
  color: #a37c33;
  text-shadow: none;
}
.sm-on-light .sm-nav a[aria-current="page"] { color: #1c1b19; }
.sm-on-light .sm-toggle span { background: #3a3a3a; box-shadow: none; }
.sm-on-light .sm-toggle.open span { background: #a37c33; }

/* --- уже 1400px: группы ужимаются, иначе правая («Сотрудничество» длинное)
   подходит вплотную к подзаголовку на главной ---------------------------- */
@media (max-width: 1400px) {
  .sm-nav { top: 20px; gap: 16px; }
  .sm-nav.left { left: 20px; }
  .sm-nav.right { right: 20px; }
  .sm-nav a, .sm-nav button { font-size: 12px; letter-spacing: 0.12em; }
}

/* --- уже 1100px: восемь пунктов и название в одну строку не помещаются ------
   Считается просто: две группы ужатыми занимают ~776px, подзаголовок ~228px,
   плюс поля — около 1044px. Ниже этого они начинают наезжать друг на друга.
   Поэтому обе группы прячем, вместо них — короткое слово «Меню» справа сверху,
   по нажатию пункты выпадают столбцом по центру экрана. */
.sm-toggle { display: none; }

@media (max-width: 1100px) {
  .sm-nav.left, .sm-nav.right { display: none; }

  /* бургер — три полоски, на раскрытии складываются в крестик.
     Вид тот же, что у бургера на странице проектов. */
  .sm-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    position: fixed; z-index: 72; top: 18px; right: 18px;
    width: 30px; height: 24px;
    background: none; border: 0; padding: 0; cursor: pointer;
  }
  .sm-toggle span {
    display: block; height: 2px; width: 100%;
    background: #efe6d6; border-radius: 2px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s ease;
  }
  .sm-toggle.open span { background: #e6c47a; }
  .sm-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .sm-toggle.open span:nth-child(2) { opacity: 0; }
  .sm-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .sm-sheet {
    position: fixed; inset: 0; z-index: 71;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: clamp(12px, 2.6vh, 26px);
    background: rgba(10, 8, 5, 0.94);
    /* створки сверху и снизу сходятся к середине — как было у шаров */
    -webkit-mask-image: linear-gradient(#000, #000), linear-gradient(#000, #000);
            mask-image: linear-gradient(#000, #000), linear-gradient(#000, #000);
    -webkit-mask-repeat: no-repeat;   mask-repeat: no-repeat;
    -webkit-mask-position: center top, center bottom;
            mask-position: center top, center bottom;
    -webkit-mask-size: 100% 0%, 100% 0%;
            mask-size: 100% 0%, 100% 0%;
    visibility: hidden; pointer-events: none;
    transition: -webkit-mask-size 0.5s cubic-bezier(0.6, 0, 0.15, 1),
                        mask-size 0.5s cubic-bezier(0.6, 0, 0.15, 1),
                       visibility 0s linear 0.5s;
  }
  .sm-sheet.open {
    -webkit-mask-size: 100% 50%, 100% 50%;
            mask-size: 100% 50%, 100% 50%;
    visibility: visible; pointer-events: auto;
    transition: -webkit-mask-size 0.5s cubic-bezier(0.6, 0, 0.15, 1),
                        mask-size 0.5s cubic-bezier(0.6, 0, 0.15, 1),
                       visibility 0s;
  }
  .sm-sheet a, .sm-sheet button {
    font-family: var(--font-display, "Playfair Display"), serif;
    font-size: 20px; letter-spacing: 0.14em; text-transform: uppercase;
    color: #c9b285; background: none; border: 0; padding: 6px 0;
    text-decoration: none; cursor: pointer;
  }
  .sm-sheet a[aria-current="page"] { color: #efe6d6; }
}

/* на широких экранах выпадающий столбец не нужен вовсе */
@media (min-width: 1101px) {
  .sm-sheet { display: none; }
}


/* =========================================================
   ПАНЕЛИ: контакты, доставка, сотрудничество.
   Раньше жили React-компонентами на главной, поэтому с других страниц
   приходилось уводить на главную. Теперь они часть общего меню и
   открываются на месте, на любой странице.
   Все правила привязаны к .sm-panel: у страницы проектов есть свои
   панели с теми же именами классов, их задевать нельзя.
   ========================================================= */
.sm-panel#contacts {
  position: fixed; right: 0; top: 0; height: 100vh; width: clamp(320px, 34vw, 470px); z-index: 90;
  font-family: var(--font-display, "Playfair Display"), serif;
  background: rgba(14, 11, 7, 0.74);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid rgba(203, 161, 90, 0.26);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.45);
  transform: translateX(102%);
  transition: transform 0.6s cubic-bezier(0.6, 0, 0.15, 1);
  overflow-y: auto; pointer-events: none;
}
.sm-panel#contacts.open { transform: translateX(0); pointer-events: auto; }
.sm-backdrop { position: fixed; inset: 0; z-index: 89; background: rgba(0, 0, 0, 0.2); }
.sm-panel .ct-x {
  position: absolute; top: 20px; right: 22px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(203, 161, 90, 0.38); background: transparent; color: #bfa163;
  font-size: 22px; line-height: 1; cursor: pointer; transition: 0.25s;
}
.sm-panel .ct-x:hover { background: #bfa163; color: #0e0b07; transform: rotate(90deg); }
/* Отступы внутри панели ужаты 04.08.2026 на ~80 px: с подписью бюро и ссылкой
   «Настройки cookie» содержимое переросло экран 1440×900 (974 px против 900).
   Панель прокручивается, но полоса на macOS невидима — подпись просто пропала бы
   из виду. На экранах ниже 800 px содержимое всё равно прокручивается. */
.sm-panel .ct-in { min-height: 100%; padding: 64px 42px 26px; display: flex; flex-direction: column; }
.sm-panel .ct-h { font-size: 30px; color: #cdb277; margin: 0 0 22px; letter-spacing: 0.02em; }
.sm-panel .ct-blocks { display: flex; flex-direction: column; }
.sm-panel .ct-b { display: flex; flex-direction: column; gap: 13px; padding: 25px 0; }
.sm-panel .ct-b:first-child { padding-top: 0; }
.sm-panel .ct-b + .ct-b { border-top: 1px solid rgba(203, 161, 90, 0.30); }
.sm-panel .ct-row { display: flex; flex-direction: column; gap: 3px; }
.sm-panel .ct-l { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #8b774d; }
.sm-panel .ct-row a, .sm-panel .ct-row span { font-size: 15px; line-height: 1.5; color: #c3ac80; text-decoration: none; }
.sm-panel .ct-row a:hover { color: #ddc590; }
.sm-panel .ct-foot { margin-top: auto; padding-top: 20px; }
.sm-panel .ct-btn {
  display: block; text-align: center; padding: 15px 20px; border: 1px solid #a98f56; color: #cbb27c;
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 13px; text-decoration: none;
  transition: 0.3s; margin: 0 0 16px;
}
.sm-panel .ct-btn:hover { background: #bfa163; color: #0e0b07; }
.sm-panel .ct-legal { display: flex; flex-direction: column; gap: 11px; margin: 0 0 14px; }
.sm-panel .ct-legal a {
  font-size: 12px; color: #a08a5b; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(203, 161, 90, 0.35); transition: color 0.25s;
}
.sm-panel .ct-legal a:hover { color: #ddc590; }
.sm-panel .ct-law { font-size: 11px; line-height: 1.5; color: #867249; }

/* --- форма обратной связи в панели контактов --- */
.sm-panel .ct-btn { background: transparent; cursor: pointer; font-family: inherit; width: 100%; }
.sm-panel .lead-form { display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; }
.sm-panel .lf-h { font-size: 18px; color: #cdb277; letter-spacing: 0.02em; margin: 2px 0 4px; }
.sm-panel .lf-field { display: flex; flex-direction: column; gap: 5px; }
.sm-panel .lf-field span { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #8b774d; }
.sm-panel .lf-field input, .sm-panel .lf-field textarea {
  font-family: inherit; font-size: 14px; color: #e3d5b6; background: rgba(203, 161, 90, 0.06);
  border: 1px solid rgba(203, 161, 90, 0.30); border-radius: 4px; padding: 10px 12px; resize: vertical;
  transition: border-color 0.25s, background 0.25s;
}
.sm-panel .lf-field input:focus, .sm-panel .lf-field textarea:focus {
  outline: none; border-color: rgba(203, 161, 90, 0.7); background: rgba(203, 161, 90, 0.10);
}
.sm-panel .lf-consent { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.45; color: #a08a5b; cursor: pointer; }
.sm-panel .lf-consent input { margin-top: 2px; accent-color: #bfa163; flex: 0 0 auto; }
/* honeypot — уводим за экран, а не display:none (часть ботов пропускает display:none) */
.sm-panel .lf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sm-panel .lf-submit { margin: 4px 0 0; }
.sm-panel .lf-submit:disabled { opacity: 0.55; cursor: default; }
.sm-panel .lf-msg { font-size: 12.5px; line-height: 1.4; color: #a08a5b; min-height: 1em; }
.sm-panel .lf-msg.lf-err { color: #e0a17a; }
.sm-panel .lf-done { font-size: 20px; line-height: 1.4; color: #ece0c4; padding: 22px 0; letter-spacing: 0.01em; }

/* Панель ДОСТАВКА — зеркало контактов, выезжает слева */
.sm-panel#delivery {
  position: fixed; left: 0; top: 0; height: 100vh; width: clamp(320px, 34vw, 470px); z-index: 90;
  font-family: var(--font-display, "Playfair Display"), serif;
  background: rgba(14, 11, 7, 0.74);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(203, 161, 90, 0.26);
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.45);
  transform: translateX(-102%);
  transition: transform 0.6s cubic-bezier(0.6, 0, 0.15, 1);
  overflow-y: auto; pointer-events: none;
}
.sm-panel#delivery.open { transform: translateX(0); pointer-events: auto; }
.sm-panel .dl-lead { font-size: 15px; line-height: 1.55; color: #c9b184; margin: 0 0 4px; }
.sm-panel .dl-note { font-size: 14px; line-height: 1.6; color: #b7a074; }
.sm-panel .dl-note a { color: #d8bf85; text-decoration: none; border-bottom: 1px solid rgba(203, 161, 90, 0.4); }
.sm-panel .dl-note a:hover { color: #f0d78e; }
.sm-panel .dl-cond-h { margin: 0 0 14px; }
.sm-panel .dl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sm-panel .dl-list li { position: relative; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: #b3a074; }
/* ссылка в списке условий (почта для запроса подъёма) — как ссылка на телефон выше */
.sm-panel .dl-list a { color: #d8bf85; text-decoration: none; border-bottom: 1px solid rgba(203, 161, 90, 0.4); }
.sm-panel .dl-list a:hover { color: #f0d78e; }
.sm-panel .dl-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: #a98f56; }

/* Панель СОТРУДНИЧЕСТВО — как контакты, но выезжает снизу */
.sm-panel#coop {
  position: fixed; left: 50%; bottom: 0; z-index: 90; width: min(720px, 92vw); max-height: 82vh;
  font-family: var(--font-display, "Playfair Display"), serif;
  background: rgba(14, 11, 7, 0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(203, 161, 90, 0.26); border-bottom: 0; border-radius: 14px 14px 0 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 102%);
  transition: transform 0.6s cubic-bezier(0.6, 0, 0.15, 1);
  overflow-y: auto; pointer-events: none;
}
.sm-panel#coop.open { transform: translate(-50%, 0); pointer-events: auto; }
.sm-panel .cp-in { padding: 46px 44px 44px; }

/* Адаптив панелей — телефон: во всю ширину, компактнее */
@media (max-width: 680px) {
  .sm-panel#contacts, .sm-panel#delivery { width: 100vw; }
  /* На экране 390×844 содержимое не влезало на 27 px: ужимаем воздух между
     блоками и в подвале. Панель и так прокручивается, но полосы на телефоне
     не видно — подпись бюро осталась бы за краем. */
  .sm-panel .ct-in { padding: 56px 22px calc(20px + env(safe-area-inset-bottom)); }
  .sm-panel .ct-h { font-size: 26px; margin-bottom: 18px; }
  .sm-panel .ct-b { padding: 20px 0; gap: 11px; }
  .sm-panel .ct-foot { padding-top: 16px; }
  .sm-panel .ct-btn { margin-bottom: 14px; padding: 13px 18px; }
  .sm-panel .ct-legal { gap: 10px; margin-bottom: 12px; }
  .sm-panel .ct-by { margin-top: 14px; padding-top: 12px; }
  .sm-panel#coop { width: 100vw; border-radius: 0; border-left: 0; border-right: 0; }
  .sm-panel .cp-in { padding: 40px 22px 34px; }
}
.sm-panel .cp-body { display: flex; flex-direction: column; gap: 18px; }
.sm-panel .cp-body p { font-size: 15px; line-height: 1.7; color: #c3ac80; margin: 0; }
/* Ссылка на статью «Возможности для дизайнеров» */
.sm-panel .cp-link {
  align-self: flex-start; margin-top: 4px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: #e0c896; text-decoration: none;
  padding: 11px 20px; border: 1px solid rgba(224, 200, 150, .38);
  border-radius: 2px; transition: background .25s, border-color .25s, color .25s;
}
.sm-panel .cp-link:hover { background: rgba(224, 200, 150, .10); border-color: #e0c896; color: #f2e2c0; }
.sm-panel .cp-note { font-size: 13px; line-height: 1.6; color: #8d7d5e; margin-top: -8px; max-width: 520px; }


/* =========================================================
   Юридические документы — попап поверх панели контактов.

   Раньше три ссылки в подвале панели («Политика конфиденциальности»,
   «Согласие…», «Cookie») вели в href="#": выглядели рабочими, но никуда
   не открывались. Теперь по ним поднимается это окно, а тексты лежат
   в public/legal.json и подтягиваются при первом открытии.

   z-index 98 — выше панелей (90), их завесы (89) и мобильной шторки
   projects.html (95, крестик 96). Попап открывается поверх контактов,
   не закрывая их: закрыл документ — панель на месте.
   ========================================================= */
.lg-wrap {
  position: fixed; inset: 0; z-index: 98; display: flex;
  align-items: center; justify-content: center; padding: 4vh 4vw;
  background: rgba(6, 5, 4, .72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s ease;
}
.lg-wrap.open { opacity: 1; }
.lg-box {
  position: relative; width: min(760px, 100%); max-height: 92vh;
  display: flex; flex-direction: column;
  background: rgba(16, 13, 9, .97);
  border: 1px solid rgba(203, 161, 90, .30);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  font-family: var(--font-display, "Playfair Display"), serif;
  transform: translateY(18px); transition: transform .38s cubic-bezier(.5, 0, .15, 1);
}
.lg-wrap.open .lg-box { transform: translateY(0); }
.lg-head {
  flex: 0 0 auto; padding: 30px 34px 18px 34px;
  border-bottom: 1px solid rgba(203, 161, 90, .22);
}
.lg-head h2 { margin: 0; font-size: clamp(19px, 2.4vw, 26px); font-weight: 500; color: #e3c68b; line-height: 1.25; }
.lg-x {
  position: absolute; top: 18px; right: 20px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(203, 161, 90, .38); background: transparent; color: #bfa163;
  font-size: 21px; line-height: 1; cursor: pointer; transition: .25s;
}
.lg-x:hover { background: #bfa163; color: #0e0b07; transform: rotate(90deg); }
/* Само тело прокручивается, шапка и подпись остаются на месте.

   Полосу прокрутки рисуем свою и всегда видимой. macOS по умолчанию прячет
   полосу до касания трекпада и не занимает под неё места (её ширина 0), так что
   документ на 2700 пикселей в окне на 700 выглядел как оборванный на середине
   фразы: ни полосы, ни намёка. Заданная ширина у ::-webkit-scrollbar переводит
   полосу из наложенной в обычную — она занимает место и видна постоянно.

   overscroll-behavior: докрутив документ до конца, дальше не утаскиваем
   страницу под окном. */
.lg-body {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 34px 26px;
}
/* Firefox не понимает ::-webkit-scrollbar, ему — свойства из стандарта.
   Обратное правило важнее: если задать scrollbar-width прямо на .lg-body,
   Chrome по спецификации перестаёт применять вебкитовские правила и рисует
   наложенную полосу macOS шириной 0 — ровно то, что мы и чиним. Поэтому
   стандартные свойства спрятаны за @supports и до Chrome не доходят. */
.lg-body::-webkit-scrollbar { width: 12px; }
@supports not selector(::-webkit-scrollbar) {
  .lg-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(203, 161, 90, .55) rgba(203, 161, 90, .09);
  }
}
.lg-body::-webkit-scrollbar-track { background: rgba(203, 161, 90, .09); }
.lg-body::-webkit-scrollbar-thumb {
  background: rgba(203, 161, 90, .5); border-radius: 6px;
  border: 3px solid transparent; background-clip: content-box;
}
.lg-body::-webkit-scrollbar-thumb:hover { background: rgba(203, 161, 90, .85); background-clip: content-box; }
.lg-body h3 {
  margin: 26px 0 10px; font-size: 15px; font-weight: 500; letter-spacing: .04em; color: #d8bf85;
}
.lg-body h3:first-child { margin-top: 0; }
.lg-body p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.72; color: #bfae8b; }
.lg-body p.lg-lead { font-size: 16px; line-height: 1.7; color: #d2c3a0; margin-bottom: 22px; }
.lg-body ul { margin: 0 0 14px; padding-left: 20px; }
.lg-body li { font-size: 14.5px; line-height: 1.68; color: #bfae8b; margin-bottom: 6px; }
.lg-body b { color: #d5c39c; font-weight: 500; }
.lg-body a { color: #e0c896; border-bottom: 1px solid rgba(203, 161, 90, .4); text-decoration: none; }
.lg-body a:hover { color: #f2e2c0; }
.lg-foot {
  position: relative;
  flex: 0 0 auto; padding: 14px 34px 20px;
  border-top: 1px solid rgba(203, 161, 90, .18);
  font-size: 12px; letter-spacing: .1em; color: #85764f;
}
/* Растворение последних строк над подписью «Редакция от…»: сразу видно, что
   текст уходит дальше, а не кончился. Гаснет, когда докрутили до конца.
   Справа отступ 12px — ровно ширина полосы прокрутки, её не перекрываем. */
.lg-foot::before {
  content: ""; position: absolute; left: 0; right: 12px; bottom: 100%; height: 46px;
  background: linear-gradient(rgba(16, 13, 9, 0), rgba(16, 13, 9, .97));
  pointer-events: none; opacity: 1; transition: opacity .25s ease;
}
.lg-box.lg-end .lg-foot::before { opacity: 0; }
/* Ссылки в подвале панели контактов остаются ссылками на вид, но это кнопки */
.ct-legal button {
  font: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer;
  font-size: 12px; color: #a08a5b; text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: rgba(203, 161, 90, .35);
  transition: color .25s;
}
.ct-legal button:hover { color: #ddc590; }

/* Подпись бюро — в самом низу панели контактов, под текстом про 152-ФЗ.
   Без привязки к .sm-panel: та же разметка стоит и в собственной панели
   projects.html, стили нужны обеим. */
.ct-by {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(203, 161, 90, .16);
  font-size: 11px; line-height: 1.5; color: #6f6244;
}
.ct-by a {
  color: #a08a5b; letter-spacing: .12em; text-decoration: none;
  border-bottom: 1px solid rgba(203, 161, 90, .3);
  transition: color .25s, border-color .25s;
}
.ct-by a:hover { color: #e3c68b; border-color: rgba(203, 161, 90, .75); }

@media (max-width: 700px) {
  .lg-wrap { padding: 0; }
  .lg-box { width: 100%; max-height: 100%; height: 100%; border: 0; }
  .lg-head { padding: 24px 20px 14px; }
  .lg-body { padding: 18px 14px 22px 20px; }
  /* на телефоне полоса тоньше — растворение тянем почти до края */
  .lg-body::-webkit-scrollbar { width: 8px; }
  .lg-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); }
  .lg-foot::before { right: 8px; height: 38px; }
  .lg-x { top: 14px; right: 14px; }
}

/* =========================================================
   Согласие на файлы cookie

   Поднимается один раз, при первом заходе, и больше не показывается —
   выбор лежит в localStorage под ключом ark-cookie. Три исхода: принять
   все, только необходимые, либо развернуть «Настроить» и решить по
   категориям. Категории те же, что описаны в public/legal.json → cookie:
   технические (без них каталог не помнит выбранный материал) и
   аналитические.

   Плашка не модальная: завесы нет, сайтом можно пользоваться, пока она
   висит. Технические cookie ставятся и без согласия — они необходимы
   для работы, о чём документ и говорит.

   z-index 97 — выше панелей (90) и мобильной шторки projects.html (96),
   но ниже окна юридических документов (98): «Подробнее» открывает текст
   поверх плашки.
   ========================================================= */
.ck-wrap {
  position: fixed; z-index: 97; left: 22px; bottom: 22px;
  width: min(540px, calc(100vw - 44px));
  font-family: var(--font-display, "Playfair Display"), serif;
  transform: translateY(24px); opacity: 0;
  transition: transform .45s cubic-bezier(.5, 0, .15, 1), opacity .4s ease;
}
.ck-wrap.open { transform: translateY(0); opacity: 1; }
.ck-box {
  background: rgba(16, 13, 9, .97);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(203, 161, 90, .30);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  padding: 22px 24px 20px;
}
.ck-h {
  font-size: 17px; font-weight: 500; color: #e3c68b;
  letter-spacing: .02em; margin-bottom: 10px;
}
.ck-t { margin: 0; font-size: 13.5px; line-height: 1.62; color: #b3a381; }
/* Короткий вариант текста показываем только на узких экранах (см. медиа ниже) */
.ck-t-mini { display: none; }
.ck-more {
  font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  color: #d8bf85; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(203, 161, 90, .4); transition: color .25s;
}
.ck-more:hover { color: #f2e2c0; }

/* Раскрывается по «Настроить». Держим в потоке, а не выкидываем display:none,
   чтобы высота менялась плавно вместе с плашкой. */
.ck-opts {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height .4s cubic-bezier(.5, 0, .15, 1), opacity .3s ease, margin .4s;
}
.ck-wrap.tune .ck-opts { max-height: 340px; opacity: 1; margin-top: 16px; }
.ck-o {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0; border-top: 1px solid rgba(203, 161, 90, .16);
}
.ck-o b { display: block; font-size: 13.5px; font-weight: 500; color: #d5c39c; margin-bottom: 3px; }
.ck-o i { display: block; font-style: normal; font-size: 12.5px; line-height: 1.5; color: #91825f; }
.ck-o > span:first-child { flex: 1 1 auto; }
.ck-fix { flex: 0 0 auto; font-size: 11px; letter-spacing: .08em; color: #6f6244; padding-top: 3px; }

/* Переключатель — на чистом CSS, без картинок */
.ck-sw { position: absolute; opacity: 0; pointer-events: none; }
.ck-lbl {
  flex: 0 0 auto; position: relative; width: 42px; height: 23px; margin-top: 2px;
  border-radius: 12px; cursor: pointer;
  background: rgba(203, 161, 90, .16); border: 1px solid rgba(203, 161, 90, .3);
  transition: background .25s, border-color .25s;
}
.ck-lbl::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px;
  border-radius: 50%; background: #8b7c56; transition: transform .25s, background .25s;
}
.ck-sw:checked + .ck-lbl { background: rgba(203, 161, 90, .45); border-color: rgba(203, 161, 90, .6); }
.ck-sw:checked + .ck-lbl::after { transform: translateX(19px); background: #f0dcae; }
.ck-sw:focus-visible + .ck-lbl { outline: 2px solid rgba(203, 161, 90, .8); outline-offset: 2px; }

.ck-btns { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.ck-b {
  font: inherit; font-size: 13px; letter-spacing: .04em; cursor: pointer;
  padding: 10px 18px; border: 1px solid rgba(203, 161, 90, .38);
  background: transparent; color: #cbb491;
  transition: background .25s, color .25s, border-color .25s;
}
.ck-b:hover { border-color: rgba(203, 161, 90, .75); color: #f0dcae; }
.ck-yes { background: #bfa163; border-color: #bfa163; color: #14100a; font-weight: 500; }
.ck-yes:hover { background: #dcc084; border-color: #dcc084; color: #14100a; }
.ck-ghost { border-color: transparent; color: #9a8a63; text-decoration: underline; text-underline-offset: 4px; }
.ck-ghost:hover { border-color: transparent; color: #ddc590; }
/* «Сохранить выбор» появляется только в режиме настройки */
.ck-save { display: none; }
.ck-wrap.tune .ck-save { display: inline-block; }
.ck-wrap.tune .ck-tune { display: none; }

@media (max-width: 700px) {
  /* Компактная плашка: не должна закрывать герой первого экрана.
     Короткий текст вместо полного, меньше воздуха, кнопки плотнее. */
  .ck-wrap { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; }
  .ck-box { padding: 13px 14px 12px; }
  .ck-h { font-size: 14.5px; margin-bottom: 5px; }
  .ck-t { font-size: 12.5px; line-height: 1.5; }
  .ck-t-full { display: none; }
  .ck-t-mini { display: inline; }
  .ck-btns { gap: 7px; margin-top: 12px; }
  .ck-b { flex: 1 1 auto; text-align: center; padding: 9px 10px; font-size: 12.5px; }
  .ck-ghost { flex-basis: 100%; padding: 4px; }
}
