/* Лендинг LinaliAPI — перенос макета «Лендинг / Desktop / Light» (1440×4320).
 * Контейнер 1200px при полях 120px, сетка карточек 386px с зазором 20px,
 * кнопки-таблетки 48px — все значения сняты с фрейма Figma. */

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 1440px) {
  .wrap {
    padding: 0;
  }
}

/* --- Кнопки: таблетка 999px, высота 48px --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 160ms;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: var(--accent-strong);
  color: #ffffff;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

/* --- 01 / Navigation, 84px --- */
.nav {
  height: 84px;
  display: flex;
  align-items: center;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-logo {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}

.nav-links a:hover {
  color: var(--text);
}

.nav .btn {
  margin-left: 24px;
}

/* --- 02 / Hero, 515px --- */
.hero {
  position: relative;
  background: var(--canvas);
  padding: 76px 0 88px;
  overflow: hidden;
}

/* Декоративные пятна — акцент-soft, лежат под контентом. */
.blob {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  pointer-events: none;
}

.blob-a {
  width: 620px;
  height: 620px;
  top: -160px;
  right: -60px;
}

.blob-b {
  width: 360px;
  height: 360px;
  top: 300px;
  right: -240px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  /* 570px текст + 558px терминал — пропорции фрейма Figma. */
  grid-template-columns: minmax(0, 570fr) minmax(0, 558fr);
  gap: 72px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: 60px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-body {
  margin: 24px 0 0;
  max-width: 520px;
  font-size: 19px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* --- Терминал --- */
.terminal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.terminal-bar {
  height: 51px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: var(--surface-2);
}

.terminal-url {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.terminal-flow {
  padding: 26px;
}

.terminal-flow p {
  margin: 0;
  font-family: var(--font-mono);
  /* В макете каждая строка — одна строка терминала, без переноса. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t-cmd {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.t-status {
  margin-top: 14px !important;
  font-size: 12px;
  font-weight: 700;
  color: var(--up);
}

.t-res {
  margin-top: 14px !important;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}

/* --- Заголовки секций --- */
.section-title {
  margin: 0;
  font-size: 42px;
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.025em;
  max-width: 860px;
}

.section-lede {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-2);
  max-width: 860px;
}

/* --- 03 / Лента совместимости --- */
.marquee-section {
  background: var(--canvas);
  padding: 48px 0 64px;
}

.marquee {
  margin-top: 56px;
  display: flex;
  gap: 16px;
  overflow: hidden;
  /* Края растворяются — лента выглядит бесконечной. */
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee-track {
  display: flex;
  gap: 16px;
  flex: 0 0 auto;
  animation: marquee 22s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - 16px)); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

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

.marquee-note {
  margin: 23px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

/* --- 04 / Возможности --- */
.features {
  background: var(--surface-2);
  padding: 80px 0;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}

/* Акцентная карточка — заливка accent-soft, как в макете. */
.card-soft {
  background: var(--accent-soft);
}

.dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.card h3 {
  margin: 12px 0 0;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-2);
}

/* --- 05 / Как это работает --- */
.how {
  background: var(--canvas);
  padding: 80px 0;
}

.step-num {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-strong);
}

.url-sample {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.url-sample p {
  margin: 0;
  font-family: var(--font-mono);
}

.url-main {
  font-size: 15px;
  color: var(--text);
}

.url-auth {
  margin-top: 8px !important;
  font-size: 14px;
  color: var(--text-2);
}

/* --- 06 / Живая демонстрация --- */
.demo {
  background: var(--surface);
  padding: 80px 0;
}

.demo-split {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 64px;
  align-items: center;
}

.demo-body {
  margin: 20px 0 24px;
  font-size: 18px;
  line-height: 1.52;
  font-weight: 400;
  color: var(--text-2);
}

/* --- 07 / Тарифы --- */
.pricing {
  background: var(--canvas);
  padding: 80px 0;
}

/* --- 08 / FAQ --- */
.faq {
  background: var(--surface-2);
  padding: 80px 0;
}

.faq-list {
  margin-top: 22px;
}

/* Разделитель только сверху — рамка не замыкается вокруг блока. */
.faq-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
}

.faq-item p {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-2);
}

/* --- 09 / Final CTA --- */
.cta {
  position: relative;
  background: var(--canvas);
  padding: 76px 0 84px;
  overflow: hidden;
}

.blob-cta {
  width: 560px;
  height: 420px;
  top: -80px;
  right: 60px;
}

.cta-inner {
  position: relative;
  z-index: 1;
}

.cta-title {
  margin: 0;
  max-width: 850px;
  font-size: 42px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.cta-body {
  margin: 22px 0 24px;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-2);
}

/* --- 10 / Footer --- */
.footer {
  background: var(--surface);
  padding: 42px 0;
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  font-size: 20px;
  font-weight: 700;
}

.footer-copy {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  margin-left: 100px;
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
}

/* ================= Мобильный: «Лендинг / Mobile / Light», 393px ================= */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav .btn {
    margin-left: auto;
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
  }

  .hero {
    padding: 40px 0 48px;
  }

  .hero-grid,
  .demo-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-body,
  .section-lede,
  .demo-body,
  .cta-body {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .section-title,
  .cta-title {
    font-size: 30px;
  }

  .cards-3,
  .cards-2 {
    grid-template-columns: 1fr;
  }

  .features,
  .how,
  .demo,
  .pricing,
  .faq {
    padding: 48px 0;
  }

  .blob-a {
    width: 340px;
    height: 340px;
    right: -140px;
  }

  .blob-b,
  .blob-cta {
    display: none;
  }

  .url-sample p {
    font-size: 13px;
    word-break: break-all;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-copy {
    margin-left: 0;
  }

  .footer-links {
    margin-left: 0;
  }
}
