/* ==========================================================================
   Овация — лендинг. Основные стили (светлая тема).
   Палитра совпадает с приложением: тёплый фон, чернильный текст,
   оранжевый акцент. Анимации и параллакс — в animations.css.
   ========================================================================== */

:root {
  /* Цвета */
  --bg:            #ffffff;
  --bg-2:          #ffffff;
  --bg-tint:       #EDEDEF;
  --bg-sand:       #f6efe6;
  --ink:           #1e1d1a;
  --ink-2:         #37352f;
  --muted:         #787774;
  --muted-2:       #9b9a97;
  --line:          #e7e6e1;
  --line-2:        #dedcd6;
  --accent:        #e7571f;
  --accent-hover:  #cf4a16;
  --accent-soft:   #E6E9F3;
  --blue:          #3e7bb6;
  --blue-soft:     #e9f0f8;
  --green:         #2f9e63;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(30, 29, 26, .05), 0 2px 8px rgba(30, 29, 26, .04);
  --shadow-md: 0 6px 18px rgba(30, 29, 26, .07), 0 2px 6px rgba(30, 29, 26, .04);
  --shadow-lg: 0 26px 60px rgba(30, 29, 26, .13), 0 8px 22px rgba(30, 29, 26, .06);
  --shadow-xl: 0 44px 100px rgba(30, 29, 26, .18), 0 12px 30px rgba(30, 29, 26, .07);

  /* Геометрия */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --container: 1200px;

  /* Ubuntu — из макета; системные шрифты остаются запасными, если
     веб-шрифт не загрузился (лендинг должен выглядеть целым и без сети). */
  --font: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue',
          Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;

  --ease: cubic-bezier(.16, .84, .24, 1);
}

/* ==========================================================================
   ТЁМНЫЕ РАЗДЕЛЫ

   Экраны лендинга чередуются, начиная с тёмного первого экрана: тёмный —
   светлый. Тёмные берут палитру тёмной темы приложения
   (css/theme-tokens.css, [data-theme="dark"]): фон и поверхности — тёплый
   графит, текст — сливочный, акцент — оранжевый. Имена переменных те же, что
   на свету, поэтому карточки, плитки и панели перекрашиваются сами, без
   отдельных правил на каждый блок.

   .clouds__panel — тёмный остров внутри светлого раздела «Модели»: панель
   с настройками провайдеров повторяет экран приложения в тёмной теме, и на
   белом листе она читается чужой. Токены те же, поэтому весь узел — шапки
   провайдеров, поля с ключами, списки моделей — перекрашивается сам.
   ========================================================================== */

.section--dark,
.footer--dark,
.hero--dark,
.clouds__panel {
  --bg:            #241e20;
  --bg-2:          #2b2426;
  --bg-tint:       #2e2729;
  /* Самый тёмный тон приложения (--editor-bg): поля и текстовые окна */
  --bg-deep:       #110c0c;
  --ink:           #e3d3bb;
  --ink-2:         #d8c9b3;
  --muted:         #b5a795;
  --muted-2:       #8f8375;
  --line:          #322b2d;
  --line-2:        #3d3437;
  --accent:        #f2682f;
  --accent-hover:  #ff7f4a;
  --accent-soft:   #3a1d12;
  --blue:          #8ec0ea;
  --blue-soft:     #262a33;
  --green:         #5cc07f;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .34), 0 2px 8px rgba(0, 0, 0, .24);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .40), 0 2px 6px rgba(0, 0, 0, .26);
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, .52), 0 8px 22px rgba(0, 0, 0, .32);
  --shadow-xl: 0 44px 100px rgba(0, 0, 0, .60), 0 12px 30px rgba(0, 0, 0, .36);

  color: var(--ink-2);
}

/* Фон тёмного раздела — тот же графит. Первый экран красит себя сам
   (фотография в .hero), поэтому заливка вынесена отдельно. */
.section--dark,
.footer--dark { background: var(--bg); }

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.08;
}

p { margin: 0; }

code {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: .88em;
  background: rgba(30, 29, 26, .06);
  border-radius: 6px;
  padding: 2px 6px;
}

::selection { background: var(--accent-soft); color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================== ПРОГРЕСС ============================== */

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #f5a24b);
  z-index: 120;
  border-radius: 0 3px 3px 0;
  transition: width .1s linear;
}

/* ============================== ШАПКА ==============================

   Шапка всегда тёмная — и над первым экраном, и над белыми разделами. Раньше
   она перекрашивалась: js/main.js вешал класс .nav--dark, когда под ней
   оказывался тёмный экран, и на светлых разделах полоса становилась белой.
   При беглой прокрутке это давало мигание, а на белом фоне шапка сливалась с
   содержимым. Теперь цвета тёмной палитры стоят прямо в правилах .nav и не
   зависят ни от класса, ни от скрипта.

   Цвета здесь заданы значениями, а не переменными: сама шапка лежит в светлой
   области документа, и var(--ink) внутри неё — тёмный, а не сливочный. */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}

/* Над контентом шапка полупрозрачная: под ней видно и графит первого экрана,
   и белый раздел — размытие гасит разницу. */
.nav.is-stuck {
  background: rgba(36, 30, 32, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: #322b2d;
}

/* Три колонки: логотип — ссылки — кнопка. Боковые колонки одной ширины
   (1fr), поэтому ссылки стоят ровно по центру шапки, как и раньше, когда
   логотипа ещё не было. */
.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 68px;
}

/* Логотип: значок-овца и надпись «Овация» одним файлом. */
.nav__brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-width: max-content;   /* знак не сжимается, когда ссылки упираются в края */
  line-height: 0;
  border-radius: 12px;
  transition: opacity .2s ease;
}

.nav__brand:hover { opacity: .8; }

.nav__brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Логотип: значок-овца и надпись «Овация» одним файлом. Надпись в исходнике
   белая — она рассчитана ровно на тёмную шапку. */
.nav__brand-logo { display: block; width: auto; height: 51px; }

.nav__links {
  display: flex;
  justify-self: center;
  gap: 4px;
}

