/* Каталог главной — Figma 725:4242 (лента / сетка / список) */

.home-hero {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #17181d;
  color: #f7f7f8;
  border-bottom: 0;
}

.home-hero[hidden] {
  display: none !important;
}

.home-hero__content {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(520px, 1.06fr);
  gap: 0;
  width: 100%;
}

.home-hero__head {
  display: contents;
}

.home-hero__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  min-height: 510px;
  padding: 72px 20px 72px max(var(--page-padding), calc((100vw - 1320px) / 2));
  align-items: flex-start;
  min-width: 0;
}

.home-hero__title {
  margin: 0;
  max-width: 650px;
  font: 650 clamp(44px, 5vw, 76px)/.98 var(--font);
  letter-spacing: -0.075em;
  color: #f7f7f8;
}

.home-hero__lead {
  margin: 0;
  max-width: 430px;
  font: 400 15px/1.5 var(--font);
  color: #a7a9b2;
}

.home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: #a7a9b2;
  font: 600 11px/1.2 var(--font);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.home-hero__action { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border: 1px solid #454851; border-radius: 999px; color: #f7f7f8; font: 600 14px/1 var(--font); text-decoration: none; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.home-hero__action:hover { border-color: #8b90a0; background: #272930; }
.home-hero__action--primary { border-color: #f7f7f8; background: #f7f7f8; color: #17181d; }
.home-hero__action--primary:hover { background: #fff; color: #17181d; }
.home-hero__visual { position: relative; display: flex; align-items: end; justify-content: end; min-width: 0; min-height: 510px; margin: 0; overflow: hidden; }
.home-hero__visual img { display: block; width: min(850px, 125%); max-width: none; height: auto; object-fit: cover; object-position: right bottom; transform: translate(6%, 5%); }


.home-hero__brands,
.home-hero__stats {
  display: none !important;
}

.home-hero__views {
  display: none !important;
}

.home-hero__view {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  cursor: pointer;
}

.home-hero__view:hover {
  background: var(--control-tertiary-hover);
}

.home-hero__view.is-active {
  background: #7177f8;
  color: #fff;
}

.home-hero__view-icon {
  display: block;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--view-icon) center / contain no-repeat;
  mask: var(--view-icon) center / contain no-repeat;
}

.home-hero__view-icon--feed {
  width: 14px;
  height: 14px;
  --view-icon: url("/viewer/assets/catalog/view-feed.svg");
}

.home-hero__view-icon--grid {
  --view-icon: url("/viewer/assets/catalog/view-grid.svg");
}

.home-hero__view-icon--list {
  --view-icon: url("/viewer/assets/catalog/view-list.svg");
}

.home-hero__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  grid-column: 1 / -1;
  padding: 0 max(var(--page-padding), calc((100vw - 1320px) / 2)) 32px;
  border-top: 1px solid #30323a;
}

.home-hero__chips {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-top: 22px;
  scrollbar-width: none;
}

.home-hero__chips::-webkit-scrollbar {
  display: none;
}

.home-hero__chip {
  flex-shrink: 0;
  height: 38px;
  padding: 0 17px;
  border: 1px solid #454851;
  border-radius: 999px;
  background: transparent;
  color: #b9bbc4;
  font: 400 14px/22px var(--font);
  cursor: pointer;
  white-space: nowrap;
}

.home-hero__chip:hover {
  color: #fff;
  border-color: #8b90a0;
  background: #272930;
}

.home-hero__chip.is-active {
  border-color: #f7f7f8;
  background: #f7f7f8;
  color: #17181d;
  font-weight: 500;
}

html[data-theme="light"] .home-hero {
  background: #f7f6f2;
  color: #151515;
}
html[data-theme="light"] .home-hero__title { color: #151515; }
html[data-theme="light"] .home-hero__lead,
html[data-theme="light"] .home-hero__eyebrow { color: #5d5b57; }
html[data-theme="light"] .home-hero__action { border-color: #d7d4cd; color: #151515; }
html[data-theme="light"] .home-hero__action:hover { border-color: #151515; background: #eceae5; }
html[data-theme="light"] .home-hero__action--primary { border-color: #151515; background: #151515; color: #fff; }
html[data-theme="light"] .home-hero__action--primary:hover { background: #343330; color: #fff; }
html[data-theme="light"] .home-hero__toolbar { border-top-color: #dedbd4; }
html[data-theme="light"] .home-hero__chip { border-color: #d7d4cd; color: #5d5b57; }
html[data-theme="light"] .home-hero__chip:hover { color: #151515; border-color: #151515; background: transparent; }

.home-hero__search.gallery-search {
  max-width: 570px;
  width: 100%;
}

.home-hero__search .gallery-search__control {
  min-height: 48px;
  border-radius: 52px;
  background: var(--bg-lower);
  border: 0;
  outline: none;
  box-shadow: none;
}

.home-hero__search .gallery-search__control:focus-within {
  border: 0;
  outline: none;
  box-shadow: none;
  background: color-mix(in srgb, var(--bg-lower) 88%, var(--text-primary) 6%);
}

.home-hero__search .gallery-search__control input {
  height: 48px;
  font-size: 15px;
}

.home-hero__search-clear {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: 4px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.home-hero__search-clear.is-visible {
  display: grid;
}

.home-hero__search-clear:hover {
  color: var(--text-primary);
  background: var(--control-tertiary);
}

.home-hero__intro .home-hero__brands {
  margin-top: 4px;
}

.home-hero__brands {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}

.home-hero__brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  height: 42px;
  min-height: 42px;
  padding: 6px 14px 6px 6px;
  border: 1px solid color-mix(in srgb, #bcc3d0 15%, transparent);
  border-radius: 24px;
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
  will-change: transform;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.home-hero__brand-pill:hover {
  border-color: color-mix(in srgb, var(--text-tertiary) 70%, transparent);
  background: color-mix(in srgb, var(--control-tertiary) 55%, transparent);
}

.home-hero__brand-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-lower);
}

.home-hero__brand-icon img,
.home-hero__brand-icon .company-icon__img {
  display: block;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  object-fit: cover;
  border-radius: inherit;
}

.home-hero__brand-icon.is-fallback {
  font: 600 12px/1 var(--font);
  color: var(--text-secondary);
}

.home-hero__brand-name {
  font: 600 12px/1.33 var(--font);
  white-space: nowrap;
}

.home-hero__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}

.home-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.home-hero__stat strong {
  font: 900 32px/1.25 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.home-hero__stat span {
  font: 400 20px/1.4 "Raleway", var(--font);
  color: var(--text-tertiary);
}

.home-hero__stat-divider {
  width: 1px;
  height: 34px;
  background: color-mix(in srgb, var(--text-tertiary) 45%, transparent);
  flex-shrink: 0;
}

body.is-home-search .figma-search-section {
  padding-top: 8px;
  padding-bottom: 12px;
  gap: 0;
}

body.is-home-search #app {
  padding-top: 4px;
}

body.is-home-search .catalog-section--scenario-screens {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.is-home-search .catalog-section__head--scenario {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
}

body.is-home-search .catalog-section__head--scenario .catalog-section__meta {
  margin: 0;
  font: 500 14px/20px var(--font);
  color: var(--text-tertiary);
}

body.is-home-page .figma-search-section {
  padding-top: 0;
  gap: 0;
}

body.is-sites-page .figma-search-section {
  display: none !important;
}

body.is-sites-page #app {
  padding-top: 8px;
}

.figma-cards--sites {
  gap: 28px 20px;
}

@media (min-width: 640px) {
  .figma-cards--sites {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .figma-cards--sites {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .figma-cards--sites {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .figma-cards--sites {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px 20px;
  }
}

body.is-sites-page .company-card--sites .gallery-card__preview,
body.is-sites-page .company-card--sites .app-card__preview {
  aspect-ratio: 16 / 10;
}

.web-preview-mockup {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
  border-radius: inherit;
  background: var(--bg-lower);
  pointer-events: none;
}

.web-preview-mockup__screen {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: inherit;
  background: var(--bg-lower);
}

.web-preview-mockup__screen .media-shimmer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-lower);
}

.web-preview-mockup__screen .media-shimmer > img,
.web-preview-mockup__screen .media-shimmer > video,
.web-preview-mockup__screen img,
.web-preview-mockup__screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

body.is-sites-page .company-card--sites .gallery-card__carousel {
  scroll-snap-type: none;
}

@media (max-width: 768px) {
  .home-hero {
    padding: 0;
  }

  .home-hero__content {
    display: block;
  }

  .home-hero__title {
    font-size: clamp(42px, 12vw, 58px);
    line-height: .98;
  }

  .home-hero__lead {
    font-size: 14px;
    line-height: 1.45;
  }

  .home-hero__intro { min-height: auto; padding: 56px var(--page-padding) 36px; }
  .home-hero__visual { min-height: 270px; }
  .home-hero__visual img { width: 620px; transform: translate(7%, 8%); }


  .home-hero__toolbar {
    flex-wrap: wrap;
    padding: 0 var(--page-padding) 24px;
  }

  /* На touch-экранах категории должны быть доступны без скрытого
     горизонтального списка: все фильтры видны и сохраняют крупную hit-area. */
  .home-hero__chips {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .home-hero__chip {
    min-height: 40px;
    padding: 0 14px;
  }
}

/* Лента — полнокадровый скриншот */
body.is-home-page .figma-cards--feed {
  gap: 16px;
}

@media (min-width: 640px) {
  body.is-home-page .figma-cards--feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  body.is-home-page .figma-cards--feed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  body.is-home-page .figma-cards--feed {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  body.is-home-page .figma-cards--feed {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

body.is-home-page .figma-cards--feed .gallery-card {
  gap: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card-bg);
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
  will-change: transform;
}

body.is-home-page .figma-cards--feed .gallery-card:hover {
  z-index: 2;
}

body.is-home-page .figma-cards--feed .gallery-card__link {
  gap: 0;
}

body.is-home-page .figma-cards--feed .gallery-card__preview {
  aspect-ratio: 9 / 17;
  border-radius: 0;
  transform: none;
  transform-style: flat;
}

body.is-home-page .figma-cards--feed .gallery-card__preview::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 96px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

body.is-home-page .figma-cards--feed .phone-mockup {
  inset: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.is-home-page .figma-cards--feed .phone-mockup__screen {
  border-radius: 0;
  background: transparent;
}

body.is-home-page .figma-cards--feed .gallery-card__badge {
  top: 8px;
  left: 8px;
  min-height: 20px;
  padding: 3px 8px;
  font: 600 11px/14px var(--font);
}

body.is-home-page .figma-cards--feed .gallery-card__meta {
  padding: 12px;
  gap: 12px;
}

body.is-home-page .figma-cards--feed .gallery-card__logo,
body.is-home-page .figma-cards--feed .gallery-card__logo img,
body.is-home-page .figma-cards--feed .company-icon__img {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  border-radius: 12px;
}

body.is-home-page .figma-cards--feed .gallery-card__title {
  font: 700 14px/22px var(--font);
}

body.is-home-page .figma-cards--feed .gallery-card__desc {
  font: 400 14px/22px var(--font);
  color: var(--text-tertiary);
}

body.is-home-page .figma-cards--feed .catalog-card__stat {
  display: none;
}

/* Сетка — карточки с мозаикой 4 превью (не 6-колоночная лента) */
body.is-home-page .figma-cards--grid {
  gap: 20px;
}

@media (min-width: 640px) {
  body.is-home-page .figma-cards--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 960px) {
  body.is-home-page .figma-cards--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1200px) {
  body.is-home-page .figma-cards--grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* design.css на ≥1440px ставит 6 колонок на .figma-cards — не даём ленте пролезть */
@media (min-width: 1440px) {
  body.is-home-page .figma-cards--grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

body.is-home-page .figma-cards--grid .gallery-card {
  gap: 16px;
  padding: 20px;
  border-radius: 16px;
  background: var(--card-bg);
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
  will-change: transform;
}

body.is-home-page .figma-cards--grid .gallery-card:hover {
  z-index: 2;
}

body.is-home-page .figma-cards--grid .gallery-card__link {
  gap: 16px;
}

body.is-home-page .figma-cards--grid .gallery-card__preview,
body.is-home-page .figma-cards--grid .catalog-mosaic {
  position: relative;
  aspect-ratio: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  transform: none;
}

/* Сетка из той же карусели, что и лента — без пересборки DOM */
body.is-home-page .figma-cards--grid .gallery-card__carousel {
  position: static !important;
  inset: auto !important;
  overflow: visible !important;
  cursor: default;
  touch-action: pan-y;
  pointer-events: none;
  scroll-snap-type: none !important;
}

body.is-home-page .figma-cards--grid .gallery-card__track {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px;
  height: auto !important;
  min-width: 0 !important;
  width: 100% !important;
}

body.is-home-page .figma-cards--grid .gallery-card__slide {
  flex: none !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: 10px;
  background: var(--card-bg);
  scroll-snap-align: unset;
}

body.is-home-page .figma-cards--grid .phone-mockup {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

body.is-home-page .figma-cards--grid .phone-mockup__screen {
  border-radius: 10px;
  background: transparent;
}

/* shimmer иначе даёт height:auto → чёрные поля под скрином */
body.is-home-page .figma-cards--grid .phone-mockup__screen .media-shimmer,
body.is-home-page .figma-cards--feed .phone-mockup__screen .media-shimmer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: transparent;
}

body.is-home-page .figma-cards--grid .phone-mockup__screen .media-shimmer > img,
body.is-home-page .figma-cards--grid .phone-mockup__screen .media-shimmer > video,
body.is-home-page .figma-cards--grid .phone-mockup__screen img,
body.is-home-page .figma-cards--feed .phone-mockup__screen .media-shimmer > img,
body.is-home-page .figma-cards--feed .phone-mockup__screen .media-shimmer > video,
body.is-home-page .figma-cards--feed .phone-mockup__screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: top center;
}

body.is-home-page .figma-cards--grid .gallery-card__preview::after {
  display: none;
}

.catalog-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 6px;
  height: auto;
}

.catalog-mosaic__cell {
  position: relative;
  min-width: 0;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: 10px;
  background: var(--card-bg);
}

.catalog-mosaic__cell .media-shimmer,
.catalog-mosaic__cell .media-shimmer--screen {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}

.catalog-mosaic__cell img,
.catalog-mosaic__cell .media-shimmer {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.catalog-mosaic__cell .media-shimmer > img,
.catalog-mosaic__cell .media-shimmer > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: cover;
  object-position: top center;
}

body.is-home-page .figma-cards--grid .gallery-card__badge {
  top: 10px;
  left: 10px;
}

body.is-home-page .figma-cards--grid .gallery-card__meta {
  padding: 0;
  gap: 12px;
}

body.is-home-page .figma-cards--grid .gallery-card__logo,
body.is-home-page .figma-cards--grid .gallery-card__logo img {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
}

body.is-home-page .figma-cards--grid .gallery-card__title {
  font: 600 14px/21px var(--font);
}

body.is-home-page .figma-cards--grid .gallery-card__desc {
  font: 400 12px/17px var(--font);
}

.catalog-card__stat {
  margin: 0;
  color: var(--text-tertiary);
  font: 400 12px/17px var(--font);
  text-align: right;
  white-space: nowrap;
}

/* Список */
.catalog-count {
  margin: 0 0 8px;
  color: var(--text-tertiary);
  font: 400 12px/18px var(--font);
}

body.is-home-page .figma-cards--list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.is-home-page .figma-cards--list .gallery-card {
  gap: 0;
  border-radius: 16px;
  background: var(--bg-secondary);
}

body.is-home-page .figma-cards--list .gallery-card__link {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

body.is-home-page .figma-cards--list .catalog-row__rank {
  flex: 0 0 32px;
  color: var(--text-tertiary);
  font: 600 20px/30px var(--font);
  text-align: center;
}

body.is-home-page .figma-cards--list .gallery-card__preview,
body.is-home-page .figma-cards--list .gallery-card__badge {
  display: none;
}

body.is-home-page .figma-cards--list .gallery-card__meta {
  flex: 1;
  min-width: 0;
  padding: 0;
}

body.is-home-page .figma-cards--list .gallery-card__title {
  font: 600 16px/23px var(--font);
}

body.is-home-page .figma-cards--list .gallery-card__desc {
  font: 400 13px/18px var(--font);
}

body.is-home-page .figma-cards--list .catalog-card__stat {
  font-size: 13px;
  line-height: 18px;
}

.catalog-row__chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.catalog-row__chevron::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 3px 0 0 2px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* Landing: структура первых двух секций главной. */
body.is-home-page .site-header { background: #fff; box-shadow: none; }
body.is-home-page .figma-nav-shell { border-bottom: 1px solid #ececec; }
body.is-home-page .home-hero { background: #fff; color: #111; }
body.is-home-page .home-hero__content { display: block; max-width: none; }
body.is-home-page .home-hero__head { position: relative; display: block; min-height: 650px; overflow: hidden; }
body.is-home-page .home-hero__intro { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; min-height: 650px; max-width: 1020px; margin: 0 auto; padding: 90px 28px 80px; text-align: center; }
body.is-home-page .home-hero__title { max-width: 940px; margin: 0; color: #111; font: 650 clamp(58px, 7.2vw, 108px)/.96 var(--font); letter-spacing: -.085em; }
body.is-home-page .home-hero__lead { max-width: none; color: #777; font: 400 18px/1.35 var(--font); }
body.is-home-page .home-hero__actions { justify-content: center; margin-top: 12px; }
body.is-home-page .home-hero__action { min-height: 48px; border-color: #e5e5e5; color: #111; background: #f5f5f5; }
body.is-home-page .home-hero__action--primary { border-color: #111; color: #fff; background: #111; }
body.is-home-page .home-hero__orbit { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 700ms cubic-bezier(.32,.72,0,1); }
body.is-home-page .home-hero__orbit.is-ready { opacity: 1; }
body.is-home-page .home-hero__orbit > .home-hero__orbit-card { position: absolute; display: grid; place-items: center; width: 86px; height: 86px; box-sizing: border-box; padding: 3px; overflow: hidden; border: 1px solid rgba(17,17,17,.08); border-radius: 24px; background: #fff; box-shadow: 0 14px 36px rgba(0,0,0,.13); animation: home-hero-orbit-float var(--float-duration, 6.4s) cubic-bezier(.45,0,.55,1) var(--float-delay, 0s) infinite; }
body.is-home-page .home-hero__orbit-card .home-hero__brand-icon { display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border-radius: 20px; background: #fff; }
body.is-home-page .home-hero__orbit-card .company-icon__img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
body.is-home-page .home-hero__orbit-card .home-hero__brand-icon.is-fallback { color: #111; font: 700 22px/1 var(--font); }
body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(1) { --r: -12deg; --float-duration: 6.8s; --float-delay: -1.2s; top: 22%; left: 14%; }
body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(2) { --r: 8deg; --float-duration: 7.2s; --float-delay: -3.5s; top: 14%; right: 17%; }
body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(3) { --r: -5deg; --float-duration: 6.4s; --float-delay: -2s; bottom: 20%; left: 20%; }
body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(4) { --r: 14deg; --float-duration: 7s; --float-delay: -4.6s; bottom: 16%; right: 15%; }
body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(5) { --r: -18deg; --float-duration: 6s; --float-delay: -2.7s; top: 43%; right: 6%; }
body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(6) { --r: 10deg; --float-duration: 7.4s; --float-delay: -3.1s; top: 51%; left: 4%; }
body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(7) { --r: -8deg; --float-duration: 6.6s; --float-delay: -5.2s; bottom: 5%; left: 33%; }
body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(8) { --r: 16deg; --float-duration: 7.1s; --float-delay: -1.9s; top: 57%; right: 5%; }
@keyframes home-hero-orbit-float { 0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--r)); } 50% { transform: translate3d(0, -7px, 0) rotate(var(--r)); } }
@media (prefers-reduced-motion: reduce) { body.is-home-page .home-hero__orbit > .home-hero__orbit-card { animation: none; } }
body.is-home-page .home-research { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(480px,1.2fr); gap: 80px; align-items: end; max-width: 1320px; margin: 0 auto; padding: 156px var(--page-padding) 130px; color: #111; }
body.is-home-page .home-research__copy { max-width: 430px; }
body.is-home-page .home-research__kicker { margin: 0 0 18px; color: #777; font: 600 12px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; }
body.is-home-page .home-research h2 { margin: 0; font: 650 clamp(42px, 4.5vw, 68px)/.98 var(--font); letter-spacing: -.07em; }
body.is-home-page .home-research__copy > p:last-child { margin: 24px 0 0; color: #666; font: 400 16px/1.45 var(--font); }
body.is-home-page .home-research__demo { overflow: hidden; padding: 18px; border-radius: 28px; background: #f4f3f0; }
body.is-home-page .home-research__query { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border: 1px solid #e4e2dd; border-radius: 14px; background: #fff; color: #343434; font: 500 14px/1 var(--font); }
body.is-home-page .home-research__query span:first-child { color: #999; font-size: 22px; }
body.is-home-page .home-research__results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 18px; }
body.is-home-page .home-research__result { display: flex; flex-direction: column; justify-content: space-between; min-height: 310px; padding: 18px; border-radius: 18px; overflow: hidden; }
body.is-home-page .home-research__result span { font: 600 12px/1 var(--font); }
body.is-home-page .home-research__result strong { font: 650 24px/1.04 var(--font); letter-spacing: -.06em; }
body.is-home-page .home-research__result--violet { background: #7d77ff; color: #fff; }
body.is-home-page .home-research__result--paper { background: #e9e5df; color: #1a1918; }
body.is-home-page .home-research__result--lime { background: #dfff31; color: #111; }
body.is-home-page .home-hero__toolbar { padding: 28px max(var(--page-padding), calc((100vw - 1320px) / 2)); border-top: 1px solid #ededed; border-bottom: 1px solid #ededed; background: #fff; }
body.is-home-page .home-hero__chips { padding: 0; }
body.is-home-page .home-hero__chip { border-color: transparent; color: #777; background: transparent; }
body.is-home-page .home-hero__chip:hover { border-color: #ddd; color: #111; background: #f5f5f5; }
body.is-home-page .home-hero__chip.is-active { border-color: #111; background: #111; color: #fff; }
body.is-home-page #app { padding-top: 42px; }

@media (max-width: 768px) {
  body.is-home-page .home-hero__head { min-height: 540px; }
  body.is-home-page .home-hero__intro { min-height: 540px; padding: 70px 22px; }
  body.is-home-page .home-hero__title { font-size: clamp(48px, 14vw, 70px); }
  body.is-home-page .home-hero__lead { font-size: 16px; }
  body.is-home-page .home-hero__orbit > .home-hero__orbit-card { width: 54px; height: 54px; padding: 2px; border-radius: 16px; }
  body.is-home-page .home-hero__orbit-card .home-hero__brand-icon { border-radius: 13px; }
  body.is-home-page .home-hero__orbit-card .home-hero__brand-icon.is-fallback { font-size: 17px; }
  body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(1) { left: 6%; }
  body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(2) { right: 7%; }
  body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(3) { left: 9%; }
  body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(4) { right: 9%; }
  body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(5) { top: 40%; right: 2%; }
  body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(6) { top: 54%; left: 2%; }
  body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(7) { bottom: 6%; left: 26%; }
  body.is-home-page .home-hero__orbit > .home-hero__orbit-card:nth-child(8) { top: 61%; right: 7%; }
  body.is-home-page .home-research { grid-template-columns: 1fr; gap: 42px; padding: 90px var(--page-padding); }
  body.is-home-page .home-research__result { min-height: 200px; padding: 13px; }
  body.is-home-page .home-research__result strong { font-size: 18px; }
  body.is-home-page .home-hero__toolbar { padding: 20px var(--page-padding); }
}

/* Главная открывается в тёмной теме. Ранее landing-правила выше принудительно
   возвращали белый hero уже после базовых theme-токенов, из-за чего первый
   экран светлел даже при data-theme="dark". Светлый вариант остаётся доступен
   только после явного переключения темы. */
html:not([data-theme="light"]) body.is-home-page .site-header {
  background: #17181d;
}

html:not([data-theme="light"]) body.is-home-page .figma-nav-shell {
  border-bottom-color: #30323a;
}

html:not([data-theme="light"]) body.is-home-page .home-hero {
  background: #17181d;
  color: #f7f7f8;
}

html:not([data-theme="light"]) body.is-home-page .home-hero__title {
  color: #f7f7f8;
}

html:not([data-theme="light"]) body.is-home-page .home-hero__lead,
html:not([data-theme="light"]) body.is-home-page .home-research__kicker {
  color: #a7a9b2;
}

html:not([data-theme="light"]) body.is-home-page .home-hero__action {
  border-color: #454851;
  color: #f7f7f8;
  background: #272930;
}

html:not([data-theme="light"]) body.is-home-page .home-hero__action--primary {
  border-color: #f7f7f8;
  color: #17181d;
  background: #f7f7f8;
}

html:not([data-theme="light"]) body.is-home-page .home-hero__toolbar {
  border-color: #30323a;
  background: #17181d;
}

html:not([data-theme="light"]) body.is-home-page .home-hero__chip {
  color: #a7a9b2;
}

html:not([data-theme="light"]) body.is-home-page .home-hero__chip:hover {
  border-color: #454851;
  color: #f7f7f8;
  background: #272930;
}

html:not([data-theme="light"]) body.is-home-page .home-hero__chip.is-active {
  border-color: #f7f7f8;
  background: #f7f7f8;
  color: #17181d;
}

html:not([data-theme="light"]) body.is-home-page .home-research {
  background: #17181d;
  color: #f7f7f8;
}
