/* ============================================================
   Алина — рилсмейкер
   Палитра и радиусы приходят из theme.css (Mocha Mousse, 21st.dev).
   Здесь — только производные токены и вёрстка.
   ============================================================ */

:root {
  /* шрифты: Montserrat для текста и заголовков, контраст задаём начертанием */
  --font-sans: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Montserrat", ui-sans-serif, system-ui, sans-serif;

  /* жёсткие смещённые тени — из shadow-токенов темы */
  --sh-sm: 2px 2px 0 0 var(--shadow-color);
  --sh: 4px 4px 0 0 var(--shadow-color);
  --sh-lg: 9px 9px 0 0 var(--shadow-color);

  --r-sm: var(--radius);
  --r: calc(var(--radius) * 2);
  --r-lg: calc(var(--radius) * 3.5);
  --r-pill: 999px;

  --wrap: 1180px;
  --gutter: clamp(16px, 1.6vw, 24px);
  --gap: clamp(16px, 2.2vw, 28px);
  --pad-y: clamp(56px, 6.6vw, 96px);

  --ease: cubic-bezier(.2, .7, .2, 1);

  /* --- контраст ---------------------------------------------------------
     тема 21st.dev рассчитана на крупный кегль: --muted-foreground (#8A655A)
     на --background даёт 4.48:1, а на .sec--alt — 4.02:1, то есть ниже
     порога WCAG AA (4.5:1) для основного текста. Затемняем на пару
     ступеней, оттенок сохраняем.
     --primary-ink — тот же акцент, но пригодный для текста по светлому
     фону: сам --primary даёт 3.06–3.41:1. */
  --muted-foreground: #7C5A50;
  --primary-ink: #7A594B;
  /* --primary-fill — акцент как подложка под белым текстом: на самом
     --primary белый даёт лишь 3.9:1, и против него ни один цвет текста
     не добирает до 4.5:1 — менять приходится саму заливку.
     Тонкий декор (точка «свободна», курсив в h1, рамки, кавычка)
     остаётся на исходном --primary. */
  --primary-fill: #7A594B;
}

.dark {
  /* :root выше объявлен позже theme.css и перебивает её .dark при равной
     специфичности — тёмные значения возвращаем здесь явно */
  --muted-foreground: #C5AA9B;
  --primary-ink: var(--primary);
  /* в тёмной теме по акценту идёт тёмный текст — 6.1:1, менять нечего */
  --primary-fill: var(--primary);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Переключение темы — не мгновенная вспышка, а короткий переход. Дорогой
   путь — навесить transition на весь документ: background-color, color и
   box-shadow перерисовываются на главном потоке, а узлов здесь больше двух
   тысяч. Поэтому кросс-фейд отдан View Transitions: браузер снимает старый
   кадр картинкой и растворяет его в новом на композиторе — цена не зависит
   от размера DOM. mix-blend-mode от браузера (plus-lighter) не трогаем:
   без него середина кросс-фейда двух непрозрачных кадров проседает. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .28s;
  animation-timing-function: var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}
/* Пока идёт кросс-фейд, живой документ под ним должен переключиться
   мгновенно: у карточек и шапки есть свои transition на тень и фон, и
   без этого правила снимок «нового» кадра снимут посреди них — цвета
   доедут второй раз уже после фейда. Правило ничего не анимирует,
   поэтому и стоит оно почти ничего. */
.is-swapping *, .is-swapping *::before, .is-swapping *::after {
  transition: none !important;
}

/* Запасной путь для браузеров без View Transitions. Переход держим на body
   (цвет текста уезжает вниз по наследованию бесплатно) и на крупных
   поверхностях — их десятки, а не тысячи. Карточки галереи и работ в списке
   не нужны: их подложку целиком закрывает фотография. Правило живёт только
   те 340 мс, что его держит скрипт. */
.is-theming body,
.is-theming .nav,
.is-theming .sec--alt,
.is-theming .eyebrow,
.is-theming .btn,
.is-theming .chip,
.is-theming .phone,
.is-theming .badge,
.is-theming .marquee,
.is-theming .pcard,
.is-theming .quote,
.is-theming .ptable__switch,
.is-theming .ptable__switch button,
.is-theming .acc details {
  transition: background-color .28s var(--ease), color .28s var(--ease),
              border-color .28s var(--ease) !important;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* зернистость: тайлится вместе с фоном.
   Сознательно без fixed-слоя с mix-blend-mode — такой слой заставляет
   Chromium перерисовывать весь экран на каждом кадре скролла. */
body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}
.dark body { background-image: none; }

img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* Трекинг и интерлиньяж зависят от кегля, а не задаются один раз на все
   размеры: чем крупнее буквы, тем дальше они кажутся друг от друга — крупное
   поджимаем, мелкое, наоборот, чуть разводим. С интерлиньяжем так же:
   у большого заголовка строки стоят плотно, у текста — свободно. */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
  font-optical-sizing: auto;
}
/* размеры подобраны так, чтобы «Аккаунт, который» помещалось в свою колонку
   на любой ширине: иначе заголовок с заданными <br> разъезжается на четыре строки */
h1 { font-size: clamp(35px, 4.9vw, 62px); letter-spacing: -.032em; line-height: 1.02; }
h2 { font-size: clamp(32px, 4.4vw, 56px); letter-spacing: -.028em; line-height: 1.04; }
h3 { font-size: clamp(19px, 1.5vw, 23px); letter-spacing: -.012em; line-height: 1.2; }
h1 em, h2 em { font-style: italic; color: var(--primary); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 4vw, 32px); }

/* 12 колонок: единая сетка для всех секций */
.sec > .wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-content: start;
}
.sec > .wrap > * { grid-column: 1 / -1; }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--primary-fill); color: var(--primary-foreground);
  padding: 10px 18px; border-radius: var(--r-pill);
}
.skip:focus { left: 16px; }

:where(a, button, summary, details):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ─────────────────────  Типовые элементы  ───────────────────── */

.kicker {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted-foreground); font-weight: 500; margin: 0 0 14px;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--muted-foreground);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 7px 15px 7px 12px;
  border-radius: var(--r-pill);
  box-shadow: var(--sh-sm);
  margin: 0 0 26px;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 6%, transparent); } }

.lead { font-size: clamp(17px, 1.35vw, 19.5px); color: var(--muted-foreground); max-width: 56ch; }
.hero__copy .lead { margin-top: 26px; }

.btn {
  --bg: var(--primary-fill); --fg: var(--primary-foreground);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--bg); color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--bg) 70%, #000 14%);
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-weight: 500; font-size: 15.5px; letter-spacing: .005em;
  /* подпись кнопки не переносится: в тесном ряду (шапка) flex сжимал
     кнопку по ширине и «Обсудить проект» ломалось на две строки */
  white-space: nowrap;
  text-decoration: none; cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--sh); }
/* блик по кнопке — приём из Shiny Button (21st.dev, @Shatlyk1011).
   Только на заливных кнопках: у --ghost цвет текста тёмный и блик читался
   бы как грязный мазок. overflow скрывает полосу за пределами пилюли. */