.nav__links a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #b5a795;
  font-size: 16px;
  font-weight: 500;
  transition: color .2s ease, background .2s ease;
}

.nav__links a:hover { color: #e3d3bb; background: rgba(227, 211, 187, .08); }

/* Кнопка на тёмной шапке: чёрная плитка на графите не читается — берём акцент. */
.nav .btn--primary { background: #f2682f; }

.nav .btn--primary:hover { background: #ff7f4a; }

.nav__actions { justify-self: end; display: flex; align-items: center; gap: 10px; }

.nav__burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid #3d3437;
  border-radius: 12px;
  background: #2b2426;
  cursor: pointer;
  padding: 0;
  place-items: center;
  gap: 5px;
  flex-direction: column;
}

.nav__burger span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: #e3d3bb;
  transition: transform .25s var(--ease), opacity .2s ease;
}

.nav__burger.is-open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__burger.is-open span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* ============================== КНОПКИ ============================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease),
              background .2s ease, border-color .2s ease, color .2s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: #1e1d1a;
  /* background: var(--accent); */
  color: #fff;
  /* box-shadow: 0 6px 16px rgba(231, 87, 31, .24); */
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 14px 30px rgba(231, 87, 31, .32);
}

.btn--ghost {
  background: var(--bg-2);
  border-color: var(--line-2);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover { border-color: var(--ink-2); box-shadow: var(--shadow-md); }

.btn--sm { padding: 9px 18px; font-size: 15px; }

.btn--lg { padding: 15px 26px; font-size: 17px; }

.btn--block { width: 100%; }

.btn__icon { width: 22px; height: 22px; flex: none; }

.btn__text { display: grid; text-align: left; line-height: 1.2; }

.btn__text small {
  font-size: 12px;
  font-weight: 500;
  opacity: .72;
  letter-spacing: .01em;
}

/* «Скоро» — когда файла сборки ещё нет */
.btn.is-soon {
  background: var(--bg-tint);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: auto;
}

.btn.is-soon:hover { transform: none; box-shadow: none; }
.btn.is-soon .btn__text small::after { content: ' · скоро'; color: var(--accent); font-weight: 600; }

/* ============================== HERO ==============================
   Первый экран — тёмный: палитру берёт класс .hero--dark из блока токенов
   выше, а фон — фотография-градиент во весь экран. Цвет в background стоит
   страховкой: пока картинка грузится (и если её отключили), экран остаётся
   графитовым, а не белым. */

.hero {
  position: relative;
  /* Первый экран занимает окно целиком. Именно min-height, а не height:
     содержимое первого экрана — около 1055px (заголовок, кнопки, снимок
     приложения), и на низком окне — ноутбук 900px — фиксированная высота
     обрезала бы его, а снимок вылезал на белый раздел «Проекты». На высоком
     окне разницы нет: секция всё равно растягивается на весь экран. */
  min-height: 100vh;
  padding: 116px 0 92px;
  background: #241e20 url('../img/bg-2k.jpg') center / cover no-repeat;
}

.blob--orange {
  width: 620px; height: 620px;
  left: -180px; top: -220px;
  background: radial-gradient(circle at 50% 50%, rgba(231, 87, 31, .30), rgba(231, 87, 31, 0) 68%);
}

.blob--blue {
  width: 560px; height: 560px;
  right: -160px; top: -120px;
  background: radial-gradient(circle at 50% 50%, rgba(62, 123, 182, .26), rgba(62, 123, 182, 0) 70%);
}

.blob--soft { opacity: .34; }

.hero__copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: 980px;
}

.hero__icon {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  image-rendering: pixelated;
  box-shadow: 0 10px 26px rgba(231, 87, 31, .20);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.eyebrow--tight { margin-bottom: 4px; }

.hero__title {
  max-width: 100%;
  font-size: clamp(32px, 4.4vw, 62px);
  line-height: 1.14;
  /* Ubuntu сам по себе узкий: в макете заголовок набран без трекинга */
  letter-spacing: normal;
  font-weight: 800;
  color: var(--ink);
}

/* Подложка под «быстро и просто»: тёмная плашка из макета — снизу строки
   вверх, чуть шире слов, позади текста. Размеры в em, чтобы масштабировались
   вместе с кеглем заголовка. */
.hero__title .mark {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  z-index: 0;
}

.hero__title .mark::before {
  content: '';
  position: absolute;
  left: -.01em;
  right: -.01em;
  bottom: 0;
  height: .52em;
  border-radius: .26em;
  background: #4b4242;
  z-index: -1;
}

.hero__subtitle {
  font-size: clamp(16px, 1.25vw, 18px);
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 20px;
}

.hero__actions .btn {
  padding: 14px 24px;
}

/* Кнопки первого экрана. Селекторы с двойным классом перебивают состояние
   .is-soon: в hero кнопки выглядят как в макете, даже если сборки для
   Windows ещё нет (клик по ней всё равно скажет, что файл готовится). */
.btn.btn--mac {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
}

.btn.btn--mac:hover {
  background: #eceae4;
  border-color: #eceae4;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .38);
}

.btn.btn--win {
  background: #82b7d8;
  border-color: #82b7d8;
  color: #101010;
  box-shadow: 0 8px 20px rgba(130, 183, 216, .34);
}

.btn.btn--win:hover {
  background: #93c4e1;
  border-color: #93c4e1;
  box-shadow: 0 14px 30px rgba(130, 183, 216, .46);
}

.btn--mac .btn__text small,
.btn--win .btn__text small { opacity: .68; }

.hero__actions .btn.is-soon { cursor: pointer; }

.hero__actions .btn.is-soon .btn__text small::after { content: none; }

.hero__meta {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* ---- Сцена: окно приложения и овечки ---- */

.hero__stage { position: relative; margin-top: 84px; z-index: 2; }

.stage { position: relative; }

.window {
  position: relative;
  z-index: 1;
  border-radius: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .52), 0 6px 18px rgba(0, 0, 0, .32);
  overflow: hidden;
  will-change: transform;
}

.window img { width: 100%; }

/* Овечки расставлены по макету: спит на кромке окна, пасётся у левого края,
   идёт правее окна. Разная скорость параллакса даёт глубину сцены. */
.stage__sheep {
  position: absolute;
  z-index: 4;
  height: auto;
  pointer-events: none;
  user-select: none;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .45));
  will-change: transform;
}

