/* Последние правки для видео и точного фирменного знака Nitro. */
.logo-panel.has-video {
  width: min(440px, 100vw);
  aspect-ratio: 1.78 / 1;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
}

.logo-panel.has-video::before,
.logo-panel.has-video::after {
  display: none;
}

.logo-panel.has-video .logo-video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: normal;
  transform: scale(1.32);
  transform-origin: center;
}

/* Чёрные пиксели PNG сливаются с фоном, остаётся красный знак. */
.link-card .nitro-icon {
  background: #100c0d !important;
  border: 1px solid rgba(227, 40, 60, 0.7) !important;
  box-shadow: 0 0 0 1px rgba(227, 40, 60, 0.14), inset 0 0 16px rgba(199, 32, 50, 0.16);
}

.link-card .nitro-icon img {
  width: 132%;
  height: 132%;
  max-width: none;
  left: -16%;
  top: -16%;
  object-fit: contain;
  mix-blend-mode: screen;
}

/* Карточки появляются только когда входят в область экрана. */
.link-card.reveal-item,
.section-label.reveal-item {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(58px) scale(0.96);
}

.link-card.reveal-item.is-visible,
.section-label.reveal-item.is-visible {
  animation: nitro-card-arrival 1.15s var(--reveal-delay, 0ms) cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nitro-card-arrival {
  70% {
    opacity: 1;
    filter: blur(0.4px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}


/* iPhone fallback: a transparent CSS entrance if VP9 WebM cannot play. */
.logo-panel.has-video .logo-fallback {
  position: absolute;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-5%) scale(1.2);
}

.logo-panel.has-video.is-fallback .logo-video {
  visibility: hidden;
}

.logo-panel.has-video.is-fallback .logo-fallback {
  animation: nitro-fallback-logo 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nitro-fallback-logo {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateX(-12%) scale(1.04);
  }

  70% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }

  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateX(0) scale(1.2);
  }
}

/* The supplied WhatsApp logo is recolored to the same red as the other icons. */
.link-card > .icon.whatsapp-icon {
  position: relative;
  color: var(--red-bright);
  overflow: hidden;
}

.whatsapp-icon img {
  display: none;
}

.whatsapp-icon::before {
  content: "";
  width: 29px;
  height: 29px;
  background: currentColor;
  -webkit-mask: url("whatsapp-logo.webp") center / contain no-repeat;
  mask: url("whatsapp-logo.webp") center / contain no-repeat;
}

/* A script failure must never leave cards invisible. */
.reveal-item.reveal-fallback {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  animation: none !important;
}


@media (prefers-reduced-motion: reduce) {
  .logo-panel.has-video.is-fallback .logo-fallback {
    animation: none;
    opacity: 1;
    clip-path: none;
    transform: scale(1.2);
  }
}

/* Let the animated WebP fill the same fallback frame as the PNG. */
.logo-panel.has-video .logo-fallback > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