.btn { position: relative; overflow: hidden; --shine: color-mix(in srgb, var(--fg) 34%, transparent); }
.btn:not(.btn--ghost)::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -35%; width: 30%;
  background: linear-gradient(100deg, transparent, var(--shine), transparent);
  transform: skewX(-18deg); pointer-events: none; opacity: 0;
}
.btn:not(.btn--ghost):hover::after { animation: btn-shine .8s var(--ease); }
@keyframes btn-shine {
  from { left: -35%; opacity: 0; }
  18%  { opacity: 1; }
  to   { left: 115%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:not(.btn--ghost):hover::after { animation: none; }
}
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn--ghost { --bg: transparent; --fg: var(--foreground); border-color: var(--border); }
.btn--ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.btn--sm { padding: 10px 19px; font-size: 14.5px; }
.btn--full {
  width: 100%; margin-top: auto;
  /* у кнопки во всю ширину карточки коробка задана, а подписи длинные
     («Записаться на стандартную съёмку») — здесь перенос разрешён */
  white-space: normal;
}

/* ──────────────  Отклик на нажатие  ──────────────
   Правило из доклада Apple: отвечать на касание, а не на отпускание.
   Наведение может ехать плавно, нажатие — нет: 90 мс это тот порог,
   за которым связь «я нажал → оно ответило» начинает рассыпаться.
   Жмём через отдельное свойство scale, чтобы не спорить с transform,
   которым элементы уже подняты при наведении. */
.btn:active,
.chip:active,
.icon-btn:active,
.burger:active,
.nav__links a:active,
.ptable__switch button:active,
.phone__nav:active,
.phone__side button:active,
.rcard:active,
.gcard:active,
.acc details:has(> summary:active),
.brand:active .brand__mark { transition-duration: .09s; }

.chip:active { scale: .96; }
.icon-btn:active, .burger:active { scale: .92; }
.nav__links a:active { scale: .96; }
.ptable__switch button:active { scale: .97; }
.brand:active .brand__mark { scale: .93; }
.phone__nav:active { scale: .88; }
.phone__side button:active { scale: .86; }
/* карточки крупные — им хватает еле заметного проседания */
.rcard:active, .gcard:active { scale: .985; }
/* У вопроса в FAQ проседать нечему — он идёт в строку с плюсиком, — поэтому
   отклик отдаём всей плашке: жмут-то по ней целиком. Раньше здесь лежала
   подложка на :active, но она вставала по коробке summary — прямоугольник
   с острыми углами, не достающий до краёв скруглённой карточки, — и читался
   как посторонний блок, а не как ответ на нажатие.
   Плашка широкая и низкая: на ней даже .985 гуляет заметно, хватает .995. */
.acc details:has(> summary:active) { scale: .995; }

@media (prefers-reduced-motion: reduce) {
  .chip:active, .icon-btn:active, .burger:active, .nav__links a:active,
  .ptable__switch button:active, .brand:active .brand__mark,
  .phone__nav:active, .phone__side button:active,
  .rcard:active, .gcard:active,
  .acc details:has(> summary:active) { scale: 1; }
}

/* подписи и служебные строки набраны 12–13.5px: на таком кегле буквы
   слипаются, и им нужен обратный сдвиг трекинга — плюс, а не минус */
.stats dt, .pcard__sub, .quote i, .foot, .phone__side i, .gcard__cap,
.rcard__dur, .rcard__badge, .brand__txt em, .notes li, .more__count {
  letter-spacing: .012em;
}

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.ticks li { position: relative; padding-left: 30px; color: var(--muted-foreground); font-size: 15.8px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 16px; height: 9px;
  border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

.sec { padding: var(--pad-y) 0; position: relative; }
.sec--alt { background: color-mix(in srgb, var(--accent) 34%, var(--background)); }
/* в тёмной теме --accent светлый, и 34% дают подложку светлее текста:
   номера шагов проваливались до 3.08:1 */
.dark .sec--alt { background: color-mix(in srgb, var(--accent) 12%, var(--background)); }
.sec__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px var(--gutter); align-items: start;
  /* строчный gap у .sec > .wrap добавляет к этому ещё var(--gutter) */
  margin-bottom: clamp(24px, 2.6vw, 34px);
}
/* заголовок и подпись — друг под другом, в одной колонке слева */
.sec__head > div:first-child { grid-column: 1 / -1; }
.sec__head .sec__note { grid-column: 1 / span 7; max-width: 62ch; }
.sec__note { color: var(--muted-foreground); font-size: 16px; margin: 0; }

.grid { display: grid; gap: var(--gap); }

/* появление при скролле */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ─────────────────────  Подсветка под курсором  ─────────────────────
   Приём из Spotlight Card (21st.dev, @preetsuthar17): тёплое пятно
   следует за курсором внутри карточки. Скрипт кладёт координаты в
   --mx/--my, всё остальное — CSS.

   Слой лежит в ::before с z-index:-1, а сама карточка изолирована
   (isolation: isolate). Порядок отрисовки внутри контекста: сначала фон
   карточки, потом отрицательные слои, потом текст, — то есть пятно
   ложится поверх подложки, но под содержимым. Абсолютный слой без
   отрицательного z-index рисовался бы поверх текста.

   На тач-устройствах курсора нет — там слой не создаём. */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .45s var(--ease);
  background: radial-gradient(230px circle at var(--mx, 50%) var(--my, 50%),
              color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%);
}
.spot.is-lit::before { opacity: 1; }
@media (hover: none), (prefers-reduced-motion: reduce) {
  .spot::before { display: none; }
}

/* ─────────────────────  Маркер по тексту  ─────────────────────
   Text Highlighter (21st.dev, @danielpetho): подложка растёт из нуля
   в ширину строки, когда абзац попадает в кадр. background-size вместо
   ширины блока — заливка тянется по всем строкам разом, а
   box-decoration-break: clone скругляет каждую строку отдельно.

   Текст под маркером переводим на --foreground: --muted-foreground
   на подложке --muted даёт 3.8:1, ниже порога AA. */
.mk {
  --mk-bg: color-mix(in srgb, var(--muted) 92%, transparent);
  color: var(--foreground); font-weight: 500;
  background-color: transparent;
  background-image: linear-gradient(var(--mk-bg), var(--mk-bg));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 0% 100%;
  padding: .08em .2em; margin: 0 -.2em;
  border-radius: .2em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size .85s var(--ease);
}
.mk.in { background-size: 100% 100%; }
/* в тёмной теме --muted тёмный и как маркер не читается — берём разбавленный акцент */
.dark .mk { --mk-bg: color-mix(in srgb, var(--primary) 26%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .mk { background-size: 100% 100%; transition: none; }
}

/* ─────────────────────  Шапка  ───────────────────── */

.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--background) 72%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  /* backdrop-filter в transition не берём: значение меняется только по
     медиазапросам, а анимировать блюр — пересчёт стекла на каждом кадре */
  transition: background .3s var(--ease);
}
.nav.is-stuck { background: color-mix(in srgb, var(--background) 84%, transparent); }

/* Шапка отделяется от текста не линейкой, а краевым затуханием: полоска
   в 1px честно режет страницу пополам, а мягкий край читается как «здесь
   контент уходит под стекло». Появляется только когда под шапкой
   действительно что-то проехало. */
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 20px;
  pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--background) 62%, transparent), transparent);
  transition: opacity .3s var(--ease);
}
.nav.is-stuck::after { opacity: 1; }

/* индикатор прочитанного (21st.dev: @cnippet.dev/scroll-progress).
   Скрипт пишет долю в --p, здесь только scaleX — перерисовки нет,
   composited-трансформ на каждом кадре скролла. */
.prog {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  pointer-events: none; overflow: hidden; z-index: 1;
}
.prog i {
  display: block; height: 100%;
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  opacity: 0; transition: opacity .3s;
}
.nav.is-stuck .prog i { opacity: 1; }
.nav__in { display: flex; align-items: center; gap: 20px; height: 72px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-fill); color: var(--primary-foreground);
  border-radius: 12px; box-shadow: var(--sh-sm);
  font-family: var(--font-display); font-size: 20px; line-height: 1;
  transition: transform .3s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(-8deg); }
.brand__txt { display: flex; flex-direction: column; font-weight: 500; line-height: 1.15; font-size: 16px; }
.brand__txt em { font-style: normal; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-foreground); }

.nav__links { display: flex; gap: 4px; }
.nav__links a {
  text-decoration: none; font-size: 15px; color: var(--muted-foreground);
  /* поверх размытого слоя тонкий серый текст расплывается: чуть больше
     веса и трекинга — и он снова читается на любом фоне под шапкой */
  font-weight: 460; letter-spacing: .008em;
  padding: 8px 13px; border-radius: var(--r-pill);
  transition: color .2s, background .2s;
}
.nav__links a:hover, .nav__links a.is-here { color: var(--foreground); background: var(--accent); }