.stage__sheep--sleep {
  left: 19.4%;
  bottom: 100%;
  width: clamp(74px, 10.9%, 128px);
  margin-bottom: -1.2%;
}

.stage__sheep--eat {
  left: -4.1%;
  top: 71%;
  width: clamp(74px, 10.9%, 128px);
}

.stage__sheep--walk {
  left: 100%;
  top: 58%;
  margin-left: 11.3%;
  width: clamp(68px, 10.1%, 120px);
}


/* ============================== СЕКЦИИ ============================== */

.section {
  position: relative;
  padding: 112px 0;
}

.section--dark { background: var(--bg); }

/* Волосяная линия на стыке тёмного раздела со светлым: без неё края
   сливаются, когда разделы идут подряд. */
.section--dark::before,
.section--dark::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

.section--dark::before { top: 0; }
.section--dark::after  { bottom: 0; }

/* Подсветка в углах раздела: слой под содержимым. Пятна лежат в
   .section__decor, поэтому без position: absolute они схлопывались в
   невидимую строку, а без z-index перекрывали текст. */
.section__decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

.section > .container { position: relative; z-index: 1; }

.blob { position: absolute; display: block; border-radius: 50%; }

/* 880px — под ширину Ubuntu: строки заголовков с <br> должны влезать целиком */
.section__head { max-width: 880px; margin-bottom: 60px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; display: grid; }

.section__head h2 { margin: 18px 0 0; font-size: clamp(30px, 3.8vw, 50px); }

.section__head .eyebrow { margin-bottom: 4px; }

.section__lead {
  margin-top: 20px;
  font-size: clamp(16.5px, 1.15vw, 19px);
  color: var(--muted);
  max-width: 680px;
}

.section__head--center .section__lead { margin-left: auto; margin-right: auto; }

/* ============================== ПРОЕКТЫ ============================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 64px;
  align-items: start;
}

.split__text { display: grid; gap: 30px; }

.feature {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px 16px;
  align-items: start;
}

.feature__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
}

/* Иконки — контурные SVG 16×16 из набора приложения (js/ui-icons.js):
   линия наследует цвет от родителя, поэтому эмодзи здесь больше нет. */
.feature__icon svg { width: 22px; height: 22px; }

.feature h3 { font-size: 20px; }
.feature p { color: var(--muted); font-size: 15.8px; }

.split__media { position: relative; }

.media {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  will-change: transform;
}

/* Скриншот проекта — цельная карточка «Типаж автора» (772×779), а не длинный
   свиток: контейнер держит ровно её пропорции, поэтому кадр виден целиком, без
   обрезки по бокам. Мягкого затемнения снизу тут нет: оно съедало бы нижнюю
   строку карточки, а прятать обрезанный край больше нечего. В одну колонку
   (≤1080px) высоту тоже не ограничиваем: квадратный кадр помещается сам. */
.media img { display: block; width: 100%; height: auto; }

.media--shot { aspect-ratio: 772 / 779; }

.media--shot img { height: 100%; object-fit: cover; object-position: top center; }

.media__pin {
  position: absolute;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.media__pin--top { top: 14px; left: 14px; }
.media__pin--bottom { bottom: 14px; right: 14px; color: var(--accent); }

/* ---- Правила ---- */

.rules-strip {
  margin-top: 96px;
  padding-top: 64px;
  border-top: 1px solid var(--line);
}

.rules-strip__head { display: grid; gap: 16px; max-width: 760px; margin-bottom: 34px; }
.rules-strip__head h3 { font-size: clamp(22px, 2.2vw, 30px); }
.rules-strip__head p { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--muted);
  transition: transform .25s var(--ease), border-color .25s ease, color .25s ease, box-shadow .25s ease;
}

.chip:hover { transform: translateY(-2px); border-color: var(--line-2); color: var(--ink); box-shadow: var(--shadow-sm); }

.chip--on {
  background: var(--accent-soft);
  border-color: rgba(231, 87, 31, .28);
  color: var(--accent-hover);
  font-weight: 600;
}

.chip--on::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.chip--more {
  border-style: dashed;
  background: transparent;
  color: var(--muted-2);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 56px;
}

.mini {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.mini:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.mini b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 8px; }
.mini p { color: var(--muted); font-size: 15px; }

/* ============================== ЧАТ И АГЕНТЫ ============================== */

.cards { display: grid; gap: 20px; }
.cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .32s var(--ease), box-shadow .32s var(--ease), border-color .3s ease;
}

.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line-2); }

.card__icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--bg-tint);
  font-size: 21px;
  margin-bottom: 18px;
}

