/*
Theme Name: Topaz AI Ru
Theme URI: https://topazai.icu/
Author: Topaz AI Ru
Description: Тема сайта Topaz AI Ru. Язык дизайна — «раскрывающийся кадр»: узкое окно, которое при прокрутке разворачивается на всю ширину, и стопка карточек, наезжающих друг на друга. Метафора продиктована продуктом: Topaz увеличивает разрешение, кадр на сайте растёт вместе с прокруткой.
Version: 1.0.0
Text Domain: tpz-theme
*/

/* ============================================================
   1. ТОКЕНЫ — палитра снята с topazlabs.com
   ============================================================ */
:root {
  --bg:        #000000;   /* офсайт — чистый чёрный, не графит и не navy */
  --surface:   #0c0c0d;
  --surface-2: #16161a;
  --paper:     #f2f0ee;   /* тёплый офф-вайт офсайта */
  --ink:       #ffffff;
  --muted:     #a8a7a3;   /* тёплый серый офсайта, не холодный #8a8a8a */
  --muted-2:   #757678;
  --line:      rgba(255,255,255,.13);
  --line-2:    rgba(255,255,255,.28);
  --accent:    #2d81ff;
  --accent-2:  #1667e0;
  --lime:      #98e704;   /* редкий акцент офсайта — только «до/после» и метки */

  --r:      12px;   /* скругление офсайта */
  --r-sm:   8px;
  --r-lg:   20px;
  --pad:    40px;   /* поля full-bleed: контент почти во всю ширину окна */
  --maxw-text: 1040px;

  /* Все три свободны в сетке на 11.08.2026, кириллица проверена браузерным
     User-Agent. Onest, Golos Text и Martian Mono сюда ставить нельзя —
     заняты SpicyChat, Yollo AI и RunWay AI соответственно. */
  --f-display: 'Sofia Sans', 'Segoe UI', sans-serif;
  --f-text:    'Raleway', 'Segoe UI', sans-serif;
  --f-mono:    'Ubuntu Sans Mono', 'Consolas', monospace;
}

/* ============================================================
   2. БАЗА
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #5c9dff; }
.content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 1.1rem + 4vw, 4.2rem); }
h2 { font-size: clamp(1.5rem, 1rem + 2.2vw, 2.6rem); margin-top: 1.6em; }
h3 { font-size: clamp(1.12rem, .98rem + .7vw, 1.4rem); font-weight: 700; margin-top: 1.4em; }

p { margin: 0 0 1.05em; color: var(--muted); }
.content p { color: #d6d5d2; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; color: #d6d5d2; }
li { margin-bottom: .45em; }
li::marker { color: var(--accent); }
strong { color: var(--ink); font-weight: 600; }

/* Контейнер: НЕ узкая колонка по центру, а полотно во всю ширину окна с
   полями. Это ось отличия от всей сетки — там у каждого сайта контейнер
   1140–1300px, здесь ограничена только текстовая колонка. */
.wrap { width: 100%; padding: 0 var(--pad); }
.wrap--text { max-width: var(--maxw-text); margin: 0 auto; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--paper); color: #000; padding: 10px 16px; border-radius: var(--r-sm); }
.skip-link:focus { left: 8px; top: 8px; }

/* ============================================================
   3. ЯЗЫК ДИЗАЙНА — кадр, метка-пилюля, коэффициент
   ============================================================ */

/* Кадр — несущая форма темы. Не карточка с заливкой и не пузырь:
   рамка вокруг изображения, как рамка кадра в редакторе. */
.frame {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* Кадр в текстовом потоке страницы. Сама рамка отступов не даёт: в сетках
   и стопках их задаёт контейнер, а между абзацами кадр без полей читается
   как продолжение текста. Высота здесь не фиксируется — пропорции берутся
   у самого файла, чтобы кадр не обрезался ради красивого прямоугольника. */
.content .frame { margin: 28px 0; }
.content .frame img { height: auto; }
.content .frame video { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }

/* Метка-пилюля в углу кадра (референс 2) */
.frame__tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(8px);
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink);
}
.frame__tag--after { background: rgba(152,231,4,.9); color: #0a0a0a; }

/* Коэффициент — крупное моно-число вместо дисплейных цифр:
   у Topaz единица измерения результата это «во сколько раз». */
.ratio {
  font-family: var(--f-mono); font-weight: 600;
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.8rem);
  line-height: 1; color: var(--ink); letter-spacing: -.04em;
}
.ratio span { color: var(--accent); }
.ratio-note { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-top: 8px; }

