/* Главная Docs — hero с паутиной + сетка разделов */

.docs-home__hero {
  display: grid;
  gap: 1.5rem 2rem;
  align-items: center;
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgb(229 229 229);
  animation: docs-home-in 0.4s ease both;
}

.dark .docs-home__hero {
  border-bottom-color: rgb(64 64 64);
}

@media (min-width: 900px) {
  .docs-home__hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1.05fr);
  }
}

.docs-home__hero-copy {
  position: relative;
  z-index: 1;
}

.docs-home__eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(115 115 115);
}

.dark .docs-home__eyebrow {
  color: rgb(163 163 163);
}

.docs-home__hero-title {
  margin: 0 0 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.1;
}

.docs-home__hero-title-main {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  color: rgb(23 23 23);
}

.dark .docs-home__hero-title-main {
  color: #fff;
}

.docs-home__hero-title-brand {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  color: transparent;
  background: linear-gradient(105deg, rgb(23 23 23) 20%, rgb(115 115 115) 85%);
  -webkit-background-clip: text;
  background-clip: text;
}

.dark .docs-home__hero-title-brand {
  background: linear-gradient(105deg, #fff 15%, rgb(163 163 163) 90%);
  -webkit-background-clip: text;
  background-clip: text;
}

.docs-home__hero-lead {
  margin: 0 0 1.35rem;
  max-width: 28rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgb(82 82 82);
}

.dark .docs-home__hero-lead {
  color: rgb(163 163 163);
}

/* Perks bar с main-site, но в потоке hero (не absolute) */
.docs-home__perks.hero-touch__perks {
  position: relative;
  left: auto;
  bottom: auto;
  width: 100%;
  max-width: 26rem;
  transform: none;
  pointer-events: auto;
  z-index: 1;
}

/* Не наследовать 2×2 сетку hero-touch (там 4 пункта) — у нас всегда 3 в ряд */
@media (max-width: 640px) {
  .docs-home__perks.hero-touch__perks {
    width: 100%;
    max-width: none;
  }

  .docs-home__perks .hero-touch__perks-bar {
    display: flex;
    align-items: stretch;
  }

  .docs-home__perks .hero-touch__perk {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.7rem 0.45rem;
    border-right: 1px solid rgba(228, 228, 231, 0.85);
    border-bottom: none;
  }

  .dark .docs-home__perks .hero-touch__perk {
    border-right-color: rgba(63, 63, 70, 0.95);
    border-bottom: none;
  }

  .docs-home__perks .hero-touch__perk:nth-child(2n),
  .docs-home__perks .hero-touch__perk:last-child {
    border-right: none;
  }

  .docs-home__perks .hero-touch__perk:nth-child(2) {
    border-right: 1px solid rgba(228, 228, 231, 0.85);
  }

  .dark .docs-home__perks .hero-touch__perk:nth-child(2) {
    border-right-color: rgba(63, 63, 70, 0.95);
  }

  .docs-home__perks .hero-touch__perk:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .docs-home__perks .hero-touch__perk-value {
    font-size: clamp(1rem, 4.2vw, 1.25rem);
  }

  .docs-home__perks .hero-touch__perk-label {
    font-size: clamp(0.625rem, 2.6vw, 0.75rem);
  }
}

.docs-home__hero-viz {
  position: relative;
  width: 100%;
  min-height: 280px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  animation: docs-home-in 0.5s ease 0.08s both;
}

.docs-home__hero-viz::before {
  content: "";
  position: absolute;
  inset: 10% 6%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgb(0 0 0 / 0.04), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.dark .docs-home__hero-viz::before {
  background: radial-gradient(ellipse at center, rgb(255 255 255 / 0.06), transparent 70%);
}

.docs-home__graph-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  /* без filter: drop-shadow — он клипит stroke у краёв и «рвёт» линии */
}

@media (max-width: 899px) {
  .docs-home__hero-viz {
    min-height: 240px;
  }
}

/* Каталог */

.docs-home__catalog {
  animation: docs-home-in 0.4s ease 0.12s both;
}

.docs-home__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
  .docs-home__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.docs-home__tile {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.1rem 0.95rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(229 229 229);
  background: rgb(250 250 250);
  color: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dark .docs-home__tile {
  border-color: rgb(64 64 64);
  background: rgb(38 38 38 / 0.6);
}

.docs-home__tile:hover {
  background: rgb(245 245 245);
  border-color: rgb(212 212 212);
}

.dark .docs-home__tile:hover {
  background: rgb(38 38 38);
  border-color: rgb(82 82 82);
}

.docs-home__tile-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
}

.docs-home__tile-head:hover .docs-home__tile-title,
.docs-home__tile-head:focus-visible .docs-home__tile-title {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  outline: none;
}

.docs-home__tile-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgb(23 23 23);
}

.dark .docs-home__tile-title {
  color: #fff;
}

.docs-home__tile-title i {
  font-size: 1.15rem;
  color: rgb(115 115 115);
}

.dark .docs-home__tile-title i {
  color: rgb(163 163 163);
}

.docs-home__tile-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgb(115 115 115);
}

.dark .docs-home__tile-desc {
  color: rgb(163 163 163);
}

.docs-home__tile-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.docs-home__tile-links a {
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgb(64 64 64);
  text-decoration: none;
}

.dark .docs-home__tile-links a {
  color: rgb(212 212 212);
}

.docs-home__tile-links a:hover,
.docs-home__tile-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  outline: none;
}

.docs-home__tile-more {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgb(82 82 82);
  text-decoration: none;
}

.dark .docs-home__tile-more {
  color: rgb(163 163 163);
}

.docs-home__tile-more:hover,
.docs-home__tile-more:focus-visible {
  text-decoration: underline;
  outline: none;
}

.docs-home__tile-empty {
  margin: 0;
  font-size: 0.875rem;
  color: rgb(163 163 163);
}

.docs-home__tile-subs {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgb(229 229 229);
}

.dark .docs-home__tile-subs {
  border-top-color: rgb(64 64 64);
}

.docs-home__tile-subs-label {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(163 163 163);
}

.docs-home__tile-subs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.docs-home__tile-subs-list a {
  font-size: 0.8125rem;
  color: rgb(82 82 82);
  text-decoration: none;
}

.dark .docs-home__tile-subs-list a {
  color: rgb(163 163 163);
}

.docs-home__tile-subs-list a:hover,
.docs-home__tile-subs-list a:focus-visible {
  color: rgb(23 23 23);
  text-decoration: underline;
  outline: none;
}

.dark .docs-home__tile-subs-list a:hover,
.dark .docs-home__tile-subs-list a:focus-visible {
  color: #fff;
}

.docs-home__tile-meta {
  margin: auto 0 0;
  padding-top: 0.35rem;
  font-size: 0.75rem;
  color: rgb(163 163 163);
}

.dark .docs-home__tile-meta {
  color: rgb(115 115 115);
}

@keyframes docs-home-in {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-home__hero,
  .docs-home__hero-viz,
  .docs-home__catalog {
    animation: none;
  }
}