.card h3 { font-size: 18.5px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* «Простые» карточки: светлый градиент из макета задавался белым цветом, из-за
   чего в тёмном разделе они оставались белыми, а заголовки в них — сливочными
   (h3 берёт --ink). Собираем тот же градиент из переменных: на свету это
   по-прежнему белый в почти белый, на графите — две соседние его ступени. */
.card--plain { background: linear-gradient(180deg, var(--bg-2), var(--bg-tint)); }
.advantages { margin-top: 12px; }

/* ---- Агенты ---- */

.agents {
  margin-top: 72px;
  padding: 38px;
  border-radius: var(--radius-xl);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.agents__head { max-width: 720px; margin-bottom: 30px; display: grid; gap: 12px; }
.agents__head h3 { font-size: clamp(22px, 2.2vw, 30px); }
.agents__head p { color: var(--muted); }

.agents__body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.agents__tabs { display: grid; gap: 10px; }

.agent-tab {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 0 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #3a3336;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: background .25s ease, border-color .25s ease, transform .25s var(--ease);
  line-height: normal;
}

.agent-tab__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  transition: color .25s ease;
}

/* Роли агентов рисуются контуром из набора приложения: компас, перо,
   лист правок, реплика — те же иконки, что в пикере агентов. */
.agent-tab__icon svg { width: 20px; height: 20px; }

.agent-tab b { color: var(--ink); font-size: 16px; }
/* Подпись роли: на плите #3a3336 прежний --muted-2 давал 3,3:1 — поднимаем
   до --muted (5,2:1), иначе строка «текст глав» читается с трудом. */
.agent-tab i { color: var(--muted); font-style: normal; font-size: 13px; }

.agent-tab:hover { transform: translateX(3px); }

.agent-tab.is-active {
  background: var(--ink);
}

/* На светлой плитке выбранного агента сливочные надписи пропадают: имя берёт
   цвет фона, подпись — тот же графит, но попрозрачнее. Иконка остаётся тёмным
   квадратом, поэтому оранжевый контур на нём читается как в приложении. */
.agent-tab.is-active b { color: var(--bg); }
.agent-tab.is-active i { color: rgba(36, 30, 32, .72); }

.agent-tab.is-active .agent-tab__icon { background: var(--bg-2); color: var(--accent); }

/* Панель агента — «экран» внутри карточки. На свету это была голубая плашка
   #E6E9F3, но в тёмном разделе она оставалась светлой, а текст в ней —
   сливочный (--ink-2): надписи пропадали. Берём самый тёмный тон приложения
   (--editor-bg): тогда сливочный текст и плашки правил читаются, а панель
   отличается и от карточки, и от вкладок агентов. */
.agent-view {
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-deep, #241e20);
  min-height: 260px;
}

.agent-view__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* Плашка «Агент «Сюжет»» — инверсия поверхности: подложка берётся из --ink,
   поэтому и текст должен быть цветом фона (--bg), а не всегда белым: в тёмной
   теме --ink сливочный, и белые буквы на нём не видны. */
.agent-view__badge {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
}

.agent-view__hint { font-size: 13px; color: var(--muted-2); }

.agent-view__text { color: var(--ink-2); font-size: 16.5px; margin-bottom: 18px; }

.agent-view__rules { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }

.agent-view__rules li {
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 13.5px;
  color: var(--muted);
}

.agent-view.is-swapping { animation: agentSwap .45s var(--ease); }

/* ---- Инструменты ---- */

.tools {
  margin-top: 72px;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 44px;
  align-items: center;
}

.tools__head h3 { font-size: clamp(22px, 2.2vw, 30px); margin-bottom: 12px; }
.tools__head p { color: var(--muted); }

.tools__grid { display: grid; gap: 12px; }

.tool {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 2px 16px;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.tool:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }

.tool span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bg-tint);
  font-size: 20px;
}

.tool b { color: var(--ink); font-size: 16px; }
.tool i { color: var(--muted-2); font-style: normal; font-size: 14px; }

/* ============================== МОДЕЛИ ============================== */

.providers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.provider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s ease;
}

.provider:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-2); }

/* Логотип провайдера — настоящий знак бренда из img/logos;
   плитка остаётся тонированной фирменным цветом (--c) */
.provider__mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  flex: none;
  border-radius: 11px;
  background: color-mix(in srgb, var(--c) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 22%, #fff);
}

.provider__mark img { display: block; width: 22px; height: 22px; }

.provider b { color: var(--ink); font-weight: 600; }

.provider--local { background: linear-gradient(180deg, #fff, var(--blue-soft)); }

/* ---- YandexGPT и GIGA-чат ---- */

.clouds {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: start;
  margin-top: 64px;
}

.clouds__copy h3 { font-size: clamp(24px, 2.4vw, 34px); margin: 14px 0 16px; }
.clouds__copy p { color: var(--muted); }

/* Имя провайдера в списке — не просто жирная строка внутри серого текста */
.ticks b { color: var(--ink-2); font-weight: 600; }

.ticks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 11px; }

.ticks li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
  font-size: 15.5px;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0; top: .45em;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23e7571f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 12.5 5'/%3E%3C/svg%3E") center/11px no-repeat;
}

.clouds__panel {
  display: grid;
  gap: 14px;
  padding: 26px;
  border-radius: var(--radius-xl);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  will-change: transform;
}

.cloud {
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  background: var(--bg-tint);
}

.cloud__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.cloud__logo {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.cloud__logo img { display: block; width: 20px; height: 20px; }

.cloud__title { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.cloud__title b { color: var(--ink); font-size: 16px; }
.cloud__title i { color: var(--muted-2); font-style: normal; font-size: 12.5px; }

/* Поля внутри карточки провайдера — те же панельные, только плотнее */
.cloud .panel__field { margin: 14px 0 0; }
.cloud .panel__status { margin-top: 8px; }
.cloud .panel__models { margin: 12px 0 0; }
.cloud .panel__models li { background: var(--bg-2); }

.clouds__panel .panel__note { margin: 4px 2px 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}

.badge--ok { background: rgba(47, 158, 99, .1); color: var(--green); }

.pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(47, 158, 99, .5);
  animation: pulse 2.4s infinite;
}

.panel__status { margin-top: 10px; color: var(--muted-2); font-size: 14px; }

.panel__field {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.panel__input,
.panel__btn {
  padding: 10px 14px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-size: 13.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink-2);
}

.panel__input { flex: 1 1 180px; }

.panel__btn { background: var(--bg-2); font-family: var(--font); font-weight: 600; color: var(--muted); }

.panel__btn--dark { background: var(--ink); color: #fff; border-color: var(--ink); }

.panel__models { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }

.panel__models li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  border-radius: 12px;
  background: var(--bg-tint);
  font-size: 13.5px;
}

.panel__models b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); font-weight: 600; }
.panel__models i { color: var(--muted-2); font-style: normal; }

.panel__note { font-size: 13.5px; color: var(--muted-2); }

.models__foot {
  margin-top: 44px;
  max-width: 720px;
  color: var(--muted);
  font-size: 15.5px;
}

/* ============================== СКАЧАТЬ ============================== */

.downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
}

.download {
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 6px;
  transition: transform .34s var(--ease), box-shadow .34s var(--ease);
}

.download:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.download__icon {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  border-radius: 18px;
  background: var(--bg-tint);
  color: var(--ink);
  margin-bottom: 10px;
}