/* ============================================================
   4. КНОПКИ — подпись слева, стрелка в круге справа (референс 1)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 20px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--f-display); font-weight: 700; font-size: .95rem;
  cursor: pointer; text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn__arrow {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%; display: grid; place-items: center;
  transition: transform .18s ease, background .18s ease;
}
.btn__arrow svg { width: 15px; height: 15px; }
.btn:hover .btn__arrow { transform: translate(2px, -2px); }

.btn--primary { background: var(--paper); color: #0a0a0a; }
.btn--primary .btn__arrow { background: #0a0a0a; color: var(--paper); }
.btn--primary:hover { background: #ffffff; color: #0a0a0a; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost .btn__arrow { background: rgba(255,255,255,.09); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn--accent { background: var(--accent); color: #fff; }
.btn--accent .btn__arrow { background: rgba(255,255,255,.2); color: #fff; }
.btn--accent:hover { background: var(--accent-2); color: #fff; }

.btn--lg { font-size: 1.05rem; padding: 10px 10px 10px 26px; }
.btn--lg .btn__arrow { width: 40px; height: 40px; }

/* ============================================================
   5. ШАПКА — узкая полоса над полотном (референс 2)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,.82);
  backdrop-filter: saturate(160%) blur(10px);
  transition: border-color .2s ease;
  border-bottom: 1px solid transparent;
	padding:  0;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 18px; min-height: 60px; }

.logo { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; color: var(--ink); }
.logo__mark { width: 26px; height: 26px; flex-shrink: 0; }
.logo__text { font-family: var(--f-display); font-weight: 800; font-size: 1.02rem; letter-spacing: -.02em; white-space: nowrap; }
.logo__text i { font-style: normal; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.nav a { font-family: var(--f-text); font-weight: 500; font-size: .9rem; color: var(--muted); padding: 7px 12px; border-radius: 999px; white-space: nowrap; transition: color .16s ease, background .16s ease; }
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.07); }
.nav a.is-here { color: var(--ink); background: rgba(255,255,255,.11); }

.header-cta { flex-shrink: 0; }
.cta__short { display: none; }

.burger { display: none; width: 40px; height: 40px; flex-shrink: 0; background: none; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; padding: 0; align-items: center; justify-content: center; }
.burger span { display: block; width: 17px; height: 1.5px; background: var(--ink); position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 17px; height: 1.5px; background: var(--ink); }
.burger span::before { top: -5px; } .burger span::after { top: 5px; }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { top: 0; transform: rotate(45deg); }
.burger.is-open span::after { top: 0; transform: rotate(-45deg); }

.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--bg); }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: 13px 0; font-family: var(--f-display); font-weight: 600; font-size: .98rem; color: var(--ink); border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: 0; }

/* ============================================================
   6. ПЕРВЫЙ ЭКРАН
   ============================================================ */
/* На широких экранах текст занимает левую половину полотна: правая половина
   отдана фоновому видео — там стоит избушка, единственная читаемая деталь
   кадра. Контейнера тут нет, поэтому колонку задаёт сетка, а не max-width. */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(20px, 3vw, 40px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: 40px;}
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}

/* ── Фоновое видео первого экрана ──────────────────────────────
   .wrap даёт поля по var(--pad), а фон обязан идти от края до края окна,
   поэтому видео вылезает из контейнера ровно на величину поля.
   overflow: hidden на секции — страховка от горизонтальной полосы. */
.hero--media { position: relative; overflow: hidden; }
.hero--media > .hero__grid, .hero--media > .facts { position: relative; z-index: 2; }
.hero__video {
  position: absolute; top: 0; left: calc(var(--pad) * -1);
  width: calc(100% + var(--pad) * 2); height: 100%;
  z-index: 0; object-fit: cover; background: #000;
}

/* Плашка под текстом вместо сплошной завесы на весь первый экран: кадр
   остаётся открытым, затемняется только колонка с текстом.
   Числа не на глаз. Все 141 кадр ролика разложены в сетку 480×270, по
   каждой ячейке посчитана относительная яркость. Самая светлая ячейка во
   всём ролике — небо RGB 204,250,252, L=0.882: на ней лид цветом --muted
   даёт 2.14:1, заголовок — 1.13:1, то есть текста не видно вообще.
   Чёрная заливка альфой 0.82 сажает эту ячейку до L=0.0246 — лид и кикер
   получают 5.85:1 при норме 4.5:1, заголовок 14.08:1 при норме 3:1.
   Минимально достаточная альфа по тому же замеру — 0.75; взято с запасом,
   потому что кадр после декодирования может оказаться чуть светлее замера.
   Ширину плашке задаёт max-width, а не колонка сетки: во всю ширину окна
   она растянулась бы обратно в ту же завесу, от которой уходим. */
