/* knwlab.com — Лаборатория знаний
   Пересборка с Тильды на чистый HTML/CSS/JS, 2026 */

:root {
  --c-bg: #ffffff;
  --c-ink: #111111;
  --c-text: #1e1e1e;
  --c-muted: #55555c;
  --c-dark: #0b0712;
  --c-dark-2: #131114;
  --c-accent: #6f4bff;
  --c-accent-soft: #b285ff;
  --c-lav: #e9e5f8;
  --c-line: #e6e4f0;
  --radius-btn: 999px;
  --container: 1200px;
  --pad: clamp(20px, 4vw, 48px);
  --font: 'Onest', 'Segoe UI', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.header--dark {
  background: rgba(11, 7, 18, 0.85);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.header__logo img { height: 34px; width: auto; }

.nav {
  display: flex;
  gap: clamp(18px, 3vw, 44px);
  font-size: 15px;
}

.nav a { transition: color 0.2s; }
.nav a:hover { color: var(--c-accent); }

.header--dark .nav a:hover { color: var(--c-accent-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 32px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--c-accent);
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  background: transparent;
  color: var(--c-ink);
}

.btn:hover { background: var(--c-accent); color: #fff; }

.btn--light {
  border-color: rgba(255, 255, 255, 0.9);
  color: #fff;
}

.btn--light:hover {
  background: #fff;
  color: var(--c-ink);
  border-color: var(--c-accent-soft);
}

.btn--solid { background: var(--c-accent); color: #fff; }
.btn--solid:hover { background: #5a3be0; }

.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

@media (min-width: 768px) {
  .burger { display: none; }
}

.burger span {
  width: 24px;
  height: 2px;
  background: #111111;
  transition: transform 0.25s, opacity 0.25s;
}

.header--dark .burger span { background: #fff; }

/* ---------- Hero главной ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(90px, 14vh, 170px) 0 clamp(120px, 18vh, 210px);
}

.hero__lines {
  position: absolute;
  right: -18%;
  top: -30%;
  width: 78%;
  max-width: 980px;
  pointer-events: none;
  opacity: 0.9;
}

.hero h1 {
  position: relative;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.15;
  font-weight: 600;
  color: var(--c-ink);
  max-width: 13em;
  letter-spacing: -0.01em;
}

/* ---------- Секции ---------- */

.section { padding: clamp(64px, 9vw, 110px) 0; }

.section--dark {
  background: var(--c-dark);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.section--dark2 { background: var(--c-dark-2); color: #fff; }

.section--grey { background: #f4f3f7; }

.overline {
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 22px;
}

.section--dark .overline { color: rgba(255, 255, 255, 0.6); }

.h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.section--dark .h2, .section--dark2 .h2 { color: #fff; }

.lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--c-muted); max-width: 44em; }

.section--dark .lead, .section--dark2 .lead { color: rgba(255, 255, 255, 0.78); }

/* О компании: текст слева, метрики справа, мозг фоном */

.about__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.about__brain {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: 46%;
  max-width: 640px;
  opacity: 0.85;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 34%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34%);
}

.metrics {
  position: relative;
  display: grid;
  gap: clamp(28px, 4vw, 52px);
}

.metric__value {
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 600;
  line-height: 1.05;
  color: #fff;
}

.metric__label {
  margin-top: 8px;
  font-size: clamp(15px, 1.3vw, 18px);
  color: rgba(255, 255, 255, 0.8);
  max-width: 24em;
}

/* Направления (coMind / нейро) */

.directions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
}

.direction {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 3vw, 40px);
  color: #fff;
  background-size: cover;
  background-position: center;
}

.direction::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 7, 18, 0) 30%, rgba(11, 7, 18, 0.82) 100%);
}

.direction > * { position: relative; z-index: 1; }

.direction__tag {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 10px;
}

.direction h3 {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 600;
  margin-bottom: 10px;
}

.direction p { color: rgba(255, 255, 255, 0.85); margin-bottom: 18px; max-width: 30em; }

.direction .btn { align-self: flex-start; }

/* Продукты */

.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--c-line);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.product:hover {
  box-shadow: 0 18px 44px rgba(35, 20, 80, 0.12);
  transform: translateY(-3px);
  border-color: #d7cdf5;
}

.product__media { min-height: 230px; background: var(--c-lav); }

.product__media img { width: 100%; height: 100%; object-fit: cover; }

.product__body { padding: clamp(20px, 2.6vw, 34px); display: flex; flex-direction: column; }

.product__body h3 { font-size: clamp(20px, 2vw, 26px); font-weight: 600; margin-bottom: 12px; }

.product__body p { font-size: 15px; color: var(--c-muted); flex: 1; }

.product__link {
  margin-top: 18px;
  font-weight: 500;
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product__link::after { content: '→'; transition: transform 0.2s; }
.product__link:hover::after { transform: translateX(4px); }

/* Контакты-фото */

.contacts-photo {
  position: relative;
  min-height: 380px;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.contacts-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 7, 18, 0.55);
}

.contacts-photo .container { position: relative; z-index: 1; }

.contacts-photo h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 600; margin-bottom: 20px; }

.contacts-photo__links { display: flex; flex-wrap: wrap; gap: 14px 36px; font-size: 18px; }