.download__icon svg { width: 32px; height: 32px; }

.download h3 { font-size: 24px; }
.download__req { color: var(--muted); font-size: 15px; }
.download__file {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: var(--muted-2);
  margin-bottom: 14px;
  word-break: break-all;
}

.download--soon .download__icon { opacity: .6; }

.download__hint { margin-top: 14px; font-size: 13.5px; color: var(--muted-2); }

.source {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 880px;
  margin: 28px auto 0;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-md);
}

.source__text { display: grid; gap: 2px; }
.source__text b { color: #fff; }
.source__text span { font-size: 14px; opacity: .72; }

.source__code {
  background: rgba(255, 255, 255, .08);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #fff;
  margin-left: auto;
}

.source__prompt { color: #f5a24b; margin-right: 6px; }
.source__comment { color: rgba(255, 255, 255, .45); margin-left: 8px; }

.source__copy {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, transform .2s var(--ease);
}

.source__copy:hover { background: rgba(255, 255, 255, .14); transform: translateY(-1px); }

.notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 880px;
  margin: 28px auto 0;
}

.note {
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--muted);
}

.note b { color: var(--ink); }

/* ---- FAQ ---- */

.faq { max-width: 880px; margin: 88px auto 0; }

.faq h3 { font-size: clamp(22px, 2.2vw, 30px); margin-bottom: 24px; }

.faq__list { display: grid; gap: 12px; }

.faq details {
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow .3s ease, border-color .3s ease;
}

.faq details[open] { box-shadow: var(--shadow-md); border-color: var(--line-2); }

.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 24px;
  font-weight: 600;
  color: var(--ink);
  font-size: 16.5px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '';
  position: absolute;
  right: 24px; top: 50%;
  width: 11px; height: 11px;
  border-right: 2px solid var(--muted-2);
  border-bottom: 2px solid var(--muted-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .3s var(--ease);
}

.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

.faq details p { padding: 0 24px 22px; color: var(--muted); font-size: 15.5px; }

/* ============================== ПОДВАЛ ============================== */

/* Подвал закрывает чередование: за белым разделом скачивания идёт тёмный,
   как и остальные пары на странице. */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 44px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand img { height: 30px; width: auto; image-rendering: pixelated; }
.footer__brand b { display: block; color: var(--ink); }
.footer__brand span { font-size: 13.5px; color: var(--muted-2); }

.footer__links { display: flex; gap: 20px; margin: auto; flex-wrap: wrap; align-items: center; }

/* Ссылка на свету и кнопка «Написать в поддержку» в подвале выглядят одинаково:
   кнопка нужна лишь потому, что открывает модалку, а не переход по якорю. */
.footer__links a,
.footer__support {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14.5px;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease;
}

.footer__links a:hover,
.footer__support:hover { color: var(--accent); }

.footer__support:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.footer__note { font-size: 13.5px; color: var(--muted-2); width: 100%; }

/* ==================== ТЁМНЫЕ РАЗДЕЛЫ: ЧАСТНОСТИ ====================
   То, что не перекрашивается переменными: цвета, зашитые в светлую тему,
   знаки провайдеров и поля-макеты внутри карточек.

   Кроме тёмных разделов эти же правила нужны тёмной панели провайдеров
   (.clouds__panel): она стоит островом в светлом разделе «Модели», и селекторы
   вида `.section--dark …` до неё не достают. */

/* Поля и кнопки в карточках провайдеров.
   В приложении тёмная тема уводит поле в самый тёмный тон, а кнопка остаётся
   поверхностью карточки. На лендинге этого мало: карточка, поле и кнопка
   собирались в одно тёмное пятно, и кнопку с полем не было видно. Поэтому у
   поля и кнопки контур из сливочного (--ink), а текст — почти белый. */
.section--dark .panel__input,
.clouds__panel .panel__input {
  background: var(--bg-deep);
  border-color: rgba(227, 211, 187, .42);
  color: var(--ink);
}

.section--dark .panel__btn,
.clouds__panel .panel__btn {
  background: rgba(227, 211, 187, .18);
  border-color: rgba(227, 211, 187, .42);
  color: var(--ink);
}

/* Строка модели: раньше её подложка совпадала с карточкой, и список читался
   серой массой. Теперь строка светлее карточки и обведена контуром. */
.section--dark .cloud .panel__models li,
.clouds__panel .cloud .panel__models li {
  background: rgba(227, 211, 187, .11);
  border: 1px solid rgba(227, 211, 187, .22);
}

/* Пояснение справа от модели («умнее», «быстрее и дешевле») и строка статуса
   на тёмном фоне были почти нечитаемы: поднимаем до --muted. */
.section--dark .panel__models i,
.section--dark .panel__status,
.clouds__panel .panel__models i,
.clouds__panel .panel__status { color: var(--muted); }

.section--dark .panel__btn--dark { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Плитка знака провайдера: на свету она подмешивает белый, в тёмном разделе —
   поверхность карточки, иначе плитка светится пятном. */
.section--dark .provider__mark {
  background: color-mix(in srgb, var(--c) 20%, var(--bg-2));
  border-color: color-mix(in srgb, var(--c) 30%, var(--bg-2));
}

.section--dark .provider--local { background: linear-gradient(180deg, var(--bg-2), var(--blue-soft)); }

/* Галочка в списке: подложка берётся из переменной, а сама галочка нарисована
   в data-URI цветом светлой темы — в тёмной её нужно перекрасить. */
.section--dark .ticks li::before {
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23f2682f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 12.5 5'/%3E%3C/svg%3E") center/11px no-repeat;
}

.section--dark .badge--ok,
.clouds__panel .badge--ok { background: rgba(92, 192, 127, .14); }

.section--dark code { background: rgba(227, 211, 187, .1); }

/* Кнопка на тёмном фоне: чёрная плитка на графите не читается — берём акцент. */
.section--dark .btn--primary { background: var(--accent); }

.section--dark .btn--primary:hover { background: var(--accent-hover); }

/* ==================== ПОДДЕРЖКА: МОДАЛКА И ФОРМА ====================
   Модалка живёт в <body>, а не в тёмном подвале, поэтому берёт светлую
   палитру из :root — как остальные поверхности страницы. */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal[hidden] { display: none; }

/* Прячем всё, что помечено hidden, даже если у элемента свой display:
   у .support и .support__done он grid, и атрибут сам по себе их не скрыл бы. */
.modal [hidden] { display: none !important; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 29, 26, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s ease;
}

.modal__dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: translateY(18px) scale(.985);
  transition: opacity .3s ease, transform .4s var(--ease);
}