.hero__plate {
  position: relative;
  max-width: 62ch;
  padding: clamp(20px, 2.6vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(6px);
}
/* --muted-2 держит 4.6:1 только на чистом чёрном — на плашке поверх кадра
   надпись этим цветом не проходит. Над видео берём --muted. */
.hero--media .hero__eyebrow { color: var(--muted); }
.hero__top { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: baseline; margin-bottom: clamp(18px, 3vw, 34px); }
.hero__eyebrow { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin: 0; }
.hero h1 { margin: 0; max-width: 15ch; }
.hero__lead { color: var(--muted); font-size: clamp(1rem, .93rem + .35vw, 1.15rem); max-width: 52ch; margin: 18px 0 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Полоса фактов под первым экраном — вместо картинки-заглушки */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: clamp(24px, 4vw, 48px); }
.facts__i { background: var(--bg); padding: 20px 18px; }
.facts__i dt { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; }
.facts__i dd { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }

/* ============================================================
   7. РАСКРЫВАЮЩИЙСЯ КАДР (референс 3)
   --grow приходит из scripts.js: 0 — узкое окно, 1 — во всю ширину.
   Ширина и радиус едут ОДНОВРЕМЕННО, поэтому окно на старте читается
   как вертикальная арка, а в конце — как полноэкранный кадр.
   Ниже 500px анимации нет — см. оговорку в конце секции.
   ============================================================ */
.grow { --grow: 0; padding: clamp(20px, 4vw, 56px) 0; }
.grow__frame {
  position: relative;
  margin: 0 auto;
  width: calc(38% + 62% * var(--grow));
  border-radius: calc(var(--r-lg) + (1 - var(--grow)) * 140px);
  overflow: hidden;
  aspect-ratio: calc(0.72 + 1.68 * var(--grow));
  border: 1px solid var(--line);
  background: var(--surface-2);
  will-change: width, border-radius;
}
/* Кадр меняет пропорции от 0.72 до 2.4, обрезая то бока, то верх и низ.
   Смещение по вертикали к 42% удерживает колокольню в кадре в самом
   широком положении: при центрировании её шпиль срезается. */
.grow__frame img, .grow__frame video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; display: block; }
.grow__over {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: clamp(18px, 4vw, 40px);
  text-align: center;
  /* Под надписью теперь фотография, а не тёмная сетка: подложка усилена по
     замеру. Самая светлая ячейка в нижней трети кадра даёт заголовку 3.8:1
     при норме 3:1 для крупного текста, подписи — 6.1:1 при норме 4.5:1. */
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.55) 40%, transparent);
}
.grow__over h2 { margin: 0 0 14px; font-size: clamp(1.3rem, .9rem + 1.9vw, 2.4rem); }
/* --muted-2 поверх фотографии не читается ни при какой подложке. */
.grow__over .ratio-note { color: var(--muted); }
.grow__hint { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); text-align: center; margin: 0 0 clamp(14px, 2vw, 26px); }

/* ============================================================
   8. СТОПКА КАРТОЧЕК (референс 1)
   Каждая карточка липнет к верху, следующая наезжает поверх.
   Отступ сверху нарастает по порядку — так под верхним краем видно
   тонкую кромку предыдущей карточки, и стопка читается как стопка.
   ============================================================ */
.stack { display: flex; flex-direction: column; gap: clamp(16px, 2.5vw, 28px); }
.stack__card {
  position: sticky;
  top: calc(72px + var(--i, 0) * 12px);
  display: grid;
  grid-template-columns: minmax(0, .42fr) minmax(0, .58fr);
  gap: clamp(18px, 3vw, 40px);
  align-items: center;
  padding: clamp(16px, 2vw, 24px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.stack__frame { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; }
.stack__frame img, .stack__frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.stack__price { font-family: var(--f-mono); font-size: .8rem; color: var(--muted-2); margin: 0 0 6px; }
.stack__card h3 { margin: 0 0 14px; font-family: var(--f-display); font-weight: 800; font-size: clamp(1.3rem, 1rem + 1.3vw, 2rem); letter-spacing: -.03em; }
.stack__list { list-style: none; margin: 0 0 20px; padding: 0; }
.stack__list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; color: var(--muted); font-size: .95rem; }
.stack__list svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 5px; stroke: var(--lime); fill: none; }

