/* Landing: кастомный scrollbar и кнопка «Наверх» */

/* ── Кастомный scrollbar (только на главной) ── */
html:has(body.landing-page) {
  scrollbar-width: thin;
  scrollbar-color: var(--border-focus, #4b5563) var(--bg-deep, #090b0f);
}

html:has(body.landing-page)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html:has(body.landing-page)::-webkit-scrollbar-track {
  background: var(--bg-deep, #090b0f);
}

html:has(body.landing-page)::-webkit-scrollbar-thumb {
  background: var(--border, #2d323d);
  border-radius: 5px;
  border: 2px solid var(--bg-deep, #090b0f);
}

html:has(body.landing-page)::-webkit-scrollbar-thumb:hover {
  background: var(--border-focus, #4b5563);
}

html:has(body.landing-page)::-webkit-scrollbar-corner {
  background: var(--bg-deep, #090b0f);
}

/* ── Кнопка «Наверх» ── */
.landing-back-to-top {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 99;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s, transform 0.2s, background 0.2s, border-color 0.2s;
}

.landing-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.landing-back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.landing-back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.landing-back-to-top i {
  font-size: 1.125rem;
}

@media (max-width: 768px) {
  .landing-back-to-top {
    right: var(--space-4);
    bottom: var(--space-4);
    width: 44px;
    height: 44px;
  }
}