.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__dialog { opacity: 1; transform: none; }

/* Пока модалка открыта, страница под ней не прокручивается */
body.is-locked { overflow: hidden; }

.modal__close {
  position: absolute;
  top: 20px; right: 20px;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.modal__close svg { width: 15px; height: 15px; }
.modal__close:hover { color: var(--ink); background: var(--bg-tint); border-color: var(--line-2); }

.modal__head { padding-right: 44px; }
.modal__head h2 { font-size: clamp(21px, 2.4vw, 27px); }
.modal__head p { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ---- поля ---- */

.support { display: grid; gap: 20px; margin-top: 26px; }

.field { display: grid; gap: 8px; }

.field__label { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: .01em; }

.field__req { color: var(--accent); }

.field__area,
.field__input,
.select__input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 15.5px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field__area {
  min-height: 152px;
  line-height: 1.55;
  resize: vertical;
}

.field__area::placeholder,
.field__input::placeholder { color: var(--muted-2); }

.field__area:focus,
.field__input:focus,
.select__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(231, 87, 31, .15);
}

.select { position: relative; display: block; }

.select__input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}

.select__arrow {
  position: absolute;
  right: 16px; top: 50%;
  width: 15px; height: 15px;
  margin-top: -7.5px;
  color: var(--muted-2);
  pointer-events: none;
}