.contacts-photo__links a:hover { color: var(--c-accent-soft); }

/* ---------- Футер ---------- */

.footer {
  background: var(--c-dark-2);
  color: #fff;
  padding: clamp(56px, 8vw, 90px) 0 40px;
  position: relative;
  overflow: hidden;
}

.footer__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer__cta h2 { font-size: clamp(26px, 3vw, 40px); font-weight: 600; line-height: 1.2; margin-bottom: 22px; }

.footer__contacts { display: grid; gap: 10px; font-size: 16px; align-content: start; }

.footer__contacts a:hover { color: var(--c-accent-soft); }

.footer__contacts .small { font-size: 13px; color: rgba(255, 255, 255, 0.55); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 26px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.footer__partners { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

.footer__partners a { display: inline-flex; opacity: 0.85; transition: opacity 0.2s; }
.footer__partners a:hover { opacity: 1; }
.footer__partners img { height: 34px; width: auto; object-fit: contain; }

.footer__social { display: flex; gap: 14px; }

.footer__social img { height: 26px; width: 26px; }

.footer__legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Контентные страницы ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(70px, 10vw, 130px) 0;
  color: #fff;
  background: var(--c-dark);
}

.page-hero--light {
  background: #fff;
  color: var(--c-ink);
}

.page-hero__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.9;
}

.page-hero__media--dim::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 7, 18, 0.88) 0%, rgba(11, 7, 18, 0.35) 70%, rgba(11, 7, 18, 0.15) 100%);
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 600;
  line-height: 1.15;
  max-width: 15em;
}

.page-hero .lead { margin-top: 18px; }

/* Подменю продуктов */

.subnav {
  background: var(--c-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 72px;
  z-index: 90;
}

.subnav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 40px);
  padding: 14px 0;
  font-size: 15px;
}

.subnav a { color: rgba(255, 255, 255, 0.75); transition: color 0.2s; }
.subnav a:hover, .subnav a[aria-current="page"] { color: #fff; }

/* Списки-фичи */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.6vw, 32px);
}

.feature {
  border: 1px solid var(--c-line);
  border-radius: 20px;
  padding: clamp(20px, 2.4vw, 30px);
  background: #fff;
  transition: box-shadow 0.25s;
}

.feature:hover { box-shadow: 0 14px 36px rgba(35, 20, 80, 0.1); }

.feature h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }

.feature p { font-size: 15px; color: var(--c-muted); }

.feature--dark {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
}

.feature--dark p { color: rgba(255, 255, 255, 0.75); }

/* Документы */

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

.doc-link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 16px;
  color: var(--c-accent);
}

.doc-link::before { content: '📄'; filter: grayscale(1); font-size: 15px; }
.doc-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Отзывы */

.quotes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 2.6vw, 32px);
}

.quote {
  border: 1px solid var(--c-line);
  border-radius: 20px;
  padding: clamp(22px, 2.6vw, 32px);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.quote p { font-size: 15.5px; line-height: 1.6; flex: 1; }

.quote__author b { display: block; font-weight: 600; }
.quote__author span { font-size: 13.5px; color: var(--c-muted); }

/* Статья (тексты teamme / политика) */

.article { max-width: 820px; }

.article h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; margin: 40px 0 16px; }

.article h3 { font-size: 19px; font-weight: 600; margin: 28px 0 12px; }

.article p { margin-bottom: 16px; color: #2b2b33; }

.article ul, .article ol { margin: 0 0 18px 22px; display: grid; gap: 8px; }

.article .note {
  border-left: 3px solid var(--c-accent);
  padding: 12px 18px;
  background: #f7f5fc;
  border-radius: 0 12px 12px 0;
}

/* Таблица этапов (results) */

.stage-list { display: grid; gap: clamp(28px, 4vw, 44px); }

.stage {
  border: 1px solid var(--c-line);
  border-radius: 24px;
  padding: clamp(22px, 3vw, 38px);
  background: #fff;
}

.stage h3 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; margin-bottom: 18px; }

.check-list { list-style: none; display: grid; gap: 12px; }

.check-list li {
  position: relative;
  padding-left: 34px;
  font-size: 15.5px;
  color: #2b2b33;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c-lav) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f4bff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Кнопка «наверх» не нужна; появление секций */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

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

@media (max-width: 1023px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__brain { position: static; transform: none; width: 100%; max-width: 520px; margin: 12px auto 0; order: 2; opacity: 0.5; mask-image: none; -webkit-mask-image: none; }
  .directions, .products, .quotes { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .nav, .header .btn { display: none; }
  .burger { display: flex; }
  .header.nav-open .nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    padding: 18px var(--pad) 22px;
    box-shadow: 0 18px 30px rgba(20, 12, 50, 0.12);
  }
  .header--dark.nav-open .nav { background: var(--c-dark); }
  .header.nav-open .nav a { padding: 10px 0; font-size: 17px; }
  .header.nav-open .nav .btn { display: inline-flex; margin-top: 10px; }
  .hero__lines { right: -55%; width: 160%; }
  .product { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .subnav { top: 0; position: static; }
  .contacts-photo__links { flex-direction: column; gap: 10px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}