/* Карточки стопки помечены классом .rise, но всплывать им положено только
   на узких экранах — там, где липкость отключена и блок иначе выглядит
   неподвижной простынёй. На широких экранах работает сама стопка, и два
   эффекта спорили бы: карточка уезжала бы вверх ровно тогда, когда должна
   прилипнуть. Поэтому выше 860px карточка видна сразу, без перехода. */
@media (min-width: 861px) {
  .stack__card.rise { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   9. ПОЯВЛЕНИЕ ПРИ ПРОКРУТКЕ (референс 1)
   ============================================================ */
.rise { opacity: 0; transform: translateY(22px); transition: opacity .55s cubic-bezier(.22,.61,.36,1), transform .55s cubic-bezier(.22,.61,.36,1); }
.rise.is-in { opacity: 1; transform: none; } .hero .rise.is-in { opacity: 1; transform: none; margin: 40px;}

.rise--d1 { transition-delay: .07s; }
.rise--d2 { transition-delay: .14s; }
.rise--d3 { transition-delay: .21s; }

/* ============================================================
   10. СЕКЦИИ, СЕТКИ, КАРТОЧКИ
   ============================================================ */
.section { padding: clamp(36px, 6vw, 88px) 0; }
.section--paper { background: var(--paper); color: #0a0a0a; border-radius: var(--r-lg); }
.section--paper h2, .section--paper h3 { color: #0a0a0a; }
.section--paper p { color: #3d3c3a; }
.section-head { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between; margin-bottom: clamp(20px, 3vw, 40px); }
.section-head h2 { margin: 0; max-width: 22ch; }
.section-head p { margin: 0; max-width: 46ch; color: var(--muted); }

.grid { display: grid; gap: clamp(12px, 1.5vw, 20px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Карточка-кадр: фото сверху, подпись на плашке снизу (референс 2) */
.tile { border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.tile__pic { position: relative; aspect-ratio: 3 / 4; background: var(--surface-2); }
.tile__pic img { width: 100%; height: 100%; object-fit: cover; }
.tile__body { padding: 16px 18px; }
.tile__body h3 { margin: 0 0 8px; font-size: 1.05rem; }
.tile__body p { margin: 0; font-size: .92rem; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 1.06rem; }
.card p:last-child { margin-bottom: 0; }
.card__icon { width: 22px; height: 22px; color: var(--accent); margin-bottom: 14px; }
.card__icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }

/* Панель-врезка */
.panel { border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--r-sm); padding: 18px 20px; background: var(--surface); margin: 0 0 22px; }
.panel--lime { border-left-color: var(--lime); }
.panel--warn { border-left-color: #ff6a4d; }
.panel__label { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 8px; }
.panel > *:last-child { margin-bottom: 0; }

/* ============================================================
   11. ТАБЛИЦЫ — карточки на узких экранах через data-label
   ============================================================ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 26px; }
table.data { width: 100%; border-collapse: collapse; min-width: 540px; font-size: .93rem; }
table.data th, table.data td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: #d6d5d2; }
table.data thead th { background: var(--surface-2); font-family: var(--f-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); font-weight: 400; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.mono { font-family: var(--f-mono); color: var(--ink); }

@media (max-width: 700px) {
  .table-wrap { overflow-x: visible; border: 0; }
  table.data { min-width: 0; }
  table.data thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; overflow: hidden; }
  table.data tr:last-child { margin-bottom: 0; }
  table.data td { padding: 10px 14px 10px 34%; position: relative; min-height: 20px; }
  table.data td::before { content: attr(data-label); position: absolute; left: 14px; top: 10px; width: 38%; font-family: var(--f-mono); font-size: .6rem; letter-spacing: .05em; text-transform: uppercase; color: #adadad; }
}

/* ============================================================
   12. FAQ, ЗВЁЗДЫ, КРОШКИ, ПЕРЕЛИНКОВКА
   ============================================================ */
.faq { border-top: 1px solid var(--line); margin-bottom: 28px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font-family: var(--f-display); font-weight: 600; font-size: 1rem; color: var(--ink); padding: 18px 44px 18px 0; position: relative; }
.faq__q::after { content: ""; position: absolute; right: 10px; top: 50%; width: 11px; height: 11px; margin-top: -8px; border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(45deg); transition: transform .22s ease; }
.faq__item.is-open .faq__q::after { transform: rotate(-135deg); margin-top: -3px; }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p { margin: 0 0 18px; color: var(--muted); }

.stars { position: relative; display: inline-flex; line-height: 0; vertical-align: middle; }
.stars__bg, .stars__fg { display: flex; gap: 2px; }
.stars__bg { color: var(--line-2); }
.stars__fg { position: absolute; top: 0; left: 0; bottom: 0; overflow: hidden; white-space: nowrap; color: var(--lime); }
.stars svg { width: var(--star-size, 18px); height: var(--star-size, 18px); flex-shrink: 0; fill: currentColor; stroke: currentColor; }

.rating { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.rating__val { font-family: var(--f-mono); font-weight: 600; font-size: 3rem; line-height: 1; color: var(--ink); }

.crumbs { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); padding: 22px 0 0; }
.crumbs a { color: var(--muted-2); }
.crumbs a:hover { color: var(--ink); }
.crumbs__sep { margin: 0 8px; }
.crumbs__here { color: var(--muted); }

.page-head { padding: 10px 0 6px; }
.page-lead { font-size: clamp(1rem, .93rem + .35vw, 1.16rem); color: var(--muted); max-width: 60ch; }

.related { margin-top: 52px; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.related a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); font-family: var(--f-display); font-weight: 600; font-size: .95rem; transition: border-color .16s ease, background .16s ease; }
.related a:hover { border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.related a svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--muted-2); }

/* ============================================================
   13. ПОДВАЛ
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(48px, 7vw, 96px); padding: clamp(32px, 4vw, 56px) 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-col h4 { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 14px; font-weight: 400; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--muted); font-size: .93rem; }
.footer-col a:hover { color: var(--ink); }
.footer-note { border-top: 1px solid var(--line); padding-top: 20px; font-size: .82rem; color: var(--muted-2); }
.footer-note p { margin: 0 0 6px; color: var(--muted-2); }

/* ============================================================
   14. АДАПТИВ
   ============================================================ */
@media (max-width: 1100px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .nav + .header-cta, .header-cta { margin-left: auto; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .stack__card { grid-template-columns: minmax(0, 1fr); }
  .stack__frame { aspect-ratio: 16 / 9; }
  /* Стопка на узком экране перестаёт липнуть: три карточки, приклеенные
     друг под другом, съедают весь экран и текст под ними не читается. */
  .stack__card { position: static; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* Раскрытие кадра на узком экране стартует шире: 38% от 700px —
     это полоска, в которой ничего не разобрать. */
  .grow__frame { width: calc(70% + 30% * var(--grow)); border-radius: calc(var(--r-lg) + (1 - var(--grow)) * 60px); }
}

/* Ниже 500px раскрытия нет вовсе. Даже стартовые 70% здесь дают кадр
   около 240px — владелец справедливо считает такую врезку крохотной,
   а весь смысл приёма в том, что кадр РАСТЁТ, и расти ему тут некуда.
   Поэтому на этой ширине сразу полный размер, а подпись про прокрутку
   убирается: раскрывать нечего, и звать к этому — врать.
   scripts.js на такой ширине не навешивает ни наблюдателя, ни слушателей
   прокрутки, так что переменная остаётся нетронутой. */
@media (max-width: 500px) {
  .grow__frame {
    width: 100%;
    border-radius: var(--r-lg);
    aspect-ratio: 16 / 9;
    will-change: auto;
  }
  .grow__hint { display: none; }
}

/* Шапка на узких экранах: полная подпись реф-кнопки уступает место короткой,
   иначе строка «логотип + кнопка + бургер» не помещается и распирает страницу
   вбок (замер на 360px давал переполнение 33px). */
@media (max-width: 620px) {
  .cta__full { display: none; }
  .cta__short { display: inline; }
  .header-cta .btn { font-size: .86rem; padding: 6px 6px 6px 14px; }
  .header-cta .btn__arrow { width: 28px; height: 28px; }
  .header-row { gap: 10px; }
  .burger { width: 36px; height: 36px; }
  .logo__text { font-size: .95rem; }
	.hero__grid {
		padding: 20px;
	}
	.hero .rise.is-in { opacity: 1; transform: none; margin: 20px;}
}

@media (max-width: 620px) {
  :root { --pad: 14px; }
  body { font-size: 16px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .related ul { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  /* Карточки стопки тоже помечены .rise — это правило держит их видимыми
     и здесь, отдельной оговорки под них не нужно. */
  .rise { opacity: 1; transform: none; }
  /* Кадр сразу раскрыт на любой ширине: иначе пользователь с reduce-motion
     увидит узкую полоску вместо иллюстрации. */
  .grow__frame { width: 100%; border-radius: var(--r-lg); aspect-ratio: 16 / 9; will-change: auto; }
  .stack__card { position: static; }
}
@media (max-width: 500px) {
	.grow {
		display: none;
	}
}