.field.is-invalid .field__area,
.field.is-invalid .field__input { border-color: #cf4a3f; }

.field.is-invalid .field__area:focus,
.field.is-invalid .field__input:focus { box-shadow: 0 0 0 3px rgba(207, 74, 63, .15); }

.field__error { color: #c0392b; font-size: 13.5px; line-height: 1.45; }

/* ---- скриншоты: зона перетаскивания ---- */

.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 24px 20px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-2);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone.is-over { border-color: var(--accent); background: rgba(231, 87, 31, .045); }

.dropzone.is-over { border-style: solid; }

/* Поле выбора файла остаётся в разметке — на нём держится и клик по зоне,
   и работа с клавиатуры, — но само не рисуется. */
.dropzone__input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone__icon { width: 24px; height: 24px; color: var(--muted-2); }
.dropzone.is-over .dropzone__icon { color: var(--accent); }
.dropzone__title { font-weight: 600; font-size: 15.5px; color: var(--ink); }
.dropzone__hint { font-size: 13.5px; color: var(--muted-2); }
.dropzone__hint b { color: var(--accent); font-weight: 600; }

/* ---- приложенные файлы ---- */

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.thumb {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 38px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
}

.thumb img {
  width: 42px; height: 42px;
  flex: none;
  border-radius: 8px;
  background: var(--bg-tint);
  object-fit: cover;
}

.thumb__meta { display: grid; min-width: 0; }

.thumb__name {
  max-width: 190px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb__size { color: var(--muted-2); font-size: 12px; }

.thumb__remove {
  position: absolute;
  top: 50%; right: 8px;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  margin-top: -11px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

.thumb__remove svg { width: 12px; height: 12px; }
.thumb__remove:hover { background: rgba(231, 87, 31, .14); color: var(--accent); }

/* ---- низ формы: подпись и кнопка ---- */

.support__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.support__foot .btn[aria-busy="true"] { opacity: .72; pointer-events: none; }

.support__alert {
  padding: 12px 16px;
  border: 1px solid rgba(207, 74, 63, .28);
  border-radius: var(--radius-sm);
  background: rgba(207, 74, 63, .07);
  color: #b03a2e;
  font-size: 14px;
  line-height: 1.5;
}

.support__alert a { color: inherit; text-decoration: underline; }

/* ---- экран после отправки ---- */

.support__done {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 24px;
  text-align: center;
}

.support__done-icon {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(47, 158, 99, .13);
  color: var(--green);
}

.support__done-icon svg { width: 24px; height: 24px; }
.support__done h3 { font-size: 21px; }
.support__done p { max-width: 42ch; color: var(--muted); font-size: 15px; }
.support__done .btn { margin-top: 6px; }

/* ============================== АДАПТИВ ============================== */

/* Позициям из макета нужен запас за кромками окна: овца слева заходит на
   кромку, овца справа стоит в поле за окном. На узких экранах запаса нет,
   поэтому прижимаем их внутрь — иначе срезает краем окна. */
@media (max-width: 1650px) {
  .stage__sheep--walk { left: 88%; margin-left: 0; }
}

@media (max-width: 1260px) {
  .stage__sheep--eat  { left: -1%; }
  .stage__sheep--walk { left: 86%; }
}

@media (max-width: 1080px) {
  .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .providers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agents__body { grid-template-columns: minmax(0, 1fr); }
  .agents__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .split__media { order: 2; }
}

/* С логотипом в 51 px шапке нужно заметно больше места: 173 + 696 + 98 плюс
   зазоры — это 999 px, то есть строка перестаёт помещаться задолго до общего
   мобильного порога. Поэтому меню уезжает в бургер своим правилом, а запас
   в 1100 px оставлен на случай, если веб-шрифт Ubuntu не загрузится и ссылки
   наберутся системным шрифтом — он чуть шире. */
@media (max-width: 1100px) {
  /* В строке остаются логотип и кнопки — раскладываем их по краям. */
  .nav__inner { display: flex; justify-content: space-between; }

  .nav__brand-logo { height: 40px; }

  .nav__links {
    position: absolute;
    top: 68px; left: 16px; right: 16px;
    /* justify-self из раскладки-сетки здесь только мешает: у абсолютной
       коробки он включает «по размеру содержимого», и панель схлопывается
       вместо того, чтобы растянуться по left/right. */
    justify-self: auto;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(36, 30, 32, .96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #322b2d;
    box-shadow: var(--shadow-lg);
    margin-left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s var(--ease), visibility .25s;
  }

  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 12px 14px; font-size: 16px; }
  .nav__burger { display: flex; }
}

@media (max-width: 900px) {
  .tools { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .clouds { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .mini-grid, .cards--3 { grid-template-columns: minmax(0, 1fr); }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 80px 0; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .hero { padding-top: 104px; }
  .hero__icon { width: 56px; height: 56px; border-radius: 10px; }
  /* Больше воздуха до окна: овца на кромке не должна залезать на подпись */
  .hero__stage { margin-top: 58px; }
  .hero__actions { gap: 10px; }
  .downloads { grid-template-columns: minmax(0, 1fr); }
  .cards--4 { grid-template-columns: minmax(0, 1fr); }
  .providers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage__sheep { filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .4)); }
  .stage__sheep--sleep { left: 8%; width: clamp(56px, 15%, 86px); margin-bottom: -1.8%; }
  .stage__sheep--eat   { left: -3%; top: 74%; width: clamp(56px, 15%, 86px); }
  .stage__sheep--walk  { left: 86%; top: 58%; width: clamp(52px, 14%, 80px); }
  .agents { padding: 26px; }
  .agents__tabs { grid-template-columns: minmax(0, 1fr); }
  .source { flex-direction: column; align-items: flex-start; }
  .source__code { margin-left: 0; }
  .footer__links { margin-left: 0; }

  /* На телефоне модалка выезжает снизу листом: так до кнопки проще достать
     большим пальцем, а высокий экран не режется пополам. */
  .modal { padding: 0; align-items: flex-end; }
  .modal__dialog {
    width: 100%;
    max-height: 92vh;
    padding: 26px 20px calc(26px + env(safe-area-inset-bottom, 0px));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .modal__close { top: 16px; right: 16px; }
  .modal__head { padding-right: 40px; }
  .support { gap: 18px; margin-top: 22px; }
  .dropzone { padding: 20px 16px; }
  .thumb__name { max-width: 150px; }
  .support__foot { flex-direction: column; align-items: stretch; }
  .support__foot .btn { width: 100%; }
}

@media (max-width: 460px) {
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .providers { grid-template-columns: minmax(0, 1fr); }
  .media__pin { display: none; }
}

/* ============================== ДОПОЛНЕНИЯ ============================== */

/* Якорные ссылки не прячутся под фиксированной шапкой */
[id] { scroll-margin-top: 84px; }

/* Карточка Windows, когда сборки действительно нет */
.download--soon.is-confirmed-soon {
  background: linear-gradient(180deg, #fff, var(--bg-tint));
  border-style: dashed;
}

.download--soon.is-confirmed-soon .download__hint { color: var(--accent); }

/* Всплывающая подсказка */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14.5px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  z-index: 130;
  transition: opacity .3s ease, transform .35s var(--ease), visibility .3s;
}

.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Пиксельные картинки не размываются при увеличении */
.footer__brand img,
.hero__icon,
.stage__sheep { image-rendering: pixelated; }

/* ============================== ТАРИФЫ ==============================
   Раздел «Тарифы» на главной и страница покупки (buy.html). Числа и списки
   форматов подставляет js/pricing.js — здесь только вид. */

/* Полоса тарифов лежит между тёмным разделом моделей и белым разделом
   скачивания: тон отделяет её от обоих, не ломая чередование «светлый —
   тёмный». */
.section--tint { background: var(--bg-tint); }

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
  /* Карточки стоят по верхнему краю. Карточка Pro выше бесплатной — в ней
     на пункт списка, вторая кнопка и подпись больше, — и разница высот
     читается как «главный тариф». По центру (align-items: center) короткая
     бесплатная карточка повисала посреди блока: её верх оказывался на
     118 px ниже верхнего края Pro, и это выглядело поломкой вёрстки, а не
     акцентом. */
  align-items: start;
}

.plan {
  display: grid;
  gap: 8px;
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.plan h3 { font-size: 24px; }

/* Строка плашек: «выбор авторов» и состояние продажи */
.plan__top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

/* Плашка состояния: «Скоро» или «Можно купить». Живёт в строке .plan__top,
   поэтому место в потоке задаёт флекс, а не justify-self. */
.plan__badge {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-tint);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.plan--pro { border-color: rgba(231, 87, 31, .38); box-shadow: var(--shadow-lg); }
.plan--pro .plan__badge { background: var(--accent); border-color: transparent; color: #fff; }

/* ---- Pro: карточка, которую продаём ----
   Она стоит справа, а взгляд идёт слева направо: чтобы человек всё равно
   прочитал первым платный тариф, у карточки тёплый градиент сверху,
   акцентные рамка и тень, и чуть больший шаг внутри. */

.plan--pro {
  position: relative;
  padding: 38px 34px;
  background:
    linear-gradient(180deg, rgba(231, 87, 31, .08), rgba(231, 87, 31, 0) 46%),
    var(--bg-2);
}

/* «Выбор авторов» — акцентная плашка; состояние у Pro контурное, чтобы
   две заливки не спорили между собой. */
.plan__flag {
  padding: 4px 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #f2913b);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.plan--pro .plan__badge {
  background: var(--bg-2);
  border-color: rgba(231, 87, 31, .45);
  color: var(--accent);
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 6px;
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
}

/* Цена Pro крупнее: рядом с «0 ₽» она должна быть заметнее */
.plan--pro .plan__price { font-size: 40px; }

.plan__price small { font-size: 14px; font-weight: 400; color: var(--muted); }

/* Строка «для кого эта редакция» — под ценой */
.plan__pitch { font-size: 15px; color: var(--muted); }

.plan__list {
  display: grid;
  gap: 11px;
  margin: 6px 0 16px;
  padding: 0;
  list-style: none;
}

.plan__list li {
  position: relative;
  padding-left: 27px;
  font-size: 15px;
  color: var(--ink-2);
}

/* Галочка нарисована рамкой, а не картинкой: цвет меняется переменной,
   и в тёмных разделах знак перекрашивается вместе с текстом. */
.plan__list li::before {
  content: '';
  position: absolute;
  left: 3px; top: 4px;
  width: 7px; height: 12px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(42deg);
}

.plan--pro .plan__list li::before { border-color: var(--accent); }

/* Главный пункт Pro — обновления: подложка и тёмный текст, чтобы взгляд
   цеплялся за него раньше остальных. Правило идёт после общего, иначе
   галочка вернулась бы на старое место. */
.plan__list li.is-key {
  padding: 12px 14px 12px 38px;
  border-radius: var(--radius-sm);
  background: rgba(231, 87, 31, .08);
  color: var(--ink);
  font-weight: 500;
}

.plan__list li.is-key::before { left: 16px; top: 18px; }

/* Чего в редакции нет: приглушаем и меняем знак на прочерк */
.plan__list li.is-off { color: var(--muted); }

.plan__list li.is-off::before {
  left: 3px; top: 11px;
  width: 12px; height: 0;
  border: 0;
  border-top: 2px solid var(--muted-2);
  transform: none;
}

.plan__note { font-size: 13.5px; color: var(--muted); }

.plans__hint {
  max-width: 880px;
  margin: 26px auto 0;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

.plans__hint a { color: var(--accent); }

/* Блоки одного состояния. Атрибут hidden сам по себе не сработает там, где
   у элемента задан display, поэтому гасим явно. */
[data-pricing-when][hidden] { display: none !important; }

/* ============================== СТРАНИЦА ПОКУПКИ ============================== */

.section__head h1 { margin: 18px 0 0; font-size: clamp(32px, 4.2vw, 52px); }

.buy__state {
  max-width: 880px;
  margin: 0 auto;
  padding: 30px 32px;
  border-radius: var(--radius-xl);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.buy__state h2 { font-size: clamp(20px, 2vw, 26px); margin-bottom: 10px; }
.buy__state p { color: var(--muted); font-size: 15.5px; }

.buy__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
}

.buy__pay { margin-top: 14px; font-size: 13.5px; color: var(--muted-2); }

.buy__steps {
  display: grid;
  gap: 16px;
  margin: 22px 0 4px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.buy__steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
  font-size: 15.5px;
  color: var(--ink-2);
}

.buy__steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

/* ---- Сравнение редакций ---- */

.compare { max-width: 880px; margin: 0 auto; }

/* На узком экране таблица прокручивается боком: перестраивать её в карточки
   ради трёх колонок не стоит. */
.compare__wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: var(--shadow-md);
}

.compare table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.compare th,
.compare td {
  padding: 15px 20px;
  text-align: left;
  font-size: 15.5px;
  border-bottom: 1px solid var(--line);
}

.compare thead th {
  background: var(--bg-tint);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.compare tbody tr:last-child td { border-bottom: 0; }

.compare th:nth-child(2), .compare td:nth-child(2),
.compare th:nth-child(3), .compare td:nth-child(3) {
  width: 21%;
  text-align: center;
}

.compare td:first-child { color: var(--ink); }

.compare .yes { color: var(--green); font-weight: 600; }
.compare .no { color: var(--muted-2); }

.compare__note {
  max-width: 880px;
  margin: 22px auto 0;
  font-size: 15px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .plans { grid-template-columns: minmax(0, 1fr); }

  /* В одну колонку карточки стоят друг под другом, и лишний шаг внутри
     Pro только удлиняет прокрутку: выравниваем по бесплатной. */
  .plan--pro { padding: 32px; }
}

/* ---- Сравнение редакций на телефоне ----
   Три колонки в 500 px не помещаются: их пришлось бы листать боком, а человек
   просто не увидит колонку Pro — то есть цену. Поэтому на узких экранах каждая
   строка таблицы становится карточкой «что — бесплатно — Pro». */
@media (max-width: 620px) {
  .compare__wrap { overflow: visible; border: 0; background: none; box-shadow: none; }
  .compare table { min-width: 0; }

  .compare thead { display: none; }

  .compare tbody tr {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-2);
    box-shadow: var(--shadow-sm);
  }

  .compare td {
    width: auto !important;
    padding: 0;
    border: 0;
    text-align: left;
    font-size: 15px;
  }

  .compare td:first-child { color: var(--ink); font-weight: 600; }

  .compare td[data-label]::before {
    content: attr(data-label) ': ';
    color: var(--muted);
    font-weight: 400;
  }

  .compare td:last-child { border-top: 1px solid var(--line); padding-top: 9px; }
}

/* ============================== ЗАКАЗ ЛИЦЕНЗИИ ==============================

   Форма на странице покупки (Landing/buy.html). Наследует .field, .support__foot
   и .support__done от формы обращения — вид у них должен быть одинаковым.
   Здесь только то, что относится к самой форме заказа. */

/* Атрибут hidden сам по себе не справляется: у формы заказа и у экрана «заказ
   принят» свой display, и он перебивает встроенное правило браузера — блок
   остался бы видимым вместе с соседним. Внутри модалки это уже решено похожим
   правилом, но здесь блоки лежат прямо на странице. */
.order[hidden],
.support__done[hidden] { display: none !important; }

.order {
  display: grid;
  gap: 18px;
  max-width: 560px;
  margin: 30px auto 0;
  text-align: left;
}

/* Короткое поле «вопрос или пожелание»: полноразмерные 152px здесь ни к чему */
.order .field__area--short { min-height: 96px; }

/* Ловушка для ботов: живой человек этого поля не видит, робот заполняет.
   Именно display: none, а не сдвиг за экран: так поле не подставит и
   автозаполнение браузера, иначе настоящий заказ молча пропал бы. */
.order__trap { display: none; }

.order + .support__done { margin-top: 34px; }

/* Строка с ценой и кнопкой: цена слева, кнопка справа — как в форме обращения */
.order .support__foot { justify-content: space-between; }
.order .support__foot .buy__pay { max-width: 320px; text-align: left; }

@media (max-width: 620px) {
  .order .support__foot { justify-content: stretch; }
  .order .support__foot .btn { width: 100%; }
  .order .support__foot .buy__pay { max-width: none; }
}
