/* Bring the existing DSN controls above the live canvas. The rest of the
   control bar is transparent to pointer input. */
.tego-splash[data-tego-eyes-header] > .control-nav {
  z-index: 6;
  pointer-events: none;
}

.tego-splash[data-tego-eyes-header] .control-nav :is(.prev-container, .next-container) {
  pointer-events: auto;
}

.tego-splash[data-tego-eyes-header] .control-nav .container-inner:focus-visible {
  outline: 2px solid #14bfb5;
  outline-offset: 3px;
}

/* Some DSN themes mirror .slide-content into an overlay above the slider. */
.tego-splash.tego-eyes-active .dsn-slider-content,
.tego-splash.tego-eyes-active .dsn-slider-content *,
.tego-splash .tego-eyes-slot::before,
.tego-splash .tego-eyes-slot::after {
  pointer-events: none;
}

.tego-splash .tego-eyes-slot {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #070918;
}

.tego-splash .tego-eyes-placeholder {
  pointer-events: none;
  opacity: 0;
}

.tego-eyes-load-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  margin: 0;
  text-align: center;
  color: #e4e6f8;
}

.tego-eyes-load-status[hidden] {
  display: none;
}

.tego-eyes-scene {
  --tego-eyes-caption-line-height: min(clamp(36px, 4.05vw, 74px), 12vw);
  position: absolute;
  inset: 0;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  background: radial-gradient(ellipse at 50% 47%, #1b2145, #070918 72%);
  color: #bbb;
  font: 14px system-ui, sans-serif;
  touch-action: pan-y;
}

.tego-eyes-scene .tego-eyes-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: max(100vw, 177.778vh);
  width: max(100vw, 177.778dvh);
  max-width: none;
  height: auto;
  image-rendering: pixelated;
  touch-action: pan-y;
}

.tego-splash .swiper-slide-active .tego-eyes-scene {
  pointer-events: auto;
}

.tego-eyes-scene .tego-eyes-canvas:focus-visible {
  outline: 1px solid #14bfb5;
  outline-offset: -2px;
}

.tego-eyes-scene .tego-eyes-narration,
.tego-eyes-scene .tego-eyes-cue {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  visibility: hidden;
  pointer-events: none;
}

.tego-eyes-scene .tego-eyes-narration canvas,
.tego-eyes-scene .tego-eyes-cue canvas {
  display: block;
  width: auto;
  max-width: none;
  height: calc(2 * var(--tego-eyes-caption-line-height));
  image-rendering: pixelated;
}

.tego-eyes-scene .tego-eyes-cue--touch canvas {
  height: var(--tego-eyes-caption-line-height);
}

@media (max-width: 700px), (max-aspect-ratio: 5/4) {
  .tego-eyes-scene .tego-eyes-narration { display: none; }
}

@media (max-aspect-ratio: 3/2) {
  .tego-eyes-scene .tego-eyes-canvas {
    /* Keep both eyes inside the central crop on phones. */
    width: min(166.667vw, 177.778vh);
    width: min(166.667vw, 177.778dvh);
  }
}

@media (max-width: 700px) and (orientation: portrait) {
  /* Make room for the shared, centered headline in the portrait crop. */
  .tego-splash[data-tego-eyes-header] .tego-eyes-scene {
    top: min(80vw, 46vh);
    top: min(80vw, 46dvh);
  }
}

/* Retain the theme's title elements so its transition can run. */
.tego-splash[data-tego-eyes-header] .slide-content[aria-hidden="true"] {
  opacity: 0 !important;
  pointer-events: none;
}

/* One real heading per panel, outside Swiper's slides and DSN's text animation. */
.tego-splash[data-tego-eyes-header] .tego-hero-headlines {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  align-items: center;
  padding-inline: clamp(18px, 7vw, 110px);
  pointer-events: none;
  transition: opacity 160ms ease;
}

.tego-splash[data-tego-eyes-header] .tego-hero-headlines.is-transitioning {
  opacity: 0;
}

.tego-splash[data-tego-eyes-header] .tego-hero-headlines .tego-hero-headline[data-tego-heading] {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: start;
  max-width: 100%;
  margin: 0;
  color: #fff;
  font-family: var(--heading-font, "Poppins", sans-serif);
  font-size: clamp(39px, 6vw, 108px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-align: left;
  text-transform: none;
  pointer-events: none;
}

.tego-splash[data-tego-eyes-header] .tego-hero-headlines .tego-hero-headline[hidden] {
  display: none;
}

.tego-splash[data-tego-eyes-header] .tego-hero-headline .tego-hero-line {
  display: block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  margin-inline: 0;
  padding: 0.03em 0.16em 0.06em;
  background: rgba(6, 10, 12, 0.92);
}

.tego-splash[data-tego-eyes-header] .tego-hero-headline .tego-hero-line + .tego-hero-line {
  margin-top: 0.055em;
  padding: 0.03em 0.12em 0.12em;
}

/* Keep the original splash gradient on the active title layer. */
.tego-splash[data-tego-eyes-header] .tego-hero-headlines .tego-hero-headline .tego-hero-gradient {
  display: block;
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
  color: #26e5d8;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .tego-splash[data-tego-eyes-header] .tego-hero-headlines .tego-hero-headline .tego-hero-gradient {
    background-color: #26e5d8;
    background-image: linear-gradient(110deg, #00efbd 0%, #53e8ff 35%, #8dbeff 65%, #00efbd 100%);
    background-size: 240% 100%;
    background-position: 0% 50%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: tego-header-gradient var(--tego-splash-speed, 6s) ease-in-out infinite alternate;
  }
}

@keyframes tego-header-gradient {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .tego-splash[data-tego-eyes-header] .tego-hero-headlines {
    transition: none;
  }

  .tego-splash[data-tego-eyes-header] .tego-hero-headlines .tego-hero-headline .tego-hero-gradient {
    animation: none;
    background-position: 50% 50%;
  }
}

@media (max-width: 520px) {
  .tego-splash[data-tego-eyes-header] .tego-hero-headlines .tego-hero-headline[data-tego-heading] {
    font-size: clamp(29px, 8.6vw, 44px);
  }
}