.nav__act { display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--r-pill); cursor: pointer;
  transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--accent); transform: rotate(18deg); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.i-moon { display: none; }
.dark .i-sun { display: none; }
.dark .i-moon { display: block; }

.burger { display: none; width: 38px; height: 38px; border: 1px solid var(--border); background: none; border-radius: var(--r-pill); cursor: pointer; }
.burger span { display: block; width: 16px; height: 1.7px; background: currentColor; margin: 3.4px auto; transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(2.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-2.6px) rotate(-45deg); }

/* ─────────────────────  Hero  ───────────────────── */

.hero { position: relative; padding: clamp(48px, 6vw, 84px) 0 clamp(60px, 8vw, 110px); overflow: hidden; }
.hero__glow {
  position: absolute; inset: -20% -10% auto; height: 720px; z-index: -1;
  background:
    radial-gradient(48% 42% at 22% 30%, color-mix(in srgb, var(--primary) 30%, transparent), transparent 68%),
    radial-gradient(40% 40% at 78% 18%, color-mix(in srgb, var(--secondary) 34%, transparent), transparent 66%),
    radial-gradient(45% 45% at 60% 70%, color-mix(in srgb, var(--muted) 42%, transparent), transparent 70%);
  filter: blur(24px);
  opacity: .75;
}
/* живая сетка лент поверх свечения; рисуется в script.js */
.hero__mesh {
  position: absolute; inset: 0; z-index: -1;
  display: block; width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0; transition: opacity .9s var(--ease);
}
.hero__mesh.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero__mesh { display: none; } }
.hero__in { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(30px, 5vw, 70px); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 0; }

.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 12px; margin: clamp(34px, 4vw, 52px) 0 0;
  padding-top: 26px; border-top: 1px solid var(--border);
}
.stats > div { display: flex; flex-direction: column; }
.stats dt { order: 2; font-size: 12.5px; color: var(--muted-foreground); line-height: 1.35; }
.stats dd {
  order: 1; margin: 0 0 4px;
  font-family: var(--font-display); font-size: clamp(26px, 2.7vw, 38px);
  line-height: 1; color: var(--primary);
}

/* телефон */
.hero__art { position: relative; display: grid; place-items: center; }
.phone {
  position: relative; width: min(300px, 78vw); aspect-ratio: 9 / 18.6;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 42px; padding: 9px;
  box-shadow: var(--sh-lg);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-13px); } }
@media (prefers-reduced-motion: reduce) { .phone { animation: none; } }
.phone::before {
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 78px; height: 6px; border-radius: 99px;
  background: color-mix(in srgb, var(--foreground) 26%, transparent); z-index: 3;
}
.phone__screen {
  position: relative; height: 100%; border-radius: 34px; overflow: hidden;
  background: #000; touch-action: none; cursor: grab; outline: none;
  -webkit-user-select: none; user-select: none;
}
.phone__screen:focus-visible { box-shadow: inset 0 0 0 2px var(--ring); }
.phone__screen.is-grabbing { cursor: grabbing; }

