/* Главная (макет Main.dc.html). Только токены кита --st-*: в тёмной теме страница меняется сама. */

.home {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding-bottom: 8px;
}

.home h2 {
  margin: 0;
  font-size: 26px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--st-color-foreground);
}

.home h3 {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: normal;
  color: var(--st-color-foreground);
}

/* Разделы — .container внутри flex-колонки: без явной ширины auto-поля сжали бы их до содержимого */
.home > .container {
  width: 100%;
}

/* Первый экран */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: 56px;
}

.home-product-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-color-muted-foreground);
}

.home-product-mark {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--st-color-product-ai-platform);
}

.home-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: 44px;
  line-height: 50px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--st-color-foreground);
  text-wrap: balance;
}

.home-hero p {
  margin: 0;
  max-width: 640px;
  font-size: 17px;
  line-height: 27px;
  color: var(--st-color-muted-foreground);
}

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

.home-link-action {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--st-radius-lg);
  font-size: 15px;
  font-weight: 500;
  color: var(--st-color-link);
  text-decoration: none;
}

.home-link-action:hover,
.home-more:hover,
.home-model a:hover {
  color: var(--st-color-primary-hover);
}

.home-link-action:focus-visible,
.home-more:focus-visible,
.home-model a:focus-visible {
  outline: 2px solid var(--st-color-ring);
  outline-offset: 2px;
}

/* Заголовок раздела со ссылкой справа */
.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.home-section-head p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--st-color-muted-foreground);
}

.home-more {
  font-size: 14px;
  font-weight: 500;
  color: var(--st-color-link);
  text-decoration: none;
}

/* Модели — карточки */
.home-models {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.home-model {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  background: var(--st-color-card);
  color: var(--st-color-card-foreground);
  border: 1px solid var(--st-color-border);
  border-radius: var(--st-radius-xl);
}

.home-model p {
  flex: 1;
  margin: 0;
  font-size: 14px;
  line-height: 21px;
  color: var(--st-color-muted-foreground);
}

.home-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-model a {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 500;
  color: var(--st-color-link);
  text-decoration: none;
}

/* Почему выбирают нас — карточка с пунктами */
.home-why {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  background: var(--st-color-card);
  color: var(--st-color-card-foreground);
  border: 1px solid var(--st-color-border);
  border-radius: var(--st-radius-xl);
}

.home-why h2 {
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.01em;
}

.home-why-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-why-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.home-why-list h3 {
  font-size: 14px;
  line-height: 20px;
}

.home-why-list p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 19px;
  color: var(--st-color-muted-foreground);
}

.home-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--st-radius-lg);
  background: var(--st-color-accent);
  color: var(--st-color-accent-foreground);
}

/* Готовы начать? — тёмный блок призыва; в тёмной теме токены меняются местами, и блок светлеет */
.home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 24px 28px;
  border-radius: var(--st-radius-2xl);
  background: var(--st-color-foreground);
  color: var(--st-color-background);
}

.home-cta > div {
  flex: 1 1 320px;
  max-width: 720px;
}

.home .home-cta h2 {
  font-size: 20px;
  line-height: 28px;
  color: var(--st-color-background);
}

.home-cta p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 21px;
  color: color-mix(in oklch, var(--st-color-background) 80%, var(--st-color-foreground));
}

.home-cta .btn-primary:focus-visible {
  outline-color: var(--st-color-background);
}

@media (max-width: 768px) {
  .home {
    gap: 40px;
  }

  .home-hero {
    padding-top: 32px;
  }

  .home-hero h1 {
    font-size: 32px;
    line-height: 38px;
  }

  .home-hero p {
    font-size: 16px;
    line-height: 25px;
  }

  .home h2 {
    font-size: 22px;
    line-height: 28px;
  }

  .home-models,
  .home-why-list {
    grid-template-columns: 1fr;
  }

  .home-why,
  .home-cta {
    padding: 18px;
  }
}
