/* === Monochrome Line — SkyLane === */
:root {
  --bg: #ffffff;
  --fg: #0B0F14;
  --muted: #6B7280;
  --accent: #3B82F6;
  --line: rgba(11,15,20,0.12);

  --container: 1120px;
  --radius: 12px;

  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0F14;
    --fg: #E5E7EB;
    --muted: #94A3B8;
    --line: rgba(229,231,235,0.14);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.container {
  width: 100%;
  max-width: var(--container);
  padding: 0 20px;
  margin-inline: auto;
}

@media (max-width: 560px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  z-index: 20;
}
.header__inner { display: flex; align-items: center; gap: 16px; padding: 14px 0; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--fg); }
.brand__mark { color: var(--accent); font-family: var(--font-mono); font-weight: 700; }
.brand__name { font-weight: 700; letter-spacing: 0.2px; }

.nav { margin-left: auto; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav__link {
  text-decoration: none;
  color: var(--fg);
  position: relative;
  padding: 6px 2px;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav__link:hover::after, .nav__link:focus-visible::after { transform: scaleX(1); }

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* Hero */
.hero { padding: clamp(56px, 8vw, 120px) 0 40px; }
.hero__title {
  font-size: clamp(28px, 6.4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0 0 14px 0;
}
.mono { font-family: var(--font-mono); }
.hero__subtitle {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 24px 0;
}

@media (max-width: 560px) {
  .hero {
    padding: 72px 0 40px;
  }
  .hero__subtitle {
    font-size: 15px;
    line-height: 1.6;
  }
}

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__underline {
  height: 2px; margin-top: clamp(24px, 4vw, 36px);
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: draw 1.2s .2s cubic-bezier(.3,.8,.2,1) forwards;
}
@keyframes draw { to { transform: scaleX(1); }}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--fg);
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 600;
  transition: transform .12s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}
.btn--ghost {
  background: transparent; color: var(--fg); border-color: var(--line);
}
.btn--link {
  border-color: transparent; color: var(--accent); padding-inline: 6px;
}

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }

@media (max-width: 560px) {
  .section {
    padding: 48px 0 64px;
  }
}

.section__title {
  font-size: clamp(22px, 3vw, 28px);
  margin: 0 0 22px 0;
  border-bottom: 2px solid var(--fg);
  display: inline-block;
  padding-bottom: 8px;
}

/* Features Grid */
.grid.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.feature h3 { margin: 0 0 6px 0; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: 60px 1fr; gap: 16px; align-items: start; border-bottom: 1px dashed var(--line); padding: 14px 0; }
.step__num { font-family: var(--font-mono); color: var(--accent); font-weight: 700; }

/* Plan chips */
.plan-switch { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--fg);
  font-weight: 600;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.chip:hover { border-color: var(--fg); }
.chip.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.plan-note { color: var(--muted); margin-top: 10px; }
.plan-cta { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.plan-selected { color: var(--muted); }

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 0 0; color: var(--muted); }

/* Footer */
.site-footer { padding: 22px 0 36px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--muted); text-decoration: none; }

/* Scrollbar (top progress) */
.scrollbar {
  position: fixed; left: 0; top: 0; width: 100%; height: 3px;
  background: transparent; z-index: 50;
}
.scrollbar__bar {
  display: block; height: 100%; width: 0%;
  background: var(--accent);
  transition: width .08s linear;
}

/* Reveal animations */
.reveal { 
  opacity: 0; 
  transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease, filter .6s ease;
  filter: blur(2px);
}
.reveal.is-visible {
  opacity: 1; transform: translateY(0); filter: blur(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .grid.features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nav { display: none; } /* мини-хедер без меню (ультраминимал) */
  .grid.features { grid-template-columns: 1fr; }
  .step { grid-template-columns: 44px 1fr; }
  .plan-cta { flex-direction: column; align-items: flex-start; }
}

/* Accessibility & motion */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero__underline, .scrollbar__bar { transition: none !important; animation: none !important; }
}


/* ТЕСТОВЫЕ СТИЛИ */


/* === Guides: List-Line === */
.guide-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.guide-list__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px; padding: 14px 0;
  text-decoration: none; color: var(--fg);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.guide-list__item .guide-list__title { font-weight: 700; }
.guide-list__item .guide-list__meta { color: var(--muted); }
.guide-list__item .guide-list__chev { transition: transform .2s ease; }
.guide-list__item::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  transform: scaleX(0); transform-origin: left; background: var(--accent);
  transition: transform .25s ease;
}
.guide-list__item:hover::after { transform: scaleX(1); }
.guide-list__item:hover .guide-list__chev { transform: translateX(4px); }

