.app-frame img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 5, 32, 0.86);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lightbox.is-open {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  cursor: zoom-in;
}

.lightbox img.is-zoomed {
  cursor: grab;
}

.lightbox img.is-dragging {
  cursor: grabbing;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Плавное появление шапки и hero при загрузке */
.site-header,
.hero-copy > *,
.hero-frame,
.integration-strip {
  animation: fade-up 0.6s ease both;
}

.site-header {
  animation-duration: 0.4s;
}

.hero-copy > *:nth-child(1) {
  animation-delay: 0.05s;
}

.hero-copy > *:nth-child(2) {
  animation-delay: 0.12s;
}

.hero-copy > *:nth-child(3) {
  animation-delay: 0.19s;
}

.hero-copy > *:nth-child(4) {
  animation-delay: 0.26s;
}

.hero-copy > *:nth-child(5) {
  animation-delay: 0.33s;
}

.hero-frame {
  animation-delay: 0.3s;
}

.integration-strip {
  animation-delay: 0.4s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Появление секций и карточек при скролле */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group.is-visible > * {
  transition-delay: calc(var(--reveal-index, 0) * 70ms);
}

/* Лёгкий подъём карточек при наведении */
.capability-grid article,
.benefit-table article,
.workflow-list li,
.pricing-card {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.capability-grid article:hover,
.benefit-table article:hover,
.workflow-list li:hover,
.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Плавное открытие мобильного меню вместо мгновенного display */
@media (max-width: 900px) {
  .main-nav {
    display: flex;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px);
    transition:
      opacity 0.16s ease,
      transform 0.16s ease,
      visibility 0s linear 0.16s;
  }

  .main-nav.is-open {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity 0.16s ease,
      transform 0.16s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .hero-copy > *,
  .hero-frame,
  .integration-strip {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
