/* ============================================================
   COVERPRESS — main.css
   Дизайн-система: монохром-графит + коралл на CTA
   Шрифт: Inter (Variable), локально
   ============================================================ */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2-variations"),
       url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.ttf") format("truetype-variations"),
       url("../fonts/fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair";
  src: url("../fonts/playfair.ttf") format("truetype-variations"),
       url("../fonts/playfair.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bebas";
  src: url("../fonts/bebas.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat.ttf") format("truetype-variations"),
       url("../fonts/caveat.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #111111;
  --text-2: #555555;
  --text-3: #888888;
  --border: #e8e8e8;
  --border-strong: #111111;

  --accent: #FF6B47;
  --accent-hover: #E85A37;
  --accent-active: #D14A2A;

  --backdrop: rgba(0, 0, 0, 0.5);
  --shadow-card: 0 32px 80px rgba(0, 0, 0, 0.18);
  --shadow-tile: 0 12px 32px rgba(0, 0, 0, 0.12);

  --r-tile: 16px;
  --r-card: 24px;
  --r-input: 12px;
  --r-pill: 100px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }

/* ============ Типографика ============ */
.section-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-sub {
  font-size: 16px;
  color: var(--text-2);
  margin-top: 12px;
  max-width: 560px;
}

.section-head {
  margin-bottom: 48px;
}

/* ============ Шапка ============ */
.header {
  padding: 28px 48px;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  user-select: none;
  font-size: 52px;
  white-space: nowrap;
}
/* Логотип = два слова разными шрифтами, неразрывный словесный знак.
   Размер наследуется от родителя через em — встаёт того же размера,
   что и текст рядом. .brand — обёртка с white-space: nowrap чтобы
   COVER и press никогда не разрывались на разные строки. */
.brand {
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
}
.logo-cover {
  font-family: "Fredoka", "Inter", sans-serif;
  font-weight: 700;
  font-variation-settings: "wdth" 110;
  font-size: 1em;
  letter-spacing: -0.01em;
  color: var(--accent);
  line-height: 1;
}
.logo-press {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-style: italic;
  font-size: 0.77em;
  color: #1FB6C3;
  letter-spacing: -0.01em;
  line-height: 1;
}

.footer-logo .logo-cover { color: #FF6B47; }
.footer-logo .logo-press { color: #1FB6C3; }
.footer-logo {
  font-size: 22px;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 8px;
}

/* ============ Каталог: заголовок над сеткой ============ */
.catalog-head {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 36px;
}

.catalog-title {
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* Слово «превращается» — каждая буква свой шрифт и цвет, меняются случайно */
.morph {
  display: inline-block;
  white-space: nowrap;
  margin-left: 0.3em;
  letter-spacing: 0.02em;
}
.m {
  display: inline-block;
  transition: color 0.5s ease, filter 0.3s ease, transform 0.3s var(--ease), opacity 0.3s ease;
  line-height: 1;
  min-width: 0.45em;
  text-align: center;
  will-change: filter, transform;
}
/* 18 визуальных стилей букв — разные шрифты + расширенная палитра */
.m.s1  { font-family: "Inter", sans-serif;       font-weight: 200; color: #111; letter-spacing: -0.02em; }
.m.s2  { font-family: "Fredoka", sans-serif;     font-weight: 700; color: #c97a3e; }
.m.s3  { font-family: Georgia, serif;            font-weight: 400; color: #4a82b3; font-style: italic; }
.m.s4  { font-family: "Inter", sans-serif;       font-weight: 900; color: #5b7df0; }
.m.s5  { font-family: "Inter", sans-serif;       font-weight: 800; color: #FF6B47; font-style: italic; }
.m.s6  { font-family: "Courier New", monospace;  font-weight: 700; color: #6d4f28; }
.m.s7  { font-family: "Fredoka", sans-serif;     font-weight: 700; color: #ff5577; }
.m.s8  { font-family: "Inter", sans-serif;       font-weight: 600; color: #2c3e58; }
.m.s9  { font-family: "Inter", sans-serif;       font-weight: 700;
         background: linear-gradient(135deg, #7b5cff 0%, #3da9ff 100%);
         -webkit-background-clip: text; background-clip: text; color: transparent; }
.m.s10 { font-family: "Playfair", serif;         font-weight: 800; color: #2f9b3d; }
.m.s11 { font-family: "Bebas", sans-serif;       font-weight: 400; color: #ff8a2d; letter-spacing: 0.04em; }
.m.s12 { font-family: "Caveat", cursive;         font-weight: 700; color: #b5651d; }
.m.s13 { font-family: "Inter", sans-serif;       font-weight: 700; color: #1FB6C3; }
.m.s14 { font-family: Georgia, serif;            font-weight: 700; color: #6b3fa0; }
.m.s15 { font-family: "Playfair", serif;         font-weight: 400; color: #d4af37; font-style: italic; }
.m.s16 { font-family: Impact, "Arial Black", sans-serif; font-weight: 900; color: #1a8d3e; letter-spacing: -0.02em; }
.m.s17 { font-family: "Times New Roman", serif;  font-weight: 700; color: #b53d9e; font-style: italic; }
.m.s18 { font-family: "Caveat", cursive;         font-weight: 700;
         background: linear-gradient(135deg, #ff5cc4 0%, #7b5cff 100%);
         -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Смена шрифта скрывается под лёгким блюром и микро-масштабом —
   буква не пропадает в пустоту, а "перетекает" сквозь размытие */
.m.fade {
  filter: blur(3px);
  transform: scale(0.92);
  opacity: 0.7;
}

.catalog-sub {
  font-size: 17px;
  color: var(--text-2);
  margin-top: 18px;
  line-height: 1.5;
}

/* ============ Кнопки ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--text); }


/* ============ Каталог ============ */
.catalog {
  padding: 16px 48px 72px;
  max-width: 1200px;
  margin: 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: var(--r-tile);
  overflow: hidden;
  background: #eee;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  cursor: pointer;
  will-change: transform;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-tile);
}
.tile:hover img {
  transform: scale(1.04);
}

.tile-name {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ============ Как это работает ============ */
.how {
  padding: 64px 48px 96px;
  max-width: 1200px;
  margin: 0 auto;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.step {
  padding: 32px 28px;
  background: var(--surface);
  border-radius: var(--r-card);
  border: 1px solid var(--border);
}

.step-num {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.step-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.step-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ============ Для чего подходит ============ */
.use-cases {
  padding: 64px 48px 96px;
  max-width: 1200px;
  margin: 0 auto;
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.use-card {
  padding: 28px 24px;
  background: var(--surface);
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.use-card:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.use-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.use-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============ Сравнение с конкурентами ============
   Десктоп/планшет: компактная таблица.
   Смартфон: карточки по параметрам. Переключение по media query. */
.compare {
  padding: 32px 48px 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.compare-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 20px;
}
.compare-title {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.compare-sub {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ===== Десктоп/планшет: таблица ===== */
.compare-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
/* Жёсткая раскладка: 4 колонки по 25% каждая */
.compare-table th,
.compare-table td {
  width: 25%;
  padding: 8px 14px;
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.compare-table thead th {
  padding-top: 12px;
  padding-bottom: 10px;
  background: #f7f7f7;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }

.compare-table tbody th {
  font-weight: 500;
  color: var(--text-2);
  background: #fafafa;
}
.compare-table td { color: var(--text); }

/* Колонка COVERPRESS — лёгкий коралловый фон, через все строки */
.compare-table .th-us,
.compare-table .td-us {
  background: #fff5f0;
  box-shadow: inset 1px 0 0 rgba(255, 107, 71, 0.18), inset -1px 0 0 rgba(255, 107, 71, 0.18);
}
.compare-table .th-us {
  box-shadow: inset 1px 0 0 rgba(255, 107, 71, 0.32), inset -1px 0 0 rgba(255, 107, 71, 0.32), inset 0 2px 0 var(--accent);
}
.compare-table .td-us b { color: var(--accent); font-weight: 700; }

.th-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.th-list {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 400;
  line-height: 1.4;
}
.th-us .th-name { display: inline-flex; align-items: baseline; gap: 2px; }

.compare-table .mute { color: var(--text-3); }

/* ===== Смартфон: карточки. Скрыто на десктопе ===== */
.compare-cards { display: none; }
.cc-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
}
.cc-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 6px;
}
.cc-opts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-opt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #f7f7f7;
}
.cc-us {
  background: #fff5f0;
  box-shadow: inset 0 0 0 1px rgba(255, 107, 71, 0.32);
}
.cc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  flex-shrink: 0;
}
.cc-us .cc-name { color: var(--accent); }
.cc-val {
  font-size: 13px;
  color: var(--text);
  text-align: right;
  line-height: 1.35;
}
.cc-us .cc-val { font-weight: 600; }

.compare-foot {
  max-width: 760px;
  margin: 18px auto 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============ FAQ ============ */
.faq {
  padding: 36px 48px 56px;
  max-width: 880px;
  margin: 0 auto;
}

.faq-list {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  transform: rotate(-135deg);
}

.faq-body {
  padding: 0 0 14px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
  max-width: 720px;
}
.faq-body code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
}

/* ============ Подвал — светлый тон-в-тон ============ */
.footer {
  background: #f3f3f3;
  color: #555;
  border-top: 1px solid #e5e5e5;
  padding: 36px 48px 20px;
  margin-top: 64px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.footer-links a {
  font-size: 13px;
  color: #555;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: #111; }

.footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-social .social {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  border: 1px solid #e5e5e5;
}
.footer-social .social img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.footer-social .social:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  padding-top: 14px;
  border-top: 1px solid #e5e5e5;
  font-size: 12px;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-pay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: #2a2a2a;
}
.pay-mir  { background: linear-gradient(90deg, #2f9b3d 0%, #57b956 100%); }
.pay-visa { background: #1A1F71; }
.pay-sbp  { background: linear-gradient(90deg, #1f8fff 0%, #c43dff 100%); }
.pay-mc {
  position: relative;
  width: 32px;
  height: 22px;
  background: transparent;
  padding: 0;
}
.pay-mc .mc-c1, .pay-mc .mc-c2 {
  position: absolute;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
.pay-mc .mc-c1 { left: 0; background: #EB001B; }
.pay-mc .mc-c2 { right: 0; background: #F79E1B; mix-blend-mode: multiply; }
.footer-copy { color: #888; }

/* ============ Reveal-анимация при скролле ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   МОДАЛКА — Apple Liquid Glass
   Обложка фоном на всю карточку, светлая стеклянная панель снизу.
   По умолчанию развёрнута, можно свернуть в одну строку.
   ВСЁ внутри панели — 13px, тёмный текст, без uppercase.
   Кнопка "Купить" — компактная пилюля справа, не растягивается.
   ============================================================ */

/* Модалка — без карточки. Все элементы фиксированы к viewport.
   Картинка центрирована, меняет физический размер под формат.
   Плашка управления 380px фикс в правом нижнем углу viewport. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: modalFade 0.25s ease;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

/* Картинка — самостоятельная, центрирована во viewport.
   Меняет физические пропорции под формат: H 960×720, S 960×960, V 720×960.
   На малых экранах ужимается через max-width/max-height — пропорции сохраняются. */
.image-frame {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  transition: width 0.35s var(--ease), height 0.35s var(--ease);
  animation: modalDrop 0.4s var(--ease);
}
.image-frame[data-format="h"] {
  width: min(960px, calc(100vw - 48px));
  height: min(720px, calc((100vw - 48px) * 0.75), calc(100vh - 48px));
}
.image-frame[data-format="s"] {
  width: min(960px, calc(100vw - 48px), calc(100vh - 48px));
  height: min(960px, calc(100vw - 48px), calc(100vh - 48px));
}
.image-frame[data-format="v"] {
  width: min(720px, calc((100vh - 48px) * 0.75), calc(100vw - 48px));
  height: min(960px, calc(100vh - 48px));
}
.modal-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes modalDrop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Кнопка закрытия — правый верхний угол viewport */
.modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  cursor: pointer;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.85); }


/* Стрелки навигации — прямо на картинке, без подложек.
   Просто белые < > с тенью для контраста. Выше центра. */
.modal-nav {
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease), filter 0.2s ease;
}
.modal-nav-prev { left: 8px; }
.modal-nav-next { right: 8px; }
.modal-nav:hover { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9)); }
.modal-nav-prev:hover { transform: translateY(-50%) translateX(-2px); }
.modal-nav-next:hover { transform: translateY(-50%) translateX(2px); }
.modal-nav:active { transform: translateY(-50%) scale(0.92); }

/* ===== Плашка управления — фикс 380px в правом нижнем углу viewport.
   Не двигается при смене формата, не меняет ширину при сворачивании. ===== */
.modal-glass {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 380px;
  z-index: 5;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #111;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: glassIn 0.35s var(--ease);
}
.modal-glass[hidden] { display: none; }
@keyframes glassIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-title { font-size: 13px; font-weight: 600; color: #111; }


.glass-body { display: flex; flex-direction: column; gap: 5px; }

/* Шапка плашки: формат слева | название по центру | сворачивание справа */
.glass-head { display: flex; align-items: center; gap: 10px; }
.head-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.format-switch {
  flex-shrink: 0;
  display: flex;
  gap: 2px;
  padding: 2px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--r-pill);
}
.fmt-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  color: rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.fmt-btn:hover { color: #111; }
.fmt-btn.active { background: #111; color: #fff; }

/* Кнопка сворачивания справа */
.glass-toggle {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}
.glass-toggle:hover { background: rgba(0, 0, 0, 0.12); }
.glass-toggle svg { transition: transform 0.25s var(--ease); }
.modal-glass[data-state="open"] .glass-toggle svg { transform: rotate(180deg); }

/* Свёрнутая плашка: видна только верхняя строка */
.modal-glass[data-state="closed"] .glass-body { display: none; }
.modal-glass[data-state="closed"] .glass-foot { display: none; }

/* Теги */
.tag-groups { display: flex; flex-direction: column; gap: 4px; }
.tag-group  { display: flex; align-items: center; gap: 8px; }
.tag-group-title {
  flex-shrink: 0;
  width: 70px;
  color: rgba(0, 0, 0, 0.55);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.55);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tag:hover  { background: rgba(255, 255, 255, 0.85); border-color: rgba(0, 0, 0, 0.2); }
.tag.active { background: #111; color: #fff; border-color: #111; }

/* ============================================================
   УНИКАЛЬНЫЙ ВИЗУАЛЬНЫЙ ЯЗЫК ТЕГОВ НА КАЖДЫЙ СТИЛЬ.
   Селектор: .tag-groups[data-style="SLUG"] .tag — атрибут проставляется в JS.
   У каждого стиля своя кисть: фон, бордюр, радиус, активное состояние.
   ============================================================ */

/* 1. editorial_minimalism — строгий квадрат, тонкий бордюр, чб */
.tag-groups[data-style="editorial_minimalism"] .tag {
  border-radius: 3px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.35);
  color: #111;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.tag-groups[data-style="editorial_minimalism"] .tag:hover  { border-color: #111; background: rgba(0,0,0,0.04); }
.tag-groups[data-style="editorial_minimalism"] .tag.active { background: #111; color: #fff; border-color: #111; }

/* 2. business_3d — объёмная плашка с градиентом, синий премиум */
.tag-groups[data-style="business_3d"] .tag {
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eaf0fa 100%);
  border: 1px solid rgba(40, 80, 160, 0.22);
  color: #1d3b78;
  box-shadow: 0 1px 2px rgba(30, 60, 140, 0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}
.tag-groups[data-style="business_3d"] .tag:hover  { transform: translateY(-1px); box-shadow: 0 3px 6px rgba(30,60,140,0.18), inset 0 1px 0 rgba(255,255,255,0.9); }
.tag-groups[data-style="business_3d"] .tag.active {
  background: linear-gradient(180deg, #4a73e8 0%, #2547c4 100%);
  color: #fff;
  border-color: #1d3b9f;
  box-shadow: 0 2px 8px rgba(30, 60, 180, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* 3. paper_collage — неровные углы, dashed бордюр, бежевая бумага */
.tag-groups[data-style="paper_collage"] .tag {
  border-radius: 10px 4px 12px 6px;
  background: #fbf3e3;
  border: 1px dashed rgba(150, 110, 70, 0.5);
  color: #6b4a2b;
  font-family: Georgia, serif;
  font-style: italic;
  box-shadow: 1px 1px 0 rgba(150, 110, 70, 0.15);
}
.tag-groups[data-style="paper_collage"] .tag:nth-child(even) { border-radius: 4px 10px 6px 12px; }
.tag-groups[data-style="paper_collage"] .tag:hover  { background: #f5e8cc; border-style: solid; }
.tag-groups[data-style="paper_collage"] .tag.active { background: #c8956b; color: #fff; border: 1px solid #8d6238; }

/* 4. watercolor — акварельный radial gradient, мягкие пастели */
.tag-groups[data-style="watercolor"] .tag {
  border-radius: 999px;
  background: radial-gradient(ellipse at 30% 30%, #eaf2fa 0%, #cfe1f2 65%, #b6d2ea 100%);
  border: 1px solid rgba(100, 140, 180, 0.25);
  color: #345066;
  box-shadow: 0 2px 8px rgba(140, 180, 220, 0.25);
}
.tag-groups[data-style="watercolor"] .tag:hover  { background: radial-gradient(ellipse at 30% 30%, #dde9f6 0%, #b5d1ec 65%, #92bce0 100%); }
.tag-groups[data-style="watercolor"] .tag.active {
  background: radial-gradient(ellipse at 30% 30%, #8fb8da 0%, #4d83ad 70%, #356a94 100%);
  color: #fff;
  border-color: #4d83ad;
  box-shadow: 0 3px 12px rgba(77, 131, 173, 0.5);
}

/* 5. cinematic — тёмная нуарная, тил-оранж акцент */
.tag-groups[data-style="cinematic"] .tag {
  border-radius: 3px;
  background: rgba(22, 26, 32, 0.88);
  border: 1px solid rgba(240, 175, 90, 0.35);
  color: #f0c987;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.tag-groups[data-style="cinematic"] .tag:hover  { background: rgba(40, 46, 56, 0.92); border-color: #f0c987; }
.tag-groups[data-style="cinematic"] .tag.active {
  background: linear-gradient(180deg, #db8038 0%, #b85d1c 100%);
  color: #fff;
  border-color: #8c4513;
}

/* 6. analog — сепия, плёночная фактура, винтаж */
.tag-groups[data-style="analog"] .tag {
  border-radius: 5px;
  background: #f1e3c6;
  border: 1px solid #c4a878;
  color: #5d4220;
  font-family: "Courier New", monospace;
  font-weight: 600;
  box-shadow: inset 0 0 10px rgba(180, 140, 80, 0.2);
}
.tag-groups[data-style="analog"] .tag:hover  { background: #ead4a4; border-color: #8d6e3d; }
.tag-groups[data-style="analog"] .tag.active {
  background: #8a6238;
  color: #f5ecd9;
  border-color: #5d4220;
  box-shadow: inset 0 0 8px rgba(80, 50, 20, 0.4);
}

/* 7. cartoon — толстый чёрный outline, hard-shadow комикс */
.tag-groups[data-style="cartoon"] .tag {
  border-radius: 999px;
  background: #fff;
  border: 2px solid #111;
  color: #111;
  font-weight: 700;
  box-shadow: 2px 2px 0 #111;
}
.tag-groups[data-style="cartoon"] .tag:hover  { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #111; background: #fffbe6; }
.tag-groups[data-style="cartoon"] .tag.active { background: #ffd84d; color: #111; border-color: #111; box-shadow: 2px 2px 0 #111; }

/* 8. corporate — строгий тёмно-синий, прямые углы */
.tag-groups[data-style="corporate"] .tag {
  border-radius: 2px;
  background: #fff;
  border: 1px solid #1a2942;
  color: #1a2942;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.tag-groups[data-style="corporate"] .tag:hover  { background: #eef1f8; }
.tag-groups[data-style="corporate"] .tag.active { background: #1a2942; color: #fff; border-color: #1a2942; }

/* 9. abstract_ai — неоновый glow, тёмно-фиолетовый */
.tag-groups[data-style="abstract_ai"] .tag {
  border-radius: 999px;
  background: rgba(20, 12, 40, 0.85);
  border: 1px solid rgba(140, 180, 255, 0.4);
  color: #c8e0ff;
  font-weight: 500;
  box-shadow: 0 0 8px rgba(140, 180, 255, 0.25), inset 0 0 6px rgba(140, 180, 255, 0.08);
  text-shadow: 0 0 6px rgba(180, 200, 255, 0.5);
}
.tag-groups[data-style="abstract_ai"] .tag:hover  { border-color: rgba(200, 150, 255, 0.7); box-shadow: 0 0 12px rgba(180, 130, 255, 0.4), inset 0 0 8px rgba(180, 130, 255, 0.15); }
.tag-groups[data-style="abstract_ai"] .tag.active {
  background: linear-gradient(135deg, #b537ff 0%, #00c8ff 100%);
  color: #fff;
  border-color: #b537ff;
  box-shadow: 0 0 16px rgba(180, 100, 255, 0.7);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Описание */
.prompt { display: flex; flex-direction: column; gap: 3px; }
.prompt-head { display: flex; align-items: center; gap: 8px; }
.prompt-label { flex-shrink: 0; width: 70px; color: rgba(0, 0, 0, 0.55); }
.prompt-refresh {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  cursor: pointer;
  border: none;
}
.prompt-refresh:hover { background: rgba(0, 0, 0, 0.14); color: #111; }
.prompt-refresh.spin svg { animation: spin 0.5s var(--ease); }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
/* Поле описания + счётчик внутри в правом нижнем углу */
.prompt-field { position: relative; }
.prompt-counter {
  position: absolute;
  right: 8px;
  bottom: 6px;
  color: rgba(0, 0, 0, 0.4);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.6);
  padding: 1px 5px;
  border-radius: 4px;
}
.prompt-text {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px 18px 10px; /* нижний padding больше — место под счётчик */
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  resize: none;
  font: inherit;
  color: #111;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.prompt-text:focus { outline: none; border-color: rgba(0, 0, 0, 0.3); background: rgba(255, 255, 255, 0.85); }

/* Футер: количество + компактная кнопка купить */
.glass-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.qty-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--r-pill);
  padding: 2px;
}
.qty-btn {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  color: rgba(0, 0, 0, 0.6);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
  background: none;
  border: none;
}
.qty-btn.active { background: #111; color: #fff; }

/* Кнопка купить — пилюля, компактная, справа */
.glass-foot .btn-buy {
  margin-left: auto;
  width: auto;
  flex: 0 0 auto;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 107, 71, 0.35);
  transition: background 0.2s ease;
}
.glass-foot .btn-buy:hover { background: var(--accent-hover); }

/* ===== Чекаут — заменяет стеклянную панель в том же месте viewport ===== */
.checkout {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 380px;
  z-index: 6;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #111;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeUp 0.3s var(--ease);
}
.checkout[hidden] { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.checkout-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
}
.checkout-back:hover { background: rgba(0, 0, 0, 0.06); color: #111; }
.checkout-title { font-size: 13px; font-weight: 600; }
.checkout-sub   { font-size: 13px; color: rgba(0, 0, 0, 0.55); }

.channels { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.channel {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.channel:hover { border-color: rgba(0, 0, 0, 0.3); }
.channel input { position: absolute; opacity: 0; pointer-events: none; }
.channel:has(input:checked) { border-color: #111; background: rgba(255, 255, 255, 0.9); }
.channel-body { display: flex; flex-direction: column; gap: 1px; }
.channel-name { font-size: 13px; font-weight: 600; }
.channel-meta { font-size: 11px; color: rgba(0, 0, 0, 0.5); }
.channel-input { display: flex; flex-direction: column; gap: 6px; }
.channel-input input[type="tel"],
.channel-input input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  font: inherit;
  color: #111;
}
.channel-input input:focus { outline: none; border-color: #111; }
.channel-bind {
  align-self: flex-start;
  padding: 8px 14px;
  background: #111;
  color: #fff;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
}
.channel-bind:hover { background: #2a2a2a; }
.checkout-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 107, 71, 0.1);
  border: 1px solid rgba(255, 107, 71, 0.3);
  border-radius: 10px;
  font-size: 12px;
  color: #8a3a1f;
  line-height: 1.4;
}
.checkout-warn svg { flex-shrink: 0; color: var(--accent); margin-top: 1px; }
.checkout .btn-buy {
  align-self: flex-end;
  width: auto;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.checkout .btn-buy:hover { background: var(--accent-hover); }

/* ============================================================
   USE-CASE МОДАЛКА (портфолио сценария)
   Открывается по клику на плитку «Для чего подходит».
   Frame подстраивается под формат сценария: V/S/H. Большая сторона 960px.
   Внутри frame: коллаж миниатюр + 2 стеклянные плашки (сверху и снизу).
   Без кнопки купить — это просмотровое окно.
   ============================================================ */

.usecase-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
}
.usecase-modal[hidden] { display: none; }

.usecase-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: modalFade 0.25s ease;
}

/* Frame окна — фикс размер под формат сценария.
   Большая сторона = 960px, ужимается на узком экране сохраняя пропорции. */
.usecase-frame {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  background: #0a0a0a;
  animation: modalDrop 0.4s var(--ease);
}
.usecase-frame[data-format="v"] {
  width: min(720px, calc((100vh - 48px) * 0.75), calc(100vw - 48px));
  height: min(960px, calc(100vh - 48px));
}
.usecase-frame[data-format="s"] {
  width: min(960px, calc(100vw - 48px), calc(100vh - 48px));
  height: min(960px, calc(100vw - 48px), calc(100vh - 48px));
}
.usecase-frame[data-format="h"] {
  width: min(960px, calc(100vw - 48px));
  height: min(720px, calc((100vw - 48px) * 0.75), calc(100vh - 48px));
}

/* Коллаж — заполняет весь frame, миниатюры с лёгким перехлёстом.
   Grid с маленькими ячейками; каждая миниатюра в своей ячейке с лёгким поворотом. */
.usecase-collage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 0;
  padding: 6px;
}
.usecase-frame[data-format="v"] .usecase-collage { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(5, 1fr); }
.usecase-frame[data-format="s"] .usecase-collage { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); }
.usecase-frame[data-format="h"] .usecase-collage { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(4, 1fr); }

.collage-tile {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transform: rotate(var(--tilt, 0deg)) translate(var(--ox, 0), var(--oy, 0));
  transition: transform 0.3s var(--ease), z-index 0s;
  background: #1a1a1a;
}
.collage-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Верхняя плашка — РАЗДЕЛЁННАЯ: слева крупное название (шрифт под стиль),
   справа компактный Liquid-Glass-переключатель стилей. */
.usecase-top-glass {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none; /* фон не блокирует, активны только дети */
}

/* Название сценария — крупное, на собственной Liquid Glass подложке.
   Шрифт и цвет меняются через [data-style] на frame. */
.usecase-title {
  pointer-events: auto;
  display: inline-block;
  padding: 10px 26px;
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #111;
  max-width: 65%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r-pill);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Переключатель стилей — отдельная стеклянная пилюля справа */
.usecase-styles {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.usecase-style-btn {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: transparent;
  color: rgba(0, 0, 0, 0.6);
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.usecase-style-btn:hover  { color: #111; }
.usecase-style-btn.active { background: #111; color: #fff; }

/* Шрифт и цвет названия меняются под выбранный стиль.
   Все варианты — для читаемости на светлой Liquid Glass подложке. */
.usecase-frame[data-style="editorial_minimalism"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: #111;
}
.usecase-frame[data-style="business_3d"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  background-image: linear-gradient(180deg, #3a5bdc 0%, #1a2a8c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.usecase-frame[data-style="paper_collage"] .usecase-title {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  color: #6b4a2b;
}
.usecase-frame[data-style="watercolor"] .usecase-title {
  font-family: Georgia, serif;
  font-weight: 400;
  font-style: italic;
  color: #345066;
}
.usecase-frame[data-style="cinematic"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #111;
}
.usecase-frame[data-style="analog"] .usecase-title {
  font-family: "Courier New", monospace;
  font-weight: 700;
  color: #5d4220;
}
.usecase-frame[data-style="cartoon"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #111;
  -webkit-text-stroke: 0;
  text-shadow: 3px 3px 0 #ffd84d;
}
.usecase-frame[data-style="corporate"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1a2942;
  text-transform: uppercase;
}
.usecase-frame[data-style="abstract_ai"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  letter-spacing: 0.02em;
  background-image: linear-gradient(135deg, #b537ff 0%, #00c8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============ Ниши-пузырьки в правом нижнем углу ============
   Без общей подложки — каждый пузырёк сам по себе на коллаже. */
.usecase-niches {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  max-width: calc(100% - 28px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.niche {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--r-pill);
  /* базовая «нейтральная» подача — переопределяется ниже под каждый стиль */
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Пузырьки ниш — копируют визуальный язык тегов под текущий стиль */
.usecase-frame[data-style="editorial_minimalism"] .niche {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #111;
  color: #111;
  font-weight: 400;
}
.usecase-frame[data-style="business_3d"] .niche {
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eaf0fa 100%);
  border: 1px solid rgba(40, 80, 160, 0.35);
  color: #1d3b78;
  box-shadow: 0 2px 8px rgba(30, 60, 140, 0.35), inset 0 1px 0 rgba(255,255,255,0.9);
}
.usecase-frame[data-style="paper_collage"] .niche {
  border-radius: 10px 4px 12px 6px;
  background: #fbf3e3;
  border: 1px dashed rgba(150, 110, 70, 0.6);
  color: #6b4a2b;
  font-family: Georgia, serif;
  font-style: italic;
  box-shadow: 2px 2px 0 rgba(107, 74, 43, 0.25);
}
.usecase-frame[data-style="paper_collage"] .niche:nth-child(even) { border-radius: 4px 10px 6px 12px; }
.usecase-frame[data-style="watercolor"] .niche {
  border-radius: 999px;
  background: radial-gradient(ellipse at 30% 30%, #eaf2fa 0%, #cfe1f2 65%, #b6d2ea 100%);
  border: 1px solid rgba(100, 140, 180, 0.4);
  color: #345066;
  box-shadow: 0 4px 14px rgba(140, 180, 220, 0.5);
}
.usecase-frame[data-style="cinematic"] .niche {
  border-radius: 3px;
  background: rgba(22, 26, 32, 0.92);
  border: 1px solid rgba(240, 175, 90, 0.5);
  color: #f0c987;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.usecase-frame[data-style="analog"] .niche {
  border-radius: 5px;
  background: #f1e3c6;
  border: 1px solid #c4a878;
  color: #5d4220;
  font-family: "Courier New", monospace;
  font-weight: 600;
  box-shadow: inset 0 0 10px rgba(180, 140, 80, 0.2), 0 4px 10px rgba(0, 0, 0, 0.25);
}
.usecase-frame[data-style="cartoon"] .niche {
  border-radius: 999px;
  background: #fff;
  border: 2px solid #111;
  color: #111;
  font-weight: 700;
  box-shadow: 3px 3px 0 #111;
}
.usecase-frame[data-style="corporate"] .niche {
  border-radius: 2px;
  background: #fff;
  border: 1px solid #1a2942;
  color: #1a2942;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.usecase-frame[data-style="abstract_ai"] .niche {
  border-radius: 999px;
  background: rgba(20, 12, 40, 0.88);
  border: 1px solid rgba(140, 180, 255, 0.5);
  color: #c8e0ff;
  font-weight: 500;
  box-shadow: 0 0 12px rgba(140, 180, 255, 0.4), inset 0 0 8px rgba(140, 180, 255, 0.1);
  text-shadow: 0 0 6px rgba(180, 200, 255, 0.5);
}

/* Кнопка закрытия — правый верх viewport */
.usecase-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  cursor: pointer;
}
.usecase-close:hover { background: rgba(255, 255, 255, 0.85); }

/* Курсор на плитках use-case — только у активных (с data-scenario) */
.use-card[data-scenario] { cursor: pointer; }

/* ============ Use-case модалка: мобильная адаптация ============
   На узком экране: frame почти на весь viewport, верх стопкой
   (название + переключатель в столбце), ниши горизонтальным wrap. */
@media (max-width: 700px) {
  /* Сжимаем поля frame до 8px вместо 48px — больше места под контент */
  .usecase-frame[data-format="v"] {
    width: min(720px, calc((100vh - 16px) * 0.75), calc(100vw - 16px));
    height: min(960px, calc(100vh - 16px));
  }
  .usecase-frame[data-format="s"] {
    width: min(960px, calc(100vw - 16px), calc(100vh - 16px));
    height: min(960px, calc(100vw - 16px), calc(100vh - 16px));
  }
  .usecase-frame[data-format="h"] {
    width: min(960px, calc(100vw - 16px));
    height: min(720px, calc((100vw - 16px) * 0.75), calc(100vh - 16px));
  }

  /* Верх: стек, не строка. Название НЕ обрезается. */
  .usecase-top-glass {
    top: 8px;
    left: 8px;
    right: 8px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .usecase-title {
    font-size: clamp(20px, 7vw, 32px);
    padding: 6px 16px;
    max-width: 100%;
    white-space: nowrap; /* остаётся в одну строку, но фон тянется под текст */
  }
  .usecase-styles {
    align-self: flex-start;
    padding: 2px;
  }
  .usecase-style-btn {
    padding: 4px 10px;
    font-size: 11px;
  }

  /* Ниши: горизонтальный wrap, привязка к правому нижнему */
  .usecase-niches {
    right: 8px;
    bottom: 8px;
    left: 8px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    max-width: none;
  }
  .niche {
    padding: 4px 10px;
    font-size: 11px;
  }
  /* У cartoon тяжёлая тень — на мобильном уменьшаем чтобы не вываливалась */
  .usecase-frame[data-style="cartoon"] .niche { box-shadow: 2px 2px 0 #111; }

  /* Кнопка закрытия — компактнее */
  .usecase-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }
}

/* ============ Cookie-баннер ============ */
.cookie {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--text-2);
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1; line-height: 1.5; }
.cookie a { color: var(--text); text-decoration: underline; }

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

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

@media (max-width: 900px) {
  .header { padding: 22px 28px; }
  .logo { font-size: 30px; }
  .compare { padding: 36px 28px 24px; }
  .compare-table { display: none; }
  .compare-cards { display: block; }
  .catalog, .how, .use-cases, .faq { padding-left: 28px; padding-right: 28px; }

  .catalog-head { text-align: left; }

  .grid { grid-template-columns: repeat(2, 1fr); }
  .use-grid { grid-template-columns: repeat(2, 1fr); }

  /* На узких экранах плашка остаётся 380px, но не шире вьюпорта */
  .modal-glass {
    right: 10px;
    bottom: 10px;
    width: min(380px, calc(100vw - 20px));
    padding: 10px 12px;
    gap: 6px;
  }
  .tag-group       { flex-wrap: wrap; gap: 6px; }
  .tag-group-title { width: 100%; }
  .prompt-head     { flex-wrap: wrap; }
  .prompt-label    { width: 100%; }

  .footer { padding: 32px 28px 20px; }
  .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 560px) {
  .header { padding: 16px 20px; }
  .logo { font-size: 22px; }
  .compare { padding: 28px 20px 20px; }
  .cc-opt { flex-direction: column; align-items: flex-start; gap: 2px; }
  .cc-val { text-align: left; }
  .catalog, .how, .use-cases, .faq { padding-left: 20px; padding-right: 20px; }

  .grid { grid-template-columns: 1fr; gap: 12px; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .use-grid { grid-template-columns: 1fr; }

  .channels { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; gap: 20px; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .footer { padding: 32px 20px 20px; }

  .cookie {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .cookie button { width: 100%; }
}