@media (max-width: 640px) {
  .guide-list__item { grid-template-columns: 1fr auto; }
  .guide-list__item .guide-list__meta { display: none; }
}

/* === Guides: Card-Grid === */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 20px);
}
.guide-card {
  display: block; text-decoration: none; color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; position: relative;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.guide-card h3 { margin: 0 0 8px 0; }
.guide-card ul { margin: 0; padding-left: 18px; color: var(--muted); }
.guide-card__chev { position: absolute; right: 12px; bottom: 10px; }
.guide-card:hover { transform: translateY(-2px); border-color: var(--fg); box-shadow: 0 6px 22px rgba(0,0,0,.06); }

@media (max-width: 960px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .guide-grid { grid-template-columns: 1fr; } }

/* === Guides: TOC-Blocks === */
.guide-toc {
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}
.guide-toc__item {
  display: block; text-decoration: none; color: var(--fg);
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 16px; position: relative; transition: border-color .2s ease, background .2s ease;
}
.guide-toc__head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.guide-toc__list { margin: 8px 0 10px 18px; color: var(--muted); }
.guide-toc__chev { font-weight: 700; }
.guide-toc__item:hover { border-color: var(--fg); background: color-mix(in oklab, var(--bg) 92%, transparent); }

.badge {
  display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid var(--accent); color: var(--accent);
  padding: 2px 8px; border-radius: 999px;
}

@media (max-width: 960px) { .guide-toc { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .guide-toc { grid-template-columns: 1fr; } }

/* === Guides: Mono-Chips === */
.guide-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip--guide { padding: 8px 12px; }
.guide-chips__panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.guide-chips__title { margin: 0 0 6px 0; font-size: 18px; }
.guide-chips__desc { margin: 0 0 12px 0; color: var(--muted); }

/* Уменьшение картинок */

/* Ограничение ширины скриншотов */
.shot {
  margin: 16px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: color-mix(in oklab, var(--bg) 96%, transparent);
  max-width: 360px; 
  justify-self: center;
}

.shot img {
  display: block;
  width: 100%; 
  height: auto;
  object-fit: contain;
  justify-self: center;
}

/* === 404 page === */
.nf-hero { padding-top: clamp(72px, 10vw, 140px); }
.nf-pre { margin: 0 0 4px 0; font-family: var(--font-mono); }
.nf-code {
  margin: 0 0 10px 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(72px, 14vw, 160px);
  line-height: 0.9;
  letter-spacing: -2px;
}
.nf-slashes {
  color: var(--accent);
  display: inline-block;
  margin-right: 6px;
  animation: nf-blink 2.6s ease-in-out infinite;
}
@keyframes nf-blink {
  0%, 100% { opacity: .35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.nf-suggest { margin-top: 18px; }
.nf-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* Узкие экраны: делаем всё компактнее */
@media (max-width: 560px) {
  .nf-code { letter-spacing: -1px; }
}



/* === Mobile polish & safe areas === */
@supports (padding: max(0px)) {
  :root {
    /* Базовый мобильный внутренний отступ */
    --gutter-mobile: 24px;
  }

  /* 1) Контейнеры: гибкий горизонтальный отступ + safe area */
  .container {
    padding-left: max(var(--gutter-mobile), env(safe-area-inset-left));
    padding-right: max(var(--gutter-mobile), env(safe-area-inset-right));
  }

  /* 2) Основные секции: добавим воздуха сверху/снизу на узких экранах */
  @media (max-width: 560px) {
    .section { padding: 56px 0 72px; }
    .hero { padding: 84px 0 44px; }
  }

  /* 3) Хедер/футер: не прилипают к краям на iPhone */
  .site-header .header__inner,
  .site-footer .footer__inner {
    padding-left: max(var(--gutter-mobile), env(safe-area-inset-left));
    padding-right: max(var(--gutter-mobile), env(safe-area-inset-right));
  }

  /* 4) FAQ/детали: внутренние поля, чтобы текст не касался рамок */
  .faq details {
    padding: 16px;
  }

  /* 5) Скриншоты в шагах: центр и «дыхание» */
  .step .shot {
    grid-column: 1 / -1;
    margin: 14px auto 18px;
    max-width: 360px;
    justify-self: center;
  }

  /* 6) Кнопки: тач-зоны на мобилке */
  @media (max-width: 560px) {
    .btn { padding: 12px 16px; }
  }
}

/* Фолбэк для браузеров без env() / max(): просто увеличим отступы */
@media (max-width: 560px) {
  .container { padding-left: 24px; padding-right: 24px; }
  .site-header .header__inner,
  .site-footer .footer__inner { padding-left: 24px; padding-right: 24px; }
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end; /* ссылки справа */
}
.footer-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}