/* лента: слайды лежат стопкой, позицию задаёт JS через translateY */
.phone__feed { position: absolute; inset: 0; }
.pslide {
  position: absolute; inset: 0; overflow: hidden;
  will-change: transform; backface-visibility: hidden;
}
.pslide__vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* нижняя подложка едет вместе со слайдом — под его подпись */
.pslide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 46%, rgba(30,22,18,.74) 100%);
}
.pslide__cap {
  position: absolute; left: 14px; right: 60px; bottom: 34px; z-index: 2;
  display: grid; gap: 4px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.pslide__cap strong { font-size: 13px; }
.pslide__cap span { font-size: 12.2px; opacity: .92; line-height: 1.4; }

.phone__ui {
  position: absolute; inset: 0; z-index: 2; color: #fff; pointer-events: none;
  display: flex; flex-direction: column; padding: 18px 14px 16px;
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
/* верхняя подложка неподвижна: строка «Reels» читается на любом кадре */
.phone__ui::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 27%; z-index: -1;
  background: linear-gradient(180deg, rgba(30,22,18,.46) 0%, transparent 100%);
}
.phone__top { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .04em; }
.phone__top .live { opacity: .85; }
.phone__side { position: absolute; right: 12px; bottom: 92px; display: grid; gap: 16px; justify-items: center; }
.phone__side button { background: none; border: 0; display: grid; gap: 3px; justify-items: center; color: #fff; padding: 0; }
.phone__side svg { width: 23px; height: 23px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.phone__side i { font-style: normal; font-size: 10.5px; }

/* столбик-указатель: сколько роликов в ленте и где мы сейчас */
.phone__dots {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: grid; gap: 5px; justify-items: center;
}
.phone__dots i {
  display: block; width: 3px; height: 10px; border-radius: 9px;
  background: rgba(255,255,255,.34); transition: background .25s, height .25s;
}
.phone__dots i.is-on { background: #fff; height: 18px; }

.phone__bar { margin-top: auto; height: 2.5px; border-radius: 9px; background: rgba(255,255,255,.3); overflow: hidden; }
.phone__bar i { display: block; height: 100%; width: 0; background: #fff; border-radius: inherit; }

/* стрелки листания — только для мыши */
.phone__nav {
  position: absolute; left: 10px; z-index: 4;
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 50%; padding: 0; cursor: pointer;
  background: rgba(20,15,12,.42); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .22s, background .2s;
}
.phone__nav svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.phone__nav--up { top: calc(50% - 36px); }
.phone__nav--down { top: calc(50% + 6px); }
.phone__nav:hover { background: rgba(20,15,12,.68); }
.phone__nav:focus-visible { opacity: 1; box-shadow: 0 0 0 2px var(--ring); }
.phone__screen:hover .phone__nav { opacity: .9; }
@media (hover: none) { .phone__nav { display: none; } }

/* иконка паузы по тапу */
.phone__play {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.phone__play svg { width: 62px; height: 62px; fill: rgba(255,255,255,.86); filter: drop-shadow(0 2px 10px rgba(0,0,0,.4)); }
.phone__screen.is-paused .phone__play { opacity: 1; }

.badge {
  position: absolute; z-index: 3;
  background: var(--popover); color: var(--popover-foreground);
  border: 1px solid var(--border); box-shadow: var(--sh);
  border-radius: var(--r-pill); padding: 9px 16px;
  font-size: 13px; white-space: nowrap;
}
.badge--a { top: 13%; left: -6%; animation: float 6s ease-in-out infinite .6s; }
.badge--b { bottom: 15%; right: -8%; animation: float 6.6s ease-in-out infinite 1.2s; }
@media (prefers-reduced-motion: reduce) { .badge { animation: none; } }

/* ─────────────────────  Бегущая строка  ───────────────────── */

.marquee {
  border-block: 1px solid var(--border);
  background: var(--card);
  padding: 15px 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: slide 34s linear infinite; }
.marquee__row { display: flex; align-items: center; gap: 26px; padding-right: 26px; }
.marquee__row span { font-family: var(--font-display); font-size: clamp(19px, 2vw, 26px); white-space: nowrap; }
.marquee__row i { color: var(--primary-ink); font-style: normal; font-size: 13px; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ─────────────────────  Работы  ───────────────────── */

.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: clamp(22px, 3vw, 34px); }
.chip {
  background: transparent; border: 1px solid var(--border);
  padding: 8px 17px; border-radius: var(--r-pill);
  font-size: 14.5px; color: var(--muted-foreground); cursor: pointer;
  /* перечисляем свойства поимённо: all тянул бы за собой и те, что
     меняет кладка при пересборке, — заливка тогда доезжает рывками */
  transition: background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), box-shadow .22s var(--ease),
              scale .22s var(--ease);
}
.chip:hover { background: var(--accent); color: var(--accent-foreground); }
.chip.is-on {
  background: var(--primary-fill); color: var(--primary-foreground);
  border-color: color-mix(in srgb, var(--primary-fill) 70%, #000 14%);
  box-shadow: var(--sh-sm);
}

/* Круглая кнопка рядом с «Обзором»: пересобирает подборку — те же съёмки,
   но другие кадры из плёнки. Раньше на её месте стояло число кадров, а оно
   ничего не давало: сколько их в обзоре, видно по самой сетке.
   Живёт кнопка только при «Обзоре» — на теме съёмка открыта целиком,
   пересобирать нечего. Уходя, она складывается в ноль ширины, а не
   исчезает: ряд вкладок при этом не прыгает. Отрицательный отступ съедает
   зазор сетки и рамку схлопнутой кнопки. */
.chip--refresh {
  width: 37px; padding: 0; display: grid; place-items: center;
  overflow: hidden;
  transition: background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), box-shadow .22s var(--ease),
              scale .22s var(--ease), width .3s var(--ease),
              margin-inline-start .3s var(--ease), opacity .24s var(--ease);
}
.chip--refresh svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.chip--refresh.is-off {
  width: 0; margin-inline-start: -11px;
  opacity: 0; scale: .72; border-color: transparent; pointer-events: none;
}
/* один оборот на нажатие — столько же, сколько сетка меняет подборку */
@keyframes chip-spin { to { rotate: 360deg; } }
.chip--refresh.is-spin svg { animation: chip-spin .62s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .chip--refresh { transition: none; }
  .chip--refresh.is-spin svg { animation: none; }
}

/* сетка роликов: карточка 9:16, петля включается при наведении, а на
   тач-экранах — у карточки, доехавшей до середины экрана */
.rgrid {
  display: grid;
  /* min() держит две колонки даже на 360 px: minmax сам по себе
     схлопнул бы сетку в одну колонку и карточка стала бы во весь экран */
  grid-template-columns: repeat(auto-fill, minmax(min(208px, 45%), 1fr));
  gap: var(--gap);
}
.rcard {
  position: relative; aspect-ratio: 9 / 16;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; background: var(--muted); cursor: pointer;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.rcard:hover, .rcard:focus-within { transform: translateY(-4px); box-shadow: var(--sh); }
/* is-out — скрыт фильтром, is-hid — ещё не дошла очередь «показать ещё» */
.rcard.is-out, .rcard.is-hid { display: none; }

.rcard__bg { position: absolute; inset: 0; }
.rcard__bg img, .rcard__bg video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* петля лежит поверх постера и проявляется, когда её включил скрипт:
   грузить 63 видео разом браузер не должен */
.rcard__bg video { opacity: 0; transition: opacity .45s var(--ease); }
.rcard.is-play .rcard__bg video { opacity: 1; }

.rcard__grad {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(31,26,23,.84), rgba(31,26,23,.1) 54%, rgba(31,26,23,.32));
}
.rcard__badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: rgba(241, 240, 229, .95); backdrop-filter: blur(8px);
  /* плашка жёстко светлая — цвет текста фиксируем, иначе в тёмной теме сливается */
  color: #2d2521;
  font-size: 10px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  max-width: calc(100% - 78px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* на узкой карточке плашка ниши налезала на хронометраж — там ниша и так
   ясна по активному фильтру, поэтому прячем её */
@media (max-width: 700px) { .rcard__badge { display: none; } }

.rcard__dur {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 9px; border-radius: var(--r-pill);
  background: rgba(31, 26, 23, .58); backdrop-filter: blur(8px);
  color: #F1F0E5; font-size: 11px; font-variant-numeric: tabular-nums;
}
.rcard__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(241, 240, 229, .9); display: grid; place-items: center;
  opacity: 0; transition: opacity .3s var(--ease), scale .3s var(--ease); scale: .85;
}
.rcard:hover .rcard__play, .rcard:focus-within .rcard__play { opacity: 1; scale: 1; }
/* Треугольник не двигаем: его центр тяжести — (8+8+19)/3 = 11.67 из 24 —
   и так почти совпадает с серединой viewBox, а место под остриём глаз
   не считает пустотой. Прежний margin-left: 3px уводил иконку ещё на
   1.5px вправо, и в круге она стояла заметно не по центру. */
.rcard__play svg { width: 18px; height: 18px; fill: #2d2521; }

.rcard__meta { position: absolute; left: 14px; right: 14px; bottom: 14px; color: #F1F0E5; }
.rcard__t {
  margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.rcard__hit {
  position: absolute; inset: 0; z-index: 3;
  background: none; border: 0; cursor: pointer;
  font-size: 0; color: transparent;
}
.rcard__hit:focus-visible { outline-offset: -4px; }

/* новая партия «показать ещё» не выпрыгивает, а проявляется лесенкой.
   fill-mode backwards, а не both: forwards оставил бы transform: none
   на карточке и убил подъём под курсором */
@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.rcard.is-new, .gcard.is-new { animation: card-in .5s var(--ease) backwards; }
@media (prefers-reduced-motion: reduce) {
  .rcard.is-new, .gcard.is-new { animation: none; }
}

/* ──────────────  Смена фильтра  ──────────────
   display переключается в одном кадре: старая подборка пропадала ровно
   там, где возникала новая, и секция под сеткой прыгала на всю разницу
   в высоте. Разводим по времени на три такта — сетка гаснет, едет к
   новой высоте, и уже на ней подборка заходит лесенкой тем же card-in,
   что и партия «показать ещё». */
.rgrid, .pgrid { transition: opacity .15s var(--ease); }
.rgrid.is-swap, .pgrid.is-swap { opacity: 0; }
/* пока едет высота, прозрачность не трогаем: вход карточек уже описан
   в card-in, и общий фейд поверх лесенки читается как муть.
   overflow нужен на те же 340 мс — иначе новая подборка вылезает
   из коробки, которая ещё не доехала */
.rgrid.is-sizing, .pgrid.is-sizing {
  overflow: hidden;
  transition: height .34s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .rgrid, .pgrid,
  .rgrid.is-sizing, .pgrid.is-sizing { transition: none; }
}

/* «показать ещё» — общий блок для роликов, кадров и обложек */
.more { display: grid; justify-items: center; gap: 10px; margin-top: clamp(28px, 3.6vw, 44px); }
/* display:grid перебивает hidden — возвращаем атрибуту силу */
.more[hidden] { display: none; }
.more__count { margin: 0; font-size: 14px; color: var(--muted-foreground); }

/* пусто после фильтра — на всякий случай, если категория окажется пустой */
.grid__empty { margin: 0; padding: 40px 0; text-align: center; color: var(--muted-foreground); }

.sec__note--narrow { display: none; }

.works__more { text-align: center; margin: clamp(30px, 4vw, 46px) 0 0; color: var(--muted-foreground); }
.works__more a { color: var(--primary-ink); text-underline-offset: 4px; }

/* заглушки-градиенты вместо видео; удалить, когда появятся ролики */
[data-shade] { background: var(--muted); }
[data-shade="1"] { background: linear-gradient(150deg, #C39E88, #8A655A 55%, #56453F); }
[data-shade="2"] { background: linear-gradient(150deg, #E4C7B8, #A37764 60%, #6f584e); }
[data-shade="3"] { background: linear-gradient(150deg, #BAAB92, #8A655A 58%, #3c332e); }
[data-shade="4"] { background: linear-gradient(150deg, #F1F0E5, #BAAB92 50%, #A37764); }
[data-shade="5"] { background: linear-gradient(150deg, #A28777, #56453F 62%, #2d2521); }
[data-shade="6"] { background: linear-gradient(150deg, #E4C7B8, #BAAB92 45%, #A28777); }

/* ─────────────────────  Обо мне  ───────────────────── */

.about { align-items: center; }
.sec > .wrap.about > .about__photo { grid-column: 1 / span 5; }
.sec > .wrap.about > .about__copy { grid-column: 7 / -1; }
.about__photo { position: relative; }
.about__ph {
  display: block; width: 100%; height: auto;
  aspect-ratio: 4 / 5; border-radius: var(--r-lg);
  border: 1px solid var(--border); box-shadow: var(--sh-lg);
  /* кадр уже обрезан под 4/5, cover — страховка от другой пропорции */
  object-fit: cover; object-position: 50% 30%;
  /* пока файл грузится, в рамке лежит градиент вместо пустоты */
  background: linear-gradient(160deg, #E4C7B8, #A37764 58%, #56453F);
}
.about__stamp {
  position: absolute; right: -18px; bottom: -18px;
  width: 116px; height: 116px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: var(--primary-fill); color: var(--primary-foreground);
  border: 1px solid color-mix(in srgb, var(--primary-fill) 70%, #000 14%);
  box-shadow: var(--sh);
  font-size: 12px; line-height: 1.45; letter-spacing: .02em;
  animation: float 8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .about__stamp { animation: none; } }
.about__copy h2 { margin-bottom: 18px; }
/* заголовок здесь длинный (39 знаков) — ему нужен свой размер, иначе
   он рассыпается на четыре строки там, где укладывается в две */
.about__copy h2 { font-size: clamp(29px, 4.4vw, 56px); }
@media (min-width: 901px) {
  /* выше 900px колонка сужается до ~550px — нужен и потолок пониже */
  .about__copy h2 { font-size: clamp(34px, 3.4vw, 46px); }
}
.about__copy p { color: var(--muted-foreground); max-width: 58ch; }
.about__copy .ticks { margin-top: 26px; }

/* ─────────────────────  Кадры и обложки  ───────────────────── */

/* кладка из колонок: кадры разной пропорции встают без обрезки,
   а фильтр и «показать ещё» прячут карточки через display:none */
/* Кладка. Без скрипта — обычные CSS-колонки, с ним — колонки-флексы:
   column-count при каждой новой партии пересобирает всю кладку заново и
   уже показанные карточки прыгают, а во флексах партия просто
   дописывается в конец колонок и ничего не двигается.
   --cols держит число колонок в одном месте: его читает и скрипт. */
.pgrid { --cols: 4; column-count: var(--cols); column-gap: var(--gap); }
@media (max-width: 1000px) { .pgrid { --cols: 3; } }
@media (max-width: 700px)  { .pgrid { --cols: 2; } }

.pgrid.is-cols { display: flex; align-items: flex-start; gap: var(--gap); }
.pgrid__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
/* отбивку колонке задаёт gap — свой margin у карточки его бы удвоил */
.pgrid.is-cols .gcard { margin: 0; }

.gcard {
  /* карточка — кнопка: сбрасываем системный вид, иначе в Safari
     проступает серая рамка и собственный шрифт */
  position: relative; display: block; width: 100%; padding: 0;
  appearance: none; font: inherit; color: inherit;
  margin: 0 0 var(--gap); break-inside: avoid;
  border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
  background: var(--muted); cursor: pointer; text-align: left;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.gcard:hover, .gcard:focus-visible { transform: translateY(-3px); box-shadow: var(--sh-sm); }
.gcard.is-out, .gcard.is-hid { display: none; }
.gcard img { display: block; width: 100%; height: auto; }

.gcard__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 12px 11px; color: #F1F0E5; font-size: 12.5px; line-height: 1.35;
  background: linear-gradient(0deg, rgba(31,26,23,.82), transparent);
  opacity: 0; transition: opacity .3s var(--ease);
}
.gcard:hover .gcard__cap, .gcard:focus-visible .gcard__cap { opacity: 1; }

/* ─────────────────  Лента обложек  ───────────────── */
/* Обложки — не кладка, а лента: две дорожки едут навстречу друг другу,
   и все 51 карточка проезжает сама, без «показать ещё».

   Во весь экран: .wrap ограничен 1180 px, поэтому поля вытягиваем
   наружу. 100vw шире документа на полосу прокрутки, но у body уже
   стоит overflow-x: hidden — горизонтальной прокрутки это не добавит,
   а лишние пиксели и так съедает маска по краям. */
.cbelt {
  --belt-h: clamp(180px, 20vw, 260px);
  --belt-gap: clamp(12px, 1.2vw, 20px);
  width: 100vw; margin-inline: calc(50% - 50vw);
  /* отбивку между дорожками держит их собственный padding, а не gap:
     см. .cbelt__row */
  display: grid;
  /* края растворяются в фоне: без маски карточки обрубает по кромке экрана */
  mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

/* Дорожка обрезает всё, что уехало за экран, — и заодно обрезала бы
   карточку, поднявшуюся под курсором вместе с тенью. Поэтому запас
   сверху и снизу отдан padding: он внутри области обрезки. Два таких
   запаса рядом и складываются в отбивку между дорожками */
.cbelt__row { overflow: hidden; padding-block: calc(var(--belt-gap) / 2); }

/* Дорожка — две одинаковые половины, и сдвиг ровно на половину ширины
   склеивает петлю. Отбивка живёт в margin карточки, а не в gap дорожки:
   при gap между половинами оставался бы лишний полупросвет, и на каждом
   круге лента дёргалась бы на эти несколько пикселей. */
.cbelt__track {
  display: flex; width: max-content;
  /* --dur считает скрипт из ширины половины: скорость держим в px/с,
     иначе дорожка из широких карточек ехала бы быстрее узкой */
  animation: belt-run var(--dur, 90s) linear infinite;
}
.cbelt__row--back .cbelt__track { animation-direction: reverse; }

@keyframes belt-run { to { transform: translateX(-50%); } }

/* Остановка под курсором: иначе карточку не рассмотреть и не поймать
   кликом. Клавиатуре — то же самое, но без оглядки на устройство ввода */
@media (hover: hover) {
  .cbelt__row:hover .cbelt__track { animation-play-state: paused; }
}
.cbelt__row:focus-within .cbelt__track { animation-play-state: paused; }

.cbelt .gcard {
  flex: 0 0 auto; width: auto; height: var(--belt-h);
  margin: 0 var(--belt-gap) 0 0;
}
/* высоту задаёт лента, ширину — пропорции кадра: они известны из
   width/height у картинки, поэтому место под неё есть до загрузки */
.cbelt .gcard img { width: auto; height: 100%; }
/* карточка приподнимается на месте: сдвиг вбок разошёлся бы с дорожкой */
.cbelt .gcard:hover, .cbelt .gcard:focus-visible { transform: translateY(-4px); }

.cbelt__note {
  margin: 6px 0 0; color: var(--muted-foreground); font-size: 14.5px;
  grid-column: 1 / span 7; max-width: 62ch;
}

/* Без движения лента бессмысленна, но и терять карточки нельзя:
   дорожка становится обычной прокруткой пальцем или трекпадом */
@media (prefers-reduced-motion: reduce) {
  .cbelt__track { animation: none; }
  .cbelt__row {
    overflow-x: auto; scrollbar-width: thin;
    overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  }
  .cbelt .gcard { scroll-snap-align: center; }
}

/* ─────────────────────  Прайс  ───────────────────── */

.sec__head--mid { display: block; text-align: center; max-width: 620px; margin-inline: auto; grid-column: 1 / -1; }
.sec__head--mid .sec__note { margin: 16px auto 0; }

.sec > .wrap > .ptable { grid-column: 2 / span 10; }
/* отступ от заголовка секции задаёт .sec__head — свой сверху не нужен,
   иначе прайс отбивается вдвое сильнее остальных блоков */
.ptable { margin: 0; }

.ptable__switch {
  display: flex; gap: 4px; width: max-content; margin: 0 auto 40px;
  padding: 4px; border-radius: var(--r-pill);
  /* дорожка светлее самого --secondary: на плотном фоне неактивная
     вкладка читалась с контрастом 2.3:1 */
  background: color-mix(in srgb, var(--secondary) 32%, var(--background));
  border: 1px solid var(--border);
}
.ptable__switch button {
  padding: 10px 24px; border: 0; border-radius: var(--r-pill);
  background: none; cursor: pointer; font-size: 15px;
  color: var(--foreground); font-weight: 500;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.ptable__switch button:hover { background: color-mix(in srgb, var(--card) 55%, transparent); }
.ptable__switch button.is-on {
  background: var(--card); color: var(--foreground); font-weight: 600;
  box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border);
}

.ptable__pane { display: none; }
.ptable__pane.is-on { display: block; }

.pcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: stretch; }

.pcard {
  position: relative; display: flex; flex-direction: column;
  padding: clamp(26px, 3vw, 38px);
  background: var(--card); border: 2px solid var(--border); border-radius: var(--r-lg);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--sh); }
.pcard--hot {
  border-color: var(--primary);
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 7%, var(--card)), var(--card) 60%);
  box-shadow: var(--sh);
}

.pcard__badge {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--primary-fill); color: var(--primary-foreground);
  font-size: 12.5px; letter-spacing: .04em; box-shadow: var(--sh-sm);
}
.pcard__star { width: 12px; height: 12px; fill: currentColor; }

.pcard__head { text-align: center; }
.pcard__head h3 { font-size: clamp(22px, 2.2vw, 28px); }
.pcard__desc { margin: 8px 0 0; font-size: 14.5px; color: var(--muted-foreground); min-height: 2.9em; }

.pcard__price {
  display: flex; align-items: baseline; justify-content: center; gap: 3px;
  margin: 18px 0 0; font-family: var(--font-display); font-size: 21px; color: var(--muted-foreground);
}
.pcard__num { font-size: clamp(34px, 3.4vw, 44px); color: var(--foreground); letter-spacing: -.028em; }
.pcard__price i { font-style: normal; font-family: var(--font-sans); font-size: 14.5px; margin-left: 2px; }
.pcard__sub { margin: 8px 0 0; font-size: 13px; color: var(--muted-foreground); }

/* цифры въезжают по одной */
.dg { display: inline-block; }
.ptable__pane.is-on .dg { animation: dgIn .3s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes dgIn { from { transform: translateY(18px); opacity: 0; } }

.pcard__feat {
  list-style: none; margin: 28px 0 0; padding: 28px 0 0;
  border-top: 1px solid var(--border);
  display: grid; gap: 13px; flex: 1;
}
.pcard--hot .pcard__feat { border-top-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.pcard__feat li { position: relative; padding-left: 28px; font-size: 14.5px; line-height: 1.5; }
.pcard__feat li::before {
  content: ""; position: absolute; left: 4px; top: 5px;
  width: 13px; height: 7px;
  border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}
.pcard .btn { margin-top: 28px; align-self: stretch; }

/* карточки появляются каскадом при смене вкладки */
.ptable__pane.is-on .pcard { animation: cardIn .5s var(--ease) both; }
.ptable__pane.is-on .pcard:nth-child(2) { animation-delay: .1s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }

.notes { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 7px; }
.notes li {
  position: relative; padding-left: 18px; text-align: center;
  font-size: 13.5px; line-height: 1.55; color: var(--muted-foreground);
}
.notes li::before { content: "*"; position: absolute; left: 4px; top: 1px; color: var(--primary-ink); }

@media (prefers-reduced-motion: reduce) {
  .ptable__pane.is-on .dg,
  .ptable__pane.is-on .pcard { animation: none; }
}

/* ─────────────────────  Процесс  ───────────────────── */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap); counter-reset: s; }
.steps li { position: relative; padding-top: 28px; border-top: 2px solid var(--border); transition: border-color .3s; }
.steps li:hover { border-top-color: var(--primary); }

/* линия дорисовывается по мере прокрутки секции — идея из Process Timeline
   (21st.dev, @youcefbnm), но без липкого стека на 300vh: скрипт держит
   в --f долю заполнения каждого шага, CSS тянет scaleX. */
.steps li::after {
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px;
  background: var(--primary);
  transform: scaleX(var(--f, 0)); transform-origin: 0 50%;
  transition: transform .55s var(--ease);
}
.steps__n {
  font-family: var(--font-display); font-size: 15px; color: var(--muted-foreground);
  display: block; margin-bottom: 12px; letter-spacing: .06em;
  transition: color .35s var(--ease);
}
.steps li.is-on .steps__n { color: var(--primary-ink); }
.steps__n::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); margin-right: 9px; vertical-align: .1em;
  transition: background .35s var(--ease), transform .35s var(--ease);
}
.steps li.is-on .steps__n::before { background: var(--primary); transform: scale(1.3); }
/* без анимации — все шаги сразу активны, иначе они останутся серыми */
@media (prefers-reduced-motion: reduce) {
  .steps li::after { transform: scaleX(1); transition: none; }
  .steps__n { color: var(--primary-ink); }
  .steps__n::before { background: var(--primary); }
}
.steps h3 { font-size: 20px; margin-bottom: 9px; }
.steps p { font-size: 14.8px; color: var(--muted-foreground); line-height: 1.55; }

/* ─────────────────────  Отзывы  ───────────────────── */

.grid--quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quote {
  margin: 0; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: clamp(24px, 2.6vw, 34px);
  box-shadow: var(--sh-sm);
  display: flex; flex-direction: column; gap: 22px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.quote:hover { transform: translate(-3px, -3px); box-shadow: var(--sh); }
.quote__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: -8px;
}
.quote__tag {
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-foreground); margin-left: auto;
}
.quote blockquote {
  margin: 0; font-family: var(--font-display); font-style: italic;
  font-size: clamp(18px, 1.6vw, 22px); line-height: 1.44;
}
.quote blockquote::before { content: "“"; color: var(--primary); font-size: 1.4em; line-height: 0; vertical-align: -.15em; margin-right: .06em; }
/* длинные отзывы из переписки — набор помельче, чтобы карточка не разъезжалась */
.quote--long blockquote { font-size: clamp(16.5px, 1.25vw, 18.5px); line-height: 1.5; }
/* эмодзи из оригинальных отзывов: прямое начертание и свой ритм вокруг слов */
.quote .emo {
  font-style: normal; display: inline-block;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: .92em; line-height: 1; vertical-align: -.04em;
  margin: 0 .16em;
}
.quote figcaption { display: flex; align-items: center; gap: 13px; margin-top: auto; }
.quote figcaption span:last-child { display: grid; }
.quote b { font-weight: 500; font-size: 15.5px; }
.quote i { font-style: normal; font-size: 13.4px; color: var(--muted-foreground); }

/* Свёрнутая лента отзывов: на телефоне десять карточек подряд — это долгая
   прокрутка мимо одного и того же, поэтому первые три стоят открытыми,
   а остальные достаёт кнопка. На широком экране сетка в две колонки
   короткая — там ничего не прячем, класс снимает скрипт. */
.quote.is-hid { display: none; }
.quote.is-new { animation: card-in .5s var(--ease) backwards; }
@media (prefers-reduced-motion: reduce) { .quote.is-new { animation: none; } }
.more--quotes { margin-top: clamp(22px, 3vw, 30px); }
.ava {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 17px; font-weight: 500; line-height: 1;
  color: #fff; text-shadow: 0 1px 2px rgba(40, 30, 26, .4);
}
.ava::before { content: attr(data-initial); }
/* заливки 4 и 6 светлые — белая буква на них тонет, берём тёмную */
.ava[data-shade="4"], .ava[data-shade="6"] {
  color: #4a3b35; text-shadow: 0 1px 2px rgba(255, 255, 255, .4);
}

/* ─────────────────────  FAQ  ───────────────────── */

.acc {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px var(--gutter); align-items: start;
}
.acc > details { grid-column: 1 / -1; }
.acc details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 4px 22px;
  box-shadow: var(--sh-sm);
  transition: box-shadow .3s var(--ease), scale .3s var(--ease);
}
.acc details[open] { box-shadow: var(--sh); }
/* тёмная тема: --card (#3c332e) и подложка .sec--alt (#3e352f) отличаются
   на 2 единицы — карточки сливались с секцией. Поднимаем плашку на шаг
   светлее фона и усиливаем рамку. */
.dark .acc details {
  background: color-mix(in srgb, var(--foreground) 8%, var(--card));
  border-color: color-mix(in srgb, var(--foreground) 16%, var(--border));
}
.dark .acc details[open] {
  background: color-mix(in srgb, var(--foreground) 11%, var(--card));
  border-color: color-mix(in srgb, var(--foreground) 24%, var(--border));
}
.acc summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 17px 0; font-size: 16.8px; font-weight: 500;
}
.acc summary::-webkit-details-marker { display: none; }
.acc__i { position: relative; width: 16px; height: 16px; flex: none; }
.acc__i::before, .acc__i::after {
  content: ""; position: absolute; inset: 50% 0 auto; height: 2px;
  background: var(--primary); border-radius: 2px; transition: transform .3s var(--ease);
}
.acc__i::after { transform: rotate(90deg); }
.acc details[open] .acc__i::after { transform: rotate(0); }
.acc details p {
  padding: 0 0 20px; margin: 0; overflow: hidden;
  color: var(--muted-foreground); font-size: 15.6px; max-width: 68ch;
}
/* пока идёт закрытие, details ещё open — держим иконку в закрытом виде */
.acc details.is-closing .acc__i::after { transform: rotate(90deg); }

/* ─────────────────────  CTA  ───────────────────── */

.cta { padding: var(--pad-y) 0; }
.cta__in {
  position: relative; overflow: hidden;
  background: var(--primary-fill); color: var(--primary-foreground);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  padding: clamp(38px, 6vw, 76px) clamp(26px, 5vw, 66px);
  text-align: center;
  max-width: calc(var(--wrap) - 2px);
}
.cta__in::before {
  content: ""; position: absolute; inset: -50% -10% auto; height: 130%;
  /* блики держим слабыми: на их пике белый текст просаживался до 3.9:1 */
  background: radial-gradient(40% 50% at 20% 30%, rgba(255,255,255,.11), transparent 70%),
              radial-gradient(35% 45% at 82% 65%, rgba(255,255,255,.08), transparent 70%);
  pointer-events: none;
  will-change: transform;
}
/* блики медленно расходятся — упрощённая aurora (21st.dev, @dhileepkumargm):
   двигаем один слой трансформом, без перекраски градиента на каждом кадре */
@media (prefers-reduced-motion: no-preference) {
  .cta__in::before { animation: cta-drift 24s ease-in-out infinite alternate; }
}
@keyframes cta-drift {
  from { transform: translate3d(-3%, 0, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.06); }
}
.cta .kicker, .cta .lead { color: var(--primary-foreground); }
.cta h2 { margin-bottom: 18px; }
.cta .lead { margin: 0 auto; }
.cta__links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 32px 0 0; position: relative; }
.cta .btn { --bg: var(--primary-foreground); --fg: var(--primary-ink); border-color: transparent;
  /* кнопка светлая, блик идёт тёмным — в полную силу он читался бы как пятно */
  --shine: color-mix(in srgb, var(--fg) 11%, transparent); }
.cta .btn--ghost { --bg: transparent; --fg: var(--primary-foreground); border-color: color-mix(in srgb, var(--primary-foreground) 45%, transparent); }
.cta .btn--ghost:hover { background: color-mix(in srgb, var(--primary-foreground) 14%, transparent); color: var(--primary-foreground); }

.contacts {
  list-style: none; margin: clamp(34px, 4vw, 52px) 0 0; padding: 26px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--primary-foreground) 26%, transparent);
  display: flex; flex-wrap: wrap; gap: 20px 40px; position: relative;
}
.contacts li { display: grid; gap: 5px; flex: 1 1 170px; }
.contacts li > span:first-child { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--primary-foreground); }
.contacts a, .contacts__plain { text-decoration: none; font-size: 16px; }
.contacts a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ─────────────────────  Подвал  ───────────────────── */

.foot { border-top: 1px solid var(--border); padding: 26px 0; font-size: 14px; color: var(--muted-foreground); }
.foot__in { display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between; align-items: center; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--foreground); }

/* ─────────────────────  Лайтбокс  ───────────────────── */

/* --lb-p ведёт скрипт, пока кадр тащат пальцем: затемнение слабеет,
   и видно, куда кадр уйдёт. */
.lb {
  --lb-p: 1;
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 24px;
  background: rgba(31, 26, 23, calc(.82 * var(--lb-p)));
  backdrop-filter: blur(9px);
  animation: fade .26s var(--ease);
}
.lb[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }

/* Кадр не растёт из карточки и вообще не меняет размер — только мягко
   всплывает на 14px. Уходит тем же путём вниз, поэтому вход и выход
   читаются как одно движение. */
@keyframes lb-box-in  { from { opacity: 0; transform: translateY(14px); } }
@keyframes lb-box-out { to   { opacity: 0; transform: translateY(10px); } }
@keyframes lb-out     { to   { opacity: 0; } }

.lb__box { animation: lb-box-in .34s var(--ease); }
.lb.is-closing { animation: lb-out .21s var(--ease) forwards; }
.lb.is-closing .lb__box { animation: lb-box-out .21s var(--ease) forwards; }
/* кадр утащили пальцем — он уже стоит там, где его отпустили: свою
   анимацию ему не навязываем, гаснет вся подложка целиком */
.lb.is-closing.is-dragged .lb__box { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .lb, .lb__box, .lb.is-closing, .lb.is-closing .lb__box { animation: none; }
}
.lb__box { margin: 0; display: grid; gap: 14px; justify-items: center; max-height: 100%; will-change: transform; }
/* кадр берётся пальцем — браузер не должен перехватывать жест под свой
   скролл: вниз им закрывают, вбок листают. */
.lb__media:has(img), .lb__empty, .lb figcaption { touch-action: none; }
/* У ролика забираем только горизонталь — под свайп к соседнему кадру.
   Вертикаль и полоса управления остаются плееру: перемотка важнее. */
.lb__media video { touch-action: pan-y; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .lb__media:has(img) { cursor: grab; }
  .lb__media:has(img):active { cursor: grabbing; }
}
.lb__media {
  width: min(390px, 84vw); aspect-ratio: 9 / 16;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid color-mix(in srgb, #F1F0E5 30%, transparent);
  background: #3c332e; /* всегда тёмный: лайтбокс живёт поверх затемнения */
  display: grid; place-items: center; text-align: center;
}
.lb__media video { width: 100%; height: 100%; object-fit: cover; }
.lb__media img { width: 100%; height: 100%; object-fit: contain; }
/* фото бывают не 9:16 — коробка обтягивает кадр, а не подкладывает фон по бокам */
.lb__media:has(img) {
  aspect-ratio: auto; width: auto;
  max-width: min(390px, 84vw); max-height: 84vh;
  background: transparent;
}
.lb__media:has(img) img { width: auto; height: auto; max-width: 100%; max-height: 84vh; }
.lb__empty { color: rgba(241, 240, 229, .86); font-size: 15px; padding: 30px; line-height: 1.6; max-width: 30ch; }
.lb figcaption { color: #F1F0E5; font-size: 15px; text-align: center; }
.lb__close {
  position: absolute; top: 18px; right: 20px;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28);
  color: #F1F0E5; cursor: pointer; font-size: 16px;
  transition: background .2s, transform .2s;
}
.lb__close:hover { background: rgba(255,255,255,.2); transform: rotate(90deg); }
.lb__close:active { transform: scale(.92); }

/* стрелки: на узком экране мешали бы кадру — там кадр листают свайпом
   вбок по самому кадру, поэтому прячем их вместе с наведением */
.lb__nav {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28);
  color: #F1F0E5;
  transition: background .2s, scale .12s ease-out;
}
.lb__nav:hover { background: rgba(255,255,255,.2); }
.lb__nav:active { scale: .92; }
.lb__nav--prev { left: clamp(10px, 3vw, 34px); }
.lb__nav--next { right: clamp(10px, 3vw, 34px); }
.lb__nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) { .lb__nav { display: none; } }

/* ─────────────────────  Адаптив  ───────────────────── */

@media (max-width: 1040px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* восемь пунктов меню + бренд + кнопка не влезают в 1280 при базовых
   отступах: ряд ужимал ссылки и кнопку. Поджимаем шаг, а не элементы */
@media (max-width: 1240px) {
  .nav__in { gap: 16px; }
  .nav__links a { padding: 8px 10px; }
}

/* ряд шапки перестаёт помещаться раньше, чем включается бургер, поэтому
   он разбирается ступенями: сначала уходит кнопка (нужно ~1170px, чтобы
   она встала рядом с восемью пунктами), затем сами пункты — в бургер */
@media (max-width: 1180px) {
  .nav__act .btn--sm { display: none; }
}

@media (max-width: 1020px) {
  .nav__links {
    position: fixed; inset: 72px 0 auto; z-index: 39;
    flex-direction: column; gap: 2px;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 14px clamp(20px, 4vw, 32px) 26px;
    transform: translateY(-14px); opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
    box-shadow: 0 20px 40px -30px var(--shadow-color);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 13px 14px; font-size: 17px; border-radius: var(--r-sm); }
  .burger { display: block; }
}

@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__art { order: -1; margin-bottom: 12px; }
  .badge--a { left: 0; }
  .badge--b { right: 0; }
  .sec > .wrap.about > .about__photo,
  .sec > .wrap.about > .about__copy { grid-column: 1 / -1; }
  .about__photo { max-width: 380px; }
}

@media (max-width: 760px) {
  .sec__note--wide { display: none; }
  .sec__note--narrow { display: inline; }

  /* телефон живёт только в hero — на узком экране он и там лишний */
  .hero__art { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16.4px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
  .grid--quotes { grid-template-columns: 1fr; }
  .pcards { grid-template-columns: 1fr; gap: 34px; }
  .ptable__switch { width: 100%; }
  .ptable__switch button { flex: 1; padding: 10px 12px; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .sec__head > div:first-child,
  .sec__head .sec__note { grid-column: 1 / -1; }
  .cbelt__note { grid-column: 1 / -1; }
  .sec > .wrap > .ptable { grid-column: 1 / -1; }
  .foot__in { justify-content: center; text-align: center; }
}

/* Карточка контактов на телефоне: на 375×812 она вырастала до 738px и не
   помещалась в экран целиком — низ уезжал под адресную строку Safari.
   Ужимаем вертикальный ритм, кнопки кладём в колонку, контакты — в две,
   и возвращаем карточке поля по бокам (внутренний padding съедал .wrap). */
@media (max-width: 720px) {
  .cta { padding-inline: 20px; }  /* поля как у остальных секций (.wrap) */
  .cta__in { padding: 30px 22px; border-radius: 24px; }
}

@media (max-width: 560px) {
  .cta { padding-block: clamp(40px, 9vw, 56px); }
  .cta h2 { font-size: 27px; margin-bottom: 12px; }
  .cta .lead { font-size: 15.5px; line-height: 1.5; }
  .cta__links { margin-top: 20px; gap: 10px; }
  .cta__links .btn { flex: 1 1 100%; padding: 13px 20px; }
  .contacts { margin-top: 22px; padding-top: 18px; gap: 16px 18px; }
  .contacts li { flex: 1 1 130px; }
  .contacts li:last-child { flex-basis: 100%; }
}

/* Лайтбокс на телефоне: браузер рисует свои кнопки (полный экран, «картинка
   в картинке», звук) по углам самого <video>. В коробке 9:16 со скруглением
   их срезал угол, а правая попадала под наш крестик. Поэтому на узких экранах
   лайтбокс раскладывается в колонку: полоса под крестик — видео — подпись. */
@media (max-width: 720px) {
  .lb { padding: 0; place-items: stretch; }
  .lb__box {
    width: 100%; height: 100vh; height: 100dvh;
    max-height: none; gap: 0; justify-items: stretch;
    grid-template-rows: calc(58px + env(safe-area-inset-top)) minmax(0, 1fr) auto;
  }
  .lb__box::before { content: ''; }  /* пустая полоса, в которой живёт крестик */

  .lb__media,
  .lb__media:has(img) {
    position: relative;
    width: auto; height: auto;
    max-width: none; max-height: none;
    aspect-ratio: auto;
    border: 0; border-radius: 0; background: transparent;
    min-height: 0;  /* иначе строка 1fr распирается содержимым */
  }
  /* Кадр раскладываем абсолютом: процентная высота внутри строки 1fr
     не разрешается, и картинка вылезала за нижний край экрана.
     contain, а не cover: при обрезке нативные кнопки уезжают за край. */
  .lb__media video,
  .lb__media:has(img) img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    max-width: none; max-height: none;
    object-fit: contain;
  }

  .lb figcaption {
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
    font-size: 14.5px; line-height: 1.4;
  }
  .lb__close {
    top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 2;
    width: 44px; height: 44px;
    background: rgba(20, 16, 14, .55);
  }
}

/* ─────────────  Системные настройки доступности  ─────────────
   Кроме «меньше движения» система умеет сообщать ещё две вещи, и обе
   касаются стекла: «меньше прозрачности» и «больше контраста».
   Прозрачность в этих режимах не смягчаем, а убираем: подложка
   становится плотной, размытие снимается — текст поверх неё важнее
   красоты слоя. */
@media (prefers-reduced-transparency: reduce) {
  .nav, .nav.is-stuck {
    background: var(--background);
    backdrop-filter: none;
  }
  .nav::after { background: linear-gradient(to bottom, var(--background), transparent); }
  .lb {
    background: rgba(31, 26, 23, calc(.96 * var(--lb-p)));
    backdrop-filter: none;
  }
  .phone__nav { background: rgba(20, 15, 12, .9); backdrop-filter: none; }
  .lb__close, .lb__nav { background: rgba(20, 16, 14, .82); }
}

@media (prefers-contrast: more) {
  .nav, .nav.is-stuck {
    background: var(--background);
    backdrop-filter: none;
    border-bottom: 1px solid var(--foreground);
  }
  .nav::after { display: none; }
  .btn--ghost, .chip, .icon-btn, .burger { border-color: var(--foreground); }
  .lb__close, .lb__nav { border-color: #F1F0E5; background: rgba(20, 16, 14, .88); }
  .acc details, .pcard, .quote { border-color: var(--foreground); }
}

/* ============================================================
   Защита контента от копирования
   Выделение текста и перетаскивание медиа отключены по всему сайту.
   Поля ввода исключены — иначе в них нельзя было бы печатать.
   ============================================================ */
html {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;  /* длинный тап в iOS не открывает меню «Копировать» */
}

/* серая/синяя вспышка при тапе в мобильных браузерах — убираем везде */
html, body, a, button, summary, details, label, input, select, textarea,
[role="button"], [tabindex] {
  -webkit-tap-highlight-color: transparent;
}

input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

img, video, picture, svg, canvas {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}

/* пустое выделение остаётся невидимым, если браузер всё же его создаст */
::selection { background: transparent; }
::-moz-selection { background: transparent; }
