.route-ubox-video,
.ubox-video-page {
  --ubox-token-accent: #13ae67;
  --ubox-token-dark: #071218;
  --ubox-token-deep: #0b222a;
  --ubox-token-ink: #eef5f2;
  --ubox-token-muted: #a9bcc0;
  --ubox-token-light: #edf3f0;
  --ubox-token-light-ink: #102126;
  --ubox-token-light-muted: #52656a;
}

.ubox-video-page .ubox-video-hero__scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ubox-video-page .ubox-token-hero__media::after {
  background:
    linear-gradient(90deg, #071218 0%, rgba(7, 18, 24, 0.96) 27%, rgba(7, 18, 24, 0.72) 45%, rgba(7, 18, 24, 0.08) 68%),
    linear-gradient(0deg, rgba(7, 18, 24, 0.62) 0%, rgba(7, 18, 24, 0) 48%);
}

.ubox-video-page .ubox-token-hero__content {
  z-index: 1;
}

.ubox-video-page .ubox-token-hero__summary {
  max-width: 42rem;
}

.ubox-video-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.ubox-video-watch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.78rem;
  min-height: 3.55rem;
  padding: 0.78rem 1.45rem;
  border: 2px solid #fff;
  background: #fff;
  border-radius: 999px;
  color: var(--ubox-token-dark);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.ubox-video-watch-button:hover {
  border-color: #dce8e2;
  background: #dce8e2;
  transform: translateY(-0.12rem);
}

.ubox-video-watch-button:focus-visible {
  outline: 3px solid var(--ubox-token-accent);
  outline-offset: 4px;
}

.ubox-video-watch-button__icon {
  width: 0;
  height: 0;
  border-top: 0.36rem solid transparent;
  border-bottom: 0.36rem solid transparent;
  border-left: 0.58rem solid currentColor;
}

body.route-ubox-video.ubox-video-player-open {
  overflow: hidden;
}

.ubox-video-dialog {
  width: fit-content;
  max-width: none;
  max-height: 96dvh;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--ubox-token-ink);
}

.ubox-video-dialog::backdrop {
  background: rgba(2, 8, 12, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.ubox-video-dialog:focus {
  outline: 0;
}

.ubox-video-dialog__panel {
  position: relative;
  width: fit-content;
  max-width: 94vw;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ubox-video-dialog__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(238, 245, 242, 0.5);
  border-radius: 50%;
  background: transparent;
  color: var(--ubox-token-ink);
  cursor: pointer;
  appearance: none;
}

.ubox-video-dialog__close::before,
.ubox-video-dialog__close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.8rem;
  height: 2px;
  content: "";
  background: currentColor;
  transform-origin: center;
}

.ubox-video-dialog__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ubox-video-dialog__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ubox-video-dialog__close:hover {
  border-color: var(--ubox-token-accent);
  color: var(--ubox-token-accent);
}

.ubox-video-dialog__close:focus-visible {
  outline: 3px solid var(--ubox-token-accent);
  outline-offset: 3px;
}

.ubox-video-dialog__player {
  display: block;
  width: min(94vw, calc(94dvh * 0.56296));
  max-width: 94vw;
  height: auto;
  max-height: 94dvh;
  margin: 0;
  aspect-ratio: 608 / 1080;
  border-radius: 0.55rem;
  background: #000;
  object-fit: contain;
}

.ubox-video-page .ubox-token-capability h3 {
  line-height: 1.42;
}

.ubox-video-page .ubox-token-showcase::before {
  background-image: url("/img/pages/products-ubox-video/ubox-video-showcase-workflow-v2.webp");
  background-position: center;
}

.ubox-video-page .ubox-token-showcase::after {
  background:
    linear-gradient(90deg, rgba(1, 5, 8, 0.06) 0%, rgba(1, 5, 8, 0.08) 55%, rgba(1, 5, 8, 0.76) 76%, rgba(1, 5, 8, 0.96) 100%),
    linear-gradient(180deg, rgba(1, 5, 8, 0.14) 0%, rgba(1, 5, 8, 0) 42%, rgba(1, 5, 8, 0.34) 100%);
}

.ubox-video-showcase__summary {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: rgba(238, 245, 242, 0.76);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.72;
}

.ubox-video-page .ubox-token-function-card > img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center top;
}

.ubox-video-page .ubox-token-function-card__body {
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
}

.ubox-video-page .ubox-token-function-card__body > a {
  align-self: end;
}

.ubox-video-scene-media {
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
}

.ubox-video-scene-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ubox-video-page .ubox-token-slogan {
  background:
    radial-gradient(circle at 78% 48%, rgba(19, 174, 103, 0.11), transparent 25%),
    linear-gradient(120deg, rgba(19, 174, 103, 0.035), transparent 44%),
    var(--ubox-token-light);
}

.ubox-video-slogan__mascot img {
  width: min(100%, 38rem);
  max-height: 82dvh;
}

@media (max-width: 900px) {
  .ubox-video-page .ubox-token-showcase::after {
    background:
      linear-gradient(180deg, #010508 0%, rgba(1, 5, 8, 0.88) 30%, rgba(1, 5, 8, 0.28) 62%, rgba(1, 5, 8, 0.66) 100%),
      linear-gradient(90deg, rgba(1, 5, 8, 0.46), rgba(1, 5, 8, 0.16));
  }

  .ubox-video-page .ubox-token-showcase::before {
    background-position: 40% center;
  }
}

@media (max-width: 620px) {
  .ubox-video-page .ubox-video-hero__scene {
    object-position: 64% center;
    opacity: 0.8;
  }

  .ubox-video-page .ubox-token-hero__media::after {
    background:
      linear-gradient(90deg, rgba(7, 18, 24, 0.96) 0%, rgba(7, 18, 24, 0.72) 74%, rgba(7, 18, 24, 0.38) 100%),
      linear-gradient(0deg, rgba(7, 18, 24, 0.78) 0%, rgba(7, 18, 24, 0.08) 68%);
  }

  .ubox-video-page .ubox-token-showcase::before {
    background-position: 30% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ubox-video-page *,
  .ubox-video-page *::before,
  .ubox-video-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
