/* Главная витрина: герой, абстрактные плашки, фон-сцена */

.kr-landing-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.kr-landing-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

html:has(body.kr-landing-page),
body.kr-landing-page {
  overflow-x: clip;
  max-width: 100%;
}

body.kr-landing-page > .kr-top {
  position: relative;
  z-index: 40;
  width: 100%;
  max-width: 100%;
  left: 0;
  right: 0;
  box-sizing: border-box;
}
body.kr-landing-page > .kr-main,
body.kr-landing-page > .kr-footer {
  position: relative;
  z-index: 1;
  max-width: 100%;
}
body.kr-landing-page > .kr-tabbar {
  /* Не перебивать position: fixed из theme.css — иначе меню уезжает в конец страницы. */
  z-index: 50;
  width: 100%;
  max-width: 100%;
  left: 0;
  right: 0;
  box-sizing: border-box;
}

body.kr-landing-page .kr-main.hero,
body.kr-landing-page .kr-app-cards,
body.kr-landing-page .apps-section {
  overflow-x: clip;
  max-width: 100%;
}

.kr-landing-hero {
  position: relative;
  padding: clamp(1.75rem, 5vw, 3.25rem) 0 clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 1.75rem;
  max-width: 42rem;
}

.kr-landing-brand {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 5.5vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
  background: var(--kr-brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kr-landing-title {
  margin: 0;
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--kr-ink);
}

.kr-landing-cta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.kr-landing-btn {
  flex: 1 1 0;
  min-width: 0;
  max-width: 11.5rem;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--kr-ghost-border);
  background: transparent;
  color: var(--kr-ink);
  text-decoration: none;
  transition:
    border-color 0.25s var(--kr-ease),
    background 0.25s var(--kr-ease),
    color 0.25s var(--kr-ease),
    transform 0.25s var(--kr-ease);
}

.kr-landing-btn:hover {
  border-color: rgba(61, 188, 212, 0.5);
  color: var(--kr-cyan);
  transform: translateY(-1px);
}

.kr-landing-btn--primary {
  border: 0;
  background: var(--kr-btn);
  color: var(--kr-btn-ink);
}

.kr-landing-btn--primary:hover {
  color: var(--kr-btn-ink);
  filter: brightness(1.06);
}

.kr-landing-section {
  margin-bottom: 2rem;
}

.product-tile {
  /* Свечение рисуем внутри, без расширения ширины документа. */
  overflow: hidden !important;
  padding: 0 !important;
  isolation: isolate;
}

.product-tile-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: transparent;
}

.product-tile-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--kr-radius) var(--kr-radius) 0 0;
  background: var(--kr-deep);
}

.product-tile-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.7s var(--kr-ease), filter 0.5s ease;
}

.product-tile-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: 3;
}

.product-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(4, 6, 26, 0.08) 0%,
    rgba(4, 6, 26, 0.18) 50%,
    rgba(4, 6, 26, 0.55) 100%
  );
  pointer-events: none;
}

html[data-theme="light"] .product-tile-shade {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(8, 16, 48, 0.14) 55%,
    rgba(8, 16, 48, 0.42) 100%
  );
}

.product-tile-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 4;
}

.product-tile-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.25rem 1.3rem;
  background: var(--kr-panel);
  border-radius: 0 0 var(--kr-radius) var(--kr-radius);
}

.product-tile .product-head {
  margin-bottom: 0.15rem;
}

.product-tile .product-icon {
  margin-bottom: 0.35rem;
}

.product-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
  align-items: center;
}

.product-tile:hover .product-tile-img,
.product-tile.is-glowing .product-tile-img {
  transform: scale(1.04);
  filter: saturate(1.08) brightness(1.04);
}

.product-tile.is-glowing .product-tile-fx {
  opacity: 1;
}

.product-tile.is-glowing {
  box-shadow:
    0 0 0 1px rgba(61, 188, 212, 0.22),
    0 0 28px rgba(61, 188, 212, 0.16),
    var(--kr-panel-shadow);
}

.kr-fold-author {
  margin: 1.5rem 0 0;
  border: 1px solid var(--kr-panel-border);
  border-radius: var(--kr-radius);
  background: var(--kr-panel);
  padding: 0.35rem 1rem 0.85rem;
}

.kr-fold-author > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 0.15rem;
  font-weight: 600;
  color: var(--kr-ink);
}

.kr-fold-author > summary::-webkit-details-marker {
  display: none;
}

.kr-fold-author-body {
  padding-bottom: 0.5rem;
}

.kr-fold-author-body .person {
  margin: 0 0 0.85rem;
  color: var(--kr-muted);
}

@media (max-width: 575px) {
  .kr-landing-cta {
    width: 100%;
  }
  .kr-landing-btn {
    max-width: none;
  }
  .product-tile-actions .btn-open {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-tile-img,
  .product-tile-fx {
    transition: none !important;
  }
  .kr-landing-stage {
    display: none;
  }
}
